What, no version control?

$WEB_CORP has taken on the maintenance contract of a particular site and the client has asked for some changes to be made along with fixing up some SQL injection vulnerabilities.

My first step was to GET all the site’s scripts via FTP so I could create a local DEV instance of it and was surprised to see the following:

$ ls -1 index*.asp


I big part of my last gig at $BIG_CORP was environment management. It was frequently tedious work but it instilled in me the importance of separating the development/integration, testing and production instances of your applications so it saddens me to see the PROD environment of this site in such disarray. The above is possibly a disaster waiting to happen.

Thankfully my own applications reside within a version control system and I don’t rely on backing up and tracking old versions of files before a new release.

That’s my rant over. I’ve dumped the database and bunged it’s contents into the server running on my VirtualBox VM, now all that’s left is getting IIS working…

Fun with port forwarding

I’ve been having great fun with tunneling connections through SSH lately and today it dawned on me that I could close another hole in my firewall by connecting to my Jabber server via a tunnel. In the past, when I’ve been working remotely, I’ve made changes to my firewall by connecting to my public-facing machine; from there to my desktop machine through a DMZ-pinhole and once a presence has been established within the “green zone” browsing to the routers web-interface with lynx.

I decided to try something a bit different today. I started by forwarded an arbitrary local port with PuTTY on my windows desktop at work:

Fun by proxy - PuTTY configuration

Next up was to connect from my Slackware box over to my Kubuntu desktop and use it as a SOCKS proxy, using the previously forwarded port:

steve@substance:~$ ssh -D 8100 steve@

Viola, my desktop was now acting as a proxy and was accessible through a local port. I added the details of my newly created proxy into the SwitchProxy extension for Firefox thusly:

Fun by proxy - SwitchProxy

I enabled the proxy and tested it out by browsing to whatismyip.com with both browsers available to me:

Fun by proxy - different IP addresses

Happy days. From there it was perfectly effortless to access the web-interface of my router and close the client-to-server Jabber port and to skip over to my download box and queue up a DVD to entertain me this evening.

The more I use Linux and the wealth of software bundled with the majority of distributions the more I see what is left out of windows by default. Instead of thinking “which application do I need to perform this task?” it is becoming more a question of “which protocol?” I love it!

ClickOnce, yeah right

I’ve just committed vdaExtensions 1.1 to SVN: I had had enough of stressing out about minor aspects of the user interface and just went for it and published the application. Only to discover that ClickOnce wasn’t working on the target desktops, doh!

The problem was with the assemblies for the ReportViewer class. I have SQL Server 2005 Express installed on my machine and so had no problems with the app getting access to the appropriate libraries at runtime, but it didn’t look like the .dlls in question were being included in the published solution even when the assemblies were being included via Project Properties > Publish > Application Files and Copy Local was enabled in the References section.

Thankfully Google came to my rescue yet again and I found some info on interfering with the Report Viewer redistributable and I was able to get my hands on the .dll files which I then referenced in the project and bingo! the ClickOnce installer wasn’t complaining about ReportViewer any more, it was now giving me bother concerning ADODB…

A bit more googling provided me with an msi for the Office 2003 assemblies and a program to extract the .dll goodness from it. I referenced the resulting adodb.dll and specified for it to be copied into the build directory and that was thankfully the end of that mini-drama.

I wasn’t too keen on the idea of ClickOnce when I first started with .NET but I must admit that I’ve warmed to it within the context of a Windows domain and with users who don’t have full administrative privileges on their workstations. Or it just might be that I’m less of a Microsoft bashing, Linux fanboi these days! Right tool for the job at hand and all that.

It’s now onto pastures new: I’ve created a new solution in Visual Studio and set it up with a Subversion repository, my only hope being that somebody in the office will actually use this software I’m creating!

WinForm Woes

I’ve been finishing off the next release of vdaExtensions seemingly forever and have had all the functionality sorted out for ages and without much in the way of trouble but I’ve been struggling with the user interface. The only contents of my main form are a MenuStrip and the meat of the app, a DataGridView.

Throughout the use of the program the DataGridView can change dimensions: information can be added/changed/removed and I’ve also added the ability to show/hide the various columns of the control, with the constraint that at least one column must be visible at all times. The difficulty I’m experiencing lies in having the WinForm fit the DataGridView snuggly, displaying all the cell contents and preventing any empty space around the control:

WinForm Woes - DataGridView I Curse Thee

The control is docked to the form and I’ve taken care of any empty horizontal space by setting the AutoSizeMode of the right-most visible column to Fill, however I’m still left with some vertical empty space as you can see in the screenshot. All the rows are displayed perfectly when the form is resized vertically to it’s maximum, but whenever all the rows cannot be displayed and the vertical scrollbar is visible the control can display some of it’s background along the bottom. This is the last thing on my TODO list for this version and it has been bugging me for at least a month now.

I’ve tried setting the background colour of the control but the empty space was still noticeable, only it was the same colour as the cell backgrounds. I can’t find any row properties that will cause the last row to fill up the available vertical space, like with columns and all screenshots I’ve found online have included a bit of the control’s background.

I might have to accept that what I want to achieve is just not possible using this control but I’m itching to move onto something else so come Monday I’ll probably publish the solution and commit the code to SVN. Perfectionism hurts!

In Pursuit Of vdaExtensions 1.1

Blurred Code - C#The past fortnight has proved fruitful: each weekday I have risen early, went to the gym and spent the rest of the day at the office plugging away in Visual Studio. It’s been good to get back into developing vdaExtensions: it’s first incarnation was completed in August and I asked a few members of staff to try it out and Phil was the only one to give me feedback, I don’t know if anyone else even used it! I made a note of his suggestions and then proceeded to work on something else, the nature of which escapes me at this moment.

As usual I found the code easier to rewrite than to read and proceeded to tear the thing apart; if you were sitting near me you would have heard a sigh of relief escape my lips the first time I got the solution to build again. I separated as much of the logical operations from the user-interface code as I could and the data manipulation is now a bit more abstracted within my class definitions. I’m sure you can easily imagine it took persistent effort to bring the application back to the level of function it had before I started “improving” it.

A sticking point I’ve reached is in using the ReportViewer class to generate a saveable/printable version of the applications data: I knew very little about reporting until yesterday and I had a lazy day of it today, but I’m sure with a bit of research I’ll get it. Besides a few minor interface tweaks the only other issue that comes to mind concerns the layout and docking of the controls in my main form, but again, a job for another day. I suspect that for the size of the application my solution is over-engineered, but as the saying goes “half measures availed us nothing” and I just wouldn’t be capable of sleeping at night if I thought I didn’t put my absolute best into everything.

I’m currently sitting at home, sipping on some espresso, contemplating a weekend of serious chillaxing and first up is a viewing of Night Watch, laters!

XP on Kubuntu via VMware via VNC

I finally got around to doing something today that I had been meaning to do since I got Kubuntu installed on my home desktop, namely, setting up a virtual machine running Windows XP so I can perform DVD encoding/editing/authoring. I’m a relative novice when it comes to these techniques and I haven’t put enough effort into finding the equivalent native Linux applications, so it is a case of better the devil you know for the foreseeable future. If I ever gather any significant skills in Linux application development I would love to create ports of the almighty VobBlanker and the venerable IfoEdit. As for DVD ReBuilder Pro and Cinema Craft Encoder, one step at a time, eh?

Getting VMware Workstation installed didn’t prove as difficult as I thought it would be, the only things I had to do was get the kernel header files, GCC and associated tools and it was more or less plain sailing from there, just requiring me to run the vmware-install.pl and /usr/bin/vmware-config.pl scripts. Cheers Ubuntu Forums!

I fired up VMware and created a new virtual machine and allocated 256MB of memory and 8GB of disk space; I also gave it access to the drive containing my software archives which I had to do via VMware’s shared folders feature instead of just pointing it at the drive itself, but this might just be because I didn’t launch VMware as root. The only thing left was to get the system to use an .iso image as the virtual machine’s CD-ROM. I powered on the machine and it booted off the cd image with no difficulties; I was eventually prompted to select my installation partition which I choose to format as NTFS:

XP Select Installation Partition - Screenshot

I got the installation process underway and when I next checked back the text-mode stuff had finished and the graphical installer was in action:

XP Graphical Installer - Screenshot

The installation seemed to stall at this point and when I came back from my coffee break it was still declaring that the process was 37 minutes from completion. I was regretting only giving the vm 256MB of memory, but I restarted it and the installation resumed itself ok. Entering the product key was the next major step:

XP Enter Product Key - Screenshot

I clicked through all the device driver dialogs, set the localisation info and was greeted by a near ready windows:

XP Welcome - Screenshot

Setting up networking and Windows Updates were the last couple of things to do before the installation was complete and I was presented with a virginal desktop and start menu:

XP Start Menu and Desktop - Screenshot

If you look closely you might be able to see the Windows Genuine Advantage tray icon, needless to say it was swiftly dealt with. Windows Update grabbed all patches issued since September (the rest were handily slip-streamed into the installation CD,) the machine rebooted itself and I promptly took a snapshot of it’s state in case I need to roll back to a pristine copy of XP. The only thing left hanging is accessing the shared folder I setup, but that is a problem for another day.

The world of .IFO, .VOB, .BUP files and even the likes of Photoshop is now back within my reach and what I got a kick out of was that I setup an XP virtual machine on my home Linux desktop from my XP workstation in the office, Russian Doll style. Nice.

My Brain Hurts

I’ve just finished hacking new features into a web-app my colleague Kev developed. Yep, I was deep into M$ country but as always nothing beats the sense of satisfaction that problem solving brings (for me anyways.)

Any time I’ve went back over my own code I usually ask myself “what was I thinking of here?” so over the past few days I’ve felt pretty much like that what with stepping into some one else’s work and trying to understand what is being done, how it is being done and getting acclimatised with a foreign coding style. Visual Studio wouldn’t allow me to view any of the ASP.net pages in design mode either which added to the fun.

The changes are being reviewed by the “them upstairs” as I type and the modified files should be uploaded to the production site soon. I’ll no doubt have to tweak things further to their satisfaction, but such is life.

Clocking off time approaches.

Update: the changes have now gone live.

It’s Alive!

I’ve just published the first release of a little application I wrote to manage the list of internal extension & direct dial numbers of staff here at the VDA.

vdaExtensions - Screen Shot

A few members of staff have been asked to give it a whirl and report back. Up until now it’s been the responsibility of one of the admin team to maintain a spreadsheet containing the info and distribute printed copies of it to everyone else.

This has been my first experience with C# .net and I’ve enjoyed it for the most part. I’d started a project in VB .net a while back using a beta of Visual Studio 2005 and just hated the language; I ended up hitting a wall with a particular aspect of the app and just gave up on it (shame and guilt galore,) so I was reluctant to start another project but thankfully everything was relatively straight-forward this time around.

vdaExtensions is only a small app but it feels great to have brought it to the (I hope) point of usability, all that is left is to wait for bug-reports and try my best to resolve any issues!

It’s now onto researching and hopefully implementing a system for digitally signing (via GnuPG) submitted information for the database-app Kevin is working on…

Where Old Code goes to Die

Well, I’ve started a million different projects and finished none, so in an effort to quell the sense of dis-ease I’ve went back to whatever seemed nearest to completion before I abandoned it…

…which has meant getting stuck back into Classic ASP and MS-SQL, not nice for a Linux-fanboy-wannabie like myself ;)

Captain Beefheart’s Trout Mask Replica has been providing much needed mental stimulation while I at least try to make some progress on this thing.

The Mascara Snake: “Fast and bulbous”
Captain Beefheart: “That’s right, The Mascara Snake, fast and bulbous. Also a tin teardrop.”
The Mascara Snake: “Bulbous also tapered”
Captain Beefheart: “That’s right”

I love it!

The road to wherever-it-is-in-the-IT-world-I-am-actually-heading-to is certainly proving frustrating, but hey, one day at a time. You never know, someday I might well get those 1337 sk1llz I’m lusting after.

On a lighter note, I just over-heard a member of staff phone the newest addition to get her to send an email to everyone in the office to let them know that new stationary has arrived (the email is in my inbox as I type), words escape me.

Windows Genuine (?) Advantage

I made the mistake of blindly installing all the Windows Updates on my machine at work yesterday and so installed the lastest version of Windows Genuine Advantage… When I was creating a Ghost image for of our new desktops I didn’t have access to our legitimate Volume License Code and so just used a pirated one, big mistake!

At login this morning I was welcomed with a dialog box like this (not my screenshot):

Get Genuine Logon

The domain logon dialog was delayed for 5 seconds and this was displayed in the bottom right hand corner of the screen:

Genuine Victim

Victim? haha! (perpetrator more like!) Upon getting into Windows WgaTray.exe continued to delightfully remind me of my past blunder with this:

Balloon Victim

My day seemed to be off to a bad start, but a quick bit of googling claimed there was a solution and some P2P hi-jinks provided it.

I restarted in Safe Mode and replaced WgaTray.exe, wgalogon.dll and LegitCheckControl.dll in C:\Windows\System32 with the files provided in the archive, restarted and joy of joys, no nag screens :)