Squeak Revisited

I can’t remember exactly when I discovered Squeak but it was probably the late 90s. Even in it’s earliest releases, it was awesome. In case you haven’t heard of Squeak, it is a modern implementation of Smalltalk, based on Smalltalk 80. It was written by Dan Ingalls, Alan Kay, Ted Kaehler, and Scott Wallace at Apple in the 90s to explore Alan Kay’s idea of the Dynabook.

Smalltalk is the epitome of object oriented systems. It is, in fact, one of the most copied languages around. For example, the NextStep library was based to a large extent on the Smalltalk library. Objective C draws many of its OO concepts directly from Smalltalk. To someone like me, who has been doing OO programming for something like 20 years, Squeak is like coming home.

I’ll have to admit, Smalltalk is hard to get your mind around. I have been playing with Squeak off and on for years. Mostly, I’ve marveled at the rich applications that came bundled with the package. Each new distribution brought more nifty graphical applications that, more than just being examples of how to write applications in Squeak, were incredibly useful in their own right.

The thing that has changed recently for me is that I discovered the online book Squeak By Example. This has broken down all of the last mental barriers that were hindered me in developing Squeak applications on my own. It is an excellent tutorial for anyone with any knowledge of programming at all. I wonder if it isn’t a great book for people that have no knowledge of programming at all. But that’s a topic for another time.

Squeak has rekindled the utter joy of programming in me. I highly recommend that you download it and Squeak By Example, or SBE as it refers to itself, and have fun. Set aside a good chunk of time. You won’t want to put this one down.

A Pause to Reflect

So now I’ve got this really nice blank piece of paper in front of me. I’ve gotten myself into the habit of writing on it frequently. Where have all my ideas gone. I wrote them down somewhere. I guess I need to find that file or notebook or whatever.

I know what I’m interested in. Programming, video making – both vlogs and actual video production with scripts and editing and such, playing music, composing music, writing, building robots, ham radio, creating web sites, the list goes on and on.

I suppose I should write about those things and see what happens. I act so ADHD though. I flit from one thing to the next. I can’t do them all at once so I have a hard time sticking with anything for long enough at a stretch to accomplish anything to speak of.

Drupal Resolution

I finally figured out how to configure PHP on my server. It was documented in my provider’s help desk pages. I guess I won’t move yet. I will probably wait until I can afford to buy a slice and keep this site. “Don’t fix something that’s not broken” I always say. I promise I’ll write a post that is about something more substantial than my web hosting configuration adventure real soon now. In the mean time, at least I’m posting more frequently.

Drupal Woes or To Slice or Not To Slice

The domain name finally propagated and I tried to install Drupal. Now, it complains that one of the PHP configuration variables is set to an unsafe setting and refuses to let me install until I fix it. This is infuriating. I spent about an hour researching the issue and discovered that there may be a way that I can resolve the issue on this server but it entails another round of emails with tech support. I have hit my head on this problem enough times that I’m tempted to buy a 256M slice from slicehost and move everything, my domains, this blog, etc., over there. Don’t get me wrong. I like my web hosting provider. I think I’ve just moved beyond the services that they provide. I suppose I could ask if they provide a similar service to slicehost before I just jump ship. Food for thought.

Drupal Adventures

I’m putting up a Drupal site today. Not because I have anything against WordPress. I love WordPress. I just want to explore the wide variety of content management variations that Drupal supports beyond just blogging. It may not be any better than WordPress but I’ll never know unless I investigate and experiment with it. Occasional Comment will remain as it is for the foreseeable future. Not that there are hoards of readers that will miss it if it moves or changes or even goes away entirely.

Right now I’m waiting on a new subdomain name to propagate through DNS. It’s like watching chrome rust. I may have to wait until tonight to finish configuring Drupal if it takes as long as my webhosting site claims to propagate DNS names.

Software Lifecycle Planning Methodologies

I’m learning how industrial software development has changed in recent years. My entire focus up until recently has been from a developer’s perspective. Now I’m being forced to look at the business issues surrounding how you price a large product development effort that has a moderately small software component (small in terms of the total value of the contract, that is).

It makes me shudder a little bit. Primarily because we could do so much better but it would take a revolutionary change in business practices instead of an evolutionary change. I’m not saying that these practices won’t eventually evolve to better reflect the experience of software developers. I’m just saying that there will be some large lag (10 years or so maybe) between the time we discover a software planning  methodology and the time it is reflected in business practices.

It also brings home the point that large businesses are inherently inefficient. The best software is almost always written by a single person that has been able to get their mind completely around a problem and its solution. People can help the author realize their vision but seldom do you find more than one person that really gets the total picture of a product. The solution to this problem is “lots of pieces, loosely coupled”, each one developed independently. If you can rigorously specify the functionality and interfaces of a piece of software, you have created an abstraction that can be used as a building block to achieve more complex behaviors.

Now you know the hackers’ biggest secret, study the interface, not the code. If you have to study the code, you’re doomed. Well maybe not doomed, but set back months or maybe even years.

More on the Process of Programming

I was thinking today about programming. In particular I was thinking about programming languages. I came to the realization that the elegance of a program depended upon not only the abstract clarity of the algorithm itself but also upon the the appropriateness of the programming language used to express the algorithm. Hence, like natural languages, certain algorithms will be more elegantly expressed in certain programming languages than they will be in others. Now I need to see if I can rustle up some examples to support my premise. Stay tuned. Yet more to follow.

Blogged with Flock

Tags: , ,

A Short Essay on the Process of Programming

I approach programming as an exploratory process. I can’t seem to bring myself to sit down and plan a program out in minute detail beforehand. The truth is, any program that I understand well enough to plan out in minute detail beforehand, doesn’t interest me in the slightest. I want my programs to teach me something I didn’t know when I started writing them.

Consequently, I usually start out with some vague idea for a program. I write the shortest little bit that might work and compile and run it. Even better, I use an interpreted language like Lisp or scheme or ruby so that I can skip the compile part. I love dynamic languages!

At first, I find myself exploring the boundary between the language and the environment. For example, I have spent hours exploring the Dir module in ruby. I have spent similar amounts of time exploring similar functionality in Common Lisp. Knowing how to traverse the file system in a given language is an important detail.

Another facility that I often dwell on is the reflective capability of a language, that is the ability of a language to know or discover details of its structure. For example, most symbols in ruby have a method methods that returns an array of methods that the object implements. methods is a reflective method. It allows the programmer to discover details about the programming environment dynamically at run time. Reflection is also called introspection.

Java implements reflection, demonstrating that languages not typically considered dynamic can be introspective too. The clever trick to Java reflection is that Java doesn’t create data structures to describe itself until you actually need them. This adheres to one of my favorite principles that states “you shouldn’t have to pay for features that you don’t use.” I’ve heard this principle called parsimony.

The underlying theme to these language features is that they all help make a language more adaptive. One of the key characteristics of human intelligence is our ability to distance ourself from a situation and analyze it with detachment. This is an important part of our ability to adapt to rapid changes in our environment. The ability of someone to reason about their relationship to their environment is essential to intelligent behavior.

Now I’ve really tipped my hand. The romantic notion that has captured my imagination is the quest for emergent intelligent behavior or Artificial Intelligence as it is commonly called. I try to avoid the term Artificial Intelligence because I find that neither the word Artificial nor the word Intelligence lend themselves to unambiguous definition, much less objective measurement. In fact, many of the great debates in the field revolve around this shortcoming.

To be continued.

No Good Deed Goes Unpunished

I set up a blog for Pam today. It’s currently called Change Me To Whatever. I didn’t want to give it a name that she might keep. I wanted her to make it hers. I’m not even sure she will want to blog. But this way, she has an option.

I want to blog but I can’t seem to get in the habit of doing it regularly. I need to find a time that I can set aside for blogging every day. This constant ranting about blogging is really getting old. I need to move on and quit being so circular. Okay, I will.