Visualisation Rocks!.

Visualisation is becoming such an important part of development – it allows a level of understanding you simply don’t get from staring at text. Take a recent post from a co-worker (for those of you inside EDS it’s here) post from Keith H, noting how he’s starting to feel the love for Subversion. Having been a long time Subversion user and also a great lover of Tortoise, I understand where he’s coming from. Almost everything I do (both here and at home) ends up in a Subversion repository somewhere. I have a subversion server here at work, hosting all the support tools I’ve written to help with our project, but I also have a dedicated subversion box at home, hosted on a 500gb Synology DS106. I found out how to add packages to the embeded linux system that’s running using a telnet hack, the whole process being documented on my public blog. Well, here’s a view of one of my folders, under source control (showing TortoiseSVN in operation)
Continue reading

Posted in General | Leave a comment

What’s in a title?

Lets hope the content is a little more inspiring than the titles!

http://news.bbc.co.uk/2/hi/technology/6287628.stm

Will Spielberg make a successful cross over to games? Judging the descriptions of his first attempt(s) , the future doesn’t look bright.

Posted in General | Leave a comment

Domain Specific Languages

Over the last few months I had the opportunity to implement a DSL for my day job. Well, my day job doesn’t involve writing compilers, but it does involve writing incredibly tedious C code to interface an archaic 4GL – OpenROAD – to a whole bunch of second & third tier code written in C in the form of Tuxedo Servers. So, I thought to myself, why spend weeks writing this junk, when I can spend weeks writing a compiler to write that junk for me?

So, off I went, and implemented…. SMeL! – the “Service Meta Language”. Ok, so the acronym sucks, but the other really rude ones wouldn’t have flown well in corporate-ville. Anyway, I ended up spending many nights implementing this, as I couldn’t justify doing this during the day, but the end result was worth it , I think. It allows me to spend days writing services, instead of months, leaving me to browse YouTube at my leisure 😉
Continue reading

Posted in General | Leave a comment

Sold!

Finally, my car has been sold. This means i can get back to posting (or at least posting sporadically!), some more thought provoking articles, and some new code examples for the WPF stuff!

I’ll be right back. Honest.

Posted in Personal | Leave a comment

Diary of a Subaru Sale…

I’ve had some requests for more pictures of my Subaru – it seems i’d stupidly missed full frontal pics from the last set! I’d parked it close to the garage doors, and couldn’t get round the front!. Anyway, I washed it (again… damn its a labour of love.), backed it back up off the drive a bit, and snapped some more photos.

If you have any questions, just drop me a line.

 

Continue reading

Posted in Personal | Leave a comment

Subaru Impreza for sale :(

I’m sad to say, i’ve got to sell my most favourite toy. An absolutely awesome Subaru Impreza Wrx Sti Type-RA.

A few pics :


Continue reading

Posted in Personal | 9 Comments

Synology Bittorrent Problems?

I’ve had the Synology Box for a few months now, and up until last night, had absolutely 0 problems. Last night, I had a Bittorrent download complete, but the status in the Download Redirector was showing “Shared Folder not found”. Weird, because not an hour before I’d had two torrents complete without any problems. Anyway, like most things , everything’s really great whilst its working fine. It’s when you have to fix it that the problems start.

It turns out that the temporary download area is off limits from the normal interface, and unless the download completes successfully, the Synology bit torrent client doesn’t copy the file from it’s internal download area to your shared folder.) So I guess if it can’t find the shared folder, that’s why it stopped at 100% and I couldn’t see the completed file! Duh!

Telnet to the rescue!

Luckily, if you’ve installed the Telnet hack ( see my previous entry on Installing Subversion ) you can find the completed (but uncopied file) in the Client’s temporary folder. Here’s the steps I used to recover my completed but unfinished download

  1. Login to your Synology box as root
  2. cd /volume1/@downloads

at this point , you should see a folder full of numbered subfolder, in my case there were 3 folders, numbered 34,35 and 36. Each one of these folders represents an unfinished download.

for each of the numbered folders execute an ‘ls’ command followed by the folder name , in my case the first command would have been

3. ls 34

do this (changing the folder name) for each of your folders in the @downloads directory. When you come across your completed but uncopied download stop. My file was in the folder named ’36’

Next we issue a copy command to copy the completed file to a shared folder I can see – in this case I had a shared folder called ‘downloads’.

4. cp 36/VSMar07CTP_VSTS_7PartsTotal.part05.rar /volume1/downloads/

assuming all goes well, (and you have enough space) your file should now be accessible from your windows machine.

Lastly , now we’ve got our file safely from the clutches of the Download Redirector, we can safely remove it. Open up the D/L redirector, highlight your download and click remove!

Done!

 

Posted in General, Hackery | 2 Comments

Synology Subversion server

I recently purchased a NAS box from Synology, A DS106j. I packed it out with a nice 500gb Hdd, and stuffed all my music on it, with space to spare. The box has some really nice features, Web server with PHP, A Torrent/Http download client (which comes in really handy for downloading large items from MSDN!), a nice Photo album that will auto create albums from photos on a usb key. Pretty neat. There’s a whole bunch of other stuff, but the interesting thing for me was the fact that inside, its a tiny linux box running NSLU2 so it should be quite modifiable.

Fortunately, it is. I happened across this page outlining what’s inside my DS106, and after some hunting i managed to track down a hack which enables telnet ! After reading the Synology Forums, ooh, for what seemed like whole minutes, I happened across some threads outlining how to install ipkg. Once ipkg was installed, its a short jump to installing the Latest subversion client, which was pretty painless. So, i now have a nice self-contained Subversion server, that’s always on, and facing the net (through my firewall) – no PC required!  Sweet!

Ok, so here are the steps required to make your Synology box into a fully fledged Subversion Server.

DISCLAIMER : This involves flashing your ROM to allow telnet access and modifying your box. Follow these steps ONLY if you understand the risks. If following these instructions Bricks your Box, ends your marriage , exposes your credit card numbers to nigerian scammers and destroys all life on the planet, don’t blame me. Damn, it may even invalidate your warranty. YOU HAVE BEEN WARNED!

 

  1. Download the telnet hack from here
  2. Open up your browser, login to your Synology box, and go to the firmware update page.
  3. upload the firmware, and flash your box. At this point the update will fail with an error 42 – this is normal, its designed this way to prevent your box rebooting.
  4. Open up a telnet session (run a command prompt and type telnet) or if alternatively download Putty
  5. connect to your Synology box – you should see the BusyBox login prompt! Congratulations, you’re half way there!
  6. login as ‘root’ – the password will be the same as your Admin password on the Box’s web admin page.
  7. Next download this file and copy it a folder on your Synology box, ‘public’ will do.
  8. next untar the archive using (if you copied the file to your public folder)

    tar -xzvf /volume1/public/bootstrap-ppc.tar.gz

    This will unzip the ipkg tools we’ll use for fetching and installing the subversion server.

  9. create a link using

    ln -s /volume1/opt /opt

  10. and then append the new paths to the environment

    export PATH=/opt/bin:/opt/sbin:$PATH

  11. Next, get an updated package database and then make sure we have the latest version of the installer

    ipkg update
    ipkg upgrade

  12. finally, we install the Subversion client with

    ipkg install svn

  13. Once that’s complete we can use the command line tools to create our repository, and fire up the svnserve server daemon.

 

Ok, so what are the chances of you getting this far, and not knowing how to use the svn command line tools? if you’re Wintel dev-chimp like me that spends most of his time looking for slick gui tools, then you’ll probably need a refresher, so here’s a couple of extra steps to get you started so you can go back to your nice Tortoise or AnkhSVN

  1. Create a new shared folder from the Synology web client – and leave it visible in explorer. This allows access to the repositories file system from the PC so we can edit the configs (using the pc), and back it all up to the PC/Burn DVD images etc. when required. I created a new folder called ‘svn’.
  2. Create the repository in that shared folder we’ve just created using the web client with this :

    svnadmin create /volume1/svn/repository

  3. When your repository is created we then go back to the PC, and edit the subversion config files straight from the shared folder. Its important to use an editor that won’t mess up the line endings , something like Notepad++
  4. Edit the config files in
    repository/conf
  5. you’ll need to add yourself a user , or enable anonymous access in the svnserve.conf file. RTFM for how to do this, but the config files do outline the bare minimums.
  6. at the command prompt fire up the subversion server
    svnserve -d -r /volume1/svn/repository

Note : you may need to reboot your synology box after changing the configs. Mine wouldn’t give me access until i’d rebooted, so YMMV.

also, you might like to add the svnserve command into the etc/rc config file. if you do, remember to make sure the /opt/bin and /opt/sbin paths are exported before you add the svnserve command.

For the observant, since the Diskstation has a webserver, you could probably get the Apache subversion mods running too. I don’t really need that so i didn’t bother looking into it. Another thing that might interest you is that now you have telnet access and ipkg installed , you can install a whole host of other usefull tools a decent list is available here

Anyway if all has gone well, you can now go back to your PC, and browse your brand spankin’ new repository!

Enjoy!

Posted in General | 35 Comments

Will Ready Boost kill my USB key?

A co-blogger on PlanetEDS (Charlie Bess) posed this question after I commented on his recent blog entry about whether Ready Boost was making any noticable difference. I think it does, but that wasn’t what the comment was about. The question was, since USB keys have a limited R/W cycle lifespan, how long will the USB key last given Vista is using it as a cache?

Ok, well after a (very) limited amount of research, it turns out there are two types of memory used in Flash devices, (Nand/NOR) but the thing that dictates the Keys lifespan is its Multi Level Capacity.

Both types come as Single Layer and Mult-Layer, but whilst Multi layer has a slight price advantage for larger capacities its lifespan appears to be significantly reduced to around 10,000 cycles. Single Layer on the other hand, doesn’t suffer from this limitation, and can survive for 100,000 cycles or more. Luckily it appears most USB keys are SL devices.

Given Key prices are pretty cheap, i’ll assume we’re using 8GB keys for Ready boost.

Supposing we’ll split our device into 1K blocks, for our 8GB key we’ll have 8,192,000 available 1k chunks. Take the number of R/W Cycles an SL device allows us, this gives us 8192000*100000 = 819200000000 R/W’s per K. ( this is assuming that devices do RW balancing and do write accross the entire device) and you’re going to write 1MB per second , this gives 819200000000/1000 = 819,200,000 or 13653333 RW minutes or 227555 hours of use.

Unless my Windows calculator doesn’t work with big numbers (hey, I have to blame something 😉 thats almost 26 years of continuous use.

Conclusion : by they time it wears out, I’ll be able to nip down to PC World in my fusion powered hover-car, and buy whole case of 1000 peta-byte keys to replace it, for £1.52

Posted in General | Leave a comment

My Platform is better than yours

Whilst browsing the EDS Internal Blogs I came across a posting from Phil Haigh, commenting on (this post) the complexities of JEE and how it’s complexity will be the death of it. I don’t think thats particularly true. Its not the complexity of the platform that’s causing a decline[1] in Java’s usage, after all, its not like .NET is any less complex, just look at WPF in .Net3 and you’ll see what I mean. In fact, if complexity were a problem, we wouldn’t be programmers, we like complex brain mangling stuff. (Why else would Haskell be making a comeback?!)

The argument of .NET vs Java reminds me of the old days when Direct3D was first thrust upon us game developers. Along with the usual FUD distributed by the usual Open Source/Anti MS Zealots, the general sentiment was that OpenGL = Good, Direct3D = Bad. Even John McCormack weighed in for OpenGL. All the usual arguments were trotted out, closed source, proprietry, from M$, etc,etc, but what happened? DX had a release schedule of ~6 months. OpenGL had releases measured in years. DX advanced at such a phenomenal rate, matching hardware releases, it gathered pace, gathered developers and gatherd tools. Suddenly OpenGL was playing catch up. That was ~1996. 10 years later, it’s almost OpenWhat? There’s the sign of DX’s ubiquity, that when we talk of 3D on the PC, it’s inevitably driven by DX. When was the last time you worried that your video card was OpenGL compatible? DX wins. Vista’s interface is built on it.

Now compare this to holy war of Java Vs .NET. Java was at least as capable as .NET , until recently. In fact C#2 was a turning point as Java implemented (botched) generics in response to C#s generics. (Java’s Generics are implemented completely at the compiler level, the VM has no knowlege of generics, unlike C# where the generic type is implemented directly into and supported by the CLR.)

As a pragmatic kind of guy, it’s always been the case of choose the best tool for the job. With .Net2.0, the platform is starting to look more attractive than Java’s equivalent offerings to more than just the .NET afficionados, and we find we’re now in the great position of having choice. Given that the base Platform is also shifting at an ever increasing monthly rate, it won’t be long before the choice also applies to the server platform too, another opportunity for .NET to gain a bigger foothold in JEE’s arena.

Using .NET it’s now easier than ever to create robust software and services quickly ,and the toolset is maturing faster with each release. Java, like OpenGL ,is now playing catchup. The elegance of the features .NET provides is starting to show through, gaining the affections of developers, gathering momentum, much like DX did. And don’t forget, we programmers love elegance, that’s why we love(d) Java.

How soon before Java can introduce robust features that match next version of C# ? Lambda functions? LinQ? Type Inference? They’re all features that allow us programmers to more clearly and naturally express a our intent. After using Orcas for a few weeks I have to say I’m thoroughly hooked on Anders’ direction for the language. It’s not that I don’t like Java its just I like .Net more, and I think many developers are starting to feel the .Net Love.

In the end, Java won’t dissapear anytime soon, after all, it is a pretty solid platform and for now, it still has the market share. Its not the complexity that will undermine Java’s dominance, its the inability to respond to the competition that will seal its fate. Developers are a fickle bunch, we’ll switch allegiance for the smallest geeky feature of coolness, just look at the squaring off between flash & WPF/e and you know it’ll just end in tears!

Anyway don’t look now, Java7 C#3 is only a couple of months away.

Rob

[1] Ok, so google trends only reflects what people search for, not what people are using. After all, this could indicate that the documentation for Java is useless and all the .Netters end up at MSDN instead of google, but, taken at face value, java still seems popular, even if people are searching for coffee 😉

Posted in General | 3 Comments