Ideas are a dime a dozen
30 April 2010 at 09:23
Filed Under: coding
It's common for the "business" people to have an idea and think that's what they're bringing to the table. I've had guys approach me to offer 5-25% equity in their imaginary company if I'll just build the product for free.
My response is, generally, "How about I build this and hire you when I'm done to sell it?" They'll protest "But this is my idea!" Who cares? Ideas are worth absolutely nothing. I have stacks of ideas that are gathering dust because I haven't had the time to do anything with them. Why should I suddenly stop everything and try to make you rich with my skills and then, inevitably, watch you try to screw me later if it works? Because you had an idea? Awesome - go to the library and check out PHP for Dummies and see if you can execute it.
Sales that haven't occurred are also worth nothing. If you want me to work for you, you need to bring something to the table - a paycheck, capital in the bank, connections or contracts that have been signed on the line that is dotted. Otherwise you're just a loser in a suit looking for a handout.
Reposted from a comment on reddit
Coder's Vocab #1 : Idempotent
09 April 2010 at 09:00
Filed Under: Vocab
In programming, the term idempotent describes a method that can be called multiple times without changing the result. Sometimes it can be a symptom of madness or incompetence - I've seen code where a save() method was called repeatedly "just in case."
Besides scratching the itch of the insane among us, idempotent routines are important. For a simple example, consider the "Checkout Button" on a typical ecommerce form. Often you will see strong language around the button asking the user to only click the button once - otherwise multiple orders will be placed and all sorts of pain and confusion may result. A common "solution" to this is disabling the button after the first click. A better solution would be writing the routine that is saving the order as an idempotent operation. In other words, it shouldn't matter how many times you save the order, you're just saving the same thing. This can be accomplished in myriad ways, from using a "replace into" database query or creating the key once and updating the database against that key.
Quiz Time! Which of the methods could be described as idempotent?
1.
function double($x) {
return $x * 2;
}
2.
$x = 2;
3.
$x = md5($x);
4.
function append($x,$y){
$x[] = $y
}
Find creatine and protein supplements now.
