In ‘93 I was about to go into hock to buy a NeXT computer. The NeXT was several hundred thousand light years ahead of the PC and Apple machines at that time. I liked what I saw, and I read everything I could find about it. In 1993 I attended the NeXTWorld convention at San Francisco’s Moscone Center where I watched Steve Jobs use mass hypnosis techniques on an audience of crazed Unix hackers—and one budding novelist (me). He did a great demo of the NeXTSTEP programming environment and built a calculator by dragging widgets around: the crowd went bonkers. We went hysterical when he created an interface with a slider that changed a number in the display window. Awesome magic in 1993.
After Steve’s keynote presentation the fired up hackers surged into the concourse to lay down $2,000 for the NeXTSTEP SDK. There was electricity in the air. All around me brainiac NeXTians clutched their precious NeXTSTEP shopping bags to their bosoms as they walked back to their hotels on Market Street to start all-night hackathons. I was envious of them because they already had NeXT machines and I didn’t. I didn’t care anything about the programming. I just wanted to get my hands on one of those cool black boxes.
The WWW was invented on Tim Berner Lee's NeXT computer
It was not to be…
Before I could raise the bucks to join the party, NeXT stopped making hardware. In its time, NeXT sold only 50,000 computers. However, the company did stay alive as a software company—NeXTStep lived on in NeXTSTEP for x86.
In 1994 I bought a rip-roaring custom-made, top-of-the-line, no-name 66MHz i486 with 8MB of RAM, a monstrous 17″ monitor, an HP4MP Postscript printer (still works after 17 years) for a paltry $7,000 dollars. The 600dpi printer was 4K of that.
You might ask why a non-programming Comparative Literature Major would drop 3 months’ wages into a computer that he didn’t know how to use. I don’t really have a good answer. I just wanted it. What can I say? The heart wants what the heart wants.
The crowning glory of NeXTSTEP was the desktop. Though it may look a little plain and rectilinear in this day of glossy buttons, drop-shadows, and gradients everywhere, the NeXTSTEP look grabbed me. I found it soul-stirring, and even now, it still grabs me
Tim Berner Lee's HTML editor circa 1991-92.
My 486 is long gone, but NeXTSTEP lives on in every Mac OS X computer. That Aqua desktop you all love (except for those of who hate it) is the great-grandchild of the NeXTSTEP. When Steve rode back into power at Apple in 1997, one of the conditions he demanded was that Apple purchase NeXT Computers for $400 million. His beloved NeXTSTEP and BSD UNIX, which had evolved to OPENSTEP by that time, was to become the basis for Mac OS X.
This kind of thing always gets me teary-eyed for the good old days, when we had to walk 20 miles through the snow to get to a compter terminal—uphill both ways! Those were the days of 80×24 terminals and 2400 baud modems, and ASCII art. Here’s a clever screensaver done in Perl, available from http://www.robobunny.com/projects/asciiquarium/html/. I love it.
I want to hip all of you cool cats to one of my heroes: Peter Cooper. I’ve never met Peter in person, but I have met him online through his mighty Ruby blogs Rubyinside.com and Railsinside.com, his best of class book Beginning Ruby (which I use for my CCSF and CSM Ruby courses), and through his entertaining Tweets as @peterc.
One of the things I admire about Peter is that he fearlessly shares inside information about the business side of being a successful blogger and author. He reveals about how much money he makes for ads on RubyInside.com, and he writes about his his pain and gain as an Apress author. When you read this amazing post, be sure to check out the A-listers who added in their comments on the publishing business, including Geoffrey Grosenbach of Peepcode.com and Tim O’Reilly himself. This is priceless stuff.
Where many Rails developers have uncritically anointed DHH and 37Signals as prescient Royalty/Illuminati/Life Style Gurus, Peter Cooper matter-of-factly reveals that he’s lost his enthusiasm for Rails. He’s even donating his Railsinside.com blog (6,000+ subscribers) to the Rails community because he can’t muster the enthusiasm to keep it going. I find it refreshing to hear a clear voice say that the Emperor is no longer absolutely fascinating.
Since the introduction of the iPad a few weeks ago, Peter has learned Objective-C, gotten a strangle hold on the iPhone SDK, and hacked out an amusing arcade game in a matter of weeks. If you’ve been following his tweets as @peterc, you’ve been able to watch his game progress from concept to working code. This fun stuff.
This semester I’m going to have my Ruby and PHP classes build a form driven, AJAX-y web application as the final project. This is a bread-and-butter assignment that performs the basic task of storing form data in a database then displaying it. We’ll deal with the ever present Persistence Problem by using a SQLite3 database to store user input, and the AJAX/Javascript layer will be all JQuery.
A classroom project of this size can be completed in four to six weeks, depending on the programming and web skills a student brings to the class. More is always better.
The PHP course will be starting from scratch (no cakePHP, no Drupal, no Joomla), while my Ruby course will be using Rails. I’ll be doing the project in Seaside. When all is said and done, we will count the lines of PHP, Ruby, and Smalltalk to see who get bragging rights for writing the fewest lines of code.
If you want to work along wtih us, your project should have these features:
An HTML form.
JQuery form manipulation.
AJAX via JQuery.
Validated form input.
Form data stored in a SQLite database.
A Recaptcha form.
User data safely displayed (potentially harmful characters sanitized).
There are dozens of features we could hang on this skeleton: pagination, search, social features (Twitter, Facebook, Buzz, etc), as well as polls, voting, thumbs-up/down, email, XML export, RSS feeds, Section 508 compliance, and more. I’ll be satisfied if most of my students can achieve basic functionality before semester burnout sets in.
And about that Seaside course—there isn’t one yet. But it is on my TODO list for future courses at CCSF. For the time being, as part of my own Smalltalk education, I’ll take this opportunity to complete the class project using Seaside. Since Smalltalk and Seaside are new to me, I’ll be starting on the same page as my PHP and Ruby students. This will be fun. I’ll be doing this project with Cincom Visualworks Non-Commercial which is free for non-commercial use on Windows, Linux, and Mac OS X.
OK. I’d better get to work on the Ruby part of this project before the Rails team unleashes another new product release just to confuse me.
A few months ago I got a new keyboard, thinking that I would become a better typist, work faster, increase my brain plasticity, and boost my I.Q. by a couple of points. My wild-eyed expectation was that I would accomplish these great things while reducing the risk of RSI (Repetitive Stress Injury). You can read my initial impression of the TypeMatrix keyboard and my update to see where I’m coming from.
Notice the RETURN and BACKSPACE keys in the center of the keyboard–both convenient and disruptive.
If the TypeMatrix keyboard were the only keyboard in the world, I wouldn’t have a bad thing to say about it. The thing is, my working laptops (Thinkpad and Macbook Pro) have regular QWERTY keyboards, and my brain cannot deal with two different layouts. When I switch from the TypeMatrix (hooked up to my iMac) to my laptops, I become a fumbling idiot.
When I’m in the classroom entering my ingenious code examples for a classroom full of students, I simply can’t type straight. My confused fingers are in TypeMatrix mode on a QWERTY keyboard, inflicting pain on dozens of innocent victims. Most people will agree there’s nothing worse than watching a bad typist fumble through a demo. Most disturbing of all, my student’s screams of pain haunt my dreams.
My final judgment is that the TypeMatrix keyboard is a decent keyboard, with a good feel and nice build quality. Yet, these virtues aside, it is also doomed to fail because of its non-standard layout. This keyboard would be worth a try If you have problems with RSI and you do the majority of your work on one keyboard.
As for me, I’m going back to my Happy Hacking Professional 2 keyboard.
The very sexy Happy Hacking Professional 2 with blank keytops. For super nerds only!
If you ever hear me say I’m thinking of another keyboard, please have me institutionalized.
A funny thing happened on my way to get my e-mail today. Chrome identified www.google.com as a dangerous site with a weird SSL certificate and told me to run for safety. In the image below, notice that the https protocol is crossed out, like this: https.
When I went tried to post this tidbit to Twitter (@douglasputnam), I got another warning cautionary note. It looks like Chrome is in Body Guard Mode today.
When the 800-pound Gorilla trips over its own feet, we’re allowed to chuckle.
A reserved word in a programming language is a word that is off limits to the programmer. For example, in PHP print is a reserved word. This means that you, as the programmer, cannot create a function named print because PHP owns that word.
Most languages have reserved words, some a few, and some very, very many. Usually the fewer reserved words a language has, the more flexible it is. For example, in the list below, you will see that Lisp has no reserved words. We all know that Lisp is very flexible and powerful.
As you look at the table below, do not think unkind thoughts about PHP—it’s different from the other languages. It is not designed to be a general purpose programming language, though it can certainly do almost anything you want it to do. It is intended for web programming, which explains the existence of so many of the predefined functions and constants. Those are exactly the kinds of items that other languages must implement individually if they want to be as handy with web development as PHP. This is no small task, kids. Just take a look around try to find a web site implemented in C++.
Reserved Words
Language
Count
Reserved Words
Lisp
0
Lisp has no reserved words. Lisp is written in Lisp. Alan Kay, the creator of Smalltalk, said: “Lisp isn’t a language, it’s a building material.”
Smalltalk
5
self super nil true false
C
32
auto break case chart const continue default do double else enum extern float for goto if int long register return short signed sizeof static struct switch typedef union unsigned void volatile while
C++
~62
and and_eq asm auto bitand bitor bool break case catch char class compl const const_cast continue default delete do double dynamic_cast else enum explicit export extern false float for friend goto if inline int long mutable namespace new not not_eq operator or or_eq private protected public register reinterpret_cast return short signed sizeof static static_cast struct switch template this throw true try typedef typeid typename union unsigned using virtual void volatile wchar_t while xor xor_eq
Ruby
38
alias and BEGIN begin break case class def defined? do else elsif END end ensure false for if in module next nil not or redo rescue retry return self super then true undef unless until when while yield
Python
31
and del from not while as elif global or with assert else if pass yield break except import print class exec in raise continue finally is return def for lambda try
Java
47
abstract do if package synchronized boolean double implements private this break else import protected throw byte extends instanceof public throws case false int return transient catch final interface short true char finally long static try class float native strictfp void const for new super volatile continue goto null switch while default assert
I haven’t felt this excited about a tech product since I got my Kaypro in 1982. The Apple Tablet is going to be awesome for publishers and self-publishers, which I fancy myself to be. I’m going to pre-order one instantly. If this thing is to my X-61 tablet PC as the iPhone was to my Razr, it’s going to be insanely great.
I know that I sound like an inflamed Apple Fanboy, but, let’s face it, where goes Steve and Company, there goes the world. You go, Steve.
If you need to see irb in action, check out this screencast.
Whenever I see a smooth, well-written, organized screencast I have a deep sense of appreciation. That’s my goal: be smooth, well-spoken, and organized.
Learning two languages at once can be hazardous to your mental health.
Now that I know I can deploy Seaside on my Slicehost server, I can move on to the next step, which is deciding which version of Smalltalk I should learn.
The languages I’m familiar with come in only one flavor: vanilla. With C++, PHP , Ruby, and Python there’s no choice at all: you take what they give you. But there are many varieties of Smalltalk to choose from; they all do great stuff, they all have the great features, and they’re all just different enough that it’s in your best interest to choose one and stick with it. Some are free and som you have to pay for. Which one do you choose?
I’ll cut the suspense and say that my first choice for learning Smalltalk is Squeak. But my choice was entirely accidental. I didn’t choose Squeak on its merits, and it has many. I simply stumbled upon it.
I was taking a math course and wanted to graph some of the equations we were discussing in the class. I considered using PHP but working with PHP’s low-level GD library had already killed off too many of my brain cells. Then by accident, I happened across a book named Squeak: Learning Programming With Robots. I could see at a glance that I could make this Squeak robot do my bidding. Here’s my first Smalltalk program: drawing a square. In fact, drawing 100 squares.
Here’s a small screencast of how Squeak looks in the hands of a rank amateur.
Doug Putnam has been teaching PHP at CCSF for almost a decade. He is currently teaching courses in PHP and Ruby at the City College of San Francisco and the College of San Mateo.