Archive for the ‘Software’ Category

CUSEC 2007

Wednesday, January 17th, 2007

I’ve arrived safe and sound after my drive to Montreal for the Canadian University Software Engineering Conference. The interesting stuff starts tomorrow – for now I need to find a nice little place to go for dinner.

Update: On the way to the hotel I was stopped at a red light with a car on the left and a bus on the right. A bike messenger tried to squeeze between the bus and me but forgot his handle bars are wider than the rest of the bike. He nearly took off my right mirror and then bounced into the bus. He just got up and drove away with a wave. Crazy people here in Montreal.

Hacking Democracy

Thursday, November 9th, 2006

I watched the HBO documentary called “Hacking Democracy” last night and it was quite eye opening. They showed how a Diebold optical scanning voting machine was able to have it’s memory card altered to effectively “stuff” the ballot box in the favour of a candidate while maintaining the accuracy of the total vote count.

Without having looked at the software — because it is illegal thanks to the DMCA — I will speculate my thoughts on this situation.

The machine relies on removable memory cards in the same way that your camera does. This allows machines to be disconnected from a computer network, but relies on “sneaker net” to transfer the number of votes from each individual machine to the “central tabulator” which reads each memory card and sums up the totals for every machine in the election.
(more…)

Visual Studio 2005 Pre-Build Magic String

Thursday, November 2nd, 2006

I had a struggle a while back trying to get a pre-build event to fire before my code was compiled.

The pre-build event generates a class that allows me to inspect the revision level of my code and ties the revision to the subversion source code repository.

Today I had a coffee and revisited the problem. I had a lot more success. The magic string is shown below:

"$(ProjectDir)genSvnVer.bat" "" ModuleTracClient

This expands when run on my laptop to:

"C:\Documents and Settings\cgness\My Documents\Visual Studio 2005\Projects\client\ModuleTrac\genSvnVer.bat" "" ModuleTracClient

There are 3 components to the magic command line above.

  1. The executable needs to be quoted since the $(ProjectDir) macro may expand to something with spaces. C:\Documents and Settings... when parsed by the shell evaluates up to the first space C:\Documents which is not an executable.
  2. Parameter 1 for the batch file allows me to set the output location concatenated to the current working directory for the output of the script.
  3. Parameter 2 sets the namespace to be used in the generated C# class.

The script I’m using is the one I posted to the Subversion mailing list but I added a parameter for where to put the output. That will be left as an exercise for the reader.

To debug your pre and post build events simply change to the output window, check if they possibly would work in the command shell and read the errors carefully. Happy shelling!

No Silver Bullet

Friday, October 13th, 2006

More seriously, even perfect program verification can only establish that a program meets its specification. The hardest part of the software task is arriving at a complete and consistent specification, and much of the essence of building a program is in fact the debugging of the specification.

Frederick P. Brooks, Jr.
No Silver Bullet: Essence and Accidents of Software Engineering

Published in the ACM Queue

Friday, September 22nd, 2006

I recieved an email from someone at the ACM Queue letting me know that my submission to the What’s on Your Hard Drive section was selected and will be published in the October edition of the magazine.

The really interesting part in all of this is that I don’t remember what I wrote for my favorite and least favorite tools so I’ll be as shocked as everyone one else when it comes out. Being a source control zealot I’m sure I put subversion down for my favorite, but my least favorite tends to rapidly evolve day by day.

2006-10-13 09:00 Update: Read it for yourself.
2006-10-13 17:00 Update: The mug arrived today.

VehicleLog: Graphing Sparklines

Wednesday, August 23rd, 2006

I discovered this pretty neat graphing tool in PHP called SparkLines. You’ve probably seen them often if you are an avid investor. The idea is to make small text sized graphs that can go inline of the text that displays basic information.

I’ve added a small graph at the top of the table listing of the mileage page in VehicleLog. Yeah, I know it’s highly nerdy to track your fuel and mileage consuption but I’m ok with that since it’s what I do.

Source code can be found on https://code.nesser.org/browser/trunk/VehicleLog/

The Three Biggest Software Lies

Wednesday, August 9th, 2006

(1) *Of course* we'll give you a copy of the source.
(2) *Of course* the third party vendor we bought that from will fix the microcode.
(3) Beta test site? No, *of course* you're not a beta test site.

Virtual Earth Mobile 1.64

Thursday, June 29th, 2006

If you have a windows mobile device or a pocketPC device with an internet connection and you sometimes require help navigating to locations this is the program for you.

An internet connection is required to update the maps, but there is a cache so if you figure out your path in the comfort of your home you can save EDGE GPRS charges.

Virtual Earth Mobile Screenshot

This software uses googles API to access Virtual Earth. It’s also rather new and prone to crashing so don’t be surpised if it does not perform as expected.

Virtual Earth Mobile 1.64

.Net CF Single Instance Program

Wednesday, June 28th, 2006

Here is how to limit a .Net Compact Framework program to a single instance of itself. The duplicate instance is simply closed in this case.

I found I needed to use this mutex based code since I was doing a lot of work before calling the Application.Run() method. Once you start to run the application it appears as though Windows Mobile brings the backgrounded application into the foreground.

But for users who mash the enter key 3 or 4 times while not patiently waiting for the device to set up the .Net CF environment to run you will definitly want to use this code.

(more…)

Rico Mariani: Eighteen Years in the Software Tools Business

Thursday, June 22nd, 2006

Rico gave a talk for the University of Waterloo’s computer science club. Go get your copies from their server.

The talk is more of a seminar I suppose but included open source, anti-competitive behaviour, software engineering – and what engineering means to him, optimizing programs, some CS info about cache and page misses w.r.t. data structures and the “locality” of data within memory.
If you need an example write two for loops that fills a 2D array of [x,x] long floating point numbers. Have one loop increment x and the other increment y — see which loop runs faster. The array size is dependent on your system and the amount of RAM you have — increase as needed.

My favorite quote might as well have been from the book “Microserfs” itself. It provides perhaps a bit of insight into the Microsoft culture:

“World Dominiation is not on the list, it’s just not on the list. People have no time to think about this stuff at Microsoft. They don’t. I know these guys they have like too many hours to work at at work and then they are trying to not get divorced and are hoping for a little bit of time in front of the Xbox maybe at the end of the day and that’s pretty much it.”

Rico Mariani — MS Tool Developer