Wednesday, August 17, 2005
Shocked
I used to hate Slipknot. I thought they were the worst band. I hated their first two albums, I hated their look, I hated everything about them. So, I'm watching Fuse and they sneak in their latest song, "Before I Forget" and I thought, "Wow, what a great song!" Well, I then notice the masks and think, "There's no way this is Slipknot. This ROCKS!" Well, to make a long story short, I bought the album on a whim expecting it to have that song and maybe two others. Imagine my surprise when I loved every song on this album! The amazing thing is that I hate all their albums still (I tried them again). "Vol. 3" has a great mixture of different songs. It's not all one trick. So, I work my way to "Stone Sour" and I love it too. I'm just shocked how a band can go from awful to awesome in my eyes. I can't stop listening to either "Stone Sour" or "Vol. 3". I hope they keep up the great work! This ain't nu metal anymore.
Touche Pussycat!
I overheard this on the ruby mailing list from Florian Groß:
I love this reply! What a great quote. It ties in nicely with "premature optimization is the root of all evil." Amen, brother! Just remember, people used to think Lisp and Smalltalk were too slow as well. Virtual machines used to be a dirty word. Now, java and c# are two of the most popular corporate languages and they both run off VMs. I love the prototype parts of Ruby. They are especially great for debugging specific instances and other things. Let's make our languages more dynamic, not less. More is less.
Eric Mahurin wrote:The biggest problem I have with being able to add/remove/modify methods of an object (using a meta class or directly in the object's class) is the future of optimization in Ruby. Adding methods may not cause too much of an issue, but modifying them sure could.
"Researchers seeking to improve performance should improve their compilers instead of compromising their languages."
-- An Efficient Implementation of SELF, a Dynamically-Typed Object-Oriented Language Based on Prototypes, July 1989
I love this reply! What a great quote. It ties in nicely with "premature optimization is the root of all evil." Amen, brother! Just remember, people used to think Lisp and Smalltalk were too slow as well. Virtual machines used to be a dirty word. Now, java and c# are two of the most popular corporate languages and they both run off VMs. I love the prototype parts of Ruby. They are especially great for debugging specific instances and other things. Let's make our languages more dynamic, not less. More is less.
Sunday, August 14, 2005
Offensive
I just found this document on the net entitled "How To Become A Hacker" By Eric Raymond. I read through a bit of it and I couldn't believe it. I stopped reading it immediately. Am I the only programmer offended by crap like this? I hate the words "geek" and "nerd". And "hacker" to me means someone who programs Big Balls Of Mud and doesn't care. This kind of junk just keeps stereotypes of smart people alive. It's derogatory and offensive. It's like the stereotypes of southern people. We don't all live in trailer parks and listen to country music. It's just like not all smart people are social misfits, play dungeons and dragons, and can't wash ourselves properly. I'm tired of the demonizing of intelligent people. We are the problem solvers of the world and you'd think that would be respected and revered. You'd think we wouldn't perpetuate bull crap like this. OK, ok, I'll get off my soapbox.
Saturday, August 13, 2005
I Couldn't Have Said It Better
Hwee Boon Yar states, "Smalltalk just fulfills most of my needs more easily." I couldn't have it said it better myself. Despite some of my blog entries, I don't totally hate java. I'm still looking for the perfect language. I'm just amazed in terms of productivity that nothing has yet to surpass Smalltalk that I can find. Of course, that's not to say that Smalltalk doesn't have some warts, but they don't get in my way.
Friday, August 12, 2005
Thinking Forth
It seems Vincent Foley has been hooked by Leo Brodie's "Thinking Forth" as well. I blogged about it a while back. It's an excellent read. If you don't care for Forth, you still need to read the chapters: Preliminary Design/Decomposition, Detailed Design/Problem Solving, Factoring, and Minimizing Control Structures. It's full of great advice and remember it was written in 1984. Another depressing example of how our industry forgets past lessons. But, I think this trend is changing. Many of us are exploring the past and uncovering lost gems. We shall not make the same mistakes again.
Thursday, August 11, 2005
Smalltalk Shop
Alright, who didn't tell me about the Smalltalk Shop? They have the classic balloon in a poster and t-shirts with that hot new balloon logo. You can even get the logos in different colors! I think I might be buying some stuff soon...=)
Sunday, August 07, 2005
Annotations
Well, with all of the noise generated by generics in the java world, it seems annotations got lost in the cracks. They allow you to add metadata to fields, methods, and types. With this metadata, you can reflect at compile-time or run-time. This opens a lot of cool possibilities in java! So, I got down and started to write some example code. One of the first snags that I ran into is that they can not be subtyped even though the syntax for creating them is similiar to interfaces. The second snag was adding behavior which didn't suprise me, but I wished for it. Annotations allow you to capture data into structures. But, the more you play with them, the more you desire to use polymorphism instead of using instanceof everywhere. I think it would have made annotations way more powerful and cool. It just seems they went half way. Why didn't they just make annotations full objects? Anyway, they are still a welcome addition to the language and they are the reason that EJB 3.0 is a lot simpler to create entities. Anything that makes java/j2ee simpler is alright by me.
Huh?
I've been reading up on java 5.0 and I came across this tutorial on the new generics framework.
Huh? I couldn't believe my eyes and what I was reading. But, here's the code sample:
I can see why so many java advocates have been clamoring about the complexity. Shouldn't we be making the code more readable? The paper goes through the problems with generics and addresses each one. It leaves you asking yourself, "Is this going too far?" It especially gets messy around how to treat subclasses and interfaces. The answer makes everything more restrictive which sounds good on paper (if you like type safety), but it also reduces polymorphic possibilities. I shutter at the thought of the code that I will come across from inexperienced OO developers. Much like I have seen "private" misused in method declarations. I expect to see generics misused to be more restrictive that they need to be as well. I applaud the effort to reduce the need to type cast, but what price shall we pay for safety? Generics do make like easier for some issues, but it complicates others. Is it really worth it? I find unit tests a much better tool to fix type issues than enforcing type safety.
A note on naming conventions. We recommend that you use pithy (single character
if possible) yet evocative names for formal type parameters.
Huh? I couldn't believe my eyes and what I was reading. But, here's the code sample:
public interface List<E> {
void add(E x);
Iterator<E> iterator();
}
public interface Iterator<E> {
E next();
boolean hasNext();
}
I can see why so many java advocates have been clamoring about the complexity. Shouldn't we be making the code more readable? The paper goes through the problems with generics and addresses each one. It leaves you asking yourself, "Is this going too far?" It especially gets messy around how to treat subclasses and interfaces. The answer makes everything more restrictive which sounds good on paper (if you like type safety), but it also reduces polymorphic possibilities. I shutter at the thought of the code that I will come across from inexperienced OO developers. Much like I have seen "private" misused in method declarations. I expect to see generics misused to be more restrictive that they need to be as well. I applaud the effort to reduce the need to type cast, but what price shall we pay for safety? Generics do make like easier for some issues, but it complicates others. Is it really worth it? I find unit tests a much better tool to fix type issues than enforcing type safety.
Omaha Smalltalkers
Well, it seems attendance was light last week and I was hoping that Gary Overgard could give his talk again on doing a report/code distribution on Small-Fit. It provides a lite-weight alternative to the current approach for Fit & Fitnesse. Its advantage is that it is much easier to debug, but still gives advantage of documentation. If we have time, I will be showing Ruby for Smalltalkers talk.
As always bring your passion, code snippets, and books to discuss!
Here's all of the details:
Office is at 103rd & Pacific. Guests can park in the Northern visitors parking area back of building, or across the street at the mall. Enter in front door, we'll greet you at the door at 7:00pm. If you arrive a bit later, just tell the guard at the reception desk you're here for the Smalltalk user meeting in the 1st floor training room.
As always bring your passion, code snippets, and books to discuss!
Here's all of the details:
When: August 9, 2005, 7pm - 9pm
Where: Offices of Northern Natural Gas
1111 S 103rd Street
Omaha Nebraska 68154
Office is at 103rd & Pacific. Guests can park in the Northern visitors parking area back of building, or across the street at the mall. Enter in front door, we'll greet you at the door at 7:00pm. If you arrive a bit later, just tell the guard at the reception desk you're here for the Smalltalk user meeting in the 1st floor training room.
Songs That Give Strength
I love music. I love all kinds. But, every once in a while, you get find something special. Something that touches your soul and you completely relate to. There's only a few albums that touch me deeply. But, one artist, Assemblage 23, continues to always write lyrics that dig deep inside of me. I've been listening to his music all week. His lyrics are all introspective and he writes the perfect music to back it up. It's a source of inspiration and strength for me. One song that really gets me everytime I hear it is "Lullaby". Here's the lyrics:
His lyrics are about the dark places all of us find ourselves in from time to time. But, there's always this ray of sunshine rising out of the bleakness to get out and make your life better. I love it. I wish I could find more music like this. One of his main influences is Depeche Mode and I've been slowly getting their back catalogue. All great stuff!
May you find solace in the gentle arms of sleep
Despite the wolves outside your door
In time you will see them all as harmless
And their idle threats easy to ignore
And if ever fate should choose to smite you
Stand your ground, never walk away
Please don't ever let the world defeat you
Don't get buried in its decay
As you drift into the gauzy realm of dreams
May you take comfort in the thought that you are safe
For it only takes a fraction of a second
For all of this to change
CH
Return to me
When slumber's fog has lifted
Return to me
Stronger than before
As you sink beneath the soothing streams of time
May you be thankful that you had another day
For there comes a time when each of us will enter
A sleep from which we will never wake
And if ever fate should choose to smite you
Stand your ground, never walk away
Please don't ever let the world defeat you
Don't get buried in its decay
Close your eyes now, if only for a moment
For it's time you get some rest
The wolves are gone and nothing here can harm you
Let go of your fragile consciousness
(CH)
One Size Fits All
There has been discussion on the Squeak mailing list about Smalltalk vs. Ruby. It started out as a Rails vs. Seaside question and then turned broader. Personally, I think there is no comparison between Rails and Seaside. Rails includes a simple way to map objects to an OO relational database with a traditional request/response model. Seaside on the other hand does not have a persistence model (they let you decide) and has a more advant-garde yet easier flow model. They both share the simpler is better principle of design, but they have attacked it at different angles. Rails is easier to swallow for most programmers, since it is closer to what they are used to. But, I find Seaside to be the simplest way to build web applications. There are things to learn from both.
On to the broader question of Ruby vs. Smalltalk, there was a lot of discussion of image-based vs. file-based environments. But, I think the one we need to keep in mind is the following quote from Enrico Schwass:
The key point is that we should understand that programmers are coming from other backgrounds. We should show them what Smalltalk has to offer and not why we think their language is inferior. We all have things to learn from one another. We need to embrace them with open arms. Smalltalk is cool because it is image-based, but it's a hard sell to a lot of programmers. It presents an alien world that is both strange and unfamiliar. Ruby allows most programmers to stay comfortable in their file-based world, yet take a peak into a pure OO world. One step at a time, I think Ruby prepares programmers for an image-based world. Also, I think they will come to Smalltalk with a different mindset and this will push boundaries. This is a good thing. I am continually amazed at how inventive and creative members of the Ruby comunity truly are. They will be a welcome addition to our community. Besides, who says one language has to rule them all? Let's embrace Ruby for what it's good for and do the same for Smalltalk. I enjoy programming in both and love being a part of their communities. Of course, I enjoy programming in a lot of different languages. Each one has it's pluses and minuses. So, instead of bickering about which one is better, let's learn what's great about each one.
On to the broader question of Ruby vs. Smalltalk, there was a lot of discussion of image-based vs. file-based environments. But, I think the one we need to keep in mind is the following quote from Enrico Schwass:
I guess smalltalk and especially squeak get now the chance to spread
wider. Why? Because of the growing ruby community. Smalltalk is
mentioned everywhere. Most of the newer ruby guys are curious enough to
take a look. Like me. This could start a smalltalk renaissance. If you
welcome them friendly :)
The key point is that we should understand that programmers are coming from other backgrounds. We should show them what Smalltalk has to offer and not why we think their language is inferior. We all have things to learn from one another. We need to embrace them with open arms. Smalltalk is cool because it is image-based, but it's a hard sell to a lot of programmers. It presents an alien world that is both strange and unfamiliar. Ruby allows most programmers to stay comfortable in their file-based world, yet take a peak into a pure OO world. One step at a time, I think Ruby prepares programmers for an image-based world. Also, I think they will come to Smalltalk with a different mindset and this will push boundaries. This is a good thing. I am continually amazed at how inventive and creative members of the Ruby comunity truly are. They will be a welcome addition to our community. Besides, who says one language has to rule them all? Let's embrace Ruby for what it's good for and do the same for Smalltalk. I enjoy programming in both and love being a part of their communities. Of course, I enjoy programming in a lot of different languages. Each one has it's pluses and minuses. So, instead of bickering about which one is better, let's learn what's great about each one.
Saturday, August 06, 2005
10 Things Every Java Programmer Should Know About Ruby
The slides for Jim Weirich's "10 Things Every Java Programmer Should Know About Ruby" are up and ready for your reading. The slides are excellent and provide a great argument for dynamic languages. Everything he talks about is true for Smalltalk as well except that everything really is an object (including blocks) in Smalltalk. I do love Ruby, I think it has a lot of good ideas (like mix-ins). I especially love the Ruby community. It's young, vibrant and they embrace the simple for doing complex things. It's possible.
Wednesday, August 03, 2005
Just Say No....To Kitten Huffing?
My gut is hurting. But, did you know kitten huffing was bad for your health? This is some pretty dark and funny stuff! The included video is simply hilarious. Enjoy.
Tuesday, August 02, 2005
Alice Cooper
The master released his new album, "Dirty Diamonds" and it is brilliant. I'm a huge of Alice and he never has disappointed me. But, I wasn't expecting this. It's a complete throwback to his early 70's material. It's diverse and his twisted sense of humour comes shining through. I can't wait to see the tour! I hope he never stops making albums.
Which Altar Do You Want To Worship At?
"Finally, the days where a novice programmer can know all of a language are gone, at least for the languages in widespread industrial use. Few people know "all of C" or "all of Java" either and none of those are novices. It follows that nobody should have to apologize for the fact that novices do not know all of C++. What you must do - in any language - is to pick a subset, get working writing code, and gradually learn more of the language, its libraries, and its tools."
-Bjarne Stroustrup from What is C++ So Big?"
"If a system is to serve the creative spirit, it must be entirely comprehensible to a single individual."
-Dan Ingalls from Design Principles Behind Smalltalk
Rock on dynamic brothers. Rock on!
Great Comeback
Doug Stewart sent me an exhcange between Andrew Tanenbaum and Linus Torvalds. What I love about it is Andrew sends a hateful email to Linus. The comeback that he returns is just classic. Here's Alan's email to Linus:
And here's Linus' answer (Please, put down the Coke can unless you want it on the monitor or up your nose):
The only thing I can say is "Touché Pussycat!"
" I still maintain the point that designing a monolithic kernel in 1991 is a fundamental error. Be thankful you are not my
student. You would not get a high grade for such a design :-)"
And here's Linus' answer (Please, put down the Coke can unless you want it on the monitor or up your nose):
" Your job is being a professor and researcher: That's one hell of a good excuse for some of the brain-damages of minix."
The only thing I can say is "Touché Pussycat!"
Wheel Of Fortune Programming
Memory used to be expensive, so developers thought of creative ways to get the most out of the least. One of the ingenius ways to save memory was to abbreviate variable names. What amazes me is that this school of thought has carried on even today. We no longer have memory constraints and in fact, source code is miniscule in comparison to everything else on your computer. Your code will be read more times than what it takes you to write it. More time will be spent understanding it. So, why raise the cognitive friction by playing "Wheel Of Fortune"? Vowels are not expensive. They are free! Remember that the next time you want to abbreviate variables that you are going to make someone do mental gymnastics just to grok something as simple as a variable name. Wouldn't you want them to comprehend the logic instead? Think about it. Where do you want the brain power to go to? Or maybe you like your fellow developers cursing your name at 3:00am when they're trying to fix your code. Have pity for the ones that will read your code. Make it read as closely to human language as you possibly can. It's just good style and polite.
Saturday, July 30, 2005
Dolphin Giveaway
Andy Bower had this to say on the comp.lang.smalltalk newgroup:
What are you waiting for? Go get your free Dolphin 5.1! Trust me, it's a lot of love!
Folks,
Bitwise, the new online programmer's magazine, is now giving away a free version of Dolphin Smalltalk Value Edition 5.1 with the August issue. For the last couple of months they have been running Smalltalk tutorials and the latest issue backs this up with one targeted specifically at Dolphin smalltalk to coincide with the software giveaway.
www.bitwisemag.com
I believe they may also be looking for further Smalltalk articles...
www.object-arts.com
What are you waiting for? Go get your free Dolphin 5.1! Trust me, it's a lot of love!
Thursday, July 28, 2005
Bruce Dickinson
One of my new personal heros is Bruce Dickinson, lead singer for Iron Maiden. I've been a huge fan of Maiden since I was in high school. I've always admired Dickinson for his accomplishments outside of heavy metal. He's an airline pilot, fencer, book writer, and probably whole bunch of other things. He seems to be constantly doing something. He's a healthy guy with a great attitude toward life. He gave a rant at Ozzfest on dope (now, this is coming from what I remember, warning: quotation might be a little off):
That took a lot of guts to say at a concert like Ozzfest. I feel exactly the same way. I have no time to be laid back. It endeared him to me. There's a not lot of musicians that will stand up and take a stance like that. But, if that wasn't enough, he says this in a recent interview:
Bravo. You go, Mr. Dickinson. I hope to one day meet him and talk about his view on life and politics. He sounds like an interesting cat. Rock on!
I smell dope. <crowd cheers> I hate dope. This music is about energy, not about being laid back. Dope is for f**king hippies. If you want to be laid back, go to a Dave Matthews concert!
That took a lot of guts to say at a concert like Ozzfest. I feel exactly the same way. I have no time to be laid back. It endeared him to me. There's a not lot of musicians that will stand up and take a stance like that. But, if that wasn't enough, he says this in a recent interview:
"I hate Walmart, and I hate the corporatization of everything in America. I despise it. People need to have their minds made up for them, at this moment, and they need to liberate themselves from that. It drives me nuts…"
Bravo. You go, Mr. Dickinson. I hope to one day meet him and talk about his view on life and politics. He sounds like an interesting cat. Rock on!
omaha.rb
It's time for the next meeting of the Omaha Ruby User's Group. The only planned topic is to be bring your favorite pieces of Ruby code or your curiousity. Hope to see a lot of people there! We've been having a small group and the intimate setting has worked well. Make sure you sign up on the mailing list. Here's the information of the when and where:
| When: | August 1, 2005, 7:00pm |
| Where: | Panera @ Eagle Run Shopping Center 13410 West Maple Road Omaha, NE 68164 |
Wednesday, July 27, 2005
What The Dormouse Said
I just finished this great book by John Markoff. It has lots of great background information on the rise of the personal computer. But, what makes this book different is that he doesn't spend a lot of time on Steven Jobs or Bill Gates. Most of the book deals with the social structures and political climate around the early days of computing. It talks about how the early computing pioneers mixed with radicals bent on changing the world for the better. I was shocked to learn how many experimented with LSD and there's even an interesting quote from Dan Ingalls, who was known to experiment a bit, when asked about the ideas in Smalltalk: "Well, where do you think these ideas come from?!" It was just fascinating to see how politics, culture, and computing all mixed together. I also found it shocking to know that Doug Engelbart considered himself a failure. Truly sad. Anyway, it's a great read and I can't thank Eliot Miranda enough for turning me on to it. It's a great history lesson. I also got the following great quote by Theodor Nelson:
Amen, brother!
"COMPUTER POWER TO THE PEOPLE! DOWN WITH CYBERCRUD!"
Amen, brother!
Things That Make You Smart
I started reading "Things That Make You Smart" by Donald Norman and one paragraph struck a chord with me:
Now, read this quote from James Gosling that I took from the introduction, by Richard Gabriel, to "Successful Lisp" by David Lamkins:
Contrast it with the following quote from Niall Ross during his keynote speech at Smalltalk Solutions:
We, Smalltalkers, Lispers, and dynamic language lovers everywhere, embrace the human in all of us and make the machine conform to us not the other way around. We understand that we err and we're not going to get it right upfront. But, Java and the static hounds think that we should blame the programmer for being human. Make the language easy for the computer and not the poor programmer. And right there, I think you have the split between the two camps. One is machine-centric (Java, C, C++, C#, etc) and the other is human-centric (Smalltalk, Lisp, Ruby, Self, Python, Io, Slate, etc). I know which one I pick. Sad thing is that we've had these human-centric languages since 1960 (or was it 1958?).
I can't wait to read the rest of the book!
When technology is not designed from a human-centered point of view, it doesn't reduce the incidence of human error nor minimize the impact when errors do occur. Yes, people do indeed err. Therefore the technology should be designed to take this well-known fact into account. Instead, the tendency is to blame the person who errs, even though the fault might lie with the technology, even though to err is indeed very human.
Now, read this quote from James Gosling that I took from the introduction, by Richard Gabriel, to "Successful Lisp" by David Lamkins:
Very dynamic languages like Lisp, TCL, and Smalltalk are often used for prototyping. One of the reasons for their success at this is that they are very robust...Another reason...is that they don't require you to pin down decisions early on. Java has exactly the opposite property, it forces you to make choices explicitly
Contrast it with the following quote from Niall Ross during his keynote speech at Smalltalk Solutions:
... back to language comparison: static-typing is the ultimate up-front optimisation
- C#, Java, etc.: designed by and for those who expect to be right first time
- Smalltalk: designed by and for those who don’t
We, Smalltalkers, Lispers, and dynamic language lovers everywhere, embrace the human in all of us and make the machine conform to us not the other way around. We understand that we err and we're not going to get it right upfront. But, Java and the static hounds think that we should blame the programmer for being human. Make the language easy for the computer and not the poor programmer. And right there, I think you have the split between the two camps. One is machine-centric (Java, C, C++, C#, etc) and the other is human-centric (Smalltalk, Lisp, Ruby, Self, Python, Io, Slate, etc). I know which one I pick. Sad thing is that we've had these human-centric languages since 1960 (or was it 1958?).
I can't wait to read the rest of the book!
It Can't Be Done
Lothar Scholz said the following when asked why he didn't write his IDE in all Ruby (from the Ruby mailing list):
Now, I like Ruby, but I sometimes wonder with statements like the one above if he has looked at Smalltalk. I know Ruby runs slower than Squeak. But is it really too slow to support an IDE? I don't think so. Smalltalk is a perfect example of writing an IDE entirely in itself and it's been that way for a long time. It was even written on hardware that is not nearly as powerful as we have now. I think the problem is not that it can't be done, but how can you make your abstractions and objects work harder and do less. So, I wonder what the FreeRIDE (which is an all Ruby IDE) folks have to say. FreeRIDE is still rough around the edges, but every release it looks better and better. I would like to mention that Lother's IDE is good as well. Ruby is so close to Smalltalk and I think they would certainly enjoy an IDE that they could change at run-time and enjoy the same freedom that Smalltalkers do. It would certainly make Ruby more fun to program in. And that's a good thing!
A script language is just not powerfull enough for this task (speed,
memory consumption and yes, speed) to do this.
For Ruby specific tasks i run simpler ruby scripts. And some parts are
written in Python but the core must be written in a static typed garbage
collected native compiled and imperative high level language. And
there he number of choices was very low in 2001.
Today i would choose a more cleaner D + Python system.
Ruby was never an option as it does not support native threads.
Now, I like Ruby, but I sometimes wonder with statements like the one above if he has looked at Smalltalk. I know Ruby runs slower than Squeak. But is it really too slow to support an IDE? I don't think so. Smalltalk is a perfect example of writing an IDE entirely in itself and it's been that way for a long time. It was even written on hardware that is not nearly as powerful as we have now. I think the problem is not that it can't be done, but how can you make your abstractions and objects work harder and do less. So, I wonder what the FreeRIDE (which is an all Ruby IDE) folks have to say. FreeRIDE is still rough around the edges, but every release it looks better and better. I would like to mention that Lother's IDE is good as well. Ruby is so close to Smalltalk and I think they would certainly enjoy an IDE that they could change at run-time and enjoy the same freedom that Smalltalkers do. It would certainly make Ruby more fun to program in. And that's a good thing!
Monday, July 25, 2005
Terse Languages
I ran across this post while going through links on planet.lisp. Is this some kind of joke? The reason I ask is the following:
Ouch. I want to be succinct and expressive. If I can't understand what I wrote yesterday, what good is it? Saving typing should not be the goal. I find I read more than type. The point should always be readable above all else. The striking thing is that I find both the Smalltalk and Lisp communities embrace this idea and put in on an altar. Oh well, I wish the best to this new language. I hope I never have to read it.
A major goal of this language is to have an incredibly terse syntax. It should be well-nigh unreadable: that is the point. After all, the human brain can adapt to anything, and if it can adapt to this, then the human hands might get a rest from all that typing. ;-)
Ouch. I want to be succinct and expressive. If I can't understand what I wrote yesterday, what good is it? Saving typing should not be the goal. I find I read more than type. The point should always be readable above all else. The striking thing is that I find both the Smalltalk and Lisp communities embrace this idea and put in on an altar. Oh well, I wish the best to this new language. I hope I never have to read it.
Sunday, July 24, 2005
JBoss Developer's Notebook
While I'm on the subject of Sam Griffith, he was kind enough to email me recently to tell me about how he had fulfilled his life-long dream of being published. His book is entitled The JBoss Developer's Notebook. Here's hoping that he sales a million copies. So, if you work in JBoss, you need to run out and buy 10 copies. Sam's a great guy and I'm proud of him for making his dreams come true with his first book. Let's hope he writes a lot more!
Making Money
My friend, Sam Griffith, sent me a great presention on "Making Money with Mac Software". It's a hoot to read and he hits the nail right on the head. It's big on putting down Windows and praising Mac, but at the core, there's a fair amount of great advice. I especially loved the slides on what to do if you wanted to work with him. Classic!
Thursday, July 21, 2005
Birthday
Today was my thirty-fourth birthday. All in all, it was a great day. My wife, Michelle, went way out. She did the whole house in streamers and notes. It was awesome. She got me two Lisp books, "Successful Lisp" and "Practical Lisp", that I had been wanting for the longest time. And would you believe, she even got me an ice cream cake complete with candles with colored flames! Now, how cool is that? We went out later, had a grand ole time at Buster and Douglas, and ate some Thai food. A simple relaxing day is all I wanted and that's what I got. But, I stil think being thirty-four sucks. I am no longer young. Youth is behind and creaky bones are ahead. Joy.
SmallHttpUnit Lives
I just fixed SmallHttpUnit for VW7.3. It's been broken for A LONG TIME. I apologize greatly for that. The source of the problem was the cookie handling. VW7.3 now has it built into the HttpClient framework. So, I just switched my code to the new framework instead of handling it myself. There's still some issues, like the cookies don't make it to the browser even though they are in the request. It's something that I'm going to look at later. It's available in the Cincom Public Repository. If anyone has any issues, please let me know. I promise I will fix them ASAP. For now, the fix will do until I finish Needle (a reworking of SmallHttpUnit). Now, it's on to finishing the initial port of Elephant to Squeak which is proving to be a challenge in itself. But, thankfully, Micheal is a patient person.
Wednesday, July 20, 2005
Ozzfest Rocked
The picture is of Micheal Ammott (Carnage, Carcass, Arch Enemy, Spirtual Beggars), Gus G (Firewind, Dream Evil, Nightrage, etc), and yours truly. As you can tell, Ozzfest was a blast. I got to see a lot of bands that I enjoy and it was great day hanging with my bud, Rusty. He shows me an incredible time while I was in the blue state of Connecticut. We saw two blues concerts, a car show, and he even took me to my old stomping grounds. Fun was had by all. All the bands put on incredible shows (especially Iron Maiden, Arch Enemy, Mastodon, and Shadow's Fall). I love seeing Ozzfest on the opening nights (the previous two years it was the first night. This year Hartford was second). The bands are fresh and ready to explode. Now, it's time for me to get back to my port of Elephant to Squeak, my new project Needle, and fixing SmallHttpUnit for VW 7.3. So much to do, so little time. Thank you, Rusty as always. I love you man!
Thursday, July 14, 2005
Ozzfest Cometh
I'm traveling this weekend to Hartford, CT to see Ozzfest. I can't wait. I'm going to be meeting up with dear friends. It should be a super fun weekend. My friend, Rusty, has my time all planned out. I'm ready to laugh till tears. I'm preparing to come back sore and worn out. When I get back, it'll be back to business. I've got a number of projects that I want to complete and I'll hit them hard once I get back. I've been working on some of them, but July has been hectic. But, this weekend is for ROCKING OUT! YEAH! I'm still in shock that I'm going to see the original Black Sabbath line-up for the third time. I thought I would never ever get to see them. Yes, dreams do come true.
Tuesday, July 12, 2005
Dolphin 6 Is Coming
From comp.lang.smalltalk.dolphin comes the news that Dolphin 6 is coming at the end of August. I am so excited! The screenshots and videos all look fantastic. I think Dolphin is a great Smalltalk environment. I would rank it as my favorite. The code is clean and is simply a joy to read. I can't wait to play with the new toys in 6. Happy Summer to me!
Monday, July 11, 2005
Omaha Smalltalk User's Group
Gary Overgard is planning on doing a report/code distribution on Small-Fit that he has been using at work. It provides a lite-weight alternative to the current approach for Fit & Fitnesse. Its advantage is that it is much easier to debug, but
still gives advantage of documentation.
As always bring your passion, code snippets, and books to discuss!
Here's all of the details:
Office is at 103rd & Pacific. Guests can park in the Northern visitors parking area back of building, or across the street at the mall. Enter in front door, we'll greet you at the door at 7:00pm. If you arrive a bit later, just tell the guard at the reception desk you're here for the Smalltalk user meeting in the 1st floor training room.
still gives advantage of documentation.
As always bring your passion, code snippets, and books to discuss!
Here's all of the details:
When: July 19, 2005, 7pm - 9pm
Where: Offices of Northern Natural Gas
1111 S 103rd Street
Omaha Nebraska 68154
Office is at 103rd & Pacific. Guests can park in the Northern visitors parking area back of building, or across the street at the mall. Enter in front door, we'll greet you at the door at 7:00pm. If you arrive a bit later, just tell the guard at the reception desk you're here for the Smalltalk user meeting in the 1st floor training room.
Sunday, July 10, 2005
Eclipse And Scheme
I just came across this project, Scheme Script. It basically is Scheme running on top of java. It's main strength is that it integrates well with the Eclipse environment. It allows you to inspect the running system and sits on top of the Eclipse frameworks. What a great idea. I think using something like Allen Davis'
Smalltalk In Java project would be an excellent way to do the same thing for Smalltalk. It would be fun to do. Plus, it would be great for adding tools and additions to Eclipse easily. My list of want-to-do projects just keeps growing and growing. Darn it! Too many cool things to do and not enough time!
Smalltalk In Java project would be an excellent way to do the same thing for Smalltalk. It would be fun to do. Plus, it would be great for adding tools and additions to Eclipse easily. My list of want-to-do projects just keeps growing and growing. Darn it! Too many cool things to do and not enough time!
iShuffle Operational!
I got my iShuffle, that I won at Smalltalk Solutions, up and running. I was annoyed when I installed the software for it. It installs iTunes and Quicktime (WHY?!). The iShuffle is nothing more than a memory stick, but requires iTunes to transfer music files. Now, my iRiver is setup the same way except I can use ANY software to transfer my music. iTunes was removing the iShuffle as a drive when it started (and it started everytime the iShuffle was plugged in). And why is QuickTime required to run iTunes?! The mind boggles. I played with iTunes for a little while and I just didn't like it. I'm very happy with Media Monkey and MP3 Gain for all of my ripping needs. I hated how iTunes rearranged my music files after I told it not to during setup. The view of songs as a list without hierarchy was also annoying. I have over 40 gigs of music files and to see it one list is like drinking water from a fire hose.
What's a programmer to do? Search the internet of course! A Google search shows that I am not alone. In fact, Martin Fiedler wrote a great tool in Python that allows you to write the necessary database files for the iShuffle to recognize any files you transfer to it. The code was so easy to understand that I rewrote it in Dolphin in an afternoon and added it to my mp3 management software. I was able to uninstall iTunes and QuickTime. I'm a happy boy and a proud owner of an iShuffle now.
The moral of the story is the internet is a powerful place. If you write proprietary messes, someone will figure how to get around it and publish it. iTunes on Windows would have been great if it had not tortured me so bad upon setup. I also hated all of the advertisements for iStore and other Apple products. RealAudio pulled the same stuff with their audio player years ago and I never have a desire to install that virus ever again. If Microsoft pulled the samething, you would have a million blogs on it and everyone up in arms. Why is Apple different? From my eyes, they are more proprietary than MS and they even have a strangle hold on their hardware as well. With that being said, I still want a Mac just to experience what everyone else raves about (Plying with Self wouldn't be all bad either). But, I'm not happy with Apple on my MS PC.
What's a programmer to do? Search the internet of course! A Google search shows that I am not alone. In fact, Martin Fiedler wrote a great tool in Python that allows you to write the necessary database files for the iShuffle to recognize any files you transfer to it. The code was so easy to understand that I rewrote it in Dolphin in an afternoon and added it to my mp3 management software. I was able to uninstall iTunes and QuickTime. I'm a happy boy and a proud owner of an iShuffle now.
The moral of the story is the internet is a powerful place. If you write proprietary messes, someone will figure how to get around it and publish it. iTunes on Windows would have been great if it had not tortured me so bad upon setup. I also hated all of the advertisements for iStore and other Apple products. RealAudio pulled the same stuff with their audio player years ago and I never have a desire to install that virus ever again. If Microsoft pulled the samething, you would have a million blogs on it and everyone up in arms. Why is Apple different? From my eyes, they are more proprietary than MS and they even have a strangle hold on their hardware as well. With that being said, I still want a Mac just to experience what everyone else raves about (Plying with Self wouldn't be all bad either). But, I'm not happy with Apple on my MS PC.
Saturday, July 09, 2005
Source code in files - how quaint
One aspect of Smalltalk that I love is the way source code is presented. I'm not shown a huge file, but a short concise method. It's source code in bite-size chunks. Contrast this with other environments and you have quite the opposite. Now, Eclipse does allow you to see source code at the method level, but it is not the normal mode of operation for java developers (in fact, most hate it or don't know you can do it).
It amazes me that so many developers still embrace editing huge text files. They find what they need with such generic, clunky tools as grep and vi. Smalltalk stores my code in objects, thus allowing me a richer set of search and edit capabilities. I have a meta-model that I can use to walk my code objects. It allows me a freedom of expression that files can not simply even compare. Files are a generic medium to which I can store anything, but do I want to directly manipulate my code with it? If you really think about it, Smalltalk's code objects are nothing more than a DSL for development. And while non-smalltalk developers are finally seeing the benefit of DSLs in business software, why not take their own medicine? Why wouldn't you want to deal with your source code on a higher level? Is it familiarity with their old ways and unwillinglyness to change?
With that being said, I love to research different languages and the thoughts that go into the design of them. It's rare (ok, almost NEVER) for a language to come with an interactive development environment that allows me to search and manipulate the source as objects. The scripting languages give me an interactive environment, but getting hold of the source of a running system is only available via files. YUCK. I learned this the hard way when trying to add unit test comments to Ruby. I thought all I had to do was to walk the classes of my objects and ask the methods for their source. Nope, I had to invoke a parser to get that information. Well, that's fine and dandy, but Ruby is dynamic and methods can change at run-time. The code in the file could be different than what is actually running. Contrast this to Smalltalk where I can even ask an arbitrary block what its source is! Of course, I hear the Lispers snickering in the back because their data is the source. But, emacs is still the status quo in lisp circles. Please.
Why all of this talk about source code in Smalltalk? Well, not having source in files, allows one to play around with how to display the source. If you have an object model around your code, you can choose alternatives of display. Squeak has a plethora of browsers (OmniBrowser, StarBrowser, and Whisker just to name a few) and VisualAge has the excellent TrailBlazer. Each one is different and shows the code in different ways, but none of them had to have a parser to do them because they are simply walking an object model! This makes common operations such as saving, refactoring, creation, and inspection to be handled uniformly. Now, you can do the same types of things from a file-based system, but it's much harder. All of the cutting-edge code browsers, that I have seen, have come from the Smalltalk community (I haven't played with Self yet). I think the reason is because of the ease of playing with a DSL for code than the generic low-level. It also allows us to write extensions more quickly if our tools do not support what we want. And the greatest benefit is to present the code in different ways. Powerful.
So, the next time you hear a Smalltalker fussing about source code in files, now you know why. By the way, the quote in the title above is from Kent Beck and is quite famous in Smalltalk circles. OK, I'll jump off my Smalltalk bandwagon today.
It amazes me that so many developers still embrace editing huge text files. They find what they need with such generic, clunky tools as grep and vi. Smalltalk stores my code in objects, thus allowing me a richer set of search and edit capabilities. I have a meta-model that I can use to walk my code objects. It allows me a freedom of expression that files can not simply even compare. Files are a generic medium to which I can store anything, but do I want to directly manipulate my code with it? If you really think about it, Smalltalk's code objects are nothing more than a DSL for development. And while non-smalltalk developers are finally seeing the benefit of DSLs in business software, why not take their own medicine? Why wouldn't you want to deal with your source code on a higher level? Is it familiarity with their old ways and unwillinglyness to change?
With that being said, I love to research different languages and the thoughts that go into the design of them. It's rare (ok, almost NEVER) for a language to come with an interactive development environment that allows me to search and manipulate the source as objects. The scripting languages give me an interactive environment, but getting hold of the source of a running system is only available via files. YUCK. I learned this the hard way when trying to add unit test comments to Ruby. I thought all I had to do was to walk the classes of my objects and ask the methods for their source. Nope, I had to invoke a parser to get that information. Well, that's fine and dandy, but Ruby is dynamic and methods can change at run-time. The code in the file could be different than what is actually running. Contrast this to Smalltalk where I can even ask an arbitrary block what its source is! Of course, I hear the Lispers snickering in the back because their data is the source. But, emacs is still the status quo in lisp circles. Please.
Why all of this talk about source code in Smalltalk? Well, not having source in files, allows one to play around with how to display the source. If you have an object model around your code, you can choose alternatives of display. Squeak has a plethora of browsers (OmniBrowser, StarBrowser, and Whisker just to name a few) and VisualAge has the excellent TrailBlazer. Each one is different and shows the code in different ways, but none of them had to have a parser to do them because they are simply walking an object model! This makes common operations such as saving, refactoring, creation, and inspection to be handled uniformly. Now, you can do the same types of things from a file-based system, but it's much harder. All of the cutting-edge code browsers, that I have seen, have come from the Smalltalk community (I haven't played with Self yet). I think the reason is because of the ease of playing with a DSL for code than the generic low-level. It also allows us to write extensions more quickly if our tools do not support what we want. And the greatest benefit is to present the code in different ways. Powerful.
So, the next time you hear a Smalltalker fussing about source code in files, now you know why. By the way, the quote in the title above is from Kent Beck and is quite famous in Smalltalk circles. OK, I'll jump off my Smalltalk bandwagon today.
Friday, July 08, 2005
Domain Specific Languages Parade
DSLs are all the rage recently with Martin Fowler and a whole bunch of folks blogging about them. It seems the Lispers are a little annoyed about the noise and rightfully so. They have proclaimed the virtues of DSLs for many years. In fact, Paul Graham's essays are littered with references to how DSLs solved his business problems. Smalltalkers have also long talked about the virtue of DSLs. So, why all of the rage? I think a lot of dynamic language ideas are finally seeing the light of day via the scripting crowd.
It's a good thing since I believe DSLs are a by-product of good design. You have a DSL when you speak in the terms of the domain in your code. This might seem obvious, but I see procedural-like code that stays at the level of the general-purpose language too much. I know I have magic in my designs when a business user can read my code and understand it. It's the goal that Eric Evans talks about in his excellent, "Domain Driven Design" book. He speaks of a ubitiquous language that is shared by business and technical folks on the project.
The good thing about the current parade is the number of good ideas that adds to my arsenal to attack a problem. Rainer Joswig had an excellent blog entry discussing how Lispers go about doing a DSL for RFC specifications. Where I would break down the problem in objects and messages, the Lispers take a different strategy with macros to achieve the same result. I would love to work on a Lisp project just to get into their minds.
Everytime an old idea comes back, there are some new twists. I find the current reprise of metadata usage in DSLs interesting. Again, metadata is nothing new, but the approach seems to be new to developers in the static camp. The model driven approach takes this route as well. But, MDA seems too much like CASE tools part two. Martin Fowler's article does an excellent job of showing the pros and cons of the DSL approach and its different paths.
I've been thinking about language issues since I had my talk with Colin and Eric. Both of them, gave me a plethora of thoughts to chew on. Making DSLs easier for developers seemed to be the meat of the discussion. How do we make it better? Can we make general purpose languages that are more tuned to DSLs? Much like we make the separation between virtual machine and our code. The boundary is distinct. I think a mixture of metadata and DSL facilities built-in to a language would be a win. It would be nice to express the domain in terms of a DSL and then use metadata to wire persistence, GUIs, and rules. In other words, the low-level programmer details would be handled at a metadata level (think Glorp and rule engines), but the domain expressed in terms of the business and only the business. Any dynamic language can provide this functionality easily, but is there anything we can do to make it even more transparent? I want to play more with prototypes ala Self because I think there is a richness to explore. DSLs feel like they would be easier in Self especially with dynamic delegation and traits. I believe that we should treat languages like organisms. We are all comprised of cells which are comprised of other parts and so forth. I think programs can be built the same way. You have a simple core in which higher level blocks are comprised of and then, bigger blocks are built out of those. When you get to the top, you see a complete being. It's a recursive russian doll basically. Each level would be higher DSL. Thus, the top level would be the business domain language. Think of it in terms of the virtual machine code. Do you ever see it or care when you are at the top level? No. You build your system out of the language on top. Same concept, but we need to take it to higher levels. This is a huge subject. I plan on blogging more in the future about this subject. I want to take Smalltalk to the next level. I'm tired of solving the same problems.
It's a good thing since I believe DSLs are a by-product of good design. You have a DSL when you speak in the terms of the domain in your code. This might seem obvious, but I see procedural-like code that stays at the level of the general-purpose language too much. I know I have magic in my designs when a business user can read my code and understand it. It's the goal that Eric Evans talks about in his excellent, "Domain Driven Design" book. He speaks of a ubitiquous language that is shared by business and technical folks on the project.
The good thing about the current parade is the number of good ideas that adds to my arsenal to attack a problem. Rainer Joswig had an excellent blog entry discussing how Lispers go about doing a DSL for RFC specifications. Where I would break down the problem in objects and messages, the Lispers take a different strategy with macros to achieve the same result. I would love to work on a Lisp project just to get into their minds.
Everytime an old idea comes back, there are some new twists. I find the current reprise of metadata usage in DSLs interesting. Again, metadata is nothing new, but the approach seems to be new to developers in the static camp. The model driven approach takes this route as well. But, MDA seems too much like CASE tools part two. Martin Fowler's article does an excellent job of showing the pros and cons of the DSL approach and its different paths.
I've been thinking about language issues since I had my talk with Colin and Eric. Both of them, gave me a plethora of thoughts to chew on. Making DSLs easier for developers seemed to be the meat of the discussion. How do we make it better? Can we make general purpose languages that are more tuned to DSLs? Much like we make the separation between virtual machine and our code. The boundary is distinct. I think a mixture of metadata and DSL facilities built-in to a language would be a win. It would be nice to express the domain in terms of a DSL and then use metadata to wire persistence, GUIs, and rules. In other words, the low-level programmer details would be handled at a metadata level (think Glorp and rule engines), but the domain expressed in terms of the business and only the business. Any dynamic language can provide this functionality easily, but is there anything we can do to make it even more transparent? I want to play more with prototypes ala Self because I think there is a richness to explore. DSLs feel like they would be easier in Self especially with dynamic delegation and traits. I believe that we should treat languages like organisms. We are all comprised of cells which are comprised of other parts and so forth. I think programs can be built the same way. You have a simple core in which higher level blocks are comprised of and then, bigger blocks are built out of those. When you get to the top, you see a complete being. It's a recursive russian doll basically. Each level would be higher DSL. Thus, the top level would be the business domain language. Think of it in terms of the virtual machine code. Do you ever see it or care when you are at the top level? No. You build your system out of the language on top. Same concept, but we need to take it to higher levels. This is a huge subject. I plan on blogging more in the future about this subject. I want to take Smalltalk to the next level. I'm tired of solving the same problems.
Monday, July 04, 2005
Ouch
With all of the commotion, I missed the Ruby User's Group meeting. Darn it! I'll be there next month and I can't wait to see everyone there! Again, sorry!
Back In Civilization
I got back from camping trip today and it was mad fun! It was a turn of events from totally geeking out one minute to being in the middle of nowhere. It was strong contrast, but a relaxing one. I enjoyed being outside and letting my mind wonder. I had a lot to chew on from all of the discussions that I had with everyone. Now, I can't wait to start putting those ideas to work. I have my rallying call and I'm ready to kick some programming booty! Smalltalk on!
Thursday, June 30, 2005
No More Caffeine For Me
I went on a search today after Eliot Miranda told a hilarious story about the goverment giving various drugs to spiders and observing the results. I found several pictures of the webs and it was shocked. The LSD web is the most articulate while the caffeine web is a mess. The study sounded funny, but I must admit that the results are revealing. I know I don't want to ingest anymore caffeine now. And it gives me excuse for the coding competition: I was drinking too much coffee. Yeah, yeah, yeah, that's the ticket.
Back Home
I made it back home today all in one piece of mind from Smalltalk Solutions. This was the first one that I have attended and it will not be my last. It was great meeting all of the people that I admire. It was sad to come back home because I will miss the late night conversations and the dreams of future that could be. I'm more invigorated to get my act together. I want to present something cool next year no matter what. I'm thinking HttpUnit, with some of the extensions that I discussed with Colin Putney and David Schaefer, might be it. But, I have other ideas that I've had and one is from my ill-fated uce case management tool. All I can say is Niall Ross' speech was a call to arms for me. I've even batted around the idea of doing a practical Smalltalk book much like Peter Siebel's Lisp one. I don't know yet, we'll see how everything works out. But, we need to get the word out. I'll also be colloborating with a few new people and that should be exciting. Being at STS also made me want to participate in the community more so that I could get more accomplished at my time there. So, everyone in the IRC, #smalltalk channel watch out! This was just my introduction. I'm ready to blow the roof off the mother! Again, I had a blast with everyone I talked to and I truly appreciate the time that you gave me. I know I took in a sizeable amount of information to parse. You all rock and I love the Smalltalk community. YAKS UNITE!
Wednesday, June 29, 2005
3rd Best
I got 3rd place in the coding competition and it was an embarassing 3rd place. The reason for my embarassment was because my program never ran. It was steeping in bugs! The problem with just 4 hours is that I didn't have enough time to debug everything. Oh well, I just wish the program would have ran and lost fair and square. I figured my algorithm would have lost anyway after watching Kevin's and Micheal's excellent programs run. It was an honor to compete with such great programmers. And being in the top 3 isn't a bad place to be. I entered to get to Smalltalk Solutions and well, it's been everything that I imagined. I've made a ton of new friends and I have a plethora of new ideas running around in my head. Expect a lot of blogs entries once I complete the thoughts. I'm running on spare batteries right now and I can't wait to get home. Yet, a piece of me doesn't want to leave.
Young Ass Kicking Smalltalkers
It's 2am and it fits my attitude. We are the future knights! Who's with me? Let's take it to the next level! ROCK! Seriously, I had a great day at Smalltalk Solutions. Not one bad conversation and I think I wore everyone out talking technical stuff. My mind seriously hurts. Lots of food for thought and mad fun! I would like to thank everyone for putting up with me. I can't express how much joy the talks, discussions, and debates have meant. It's been unbelievable for me to meet so many that I respect and admire. I've made a lot of friendships while here and I'm going to be sad when it ends tomorrow. Well, maybe not if I win the coding contest...But, Micheal might have something to say about that...=)
Monday, June 27, 2005
Compiling Away Does Not Understand
I was talking to Micheal Lucas-Smith, while we were at the Magic Kingdom, and I were talking about our designs in the contest. I mentioned that my study of prototypical languages had warped my design. He asked how that was and I told him that my survey response objects forwarded their calls to their corresponding questions if they didn't understand them. For example, a message send of #name to the response would forward the call to its question object. These messages have the form:
Now, I'm a lazy developer. I didn't want to write these messages everytime I add some new messages to question that I want my response to asnwer. So, what do I do? I could implement #doesNotUnderstand so that it forwards the message, but I didn't want to do that because:
So, what do you do? Well, in Smalltalk, I can have the #doesNotUnderstand: message basically compile a new method for me because it's always of the form listed above. This gives me the performance and it's easy to debug. If you put these special methods in their own category then you can easily track them. Tracking them is good to catch subtle forwarding bugs. Here's what the #doesNotUnderstand: message looks like:
And here's what the compile code looks like:
And that's it! This allows me to have a form of delegation by forwarding messages to certain objects. Other objects now do not have to grab an object just to perform actions on it. This makes your objects more shy which is a good thing. Micheal liked the idea and asked me why I had not blogged about it. I told him I didn't think much about it. It's just so simple. He told me that I should blog about it. Well, here it is...=)
name
^self question name
Now, I'm a lazy developer. I didn't want to write these messages everytime I add some new messages to question that I want my response to asnwer. So, what do I do? I could implement #doesNotUnderstand so that it forwards the message, but I didn't want to do that because:
- It's hard to debug
- It's S-S-L-L-O-O-W-W
- Confusing
So, what do you do? Well, in Smalltalk, I can have the #doesNotUnderstand: message basically compile a new method for me because it's always of the form listed above. This gives me the performance and it's easy to debug. If you put these special methods in their own category then you can easily track them. Tracking them is good to catch subtle forwarding bugs. Here's what the #doesNotUnderstand: message looks like:
doesNotUnderstand: aMessage
(self definition respondsTo: aMessage selector)
ifTrue:
[self compile: aMessage selector forwarder: #definition.
^aMessage sendTo: self].
^super doesNotUnderstand: aMessage
And here's what the compile code looks like:
compile: selector forwarder: forwarderSelector
| messageStream header |
messageStream := String new writeStream.
header := (self perform: forwarderSelector) class methodHeaderFor: selector.
messageStream
nextPutAll: header;
cr; tab;
nextPutAll: '^self ';
nextPutAll: forwarderSelector;
nextPut: Character space;
nextPutAll: header.
self class compile: messageStream contents classified: self class autoGeneratedCategory
And that's it! This allows me to have a form of delegation by forwarding messages to certain objects. Other objects now do not have to grab an object just to perform actions on it. This makes your objects more shy which is a good thing. Micheal liked the idea and asked me why I had not blogged about it. I told him I didn't think much about it. It's just so simple. He told me that I should blog about it. Well, here it is...=)
Coding Competition
The finals for the Smalltalk coding competition were held yesterday. First off, it was mad fun. Alan Knight came up with a really hard problem that seemed simple. It was a bar game involving change (pennies, nickles, etc). What we had to do was write code to connect to a game server playing this game and interact with it. You can guess that the next objective was to create a computer player. No problem right? Nope, I ran out of time! I'm not even sure my player is going to work! If it does, he will be an utter and complete idiot. Four hours is not a lot of time and I wasted a good bit of time on the server code. The reason for that is because the inner coder in me likes writing understandable code and four hours is not enough for understandable code. The time constraints force you to know your tool and not to teeter on any one solution. Just pick one and GO! I simply lost track of time which is a major no-no in coding competitions. But, I'm not disappointed in my dismal performance. I got a chance to chat with Micheal Lucas-Smith yesterday at Disney World and it was great meeting Kevin Badinger at the competition. Great Smalltalkers period. If I have to lose, I know it will be because my opponents' code fu was stronger. We will be placing the players in competition with one another on Wednesday to determine the winner. I don't have high hopes. I'll be over joyed if mine works! Finally, I would like to thank everyone involved in the competition. I had a lot of fun. I can not express that enough. I'm so thankful for the opportunity.
Sunday, June 26, 2005
Embarassed
I haven't looked at my contest submission until today. I was playing with the application and ran into an error! I couldn't believe my eyes! I thought I had tested it thoroughly! But, nope, there was the BlockContext>>doesNotUnderstand: #asMIMEDocument staring at me. How could I be so dumb? Well, the fix was trivial. I had my presentation loaded up when I coded the contest and I had this little ditty:
It allows me to use a block as a MIMEDocument so if my document renders itself immediately, I can delay it. I mistakeningly thought it was part of Seaside and not my own code! DOH! Anyway, the fix was easy. The documents are use for it render themselves on the fly and don't need to be wrapped in a block.
But, still this is an important lesson. AUTOMATE YOUR GUI TESTS! So, I'm going to do the two-pronged approach. Port the HttpUnitTest framework to Squeak and use it! Also, I need to download David Schaefer's excellent Seaside testing framework. Both would be a nice one-two punch. Well, I'm off to breakfast and a day of thrill rides.
BlockContext>>asMIMEDocument^self value asMIMEDocument
It allows me to use a block as a MIMEDocument so if my document renders itself immediately, I can delay it. I mistakeningly thought it was part of Seaside and not my own code! DOH! Anyway, the fix was easy. The documents are use for it render themselves on the fly and don't need to be wrapped in a block.
But, still this is an important lesson. AUTOMATE YOUR GUI TESTS! So, I'm going to do the two-pronged approach. Port the HttpUnitTest framework to Squeak and use it! Also, I need to download David Schaefer's excellent Seaside testing framework. Both would be a nice one-two punch. Well, I'm off to breakfast and a day of thrill rides.
Saturday, June 25, 2005
Made It
I'm here at Smalltalk Solutions. Tomorrow we're going off to the theme parks. It'll be great to chat with everyone. Travel was alright. The only problems were getting to the hotel and a slight mechanical problem with the plane. So, nothing to sweat over. Laptop is doing great and let's hope it survives through tomorrow night's competition!
Sunday, June 19, 2005
Laptop Woos
The saga continues...It seems HP DID NOT FIX MY DEFECTIVE HARD DRIVE. Sorry, for yelling, but I've been through hell with their tech support. So, what am I to do? I went down to Best Buy tonight and they will install a new hard drive in the same day. I'm not going back to HP tech support ever again. In fact, I'm so mad at that company right now that it will take a few years to get my business back if ever. In all honesty, there is not much that they can do to get this customer back. I'm never buying the stupid tax called extended warranty ever again as well. I'll just leave some money in the bank for that purpose. Hopefully, the saga will be over by tomorrow night since Best Buy said that they could have it done in one day. Let's see if they can actually hold up to their promises. And all of this before Smalltalk Solutions! I should thank my lucky stars that it failed again today while Squeaking and not Orlando.
Excited about Smalltalk Solutions
I haven't been blogging much lately. Lots of stuff has been going on, but I thought I'd mention how excited I am about going to Smalltalk Solutions this year. I can't wait to meet my peers in the competition. I'm hoping to make some new friends! And we all can do with more of those right? I'm also excited at the list of presenters. It would be cool to spend an evening picking the brains of some of these guys. I just finished Eric Evans' book, "Domain-Driven Design" and it was a great read. And of course, Niall Ross will be cool to increase my meta-fu! And the list goes on and on! It will be nice to meet up with old friends and find new ones. Also, I hope there's a lot of action at Camp Smalltalk! So, everyone look out! I'm bringing the energy...=) Email me if you want to get together! SMALLTALK ON!
Tuesday, June 14, 2005
Omaha Smalltalk User's Group
OK, this month's meeting is real special. We're teaming up with the SPIN group to present a really cool presentation! Here's the details:
A special thanks to Alan Wostenberg for setting this up!
This month we have a real treat. Mike Cohn, a Denver Scrum expert,
will introduce us to Agile Estimating and Planning.
We'll look at why traditional planning fails,
how to overcome those problems with a story-driven process,
how to estimate and plan with stories,
and why agile planning works.
We'll round out the evening with an interactive estimating
exercise over pizza that will give you
specific techniques to apply in your own work.
About Mike Cohn. Mike founded Mountain Goat Software{1} in 1993 to
help organizations apply agile development methods to difficult
software problems.
Mike is certified in Scrum{2} and author of User Stories Applied
and the forthcoming Agile Estimating and Planning (Fall, 2005)
Venue:
7pm next Tuesday June 21 2005,
Northern Natural
Gas, 1111 S 103rd Street, Omaha,
Room 149
Join us! If you plan to attend, visit www.omahaspin.org and register.
{1} www.mountaingoatsoftware.com
{2} www.controlchaos.com
A special thanks to Alan Wostenberg for setting this up!
Saturday, June 11, 2005
Laptop's Back
I got my laptop back yesterday and it's almost back to operational status. I'm glad it's back fixed. But, I must admit the whole experience with HP support has left me cold. They almost refused to service my laptop because of a scratch on the outer shell and the hard drive had gone bad which was the real problem. I spent extra money on their three year three day fast fix warranty and they had the laptop for over two weeks. It took several phone calls before they agreed that they were being silly and they just needed to replace the bad hard drive. Grrrrr...So, the laptop comes back and they note they haven't fixed anything, BUT THEY HAD. It's enough to make you go to the funny farm. I can't believe how poorly I was treated. I'm a pretty tolerant person. And, to me an extended warranty is insurance for anything going wrong through normal wear and tear. I baby my laptop and was shocked how quickly they wanted to snake out of their obligations. I'm simply glad I got my laptop back in one piece and fixed. I spent nearly 8 hours on the phone over the course of the ordeal. So, what did I learn? Think twice before I buy anything from HP again and never buy another extended warranty. Trust me you are throwing your money away. What's the point of insurance if the company doesn't honor their end of the agreement? It just means you're giving them more money and getting nothing in return. Alright, time to SMALLTALK and create some love in this world!
Monday, June 06, 2005
Missing my Laptop
I've been without my laptop for the best part of a week now and I'm starting to miss it. I've set up linux on one of my old machines in the meantime. So, it's not all bad and I've been catching up on a lot of reading in the meantime. I plan on blogging on my ordeal with HP once everything is done. Somne of it was really silly. But, it's getting fixed now (the hard drive went out) and I should have it before the weekend. This is after several phone calls and almost in tears. Besides, I'm anxious to start playing around with prototype languages since I think I now understand it more now than I did before. I thought I might implement one in LISP just for fun. Who knows? Let's hope my laptop comes soon!
Sunday, June 05, 2005
Prototype Eureka
I've been reading a ton of articles on prototype-based programming. I even bought Prototype-Based Programming: Concepts, Languages and Applications which is an excellent introduction to the subject. So, I was thinking prototypes are a great idea, but I had some reservations since I have been so long in the class-based camp and prototypes are radical. I had basic questions of like how do I organize my programs now? Well, I found "Organizing Programs Without Classes". What an amazing read. It answered all of my questions and gave me my first "Eureka!" moment in prototype-based programming. It all feels so liberating! I can't wait to get my laptop back and continuing my studies of Self and Io!
Omaha Ruby User's Group
It's time to hold the second meeting of the Omaha Ruby User's Group. This meeting is just a simple get together like the last one. The only planned topic is to be bring your favorite pieces of Ruby code or your curiousity. Hope to see a lot of people there! Make sure you sign up on the mailing list. Here's the information of the when and where:
| When: | June 6, 2005 |
| Where: | Panera @ Eagle Run Shopping Center 13410 West Maple Road Omaha, NE 68164 |
Thursday, June 02, 2005
Ain't I Cool?
I'm sorry but I need to toot my own horn. Look at this:
How COOL is that?! I can't believe that I'm in the top 3! I am so excited! I can't wait to meet the fellows in the top 3 with me. It'll be great to sit and chat with them! This is great news since my laptop has been sick this week and that's why it's been slow on the blogging part. I can't wait to get out there and mingle with my Smalltalk brothers and sisters! This is going to be so much FUN! I can't wait to compete! See everyone June 26! SMALLTALK ON! Oh, I almost forgot I would like to thank everyone for putting on this contest! It was MAD FUN!
The Smalltalk Industry Council is happy to announce the winner of the first portion of the 2005 Smalltalk Solutions Coding Contest. Congratulations on a fantastic job. The winners in no particular order are:
- Blaine Buxton
- Michael Lucas-Smith Sorry for the misspelling before!
- Andrei N.Sobchuck
How COOL is that?! I can't believe that I'm in the top 3! I am so excited! I can't wait to meet the fellows in the top 3 with me. It'll be great to sit and chat with them! This is great news since my laptop has been sick this week and that's why it's been slow on the blogging part. I can't wait to get out there and mingle with my Smalltalk brothers and sisters! This is going to be so much FUN! I can't wait to compete! See everyone June 26! SMALLTALK ON! Oh, I almost forgot I would like to thank everyone for putting on this contest! It was MAD FUN!
Thursday, May 26, 2005
Morphic Thesaurus
I've been dabbling with morphic lately and this is the result. It was a fun learning experience. I love using a thesaurus as I've mentioned before here and I wrote a little utility to look up words in one. I can see myself writing a lot more utilties in morphic for myself. This wa only the first. So, if you have Squeak, it's on SqueakMap under the title, Thesaurus. Now, I have my beloved thesaurus built into my Squeak image. ROCK! Now, I need to implement it in Eclipse. But, I have a few other projects that need to be taken care of...=)
Tuesday, May 24, 2005
Shock And Awe Squeaking In Omaha
All I can say about Steve Wessels's demo on Squeak tonight is "Wow". A tour de force of what you can do in Squeak. I got to see a lot of it before he gave it and I helped a little bit (Steve did all of the work). I think we all decided that after 4 hours of intense Squeak presenting (remember this carried over from the last meeting) that we now need to give more in-depth presentations on various parts that Steve presented. So, it looks like we have a lot to discuss this summer! SQUEAK ON!
Thursday, May 19, 2005
Mad Fun
I'm glad I posted my submission to the coding contest. Micheal-Lucas Smith posted his as well and I had a lot of fun reading the code and looking at the web application. Man, I would hate to be a judge! He did such a fantastic job. I didn't think about using Prevayler, but I wish I had. It's simply awesome what he did! If anyone doubts what you accomplish with Smalltalk, look no further. It will be exciting to see what other people did as well.
Smalltalk Coding Contest Submission
I thought it would be nice to make my Smalltalk coding contest submission available. Just download the zip file and extract it. Simply run the Squeak image and follow the instructions in the workspaces. Now, the code is still rough (make that extremely rough). I'm a little embarassed by some parts of it. But, I am a perfectionist and a firm believer in elegant code. There's a lot of things in Seaside that I didn't use, but should have that would have made my life a lot easier and cleaned up a good bit of the code. The domain is rough as well. There's a great deal of work that I would love to do to it both design and code wise. I've had many thoughts on the subject since yesterday. But, it was 48 hours to complete and I'm happy that I exercised all of the domain with unit and acceptance tests. I also realized that I need to fix SmallHttpUnitTest for VW7.3 and port it over to Squeak as well. But, I digress, I thought making my submission available would be fun for people to see. I thought it would be great to write an article about it and using Seaside. Right now, the code is a barely acceptable form of using Seaside. But, it would be great to write an article on refactoring it to use all of the cool fixtures that are available. We'll see. Anyway, enjoy! If anyone has any thoughts, feel free to drop me a line! Oh and one more thing, I wrote the workspaces in the image at 6am on pure adrenaline alone! And it all needs to be heavily refactored. I was trying to see how much functionality I could provide in 48 hours and minimal sleep.
Wednesday, May 18, 2005
Smalltalk Contest
I participated in the Smalltalk Coding Contest. It was mad fun! I had a blast doing it. Huge thanks goes to Jason Jones and everyone involved in getting this off the ground! Hats off! I would like to thank all of the developers that I built my on top off. I truly stood on the shoulders of giants to get the task done. It was great coding in Squeak and seeing how much I could accomplish in a short period of time. I plan on doing a presentation on it. The task was to write a survey taking tool that allowed you to view the results. I'll probably post my code later. It's still a mess, but what do you expect in 48 hours? Oh, and have I mentioned how much I love Seaside lately? If not, I'm saying it now! Now, I'm keeping my fingers crossed. I hope I'm a finalist!
Resumable Exceptions
Time for another "this is why Smalltalk is cool" post, but this one also holds true for Ruby And Lisp as well. So, it's a "why Smalltalk, Ruby, and Lisp kicks mucho booty" so to speak. OK, enough of the back patting and let's get down to business. Today's topic is resumable exceptions. It has a nice geeky ring to it doesn't it? The first thing you might ask yourself is, "Why in the world would I want to resume an exception? It's an exception! Dead programs tell no tales!" True, true. Normally, you want an exception to send your program down in flames because you had a mechanical glitch that you didn't expect. Better stop everything before the propeller goes slashing through your data unkindly! But, what if we had exceptions that were good that could notify us of potential bad things or even enumerate potential bad things? Well, we do and we can! Smalltalk has a different take on exception handling. Much like a nuclear reaction in a controlled environment gives you energy, and mass destruction otherwise, Smalltalk allows us finer control over exceptions and what we can do with them like resuming. This is a powerful idea and it allows us to do unheard of feats in other languages especially when it comes to things like validation. For example, say we had the following code:
Pretty simple, right? Well, what if our form is very complicated and it's validation method looked like this:
Pretty straight forward and under normal circumstances, our validation code will always signal on the first occurance it finds. Well, for the user it will get tiresome because it only points out each exception one at a time. The user will start to feel like Curly from The Three Stooges. And we don't want hairless users running around do we? Now, what if we could resume and just tabulate the validation exceptions and show them at once? No code changes in the form validation code, just in our handling of it. Well, we can do just that! Here's the new code:
I left out some of the variable declarations to ease the readibility, but you get the gest of it. We now can resume on each occurance of the validation exception! Very cool! But, it doesn't stop there. We can return values from exception signals via resumes and this allows things like dynamic scope variables. Enjoy. Ruby's exceptions are resumable too. So, what are you waiting for? Go play!
[self form validate]
on: ValidationException
do: [:exception | ^self informUser: 'Validation Failed: ', ex messageText].
self form save.
Pretty simple, right? Well, what if our form is very complicated and it's validation method looked like this:
validate
self name size > 25 ifTrue: [ValidationException signal: 'Name size > 25'].
(self email contains: $@) ifFalse: [ValidationException signal: 'Invalid Email'].
Pretty straight forward and under normal circumstances, our validation code will always signal on the first occurance it finds. Well, for the user it will get tiresome because it only points out each exception one at a time. The user will start to feel like Curly from The Three Stooges. And we don't want hairless users running around do we? Now, what if we could resume and just tabulate the validation exceptions and show them at once? No code changes in the form validation code, just in our handling of it. Well, we can do just that! Here's the new code:
[self form validate]
on: ValidationException
do:
[:exception |
validationMessages add: exception messageText.
exception resume].
validationMessages isEmpty ifFalse: [^self informUser: 'Validation Exceptions' messages: validationMessages].
self form save.
I left out some of the variable declarations to ease the readibility, but you get the gest of it. We now can resume on each occurance of the validation exception! Very cool! But, it doesn't stop there. We can return values from exception signals via resumes and this allows things like dynamic scope variables. Enjoy. Ruby's exceptions are resumable too. So, what are you waiting for? Go play!
Saturday, May 14, 2005
Jealous: Dolphin 6 Beta
Apparently, Dolhpin 6 Beta is out. I'm jealous that I wasn't picked to be one of the beta testers! DARN IT! I guess I have to wait with the rest of the good folk to wait to see what they have cooked up for us. It looks simply wonderful thus far. I have always maintained that Dolphin is the cleanest of all the Smalltalks. It's elegant and beautiful. A simple joy to program in. I simply wish that I would have been one of the choosen few. DARN IT! Oh well, I guess I can wait another few months for greatness...=) I can guarantee it will be worth the wait for all of us! Are there any beta testers that I can bribe for a peak? Kidding, of course...=)
Wednesday, May 11, 2005
Io
I finally got around to taking a serious look at Steve Dekorte's Io language. I subscribe to his blog and it's always a great read. I finally got around to looking at Io since my interest in prototype-based languages is peaking again. It's a wonderful language and from the 10,000 foot view has everything that will be fun to explore. It's inspired by Smalltalk (everything is an object, right on), but has a lot of cool Lispisms (Access to the parse tree...could it possibly do Lisp macros? Yummy! I've been thinking of using code generation and meta-programming together and this looks perfect!). Oh, and did I mention that it's also been inspired by a host of other cool languages like Self and NewtonScript? The syntax is nice and simple. It's been downloaded and I'm ready to learn my language of year! I want to fully explore the prototype-based OO paradigm because I find myself drawn to it because of it's simplicity and it just feels beautiful to me. I'll be blogging more of my thoughts soon...
Metal Church Memories
I listened to the first two Metal Church albums today and they brought back a lot of memories. Most of them are them are from good programming times and my parents freaking out over the lyrics. I remember one time was getting into programming and my father overheard me singing the lyrics to one of their songs. He started to worry when I sang "We kill tonight" from the computer room. I remember my mother sitting me down to tell me my father was worried about me. At least, they were understanding. Man, it's weird when your heroes start dying. I only knew David from his music, but heavy metal music was very important to me when I was growing up. It holds a special place in my heart along with the musicians that create it. They gave me hope and inspiration to keep fighting the good fight. I know it sounds corny and weird, but it's true. Thanks for all of the great memories dude, RIP.
Omaha Smalltalk User's Group Part 2
I am proud to announce an emergency second meeting this month for the OSTUG! Steve's presentation went over so well that we're creating a special meeting just to hold part 2! We didn't get to the Croquet demo because Steve had so much cool stuff to show (Don't worry we're going to get to it). Part 2 promises to be even more exciting. So, if you want to see the future of computing or just do something cool, come see what Squeak can do for you! Steve gives a great presentation that will have you pumped to write Squeak code. Here's the details:
Here's all of the details:
Office is at 103rd & Pacific. Guests can park in the Northern visitors parking area back of building, or across the street at the mall. Enter in front door, we'll greet you at the door at 7:00pm. If you arrive a bit later, just tell the guard at the reception desk you're here for the Smalltalk user meeting in the 1st floor training room.
Here's all of the details:
When: May 24, 2005, 7pm - 9pm
Where: Offices of Northern Natural Gas
1111 S 103rd Street
Omaha Nebraska 68154
Office is at 103rd & Pacific. Guests can park in the Northern visitors parking area back of building, or across the street at the mall. Enter in front door, we'll greet you at the door at 7:00pm. If you arrive a bit later, just tell the guard at the reception desk you're here for the Smalltalk user meeting in the 1st floor training room.
David Wayne Dead At 47
David Wayne, original singer for Metal Church, has died at 47 from complications from an automobile accident. Wow, I am in shock. Two of my favorite albums as a teenager were Metal Church's debut and "The Dark". David Wayne sang on both of those albums. I loved his voice. I'm telling you that on the other side there is one hell of a band playing. RIP, David and thanks for all of the wonderful music.
Monday, May 09, 2005
The Art Of Thinking
I just finished reading "The Art of Thinking" by Harrison and Bramson. It's a wonderful little book which despite it's title is more about understanding yours and everyone else's thinking styles. It's an easy and enjoyable read. There's a test in the back and here's how I scored:
Basically, I'm pretty even across the board with a slight preference for Analyst and Realist styles and I am weak in the Synthesist style. Now, this doesn't mean anything bad, it's just a getting to know yourself exercise. All of the thinking styles have strengths and liabilities. It has a lot of practical advice on how to figure out what thinking style someone is and how best to influence them to get your ideas heard. It was also helpful for me to know when I tune someone out to why. It gave me a lot of homework and things to try out. Nothing is better than self improvement. It should be mandatory reading for every shop that pair programs.
| Thinking Style | Score | Meaning |
| Synthesist | 47 | Moderate Disregard |
| Idealist | 53 | Moderate |
| Pragmatist | 50 | Moderate |
| Analyst | 61 | Moderate Preference |
| Realist | 59 | Moderate |
Basically, I'm pretty even across the board with a slight preference for Analyst and Realist styles and I am weak in the Synthesist style. Now, this doesn't mean anything bad, it's just a getting to know yourself exercise. All of the thinking styles have strengths and liabilities. It has a lot of practical advice on how to figure out what thinking style someone is and how best to influence them to get your ideas heard. It was also helpful for me to know when I tune someone out to why. It gave me a lot of homework and things to try out. Nothing is better than self improvement. It should be mandatory reading for every shop that pair programs.
Omaha Smalltalk User's Group
This month, Steve Wessels and Blaine Buxton will be talking about Squeak and Croquet. Basically, if you've never done anything with Squeak, now is the time to learn. Steve has an unforgettable presentation on the abilities of Squeak. We will demonstrate Croquet and give a more detailed presentation on it next month. As always, bring snippits of cool code and we'll continute discussing Seaside, rules, and FIT project.
Here's all of the details:
Office is at 103rd & Pacific. Guests can park in the Northern visitors parking area back of building, or across the street at the mall. Enter in front door, we'll greet you at the door at 7:00pm. If you arrive a bit later, just tell the guard at the reception desk you're here for the Smalltalk user meeting in the 1st floor training room.
Here's all of the details:
When: May 10, 2005, 7pm - 9pm
Where: Offices of Northern Natural Gas
1111 S 103rd Street
Omaha Nebraska 68154
Office is at 103rd & Pacific. Guests can park in the Northern visitors parking area back of building, or across the street at the mall. Enter in front door, we'll greet you at the door at 7:00pm. If you arrive a bit later, just tell the guard at the reception desk you're here for the Smalltalk user meeting in the 1st floor training room.
Wednesday, April 27, 2005
Think Dynamic
I overheard this on the ruby-talk mailing list from Lothar Scholz:
This is in response to the popular "but, dynamic languages can't have auto-completion" baloney argument. First off, Squeak and VisualWorks both have auto-completion that works very well. I do tend to use it, but not very often. I certainly don't use it as much as I do when I am programming in java. Dynamic languages don't require as much cognitive friction and things just seem to flow. Auto-completion just isn't an issue. I simply loved Lother's response because it typifies the thought divide between dynamic and static language users. We "think different" because our tools allow us to create in more grandiose ways and allows access to better abstractions.
We are using a different type of language but too many people still
think in static terms. A completition popup can't look the same as in
java/C++ and the data gathering phase can't work with static source
code analysis alone. I'm not a mac guru, but follow apple and
"Think different"
This is in response to the popular "but, dynamic languages can't have auto-completion" baloney argument. First off, Squeak and VisualWorks both have auto-completion that works very well. I do tend to use it, but not very often. I certainly don't use it as much as I do when I am programming in java. Dynamic languages don't require as much cognitive friction and things just seem to flow. Auto-completion just isn't an issue. I simply loved Lother's response because it typifies the thought divide between dynamic and static language users. We "think different" because our tools allow us to create in more grandiose ways and allows access to better abstractions.
Programming and Craftsmanship
I've been enjoying reading Ora Lassila's Blog lately. I particularly enjoyed his entry on Programming as a craft. I agree with his sentiment 150% (OK, talking about framing his source code was a little much for me, I've never written code that I was THAT proud of...There's always room for improvement IMHO). It seems all too often that people think that programming computers could be done by anybody. It's true you can take anybody off the street and teach them to program, but can you make them great? I don't think so without a lot of training and passion from the trainee. The same passion that drives a great artist must be the same passion for a programmer. It's what separates the average from the good from the great. Peter Norvig has an excellent essay entitled "Teach Yourself Programming in 10 Years" which takes the position that to be great at something you must have passion and the will to practice to become better. In the paper, he argues that programming is a craft that needs to be practice to be mastered. If you would like to read a great book on the subject, read Software Craftsmanship by Pete McBreen in which he talks about having aprentenceships and masters like in the old days of blacksmiths. I love the idea of being a craftsman practicing my art everyday. Great programmers live and breathe for code. They spend every waking moment practicing and learning about their craft. One important thing that I have found about great programmers is the lack of arrogance (I've never seen an arrogant great programmer...Arrogant programmers might think they are great, but usually are only great with hot air). The great ones are humble and know that they will never know everything. They are equally eager to learn as they are to teach. I wouldn't consider myself to be great by any stretch, but I LOVE working with great developers. In fact, I think everyone has a trick that they can teach me. Camp Smalltalk 2004 allowed me to have access to some of the best minds in Smalltalk and programming in general. Everyone was eager to share and the colloboration was envigorating. I walked away with my brain hurting! I LOVED IT! I wish we could have programmer guilds where I could go and learn. I have a list of mentors that I would love to learn under. The Master of Fine Arts program at the University of Illinois was exciting for that very reason. A chance to be mentored by the best. The internet has enabled me to get closer to the best and that's a great thing. I guess this post was more of a "right on" of what other programmers have been blogging and a wish. I wish we treated programming like a craft that someone has to work at to get good at like music and painting. All programmers are not at the same level of competence much like musicians and artists are at different levels. As with any craft, you are constantly learning new ways of doing things and pushing yourself. I think it would be fun to work on a Lisp or Scheme project full-time just for the fun of it. How awesome would that be? I play with Lisp in my spare time, but I know an experienced Lisper could teach me a lot of tricks. Now, wouldn't that be cool? Well, I'm going to go practice my craft!
Tuesday, April 26, 2005
Cool Mouse Modification
Some people have too much time on their hands, but this is cute. It's basically a way to modify your mouse. Pretty cool and inventive stuff. I wonder why no one thought of it before. Mouse on!
Saturday, April 23, 2005
Quotes
I found the following quotes on Peter Norvig's site. Lots of quick spin doctor cleverisms (yeah, I made that word up). Check it out!
Omaha Ruby User's Group
I am proud to announce a new user group, Omaha Ruby User's Group. Our first meeting is just a simple get together. I'll be there with my laptop. The only planned topic is to be bring your favorite pieces of Ruby code or your curiousity. Hope to see a lot of people there! Make sure you sign up on the mailing list. Here's the information of the when and where:
| When: | May 2, 2005 |
| Where: | Panera @ Eagle Run Shopping Center 13410 West Maple Road Omaha, NE 68164 |
Friday, April 22, 2005
Cool Google Talk
I'm a little slow, but I finally got around to watch Jeff Dean's presentation at Washington University on Google's architecture and culture. It's a great one hour talk. It made me go out and immediately download the paper on their "MapReduce" framework. One of the things that stood out for me is the "20%" rule. Basically, Google engineers spend 20% of their time on anything that tickles their fancy and most of their innovations have come from this time. Imagine that, give developers a little free time to innovate (or just think about a different problem) can be just the creative juice to make you a market leader. I've always believed that developers should have time to pursue their passions no matter what they are. We need time to play so to speak. Google not only embraces it, but encourages it. How lucky their engineers are. He continues by statting the "MapReduce" framework came from this same rule. What started out as a simple experiment has turned into a major piece of Google's processing infrastructure. I love the simplicity of it. They took an idea from functional programming and allowed their developers to take advantage of parallel computing. The video is also interesting to see what technological feats that they had to overcome to provide fast searches. All I can say is, "WOW!"
Tuesday, April 19, 2005
Dolphin 6 is coming
Dolphin 6 is coming. I'm jumping up and down with excitement! I CAN'T WAIT! I love Dolphin 5. Let's hope I get picked for the beta team...Oh powerful Smalltalk gods, please let me be one of the first to play with the ultra cool new version. OH PLEASE....OH PLEASE!
Monday, April 18, 2005
New Version of Java Serialization Package
I've posted a new version of my on-going Java Serialization Package in Squeak to SqueakMap. It's for Squeak 3.8 (it doesn't work for older versions, sorry!) Check out my projects page for more information on how to get it. So, what's new for this release? Well, I made a ton of bug fixes, refactored some things, added more tests, added support to load classes via a class path, and started a VM simulation. Now, the simulation stuff has its tests commented out (it ain't even close to working), but I decided to include it anyway. I'm kind of shocked about how much stuff I have now in this project. What started out as a little project to just read in java serialized objects has turned into a lot more. It's also suprising because it's not something that I work on full-time, just when the mood strikes. Where do I plan to take it in the future? Well, I would like to finish up the VM simulation in the distant and adding RMI capabilities in the near. Why RMI? Let's just say I've been reading my Jini and JXTA books again...=) I must admit that coding all of this stuff has made me learn a lot about the internals of java.
Saturday, April 16, 2005
Unit Testing Structure Via Reflection
I love testing my code. I'm still not to writing the test first though. I tend to write a small bit of code and then, write the test. Bad monkey, I know! But, I do testing and coding in small steps at least. Writing the test first gets the protocol to feel right from the get go. Testing is great to ensure my code works correctly but, what if I want to test the structure of my code? You might ask why anyone would want to do that. For one, I found it great to make sure code is used correctly. For instance, I've been writing a tolerant XML parser (that also parses HTML) for use in some of my projects. In my parser, I use a temporary output stream that I keep around for purely performance reasons. The only problem is that if two nested calls try to use it, there is a clash and weird results happen. So, I restricted the use to one method. But, what if I forget about this method and use the direct accessors? Even in languages that provide constricted access, this would be a problem since access is local to the object and "private" would still make it accessible. So, I wrote a test to tell me when I have done something wrong and tell me! First, let me show you the one method that I want the internal methods in my class to call:
There's a lot of possibilities to explore here. One use could be to make sure access to certain methods is caught. It might be fine to call the method, you just might want to make someone think before they use it. Think of some of the lint checks for "become:". And speaking of lint, you could have lint tests like this to make sure that are no non-referenced instance variables in your classes or senders of "halt". Just another testament to the power that we enjoy in Smalltalk.
useOutputDuring: aOneArgBlockI basically send in a block that takes the stream as an argument. It then returns the contents of the stream and resets the stream for the next user. I also added a check in the beginning to warn me if it gets invoked from nested calls. Now, here's the test method:
self output position > 0 ifTrue: [self warning: 'Output is being used'].
[aOneArgBlock value: self output.
^self output contents]
ensure: [self output resetToStart]
testOutputConsistencyThe first two asserts make sure that only one setter and getter access the instance variable, output. I like accessors, so I doubt I will ever violate those, but you never know when a brain fart might occur. The last two asserts are to make sure that there is only one sender of the "output" method and that it is the "useOutputDuring:" method. This test is super easy with Smalltalk's metaclass facilities where not only can I query a class's method and instance variables, but I can also ask questions of the code itself. Smalltalk is super nice in the fact that I can questions like "Who accesses this variable?" and "Who sends this method locally?" Very powerful stuff to use ensure code is used correctly or at least warn a developer about it.
| accessors localCalls onlyCall |
accessors := OrderedCollection new.
self readerClass withAllSubAndSuperclassesDo: [:class |
accessors addAll: (class whichSelectorsAccess: 'output')].
self assert: (accessors size = 2).
self assert: (accessors allSatisfy: [:each | each = 'output' or: [each = 'output:']]).
localCalls := self readerClass allLocalCallsOn: #output.
self assert: (localCalls size = 1).
onlyCall := localCalls anyOne readStream upTo: Character space; upToEnd.
self assert: onlyCall = 'useOutputDuring:'
There's a lot of possibilities to explore here. One use could be to make sure access to certain methods is caught. It might be fine to call the method, you just might want to make someone think before they use it. Think of some of the lint checks for "become:". And speaking of lint, you could have lint tests like this to make sure that are no non-referenced instance variables in your classes or senders of "halt". Just another testament to the power that we enjoy in Smalltalk.
Sunday, April 10, 2005
Meeting The Challenge
Dave Thomas made a challenge to have executable unit test comments in Ruby based on this Python project. I thought it was a neat idea. At the very least, I was inspired and thought it would be a fun weekend Ruby project. It was fun reading through the RDoc and RUnit code. I posted my code here for Executable Comment Unit Tests. It works with the Runit test framework and uses the parser from RDoc. It's only one file and not that big. It only took me one day to do the code and most of the time was spent reading code. Take it from it what you will. Now, on to my thesaurus project, my second weekend project.
Saturday, April 09, 2005
Excellent Article on Naming
Mike Clark has written an excellent article entitled: "Tame The Name". It relates to my thesaurus entry in that Mike emphasizes my point of naming things properly in code. It's a great short article and well worth a read. It will make your code-fu better, I promise.
Friday, April 08, 2005
Lazy Collections In Ruby
I ported my Squeak Lazy Collections project to Ruby tonight and called it Lazy Enumerable. It was amazingly a pretty much straight forward port. Basically, the point of the project is not to create a new collection every time you call select, collect, reject on a collection. It simply holds on to the block and the original collection. Now, the fun begins when you start nesting. For example:
All I do is call the same add_monadic_valuable method, but with a twist. I create yet another block that calls the select block inside to see if the value is true or false. If false, we pass back that IGNOREABLE_OBJECT. In the Smalltalk version, I originally threw an exception but took it out when the performance suffered. So, in short, I simply turn my select into a special case of collect! Now, how do I support rejects? Do I copy the code for select and use unless? Nope, all I do is negate the reject block before I send it into the add_select method. How do you do that? Like this:
temp=some_collection.select do |each|Basically, the lazy enumerable combines the blocks for the collect and select into one and will not calculate the merged collection until some method like each or size is called. So, how do you do that? Well, the code for calling each on the LazyEnumerable looks like this:
each.is_interesting
end
answer=temp collect {|each| each.to_something}
def each(&proc)I simply call each on the original collection and then call the block defined in myself (which I call monadic) that simply transforms values when called. Now, I return a special value if it should be ignored. This will be covered when you add a select block. For now, let's look at the simple case of adding a block that collects:
self.original.each do |each|
if (self.monadic.nil?)
answer=each
else
answer=self.monadic.call(each)
end
proc.call(answer) unless answer === IGNOREABLE_OBJECT
end
end
def add_collect(&proc)This passes straight through to this method:
add_monadic_valuable(&proc)
end
def add_monadic_valuable(&proc)The interesting part is when I set my instance variable, monadic. I'm basically combining the current monadic with the new one passed in. Pretty cool, huh? I think this is the kind of stuff that functional programmers love. I can see why. It feels right. Now, let's look at how to add a select block:
current=self.monadic
if (current.nil?)
self.monadic=proc
return self
end
self.monadic=lambda do |each|
result=current.call(each)
if (result === IGNOREABLE_OBJECT)
result
else
proc.call(result)
end
end
self
end
def add_select(&proc)
add_monadic_valuable do |each|
if (proc.call(each))
each
else
IGNOREABLE_OBJECT
end
end
end
All I do is call the same add_monadic_valuable method, but with a twist. I create yet another block that calls the select block inside to see if the value is true or false. If false, we pass back that IGNOREABLE_OBJECT. In the Smalltalk version, I originally threw an exception but took it out when the performance suffered. So, in short, I simply turn my select into a special case of collect! Now, how do I support rejects? Do I copy the code for select and use unless? Nope, all I do is negate the reject block before I send it into the add_select method. How do you do that? Like this:
- class Proc
def negate
lambda {|each| !self.call(each)}
end
end
Thursday, April 07, 2005
Use The Ummmmm Thesaurus, Luke
I was working on a little Ruby project tonight. Basically, it's a simple upcoming calendar for just me. Nothing special. So, I started with an Event object and it is responsible for representing a calendar entry. Now, it needed to know when it was to happen and some descriptions. So, I gave it 3 instance variables: when, title, and description. The next question was how was I going to represent when. I knew it needed to display itself and compare itself to other whens (for sorting). I initially thought of the name, DateRange, since it is responsible for holding a range of dates. But, I didn't like the name because I wanted to represent the concept of future dates and a single date. DateRange just didn't feel right because it seemed too specific. So, what do I do when I don't like a name for an object? I go to my trusty thesaurus for the answer! Within seconds, I had a page full of words and one jumped right at me: "MOMENT"! EUREKA! Moment was the perfect name for this new object. It conveys the meaning of its responsibilities exactly. This way I could have FutureMoments, DatedMoments, and even UndefinedMoments. I use a thesaurus a lot in my development lately and it's an idea that I got from "Thinking Forth". It's a simple and brilliant idea. It starts getting you to think about concise words to name the objects of your model more precisely. Anything that makes meaning clear and succinct is always good in my book!
Smalltalk For Java, C#, and C++ Developers
While reading he "Smalltalk vs. Squeak" thread on comp.lang.smalltalk, I came across this document that Fernando posted. It's written with C++ programmers in mind, but I think it's for anyone who thinks Smalltalk's syntax is weird. It starts talking about the parser and moves to why the syntax is the way it is. So, if you know of any java, C#, C++, or C developers that offer the same ole "but, it's syntax is weird" line. Point them to here. And let them feel the love too.
Monday, April 04, 2005
Omaha Smalltalk User's Group
If you could only have 1 mantra to use that had to direct all your future philosophies, what would it be? If you have ever read 'The Selfish Gene' you are familiar with the idea of memes. A meme is a contagious idea competing for a share of our mind in a kind of Darwinian selection. The meme/mantra that we will take a look at in a software context is a paper called 'Collect what works' (the mantra!) by Stan Silver. This should be a fun free for all where we will consider the idea of solution spaces, and one of my favorite quotes: 'to gain knowledge, add something everyday. To gain wisdom remove something everyday'.
This month, Gary Overgard came up with the suggestion. Go to http://www.blainebuxton.com/ostug/CollectWhatWorks.doc to read the Collect What Works paper. Also, we would like to discuss using Gary's rules engine with Seaside as a Smalltalk FIT replacement. And as always bring your favorite snippets of Smalltalk code!
We're also now on meetup.com. So, sign on up!
Here's all of the details:
Office is at 103rd & Pacific. Guests can park in the Northern visitors parking area back of building, or across the street at the mall. Enter in front door, we'll greet you at the door at 7:00pm. If you arrive a bit later, just tell the guard at the reception desk you're here for the Smalltalk user meeting in the 1st floor training room.
This month, Gary Overgard came up with the suggestion. Go to http://www.blainebuxton.com/ostug/CollectWhatWorks.doc to read the Collect What Works paper. Also, we would like to discuss using Gary's rules engine with Seaside as a Smalltalk FIT replacement. And as always bring your favorite snippets of Smalltalk code!
We're also now on meetup.com. So, sign on up!
Here's all of the details:
When: April 12, 2005, 7pm - 9pm
Where: Offices of Northern Natural Gas
1111 S 103rd Street
Omaha Nebraska 68154
Office is at 103rd & Pacific. Guests can park in the Northern visitors parking area back of building, or across the street at the mall. Enter in front door, we'll greet you at the door at 7:00pm. If you arrive a bit later, just tell the guard at the reception desk you're here for the Smalltalk user meeting in the 1st floor training room.
Can Your Language Do This?
I've been an avid Squeaker for awhile. I use the Method Finder all of the time to find methods, but never used the advanced features despite Steve Wessels' rants about just how cool it really is. Well, I started to goofing with it tonight and nothing is going to be the same. OK, it's a simple method finder with a twist. I can type in partial names of selectors, but what if I don't know the selector. What if the only thing I know is the arguments and the answer? Well, it can find the answer! For example, say I want to find a degrees to radians conversion. So, I type the following: 180. 3.1415926.. Separate everything with periods and the last thing is the answer you desire. The method finder found the following method: Number>>degreesToRadians and Float>>degreesToRadians. WOW! How cool is that?! I spent half the night typing in arguments and the results to see what it would found. I was surprised! Squeak never ceases to amaze me. Click the Method Finder link to go to the Swiki page for more examples. SQUEAK ON!
Sunday, April 03, 2005
Late April Fool's Day Joke
Check out this April Fool's Day Joke. It describes a product called the "Commentator" and is pretty cute. I love the FUD factor control the best....=) I know it's a little late...But, it's still funny!
Saturday, April 02, 2005
Holy Numbers!
Ian Prince got a sneak peak at SmallWiki 2 and was very impressed. He added a link an introduction presentation by its author Lukas Renggli. Cruise to page 10 and you will see these numbers:
I guess this proves not all dynamic languages are created equal. Wikipedia is written in PHP. These are amazing numbers! I know that Seaside makes me very productive and it's nice to have proof. But, gosh darn, if those numbers are not impressive! WOW! Avi and the rest of the seaside crew must be grinning ear to ear! The presentation goes on to talk about a meta framework called Magritte that sounds very cool. I'd imagine it also had something to do with the low numbers. I can't wait till the code is released!
| Wikipedia LOC | SmallWiki LOC | |
| Wiki-Parser | 117,616 | 555 |
| Query-Engine | 20,970 | 195 |
Subscribe to:
Posts (Atom)