Tom Morris

18 December 2009

A pungent mix of programming, philosophy, pedanticism, procrastination, perplexity, peripheral political polemic, and platters of preposterousness.

LazyWeb: I need a simple Windows-based distributable scripting language IDE for beginners

I’ve been teaching programming recently. It can be hard work. But it’s fun.

What’s not fun is coming up with an easy way for non-programmers to start programming on their own machines.

I’m firmly convinced that the way to make it easier for people to jump into programming is to have a simple, downloadable IDE that contains everything they need to build small scripts - that is, under 100 lines.

The problem is that all the stuff that goes along with learning to program is excessive for non-programmers. Shells? No. No having to learn bash or DOS or PowerShell up front. Okay, well, if you don’t want to use the command line, then you need to use a GUI tool. We’ve got some pretty nice GUI tools for those working on big projects in big industrial languages like Java and C# - Eclipse, IntelliJ IDEA, NetBeans, Visual Studio and even MonoDevelop. Now, I use Eclipse and IntelliJ. I’ve used NetBeans too. And MonoDevelop is really nice. I don’t use Windows, so I don’t use Visual Studio - I have used Visual Basic in the past though, and it’s the right sort of level.

They are too complicated. I’m thinking something a bit more like TextMate on the Mac. The great thing about TextMate is that you can open it up, and start writing in a scripting language like Perl, Python or Ruby, hit Apple-R and it runs it for you using the various language runtimes. You can start hacking and see results very quickly. Obviously, on OS X, Perl, Python and Ruby are all installed out of the box. And compilers are there for Java, C, Objective C, C++ etc. That’s all fine. But most people don’t run OS X.

Most people run Windows. So imagine this: you go to a site, you download an .EXE file. They have installable EXE files or they have runnable-from-anywhere EXE files. They would set up everything you need. For Ruby, that would be a Ruby interpreter, RubyGems, irb and an RDoc viewer, and maybe the first edition of PickAxe. For Python, it’d be a python interpreter, setup.py/easy_install/pypi/eggs (I can never keep track of what the Python guys are using instead of gems - heh) and a downloaded, browsable version of the Python manual and maybe Dive Into Python. For Perl it’d be a Perl interpreter, working no-config-required CPAN setup, docs etc. All of them would have a simple free text editor that has the basics you need - indentation, syntax highlighting - and most importantly, Ctrl+R. Doesn’t have to be Ctrl+R - it can be whatever is the right thing for Windows. I don’t know about Windows, but I’m sure someone out there does. Basically, you can hit one key command and it runs what you’ve written. Exactly what is in the buffer. No saving required. If it needs compiling, it compiles it. Whatever. Monkey writes code, monkey pushes button, monkey sees result. Just like in TextMate.

As for what languages it supports, I’m not bothered. Python and Ruby both seem like they would fit naturally. Whatever other languages people are likely to want to learn first that are of a similar sort of style as Python and Ruby. Off the top of my head: Lua, JavaScript (Rhino etc.), Scheme. Obviously, now that there are two fairly large VM platforms you can use to host these languages on, and reasonably mature implementations of Ruby and Python for both the .NET and Java platforms, as well as editors like JEdit. Stick them on top of the JVM or .NET CLI and hopefully they should be reasonably portable.

The intention is to make it so you can go onto the website, download the binary, hit install and be able to start work in your chosen scripting language in fifteen seconds or less. This is a point Aral has been making about commercial platform vendors like Microsoft. But it’s just as true for open source. One of the things which Microsoft has done very right is to target newbie developers and non-programmers. This is the point of Visual Basic, right? You don’t have to be a nerdy UNIX geek who sits around fiddling with .rc files to have a need to write code. Same goes with Apple and Automator. Open source languages like Ruby need a similar way in for newbies and non-programmers. Yes, newbies will still have to RTFM, but they’ll be RTFMing the Ruby manual or the Python manual and not the bash or DOS manual.

So, in the Java-flavoured computer science departments of academia, there’s BlueJ which eases people into Java programming by getting them into object modelling visually. In the browser, there’s Try Ruby. And there’s Try Python (which uses Silverlight - booo!). The Python community have a lot of good tutorials for non-programmers, which is good.

That’s what I want. Now, LazyWeb, go build it for me!

Until the LazyWeb gets back with that, has anyone got any suggestions of how to make the “get all the stuff ready so I can start hacking” problem a lot, lot easier for new programmers. I’ve tossed around a lot of ideas in my head including full-bore IDEs like NetBeans, lending out netbooks to students pre-loaded with Linux and a dev environment, EC2 Windows environments, bootable DVDs or USB drives.

There’s plenty of programmers I know who read this blog, so I ask you: if you wanted to teach a non-programmer Your Favourite Scripting Language on Windows, how do you go about doing it in terms of software? Remember, I haven’t used Windows for a decade, so I have precisely zero knowledge of what the current hotness is in text editors and IDEs and the like are. And you are welcome to attempt to convince me of the superiority of Your Favourite Language as a first language for non-programmers. I do think that scripting languages like Python are the best thing for new programmers to learn, so no suggestions of C++ or whatever.