Home |  Blog |  Fasting With Juices and Shakes

How to Think Like a Programmer





1. Use a simple IF…THEN…ELSE construct to make most of your decisions

example:
IF “my boss gives me a raise” THEN
“stay at my job”
ELSE
“accept job offer from other firm”

2. Keep NESTED IF…THEN decisions to three levels or less. Any further and you risk confusion and turmoil down the line.

example of an IF…THEN construct that will confuse you down the line:
IF “my boss gives me a raise” THEN
IF “raise is greater than 20%” THEN
IF “leave days are also increased” THEN
“stay at my job”
ELSE
“ask for more training”
IF “boss agrees” THEN
“stay at my job”
ELSE
“ask for extra peformance bonus”
IF “boss agrees” THEN
“stay at my job”
ELSE
“quit”
ENDIF
ENDIF
ENDIF
ELSE
“ask to have 5 more leave days”
ENDIF
ELSE
“ask new company for more money”
IF “new company agrees” THEN
“accept job offer”
ELSE
“ask for more leave days”
IF “leave days are increased” THEN
“accept job offer”
ELSE
“ask for more training”
IF “boss agrees” THEN
“accept job offer”
ELSE
“ask for extra peformance bonus”
IF “boss agrees” THEN
“accept job offer”
ELSE
“accept job offer”
ENDIF
ENDIF
ENDIFENDIF
ENDIF

Shit, my head spun in circles just doing that. See how complicated it can get?

3. If you NEED lots of NESTED IF…THEN…ELSE, do modular decision-making. In the example above, negotiate the deeper items first before even considering the main question. In a nutshell, finish the details before looking at the big picture. :)

example:
IF “my boss gives me a raise” THEN
IF TERMS_ARE_ACCEPTABLE(raise percentage, leave days, training, bonus) THEN
“stay at my job”
ELSE
“quit”
ENDIF
ELSE
IF TERMS_ARE_ACCEPTABLE(raise percentage, leave days, training, bonus) THEN
“accept job offer”
ELSE
“accept job offer”
ENDIF
ENDIF

4. Solve your problems yourself until your eyes bleed. When your eyes start bleeding, ask others or check the internet forums. Download and integrate appropriate pre-built solutions or copy-paste the solutions into your life situation. Sure, you wasted time by not looking for help immediately but that’s how you like it.

5. Use REPEAT…UNTIL for things that challenge your treshhold, where the condition for UNTIL is always UNTIL “i am sick and tired of it”

example:
REPEAT
“wake up at 7″
“go to work at 9″
“take verbal abuse from supervisor”
“dream of going postal on the dork”
“attend boring meetings”
“take my paycheck”
“get drunk”
“ogle at girls”
UNTIL “i am sick and tired of it”

6. Always talk about the merits of good documentation (knowing your money is going, writing down your goals, etc.) but never do them anyway because there’s no time.

7. Be strong in your resolve that your next solution is always what will work.

8. Use DO…WHILE for things that you like, where WHILE is always WHILE “nothing better comes along.” :)

example:
DO “show courtesy at work” WHILE “google hasn’t called yet”

9. Keep things simple and cheap, use free resources until the parameters are big enough to require an upgrade.

10. Claim that your algortihm is flawless after a little testing. Like, if you got your girlfriend by giving her flowers and a little puppy, tell people that the way to get girls is to give them flowers and little puppies.

11. Blame the design, the users, the machine, the platform and the compiler. The code is flawless, it’s always them that’s wrong. After two days of complaining, figure out that the code is what’s actually wrong, fix it, and declare yourself brilliant!

12. No matter what people say, GOTO EXIT will always save you a lot of trouble. It’s ok to use it and quit things while you’re ahead. Just don’t tell anyone.

Technorati Tags: , ,







Leave a Reply