June 30, 2005

Programmers Doomed?

Ever since the first assembler was written, programmers have been building their programs using tools and components written by others. Since then we have fragmented into groups that use different sets of tools and libraries, and it's getting harder to switch from one group to another as the libraries get larger and the tools more complex.

Traditionally, programmers have been taught the basics, so that they can write programs from scratch. The time may come when new programmers will have to choose their specialty as freshmen, and the generalist programmer will be as rare as the generalist scientist.

Of course, I could be wrong. One toolset could take over the world, at which point we'd start over again writing new tools built on that...

June 22, 2005

ICFP 2005

To counteract my recent lack of coding, I'm going to attempt to solve the ICFP 2005 contest problem. I don't really expect to finish it in time, much less win the contest, but it'll be fun if it's as good as last year's problem. If any of you want to contribute over the weekend, there will probably be some sub problems I could have you work on. Most of the past problems required a simulator in which to test solutions, for example.

Plus, I'll try to get back to the Python Challenges and finish the Music Animation Machine.

June 20, 2005

Life

I had a nice weekend:
  • playing ping-pong
  • hiking
  • Celebrating Father's Day
  • Picking cherries (literally)
  • not programming
Wait, life has become meaningless!

June 13, 2005

The Mythical Man-Month

This week I'm reading "The Mythical Man-Month", by Frederick P. Brooks, Jr., 1972. I'd heard a lot about it, particularly Brook's Law, so I finally checked it out of the library. After all these years, it's still good. Here's an excerpt:

The Joys of the Craft

Why is programming fun? What delights may its practitioner expect as his reward?

First is the sheer joy of making things. As the child delights in his mud pie, so the adult enjoys building things, especially things of his own design. I think this delight must be an image of God's delight in making things, a delight shown in the distinctness and newness of each leaf and each snowflake.

Second is the pleasure of making things that are useful to other people. Deep within, we want others to use our work and to find it helpful. In this respect the programming system is not essentially different from the child's first clay pencil holder "for Daddy's office."

Third is the fascination of fashioning complex puzzle-like objects of interlocking moving parts and watching them work in subtle cycles, playing out the consequences of principles built in from the beginning. The programmed computer has all the fascination of the pinball machine or the jukebox mechanism, carried to the ultimate.

Fourth is the joy of always learning, which springs from the nonrepeating nature of the task. In one way or another the problem is ever new, and its solver learns something: sometimes practical, sometimes theoretical, and sometimes both.

Finally, there is the delight of working in such a tractable medium. The programmer, like the poet, works only slightly removed from pure thought-stuff. He builds his castles in the air, from air, creating by exertion of the imagination. Few media of creation are so flexible, so easy to polish and rework, so readily capable of realizing grand conceptual structures. (As we shall see later, this very tractability has its own problems.)

Yet the program construct, unlike the poet's words, is real in the sense that it moves and works, producing visible outputs separate from the construct itself. It prints results, draws pictures, produces sounds, moves arms. The magic of myth and legend has come true in our time. One types the correct incantation on a keyboard, and a display screen comes to life, showing things that never were nor could be.

Programming then is fun because it gratifies creative longings built deep within us and delights sensibilities we have in common with all men.

If I could express myself that well, I wouldn't be practicing my writing on this blog.

June 06, 2005

Animated Music

So, I just rediscovered the Music Animation Machine (those samples are worth viewing, BTW). Inspiration struck! With MIDI<->CSV, I am trying to write a tool to automatically convert a MIDI into animated music. Since I'm currently learning Python, that's the language I'm using.

So far, I've manged to get the MIDI to video conversion working, but the video has no audio. Despite searching, I can't find a free tool to convert MIDI to WAV or MP3. Surely it can't be that difficult? Any suggestions you might have would be welcome.

Update: there are several ways to record anything that your computer plays as a WAV (the Winamp method appears to fall into this category). A command line utility to create a WAV from a MIDI without playing it is quite a bit more rare. At the moment, I'm looking at a tool called TiMidity++.