Thursday, October 27, 2005

Modern Programming Languages/Systems

I just read an interesting and thought provoking article by Charles Petzold. Read it here.

While I don't claim to have the experience that Petzold has, I started my programming experience back on Windows 3.1, writing C++. I feel a similar disquiet towards .NET programming that he describes.

Back in the day, when I wrote a program, I wrote every line of code. I controlled everything about the program. When a window resized, the controls moved because I put in code that told it how to move. I had complete power over the behaviour of the program. The downside of having that power is that it takes a long time to write all that code.

Nowdays I can get a program up and running a lot faster. However the cost of this improved productivity is that a lot of code is hidden away from me and that makes me feel vaguely nervous. When I write a foreach loop to iterate an arraylist these days I have no idea what's actually happening under the covers. So I just have to shrug and hope it performs okay. Because the alternative is too onerous and most of the time it's just not necessary.

The biggest extreme in this direction I have experienced is working with Borland Builder. It took me a week to get two windows to communicate with each other because it was a 'non-standard' communication and builder hid so much of the implementation from me that I had to work around it in incredibly complicated ways.

Could I go back? It'd be very hard to have to worry about ensuring that I deallocate all my pointers again. But at the same time I really miss the mental stimulation and discipline that that imposes. I feel 'careless' as a programmer now. At the same time I'm sure I'm romanticising C++ programming. I haven't mentioned the endless frustration of spending 3 days tracking down that annoying memory allocation bug. But then I also haven't mentioned the incredible surge you get when you find it and fix it!

So for 90% of programs, the extra productivity that modern programming languages provide are well and truly worth it. But I'll always look back and miss the real challenges and satisfaction that C++ programming provided.

2 comments:

Anonymous said...

I hear what you’re saying but I think it’s great. Usinag a foreach loop without knowing what it does is great. To me the help VS gives us as programmers is not disquieting though can be frustrating at times.

I see it as evolution. This has been happening for a long time historically.

I am sure assembly programmers felt the same way about compilers but who would go back to assembly now even if you can do the work with 20% less instructions?

I am sure that people who lived through the Industrial Revolution felt that cars weren’t as good as when they were made by hand. But who would go back to pre-mass production days. Would a human welder really do a better job than the giant robot welders on todays production lines? Maybe in a small number of cases but generally no.

Embrace the change my friend, or would you have us using good old rock to cut our steak at dinner tonight?

- Dave

Glen McGregor said...

In general I also think it's great. It makes us more productive and takes a lot of the frustration out of the process of programming.

But there are still some areas where I have reservations. These are mostly handled by faster hardware and less attention required to performance etc

But I think part of the issue is that because it's easier it's less satisfying. Things that don't require effort are not always appreciated as much.