The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Hangman, the anonymous beating

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Hangman, the anonymous beating Posted: Jun 29, 2007 1:42 AM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Hangman, the anonymous beating
Feed Title: Michael Lucas-Smith
Feed URL: http://www.michaellucassmith.com/site.atom
Feed Description: Smalltalk and my misinterpretations of life
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Michael Lucas-Smith

Advertisement

I was somewhat surprised to discover that a dislike was taken to my 5 minute Hangman game that I wrote the other day and James Robertson screencast about.

Much to my dismay, an anonymous heckler felt he should criticize it - fair enough, the code was pretty crap - but he also took the opportunity to knock in some low blows. For that I'm annoyed at the guy - but for criticizing the hack job I did - sure, fair enough.

I think it's important we all remember that on the other end of a communique is a real person - blindly (and especially anonymously) lashing out at someone is not a nice thing to do.

Past that unhappy note - I decided that if I was going to throw up a Hangman game and people were going to learn off of it (which wasn't my initial intent) then I guess I should write it properly. By 'properly' I mean expand it form one simple hacked up WAComponent in to a WATask with some WAFormDialog subclasses and a proper WAFileLibrary subclass instead of a File Repository subclass.

Naturally, as you'd expect, the code explodes out in a few different directions at once - no longer do we have the one class hack but instead we have several classes that have an intent and purpose and hopefully the peanut gallery will be more happy with the code (fingers crossed).

Version 4 of Hangman in the public repository has all of the changes to it. While I was at it, I decided to throw in a decoration to center and give the game a background. In a full application where you're randomly popping up dialogs and all sorts of things you'd go to a bit more effort in this regard and make it consistent. I'm still being lazy here so if you think I've cheated again, yell (politely!) in the comments.

I threw in some basic CSS to style it a bit more nicely instead of nesting inside pre tags and dozens of divs. I stopped spewing out a zillion spans when I didn't need too. All the usual things you do _after you've done a quick spike_.

So if you are playing with Seaside and you think may be the Hangman program might be a nice example of how to do something more than "Guess the Number" then take a look. I still won't hold it up there as the perfect example of a Seaside application (nor did I ever intend it to be!) but I think it holds its own a bit better than the hack I did initially.

Read: Hangman, the anonymous beating

Topic: Why Scrum Works? Previous Topic   Next Topic Topic: Charting with Cairo

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use