weblog.raganwald.com
Too much of a good thing: not all functions should be object methods
http://weblog.raganwald.com/2007/10/too-much-of-good-thing-not-all.html
This is a snapshot of my old weblog. New posts and selected republished essays can be found at raganwald.com. Thursday, October 25, 2007. Too much of a good thing: not all functions should be object methods. OOP is several different ideas put together, the most important of which is. Mdash; Information Hiding. Objects are responsible for their data and for their algorithms. Should objects be responsible for all of their own behaviour? Mdash;H. L. Mencken. In practice, each object in a system can be invol...
weblog.raganwald.com
Golf is a good program spoiled
http://weblog.raganwald.com/2007/12/golf-is-good-program-spoiled.html
This is a snapshot of my old weblog. New posts and selected republished essays can be found at raganwald.com. Thursday, December 20, 2007. Golf is a good program spoiled. A reader mentioned that “It’s not about lines of code.” And he was right: Brevity alone is an unreliable way to judge a program. The problem is—quite simply—the existence of Golf. In any Turing Equivalent language, it is possible to construct programs that are very small and very difficult to understand. Brevity is not our goal, but it.
weblog.raganwald.com
Object#andand & Object#me in Ruby
http://weblog.raganwald.com/2008/01/objectandand-objectme-in-ruby.html
This is a snapshot of my old weblog. New posts and selected republished essays can be found at raganwald.com. Thursday, January 24, 2008. Object#andand and Object#me in Ruby. Ruby programmers are familiar with the two. The typical use for them is when you have a variable that might be nil. For example:. First name & = @first name.trim. You are trimming the first name provided it isn’t nil, and you are assigning ‘612-777-9311’ to the phone if it. Won’t work because. It can cause a lot of damage. Note that...
weblog.raganwald.com
Don't Overthink FizzBuzz
http://weblog.raganwald.com/2007/01/dont-overthink-fizzbuzz.html
This is a snapshot of my old weblog. New posts and selected republished essays can be found at raganwald.com. Wednesday, January 24, 2007. I noticed some traffic coming to my post on juggling. From Using FizzBuzz to Find Developers who Grok Coding. Like me, the author is having trouble with the fact that 199 out of 200. Applicants for every programming job can’t write code at all. I repeat:. They can’t write any code whatsoever. One of the nice things about using a tiny problem is that anyone who has wri...
weblog.raganwald.com
The 128-bit programming challenge
http://weblog.raganwald.com/2007/05/128-bit-programming-challenge.html
This is a snapshot of my old weblog. New posts and selected republished essays can be found at raganwald.com. Wednesday, May 02, 2007. The 128-bit programming challenge. Information wants to be free. Mdash;One of the lessons from The Media Lab: Inventing the Future at M. I. T. Here’s a programming challenge:. Write a program that produces 128 specific bits of output. In the simplest case, output those 128 bits in a standard numeric form such as sixteen pairs of hexadecimal digits. Your program may. Or if...
weblog.raganwald.com
A programming language cannot be better without being unintuitive
http://weblog.raganwald.com/2008/01/programming-language-cannot-be-better.html
This is a snapshot of my old weblog. New posts and selected republished essays can be found at raganwald.com. Monday, January 07, 2008. A programming language cannot be better without being unintuitive. Optimising your notation to not confuse people in the first 10 minutes of seeing it but to hinder readability ever after is a really bad mistake. Mdash;David MacIver, via In Defence of (0/:l) in Scala. Or as Jef Raskin put it:. Mdash;Jef Raskin, Intuitive Equals Familiar. Complaining that a programming la...
weblog.raganwald.com
The Narcissism of Small Code Differences
http://weblog.raganwald.com/2008/05/narcissism-of-small-code-differences.html
This is a snapshot of my old weblog. New posts and selected republished essays can be found at raganwald.com. Tuesday, May 13, 2008. The Narcissism of Small Code Differences. Def formatted zip code(digits). When 4 then "0#{digits}". When 3 then "00#{digits}". Is the perfect second Ruby book for serious programmers. The Ruby Way contains more than four hundred examples explaining how to do everything from distributing Ruby to functional programming techniques like the Y combinator. Donning The Hair Shirt.
weblog.raganwald.com
Macros, Hygiene, and Call By Name in Ruby
http://weblog.raganwald.com/2008/06/macros-hygiene-and-call-by-name-in-ruby.html
This is a snapshot of my old weblog. New posts and selected republished essays can be found at raganwald.com. Sunday, June 22, 2008. Macros, Hygiene, and Call By Name in Ruby. Never send a macro to do a function’s job. Sound advice, however just because functions (or methods) are better than macros for the things they both can do, that doesn’t mean functions can do everything macros can do. Let’s look at andand. For a moment. When you write:. Using the andand gem, Ruby treats this something like:. It doe...
weblog.raganwald.com
Are you in?
http://weblog.raganwald.com/2007/11/are-you-in.html
This is a snapshot of my old weblog. New posts and selected republished essays can be found at raganwald.com. Monday, November 05, 2007. Right now we are in the middle of the biggest land rush in computer history. For those of you who are too busy getting stuff done to keep score, there was a big rush to create computer companies. IBM won the sweetest and biggest estate on that one. Then we watched wave after wave of companies bringing out smaller computers: Digital, Apple, IBM. Way better than the one o...
SOCIAL ENGAGEMENT