Simon Willison’s Weblog

Subscribe

147 items tagged “programming”

2013

For a Django application, deployed on Heroku, what are my options for storing user-uploaded media files?

S3 is really a no-brainer for this, it’s extremely inexpensive, very easy to integrate with and unbelievably reliable. It’s so cheap that it will be practically free for testing purposes (expect to spend pennies a month on it).

[... 88 words]

Why do programmers tend to fall in love with non-mainstream languages?

Just because something is popular doesn’t mean it’s right for every person, every problem or every situation. If no one ever explored non-mainstream options, better solutions would never be discovered.

[... 47 words]

What is the best framework to use, Yii or Ruby on Rails?

This is a big decision, and it’s worth taking the time to pick what’s the best fit for you. I recommend going through the tutorials for each one, building the basic application they describe and seeing which made the most sense to you. As a Django developer, I suggest trying that framework too :)

[... 126 words]

What are some techniques, workflows, thought-processes etc. you would do as an experienced web-developer (front-end/back-end) that a new web developer might benefit from?

Learn the Chrome Developer Tools inside out, and live in them—especially the interactive JavaScript console, which can be a huge boon to your productivity.

[... 56 words]

Should a beginner to web development start out with Node.Js?

Maybe. One of the things I like about Node.js is that the raw abstraction it provides over HTTP is much closer to how the actual protocol works than the abstractions provided many of the more widely used frameworks such as PHP, Django or Rails. That might actually make it an effective learning tool—I’d be interested in hearing from some web developers who learnt Node.js as their first server-side technology.

[... 87 words]

What are some resources to read when designing a new client-server application layer protocol?

I suggest avoiding designing a custom protocol and using Protocol Buffers, Apache Thrift or Cap’n Proto instead.

[... 40 words]

What are some of the best programming/technical questions on scalability?

“How would you architect Twitter?”

[... 21 words]

How is a dictionary (key value) related to a hash?

The following terms describe essentially the same data structure across a number of different languages:

  • A Perl hash
  • A Ruby hash
  • A Python dictionary
  • A Java Map (an interface used by HashMap and others)
  • A Lua table
  • A JavaScript object (if you ignore object prototypes)

[... 56 words]

What are some books that programmers should read to understand logic?

Logic is more of a mathematical concept than a computer science concept—programming books are unlikely to focus on it.

[... 69 words]

What are the most useful software everyone should use for programming and web development?

Some flavour of Linux.

[... 24 words]

What is the best resource for someone who is non-technical to learn about computer programming/creating software?

Learn to program. You don’t need to learn programming to the standard where you could work professionally as a software engineer, but having enough programming knowledge to write some simple programs and automate some simple tasks will make you enormously more capable when it comes to working with programmers—or in business life in general.

[... 135 words]

Is there any alternative to devbootcamp.com or hackreactor.com in Europe?

http://www.makersacademy.com/ are running a similar program in the Old Street area of London.

[... 30 words]

How can I become a world-class coder in under three years?

Write code. Lots of code. Code that does stuff.

[... 95 words]

Is it difficult to make a dating site? My budget is small. Any suggestion?

Yes, it’s hard. Technologically, dating sites are not that complicated. The difficulty is keeping them populated enough that they remain useful for your users.

[... 159 words]

Does creating a zip file with php use more RAM then CPU? Or vise versa? Also, is it faster to use a system call, or the php zip library? Exec (zip filename.zip) vs. $zip =new ZipArchive().

You can find out the answer yourself using a very simple benchmark—just call time() before and after each option and loop them a few thousand times to calculate an average.

[... 74 words]

Which companies in London are using Python?

We use Python/Django for http://lanyrd.com/—we’re based in London.

[... 39 words]

How do you become a good programmer?

In my experience new programmers progress a LOT faster if they’re learning with a higher level dynamic language such as Python or Ruby than if they only use C++ or Java. That’s not to say it isn’t a good idea to learn Java/C++ (though I’d encourage you to learn C as a lower-level language) but you may find you pick up programming concepts a whole bunch faster with a language that has a good interactive prompt.

[... 126 words]

What advice would Simon Willison give to a beginner Python/Django developer?

Build something and put it on the internet. Make sure you have an easy way to deploy new versions (Heroku is a good bet if you don’t want to figure out Fabric). Pick a project that’s useful to you—a simple blogging engine is often a good bet, or maybe something that aggregates together your posts from Twitter and Instagram and so on. Or come up with something a bit more creative!

[... 109 words]

In which programming language do programmers get paid the most?

The best (and best paid) software engineers work in multiple languages, and pick new ones up as and when they need to. If you pigeon-hole yourself as an “X programmer” you’ll limit yourself to relatively uninteresting, interchangeable roles.

[... 54 words]

Which should I learn: Python or PHP?

Python will teach you more about programming than PHP—and you’ll be able to learn PHP easily if you learn Python first.

[... 36 words]

What are the best books/tutorials to begin learning about memcached?

There isn’t really enough of memcached to justify a whole book—it’s a pretty straight-forward API.

[... 100 words]

What are some hidden features of Python?

Generators and Iterators are pretty amazing. These two tutorials will really open your eyes as to how powerful they can be:

[... 63 words]

Which web/software development conferences a student should attend and why?

Offer to volunteer at conferences. If accepted, you’ll get in for free and you’ll get to meet loads of people (including spending time with the speakers)—in exchange for a full days work manning desks, finding speakers in time for their talks, giving people directions and generally helping organise and clean things up.

[... 104 words]

What are the most commonly used or most interesting open-source packages and software?

I’d say the open source browser engines, Gecko (Firefox) and WebKit (Safari, Chrome, iOS, Android) are probably some of the most important and widely used pieces of open source code these days.

[... 51 words]

Does it still make sense to become a Java developer, or should I migrate to PHP or .NET?

It sounds like you need to expand your horizons a little further. The best programmers I know these days aren’t working solely in Java, PHP or .NET—they may use one those languages, but they’ll also be getting stuck in to dynamic languages such as Python, Ruby, JavaScript or Scala.

[... 222 words]

2012

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]

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]

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]

What are the ways to show enthusiasm about programming?

Have cool side projects to show them.

[... 22 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]