Category Archives: Programming

Power and Freedom: Individuals and Societies

The other day I saw the following quote on a bumper sticker:

“A government big enough to give you everything you want, is strong enough to take everything you have.”
Gerald R. Ford

It got me thinking about the relationship between power and freedom, and how that relationship applies not only to governments but also to businesses, authority figures, laws, programming languages, and even games. Continue reading

Leave a comment

Filed under Games, Politics, Programming

Lisp, Smalltalk, and the Power of Symmetry

Like many hackers, my first real programming language love was Lisp. Paul Graham, who inspired my own explorations of the language, is a particular advocate and has written quite a bit about Lisp and what makes it different from other programming languages. So what does make Lisp different? Why does Lisp continue to be one of the most powerful, flexible, and concise programming languages in existence, despite the fact that it was invented in 1958–making it the second-oldest high-level programming language in the world? Continue reading

13 Comments

Filed under Programming

We Have A New Puppy!

This Monday, July 7th, my fiance and I went to the airport and picked up this little guy:

A tiny baby pug sleeping in a travel crate

His name is Beetle and he is adorable.  Normally I think pugs are hideous (it was her idea), but Beetle is the sole exception.  Obviously. Continue reading

Leave a comment

Filed under Diary, Just for Fun, Programming

Amber Smalltalk

How come nobody told me about this before?  Amber Smalltalk is a dialect of the Smalltalk programming language, which is what caught my attention.  I have been a fan of Smalltalk for years, but the image-based development environment proved a little too cumbersome and monolithic for my tastes.  Amber to the rescue!

Amber is a Smalltalk language for web development.  Now, as I understand it, there is already an excellent Smalltalk-based environment for web development called Seaside.  However, what sets Amber apart from other Smalltalk variants for the web is that it is client-based, and compiles directly to JavaScript.  This means, among other things, that you can go try Amber out right now using nothing but your browser!  It’s the perfect “gateway drug” for the wider Smalltalk world!  I find this especially appealing because it means I won’t have to learn JavaScript to do portable, client-based web programming!  Hurray!

After my initial “project” (modifying the “counter” example to count only by primes), I’ve started working on a web-based game.  It won’t be the much-anticipated port of my game “Press A to Win” (my apologies to both of you who were hoping it would be), instead it will be a game about numbers!  A game about finding numbers’ unique prime factorizations, specifically.  What?  Why are you looking at me like that?  Of course it’ll be fun!

Anyway, you should go check Amber out.  It’s great.  I’ll have something more for you to look at next week.  Until then, stay curious!

Leave a comment

Filed under Diary, Programming

On Games and the Making Thereof

I am almost finished making my first real game! “Real” being a relative term, that is: my first game was an abstract, experimental undergraduate project that no one in their right mind would have voluntarily played.[1] The one I’m working on now is a bit more enjoyable, though technically it is actually simpler. It’s called “Press A to Win.” Can you guess what it’s about?

I am making the game in Pygame, so you will need Pygame installed in order to play it. I know it’s a stretch, but I figure there’s at least a chance that some of you might not be familiar with installing, compiling, and running Pygame files, so as soon as the game is finished I figure my next project will be porting the whole thing to Flash.

At the moment, however, both of those projects will have to wait, as I am busy showing off my fiancé to my extended family in Muenster, Texas. I would say “nice place to visit, but I wouldn’t want to live here,” except it’s not even a terribly nice place to visit. The views are great and the weather is (currently) lovely, but the town itself is tiny, the water tastes like sulphur, and taking a shower feels like coating yourself in a thin sheen of silicone. I can never tell for sure if I’ve gotten all the soap off.

Regular posts resume next week with a return to the “Agency and the Inevitable” series, after which I will likely write something about education again. I am a big fan of that topic, it seems! See you all then.

Notes:

[1] It was called “Clique” and it was about socializing polygons IT’S A GRAPH THEORY PUN GET IT WASN’T I CLEVER

Leave a comment

Filed under Diary, Games, Programming

The Free OS

So I recently bought a game I was very exited about playing–I’d hoped to write a review of it here in the next week or two–but when I downloaded it I discovered that I couldn’t play it because my operating system was too old.  “Great,” I’m thinking, “so instead of costing me ten dollars on Humble Bundle, it’ll cost me three hundred or something at a Mac store?”  Having to buy new operating systems every time the one you’re running gets out of date has always been a scam perpetuated largely by Microsoft’s monopoly on the OS market, but I had never felt it so strongly before.  The introduction of alternatives like Chrome OS and the proliferation of always-up-to-date web applications has made this business model seem not only inconvenient and forced, but unnecessary as well.  Then, just as I was thinking I would finally bite the bullet and at least see if I could get a cheaper second-hand copy on Ebay or something, I discover to my delight and surprise that Apple’s newest operating system, OS X Mavericks (guess they finally ran out of cool-sounding cats?) is available to download free on the app store!  All hail the Age of the Internet!  I only hope Microsoft has the courage and intelligence to follow suit with their next operating system.

Now, if you’ll excuse me, I’m going off to play Gone Home.  Look forward to a review of it here in the coming weeks!

Leave a comment

Filed under Games, Programming

Always Be Testing

I recently came across an article by Jeff Atwood (of Coding Horror) on how to be successful. It opened with a line of advice that I really liked: “Always Be Jabbing. Always Be Shipping. Always Be Firing.” The idea behind this advice is that as long as you keep moving forward, no matter how much you suck you’ll eventually be successful.

I’d like to add another word of advice along these same lines: Always Be Testing.

My problem (and I’m guessing there are many of you out there who share this problem) is that it can be very easy for me to trick myself into thinking that I’m making something when I’m really not.  The degenerate case of this is errands like doing laundry, taking the dog for a walk, writing thank-you notes, organizing your desk, etc.  These are all legitimate things to be doing and they can be fairly important, so it feels much less like procrastinating than just sitting around on your butt playing videogames or watching TV.  But if you’re doing them in order to avoid other, more important work, then it’s still procrastination–only worse, because you feel like you’re getting something done.

Unfortunately, there are even more subtle ways to procrastinate while still feeling productive.  Perhaps the most insidious of all is the type of procrastination where you’re producing like crazy, but you’re not doing any testing.  Maybe you’ve written a 500-page book but are afraid to read it (let alone give it to anyone else to read).  Maybe you’ve been practicing an instrument in your basement for months, but you won’t let anyone listen to you play.  Or maybe you’ve written a few hundred lines of code without once actually running your program.  There are a number of reasons people do this, but probably the most common is fear of failure or rejection.  Well, the bad news is that you will face failure and rejection.  Your writing will be torn apart, your playing criticized, and your code broken in a dozen different ways.  Here’s the problem, though: without testing, producing is just an errand.  It’s something that has to be done, of course, but it’s not the most important part of building something.  Just as the most important part of writing is reading what you’ve written, and the most important part of architecture is construction, the most important part of programming is testing your code to make sure it works.[1]

What I really like about the “Always Be Testing” aphorism is that (along with the other three Jeff mentions) it’s applicable not just to writing or programming, but to life in general.  If you’re not making things, you’re not improving and you will never be successful–and if there’s no chance of something going wrong, then you’re not really making things.  Anytime you suspect you may be procrastinating by doing something that feels like work but really isn’t, ask yourself “what will happen if I mess this up?”  If the answer is, “basically nothing”, then you are procrastinating.  When you make something, you introduce a permanent change to the world–which means mistakes are permanent, too.  This can be scary, but it’s a necessary tradeoff: without the possibility of failure there can be no such thing as success.

So what does that mean in practice?  It means you should always have something that’s ready for an audience, even if that audience is just your closest friend, or you as your program’s first user.  For writers, it means constantly getting feedback on new revisions.  For architects, it means making scale models at each stage of the design process.  And for programmers, it means always having some small program working and complete enough that you can run it and see if it does what it’s supposed to.  Again, this isn’t just good programming practice, it’s good practice for life: start small with something tangible, then work your way up from there.

In the end, that’s all success really is.

Notes:

[1] Obviously, you still have to write the code first, and buildings need to be planned before they’re built.  My point is not that planning and preparing aren’t important, my point is that until your code works or you have a standing building or your art has an audience, you have not actually made anything–you have merely prepared to make something.  A shoddy building that’s nevertheless standing is infinitely better than a building that never gets made, no matter how perfect its design.

Leave a comment

Filed under Philosophy, Programming