09 Nov '12, 6pm

Code that says why it does

November 9, 2012 Tagged: programming Comments (View) Code that says why it does A new developer joins a project, and asks in Campfire: “what is the purpose of the can_refer_other_users flag?” The flag in question is a boolean column on User. Rails automatically created a query method for this column, which is used like so: if can_refer_other_users? # allow user to refer end The new developer’s innocuous query reveals an important subtlety between code that describes its job, and code that makes its purpose clear. At first glance, a name like can_refer_other_users seems quite good. You’re reading it now without any context, and can probably guess exactly what it does. The problem is, there are no clues about why we wouldn’t let a user refer others. Since growth is good, it’s counter-intutive that we’d block it. Looking in the database, most users have it set to true, with a...

Full article: http://robots.thoughtbot.com/post/35347834335/code-that-s...

Tweets

Teach Yourself to Code: One Month Ruby on Rails:

skillshare.com 09 Nov '12, 4pm

Presenting the Easiest Way Ever Developed to Learn to Code Do you know why developers get paid on average $120,000 or more...

"Branching the database along with the code" (a...

mislav.uniqpath.com 08 Nov '12, 10pm

Note: this article and supporting code have been heavily simplified since their initial publication. If you’re doing all y...

Fork Your Application's Data (Not Just Your Code)

rubyflow.com 08 Nov '12, 7pm

Fork Your Application's Data (Not Just Your Code) Posted by schneems on November 08, 2012 — 0 comments Heroku just launche...

Social media meets morse code

Social media meets morse code

edn.com 10 Nov '12, 10pm

Steve Hicks and Greg Jurrens explain what went into designing the ultimate, easy-to-use ham radio and how advances in anal...

Here's a family dinner idea - order FoodPanda 40% OFF Coupon code #foodpanda #singapore #delivery #dining #christmas

Here's a family dinner idea - order FoodPanda 4...

singapore-promotions.com 09 Nov '12, 7am

FoodPanda introduces a convenient food ordering service for customers and provides a great variety of culinary choices onl...

No more queues with QR code movie tickets: Golden Village's new cinema in Singapore will be equipped with automa...

No more queues with QR code movie tickets: Gold...

asia.cnet.com 08 Nov '12, 12pm

Will QR codes kill the movie ticket? (Credit: Jacqueline Seng/CNET Asia) Golden Village (GV), a cinema operator in Singapo...

Currency code for bitcoin: Comments:

news.ycombinator.com 12 Nov '12, 1pm

Hacker News new | comments | ask | jobs | submit login Currency code for bitcoin (change.org) 5 points by lelf 1 hour ago ...

Foxconn may release 130-inch TV products in the...

digitimes.com 09 Nov '12, 3am

Foxconn may release 130-inch TV products in the future, says company vice president Julian Ho, Taipei; Alex Wolfgram, DIGI...

The Government of Gabon Says No To Kim Dotcom’s...

thedomains.com 07 Nov '12, 2pm

A few days ago Kim Dotcom announced his plan for a new version of his Megaupload site which would use the domain name Me.g...

Ahora mismo aprende Ruby on Rails con @kinduff,...

ninjacode.tv 08 Nov '12, 2am

Ninja Code TV es un canal para apasionados del código donde podemos charlar sobre temas interesantes de desarrollo o diseñ...

No fatwa on ‘belligerent infidel’ term used in ...

blog.limkitsiang.com 07 Nov '12, 12am

By Mohd Farhan Darwis The Malaysian Insider Nov 06, 2012 KUALA LUMPUR, Nov 6 — The National Fatwa Council has never issued...

November Godaddy Promo Code: $1.99 for a New Dot Com Registration #news #domaining #domain

November Godaddy Promo Code: $1.99 for a New Do...

domainshane.com 04 Nov '12, 8pm

November Godaddy Promo Code: $1.99 for a New Dot Com Registration By ShaneCultra - November 4, 2012 - 0 Comments Godaddy h...

Nine speeds enough for transmissions, says ZF boss

Nine speeds enough for transmissions, says ZF boss

paultan.org 07 Nov '12, 2am

The nine-speed transmission might be where the race to add gears ends, ZF Friedrichshafen CEO Stefan Sommer said, accordin...

Report: Ford Focus EV is 'not a compliance car,' executive says

Report: Ford Focus EV is 'not a compliance car,...

green.autoblog.com 06 Nov '12, 10pm

executive is speaking out against claims that the Ford Focus Electric is merely a bit of lip service to California's zero-...