Sep 262012
 

Here’s a quick tip for anyone writing a script without a REPL: use watch as a quick continuous integration tool.

While writing code in one console, execute the following watch command in another:

watch -d -n 5 "command"

I used this trick while pair-programming an Io implementation of Gnome Sort during my last reading group meeting. My other half thought it was a clever trick and shared it with the group. Then our group leader said I should blog about it. Done!

Aug 182012
 

This week in Seven Languages in Seven Weeks brings the Io Language. Installing the binaries is, of course, the first task in beginning to use the language. However, I’m not off to a roaring start just yet.

After installing the binaries using the Mac package installer, I find that the io binary is not found.

$ io
-bash: io: command not found

Continue reading »

Jun 192012
 

Of the conversations following my post Your programming language sucks?, I’ve received mostly nodding agreement. Perhaps most interesting of all, a friend from my reading group shared an article written by Paul Graham titled Beating the Averages.

In Beating the Averages, Graham illustrates how people talk about languages by calling on a hypothetical language, Blub. An equally hypothetical Blub programmer would look at a more powerful language in terms of Blub: “Hey, that language is pretty similar to Blub but it’s got some weird stuff mixed in. Well, anyway, I can do everything I need in Blub and it suits me.” Meanwhile, a programmer of that language more-powerful-than-Blub looks at Blub and says: “Hmm, it’s missing X. Why would you want to reduce yourself to Blub when you could have more?”

Let’s bring this back to the original example by substituting Java for Blub, using operators to compare Dates for X, and, say, C++ for the more-powerful-language.

“Hmm, Javais missing operators to compare Dates. Why would you want to reduce yourself to Java when you could have more?”

“Hey, C++ is pretty similar to Java but it’s got the hassle of pointers and dereferencing mixed in. Well, anyway, I can do everything I need in Java and it suits me. See, I can come up with two ways of comparing Dates in Java and one even uses operators!”

This helps explain two points Graham is making. First, the choice of language is more than just the choice of tool.

“…programming languages are not just technology, but what programmers think in.”

Second, a programmer’s experience colors how they think about new/other/different languages.

“…the only programmers in a position to see all the differences in power between the various languages are those who understand the most powerful one.”

These two points come together in what Graham terms the Blub Paradox:

“[Programmers are] satisfied with whatever language they happen to use, because it dictates the way they think about programs.”

With all of this in mind, I still stand by my original statement but I’ll add to it: Saying a programming language “sucks” says less about the language and more about the person speaking. It helps convey that person’s understanding of the language and may help place their point of view somewhere along the power-of-the-language “continuum.” Still, I consider the use of sucks to be uncharitable and dismissive.

This discussion only strengthens my interest in reading Seven Languages in Seven Weeks, which my reading group will begin in August.

Mar 112009
 

It’s been a week and a half since my Processing, week 2 post and I’m still not done with chapter four, “Time Series.” Oh, well.

I’ve been noticing that my Processing programs use a lot of CPU — about 35% on my dual-core, 2 GHz machine. And that’s for a program which just displays static data, like the one below. Continue reading »