Coding under influence...

Have you coded / tried coding when you were high? The question just popped in my mind after reading the ‘beer for all’. Looks to be a suitable question for a weekend.

Tried yesterday (ironically enough you had good timing asking this question). Got as far as writing the skeleton structure behind the code (void setup; void loops)…

I have enough trouble remembering the syntax for void setup() and void loop() when I’m sober :P! I always confuse capitalization, etc, and end up opening the “Bare Minimum” in the IDE which already has those.

Sometimes I find that I code better after a Scotch or two. (Anything else makes me stupid. ::))
However, I also noticed the converse. When life is sweet, I code better.

I no longer code professionally, but I have been leading a team of developers for a number of years. What I have come to believe (some may take offence, and it is a generalization) is that coding is more like creating literature than doing science. Quite often I can get a sense of someones coding style by listening to them talk. In a similar vein, I also like to hire coders that are rock climbers here in Colorado. I found that they code carefully, and tend to leave the code in better condition than when they started, even if it wasn’t their code.

Sorry if this is a bit off topic, just curious what the reaction (if any) would be.

coding is more like creating literature than doing science.

Some of the code posted on the forum is pure fiction, with not a bit of science behind it. :wink:

Good code does have a lot of creativity behind it, but it has a strong logical basis, too.

Quite often I can get a sense of someones coding style by listening to them talk. In a similar vein, I also like to hire coders that are rock climbers here in Colorado. I found that they code carefully, and tend to leave the code in better condition than when they started, even if it wasn’t their code.

True… you can know how a person can code by talking to him. The biggest challenge is a lot of the programmers can’t get the logical flow right… I would love to hire rock climbers too only we don’t have many out here…

From watching programmers during the early days of personal computing…

Coding under the influence of Cannabis, eh who gives a darn, we’ll get the project done sometime this decade.

Coding under the influence of Alcohol, after 20 recompiles, finally realize the syntax error is a misplaced curly brace and two missing semicolons so blindingly obvious your toddler would have found it, still doesn’t work as the logic is out of whack. Dries out the next day and smacks forehead after looking at a 20 layer deep nested if statement and realizing it can be replaced by 10 lines of code.

Coding under the influence of Crystal meth and cocaine, starts out well, lots seemingly gets done, blows up somewhere around 14 hours later and all work has to be completely redone two days later when the person has come down off the jag. Needs to become a yard maintenance person after about three years as their mind no longer functions well enough to code. XD

:smiley: thumbs up!

Drugs are bad, mmKay ;D

…and you if do drugs your bad… mmkaay?

I also like to hire coders that are rock climbers

It’s good to know, in case I am looking for a job in Denver :slight_smile:

and tend to leave the code in better condition than when they started

Are you saying they fix and modify things that aren’t broken? That is not always a good thing, you know. Furthermore, fixing other things that seem broken or wrong in some manner means they would be doing extra work, billed or unbilled - either of which could mean trouble if done often and long enough.

I prefer people who understand “If it ain’t broke, don’t fix it”, as well as those who understand the point of the trouble ticket system (if they see something not related to what they are doing, and it doesn’t look right, then a ticket should be written for it for a future date).

I sometimes code under the influence of stupid, does that count. :wink:

Lefty

Florin, I wish we were hiring!

Are you saying they fix and modify things that aren’t broken? That is not always a good thing, you know.

In our case it’s usually always a good thing, but to explain I have to put it in context. The developers I work with deal with a pretty large application - about 50 man years of development and probably around 1/2 million lines.

During the process of making a mod, one might find things like “magic numbers”, spaghetti code, things that need to be modularized, etc. Even though our product is based on a state machine (something that really helps it’s stability), as it grows, sometimes parts of the foundation need to be reinforced.

We are a professional shop, and it’s generally the developer’s responsibility to do unit testing. From there it goes to QA where they do regression testing, functional testing, etc.

As far as the added cost for this, we eat that. But better code usually costs less in the long run.

Sorry! I’m at work. :-X