Tags

I’ve kinda lost my momentum on this project in no small part to the fact my application blew up and I can’t fix the problem (which others have reported) and had to rebuild my application, an unpleasant and tedious process. The problem is that I use the “free” Visual Studio (Express) 2010 for my code. I’ve used Visual Studio for years professionally and am quite happy with it. In fact I’d have a very time giving up a really good IDE for the crappy tools (actually almost none) available for other “free” programming tools on Windows. But for some reason Visual Studio 2010 Express keeps making an unfixable mess of my app and I have to start over.

Now Visual Studio is a sophisticated and complex piece of software. It’s entirely reasonable that Microsoft wants to charge a lot of money for it for real developers. But they also decided to make a subset (perfectly fine for my purposes) available for free to individuals, nominally for “evaluation”. Now VS is not something you just go buy; it’s tied to the various categories of authorized developers in the MSFT developer ecosystem, again perfectly fine. But, and thank you MSFT, they did decide there are circumstances where individuals should also be able to program their own computers, not make products. BUT, I can’t help but believe the problems I’ve encountered are “deliberate”, perhaps unfixed bugs that cripple the Express version. Fine, but what a pain.

So after this has happened multiple times I now accept it as a consequence of getting something for nothing. Which means I need to be prepared to rebuild my application source, kinda from scratch, over and over. And the style of coding in my app is never very conducive to doing that, in a word, it is spaghetti code, poorly structured (although not horrible, just my laziness).

Now my working career was exactly the opposite of what I do individually. As the architect it was my job to make sure my programming team used best practices in code development. When you’re building a product that will also have a long lifetime and be supported by the usual comings-and-going of a team over time there are coding principles you must use.

But these are a pain, appropriate in product development, but tedious and slow in a personal project. So I cut corners, compared to what I know is the “right” way to build apps. Now actually, having been in software long enough and had many debates about methodology I’m engaged in one of the “agile” techniques (which I mostly don’t like) that is close to an endorsed approach called Extreme Programming. This was, frankly, the old-fashioned sloppy, pre-architecture, pre-design, and ad hoc era of the past, like 30 years ago. It was abandoned long ago because it produces code that is a mess, buggy, and hard to support. But it’s come back to life.

The idea, primarily endorsed in the Web world of instant changes, constant beta, never finished version, immediate release of iterations, is fairly simple. Programmers should sit with the “users” (product managers, even unsuspecting Web users) and instantly respond to requirements for change. Instead of the admittedly tedious process of “waterfall” development, where requirements and architecture and design are clarified before a line of code is written, XP says, basically, just go for it. Lots of iteration, half-baked ideas, get them in use, fix them later with refactoring or new functionality. Decades ago we called this code-and-go.

Since I am the architect, designer, product manager, user and programmer all rolled into one naturally XP’s basic concept fits. And so with a bit of thought it’s off the races, write some code, fiddle with it, incrementally change it and so forth. Frankly this produces a mess but it’s quick. And actually if you’re good at the process (which I flatter myself that I am) it’s gets a lot done, fairly quickly, with moderate effort.

UNTIL…

Something happens where the haphazard slapdash approach gets you in trouble, like having to rebuild your entire base of source code since your development tools break doing builds, for whatever reason (crippled deliberately to prevent “free” version from being used for real work or just sloppy bugs).

So it took me a full day, of trial and error, of tricks, of patching weird build errors, etc., before I finally had exactly the same code working, again, exactly the same way it worked before. I don’t want to do this again, but after three instances of having to do it I suspect I must.

Therefore I need to put my professional hat on and insist on some coding techniques, not just the tried-and-true best practices, but the additional requirement that I can recreate the code, cutting-and-pasting from backups of old source.

Now I already use classes approximately as they should be used. I don’t have long methods with many lines of complex code that I’ll never understand months after I wrote them in a fury of coding. But that’s not enough. Since VS normally is very flexible about where you put class code, i.e. which source file, since it’s all in the same namespace I don’t bother with a lot of structuring of the actual source files themselves. But, when I have to rebuild a complex (at least of personal scale) body of source code due to my tools failing, my structure makes this very hard.

And in doing this the last time I came up with a few guidelines (for instance, there is a strange connection in the automagical way VS works, vis-a-vis putting source codes in folders (convenient) and namespaces (that I’d never seen before). Normally the simple folder paradigm on any modern computer makes “versions” of the same app fairly simple, but not so with VS. Actual filenames and paths matter. Classes can’t be found, even though they’re right there is the same source file that is attempting to instantiate them (this was really bizarre).

So now I have to go back and take a fairly complex application and totally restructure it (not just simple refactoring) to get something I think I can rebuild easily the next time VS breaks it. UGH! Unproductive work and not something I expected to do.

When I was last working I was employed by a powerful player in the computer industry who had strong and high-level (CEO to CEO) connections to Microsoft. I had the highest level of support a programmer could ask for. I had the maximum fully paid licenses. My employer required me to work on their physical hardware (with some strange security stuff in it, I didn’t ask, just followed their rules) but I also worked at home. My licenses and contract with my employer permitted me to put licensed copies of Microsoft software on my own computers (I used several to do my job for complicated reasons). I didn’t violate anybody’s rules. When I retired I had to return all my employer’s property and licenses, which I did. But obsolete and out-of-date tools I retained on my computer (not completely clear whether this is OK or not, but no one seemed bothered by it). The IP of both my employer and MSFT was properly handled.

Fine, except I trashed my old computer and now, of course, have none of those licensed installers, up-to-date or obsolete. So I have to use the free software (which is the only choice other than arranging to be a registered developer to MSFT, which is not really what I’m doing, i.e. just dabbling with projects that interest me and will never be sold or used by anyone else). So my current computer is a mere shadow of the robust environment I used to have (I do miss VMWare, a very good way to do trial-and-error sysadmin where a mistake is easily reversed, unlike when you trash the registry on your own real machine).

So it’s tough enough being an individual developer without having additional burdens that really serve no purpose, to Microsoft, and just cause me grief. But beggars can’t be choosers so you do what you have to do. So rather than proceeding with the dozens of new things I want to do with my app I’ll need days of concentrated time to completely restructure it. Oh joy.

So a setback on reporting interestingly new results here, but I’ll get there. BTW, not even being able to run my app I can’t even work the data side of the street, updating my complex XML vocabulary or doing experiments as a user, not programmer. Well, the good news is that every day I’m doing this, instead of drills, I’m forgetting words AND my algorithms, which are designed for periods of use and then disuse and taking it back up again will get tested.

So there you have it.