Simon Willison’s Weblog

Subscribe

Items tagged webdevelopment in 2012

Filters: Year: 2012 × webdevelopment × Sorted by date


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]

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]

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]

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]

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]

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]

How do I really learn coding?

Build real websites. Find a project and work on it. A personal blog is a great project as it can be simple to start with and get more complex over time.

[... 44 words]

Django (web framework): What are the Best Practice For Displaying another Website from yours?

This isn’t really a Django-specific question—the answer would be the same no matter what server-side tech you use.

[... 121 words]

Can you recommend a few video lectures on web application design with Redis?

We have a collection of 27 videos of conference talks that cover Redis on Lanyrd, gathered by our community: Redis Videos | Lanyrd

[... 74 words]

What are some apps, problems you would suggest to solve a new python developer?

The best way to learn python in my opinion is using the interactive prompt. Install ipython (a massive improvement on the standard python shell) and use it to interactively solve some simple tasks—things like downloading a CSV file from the web using the urllib library, parsing it with the csv module, then poking around in the data using python list comprehensions and saving some of the results out to a JSON file.

[... 95 words]

Can you mark items on a website as ’unread’ without cookies?

It’s not very exciting, but CSS will let you set different styles for visited vs unvisited links and the technique has worked reliably since the mid 1990s.

[... 44 words]

How should one go about designing a simple web based collaborative text editor?

Take a look at the open source ShareJS library, which implements a bunch of the fundamental (and extremely tricky) algorithms you need to get collaborative editing in the browser to work well: https://github.com/josephg/ShareJS/

[... 53 words]

How can I keep my website content exclusive?

No, there isn’t—people can always copy things if they really want to, it’s part of the cost of doing business. If you were to publish a book people could always photocopy it.

[... 108 words]

Any source available to download sample data (in 10+ GB) for testing?

Wikipedia has some pretty interesting dumps, in both XML and SQL format: http://meta.wikimedia.org/wiki/I...

[... 100 words]

How difficult is to to learn a language framework, like node.js?

The answer varies enormously depending on the language and the framework. Some frameworks are very easy to pick up, others are harder.

[... 162 words]

What is a development framework?

The most useful distinction, in my opinion, is to think about the difference between a framework and a library.

[... 271 words]

Did Mark Zuckerberg have any knowledge on building scalable social networks prior to starting work on Facebook?

I’m going to bet he didn’t have this knowledge, simply because back when he launched Facebook in 2004 almost NO ONE had this knowledge—there simply weren’t enough “web scale” products around for the patterns needed to run them to be widely discussed.

[... 143 words]

How does a new Website that depends on content from users start?

The tried and tested way to solve this problem is with a closed alpha period. Launch the site as a private alpha, then invite a bunch of people you know and trust to start trying it out. Once you launch to the public you’ll already have some content and more importantly you’ll have set an example of how new users to the site should behave.

[... 121 words]

Can you use dropbox to host a wordpress site?

No. Running WordPress requires a web host that supports PHP. Dropbox only supports static content.

[... 30 words]

Why weren’t the features of Sass originally built into CSS?

This is not a straight-forward issue: CSS has a very long, complicated history. A good starting point for understanding the reluctance of the CSS working group to add variables/constants etc to CSS is this essay by Bert Bos of the W3C (entitled Why “variables” in CSS are harmful) http://www.w3.org/People/Bos/CSS...

[... 66 words]

How can a web developer keep up with new technology?

Keep an eye on Hacker News: http://news.ycombinator.com/

[... 111 words]

Why do tech companies provide MacBooks for software development?

Smart tech companies give their engineers the laptops that they ask for. Engineers are EXPENSIVE, and anything you can do to increase their productivity is worth the money. If they prefer to work on a Mac, buy them a Mac.

[... 55 words]

What’s the best way to handle logins?

First, make sure you’re storing the password as a salted hash, using a deliberately slow hashing algorithm such as bcrypt, scrypt or PBKDF2—here are some recent articles to get you up to speed:

[... 176 words]

Does Amazon have a API for websites to utilize order and delivery fulfillment?

The Amazon Fulfillment Web Service used to handle this http://aws.amazon.com/fws/—but their site now says "Effective June 2012, Amazon Services will no longer support Amazon Fulfillment Web Service (Amazon FWS). All functions and services currently supported by Amazon FWS are currently available through Amazon Marketplace Web Service (Amazon MWS)." So I guess you want the Amazon Marketplace Web Service: https://developer.amazonservices...

[... 82 words]

Ideas on how to secure good clients for web development? Or—How to turn my skills into decent pay?

Don’t get work through elance—get stuff from your personal network instead. If you don’t have a personal network, start building one!

[... 230 words]

Are there any website thumbnail services that generate images in real-time?

http://url2png.com/ generates images on demand—you pass the URL directly to the service and it replies with a PNG image. The first load can take a few seconds (depending on how long it takes the originating site to serve up the assets etc) but they cache the generated images so future requests for the same URL will be served instantly.

[... 79 words]

Is there such thing as a specific multi-site search?

Yes—Blekko does exactly this, with its “slashtags” feature: http://help.blekko.com/index.php...

[... 27 words]

How do you know the real size of a web page?

The Google Chrome developer tools can do this, on the Network tab. Take a look at the bottom blue bar (which says “5 requests | 29.49KB transferred”)

[... 51 words]

Has JSON pretty much replaced XML for string processing for the web, or are there use cases where XML is still necessary?

It’s replaced XML as the default format for most APIs. XML is still necessary for Atom/RSS feeds and other existing standards built on top of XML. It’s also a better choice than JSON for markup-style data—stuff like XHTML where tags are applied to sequences of characters within larger chunks of text.

[... 81 words]