• Save
Programming and Minimalism: Lessons from Orwell and the Clash
Upcoming SlideShare
Loading in...5
×
 

Programming and Minimalism: Lessons from Orwell and the Clash

on

  • 2,779 views

Programming is writing. A programmer's job is to express abstract ideas in a specific language - just like the poet, the essayist, and the composer. But while writers and composers spend years ...

Programming is writing. A programmer's job is to express abstract ideas in a specific language - just like the poet, the essayist, and the composer. But while writers and composers spend years improving their style, many programmers think style stops with "two-space indentation". This needs to change.

This presentation will discuss style in music, writing, and software. We'll look at such diverse sources as George Orwell, Mozart, and punk music, and will find that much of art revolves around complexity and minimalism - just like software. Finally, we'll look at specific patterns and tools for writing software that is not just effective and efficient, but stylistically beautiful.

Statistics

Views

Total Views
2,779
Views on SlideShare
2,293
Embed Views
486

Actions

Likes
0
Downloads
0
Comments
0

3 Embeds 486

http://www.eamonn.org 264
http://jim.budet.net 216
https://twiki.hpl.hp.com 6

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Programming and Minimalism: Lessons from Orwell and the Clash Programming and Minimalism: Lessons from Orwell and the Clash Presentation Transcript

  • Programming and Minimalism Jon Dahl @jondahl jon@zencoder.comMonday, March 14, 2011
  • Monday, March 14, 2011
  • http://zencoder.com/jobsMonday, March 14, 2011
  • What is good programming?Monday, March 14, 2011
  • What is programming?Monday, March 14, 2011
  • ProcessMonday, March 14, 2011
  • Doing shitMonday, March 14, 2011
  • Defining complex processesMonday, March 14, 2011
  • Monday, March 14, 2011
  • Monday, March 14, 2011
  • Monday, March 14, 2011
  • Monday, March 14, 2011
  • Programming is like...Monday, March 14, 2011
  • Engineering http://www.flickr.com/photos/seattlemunicipalarchives/4818952324/Monday, March 14, 2011
  • Monday, March 14, 2011
  • Monday, March 14, 2011
  • nouns verbsMonday, March 14, 2011
  • Monday, March 14, 2011
  • CraftMonday, March 14, 2011
  • Monday, March 14, 2011
  • ToolsMonday, March 14, 2011
  • SkillMonday, March 14, 2011
  • Small teamsMonday, March 14, 2011
  • Habits and practicesMonday, March 14, 2011
  • WritingMonday, March 14, 2011
  • Defining complex processesMonday, March 14, 2011
  • http://www.flickr.com/photos/seattlemunicipalarchives/4818952324/Monday, March 14, 2011
  • Monday, March 14, 2011
  • Monday, March 14, 2011
  • Monday, March 14, 2011
  • Monday, March 14, 2011
  • Monday, March 14, 2011
  • Monday, March 14, 2011
  • Monday, March 14, 2011
  • Monday, March 14, 2011
  • Fire!Monday, March 14, 2011
  • Monday, March 14, 2011
  • What is good programming?Monday, March 14, 2011
  • Simple and interesting.Monday, March 14, 2011
  • Simple and interesting. Build on it.Monday, March 14, 2011
  • Simple and interesting. Build on it. Build on it.Monday, March 14, 2011
  • Simple and interesting. Build on it. Build on it. Build on it.Monday, March 14, 2011
  • Simple and interesting. Build on it. Build on it. Build on it. Build on it.Monday, March 14, 2011
  • Simple and interesting. Build on it. Build on it. Build on it. Build on it. Build on it.Monday, March 14, 2011
  • Simple and interesting. Build on it. Build on it. Build on it. Build on it. Build on it. Enormous, stale, and boring.Monday, March 14, 2011
  • Monday, March 14, 2011
  • Simple and interesting. loop { Build on it. } Enormous, stale, and boring. Start over, but retain the best parts.Monday, March 14, 2011
  • BachMonday, March 14, 2011
  • BachMonday, March 14, 2011
  • BachMonday, March 14, 2011
  • HaydnMonday, March 14, 2011
  • MozartMonday, March 14, 2011
  • MozartMonday, March 14, 2011
  • MozartMonday, March 14, 2011
  • BeethovenMonday, March 14, 2011
  • BeethovenMonday, March 14, 2011
  • BeethovenMonday, March 14, 2011
  • Monday, March 14, 2011
  • MahlerMonday, March 14, 2011
  • MahlerMonday, March 14, 2011
  • MahlerMonday, March 14, 2011
  • simplicity and complexityMonday, March 14, 2011
  • test toneMonday, March 14, 2011
  • white noiseMonday, March 14, 2011
  • white noiseMonday, March 14, 2011
  • Steve ReichMonday, March 14, 2011
  • Arvo PärtMonday, March 14, 2011
  • Philip GlassMonday, March 14, 2011
  • minimalismMonday, March 14, 2011
  • Monday, March 14, 2011
  • Monday, March 14, 2011
  • Monday, March 14, 2011
  • Monday, March 14, 2011
  • Monday, March 14, 2011
  • Monday, March 14, 2011
  • Monday, March 14, 2011
  • Monday, March 14, 2011
  • Monday, March 14, 2011
  • Monday, March 14, 2011
  • Monday, March 14, 2011
  • Monday, March 14, 2011
  • Monday, March 14, 2011
  • Monday, March 14, 2011
  • Monday, March 14, 2011
  • Monday, March 14, 2011
  • Monday, March 14, 2011
  • Monday, March 14, 2011
  • Monday, March 14, 2011
  • simplicity and complexityMonday, March 14, 2011
  • minimalismMonday, March 14, 2011
  • Monday, March 14, 2011
  • Monday, March 14, 2011
  • USA Patriot ActMonday, March 14, 2011
  • Expanded Surveillance ActMonday, March 14, 2011
  • PropagandaMonday, March 14, 2011
  • While freely conceding that the Soviet regime exhibits certain features which the humanitarian may be inclined to deplore, we must, I think, agree that a certain curtailment of the right to political opposition is an unavoidable concomitant of transitional periods, and that the rigors which the Russian people have been called upon to undergo have been amply justified in the sphere of concrete achievement.Monday, March 14, 2011
  • I am not, indeed, sure whether it is not true to say that the Milton who once seemed not unlike a seventeenth-century Shelley had not become, out of an experience ever more bitter in each year, more alien to the founder of that Jesuit sect which nothing could induce him to tolerate. Harold Laski, Essay in Freedom of ExpressionMonday, March 14, 2011
  • I am not, indeed, sure whether it is not true to say that the Milton who once seemed not unlike a seventeenth-century Shelley had not become, out of an experience ever more bitter in each year, more alien to the founder of that Jesuit sect which nothing could induce him to tolerate.Monday, March 14, 2011
  • I am not, indeed, sure whether it is not true to say that the Milton who once seemed not unlike a seventeenth-century Shelley had not become, out of an experience ever more bitter in each year, more alien to the founder of that Jesuit sect which nothing could induce him to tolerate.Monday, March 14, 2011
  • 1. Never use a metaphor, simile, or other figure of speech which you are used to seeing in print.Monday, March 14, 2011
  • 2. Never use a long word where a short one will do.Monday, March 14, 2011
  • 3. If it is possible to cut a word out, always cut it out.Monday, March 14, 2011
  • 4. Never use the passive where you can use the active.Monday, March 14, 2011
  • 5. Never use a foreign phrase, a scientific word, or a jargon word if you can think of an everyday English equivalent.Monday, March 14, 2011
  • 6. Break any of these rules sooner than say anything outright barbarous.Monday, March 14, 2011
  • clear writing ➡ clear thinkingMonday, March 14, 2011
  • bad writing ➡ bad thinkingMonday, March 14, 2011
  • bad writing ➡ bad thinking ➡ totalitarianismMonday, March 14, 2011
  • What is good programming?Monday, March 14, 2011
  • minimalismMonday, March 14, 2011
  • Defining complex processesMonday, March 14, 2011
  • minimalismMonday, March 14, 2011
  • clear, direct writingMonday, March 14, 2011
  • 1. Always take the simplest approach to a problem.Monday, March 14, 2011
  • 2. Clever code is bad code.Monday, March 14, 2011
  • module ApplicationHelper def me?(user=@user) returning(user == current_user) do |me| yield if me && block_given? end end endMonday, March 14, 2011
  • <% me?(@user) do %> <p><%= @user.private_info %></p> <% end %>Monday, March 14, 2011
  • module ApplicationHelper def me?(user=@user) returning(user == current_user) do |me| yield if me && block_given? end end endMonday, March 14, 2011
  • module ApplicationHelper def me?(user) yield if user == current_user end endMonday, March 14, 2011
  • 3. Any code that isn’t doing something is harming your project.Monday, March 14, 2011
  • 4. Accept constraints.Monday, March 14, 2011
  • 5. If it isn’t local business logic, it should be a library.Monday, March 14, 2011
  • view -> controller -> modelMonday, March 14, 2011
  • model -> library -> open libraryMonday, March 14, 2011
  • 6. Don’t over-abstract.Monday, March 14, 2011
  • @user.groups.map(&:name).to_sentenceMonday, March 14, 2011
  • class User def group_list group_names = groups.map do |group| group.name end group_names.to_sentence end endMonday, March 14, 2011
  • admin_roles.include?(@user.role) ? @user.groups.map {|g|g.name }.sort_by(&:name).to_sentence : @user.groups.select {|g|g.public? }.map {|g| g.name }.sort_by(&:name).to_sentenceMonday, March 14, 2011
  • 7. Always actively clean up. Constantly.Monday, March 14, 2011
  • map.connect :controller/:action/:id.:format has_and_belongs_to_many :roles start_form_tag activate_users_urlMonday, March 14, 2011
  • Monday, March 14, 2011
  • 8. Apply these rules wisely.Monday, March 14, 2011
  • 9. Simple code is beautiful.Monday, March 14, 2011
  • 10. Break hard problems down.Monday, March 14, 2011
  • Defining complex processesMonday, March 14, 2011
  • http://www.flickr.com/photos/seattlemunicipalarchives/4818952324/Monday, March 14, 2011
  • Monday, March 14, 2011
  • Monday, March 14, 2011
  • flight.book_flight_for(customer)Monday, March 14, 2011
  • def book_flight_for(customer) reserve_flight_for(customer) customer.charge(cost) customer.notify(details) endMonday, March 14, 2011
  • def reserve_flight_for(customer) if flight.available? mark_flight_reserved_for(customer) end endMonday, March 14, 2011
  • def charge(cost) ... endMonday, March 14, 2011
  • def notify(details) ... endMonday, March 14, 2011
  • 10. Break hard problems down.Monday, March 14, 2011
  • ConsumeMonday, March 14, 2011
  • StudyMonday, March 14, 2011
  • ProduceMonday, March 14, 2011
  • you have a programming styleMonday, March 14, 2011
  • make it betterMonday, March 14, 2011
  • minimalMonday, March 14, 2011
  • clearMonday, March 14, 2011
  • directMonday, March 14, 2011
  • effectiveMonday, March 14, 2011
  • beautifulMonday, March 14, 2011
  • write beautiful codeMonday, March 14, 2011
  • Jon Dahl @jondahl jon@zencoder.comMonday, March 14, 2011