Poore Thoughts

Some thoughts on programming etc

The Land Rover is living again!

Land Rover 0 comments

imageIf anyone reading this has taken the time to browse the rest of the site then you may have noticed that I'm re-building a Series III Land Rover from 1983.  Today for the first time in about 8 months it jumped into life, well jumped is not 100% correct.  There was a problem with the electrics (I incorrectly hooked up one of the wires going to the starter-motor / solenoid). Then there was a bizarre problem with the cable (like a brake cable on a bicycle) getting extremely hot when cranking the engine over.  This was eventually narrowed down to a shoddy earth connection near the starter-motor, once that was fixed (I'd already primed the fuel system and checked the oil levels) it quite literally spun into life with almost no fuss.

There is still quite a bit to get done before it's (comfortably) drivable again or on MOT-able:

  • Brakes (need to rip / drill out bleed screws so that I can finally bleed the system and see if they work)
  • Suspension (I managed to bend a plate on the drivers-side front axle which will need straightening out)
  • Exhaust (need to drill out the sheared bolt heads on the exhaust manifold and replace them)
  • Bodywork (not needed functionally but you never know it might come in handy Sarcastic)
  • Lights (simply hook them up)
  • Winch (put it back onto the front)

imageOnce those are all done (hopefully over the next couple of weeks) then it'll be time to play around the farm Open-mouthed.

On a side note my sister has just bought the Defender on the left so because that one will be more comfortable for road-use it may be next Easter that mine will be on the road.  While the Td5 is a blast to drive (I have the privilege of driving it home from the garage) I don't think that it'll beat the Series III for fun & character.  We'll now have to have some competitions to see who can get the furthest off-road (but I'll have to get some tyres with some grip, quite pleased that BFGoodrich do a version of their Mud Terrain tyres which will fit a stock Series III).  So she'll have a locking diff and I'll have the better tyres (plus the experience).


How I got started in programming

Programming 0 comments

After reading a blog entry on Dave Ward’s website I though I’d post a similar one since friends at university and around the place have asked me about it on quite literally countable :-) occasions.

How old were you when you started programming?

Eightish

How did you get started in programming?

I don’t remember much about my original introduction apart from that it was BASIC and by my father.  My first “major” start in programming was a few years later when I was walking across the (farm) yard at home and Dad popped his head out of Pi Logic, the business building and said “Do you want to write a computer program?”.  As far as I remember I just said “why not?”.  It wasn’t a typical first program, but it did get me (in my mentality) interested, which was the most important thing.  It was called “Kill Donkey” because a donkey was the only edible meat eat-able object in the Office ‘97 clip-art folder.

What was your first language?

Visual Basic 6

What was the first real program you wrote?

“Kill Donkey”, which involved a basic Tamagotchi-like sequence where a donkey was born, you fed it, it got fatter and then slaughtered it and ate it.  Yes people will probably think it was sick and twisted but we’ve always been a no-nonsense, mostly self-sufficient family.  My parents often mention the fact at dinner parties that my sister and I used to go around the barns at lambing and say we wanted the front-right leg from that lamb, the ribs from that one and so on.

What languages have you used since?

In (vague) historical order (oldest to newest):

  1. Visual Basic 6
  2. Visual Basic .NET
  3. C#
  4. C
  5. VBScript
  6. JavaScript
  7. C++
  8. Python
  9. Assembly
  10. Pascal

What was your first professional programming gig?

The first program I wrote (free of charge at the time because it was family) was the interface side of a programmer for one of Pi Logic’s systems: PiLights.  PiLights is a small microprocessor based programming lighting controller and the program basically had a grid-like calendar where you dragged and dropped particular setups for each day based on, for example, the dates of the school term.

If you knew then what you knew now?

I’d be setting World records or raking in the money.

What is the one thing you would tell new developers?

Read as much as you can, especially books which seems to be a lost art.

What’s the most fun you’ve ever had … programming?

Probably something that I shouldn’t mention publicly.  One thing that does come into mind is during our Pascal programming sessions at Imperial College showing fellow students how to write their entire (multi-page) Pascal program in one like of C#+LINQ code.

Phew is that over?

As always the journey has only just begun…


Microsoft DreamSpark

Software 0 comments

Not many people seem to be aware of the fact that Microsoft have started (rather quietly) a new initiative called DreamSpark.  DreamSpark is an offer where huge numbers of post-secondary students from multiple countries will have free access to:image

  1. Visual Studio 2005 & 2008 Professional Edition
  2. Windows Server 2003 Standard Edition
  3. SQL Server 2005 Developer Edition
  4. Expression Studio
  5. XNA Game Studio & XNA Creators Club Online
  6. Other already freely available software:
    1. Visual C# 2005 Express Edition
    2. Visual C++ 2005 Express Edition
    3. Visual Basic 2005 Express Edition
    4. SQL Server 2005 Express Edition
    5. Visual Web Developer 2005 Express Edition
    6. Visual J# 2005 Express Edition
    7. Microsoft Virtual PC

I can only tell you of the experience from my side of things but all I had to do was log into the site with my Live / Passport / Hotmail account (whatever they’re calling it these days) and then pick which country and institution I am currently a student in.  I.e. United Kingdom and then Imperial College, London.  Once that was done I was redirected to a college page which asked me to log in with my normal college details, once that was done Microsoft had authenticated I was currently a student at Imperial and opened up the links to the downloads and license keys.

These products were usually available free or charge or for a substantial discount through college license agreements or the MSDN AA (Academic Alliance) but now they’ve opened it up to prevent students from having to go through the bureaucracy that is university administration.

Yes I fully realise this is a blatant marketing ploy from Microsoft but I don’t care, I used the stuff anyway and they’ve just made it a darn sight easier and more accessible.  Thank you very much Microsoft.


Invaluable Tools & Utilities

Software 0 comments

There are certain utilities which are un-obtrusive and make using a computer from day-to-day simpler and more productive. Here’s a list of the ones which I have running and use regularly:

  • (Free) WinSplit Revolution – This is a fantastic little utility which allows you to easily organise your desktop by tiling / resizing / positioning them through keyboard shortcuts.
  • (Free) AllSnap – A small system tray application that makes all top-level windows automatically “snap” to certain reference points such as the edges of existing windows and centre & edges of the screen.
  • (Free) 7-zip – a file archiver with a high compression ratio.  Supports multitudes of formats, very fast and very compact.  Includes Windows Explorer context menu extensions etc.
  • (Free) TortoiseSVN – A Subversion client implemented as a windows shell extension – most powerful and intuitive Subversion client for Windows.
  • (Free) FileZilla – Open Source (GNU/GPL) FTP client for Windows, Mac OS X and GNU/Linux, includes both client and server applications.
  • (Free) Reflector – Reflector is the class browser, explorer, analyser and documentation viewer for .NET.  Reflector allows you to easily view, navigate, search, de-compile and analyse .NET assemblies in C#, Visual Basic and IL.
  • (Free) VisualSVN Server – Simple MMC snap-in for managing Subversion repositories.
  • (Paid) VisualSVN – Visual Studio 20xx add-in for seamless integration with Subversion for simple management of source changes inside Visual Studio.
    Note: there is a free alternative in the form of AnkhSVN, however when I tried it a few years ago it was pretty buggy, word is that it is much better now.

I hope that these tools will be of some use to other people and I’m open to suggestions for additional useful ones.


YouTube Videos in Windows.Forms and WPF

Programming 0 comments

image After seeing Sacha Barber's latest article on viewing YouTube videos in a Windows Presentation Foundation application I immediately thought that there must be a better way of accomplishing the same thing.  Basically what Sacha was doing was retrieving the SWF file from the YouTube URL and then using a WebBrowser control to load the page.

Instead what I whipped together in about 5 minutes (including Googling) is the application shown to the right (with the complementary screen-shot of one of the best vehicles in production today).  The difference in this application is that it uses a WindowsFormsHost element to host a wrapper around the Shockwave Flash ActiveX object.  Thus true SWF and flash movies can be viewed inside a WPF application.

To accomplish this the simplest method is:

  1. Create a WPF project (or use an existing one)
  2. Add a Windows Form to the project (this sets up all the necessary references)
  3. Add the Macromedia Shockwave Flash Object to the toolbox by right clicking and adding the components
  4. Drop it onto the form to create the necessary wrappers around the ActiveX object
  5. Delete the form from the project
  6. Add a WindowsFormsHost to your WPF window
  7. Add the following code after the InitializeComponent call to create the Flash Viewer application
  8. this.WindowsFormsHost.Child = new AxShockwaveFlash();

Et voila! You now have flash embedded into your application, simply load a movie like such:

(this.WindowsFormsHost.Child as AxShockwaveFlash).LoadMovie(0, @http://www.youtube.com/v/DtjGZWjh_iQ);

Note this will probably work for Silverlight etc by using the Microsoft Silverlight ActiveX control.

Let the experimentation begin...


Customary First Post

3 comments

rss Well here it is, the compulsory first post to the new blog, and indeed the new website.  The purpose of the redesigned website was to simplify the structure (coding that is) and provide a cleaner layout.  I'm also experimenting (again) with Mike's Bloget control which is the first? and only? blog engine which is nice and simple and, as he confirms, is designed to be integrated into a site rather than be the site.

Seeing as I had some fun with the test sites in the past and Bloget let's see if the image uploading facility works with this little test image embedded in the page.

[edit] I must remember not to overwrite the App_Data folder when uploading a new site [/edit]


previous | next

powered by Bloget™