Tuesday, April 5, 2016

What Is This All About?

Blockly is a computer software library that lets computer programmers build visual programming editors.

That may sound a bit geeky, and it is. I'm a geek, though, and it's been a long time since I've been this excited about anything. The only way for me to exorcise myself of this unhealthy enthusiasm is to start yet another blog.

It seems like I've been coming to this point in fits and starts for the last 35 years. 

Within just two years of first learning to program, I accidentally invented something that became an overnight phenomenon. I was a developer working on a database product that had a "teletype" user interface. You type a command and press enter, and the computer does something and asks what you want to do next. Microsoft Windows hadn't been invented yet. The personal computer hardly existed. Telephones had wires attached to them and you couldn't carry them around so easily, not very far, anyway, except in Star Trek.

One day I was home sick, lying in bed, testing a change I had made to the program. I'm basically lazy, and as Benjamin Franklin never said, "laziness is the mother of invention". I had to keep typing the same things over and over into the computer, and it got old fast. So I added a feature to the program that captured a series of commands that could be "played back" without retyping them. One day my boss saw me doing that and asked, "What's that?" She was thunderstruck. I was thunderstruck that she was thunderstruck. I never imagined that this was something that no one had thought to do before. It seemed so simple and obvious.

Philips, which is sort of the General Electric of Europe, bought our software and quickly wrote thousands of "programs" using this feature. Because that's what it was, "programming" by using the application commands as a kind of programming language. Ultimately they used it to prepare and win a bid to install a new telephone system for the entire country of Indonesia. The bid had to be printed on paper in those days and filled five pallets. I was spending about 1/4 of my time in Netherlands for several years, which was lovely.

This was obviously a powerful idea. Very soon everyone was doing it. In Microsoft Office it's called "macros". I later learned that there's a term for it in computer science, "scripting". The idea is to create some special purpose language designed to do one particular kind of thing. If you do it well, the language can be much more powerful and much easier to learn than "general purpose" programming languages that can do anything.

Over the years I developed or worked on other scripting languages for various purposes that let non-programmers write "programs". Designing good scripting languages is a challenge, but if you get it right, it's beautiful.

About 10 years ago I became fascinated with something called "Scratch" developed at MIT to help elementary school children learn programming. It's a "visual programming" environment that lets kids create their own computer games by dragging and connecting colored blocks on the screen. It's amazingly easy and fun to use. I wondered, why can't professional software development be this easy? It should be.

At my next job, one of my responsibilities was teaching newly hired developers the APL programming language. I wrote a visual editor modeled on Scratch to help with that. It's really difficult to write a visual editor and I spent way too much time on it and never got a really satisfactory result, which was frustrating.

Two years ago I "retired" when my company laid me off and I couldn't get another job. I went back to Scratch and decided to use it to develop some learning programs for my grandsons. I found myself wishing I had a somewhat better version of "Scratch", that it was a bit clumsy in some ways for what I was trying to do, so I googled "visual programming editor" and, lo and behold:

BLOCKLY!

A guy at Google had developed JUST the thing I needed to do the things I had been struggling to do for 35 YEARS!

AND IT'S FREE!

Free is good, especially if you're "retired".

I've been going crazy with it for two weeks and I can hardly drag myself away from it. In the posts that follow, I will "share my journey". So let the fun begin.

No comments:

Post a Comment