Sunday, November 28, 2004

Remember: Be Nice

Just a reminder that all of the people helping you this holiday season are working long hours and trying their best to please. I was helping my wife out this weekend at the mall (she owns a kiosk) and I think several people should have remembered the age old rule, "Treat people like you would like to be treated." I was shocked and disgusted how rude people can be sometimes. One man even made an obscene hand gesture after he had walked about and asked for help which I gave. He made the gesture in response to my sales pitch. I never think it's OK to be rude. But, I see it everyday in traffic, at work, at the mall, and just about any public place I go to. It saddenns me. There's never an excuse to be rude EVER. I don't care if you're having a bad day. Smile and treat everyone with respect. Anyway, my one wish is for everyone to be nice to one another. Have patience and remember everyone working behind those counters are people too. You are not better than them because you are the customer. They are not your slaves, they are your amplifiers to get your shopping done more quickly. So, if someone offers you a free chicken wing, politely refuse if you're not interested...don't yell...Don't make an obscene gesture, just BE NICE! Oh yeah, and be nice to your fellow shoppers and human beings as well. Peace, love, and happiness...It's not just for family time and xmas anymore. Do it all the time!

Saturday, November 20, 2004

Weak Typing and Bad Programmers

Alright, I went looking for Javascript info while I was writing my Life Simulation and I found two pages noteworthy: Javascript Rocks and it's nemesis, Javascript Sucks. Both pages have great points and things to ponder. There's a bit that I agree on both of them, but I'm firmly in the camp that thinks Javascript is a powerful lisp-like language encumbered with C syntax that's been messed up by the browser wars. But, enough of my incessant whining, one thing that caught my eye as an against of Javascript is that it is "weak typed". It's described in one the links outside of the Sucks page. It's also been talked about blogs, but I can't remember who's now. The example given is "3" + 1 returns "4". And this is bad. Well, if you think about how tolerant the browsers of HTML, why would javascript be any different? I'm not saying it's a good thing. In fact, I think it's a bad thing, but it's not something to blame the language for. It's the damn programmer who wrote that code in the first place that should be blamed! Javascript is typed (it knows to do the conversion and it will complain when I send it a message it doesn't understand. Basically, the auto-conversion is only on operators). I've never been bit by it because I make sure where I need numbers, I convert them to numbers! Same goes for strings. I don't mix the two and depend on automatic conversion (you should never rely on automatic conversion...SAY WHAT YOU MEAN AND SAY IT MEAN!) I think it's wrong to blame the language and it makes an easy scapegoat for bad programming. If you're surprised by something the language does or you don't like that it does it, then DON'T DO IT! In this case, make sure your objects are converted to the right types and be done with it. If you get surprises anywhere, it's because you didn't code it right. When I make a mistake, the last thing I do is blame the language or compiler. I blame myself. Take responsibility. Stop blaming the language. Languages are only amplifiers. Pick the one that amplifies your thoughts better and be done with it. OK, I'll get off my soapbox for now...=) Bottom line is that I don't want my language to control me...I want to take responsibility when I break my code. Remember, bad code is bad code not matter if the language is weakly, strongly, dynamically, and/or statically typed.

Sunday, November 14, 2004

Weekend Project: Conway's Game Of Life In Javascript

OK, I have always loved and found wonderment (is that a word?!) in Conway's Game Of Life. While talking to a friend of mine, the subject of the William Poundstone's "Recursive Universe" came up (I probably started it). Anyway, to cut a long story short, we hit the web and all I found were java versions on the web. I thought this to be very sad. Where are the javascript versions?! I thought it would be a cool weekend project and I thought it would be equally cool to allow you to edit the rules it uses. So, all you recursive emergent behavior freak lovers of the simple, go here right now and enjoy! It runs in IE, Firefox, Mozilla, and Opera. It works best in Mozilla and Firefox since their Javascript implementations are FAST! I had to take out some of my closures to make IE and Opera to work properly, but oh well...

I just love knowing that I now have an implementation of Conway's Life that I can play with anywhere and I can change the rules! How cool is that?!!!!!

Saturday, November 06, 2004

Scripting and Smalltalk

Lots of new dynamic languages have come along and tons of programmers are discovering the productivity gains of no compilation wait times and immediate feedback. But, the environments for these new languages are still based on files and dead systems. One advantage Smalltalk has is that the environment is alive (you can change the environment without shutting down, everything is well ALIVE!) and I think this makes a perfect playground for scripting as well as application development. While most folks use Smalltalk for ultra-complex business applications because they like spending time with their kids, but Smalltalk can also be used for scripting. You see you can get access to the compiler, compiled code, and even the runtime stack (you can even change it!)! Now, even most scripting languages don't give you that kind of power! The only other language I can think of that does is LISP. Anyway, back to the topic at hand. We all know that scripting is helpful for kicking off systems, moving files around, querying the state of a running application, and etc. This is available off the shelf for every Smalltalk dialect that I know of. The cool thing about scripting in Smalltalk is that since you have a powerful environment around you, you can write your script in a workspace. Now, if your script gets too big, you can start moving it to classes and refactoring. You can also move scripts to external files and load them in a runtime. Why do you configuration files when you can have runnable code that does it for you? Let the objects do the talking! Scripting is also great in running systems. If you run Smalltalk in headless mode, you can have scripts that query the state of the system while it's running! This can be very powerful and DANGEROUS! But, wait a minute, we have access to the compiled code and we can actually query the compiled code to make sure it doesn't do anything nasty. The bounds are limitless and once you start thingking about them, you wonder why am I writing unix bash scripts and then, you might be wondering, why not have the power of a compiled language, but the expressive power of an interpreted one? Smalltalk is all that and a whole lot more.
Scary Computer Errors

OK, Bill Bumgarner blogged on computer error in Ohio and I must admit it scares the living day lights out of me. I have no doubt that cheating in elections is nothing new. Both the democrats and republicans have been ingenius in their bending of the system. But, this takes it to a whole new ball game. Computers make it very easy to tip the scales. I think this article just rings clear that we election software MUST BE OPEN SOURCE and we must ensure that the software is not tampered in any way. Computers could be used to get rid of most cheating in elections, but they can also be used as very efficient cheaters as well. If we do nothing, we might as well resolve ourselves to a dictatorship.

Wednesday, November 03, 2004

Omaha Smalltalk User's Group

Guess what time of the month it is? Yes, it's time for the monthly Omaha, NE Smalltalk User's Group meeting! Again, it's going to be an open forum where anything is up for grabs. Last month, we talked about design, moose, nebraska (the distributed environment in Squeak), and croquet. I'm sure it will be fun and educational whatever we decide to discuss. Here's the details:

Tuesday, November 9, 7-9pm
Panera @ Eagle Run Shopping Center
13410 West Maple Road
Omaha, NE 68164

We generally meet in the seating in front of the official meeting room. We're still a small group. Just look for a long haired fellow who has a laptop and talks about this super cool language called Smalltalk!

See you all there!
Hatred and Disgust

Well, I am very depressed about today's election outcome. So, I'm listening to Sorrow's "Hatred and Disgust" album. It seemed to fit the mood perfectly. I guess I should look on the bright side: there's going to be a lot of great grindcore (really angry fast punk metal) coming out because of it...=) But, what I want to know is why is "liberal" considered a dirty word and conservative is not? This page will be black until I stop grieving...=)
Time For Change

Isn't it time to deal with complexity with a simple and powerful language? Read this article and realize Smalltalk could be used to fix the "complexity" problem by dealing with it instead of masking it with more complexity. IT systems are complex. You need a language that can deal with it: Smalltalk. If you want rising IT costs and complexity, do what everyone else is doing. Why not try something new, yet has had lots of time to mature.

Monday, November 01, 2004

John Peel

I just read that John Peel died of a heart attack. The news shocked me. Peel was an influential DJ and took a lot of chances. If it wasn't for him, a lot of the music that I enjoy might not have crossed the atlantic and into my ears. He was responsible for giving a lot of bands their chance when no one else would touch them. The whole genre of grindcore owes a lot to him and in fact, Earache Records has a tribute to him on their front page. I listened to a ton of records from that label when I was in college. RIP. A cultural icon for the underground is gone. He will be missed.