My small tribute to an unknown (to me) skateboarder – Brighton & Hove

May 17th, 2011

Last weekend I noticed this on a Brighton bench.

Skateboarder tribute

I had to share.

admin Music, Skateboarding

Show tweets including retweets from user with Linq2Twitter issue

May 16th, 2011

I came across a weird one this week.

I have been working on a brand new project at work and one of the user stories was about a Twitter “widget” with tweets from a specific user. It was specified that the user could be any user and didn’t need to be authenticated. This is how I implemented it:

var twitterContext = new TwitterContext();

var statusTweets = from tweet in twitterContext.Status
                   where tweet.Type == StatusType.User &&
                   tweet.ScreenName == username
                   select tweet;

Then the requirements changed to include retweets from the same user. I changed my code to this:

var twitterContext = new TwitterContext();

var statusTweets = from tweet in twitterContext.Status
                   where tweet.Type == StatusType.User &&
                   tweet.ScreenName == username &&
                   tweet.IncludeRetweets
                   select tweet;

But when doing that, nothing was being returned.

After a long time trying other approaches I finally found what the problem was. Because I use Resharper I was advised to write ‘tweet.IncludeRetweets == true’ as only ‘tweet.IncludeRetweets’ and that just didn’t work. You actually need to have ‘tweet.IncludeRetweets == true’.

So, here is the correct code to get tweets from a user including retweets without being authenticated:

var twitterContext = new TwitterContext();

var statusTweets = from tweet in twitterContext.Status
                   where tweet.Type == StatusType.User &&
                   tweet.ScreenName == username &&
                   tweet.IncludeRetweets == true
                   select tweet;

I hope someone will find this useful.

admin C#, Linq2Twitter

Les Claypool – South of the Pumphouse

May 10th, 2011

As a great fan of Les Claypool I just had to get “South of the Pumphouse” – his novel. Yeah, I know it was released in 2007…

Anyway, I wasn’t sure if I would enjoy reading a novel as I do not usually read anything but technical books/manuals, cd/dvd covers lyrics and subtitles (and, being a vegan I also read all and any ingredients labels and the odd take-away leaflet) but this is a really interesting read. Kind of like watching a twisted and dark plasticine animation.

I am really enjoying the experience and cannot wait to read the next chapter – which I should be doing instead of writing this post, right?

Try reading Chapter 2 – “The Rage” if you can.

http://www.lesclaypool.com/pumphouse/

admin Music, Reading

Kindle

June 28th, 2010

I bought a Kindle (6”). I did it because:
- I like to read
- I hate carrying heavy books around (I read them at home)

“You could have bought an IPad instead” someone said. I didn’t because the IPad:
- Is (a lot) more expensive
- Has a lot of distractions and I want to focus on reading.

So, the Kindle arrived on friday and I knew I was going to love it straight away.

I transfered some PDFs to it (via USB) and all went smoothly. The problem was to read them… The font was just too small. I thought that would be the end of the Kindle experience for me but, as I said, I loved my Kindle and was not ready to give up straight away.

After a few searches I discovered there was a new version of the Kindle software available here.

Although the new pdf functionalities were an improvement, still weren’t good enough. Zoom is good but not the solution (when you zoom in you are left with horizontal and vertical scroll bars which are not easy to deal with).

Once again I remembered I loved my Kindle and so I was not yet ready to throw the towel.

A few more searches took me to a program called Calibre and this is where the magic happened! Installed it on my MacBook and added one PDF to it. Converted it to mobi format and transfered it to my Kindle. Opened it and voila! Success!

I love my Kindle.

BonesBrigadier Reading , ,

NAnt, NAntContrib and sln

June 22nd, 2010

When running a NAnt build for a project I am working on at the moment I got the following error:

“Failure scanning ‘{PathToNAnt.Contrib.Tasks.dll}’ for extensions. Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.”

This was obviously related to the NAntContrib <msbuild> task as per target below:

<target name=”devBuild” depends=”cleanDev” description=”">
<loadtasks assembly=”{PathToNAntContribTasksdll}” />
<msbuild project=”{SolutionFile.sln}” />
</target>

In the end, the problem was the version of NAntContribTasks.dll I was using (0.84). I downloaded 0.85 and pointed to it instead and life is beautiful again.

BonesBrigadier C# , , ,

Fitnesse – App.config

January 5th, 2009

To link an App.config to your fitnesse tests use a real path (eg. c:\inetpub\fitnesse\dotnet\App.config) instead of the virtual/relative as used to link dll files and folders (eg. /dotnet/*.dll).

I spent quite a few time trying to find how to do this and couldn’t find documentation on it so I hope this will help someone.

BonesBrigadier Fitnesse