Wednesday, December 29, 2004

Feedburner

A colleague has recently switched his rss feed over to Feedburner. I will be very curious to see how this experiment pans out.

Tuesday, December 28, 2004

RSS 0.91 was born on this day in 1997

Danny Ayers notes that today is the birthday of RSS 0.91.

I remember Microsoft's CDF format and the promise of push technology. I think that "push" fizzled out because dynamic languages, like Python and Ruby, hadn't quite arrived.

With Python's urllib, I can easily play around with XML over in HTTP, whereas doing the same thing in C++ is almost painful.

Your ability to absorb a new idea is directly related to how quickly you can play around with that technology. Expensive, difficult to implement, technologies will never get the mind share that you can get from something which is truly simple.

RSS 0.91 is that simple.

Thursday, December 23, 2004

Infrastructure projects

In the TOC message group, Ron Jeffries made this amusing observation:
"We probably all know of infrastructure projects that have developed huge staffs, gone on for years, delivering nothing and ultimately coming to nothing. Those of us who don't know about these projects should report the color of the sky on their planet, for the benefit of those of us on planet Earth. "The taxi business"

I have to concur. Whenever a project does not target a specific user, but delivers a more nebulous infrastructure, it is highly unlikely that anything will get delivered.

Tool vendors get away with building infrastructure, because at the end of the day, they won't eat if they don't build something that they can sell. Internal infrastructure projects have no such limitation.

Thursday, December 09, 2004

Dynamic Languages and C++

As I read Tim Bray's blog last night, I wondered if plain old C++ had a particularly compelling story to tell in the dynamic language space.

It seems like .NET and Java have a leg up on C++. Yeah -- I know you can write Python extension in C/C++, but you have to do extra work. It seems like with Java and .NET, you get this stuff "for free".

BTW, don't you think that Sun had an ulterior motive in inviting these dyanmic language gurus to their campus? To build up some street cred perhaps?

Monday, December 06, 2004

Tips for using del.icio.us

I have become a big fan of the social bookmarking site del.icio.us, as you might have guessed, so I thought I might share some tips that I had.

In Getting Things Done, David Allen talks about processing your inbox, which may be either a literal or metaphorical inbox, by periodically purging it. Every item in your inbox gets filed as either a to-do item, reference material, or gets sent to the trash.

Whenever I encounter a link that I find even slightly interesting, I file it under the tag "toread". If I think a link might be worthy of a blog entry, I tag it as "toblog".

Sunday, December 05, 2004

Precious Thoughts

I have a moleskine notebook, and yet I hardly ever write anything in it. It is a beautiful little book, that has this incredible feel of permanence when you hold it in your hand. Every time I open it, I imagine that I am writing something that my grandchildren might one day read.

So, of course, I hardly ever write anything in it.

It is not that I don't value my own thoughts, but that I find it exceptionally difficult to think while simulatenously criticizing what I am thinking. I can only manage to write anything by first spewing out everything in my head, and then going back and editing the resulting mess.

Programming is a lot like writing. It is hard to get everything perfect the first time around, so you hack things out the best that you can, and then make a second pass, fixing the mistakes you made the first time. You only get into trouble when the decisions you made in that first pass are difficult to change, like the notes in my moleskin.

So here is yet another way to define the term "loosely coupled":

Your code is loosely coupled, when you have contrived to house all of your difficult decisions in their own components, so that you may change those decisions without having to touch any other component.

Monday, November 15, 2004

Notes from VS Connections

I am writing this blog entry, after the fact. I wish that I could have blogged "live", like so many other bloggers, but there just wasn't enough time. These are not all the events that I attended, just the ones that I took notes during.

Day One

The Keynote

The speaker was the product manager for Visual Studio. I wasn't particularly shocked by anything that was said in the keynote. The main point of the keynote seemed to be that they were opening up Developer Studio to more than just the coder role, so that other team members ( project manager, architect, tester ) could find a home there as well.

One neat feature: Visual Studio may now import .VSI files, which contain application templates. Various third parties will be supplying templates for common problems. This is integrated into a search facility, which you may execute from the "New Project" dialog.

Introducing Indigo

Nothing new here since any of the previous Indigo demos that I have seen. I did get a kick out of Indigo's composability, as this has been something for which I have aimed in recent designs. In my case, I am coding in C++ and add new functionality using the Strategy pattern. In Indigo, you can weave in new functionality with .NET attributes.

Windows Forms

90 minutes of dragging controls on to forms. Okay...I get it!

Web Services

It seems like everything is just an attribute that you slap onto a class. I often have a hard time believing that it is simple as adding [webservice] or whatever to a class.

Day Two

.NET


The presenter gave a more general talk about the biz value of moving to .NET CLR.

Generating Windows Forms Interfaces

Some interesting stuff, regarding code generation, databases, and user interfaces, but I think that the fundamental premise, using code generation to automate the building of CRUD forms is flawed. Dialogs should represent business actions.

The presenter did throw out an interesting aside: generating unit tests from method comments. I thought this was pretty cool. I'd love to be able to do this:

/*
multiply
x y retval
10 20 200
-10 20 -200
*/

int multiply( int x, int y ) {}

And automatically build unit tests from the comments.

Whitehorse

Whitehorse is a RAD tool for designing distributed systems. I was impressed with its potential and I very curious to see how far Microsoft can take it.

Day Three

Permission Based Security

.NET allows you to define required permission as attributes. Principal information is stored on a per thread basis. The presentation did not cover authentication, which I would have been a much thornier topic. I would really have liked to have seen the whole thing presented from end to end, as I think that Code Access Security is an incredibly important feature in .NET.

C# Generics

Way cool. A lot like C++ templates, except that you can define constraints on template parameters, which are expressed as required interfaces.

One of my favorite things about C# is that, like Java, it elevates interfaces into first class citizens. I have always found this to be serious deficiency in C++.

Thursday, November 04, 2004

Evolution

I have spent most of my professional life developing traditional Win32 applications in C++. Sometimes, I wonder how relevant this sort of application will be in the future.

Don't get me wrong. There will always be room for that sort of development, but in this increasingly interconnected world, smart clients and web-based apps make more sense.

Adam Bosworth states that web-based apps or services can evolve more quickly.

Well this is where the comment about evolution in action comes in. Things that breed rapidly more quickly adopt through natural selection to a changing environment. Services can typically deploy changes every month or even more rapidly because they only have one single configuration on a set of machines whose OS, storage and networking they totally control and which they manage in their data centers. These days Microsoft gives birth to new products at a pace that makes an elephant seem quick, about every 60 months, that means in the time that a service can make 60 adaptions to its customer's needs, Microsoft makes one. It used to be that they shipped every 12 months. Then 18. Then 24. And so on. The creep is driven by the ever increasiongly complexity of features, hardware, os variations, and backward compatibility of the API's so ably designed to lock developers in. They locked the developers in all right. The Microsoft ones. This alone to me has been a compelling argument that when a product can be delivered as a service, it should be.

Reading this makes me question some of the architectural decisions that I have made recently. The main virtue of a smart client is that it support off-line capability. If you eliminate this consideration, it would seem that a web-based client is always the way to go. I think the only remaining question, is whose tool chain to use?

Next week, I head off to VS Connections, where perhaps the trade-offs will become more clear to me.

Wednesday, November 03, 2004

Unreflective Actions

This morning on the Subway, I read Brian Marick's paper, Methodology Work Is Ontology Work in which he says:

I'm particularly interested in unreflective actions, actions people take because they are the obvious thing to do in a situation, given the way the world is.

I think this is a fantastic observation. Brian goes on to build a whole methodology "toolkit", covering a lot of ground from how we learn best practices to what is the best number of core values in a methodology (4), but I think this one quote makes the whole paper.

I cannot count the number of times that I tried to engineer a situation so that the only choice is the correct choice. This one concept may be applied to user interface design, architectural design, and code construction. It reminds me of manufacturing's poka-yoke, a device intended to prevent mistakes.

I wonder what changes I can make in my personal and professional life, so that I choose the correct action without reflection?

Tuesday, November 02, 2004

Re-usable Code

Keith Ray blogged about code re-usability as a set of rules.

I will summarize the rules that I like:
  • Write your class to avoiding depending on other classes (etc).
  • A class should have one responsibility, delegating other responsibilities to other classes.
  • A class should not depend on other concrete classes [except the most basic types like String].
  • To further allow substitution of concrete types, avoid using "new ConcreteClass" within your class -- particularly the constructors.
He goes on to say:

The user of your class may want to subclass-and-override. Make that possible by avoiding static, final, or non-virtual methods, and private methods. Private methods either need to be declared protected, or should be moved to another class and made public, with the original class using an instance of that other class.

And provides a set of rules for making classes easily extensible.

I strongly disagree with this sentiment. Making everything overridable may seem to increase the likelihood that your class will be reused, but it also makes it likely that the implementation of a class will be spread across several classes in your hierarchy. In the long run, this makes maintenance increasingly difficult, particularly if you choose to employ the Template Method Pattern.

I think it makes more sense to prefer containment to inheritance, and to mix in new behaviors with the Inversion of Control pattern.

Thursday, October 28, 2004

Geek Test

A friend passed on one of those online geek tests to me, which my wife proceeded to take for me. Frankly, I was not too shocked when my score turned out to be 42.99%.

Further confirmation of our geekiness came when we spent the evening standing in the dark in Prospect Park, waiting for the lunar eclipse.


Tuesday, October 26, 2004

GMail

Jon Udell just posted an article about GMail, where he says:

Because Gmail’s behavior is embedded in the UI engine, all subsequent interaction between the browser and the Gmail service is just an exchange of data. What Hwang calls the DataPack format is not XML, though; it’s JavaScript. When you make a request to the Gmail service, whether to refresh your inbox or to modify the list of labels you can attach to messages, the response is a minimal set of JavaScript function calls and associated data objects that the engine uses to update the display.

This is the very first thing that I noticed about GMail, and it continues to amaze me whenever I use it. I have to imagine that the GMail architecture is extremely scalable.

Tuesday, October 19, 2004

Wormholes

Bill Caputo talks about wormholes, which are passages that transport implementation details through your layered architecture.

Martin Fowler follows up, talking about Data Transfer Objects, which are "an object that carries data between processes in order to reduce the number of method calls."

So what's the big deal?

I think that a layered architecture is great, so long as it buys you actual decoupling. If a layered architecture only buys you more layers, it is time to rethink the architecture.

Monday, October 04, 2004

Cleverness considered harmful

Chris Sells posted this quote today:

"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it."
--Brian Kernighan


I tend to carry around a toolbox of not very clever, tried and true, techniques that I trot out for nearly every problem. This is probably a little reductionist, but it keeps me from getting into trouble. I used to get in trouble a lot.

When I find things are getting complicated, I know this is a sign that I don't really understand the problem. Sometimes, though, you need to write clever code to get to a place where you know enough to simplify it.

Still, this is a great acid test. If you find that you are stretching your mental limits just to write the code, then what chance do you have to maintain it?

Sunday, October 03, 2004

Moving my blog

I have had a similarly titled blog on bloglines for some time, but bloglines does not present a very easy way to edit this blog, so I am moving over to Blogger.

The topic of this blog is computer programming, but I will probably avoid talking too much about the various technical tips and tricks that are covered so throroughly elsewhere.

I am more interested in design techniques, project management, and the little things that make the day to day slog through coding fun, rather than a chore.