A Confession : DataGrids

August 19th 2008, 11:41 pm in .NET, Personal.

At one point, nearly five years ago now, I not only used DataGrids…. I liked them. I’ve learned a lot since then, I recall thinking the other day that Microsoft must have had a bit of an off year when they decided to release a web development platform which pretty much relied on the client having Javascript available.

Have you made any claims in the past which you’d like to own up to now? Or do you think any of the current fads of today are going to look foolish in five years time?

NHibernate Query Woes

May 21st 2008, 1:17 pm in NHibernate, Personal.

I’m banging my head trying to solve a particular type of querying problem. I think I can simplify it like this:

Categories have many Posts, Posts have many Comments

I’d like to search for Comments with a particular author, which is easy enough, but I’d like my result set to be made up of Blogs which contain Posts which contain Comments with author = ‘ramsay’.

The problem I’m having is that if I have 50 Comments then it’ll return 50 duplicate Blogs to contain those comments. Argh! I can add groupings (i.e. group by Blog), but that means it’ll only pull back the things I group by and not the full Blog objects.

Navigating the Blog

March 24th 2008, 4:04 pm in Blog Stuff, Personal.

Just a quick pointer in response to a comment, all of the posts I make are categorised, and those categories can be accessed by hacking the URL. For example, http://colinramsay.co.uk/diary/category/screencasts/ will list all of my screencast posts. The obvious problem with that is that you’d need to know what the categories were in the first place, so as part of an ongoing blog redesign, I’ve included the categories of a post underneath the post title.

You can also hack the URL to browse by date, for example http://colinramsay.co.uk/diary/2008/03 shows all of the posts I made in March this year, and http://colinramsay.co.uk/diary/2007 shows all of the posts from last year.

As I mentioned, I’m in the middle of a redesign, but the main change you should be able to see is in the readability of my posts; I’ve increased the font size and the line height to make it a lot easier on the eyes.

When I installed Yellow Dog Linux on my PS3 the other week, I was really impressed with one of the window managers they make available, E17, the latest version of Enlightenment. I wanted to test it out further on my PC, so after trying out a live CD with it on in a virtual machine in Windows, I eventually decided to test it with some applications I’d actually like to use. Here’s the tale of how Ubuntu might actually make me switch from Windows.
(more…)

Recently Plastiscenic has been asked to quote for a fairly large project, and if it comes off I’ll have the chance to work on it from the ground up, using whatever technologies I think are best suited.

(more…)

Watching the Latest HD Shows on your PS3

October 5th 2007, 12:22 am in PS3, Personal.

The title of this post sounds like an advert, but I’m eager to share the ease with which I’ve been able to bend the PS3 to meet my needs. Previously I talked about faffing around with Yellow Dog Linux to play High-Definition media, such as Prison Break downloads, but the solution to the problem doesn’t require any kind of PS3-based trickery.

Instead, the real work is centered on the PC. Using utorrent and various torrent sites, it’s pretty easy to download the shows I watch. Heroes, Prison Break, Smallville, Stargate Atlantis at the moment, and soon BSG and Lost (though last series was 80% tosh) can all be scheduled to download within half a day of their airing (less if I don’t want to saturate my connection), so that’s the simple bit. The shows which are airing in HD have started to be released in 720p .mkv files, and though the PS3 can’t play those natively, there’s a trick to them which is key to this whole idea.

Redkawa’s PS3 Video 9 has recently introduced a feature which allows you to unpack then repack .mkv files to .mp4 files - a format which the PS3 can play natively. And unlike transcoding, which is the normal means of converting from one video format to another, this unpack-repack process, which they call “remux”ing, is quick and doesn’t result in a loss in quality.

So after downloading the .mkv, I pass it through PS3 Video 9 and I have a file which my PS3 can play. From there I can copy it to a flash card and put that straight into the PS3. However, I don’t have a flash card big enough (these files are just over a gig) so I need a way of copying straight to the PS3.

TwonkyMedia’s server allows you to set up a directory on your PC to be shared with your PS3. Thanks to a recent firmware upgrade on the PS3 side, when you run TwonkyMedia, you’ll see it show up in the GameOS screen, and from there you can stream files across your network and play it on your PS3. My network’s not fast enough, but you’re also able to copy the file from the PC to the PS3 hard disk via TwonkyMedia and play it that way.

This could be streamlined but for the satisfaction-factor of watching HD content on my shiny 42 inch screen the day after it airs in the US, it can’t be beaten.

I’m a LosTechie!

September 26th 2007, 11:23 am in LosTechies, Personal.

I was recently asked to join the community of bloggers at www.lostechies.com. There are already a number of great posts on there and I was really pleased to be able to contribute my first - Coding C# in Style. I’m not going to be cross-posting from this blog to there so you can subscribe to LosTechies without fear of seeing duplicates, and you’ll get to read quality posts from the other guys there.

PS3 & HD - MPlayer and More…

September 25th 2007, 12:51 am in PS3, Personal.

Last week we went on a spending spree and bought a new 42 inch LCD HDTV - the Sharp LC42XD1EA to be exact. Notice the “A” on the end, as that signifies a newer revision than the earlier LC42XD1E. I bought it from www.24electric.com who I would definitely recommend, they had the lowest price and delivered very quickly. I had some questions after I placed the order and these were dealt with very quickly and in a helpful way.

The TV itself is great, I’m really pleased, and so I felt obliged to get an HD source to put it to the test. I bought a PS3 from HMV with Motorstorm, some F1 game and two Bluray DVDs.

I wanted to use the PS3 as a media center in the same way I used my old XBox with XMBC, except this time it would support HD formats (my TV goes up to 1080p). Sony doesn’t really allow you to play very many video formats from the main GameOS screen, but fortunately the PS3 allows me to install Linux, so I grabbed Yellow Dog Linux and was up and running very quickly. The E17 window manager which it ships with is far and away the best Linux desktop experience I’ve ever had, but I switched to Gnome, the other available desktop, to allow me to follow a tutorial on installing MPlayer.

After much gnashing of teeth I’ve managed to get a range of mixed results. I read this report that someone was able to get MPlayer running 1080p content within X, but I can’t reproduce that. They say they are “using ffmpeg to decode… using the X11 video output”, which on the commandline I interpret as:

mplayer -vfm ffmpeg -vo x11 filename

I couldn’t get this to work with either a 720p Prison Break episode I downloaded, or a 1080p movie trailer. MPlayer kept reporting that the system was too slow for it to work.

Instead I rebooted and at the kboot prompt (blink and you’ll miss it) typed “ydltext” to start Yellow Dog in text-only mode. From there I tried running mplayer in framebuffer mode:

mplayer -vo fbdev filename

This allowed my 1080p trailer to play as smooth as you like. Nothing I could do would make the Prison Break episode work to my satisfaction.

However, it did boost my confidence that the PS3 will be able to do this sort of thing in the near future. The Prison Break episode was a Matroska file, so this really must be a codec issue somehow. My knowledge isn’t strong enough to say for certain but I really hope someone can figure out a cohesive solution which caters for the huge range of video files I could play on XBMC.

Incidentally, I’d like to have an option in the GameOS to boot into another OS, and that way someone could come up with a MediaOS that I could run from the GameOS. At the moment you have to choose the default OS as YDL and boot to that, then back to the GameOS from there. I’d prefer to do it the other way round.

It’s taken a lot of forum searching to scrape up enough information to get this far. The PS3 isn’t quite there yet but with a push from one of the interested parties (MythTV, FreeVO, MPlayer, Geexbox, XBMX… even Sony) then it could become an enthusiasts dream.

So after reporting my Bluetooth woes yesterday, I decided that I may as well bite the bullet and write a full application to do the job. Phone2Flickr is a .NET application which will sit in your system tray and upload your phone photos to Flickr when it comes in range. This has gone under only limited testing with two Samsung phones so I’m not sure how it will handle others, plus I’ve only used it on my PC. This is seriously an alpha release.

You have to pair your phone with your PC in the normal way, using the Control Panel Bluetooth applet, and you also need to make the PC an authorised device on your phone otherwise you’ll have to keep allowing the PC to perform actions. How you do this will vary on your phone model.

This software currently requires .NET Framework 3.5, and that your phone supports the Obex File Transfer service. The UI for this stinks. Chances are it won’t work for your device. But I wanted to get something online as it will give me impetus to improve it. I’m also releasing the source code, and will most likely accept patches.

Phone2Flickr 0.1 is something I built for my own use which I hope others will enjoy. Please don’t expect too much!

My Deployment Process

December 13th 2006, 1:09 am in Personal.

Commit change to SVN. Wait five minutes, log onto deployment server, run “deploy”. That’s it. During the five minute wait, my build server compiles, tests, runs code metrics, then packages and uploads my code. Simple, automated, awesome.

Next Entries »