March 25th, 2008 — Fun, Programming, Thinking
I haven’t written much lately because I’ve decided to having two ears and one mouth probably means I should spend more time listening rather than talking.
It is an interesting exercise, trying to tune the world in while not adding to the noise. For programming I think this is an essential skill, it is how one learns new things. Lately I have found that having a good cup of hot tea and sitting back to take in things (bugs, new ideas, etc.) really helps me to move forward.
I’ve been hanging out at my favorite independent coffee house Tazza doing some programming work and thinking, and I have to say its a really cool place to hang out. I love the hot tea there, and from what everyone has told me the coffee is really good. The staff (hi everybody!) is very friendly and love to chat. That along with the cakes and cookies combined with the great (and free!) WiFi makes this little coffee bar the ultimate place for me to get away from the grind of the office.
I always wondered why some developers hang out in coffee shops, and now I think I know why: its a good place to be in order to keep your perspective. I might be the only programmer in there, so hearing other people talk about other things helps me to keep things in the right light.
So if you are in Atlanta (especially the Buckhead/Midtown/Georgia Tech area) you owe it to yourself to drop in to Tazza and enjoy a good cup. (The address is 1700 Northside Drive, Atlanta GA 30318 or just use this link)
December 31st, 2007 — Fun, Games, Programming
The other day I came across this really cool posting talking about school projects for computer science students.
Basically it talks about the different “levels” of effort required to make a certain type of video game for a CS class. Having just finished a CS class that involved a group project (but not a game) I was intrigued by the author’s take on the topic. (I usually try to dissuade people from doing games as a CS project, they just eat up too much time usually unless everyone in the group is on the same page.)
Overall I found myself agreeing with the various comments and evaluations of each game type (pacman, tetris, etc.). But when I got to the end of the “Advanced” topics section, I laughed out loud:
RPG - if you hate your life (and some apparently do), this obviously final year attempt at video game programming glory is likely to end badly.
That pretty much sums up my experience so far with my attempts to make a “simple” RPG. There’s a lot going on in a typical RPG, and it takes a lot of effort and attention to detail to pull it off and make it look good and play well. And even then, if you manage to get the mechanics of the game engine working semi-decently, then you have a tall order to fill by creating the contents (scripts, maps, graphics). Needless to say it can quickly become a huge time sink. Which isn’t to say it isn’t fun, because it is. But when you get overwhelmed on a project like this where you are working for yourself (i.e. not getting paid to work on it) it becomes very difficult to get your motivation back.
Personally, I’m hoping to get my motivation back to work on my little project some more. I think what I’ll probably wind up doing is working on it in-between other projects.
November 1st, 2007 — Lisp, Math
The Structure and Interpretation of Computer Programs is turning out to be a rather awesome read. What makes it so cool for me is that I’m taking a class in Numerical Analysis, and in sections 1.2 and 1.3 the examples read like something right out of the class. The really odd thing for me is that this “double teaming” of my brain is paying off in that I’m learning the Lispy things, and at the same time I’m learning the Numerical things. Each one builds on the other, reenforcing the lessons learned. Very recursive, just like Lisp.
One of the things I have learned just today is that loops are actually allowed in Lisp. All of the recursive thinking I’ve been doing lately has made me think that there’s always a way too write a loop in a recursive manner. But, I was looking at Neville’s Method the other day and it struck me that with it’s nested loops, that could be quite a challenge to write it in a recursive manner. While trying to find an example of nested loop in Lisp, I found all kinds of cool links I thought I would share:
Go check them out, they are great resources!
September 24th, 2007 — Lisp, Programming, Thinking
One of those “personal/professional” development things that you should do every so often is try to learn something new in your field. For me, I’ve decided I will learn more about Lisp, and programs in general.
To that end I’ve been working my way through the book The Structure and Interpretation of Computer Programs which is a dense volume that is chock full of good knowledge about how computer programs work from a critical and analytical point of view. The language the book uses is Scheme which is a variant of Lisp.
Having worked with XEmacs and its version of lisp (called appropriately elisp), I thought I would be able to pick up Scheme pretty quickly. This is pretty much true, since the two languages have the same general syntax/form. One thing I don’t have those is a Scheme interpreter! I did install SBCL and CLISP a while ago, so I figured that I would just use that.
Well, it turns out that Scheme is also slightly different than Common Lisp.
But thanks to Peter Seibel and his excellent book “Practical Common Lisp”, I was able to translate the first few programs in the SICP so that they would run in my CLISP-Slime environment.
So if you find yourself in this situation, be sure to check out the best Common Lisp tutorial on the net. Its free and it is very well written, so I highly recommend it. I remember playing around with it a while ago, and being impressed with it back then. The good news is it is still as good now as it was then.
September 22nd, 2007 — Entertainment, Fun, Games, Programming, Web
It occurred to me the yesterday, with more and more people seeing the power of Javascript and CSS, more websites are getting slick. Ok, that’s a pretty obvious statement, but here’s something that’s not obvious: This presents a great opportunity for easter eggs!
Easter Eggs are little hidden things in side of a bigger program. Some times it just the developer’s names, other times it can be something totally unexpected like a flight simulator hidden in a spreadsheet program. With the power of Javascript and nice tutorials like this one, there’s a lot of opportunity to have some real fun!
Just think, with all of the computing power a modern browser affords us developers, it should be very easy to recreate tons of games from the Atari 2600, early Nintendo systems. The imagination can very easily run wild….
September 19th, 2007 — Entertainment, Fun, Games, TV & Movies
I’ve been watching Code Monkeys a lot lately. If you haven’t seen it yet, its a cartoon on G4 that is basically South Park, but set in a 80’s video game company. Its pretty funny, sometimes sick, but always twisted. Every week the characters get into all kinds of trouble, usually while trying to make a “new” game.
One of the best parts of the show is when the developers are either talking about or pitching their new games. Just from hearing the titles of the games I wish some of them had been made! Cool titles like “Monkey vs. Cobra” or “Hobo Killer” or “Family Ties: The Video Game”. Plus some of the shots of the games looked pretty funny too. Check out the whole list here: Games featured on Code Monkeys
All of those wacky titles reminded me of all the times in other movies, TV shows, games, etc. I saw a “fake” video game and thought it was the coolest idea ever. Like “Billy Graham’s Bible Blaster” on the Simpsons. Or “Astro Chicken” in the Space Quest series. Classics!
And thanks to the wonders of the internet/web2.0/lazy web/wikipedia, there’s a massive list of all of these fictional games! Check out the list here: Fake Games
Seeing all of those games there got me thinking: Wouldn’t it be cool if someone made some of these games based on just the title? (Or in the case of shows like the Simpsons, take the clip of the game and expand it into a full fledged game!) That would be so cool. So cool in fact, I think I’m going to start doing that, looking at a title and then trying to come up with a game. Cheesy, yes. Wacky, you bet. Fun? Lets find out.
September 14th, 2007 — Programming, Python, Software Development
Thanks to Reddit today, I saw this posting from Guido Van Rossum about the recent flap about the GIL in Python:
On 9/13/07, Andy Wiggin <andywiggin at gmail.com> wrote:
> I thought the discussion was very interesting. I think true parallel
> programming is the challenge of our time, so I’m quite disappointed
> that the Python powers that be do not seem to feel any imperative to
> address it. I’ve always been kind of assuming that Python would
> provide a “pythonic” parallel programming paradigm that would “just
> work” and be as elegant as the rest of the language.
I’m sorry, but this attitude just really pisses me off. Python is the
work of many people. If you want something to happen, make it happen.
Don’t wait for someone else to solve your problem for you.
–
–Guido van Rossum (home page: http://www.python.org/~guido/)
Guido is 100% right. I used to (and some times still do) sit around waiting for someone else to take care of a “problem”. That’s certainly one way to approach a problem, but it is even better if you can get into it, figure it out and produce your own solution. That is the way to truly gain new wisdom (and to learn all kinds of interesting new things).
I have discovered several times that simply waiting for someone else solve your problem is a horrible compromise to make. It usually lessens the quality of your code because the solution isn’t a perfect fit for what you are doing, and overall keeps you from gaining the true deep knowledge that is oh so helpful when debugging.
Not to mention the fact that so many open source projects have gotten their start because someone (like Guido) got tired of waiting for someone else to do something. I think its a great that Guido has been so up front with this whole GIL issue: He has said that if someone will do the leg work and prove a better way that is still backwards compatible he will welcome it. The key thing is that he said “someone” and not “I” or “me”. This encourages more people to get involved, and for a community based project/product/language, this is a great thing.
So, kudos to you Guido! Keep up the great work! And please note that I am not saying that “Not Invented Here” syndrome is the way to go, I am saying: Don’t wait for a patch, see what you can do yourself to fix it!
September 11th, 2007 — Games, Software Development
I saw today that a indie developed “Fallout inspired” RPG was being taken down by the author due to lack of sales. This bummed me out because:
- It sounds like a game I would have really been interested in
- Although it had been out for some time, I had never heard of it
- I’m wanting to make a RPG that isn’t based in a dungeon
- The world needs new games that aren’t just derivative sequels of the same-old-same-old
Its always sad when a product is retired, but this situation sounds bad. According to the comments on the Ramapant Coyote site, lot of people are feeling the same way I do. But at the end of the day, its the author’s call, and in this case the author decided to pack it in.
I stated in #4 above that the world is too full of games that aren’t anything special. That’s why indie games are so exciting. Many are of the games that are made on the indie seen are passion works on the part of their creators. As a result these games are different than what you normally find in a store. They try new things, they take chances.
But sadly, just as in real life, sometimes you win, sometimes you loose. I hope Mr. Moffat finds the success he is looking for in his future endeavors.
September 9th, 2007 — Fun, Games, Programming, Python
Recently I heard about pyglet which bills itself as “a cross-platform windowing and multimedia library for Python“. This is more-or-less what pygame offers, but with one exception: pyglet doesn’t depend on SDL, its written in pure python.
As a side note, if you try to install pyglet on a Mac, there is a small catch. I’m running 10.4 Tiger which uses Python 2.4. Pyglet.org does offer a dmg file to install itself, but it doesn’t work. The reason for this is that Pyglet does need ctypes, and ctypes did not become a standard part of python until 2.5. So, to get pyglet to work on your Mac, you’ll need to get (and build) ctypes, or install Python 2.5. I installed ctypes and found it to be pretty painless.
Its still in an alpha state, but I thought it sounded interesting so I decided to take a look at it. Compared to pygame, it seems to be a little more streamlined. I’ve never really push pygame to the limits, so I can’t really compare the two as fully as I would like. One thing that I did like were the demo apps and the examples in the documentation. They were concise, yet demo’ed useful things that I would want to do in an app.
I started reading the documentation after lunch the other day and within a few minutes I found myself modifying the code as I read through the docs. Within 5 minutes I decided that I would try a sprint: Could I implement a quick and dirty game of pong within an hour using pyglet? Well, the answer is Yes!

After playing around for an hour I had everything except the computer’s paddle in place working. A few days later when I had some time I spent and additional 15-30 minutes (while watching the game on TV) and knocked out the “AI” for the computer player. This isn’t award-winning code or game play (the bounding box collision test is pretty crappy), but it did show me that I could get something done quickly using this framework.
So, check out pyglet. Here’s the code to my craptacular version of pong. (There are 3 files, two images for the paddles and the ball, and the source file pyglet_pong.py)
August 18th, 2007 — Thinking
I’ve blogged about functional fixedness before, and how important it is to overcome it both as a programmer and in regular real life. I try to “walk the walk and talk the talk” so here are some example of how I was able to solve some problems with a little unconventional thinking:
- Getting a lost screw out of a garbage disposal - While taking a wall plate down in order to repaint the kitchen, a screw got away from me and fell down the disposal. I’ve seen enough movies to know that even if you turn off the power there is a 100000% chance that a poltergeist will try to turn it on while your hand is down in there. So putting my grubby paws down the hole was out of the question. How did I get the screw out? I took a magnet off of the refrigerator, taped it to a piece of string, and then lowered it down into the disposal. On the third try (total time of about a minute) I got the screw out! This caused my wife to begin humming the theme song to MacGyver.
- Hanging two pictures on the wall so that they are level with each other - After the painting was done in the kitchen it was time to hang the pictures back up. I hung the first one then tied a piece of string around the nail and then using a level stretched out the string to rough distance the 2nd picture would be placed from the first one. Once the wife approved of the location, I used the level to make sure the string (which was pulled tight) was level. Once it was level, that told me where to put the nail. I did mess this up on the first try (I should have moved the nail up a bit to compensate for the string thickness), but the second try worked great. Now I have two nice looking pictures side-by-side on my wall.
- Keeping a tow line out of the prop on a Pontoon boat - This summer we went to a friends lake house and went tubing from their pontoon boat. The boat sits pretty high off the water and the only good place to hook up the line was on the pontoon itself. When the boat was stopped, there was a real danger of the line getting wrapped in the propeller. Since the deck was so high up, I was about 3 feet short of being able to reach the line and pull it back in by hand. Looking around the boat I saw a wooden paddle with a T-handle. I grabbed that and a few seconds later I was able hook the line and pull it up out of the water and keep it from propeller (not to mention pull in the tube).
So the point of this post is to say that the next time you have a situation where you need to solve a problem, take a second and observe your surroundings. The tools you need might just be lying around…