Simon Willison’s Weblog

Subscribe

Items in 2012

Filters: Year: 2012 × Sorted by date


What are some useful techniques and tricks using list comprehension?

List comprehensions are neat, but generators are even neater (and if you understand tricks with generators you’ll be able to use list comprehensions more effectively as well). Generator Tricks for Systems Programmers by David Beazley will blow you mind—it’s full of useful real-world examples as well. Read that, then check out his follow-up tutorial A Curious Course on Coroutines and Concurrency.

[... 81 words]

How can I detect manual record insert from mysql cansole into my code in django .?

You can’t. The best you can do is have Django periodically poll MySQL to see if anything has changed (maybe with a custom management command run by cron)—having a TIMESTAMP field on every table which will be automatically set to the current time when a record is inserted will help you spot things that have changed.

[... 80 words]

Why do so many newspapers have astrology columns?

Partly because there is demand for it (if a newspaper stopped running horoscopes they would likely lose some of their subscribers to rival publications. Mainly, I imagine, for cash: At least in the UK, most newspaper horoscope pages are accompanied by adverts for premium rate phone numbers that provide a “personal” horoscope service.

[... 67 words]

How great do you need to be in programming to be a technical (Co) founder?

You don’t need to be amazing, but you do need to know how to ship. You might be the best person at writing complex machine learning algorithms in the world, but if you can’t get running code deployed in a way that lets customers use it you won’t be able to get anywhere that matters.

[... 76 words]

Where do I find a detailed financial report of Wikimedia Foundation on a business year, specially about outgoings?

Their annual report is published here: http://wikimediafoundation.org/w...

[... 41 words]

Which are the best front-end schools in London, UK?

General Assembly in Clerkenwell run several intensive courses relating to front-end web development that look very good.

[... 32 words]

Planning on visiting Portland for new years. What should I do/see/experience?

Eat street food! Portland has a well deserved reputation for some of the best street food anywhere. Nong’s Khao Man Gai is a must, but ask locals for recommendations or just follow your instincts and get stuck in.

[... 75 words]

What will HTTP be superseded by?

HTTP 1.x will likely never be completely replaced, but there is ongoing work at the moment to define HTTP 2.0. The first draft of this was released in November and is based on Google’s SPDY protocol, which is already widely deployed in Google Chrome and Google’s web properties (other browsers have experimented with support for SPDY as well): http://en.m.wikipedia.org/wiki/H...

[... 122 words]

Which language and framework would you use today?

Unless I had a very good reason to use something else (a pure websocket/real-time collaboration app perhaps) I’d go with stock Django on PostgreSQL and maybe a bit of Redis. Simple, powerful, stable and works reliably.

[... 50 words]

Is it viable to say to an investor that you will quit your job and work full-time on a startup, if you get the funding?

This will reflect badly on you. Why should an investor risk their money on your company if you aren’t even willing to take the risk of quitting your job for it?

[... 62 words]

What are good ways to develop software architectures using multiple languages?

There are a bunch of options for communicating between different languages, but these days the simplest is definitely JSON—it maps directly to common data structures in PHP, Python, Ruby and so on. Treat it as your common interchange format and you can’t go far wrong. It’s very easy to build simple internal web services on top of JSON.

[... 109 words]

What tools and techniques are used for relational database version control (structure and data)?

The term you are looking for is database migrations (sometimes called database change scripts).

[... 308 words]

If I study HTML5, can I avoid having to learn javascript?

Many of the most exciting new features that fall under the term HTML5 only make sense in the context of JavaScript—things like Canvas, Web Workers, AppCache and so on. So no, you can’t learn HTML5 properly without getting familiar with JacaScript.

[... 60 words]

Is Twitter using its public api for its own website?

You can use Firebug or the Chrome network inspector to answer this question for yourself. They used to use the API for pretty much all of the site, but I think they’re backing off that a little know heat they serve real pages with real URLs for things like individual profile pages.

[... 68 words]

What advice does Paul Graham commonly give Y Combinator startups?

Read the essays on http://www.paulgraham.com/—many of them are derived from advice he has already been giving YC startups.

[... 37 words]

What are some good books on data/chart presentation?

Edward Tufte’s The Visual Display of Quantitative Information is an absolute classic, and a truly beautiful book to own.

[... 34 words]

What are the best tech conferences & meetups to attend as an investor?

We have a good list of upcoming Startup related events on Lanyrd here: Startup conferences and events—including both iCal and RSS feeds and the ability to sign up and receive email updates. New events are being added by our community all the time.

[... 65 words]

How much Django should one know before going in for an interview for a developer position?

I’ve hired people for Django positions who didn’t know Django at all. If you’re a good web engineer you should be able to pick up Django in a few days, and be properly productive with it in a few weeks. Instead, I’m interested in testing your understanding of the key underlying concepts: HTTP, SQL, HTML and JavaScript, XSS, CSRF, scaling, cookies, web app security in general, web performance optimisation, unit testing, refactoring, model/template/view-or-controller—and evidence that you’ve solved problems relating to those in production environments.

[... 177 words]

Is it possible to restore an older version of a Pages doc without using Pages?

We recovered it!

[... 200 words]

What is the average registration fee for  attending an international conference?

It varies wildly depending on a whole bunch of factors: the length of the conference (one day events are a LOT cheaper than two day events), the industry (medical and financial events are way more expensive than education conferences), the country it’s being held in, the venue, the city (central London will be a lot more pricey than a medium sized town somewhere). I don’t think you’ll be able to get a good single answer to this question.

[... 95 words]

Are there guides for playing Minecraft on Mac laptops?

I play on a Mac laptop using the trackpad and ctrl+click for right clicking and that works absolutely fine. It’s worth fiddling with the keyboard commands in the options screen (as with any game) but I’ve found it to be perfectly playable otherwise.

[... 58 words]

How does the president structure his day?

Michael Lewis: Obama’s Way has a buch of interesting detail relating to this topic.

[... 28 words]

Is there a online service which provides details of all the events happening in a city?

The answer to this varies greatly from city to city. As a general rule though, no, there is no single service that can solve this (it’s actually an almost impossible problem to solve since events are by their nature decentralised).

[... 157 words]

How can some really large services (like Dropbox) afford to use Python as a primary language, if it’s one to two orders of magnitude slower than other, compiled languages?

Because raw language speed often doesn’t matter that much. In the case if Dropbox the client software spends most of its time waiting for bits to load from the network or from disk. Most large websites spend their time waiting for the database. You can’t speed up network or disk performance by using a faster language.

[... 91 words]

When traveling, what methods do you use to find unique, uncommon local experiences like art, music, events & shopping?

I run the following google searches:

[... 55 words]

What are the ways to show enthusiasm about programming?

Have cool side projects to show them.

[... 22 words]

What are your thoughts on desperate housewives’ final ending?

I was hoping that 8 seasons of lies, blackmail, murder and cover-ups would all come crashing down at once and every resident of Wysteria Lane would end up in jail.

[... 45 words]

Which social news websites for Python are out there?

There’s a Python subreddit: http://reddit.com/r/python

[... 21 words]

What programming language is primarily used in the making of big budget console games?

C++ still rules the roost here, but many games also integrate a dynamic scripting language of some kind for scripting level logic and so on. Lua is a popular option for this.

[... 52 words]

Which web startup conferences are there nowadays?

We have a pretty comprehensive list on Lanyrd—the site works like wikipedia, so if there are any we are missing you can sign in and add them to our Startups topic: Startup conferences and events

[... 51 words]