Monday, February 28, 2011

Emergent Design

I'm just reading Scott L. Bain's book again. For the fourth or so time. Well worth a read for anyone in the software business, even if you don't work at the codeface.

I'll try an paraphrase it a bit:

  • Making software should be a profession no less than law or medicine. It's just that the profession has only a 40 year history and hasn't evolved the structures it needs.
  • It is also an art and a science.
  • Things change, be prepared to change with them. Code with change in mind.
  • Stand on the shoulders of giants. Use patterns that have been used before.
  • Develop instincts that tell you something smells funny (he actually uses this analogy)
  • Constantly refactor. If you have coded for change then it's not a big issue to move things around to make things self contained.
  • Think about how you are going to test the stuff you write and unit test it often.
The book uses Java for the examples but c# and vb programmers (and probably any other OO developers will be able to follow.

And while we are on books I've found PDFs of Polya's how to solve it book on heuristics in a few different PDF versions. Although the book applies to mathematical problems it's great for finding all sorts of solutions. Having the following checklist in mind is very useful:

  • Do I understand the problem?
  • Have I got enough info to solve it? If not can I safely make assumptions? Can I get more information?
  • Can I draw the problem as a diagram?
  • Can I restate the problem in my own words?
  • Is it somehow like something I've seen before?
  • Can I guess the range of the answer?
  • Can I reduce it so more soluble chunks?
Having a framework like this really helps you get some clarity.

Monday, February 14, 2011

Getting bored now.

Admittedly I've only given it a day and a half but Microsoft WPF is starting to bore me. OK it is probably very nice for making pretty pictures but as a basis for making thing that work it is a backward step. Or at least sideways.

The Windows.Forms namespace goes back to the beginning of the framework. There are gazillions of coders out there who know the object model backwards and it works most of the time. Wouldn't it have been a great idea to build the presentation host stuff on it? You'd have thought so wouldn't you. But the chaps and chappesses at Microsoft didn't. I accept that doing media rich stuff that will run in either the presentation host or a browser needs a new paradigm but it would have been nice if it used an existing and well known model. They have broken at least two of the tenets of Object Orientation to bring use something that might work if you are willing to fiddle with it for long enough.

I started to  list the things that were wrong with it but I've decided to pick on one. The nice thing about strongly typed code is that "if it compiles, it runs." I know that there has been a move back towards mutable types (you can replicate this already in the framework, just declare everything as object.) But WPF doesn't have mutable types. It's just pretends to...

Unfortunately Silverlight has tipped over to over 50% market share so I think I might have to persevere...

Friday, February 11, 2011

Kickoff


So here we are. I have decided to start blogging again. I might keep it up for a while and I may not. Let's see.

What prompted me to start again is that I have started coding again and it I can share my thoughts and have somewhere to park my discoveries and also vent my spleen on the idiocies of the stuff I have to work with.

I have just completed a nice little month long project to create a framework for a touchscreen wayfinding system in shopping malls. One in Saudi and one in Jeddah. At the customers request I did in in Visual Basic. It all went not to badly and I managed to hand over the code and a usable (if not polished) manual in the calendar month I originally quoted. Nice when that happens.

It was quite pleasing to find I hadn't lost the knack after some years of designing solutions rather than doing the work (although I secretly snuck in a bit of coding here and there.) It was also nice to to find I still got satisfaction from making something that is going to be used by real people to do real stuff.

So onward and upward. I have no more work on the horizon so I am exploring. I'm creating a shop in PHP on the XAMP stack and I have a bit of stuff to do on a database solution. I started them both before this job came up and I can pick them up again.

Oh, and blog a little about what I am doing...