Backpack Goodies

I’ve added a page for Backpack Goodies, i.e. utilities and scripts I’ve written for Backpack. The first is Hide Backpack Page Warning, a greasemonkey script which does just what it says! When you’re at your page limit, it fades away the annoying yellow warning box.

Span 0.2.1 Release

Today is a great day, for it marks the release of Span 0.2.1. The only visible changes are that terminal resizing is now handled gracefully and automatically, but behind the scenes there was a lot of code cleanup, and a ton of documentation updates. (namely, I documented it.) Not a vital upgrade, but nice to have - especially if you want to look at the code.

Span 0.2.0 Release

I hereby give to the good people of halffull Span 0.2.0! Along with some general fixes, I added full network play. Someone runs as a server with the -s switch (and optionally -C(x) for the number of clients to accept). Then, your friends can join in with any number of players they want - the server manages the remote players seamlessly while you play along. Hell, you could even have an internet AI-battle by just shutting off the human players.

Actually… that’d be great, having people write their own Span AI and having internet tournaments to see who’s the master programmer. I’m getting ahead of myself though - enjoy the game!

Span 0.1.0 Release

I’m proud to release Span 0.1.0 to the general hungry public. I’ve added AI players and a real command-line interface in the past week. In other words, it’s actually playable now! The actual usage should be pretty self-explanatory. Enjoy. You just might like it.

Introducing Span

SpanI’m not a blogger. This isn’t a blog. I write well, I just can’t write. That probably explains how when I try to write, it turns out like this.

I hereby introduce Span! It’s a Connect Four-alike game in ruby/ncurses that I wrote while bored at work. I’m about ready to post the first numbered release, but for now it’s nightly-style. All the basics of gameplay are in, the next step is a command-line interface and some AI.

Enjoy!

The Object Oriented Office (with Duck Typing)

It seems to me that modern offices have a bad model of operation. They usually involve a strict hierarchy of employees with orders given directly down one level. Information filters down when needed, and flows up when requested. Changing the hierarchy itself is a very slow process, and has little to do with the type of information that moves.

Allow me to geek out a moment. Object-oriented programming is a Good Thing because it abstracts out some messy details from other types of languages. Rather than having a function like do-something(with, some, values) you get object-with-state.do-something(another-object). This is important for several reasons:

  1. It’s often easier to think about objects and interaction than processes with specific inputs and outputs. For example, you kick a football. It makes more sense to say you kick it [you.kick(football)] than to say there is a kick occurring, with you and the football being primary participants. [kick(you, football)]

  2. Objects abstract away ugliness. A lot of things in a program can logically be thought of as objects. Say you’re getting information from the web. The site is an object, the receiving computer is an object, (perhaps the stream is an object) and all these objects interact nicely. Each thing knows how to deal with its own information, each thing can exist alone or it can accept input from others. A football object knows to slightly deform and rocket away when it’s kicked. The kicker doesn’t have to know that. If everything had to do every job, it couldn’t be as efficient. Abstraction creates efficiency.

Object-orientation isn’t a one-size-fits-all solution, but it’s often a godsend.

Duck Typing is a concept from Ruby, or at least it was popularized by Ruby. Type systems in general determine how a language deals with different types of objects or values. Static typing systems bind variables to specific data types, whereas dynamic typing allows a variable’s type to change. Duck typing, on the other hand, doesn’t care what type a variable is - if it responds to certain signals of a type, it is that type. If it walks like a duck and quacks like a duck, it is a duck. (thanks Dave)

Where am I going with all this? These models are a perfect fit for an efficient office.

Continue Reading »