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.
96. 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
97. 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 Expression
Monday, March 14, 2011
98. 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
99. 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
100. 1. Never use a metaphor, simile, or
other figure of speech which you
are used to seeing in print.
Monday, March 14, 2011
101. 2. Never use a long word where a
short one will do.
Monday, March 14, 2011
102. 3. If it is possible to cut a word
out, always cut it out.
Monday, March 14, 2011
103. 4. Never use the passive where
you can use the active.
Monday, March 14, 2011
104. 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
105. 6. Break any of these rules sooner
than say anything outright
barbarous.
Monday, March 14, 2011
116. module ApplicationHelper
def me?(user=@user)
returning(user == current_user) do |me|
yield if me && block_given?
end
end
end
Monday, March 14, 2011
117. <% me?(@user) do %>
<p><%= @user.private_info %></p>
<% end %>
Monday, March 14, 2011
118. module ApplicationHelper
def me?(user=@user)
returning(user == current_user) do |me|
yield if me && block_given?
end
end
end
Monday, March 14, 2011
119. module ApplicationHelper
def me?(user)
yield if user == current_user
end
end
Monday, March 14, 2011
120. 3. Any code that isn’t doing
something is harming your project.
Monday, March 14, 2011