Phil Hassey - game dev blog
Phil Hassey as Rambo
".. I've been there,
I know what it's like,
and I'll do it again if I have to."

Archive for October, 2007

ain’t broken don’t fix it

Wednesday, October 31st, 2007

One line PHP templating engine:

echo str_replace(array_keys($replace),
array_values($replace),$content);

Daylight whatever time

Sunday, October 28th, 2007

So last night, ’bout 11, my wife Nan says, “Oh, shoot! Tonight is daylight savings time… better set the clock ahead an hour.” So I set the clock to 12 and we went to bed.

… 5:30am comes along, I wake from my slumber to hear, “Phil! I just remembered, ‘Spring forward, Fall back’! That means, it’s really 3:30 now.” So I changed my clock back to 3:30am and settle myself back to sleep.

Eventaully, I woke up around 8:00 and rounded up some cookies and milk for breakfast and sat down to read the latest rot on the internet. I notice the clock indicates that it is 9:00. A bit of checking the news reveals to me that daylight savings time is not until next week.

My thumb is now officially worn out from all that clock button pressing. On a more technical note, I guess I should have known this, since I spent a bit of time earlier manually patching several older linux servers with the latest timezone changes so that when this day came they would plod along as usual.

“The next version should be more AJAXie.”

Wednesday, October 24th, 2007

My business partner and I were recently discussing the next edition of our healthcare web platform. Instinctively, Akash said that, “The next version should be more AJAXie.” I replied with a, “Sure we can do that… what exactly do you mean?”

We jumped into LiveMeeting where Akash showed me the web based CRM software he was using.

“See how when I mouse over these items, a menu pops up,” said Akash, “Can we do that?”

“Sure,” I said, “though that isn’t AJAX.”

“Ah. Well, see how this form has a tabbed interface. Is that AJAX?”

“Nope,” I said, “but we can do that too.”

“Well,” said Akash, “how about this, when someone requests a report and it displays a ‘Please Wait’ note on the screen while the report is being generated. Is that AJAX?”

“Maybe,” I said, “though again you could do that without AJAX as well.”

“Ahh,” said Akash.

I first used AJAX-like techniques in 1998 in a web based version of Galcon. Since then I haven’t. Haven’t had the need for it. And as this conversation realizes, even the term AJAX is unclear to fairly technical people – it has become a synonym for “nifty”.

Great commercial libraries for web development

Wednesday, October 17th, 2007

Although I’m generally an Open Source enthusiast, sometimes you just need something better …

Prince XML – if you need to create lots of PDFs, you probably need this. It converts HTML to PDFs really fast and accurately. They’ve even used it to publish a book. There is an open source alternatives which may suite you: tufat html2pdf – but it isn’t as powerful, is really slow, and takes up a lot of memory. Good for small scale projects. I’ve actually used it quite a bit, but eventually the requirements of my projects grew beyond what could be done with it. (I talked with the devs about sponsoring the changes I needed, but they felt it would be impossible meet my requirements and recommended that I get Prince XML instead.) Prince XML comes as a command line binary, so it’s easy to integrate it with any language. “prince in.html out.pdf” is all it takes.

Chart Director – makes building graphical charts for your website both fun and beautiful. I haven’t really come across any open source alternatives that I cared for. The API is quite nice and includes just about everything I need. It comes with bindings for all common languages.

Brawndo the Thirst Mutilator

Thursday, October 11th, 2007

Coming 12/15/07!!

http://www.brawndo.com/ – official website
http://www.youtube.com/watch?v=Tbxq0IDqD04 – youtube video / commercial

out of control!!!!

Tuesday, October 9th, 2007

Maybe it’s overkill… But I just wrote a class named “test_testtest” to test the “testtest” function which I will be using to test test generators that are for testing stuff.

TDD part 2

Wednesday, October 3rd, 2007

I’ve been using it for the past week to great success. I’ve found my test suite frequently finds tiny bugs that I add in by accident when adding in new features. It’s great having those bugs found and fixed immediately 🙂

I’m using TDD right now for building a PHP library which will be the core of a new medical records system. In the future it will be interesting to try it with a game. I don’t believe it would be useful for all aspects of game development, but if I rewrote the Galcon “core” or the Galcon network library, I think TDD would be quite useful in that case.