PythonAnywhereAnywhere
We recently added something cool to PythonAnywhere, our Python online IDE and web hosting environment -- if you're writing a tutorial, or anything else where you'd find a Python console useful in a web page, you can use one of ours! Check it out:
What's particularly cool about these consoles (apart from the fact that they advertise the world's best Python IDE-in-a-browser) is that they keep the session data on a per-client basis -- so, if you put one on multiple pages of your tutorial, the user's previous state is kept as they navigate from page to page! The downside (or is it an upside?) is that this state is also kept from site to site, so if they go from your page to someone else's, they'll have the state they had when they were trying out yours.
Bug or feature? Let me know what you think in the comments...
Teaching programming
One thing we wanted to do with PythonAnywhere, our Python online IDE and web hosting environment, was put together a short introduction to Python for non-programmers. I wrote the first cut the other day.
I've always been a fan of the Pimsleur language lessons. Unlike very traditional ways of teaching foreign languages, they don't make you learn vocabulary lists and grammatical rules. Unlike more modern systems, they don't try to teach you phrases. There's no written textbook, just a bunch of CDs (or these days MP3s). And they throw you right in at the deep end.
At the start of each Pimsleur course, a soothing voice says something like "Welcome to Pimsleur Klingon part one, lesson one. Listen to the following conversation." And then you hear something that sounds like this. The soothing voice comes back and says "in 30 minutes you'll hear that again, and you'll understand it." And then you're introduced to the different sentences, and told to repeat stuff. "Repeat this: tlhab 'oS 'Iw HoHwI' So' batlh" they'll say, and you'll stumble your way through it. Then they'll get you to repeat "tlhab" on its own a few times. For complicated words they'll break it down, and get you to repeat the last bit first, gradually building up. "I". "wI". "oHwI". "HoHwI". After 30 minutes of this, your brain is aching, and then they play the conversation you heard at the start -- and it makes perfect sense!
Quite incredible.
So what's this all got to do with teaching programming? Well, we were looking for a decent "Python for non-programmers" course that we could use, and while we found a couple, they all seemed to have the same problem -- they'd work by gradually introducing simple concepts, and after twenty pages you might have learned enough to write a trivial program.
That's not how any of us learned programming. Instead, we tended to pick it up bit by bit by inspection of complete working bits of code. For me, it was typing in listings from the home computing magazines that I bought. (Note for younger readers: listings were printed programs in magazines in the days when disks were too expensive to give away with magazines. (Note for even younger readers: disks were primitive USB-stick-like things that people used to use to store data, and were often attached to magazines as a way of passing data from magazine to reader in the days when you couldn't just put a URL in the article text. (Note for yet younger readers: magazines were collections of very thin slices of wood on which text and images were "printed" using chemical dyes, which could be purchased in places called shops. They were popular in the Dark Ages before the Facebook.)))
That way of learning -- which must be even easier now that any aspiring programmer can look at the source of tons of open source software, or just view the source of any web page -- was quick, efficient, and got you straight to a position where you felt you'd achieved something. You'd written your first program! You could change the bits you understood, and leave the rest for a later day when you knew more. A great way to learn, as well as being excellent training for later days when you find yourself maintaining some horrific codebase written by someone who thinks that operator overloading is the best thing since sliced bread.
So, my theory for the first part of this tutorial -- and, if it works out, for any following ones -- is that each should start with a program listing that the reader won't understand yet, but should be able to understand with a little explication. Core concepts should be drilled in by relentless repetition. No baby-talk -- start using the technical terms straight away, and then repeat them enough that if the reader forgets what "variable" means then they can work it out from context. And aim to get them from knowing nothing to simple OO and functional programming in five half-hour lessons.
What do you think?
If programming languages were literary genres...
From a conversation at the pub this evening with Jonathan and Glenn...
- JavaScript would be science fiction. Easy to get into, and while there's an incredible amount of crap out there, there are also many gems that, carefully considered, will completely change your outlook.
- C and C++ would be "literary" fiction. Somewhat old-fashioned, occasionally brilliant, but frequently clunky and never quite as good as its devotees and creators like to think it is...
- LISP and Scheme would be obscure branches of poetry; densely packed with information, a few words express something that would take that would take tens of thousands to express in other languages. But only a few dozen people in the world would understand it.
...and somewhere around there, we ran out of steam. Java as corporate mission statements? Not quite... VBA as newspaper cartoons? Hmm. COBOL as... God only knows. And we couldn't even place Python.
Anyone got any ideas?
Resolver is hiring
We’re looking for a Software Developer to work on PythonAnywhere, Resolver One, and our other products, based in our offices in Clerkenwell, London, UK. More information on the Resolver jobs page.
Busy, busy, busy
A couple of weeks back we were brainstorming about other ways we could make use of the code infrastructure we'd put together for Dirigible. We had loads of stuff for running functional tests, determining dependencies between spreadsheet cells, executing untrusted user code safely on our servers, and so on. Any of those could potentially make an interesting product, so we put together some basic landing pages, one for each idea, and put a bit of money into Google AdWords to see if any of them got any interest.
One of them took off immediately, and even started getting traction on Twitter: PythonAnywhere, an online Python IDE and web application environment -- basically, Dirigible without the spreadsheet grid. This fits in with what we suspected -- lots of people were interested in Dirigible, but it wasn't the spreadsheet side of it that excited them, it was the easy Python grid computing.
What's been particularly cool with this idea is not only that most of it is done and "just" needs breaking out of Dirigible and putting into a new product, but that people are keen to engage with us about it. When people signed up on our landing page, we sent them an email with a few questions -- "What would you use it for? Which features excite you? What would you pay for it? Any suggestions for other features?" About 25% of people have replied, with lots of great feedback, and we've changed our plans (and altered the relative priorities of features) based on their input. All very Lean Startup...
Anyway, all good clean fun. If you'd like a look at it when it goes into beta, you can sign up on the site, or just leave a comment below.
How to bet on the bubble?
(Note: this is merely the ramblings of a startup founder and should not be treated investment advice of any kind whatsoever. Caveat lector.)
Apparently, we're in another tech bubble. I was wondering the other day how Color Labs were going to spend the $41 million they recently raised, and the only things I could think of were marketing and website hosting -- the former because the free press they got out of that ludicrous investment will die down, the latter because it sounds like they've built the app with a client-server model, so they'll need lots of storage and bandwidth to manage it.
As I write this, Color.com has the IP address 50.17.223.168, which ARIN tells us is in the Amazon EC2 subnet. So I guess we know where a chunk of that $41m is going.
So, one startup is using Amazon. At work, we're using it for our programmable cloud spreadsheet, Dirigible, too. But are all the cool kids using it?
The best way I could think of to check that out was to work out what Y Combinator-funded companies are using. They don't publish a list of their portfolio companies anywhere I can see, but there's an unofficial list here. So, taking the companies started since January 2010, 80 in total, I made this sheet to work out where they were all hosted.
Highlights:
- About 26% of the companies founded in January 2010 use AWS.
- About 63% of the companies founded in June 2010 use AWS.
- About 71% of the companies founded in January 2011 use AWS.
There's a pretty obvious trend there, but it's not clear what it means. Perhaps the startups kick off using AWS, then switch to other hosting providers once they've got traction. Perhaps many of the startups from January 2010 are now bust, and the hosting provider shown is the one for the holding page that now sits on their domain. Or perhaps it's something else entirely; I guess the best way to track would be to revisit the sheet periodically and look for changes.
However, one thing is very clear -- new YC startups right now are overwhelmingly choosing AWS. Back in the days of the last dot-com bubble, people often said that it was best to invest in suppliers to startups rather than the startups themselves -- better, in a gold rush, to sell shovels to gold miners than to start prospecting oneself. Back then, that would have meant buying Sun Microsystems stock, which, hard though it might be to believe these days, would have been a great investment -- inasmuch as any investment could be in a bubble. Certainly better than investing in a single startup, because even back then, most failed. (Obviously once you have money to spread your bets across a range of startups, things change. But I don't, and nor do most other people.)
So, is now a good time to buy Amazon stock? Well, if I could invest in AWS alone I would. But as far as I can make out from Amazon's last SEC 10-K filing, a maximum of 3% of their revenues came from AWS in 2010 (AWS comes under "other" sales, which totalled $953m, and total sales were $34bn) . It's hard to unpick what the associated costs where, as unfortunately they don't seem to split it out from their general technology spend. But their gross profit ($7bn) is seven times the best-case AWS revenues, so it doesn't sound like it's a major component.
So, ultimately, investing in Amazon is probably more a bet on their other businesses. They're pretty good at commoditising their complements, so may be a good pick. But they're not a bet on startup growth.
On the other hand, they're clearly blowing away the competition, at least as far as the sample set of companies are concerned. So investing in other cloud hosting providers like Rackspace sounds like a really bad way to bet on the bubble. And at least that's one useful (if tentative) conclusion.
Some old JavaScript
I was digging around in my archives and discovered some old JavaScript demos I wrote back in 1999 — long enough ago that I thought of them as "DHTML pages". It turns out that they only needed a few minor tweaks to make them work on modern browsers; the bulk of that was removing the browser-sniffing code, and then in each case where I was deciding what to do based on whether the browser was Netscape 4 or Internet Explorer 4 (!), deleting one or the other case. Looks like it was about 50/50 as to which browser won.
Anyway, without much further ado, I bring you the holding page for my old personal/political blog, before it went live (and you can really see how this would have pulled the readers in), and a page in the style of 1980s/early 90s Amiga demos. The latter is particularly worthy of note because when I originally posted it, I made sure it only appeared in 640x480 windows — because anything larger would make even fast machines grind to a halt, all those years ago back in 1999. The tagline really made sense, back then.
Excuse me, I just need to go into a corner and feel old...
[UPDATE] I kept track of the changes required to convert 1999-vintage DHTML to modern JavaScript in a Git repo, if anyone's interested in doing a similar conversion then let me know in the comments and I'll put together something.
London Financial User Group Meeting: 17 January
The next meeting of the LFPUG will be on 17 January, from 19:00 – 21:00 — location TBD. Two talks are scheduled:
- Developing and Deploying Python applications on GPU Cloud Platforms, Suleiman Shehu, CEO of Azinta Systems
- Black-box model validation with Python, Patrick Henaff
Both sound interesting, the first in particular! There's still time to propose a lightning talk, too — I think the best way is to send the organiser, Didrik Pinte, an email. If you're on LinkedIn, there's also more information in the LFPUG group there.
And the same to you too, Google!
While we're on the subject of rude words... I hope that Google aren't showing this kind of CAPTCHA to french people...
Long S is long
A bunch of people have been posting interesting searches on Google Labs' Books Ngram viewer. I heard about it from this tweet by @njrabit, but the tantalising link (don't follow if you don't like swearing) at the bottom of this blog post by S. Weasel, showed up something interesting. Why is it that of four swearwords, the one starting with 'F' is incredibly popular from 1750 to 1820, then drops out of fashion for 140 years -- only appearing again in the 1960s?