Simon Willison’s Weblog

Subscribe

140 items tagged “programming”

2020

elite-source.asm—annotated source code for Elite on the BBC Micro (via) Mark Moxon has annotated every single line of the source code for Elite on the BBC Micro, and his annotations are so clear and in-depth that I can follow it despite knowing next to nothing about assembly code (and certainly nothing about writing it for the BBC). # 28th September 2020, 2:30 am

2018

Interviewing a developer for whom English wasn’t his first language and he kept calling legacy code “legendary code” and now that’s all I want to write.

Mark Norman Francis # 17th July 2018, 5:43 pm

awesome-falsehood: Curated list of falsehoods programmers believe in (via) I really like the general category of “falsehoods programmers believe”, and Kevin Deldyckehas done an outstanding job curating this collection. Categories covered include date and time, email, human identity, geography, addresses, internationalization and more. This is a particularly good example of the “awesome lists” format in that each link is accompanied by a useful description. # 8th April 2018, 7:57 pm

Code is like a poem; it’s not just something we write to reach some practical result. Sometimes people that are far from the Redis philosophy suggest using other code written by other authors (frequently in other languages) in order to implement something Redis currently lacks. But to us this is like if Shakespeare decided to end Enrico IV using the Paradiso from the Divina Commedia. Is using any external code a bad idea? Not at all. Like in “One Thousand and One Nights” smaller self contained stories are embedded in a bigger story, we’ll be happy to use beautiful self contained libraries when needed. At the same time, when writing the Redis story we’re trying to write smaller stories that will fit in to other code.

The Redis Manifesto # 2nd March 2018, 7:11 pm

By far the most important lesson I took out of this game is that whenever there’s behavior that needs to be repeated around to multiple types of entities, it’s better to default to copypasting it than to abstracting/generalizing it too early.

This is a very very hard thing to do in practice. As programmers we’re sort of wired to see repetition and want to get rid of it as fast as possible, but I’ve found that that impulse generally creates more problems than it solves. The main problem it creates is that early generalizations are often wrong, and when a generalization is wrong it ossifies the structure of the code around it in a way that is harder to fix and change than if it wasn’t there in the first place.

SSYGEN # 26th February 2018, 5:23 am

2016

What’s the cheapest or free stack solution to deploy and experiment with a realtime application in 2016?

Heroku have a good free tier, and comprehensive support for deploying both Python and Node.js. If you are mainly interested in realtime I would suggest starting out with Node.js on Heroku. Depending on the complexity of your project you might even be able to use raw Node.js without adding something like Express.

[... 81 words]

2015

Are traditional web frameworks and languages like RubyOnRail, Spring Boot and PHP dying now when new fast reactive pure JavaScript frameworks and services like Meteor, Node, Angular 2.0 and Firebase are breaking ground?

No.

[... 40 words]

2014

Have you ever experienced a boost in productivity by switching to a different programming language?

Switching from PHP to Python (over a decade ago now) dramatically improved my productivity as a programmer.

[... 38 words]

How does one decide which Javascript framework (e.g. Node, Backbone, Angular) to use on any given project?

If you are just learning JavaScript, I suggest trying to work without any frameworks or libraries at all. Starting with something like Angular will make it much harder for you to learn the core language and browser APIs.

[... 137 words]

2013

Is there an application like Duolingo, but for math?

Khan Academy have a points, levels and achievements system for mathematics that is similar to the method used by duolingo.

[... 35 words]

Is there a substantial difference between using a Mac or a Windows machine for web development (particularly RoR)?

No matter if you are on Mac or Windows you should be using a Linux virtual machine for development, ideally running the same operating system as you deployment environment (I like Ubuntu for this). Vagrant is a popular tool for managing this kind of setup.

[... 151 words]

Is greater comfort with Windows a good enough reason to switch from PHP to ASP.NET?

Learning Linux really isn’t that hard, and it will dramatically increase your potential horizons as a programmer. Install Ubuntu on a virtual machine on your laptop and start running through some tutorials.

[... 53 words]

Which format for API documentation programmers prefer: PDF or Web?

HTML is a better format for documentation than PDF.

[... 160 words]

Log Management: What is the complexity behind Loggly and similar services?

Pricing isn’t about how hard it is to build something (and building a reliable, highly-scalable centralized log search and archiving system isn’t trivial). It’s about how much value it provides to the customer.

[... 204 words]

What is the ways to view the examples without download the example files in github?

If you can view the file on raw.github.com you can drop the first dot to view it on rawgithub.com—a free proxy service.

[... 107 words]

Using AWS, as my cloud, what is left for me to work on? Is it enough for me to just write the html+css code and programming language code (python)? Or do I stil have to work with mysql and backend stuff? I am pretty new at programming, so I hope it i...

Using a cloud server platform like Amazon EC2 unfortunately will not protect you from needing to understand basic server adminstration—it’s not that different from running your own physical server, except that if you screw up the configuration it’s much easier to throw everything away and start from scratch.

[... 134 words]

Why doesn’t Google use their resources to improve coding languages?

Google invest vast resources in to language improvements, and have been doing so for over a decade now. Just off the top of my head...

[... 184 words]

Which is more productive for a professional software engineer: Sublime Text or Notepad++?

Sublime Text 2. It is cross-platform and hence won’t lock you in to Windows.

[... 33 words]

What computers do Google engineers use when doing heavy programming?

Loads of people at Google use Macs. Google as a company is way too smart to stop using a good product just because it is produced by a competitor.

[... 45 words]

How can I convince my boss that I should dedicate time to clean an important part of our code base?

It sounds like your boss needs to learn about the concept of Technical Debt: http://www.codinghorror.com/blog...

[... 42 words]

What’s best the site to visit to START building a website?

There are two ways to approach this: you can try and learn HTML yourself, or you can use tools that will help you build websites quickly without needing to code.

[... 114 words]

Will a professional programmer lose anything if he doesn’t learn object oriented programming?

Yes. OOP is a very important programming concept—a professional programmer who is not familiar with it will be unable to understand vast swathes of high quality existing code and will have a great deal of trouble passing interviews or contributing effectively at great companies.

[... 95 words]

Would you test your web app against simulated infrastructure failure?

I think this is a pretty interesting idea—simulating these kind of conditions isn’t easy so I imagine many teams don’t bother. If it was good (really easy to get started with, great control and reporting tools, maybe helped set up the actual tests to replay) and I trusted the service I would definitely consider paying for it.

[... 125 words]

What is way that android connect to Oracle database?

As a general rule it’s not a good idea to allow mobile devices to connect directly to a server-side database, as it’s an invitation to hackers to figure out what’s going on and then connect to the database themselves for nefarious reasons.

[... 105 words]

How can one become a masterful Rails developer (and still have a life)?

Don’t sacrifice your social life. Sacrifice TV.

[... 79 words]

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]