Finding the Programming Zone?
SlashDotDashDot asks: "As a developer for 20+ years, I've developed a fairly fine tuned way to find 'The Zone' for optimal programming - a combination of furniture arrangement (PC and chair), lighting
and music. I also have a pretty good sense of what time of day is best for working on a particular set of problems. But this is what works for me. My company is growing and I'm needing to mediate working conditions between my clients and consultants. This has me wondering what others have found important for finding 'The Zone' in their programming lives. How fast can you get there? How long does it last? What do you do that helps keep that state? What are the major interrupters?" We also touched on this issue in a similar article, last year. However, many of you may have ways of attaining "the zone" that don't depend on any of the factors listed above. If you have a method that works for you, please share. It may work for others.
Window please! A real window!
Optimal condition is:
* Rather dark and gloomy room
* Big monitor at high resolution and many xterms prepared
* Huge MP3 playlist set to random
* One big cup of coffee (machine close by)
* Unlimited supply of colas in the fridge
I'm at optimal performance just when I normally should go home from work. Or when I work home, just before I really should go to bed.
Ciryon
We get these types in here all the time. They are fresh out of college and have no real world expr writing code. They talk of intellectual freedom, and then sit down and write the most brain dead code I have ever seen. And the consultents are even worse, cause they know in a couple of months they will be gone, and you will be holding the bag of funnel cake type code.
I personally find programming more comforting in my house. I can sit in my own chair and lean back and prop my feet up on my desk and not deal with a chair that keeps my back perfectly straight for 10 hours at a time. I have my computer setup the way I want it with no admin restrictions set forth on me. You dont have to worry when you accidentally click that goatse.cx link that everyone will look at your monitor. Also nothing beats shitting in your own toilet without worrying if your boss is in the stall next to you when you have a case of the runs.
I think your working environment is less important than the right state of mind. If I like my work, I can focus on it in the middle of an elementary school playground. I have a friend who codes from home; whenever I call him it sounds like he's working in a jungle. I ask him what the noise is and he asks me what I'm talking about. His kids are screaming and crying all over the place.
Just like great athletes, conditions don't matter. They get in the zone and it's game over. Anyone see Steve Yzerman in the Red Wings v Canucks game last night? He's hobbling around on one leg making everyone else look like grade schoolers. Amazing
sHi
I can't sit down and program for hours unless I have a good chair.. I have to feel as if I'm sitting on nothing.. Uncomfortable pressure points will surely annoy me the entire time I'm attempting to program. It's the key to getting into the zone entirely.
Next to that is a good mouse (if you're doing any GUI work or Graphics with the program) and Keyboard that has that great feel. It's different for everyone, I like my keyboards to click where I can feel I've hit a key. I find I have less typos that way.
And finally, ample supply of drinks and snacks readily available within an arms reach, otherwise I'm forced to break my concentration to get up and to refill my drink or snack. Some good music helps too, with headphones if you aren't alone, it helps you tune out the rest of the world around you.
..There's a-dooin's a-transpirin'
Probably my biggest issue is with noise. It could be my farely ADD-type tendencies, but almost any noise beyond what is found in a normal office environment makes it really hard for me to work. Music may be great for the mood, but I just can't work unless the music is classical or something else really light. Also, if I have an office near a window, it could be a problem if the the windows aren't soundproofed enough and I have to listen to the conversations all the smokers have on their breaks.
The future isn't what it used to be.
I hate to tell you, but coding isn't like writing a novel.
You're a VB "programmer," I presume?
Bush Lies Watch
You obviously are not a coder. Coding is much more difficult than writing a novel, in complex programs it can be very difficult on how to implement functions. You definately have to be in a certain mindstate to do it, depending on the complexity of the issue. Sometimes the fact that it just needs to be done, isn't enough for you to have the concentration to work on the more difficult problems. Often I find revising a flowchart on the issues, making them look easier, gives some motivation. However, there are somedays where I just can't get into the mindstate, and thats when I do physical chores. Sometimes coffee helps, but for motivation doesn't last long, and you crash hard after it wears off.
First, thats off topic -- but I'll comment anyways seeing as i like how my keyboard is being nice and tactile right now (an effect of enviroment).
The discussion is what makes you more efficient, not if you can or cannot complete the task. We all know that non completion results in bad things, this is about doing it faster and/or better.
Coding isnt like a novel, but in a way coming up with a plan for coding is. This approach (your word) is the hard part, coding is just dry implementation.
"The Zone", be it based on enviroment, or whatever gets you going, is a necessary component in effective coding.
Essentially formulating the solution in your mind is coming up with the theme and plot of a novel, and implementing is like scratching it to paper. Though not equally demanding of non-interrupted time, both do require that special something to be done right.
Igloo cooler full of assorted caffinated beverages
Shoe-box full of Butterfingers, Snickers, and beef jerky
Enya playing in the background.
Nothing for 6-digit uids?
well... the one thing I find, is that my monitor can't be near a wall... ie, I have to have it so that, when I look past the monitor, I don't see a wall right behind it. If I do, I find that my creativity tends to hit a block. If there is no wall, it tends to flow a bit, and circulate around the room (much like a virus? perhaps). Strange? Maybe... but it works.
Music wise... it has to be something that doesn't require active listening, but it can't be boring either. Classical and opera tend to work very well as good background music. If it's a game I'm coding, I'll usually put on the soundtrack to a game, as I find that gets me thinking about games, which helps me to make the game.
Finally, the chair is something I don't have a preference for. As long as I can sit it, and don't find myself fidgiting too much, it's good enough.
Need I say more?
"Provided by the management for your protection."
What are the major interrupters?!?
Hello??
You just asked the major interrupter!!!!
I stole this Sig
there are set ways to approach and solve a problem
Yep, generally.
if you tell your boss that you can't work right now because it just isn't coming to you, you're out of a job.
So I take it you love solving known problems with 60hz florescent lighting flickering in your eyes while your cube mate pounds out high-decibel "Cirque du Soleiel" music and your folding chair stabs you in the back? Are you sure you aren't a robot?
Programming is a mental activity. It is thus appropriate to make all distractions disappear for the thinking individual. For some, special music (ambient!), good furniture, and good lighting are essential.
And to hell with a window. Hands up everyone sitting in a beautiful office with cardboard taped to the monitor and large objects sitting in the window to avoid being blinded at 3pm sharp.
I find that the zone is primarily a matter of having reasonably good tools to work with (I get irritable if I'm not given a fairly recent version of XEmacs, for example) and the chance to work with few interruptions. I don't multitask well and having to constantly context switch to handle questions asked by others really ruins my zone. As I have become a senior member of staff and project lead, these interruptions have grown dramatically.
The best answer to my zone problem would be to have a door that I could shut when I'm working on something that requires intense focus, and open when I feel like I can handle a question (think of the door as a literal interrupt mask). Sadly, I don't have a door; I live in cubeland. I'm senior enough to rate a door, but there aren't enough doors to go around.
As for the lesser important elements to establishing the zone, I like a comfortable chair, a decent set of speakers or headphones, and a carpeted floor so I can take my shoes off. I hate shoes and kick mine off as the first step to getting to work. I'd go barefoot if I could.
I like to keep the lighting low, and my preference is to work with the lights off, with only natural light through my window and my pair of flat-panel monitors to light the room. Again, because I live in cubeland, it's hard to work with the lights off; even getting to work at 6 AM doesn't help because some of my lights-on coworkers also arrive early and don't understand why I want to work in the dark (these coworkers include one fellow who analyses code by printing it out and coloring the paper with many different colors of highlighter).
--Jim
...is sometime after 5.
Seriously. I get most of my work done after everybody leaves...nobody shooting the sh_t or asking me questions or for status reports. There's an emotion around here that open floors equate productivity, but that's just not true...I get more done the hour after the boss walks out than I do in an entire day of his polling and sneaking.
Speaking of which, this post is cutting into that time...gonna make it short.
Hey freaks: now you're ju
I'm not saying that this is a steadfast rule, I'm just saying that perhaps allowing different workday shifts like 9-5 and 3-11 would be good. You'd have two hours of overlap for collaberation, and people who fear mornings would be more apt to be in the zone in their "primetime."
When programming alone, I find that the "zone" is an elusive beast that can be found for about an hour or two each day, on average. Some days more, some days less.
Pair programming, a subset of extreme programming, largely eliminates this problem for me. When I pair up with another developer, I can regularly find the zone each day and stay in it for 4-6 hours. As a project manager, I introduced extreme programming and my team quadrupled their output overnight. And this is with six of us sitting in a garage with cheap office furnature.
I find that IRC helps.
What I want to know is: Those $300 Bose noise cancelling headsets - Can you use them without piping a signal into them to get pure and clean quiet? Or are there any other alternatives other than those massive earmuffs that construction workers wear?
(1) Get plenty of rest. You can't get the creative juices flowing if you're tired and thinking in a rut. Once they start flowing, you won't be needing the rest.
;-) In any case, some incubation time to have clear and well chosen objectives is good.
(2) Avoid interruptions. No beeper, no cell phone, nobody dropping by to chat. Get away from the internet if you can. A laptop is good for this. I move to the local coffee emporium to get started, then when my laptop is discharged and I'm fully charged with caffeine, I move to the public library's quiet study area, where i can plug in power. When the library closes I move to a loft over my garage. It's a short trip between each one and it gives just enough of a break. Since I've had children, the days of multi-day hacking sessions are gone though; I pretty much have to take some time in the early evening with them, then after they're in bed it's back to the old ball and chain.
That's pretty much all I need: rest and privacy. There is one third aspect that is helpful to me, although maybe not to everyonhe.
(3) Customer contact. Not during the programming debauch, of course, but before hand, to clarify exactly what I want to achieve, and put a human face on the problem. Of course, if you hate your customers, its better to avoid this
Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
Ok, on the whole I like dark lighting, private offices, headphone music (classical). But I'd sell all of this for one thing. Leave me alone. It takes me up to 45 minutes after sitting down to really get into what I'm coding. If I have an interruption every 30 minutes I will get nothing done. Of course it's very diffucult to structure an environment where people can ask questions when they want without bothering all of the other coders who are in the zone. Here's some ways to make this easier:
* set up an irc server or get everyone on IM. If you have a question, IM it to somebody instead of interrupting them with a phone call or personal visit. If they are in the zone, they can wait until their train of thought winds down to answer.
* Catered, delivered meals are a diabolical way to squeeze more zone time out of your employees. Nothing is better for me (and the company) when somebody brings in a bag of burritos when I'm in the zone. Delivered dinner is the best way to explioit me for more unpaid work.
* Good CM and documentation limit the amount of interruptions because people can consult the docs instead of, "Ask Bob, he's the only guy who knows how that works."
* Let me work funky hours. We've got one guy who gets here at 7:30 AM, another who shows up at noon and stays till 10:00 PM. Why? Because there are large chunks of time where nobody is around to interrupt them. This can wreak havoc at your company if you don't do the above documentation, but it can work out very well if you do.
Yeah, private offices, screen real-estate and Aeron chairs are cool, but I'd throw them all away for a full day without interruptions.
But working as a consultant you learn to get used to working in all kinds of situations. You are fortunate indeed to be able to mediate work environements for your consultants.
Heck in one place I spent a week working in a hallway and if it wasn't for my trusty laptop I would have been twiddling my thumbs. Other than that I do my most productive work off site at home where there are less meetings and other such interuptions.
Nothing is more distracting than a web browser. And virtually every programmer has got one. How many people reading this comment right now should be working?
It's even worse if you do web programming for a living. There is no hope.
I'd put $1,000 down right now - there are more people writing code for a living than writing novels. Which one is easier?
Let's stretch this a little farther, shall we? Which is harder, being a surgeon or a programmer? I'd put $5,000 down on that one, right now. But somehow, the surgeons end up motivating themselves to go to work and do their job whenever it's required, not just when they "can get into the mindstate".
When working with other people, professionals find a way to just do it.
For me.... I need to have my favorit lava lamp going. Some atmospheric drum and bass for the ambiance. Soft lighting, with a gental colour temp (aka not flourecent). My Herman Miller Aon chair, my Bush desk.... and 68 degrees faranheight. Oh and did I mention this groove period must either be at the first 3 hours after I wake up, or the last hour 1/2 before know must go to bed. Seems the mind is most creative at the extream ends of the day.
It isn't a lie if you belive it.
Music is a very important part. I always need something playing in the background - silence is absolutely killing me. ... . I have lots of live sets from various DJs (hawtin, liebing, umek, cox, ishino..) and listen to them all the time. Instrumental heavy metal and classical music also work just fine.
It seems that the best kind of music for programming is something without any lyrics, because they tend to draw you attention from the problem. My personal choice is electronic music - techno, drum&bass,
But for design work, I find I do my best stuff in a completely different environment.
First of all, get away from your computer. If you're doing design, you should be envisioning shapes, graphs, and so on--you should not be thinking about code. Do not look at; do not touch it. Look at a whiteboard or stare at the sky while you're doing this.
Next, do something (other than caffeiene) to stimulate your metabolism. Play a few games of foosball, or take a shower, or have a cigar. I've done some of my best design work while standing in the shower.
Finally, let your subconscious work on it. Keep thinking about the problem as you go about your day, but don't stress out about not making any progress. A day or two into it, you'll have an epiphany and realize that it's all very simple.
There are also set ways to write a novel.
This is fine if you want a formulaic novel.
There are set ways to doing matematics...
but that dosen't mean that creativity is never involved in mathematics when developing a new solution or heuristic and creativity is not nessicarily reliable.
___
It's the end of my comment as I know it and I feel fine.
In bug fixing state, I can multitask efficiently between multiple small size tasks, do them together, answer a question in a middle, etc.
In development state, I am really concentrated, and if someone asks something, it is very difficult to concentrate a sudden support question, and if interrupted, it takes time to get really back into development state.
If the development state is difficult to reach, I need music. Something heavy, Metallica seems to work best.
I could list some of the conditions I prefer when I'm in the zone (some good loud music in my headphones, a bottle of caffeinated beverage nearby, etc). But none of that matters. The short story is: When I'm in the zone, I could be outside in cold weather with poor lighting conditions and on a crappy laptop, and it wouldn't stop me from doing some great work. If I'm having trouble reaching the zone, no amount of external stimuli is going to bring me there.
"The zone" is in your head. For me what brings me there is usually motivation of some kind. It can be money (as in salary), but it usually isn't. Most of the time I'm just excited to see how it's going to turn out when I'm done; once I'm in the zone and start coding, I'm not going to stop until I can see some sort of tangible result.
When I'm having problems reaching the zone it's usually because that tangible result is too far away in time. What really causes problems is if a part of a project is so big it's going to take two days of coding before I'll produce anything useful; I try to avoid those.
-- If no truths are spoken then no lies can hide --
Distraction in the form of interruptions, physical discomfort - hunger, thirst, cold, heat, ergonomics, additional responsibilities like supporting users, meetings, worrys about money, lack of research materials, stability of and ease of use of integrated development environment... all these things detract from the coding experience and getting in The Zone(tm).
Things that make getting in the zone easy:
Tools that make sense and are powerful.
A keyboard that is intuitive.
Easy to use programmer's reference.
Stable OS that doesn't crash all the time taking yer whole programming setup down with it
Codifex Maximus ~ In search of... a shorter sig.
I figure in another 12 or so years my kids will be grown and out of the house and my wife will finally stop talking to me. Short of that I figure I'm sill "practicing" my craft till conditions become ideal.
Even after ten yeas of marriage my wife still doesn't "get it" that each interruption costs me at least 20 minutes to get back into the groove. Thank god the programming I do for a living isn't really complicated.
I find my ideal times for working are from 10am-noon and 5PM to 1AM. Not particularly good when you have a family.
"God fights on the side with the best artillery." - Napoleon, Marshal of France - speaking truth to power
I'd put $1,000 down right now - there are more people writing code for a living than writing novels. Which one is easier?
Whether you're right or wrong, your analogy isn't the least bit apt. Most programmers work on software that's customized for a particular client, or a small number of clients in a specific field. Do any novel-writers write customized novels for 3 or 4 clients? The surgeon analogy doesn't even begin to make sense. Unlike surgery, do people really need life-and-death software support? 99.9% of the time, no. In the fields where software IS a life-and-death matter (air traffic control, nuclear power plants) you can bet the software companies have engineers on call at all times much like doctors.
Also, it's not a matter of programmers "just doing it". The question is not, "should my programmers have to work if they don't feel like it?" The question is: "how can I place my programmers in an environment where they'll be the most productive?"
If you even think about the question asked in the story, you'll realize it's about squeezing more productivity out of programmers by creating a favorable environment for them.
Your response is pretty sick. I'm sensing some built-up hostility there. It's true, there's a lot of whiny, overpaid, pampered programmers in the world, but that's not what this person is seeking to create.
I believe it's possible to create a comfortable work environment for programmers and still demand maximum productivity and deadline adherence...
OtakuBooty.com: Smart, funny, sexy nerds.
* a source of music just loud enough to block out office noise, but not loud enough to make me notice it. (If it's music I really *like*, I'm in trouble, since I'll pay attention to the music.)
* A phone with a ringer that I'm able (and allowed) to shut off and/or let calls go straight to voice mail.
* an email client that I'm allowed to configure to not notify me of arriving emails
* a cubicle out of the way of major foot traffic
* orientation in the cubicle so that I don't feel that people are looking over my shoulder (I don't care if i can see them coming -- what i hate is the feeling that i'm being "vultured" -- a sure fire productivity killer for me).
* the ability to get up, walk around, and think through things. given a 5-minute walkaround (not, mind you, an excuse to visit my neighbors), i can begin to get in the zone before I start coding / debugging / whatever.
phone and email are the worst -- especially when they're combined with a mandatory response time standard set by the company.
mmm... yeah... You see, we're putting the cover sheets on all TPS reports now before they go out...
To my way of thinking, the only barrier to the zone is physical deprivation of some sort (e.g. sleep) or fear. Sometimes, working on the problem can be hard because you've let it intimidate you. If that happens, then it's time to turn off the computer and work on the problem on paper. Go back to the computer when you've developed some idea of how to start.
"The zone" isn't artificial, but it may come more naturally to some than others. Consider yourself lucky.
Please mod this post only if you think others should/n't read this. I have enough ego^H^H^Hkarma. Thanks!
You're a perl "programmer," I presume?
EXTREME PROGRAMMING is edgy!
And it's already well advertised here. I think anyone who's been programming for 20 years has probably heard about it - here if nowhere else.
For me, "finding the zone"=="taking the phone off the hook". But unfortunately that's a super extreme way of losing my job.
.
Let's not stir that bag of worms...
I'd have to make some exceptions to this position...
Being a surgeon is like being a very talented mechanic, with an excellent memory and fine motor skills. Additionally, the rigors of internship filter out those not qualified or capable. The creative muse has little place in a field where a few fractions of a mm slip in the right place can kill someone. A surgeon can get by with zero creativity other than adapting to "normal variation" in anatomy and being able to recall what procedures to apply, and still function very, very well.
OTOH, programming covers a wide breath of skills and abilities. Programming batch file processing scripts requires little creativity. Designing realtime attitude control systems requires grasp of many mechanical, electronic, control-theory, and scientifc fields beyond programming, and creativity to figure out how to acheive your goals. Bleeding edge 3d game engines require obscene amounts of creative design skills encompassing and correlating traditional CS, as well as physics, lighting, perceptual psychology, game theory, and much, much more.
A sr. programmer with a design responsibility on a bleeding edge project with 'creative block' can be unable to do their job "well", even if a "professional". Sure, you can sit down and hack something out anyway, and I've seen the results of that. Unfortunately, many companies can get away with crap code, and I guess yours is one of them...
Creativity results in elegant programming. Those who claim otherwise, likely do not write elegant code...
It doesn't help that Whoop-Ass, which is the only energy drink I've found that really works for me without tasting like, well, ass at the same time is apparently no longer sold in California. (Neither is any other Jones Soda product AFAIK.) I think I'm going to have to import my own supply.
Distractions certainly don't help. /. is among the worst. :/
And the brethren went away edified.
Most of the posts so far have focused on creature comforts. The NUMBER ONE THING that gets me out of the zone, though, isn't a creature comfort or lack thereof. It's FUCKING SPEC CHANGES (or a lack of specs). Holy crap, nothing else even comes close.
;-)
I'm most in the zone when a lot of time is spent defining a good spec up front, and having good management that doesn't allow the client to break it with constant changes after coding has already begun. Then I can just bear down and WORK and turn out a clean, easily-maintainable piece of software, as well. Otherwise, it's spaghetti crap code that is hell to write, maintain, and debug.
On the creature comfort side of things, a nicely-equipped computer is nice. It doesn't have to be a dual-SCSI, dual-CPU monster, but a 512MB of RAM and a nice monitor go a long way. With cheap RAM and monitors these days, this shouldn't be a problem... only another $200 or so over a barebones setup. Also, make sure the vid card and the monitor can both work together at high resolutions and refresh rates, please! Some offices "splurge" and buy cheap 19" monitors, but workers are still stuck at 1024x768 at 60hz or some shit.
Being able to wear headphones to block out office noise is a must, too. That sounds like a silly demand, but I once worked at a place where headphones were verboten!
OtakuBooty.com: Smart, funny, sexy nerds.
- Dont laugh - I got the music midi files from descent 1 (the game) and have been coding to that - brings back memories from when programming wasnt work
- Comfy chair!
- 19" or greater monitor!
- Code when you want/need!
- Code at Home!
- Take your fav keyboard & mouse along with your laptop
- When you get an idea, GO AFK, once the idea gets some time to ripen you'll be all charged to tackle it
But most of all make whatever you program a positive experience for your users. There's nothing like a "wow dude well done" from a happy user.Of those to whom much is given, much is required.
your folding chair stabs you in the back
Your chair stabs you in the back? Wow. Around here, it's usually my cow-orkers that try that. Never worried about my chair before. Looks like I'm gonna have a sleepless night, or three.
--
"Outlook not so good." That magic 8-ball knows everything! I'll ask about Exchange Server next.
Interesting you should mention that... I'm a perl/C++ guy whose current job entails lots and lots of VB. I almost always have trouble finding the Zone while working in VB. Today I spent an hour writing a little perl script and the time past so fast I hardly noticed. Most of the VB work I do tends to be superficial upper level interfaces and stuff. I think to get in the zone, you need a topic you can sink your teeth into and a language you are comfortable with.
I'll tell you a thing.
Writing code is very much like writing a novel. One day it's flowing out of you. Then on another day, it just stops. And there's no way you can easily tap it back 'ON'.
It's not about 'formal methods'. With all your bag of formal method tricks, if you can't visualize (in some personal way) problem you're facing, then you can't apply anything to it. Nothing, nada.
This is why CAP will never really take off. You need to really understand what is going on, and what one should do. Computer just can't do it.
fucktard is a tenderhearted description
In the afternoon or evening, I can get in the zone almost immediately. And I can often stay nearly indefinitely, as long as I'm not forced out. I can handle only so many interruptions - the worst are those that pose another problem that I can't immediately work on but can think about. My mind will try forking and multitasking. Other interruptions are less severe (to get something to eat, etc.), especially when I can control when to do them - after finishing a major section instead of in the middle.
An office with lots of linear desk space to each side with a printer nearby (which supports the HP small lineprinter font) and highlighters (when I refactor, I usually take the listing to another room and start marking). A nearby caffeine supply, usually a large cup of coffee, or something else so I don't have to feel thirsty. A way to silence my phone or otherwise insure only critical calls get through. Basically freedom from external or internal distractions.
A large, LCD screen. Something like the Apple 22" Cinema is optimal, but a large CRT with subdued lighting is also OK. I want to see several pages of information onscreen. Overlapped or iconified windows don't count. Otherwise subdued lighting, full spectrum, and/or task lighting. Especially with CRTs - they tend to bloom and blur at higher brightness. A comfortable chair - this might be a posture chair or stool. The idea here is to prevent fatigue, generally, and from having to fiddle with the UI to view what I need to.
A reasonably fast computer. My train of thought derails if I break too often. The toolset I use is fast at grepping or otherwise searching and editing and recompiling. When I finish with a set of changes I should be able to keep focus.
Flexible time. Some people are morning people, others are afternoon people. I am a night person. This is good in that I can work productively until 4am if needed, and in fact I can't sleep much earlier if I keep thinking of solutions or things I want to try. Often I can keep going until I finish something then realize how tired I am and realize that the eastern horizon is rather bright. But if it is too early, I can't get started. I can find 60 ultraproductive hours per week, and sustain that, but few of them occur between 9 and 5.
Lately I've been having some intermitent trouble with the anti-zone; where you just can't get jack-squat done. You hit slashdot, Usenet, go through various sites, anything but the task as hand.
I'm getting it under control, but sometimes there's just this huge inertia you have to overcome. But luckily that's intertia in both the difficult-to-start form AND the easy-to-keep-going senses of the term.
SO YOU'RE GOING TO DIE: The Comic for Dealing with Death
weed and beer. mostly weed. well, and beer.
MARIJUANA, SHROOMS, X: ONLINE?! - E
I work from home and code on the ground. There is something comforting about being close to the earth.
I don't see how people can code while sitting at a desk for 10 hours straight.
All I need is a bean bag, a six pack of diet pepsi, and a few exercise 'pep' pills with ephedrine (I ususally code after working out....yes there are bodybuilding geeks out there).
If you get tired you just mute your computer and plop your head on the laptop. I promise you that it is PURE joy.
Don't knock it till you try it....
One more thing -- I'm not a programmer, I'm a military technician. In some ways, my job is more like a Surgeon's job than a "coder." And, yes -- I am a professional, and yes, I do get the job done. Regardless of time, day or night, whether I've been up for 18 hours or 3, whether I got a good night's sleep the night before, whether I have nice music to listen to, etc... you get the point. But... if I've gotten that good night's sleep, if I've had the time to relax, think through the problem(sometimes not an option -- tactical situations don't have a lot of room for downed equipment), I'll have a much better response to the problem, and I'll be better able to come up with the most expedient solution to get the equipment operational again. The point wasn't being a professional -- the point was how your environment affects your productivity.
I do not read or respond to AC's. If you want a discussion, log in. Otherwise, don't waste your time.
I find that, of all things, listening to cheesey pop music, or something with a good beat helps me function through the day... though I should point out that the main and major component that gets me in the zone is headphones. Get yourself a good pair of high-quality headphones, and only wear them while you work. Pump something through them that'll keep you awake, and the blood pumping, preferably something either without lyrics (Crystal Method, maybe Moby) or with really stupid, cheesey lyrics that you've heard over and over again already. (I prefer Aqua myself.) If a slow song comes on, take a break! Just the fact that the song has come on will have already altered your mood, so take the break while you can. (Unless, of course, you're really in the zone, in which case you won't care and you'll just skip ahead..)
I should point out that if you're using winamp, you really need to get one of those hotkey plugins so that your windows-c is mapped to pause and windows-b is mapped to skip ahead. Otherwise, you'll spend too much time when skipping the slow tunes, and it'll knock you outta the zone. (Besides being helpful in skipping songs, it'll also help if you're too deep into the zone, and really need to think about something.)
Last thing I'll mention; water. Make sure you have water nearby, and you're drinking it. Besides it being healthy for you, keeping you dehydrated, and keeping you from drinking caffiene, (which despite what most people'll tell you, will actually drain you of energy and shorten your zonage) it'll also force you to take regular breaks (to use the washroom) that won't affect your zoneage! (I have discovered that this is perhaps one of the few ways to force oneself to take regular breaks that doesn't continuously break my zoneage. As amusing and silly as it may sound, I highly recommend it. : )
So anyways, to summarize, my tips:
- good high-quality headphones
- up-beat music (not too up beat, though; avoid raver stuff that messes with your aural depth perception; it'll just distract you..)
- good winamp plugin for hotkeys
- water!
Oh yeah.. and I find that being in a bad posture helps too. But I'm not gonna recommend that to anyone; I'm already experiencing the negative effects of that one, so..
It's true, there's a lot of whiny, overpaid, pampered programmers in the world Read: Those guys that are in it solely for the money and, despite the fact they spent 4 years "learning" CS in some college, they still don't fully understand what they're doing.
The best way to accelerate a windows box is at 9.8 meters per second square.
otherwise you're not programming. You're just coding. I get my machine to grind out code.
Since I program in Smalltalk and write code generators for other languages (or even for Smaltalk,) you're obviously talking about a lower level of productivity that I have progressed far beyond.
God, it must suck to be you.
MSBPodcast.com The opinions expressed here are my own. If you don't like 'em... Think up your own stuff.
Heh, I'm trying to convince my boss that /. is a snazzy front end for CPAN :)
(B) + (D) + (B) + (D) = (K) + (&)
Hahah, you aren't a programmer are you? Probably are a poorly paid manager.
Truth is, I have yet to find ANYONE (thank God) in a position of any managerial importance that agrees with you. Everyone I've ever known recognizes that there are days that a programmer just can't crank out code, and there are days that in a single day he'll crank out 4 days worth of "slow days."
Programming isn't an exact science. It DOES require being in "the zone."
When you're in the zone the code will just flow and it'll normally be much better code. A programmer who isn't in the zone but feels "forced" by management (or, more often, by himself) to crank out code will produce poor code, will have low morale, will probably tend to take a long lunch break and probably frequent "cigarette breaks," and probably leave right at 4:30pm. Basically an unproductive day whose output is of little value.
On the other hand, a programmer that is in the zone may easily forget about lunch or eat his lunch in 5 minutes at his desk while he codes. He might remember to go to the bathroom. And it is doubtful he'll leave before 5pm. And the code he produces will be some of his best.
When I'm not in the zone, I tend to do non-programming work. Returning calls, writing up documentation, meeting with those that may have been wanting a meeting for some time. There's no reason to waste time on programming when you're not in the zone.
If you really think it's as simple as "pay the programer and he'll produce 500 quality lines of code a day, every day" you're sadly mistaken. While you can't have a non-productive programmer and being "out of the zone" isn't an excuse to avoid working, it is equally unreasonable to expect programmers to be 100% productive every day. Aint gonna happen. Some days they'll be at 50% and other days at 150%. Every manager I've worked with or for knows that and accepts it.
I suspect those that don't know or accept it are hiring code monkeys in a sweat-shop environment. I've never worked in those environments, though, so I wouldn't know.
Sometimes is a distraction, but it's usually an excelent tool: My bookmarks menu is:
* GTK+ Documentation
* GTK+ Tutorial
* GConf manual
* Guide to teTeX documentation
* Python 2.1.1 Documentation
Besides, I use several automatic documentation tools for my code which generate HTML. They are a big plus to productivty.
comparing a novelist to a programmer is fair. comparing a surgeon to a programmer is not fair.
in either case, their is more DEMAND for programmers than novelists or surgeons. Writing a novel is easier to a novelist, doing surgery is easier to a surgeon and coding is easier to a programmer. common sense. which is easier to learn? is that your question?
writing a novel requires a creative skill that is not obtainable to some. programming requires a problem solving mindset and desire to learn not obtinable to some. surgery requires steady hands, concentration and much schooling.
are there more people that qualify to learn how to program. yes. does that mean it is easier? who knows.
the problem with novel writing and coding is you spend the VAST amount of your time siting in front of a CRT staring at text and altering it to your satisfaction. THIS GETS VERY REPETITIVE! surgeons are walking (running) around and dealing with things in the real world that affect peoples lives. if they don't perform, people die. that is motivation enough. if there was someone put in my cube, and if i was told that they would be killed if i didn't perform, and their family was waiting in a conference room down the hall, I WOULD PERFORM.
MARIJUANA, SHROOMS, X: ONLINE?! - E
For me, maximizing my time in the "Zone" is dependant on one major thing - physical fitness. The more energy I have, the longer I can work - and work well.
I have a fairly easy system for achieving this.
1.) I get up every morning at 5:00am and run 3-5 miles,
2.) Shower (very important step, do not omit.)
3.) Eat a good breafast (generally a piece of fresh fruit and some "healthy" cereal.)
4.) Eat a healthy lunch.
5.) Get out of the office during lunch, for a mental break.
I avoid artificial stimulants at all costs.
I find that I generally have much more productive time than the other people in my team, and don't spend 10 minutes on the hour servicing a coffee habit. My mind is clear all day. I don't suffer from the afternoon slowdown.
Granted, I do fall asleep fairly early in the evening (around 10:00pm) but I provide more work to my employer, on a time schedule that is convenient to him.
Think about that when the next round of layoffs begin.
Let's stretch this a little farther, shall we? Which is harder, being a surgeon or a programmer? I'd put $5,000 down on that one, right now. But somehow, the surgeons end up motivating themselves to go to work and do their job whenever it's required, not just when they "can get into the mindstate".
I can still can go in and fix software bugs, or do other kinds of technical support at any time, without having to be "in the mood." But this is not a creative process. This is just fixing a certain mechanism, using my knowledge of it.
Designing and implementing this mechanism, on the other hand, is in fact a creative process and bears many similarities to writing a novel.
Bush Lies Watch
But the one thing that COMPLETELY annoys me and slices my train of thought in half...
Argh! Brrrrrrring...brrrrrrrrrring....brrrrrrrring. Can anything be more annoying than the phone? Yeah, when the people on the other end are relentless in their quest to sell me a new mortgage opportunity (I wish I could tell them to look elsewhere than a 14-year-old who spends 100% of his income on computer stuff).
Anyways...interesting thread. I hope it doesn't become a "write-only" one like these show-off ones often do.
qslack.com
Really, formal methods are just another way of tapping into a developer's existing knowledge of the problem, and re-stating it in a way the computer can understand. The difference between "formal" and "informal" styles of programming is mostly that formal methods offer languages, tools, and techniques for modeling a program as a mathematical system, and then analyzing that model to look for obvious problems.
Every time you use a compiler, you're already half way to the side of formal methods -- letting the computer analyze and make assumptions about your code, in exchange for not having to write assembly routines yourself every time. Similarly, if you work in a strongly-typed language like C, C++, or Java, you're relying on a very "formal" means of error-correction: type checking.
That doesn't change the fact that programming is a creative process, simply because the concepts being thrown around by a "formal methods" user are more functional. Personally, I think that good math is every bit as aesthetically pleasing and creative as a great novel, and have personally met a number of quite talented mathematicians who were among the most creative, individualistic people I know.
I can understand the need to get into some kind of perfect frame of location to go with your frame of mind, but the kind of stuff I program at work are simple straight forward network tools. It would be about as necessary for me to have the "zone" set by live strippers and James Brown to write network tools as it would for me to an LDAP search on an orphan in our Active Directory.
A lot of angles come into this as well. Some people really need to focus on something to be able to learn it. Some of us don't, we just read the syntax, try the code, try some sample code, and see how it works, then use it. Generally it comes back to how well you know your language I feel.
But then you have to work out a problem that is damn right crooked. There's no straightforward apporach to it, perhaps because it's never been done before(I haven't found a project like this yet). Or maybe you are just trying to code something and you aren't really looking for any help from those who have mastered it. So you crank up the legs on your lazy boy, get your Spinal Tap on the stereo, get 3 live llamas standing around you, yank out your prised microsoft split key keyboard that reduces yor typing speed by 60WPM, flip on your pride and joy 21 inch ultra barrel screen mitsubishi 12 year old monitor, and then you are finally ready to code gorilla.bas, without help of any kind. Just you, whats in your head, and maybe an old turbo basic book by Sams.
This is my sig. The post is over.
Ugh...flourescent lights...truly the bane of the working class. I find that I'm at least twice as productive when I'm working in good, natural lighting, or at least under decent full-spectrum bulbs.
Strangely enough, I'm also usually much happier working on a full-size laptop (often actually in my lap, no less!) than a desktop machine; something about the ability to shift posture regularly, and have the computer move with me, does me more good than any number of ergonomic keyboards and back-supporting-chairs.
Kent Beck's "Extreme Programming Explained" is the first book to read -- and the first in the excellent Addison Wesley series. Also see http://www.extremeprogramming.org/
(Reality reasserts itself sooner or later.)
Why should he be kidding?
Brilliance and inspiration are both required in programming, neither of which were created nor destroyed by the "dot com bubble." We're not accountants. What we do requires creativity AND logic and not all days are created equal. I've spent an entire day on a problem with no particular success only to come in fresh the next morning, enter "the zone," and knock the thing out in 30 minutes.
If you truly can produce brilliant and creative code every hour you are at work every day, kudos to you.
More likely than not, however, I suspect that the "prima donna" gets more done in his one "zone day" then you do all week. Don't get pissed because he can work one day and play Doom for 4 days and still produce more and better code than you.
I wasn't trying to disparage the medical profession...
But the fact remains that as a general rule, the practice of medicine is more about remembering which procedures to apply in response to the presented situation. There are even licensing and liability constraints that prevent significant variation from said 'established practice' without significant paperwork.
Expressed in terms of expert system design, the practice of medicine involves a mostly quantatative analysis resulting in the identification of a very small list of procedures or treatements. While there is a reasonable degree of art in the mechanics of surgical procedure, the rate of innovation is driven more from the creation of drugs and tools, than by the identification of new surgical methodologies. First principles are applied in the labratory, not the surgical center.
On the other hand, programming is an art where any given problem may be addressed by a nearly infinite number of approaches, of which a very large percentage are feasable. The decision tree for software design is many orders of magnitude larger, with a correspondingly larger degree of possible application of creative thought.
Again, I'm not disparaging the medical profession, I just think that as a general rule, creativity has more room for application in the practice of programming than in the practice of medicine.
I do agree that it is a different realm, and I do understand what you mean - I've been a first responder in a few severe traumas in the past, including one in which radical and creative intervention was required to keep at least one of the people alive until the helicopter arrived...
Having said that, if my desk has papers, pens, phones, and knicknacks scattered across it, it seems to quarter the chances of me getting into the right frame of mind. Not that I'm a super organized person by any stretch of the imagination, but if I have a ream of printouts scattered across the desk in a disorganized fashion, I begin to feel anxious and claustrophobic. I don't know why, maybe it's visually distracting or something.
At one point I had one of those L-shaped desks where the monitor sits in the corner with a bookshelf on one side. One night I had to actually stop what I was doing and remove all the books from the shelf cause it felt so confining.
Coding with that anxiety feeling sucks.
- Jonathan
Or maybe not - must have room to swing cat.
Chemical: Red Bull, Adderall (dextroamphetamine HCL), Lots of Water, Healthy Food snacked on at least once per hour.
Aural: Chemical Brothers, Crystal Method, Prodigy, etc, etc. Some good punk and rock is nice to mix in.
Visual: 19"+ Sony Trinitron E400 with a decent amount of light coming from behind and to the side of my desk. No flourescent, nothing directly behind causing glare. Muted sunlight may also work.
The reason why there are more people writing code for a living than novels is two fold. First, the market demands more man-hours worth of software than it does novels, and pays better for software than novels.
Whether it's simpler is a complex question; almost everyone who can code can write a novel, and many novel authors could code after a few lessons. The question is whether they could do a decent job at it. I would guess there's a lot more crap code than crap writing on the market, because of the above mentioned marketplaces, and the fact writing gets checked better than code.
I work almost exclusively at coffee shops, but not that I like coffee or anything.
When I take a break in an office, I spent a few minutes reading slashdot and feel slightly refreshed.
But in the coffe shop, I spend a few minutes talking to some hot girl studying. And then I feel really refresehed.
And I work more. I'm much more willing to think "Yeah, lets go back to the coffee shop for anouther couple hours" as oppose to "lets go work in our slightly dark offices again"
In fact, I'm pretty sure if I ever own my own company, I'll just give the employees starbucks cards, cell phones, and laptops. Screw this whole office or cubical bullshit.
Ben
I get from your comment that a worker should just put up with whatever equipment the company gives them and learn to like it. Well, that doesn't really leave any room for what an employee likes or dislikes.
The best coders are much more productive than the worst coders. If the best coders know they are the best then they will choose to work for the company that best satisfies their needs. Suddenly employee happiness is a major part of the productivity equation.
And even the worst coders do better work when they are happy than when they aren't. If I am a cheapskate employer and I give everyone 486s and 15" monitors for development then development will be slow because compiles take a long time and my coders can't see enough code at a time to make good decisions. And my turnover will be high because coders will become dissatisfied over time and quit.
Demographic study of the average slashdot reader's weight. Based on the responces to this posing, I'm buying stock in Frito Lay... Not that I am not just as guilty as anyone else on this.
Unfortunately, many companies can get away with crap code, and I guess yours is one of them...
Or maybe he and his colleagues are more talented than you are. Perhaps the code you write at your best is equivalent to what they turn out when they are hung over after a weekend of binge drinking.
I've been an embedded systems engineer for over 20 years and I've seen lots of engineers who loudly proclaim that the code that they write is elegance itself. It usually is not. The best software engineers are often the quiet, modest ones who turn out clever, tight, well-documented code day in and day out. You don't seem like one of those guys...
The phone has to be one of the most distracting elements in the modern office. If you and your team use an instant messenger instead you can really cut back on the distraction factor. I find I can hold my concentration better through a chat session than a phone conversation.
And stack your meetings on particular days if at all possible. This is often difficult since in many office cultures the managers proclaim meeting times and the workers learn to live with them. But if you have a choice then try to put all the distractions on the same days.
And for all you managers out there don't schedule a meeting that ends close to the end of the day. If the meeting ends at 4 and most people leave at 5 chances are your workers are doing only two things between 4 and 5: jack and shit.
The most important thing by far is the state of mind you have going into a long hacking session. I find that if I don't have the right state of mind to tackle a project, I will find ways to not work on the project. Deadlines seem to be one of the ways to force me into the right state of mind, but otherwise, I prefer to just queue up all my music, put it on random, and let it fly. I dont like coding in the dark because that means it is harder to find/use any resources I have laying around. I draw things out on paper to solve problems, and doing that in the dark is a good way to kill your eyes. A lack of background noise is disturbing. In fact, the lack of music playing right now while I type this is killing whatever state of mind I had while I was trying to knock off some problems.
I thought long and hard before posting this comment... it's a bit on the harsh side, but being a part of the IT industry, I feel I'm entitled to offer an observation (as most /. readers are!)
There are far too many IT employees, especially programmers, who are under the misconception that they are something special. There are many industries and jobs that involve enourmous levels of creativity and innovation, however I can't think of many that contain so many whining graduates.
Take teaching for example. Every day, a teacher is required to educate their students. They don't get the option of saying "I can't find my zone, I'll be back in a few hours". The don't have the option of rearranging their working environment to suit themselves (as opposed to suiting their students/team). Sure, you can point out that teachers are generally following a process that is predefined... so are programmers though.
Looking back within the IT community, take a look at the higher level support engineers. When a server farm catches fire, triggers the sprinklers, and dies a gurgling death, do you really think it would be appropriate for any of them to say "the room just doesn't _feel_ right"? Nope - they have to get the job done.
Programming, for the most part, is a case of following the yellow brick road. The road is paved by your team leaders, in most cases, and when it isn't there is very little stopping programmers from following the processes and methodologies they claim make them special ("I have a DEGREE!").
And what about childcare workers? Have you ever considered what it would be like working in an environment totally designed in favour of creatures half your size? I happen to know one or two of these people, and let me tell you that they never bitch or moan about their working environment not being ideal for their "thought process"!
Face it - we're nothing special. We carry out a job, and not a very hard one at that. Sure, once in a while we need to demonstrate flashes of brilliance, but based on the ones I know, the vast majority of IT workers probably shouldn't have jobs in the first place.
Be grateful you have the opportunity to work in a field that pays well, offers good working environments, decent job security (those who lie to themselves, and believe that we are any less secure than the rest of the world are fools), and cool toys to play with. Personally, I feel lucky to have the opportunity to work within the field.
(Incidently, I sit in a cubicle that is rather small, at a desk that isn't particularly comfortable, with a window behind me that casts glare all over my screen, in an open plan office. I can hear my team chatting with their wives, the aircon is unpredictable, and the lighting annoys me. But I get to work in a field I love. Personally, I think I'm winning here)
When I'm faced with "coders block" I high-tail it out of the office jump in my VW Passat. Light up a cigarette, turn up the stereo and drive.... On truly productive days I do this 2-3 times a day. The tricky part is getting back to the office in one piece and without a speeding ticket once the solution comes to mind... :)
Well, you'd be the first. I've never been fired, layed-off, or downsized. Ever.
I've also never taken a week off because I didn't "feel like it." I don't know where you came up with that response. Granted, you posted as AC so I guess that pretty much explains it.
Wait 'til the day before it's due... then I can find the Zone _real_ easily. At least, that's what I did through Uni.
As someone (can't remember who) once said, "When a man knows he is to be hanged in a fortnight, it concentrates his mind wonderfully."
-- This post is about truth, beauty, freedom, and above all things, Karma
I can stay in the zone for many hours at a time. Of course, the passage of time is something hardly noticed. It's becomes just part of my surroundings, to be ignored by my conscious like the walls and light fixtures. Music is the same way - it can be on, but it neither helps nor hinders me, because my mind pretty much blocks it out completely.
I find that if anybody tries talking to me while I'm in the zone, it's like I'm being pulled out of a dream into a reality I'm not yet ready to re-enter. First of all, I sound like a babbling idiot, because 98% of my mind has been taken over by my algorithm and coding skills, leaving very little left over for communication skills. If I'm lucky, the person who interrupted me will see that I'm preoccupied with what I'm doing and leave me alone. I can then usually recover, and stay in the zone (usually forgetting the interruption immediately). If I'm unlucky, the person will continue to talk to me. This is a very frustrating experience. I can literally feel my abovementioned stack slipping away, one layer at a time. I feel the algorithm in my mind's eye falling apart. If it goes too far (which doesn't take long - even a couple of minutes of dealing with "the real world" will do it), I fall out of the zone. Then I'm left with a huge mess of half-written code that I have to figure out. Sure, I'm the one who wrote the code in the first place, but it was written while I was in a state of heightened awareness.
I used to fall into the zone a lot while in university. I'd start working on a project at say, 14:30 one afternoon, write incredible amounts of quality code throughout the night, and come out of the zone at 05:30 the next morning with a finished product. Of course, at that point the hunger and sleep deprevation hits me all at once.
I don't fall into the zone much any more. There are too many interruptions in a typical work environment. It's a shame, too, because I'm easily five times as productive when I'm in the zone than when I'm not.
OK, I started things by getting a bit too personal, but you sure jumped in.
/. posters can create, even if we're less modest online than in person. And you'd be absolutely amazed at how much tougher our hiring standards are than most industries...
I was responding to someone who implied that "professional" programmers could always write "good" code on demand, due merely to their professionallism.
As for myself, I started as an embedded system engineer, moved into semi-custom chip design, then into CAD/CAE/CAM software, left when bored as head of R&D, then moved into video games as head of tools & engines development, where I've now been for 15 years over ~40 games, except for the few years I took off to write cryptographic protocols at Cisco. As a hobby, I publish open source crypto libraries and work with a team developing a p2p infrastructure for massively scalable 3d clients.
You'd be surprised at what sort of code some of us
In college I used to spend a lot of time in hack mode, in fact most of my skill at programming comes from nearly a whole summer in "hack mode".
Of course, concentration has never been a problem for me. A pulse, a slightly interesting problem, and a lack of horrible jarring motion (on off days) was all it took me to get into the zone. Hell, getting me out of it has always been the problem. 10 minutes after fire alarms, the RA would have to come in and peel me from the keyboard...
But since I've started working, my time in hack mode has gone down down down. In the last 12 months, I've probably spent a grand total of 3 8 hour days in "hack-mode". Time spent writing the core of some UDP packet driver. Interesting problems? I'd give my eye teeth for just about any problem that requires even a breath of hack mode to finish!!
I don't know what you guys are working on, but I sure wonder who's doing all your scut work. Documentation, build files, organization, testing, requirements analysis, coding all but the core pieces that might pose original problems.
Damn, they're premadonna's. I should have guessed
After spending only 3 days in hack mode the last 12 months, I was hoping I was just in the wrong career or something. That's what you get for hoping!
Back to the read, read, read, fix wheel of despair for me!
I'm not a programmer, but I do spend a great deal of my time sitting in frount of the computer writing (usual technical work) and comming up with client solutions.
A few things I've noticed;
1. A clean desk. I don't know what it is, but a cluttered desk just kills my ability to stay concentrated on anything for an extended period of time.
2. Near darkness. Any bright lights is a distraction. The only light can come from the CRT.
3. Jazz music. For some reason, the jazz on the local NPR station just fits nicely.
4. Unlimited supply of cigarettes. I don't even notice smoking them, but I notice if they are missing. Part of my weird compulsive personality.
5. Night time. 11pm to 5am seem to be the best time. No phone calls, no noise from the city outside. There just seems to be a feeling of being settled in that part of the day.
6. 64oz Thirst Busters from circle K. It's funny, but they usually seem to run out right when I've reached a problem I can't solve. I can walk down to the store in silence, nobody bothering me, and get a new one. While I'm walking I can usually reach a solution.
The Internet is generally stupid
Okay, here's how I view it: If you have joe random programmer, there are several factors at work. First, you get your problem spec. Somebody higher up says "hey, we have this information, we know it can be processed into this smaller set of more immediately applicable data, and we need something in the middle to sort through reams of data, find the relevant points, accumulate them in a database, perform some analysis, and spit out a condensed set of results"...
Okay, now there are lots of ways you could go about this. First there's brute force, there may be a simple way to do it, but it's not ideal because it's O(N^2), okay well there are several routes you could take. First, you could run with it, second you could think about it, possibly for days, while you may be reading the morning papers, your subconscious mind is churning through multitudes of different solutions, working on what would generally be considered intractible topography problems in th' background using the massively paralell computer known as the human brain. When you finish with that stage, and you're ready to implement, then's when the groove hits.
What i'm talking about is when there is a hairy multifaceted problem, and after goofing off playing tradewars for a couple days, you finally latch onto a solid solution. What looked like a massive unmanagable mass of special cases and state variables condenses into a simple but subtle loop invariant and you go for the gold. Pop a couple of ephedrine, drink some coffee, eat a bunch of solid high calorie food, put on some good driving music, something with a solid steady beat that you can use for a clock signal to push the data through your brain, and let fly. It's one of those things where you have solved the problem on a subconscious level, and you can see all the facets and details as it if were a building in front of you, except instead of a building, it's a nice regular 5 dimensional shape, but it's there, and for that moment in time you see it clearly, and as fast as you can code and comment, it can be translated back into our mortal plane, it can change from a shimmering but abstract represenation of a problem into a concrete solution. That's where it's at. =:-)
---
Play Six Pack Man. I
I participated in a programming contest recently; it lasted 3 hours. For the entire rest of the day, I was in "The Zone". It was awesome how much that woke my brain up.
So it seems for me, just being challenged slightly, in a fun and competitive atmosphere works well.
After reading about people who've had a positive experience with herbal remedies, I decided myself
to try a few. Ginkgo, in particular, is popular for increasing mental focus and memory; Ginseng too
has a simular but more subtle effect. Wow! what a difference they have made, I'm now able to concentrate
on a problem without losing focus for much longer, and my overall mood has improved. Seriously,
give them a try; at worst they don't work, there haven't been any side effects associated with either.
Heh. The scary thing is that this describes almost exactly what my college days were like. The thing of it is though that I never took any drugs to acheive this state of constant 26 hour days. Unfortunately, since the rest of the world has to work with only 24 hours in a day, it only takes a couple weeks to get completely fucked up to where you closely resemble the living dead as you go off to whatever class happens to occur at 2pm and you have no idea even what the subject was at 3:30.
I doubt the large amounts of cola helped either. This would probably be a good explanation as to why I didn't fare so well in college too, among other things like depression and the medication I was taking to combat both that and the insomnia.
"No problem. I have the capacity to do infinite work so long as you don't mind that my quality approaches zero."-Dilbert
I work as a sysadmin for a small ISP. Like, a really tiny ISP. Like me and four other guys. This is a problem because if we don't all do the tech support, we'll have to hire other people to do it, which would cost us more money and cause us to sink. About the only reason I actually agree to do this is because the boss is also doing it.
;)
However, in any typical day I generally get nothing done at all, because it's either so busy on the phones that I legitimately can't get anything done, or it's just busy enough that I'm spending about 20 minutes or more to get back into my groove and I'm being interrupted by a phone call ten minutes after that. By some miracle however, I'm actually able to get things done that need to be done on occasion. Sometimes it gets done by putting in overtime, and some other times it gets done at home, but much of the time it actually gets done at work. I sometimes marvel at this fact. (like now!
"No problem. I have the capacity to do infinite work so long as you don't mind that my quality approaches zero."-Dilbert
Here's what I find works well.
First, be sure you have something to hack! If you don't yet have a design ready, you have no business at a keyboard. Walk around the block, or sit down in the break room, or do something, but relax and meditate on your design. Don't compromise. You'll know the Right Thing when you have it. Then, you're ready to sit down and hack.
Now, on to the environmental issues.
Comfortable chair. I have an Aeron, and don't really see a difference between that and any other good computer chair.
No glare! At my last job, we were fanatical about closing the blinds when the sun started coming through them. (The window faces West.)
Low lighting. At work, after six, they turn off most of the lights. There's well enough light to be safe, but much less than normal in an office. Overhead florescents are evil. Eyestrain, flicker, icky things. With the low lighting, desk lamps are mandatory. Florescent is okay there, since it doesn't illuminate the monitor. Make sure the lights work properly. At home, I use a single 60w incandescent and a lava lamp.
Descent sized desk, with bookshelves. Being able to have schema diagrams, language references, etc. arrayed for easy reading while coding, without having to constantly shuffle things on your desk, is very important.
General ergonomic concerns. Don't make the coder uncomfortable if he's going to have his butt plastered to that chair for a while. As keyboards go, I can code longer with my Maltron than my QWERTY (yes, I've identified this as a trend), but this is more personal taste than anything else.
If your company tends towards phone over email, be sure to have a Do-Not-Disturb button on the phone! With all the biffs out there, there's no reason that somebody trying to concentrate can't put off a request for a half hour while they're juggling eggs. (My phone hasn't rung in some four months, so I don't even know if it has a DnD button. If it's urgent, you page me. If not, you email me.)
Music. I personally prefer Celtic, Metallica, 80's, or FPS soundtracks, but this is *so* personal, be sure to experiment and find what works for you. Wireless headphones are a Godsend in an office environment where speakers are unusable. Never get an MP3 player without a repeat-all function.
At home, I frequently hack well with the TV on. I leave shows I've already watched on the TiVo and put either them or a DVD on. It should be something you've recently seen. I also have good luck turning Emacs translucent and watching DVDs through it. Music video DVDs are great.
My company has free bottled water and a selection of juices and sodas, always stocked, on each floor. Very good. When you hack for six hours in a row, you can get dehydrated too easily. We save money on water by giving out bottles (in koozies so people keep them) and having coolers. Get out the bottle or can before you sit down to hack. And think about water instead of soda; it really does work! (And this is coming from a die-hard Coca-Cola addict!)
If you're close to a meal, consider postponing your hack session until after; catch up on email or fix some quick bugs first.
A lot of people have talked about screen real estate for lots of xterms. I don't get that. I have Emacs, and that's it. But I write a lot in Lisp, where 99% of your time can be spent in Emacs with an Emacs window on the Lisp interpreter, except for when you're doing GUI design. In fact, a lot of the time, I work in console mode instead, to get rid of distracting window manager stuff.
Some have suggesting coding is like writing a novel. But consider that it may be more like creating (free-form) poetry, since coders are one of the priveleged very few who can create the language, grammar, and all the rules themselves and then use that language, grammar, and rules to craft the end experience.
When a carpenter or sculptor or engineer tells me they built a never-conceived-of-before tool to solve a specific problem, I smile broadly. I'm happy for them to experience that kind of magic. And I'm happier that I work in a profession that lets us do that kind of thing every single day, cheaper, and with fewer boundaries than anyone else. Sure, the hardware-design camp gets to build amazing physical gadgetry, but not nearly as often, and always under heavier material constraints.
"The programmer, like the poet, works only slightly removed from pure thought-stuff. He builds his castles in the air, from air, creating by exertion of the imagination."
-- Frederick P. Brooks, Jr. "The Mythical Man Month"
The point of such an exercise is to teach the newbie which is not wrong or stupid. The goal is no longer to write code fast, but to teach the junior programmer about coding style, solving problems, design patters, unit tests, etc. It's a crucial part of making them productive in the future. Of course, you should keep these things in mind:
The Drowned and the Saved - Primo Levi
Windows may be important, if the view is all right.
But if the view is NOT all right, then, the AMBIENCE inside the room is critical !
Not all are blessed with CORNER OFFICE WITH GREAT VIEWS, you know ?!
Muchas Gracias, Señor Edward Snowden !
That was a joke, right?
The current version of VB (assuming you mean VB.NET) has some basic support for multi-threading, a primitive concept of single inheritance and some basic exception handling. You need to go hang with the OO boys for a while if you think it's anything close to a "true OO language". Compare and contrast with Eiffel, Smalltalk, Java, C++ or any other established player in the OO field, and you'll find numerous things VB's (or rather, .NET and the CLR's) object model can't do.
And the C++ object model is far, far more powerful than many other so-called OO languages. The fact that you aren't forced to use it (and rightly so) doesn't mean C++ isn't an OO language. It's not a pure OO language, but it certainly supports OO much better than many.
If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
If that amount of time is less than a few weeks, maybe you could. If that amount of time is measured in months or years, you haven't got a prayer. VB is good for quick, prototype-y things, and some sorts of front-end UI work. C++ is good for high-performance, low-level and/or large-scale work. Java is good for distributed development. Python works best, IME, as a grown-up scripting language. Each has its use, but claiming that VB is superior to all other languages, over any period of time and for any sort of desktop application, is just absurd.
Nice troll, though.
If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
That's a very good idea; I had thought of trying something like that, like putting up a bead curtain or some other kind of non-door cue, but objects on the desk sounds simpler.
I hope that sphere has flat spots to make stacking easier, otherwise I'm very impressed. Even more impressive would be if he could stack the cube on the sphere on the point of the pyramid!
--Jim
I don't know about your habit, but mine is up to about 1500 mg a day. If I go more than 10 hours without a cup, I get withdrawal headaches so bad I'd literally trade them for a good swift kick in the nuts.
If you're going to advocate quitting caffeine, the least you could do is suggest that the user get down to zero intake in 100 mg per day steps.
Do daemons dream of electric sleep()?
the zone, that trancelike state when time stops to matter and there is only you and the code. How do we get there?
This is what works for me: in order of importance
A challenge: The task at hand has to be difficult in some way or another. If it's not then you can still do it but you don't get 'there'
Coffe. Black. Strong. Close. Hot but not hot enough to burn my tounge and throat when i gulp it in a not quite conscious motion
Nicotine. I may not go to take a smoke while i'm on a roll. But I have to be able to or I'll get distracted.
Light. Dim. At the least it shouldn't reflect off the monitor
Music. Preferably repetive with a heavy bass. The most important thing is that I've had to have heard it a thousand times before, so that I don't hear something unexpected and 'snap out'. Pity I can't do this at work because it might distract the others. Also headphones is a big no no, since they either slide off or are too tight and hurt after a while.
Air, fresh but not cold.
Something edible. So that if my stomach manages to get through to my brain i can silence it fast
- We are the slashdot. Resistance is futile. Prepare to be moderated -
Seriously, you've described me to a tee.
At any rate, there's one thing you haven't tried. Code in a datacenter with non-cycling air conditioners (dress warm). It will help you achieve the final state of "the zone". After a few hours of this, when you stand up, you may be lost (i.e. not know where you are, which way to the door, etc) for several seconds. If so, you have achieved the final state of "The Zone".
I once pulled a 53 hour day like that, got up from my seat only three times. I did two months worth of work.
(Too bad I didn't get the next 58 days off!)
Do daemons dream of electric sleep()?
Perhaps, but "I've had to move my huge and unwielding to an ergonomically suboptimal position" is a wonderful phrase that you can't help inventing contexts for.
Igor Presnyakov stole my hat
"and also because of hashish/marijuana."
:)
I guess they disproved the 10,000 year history of safe use that I would otherwise judge those plants by
No, I agree, 80% of everyone I know who got into meth fucked up their life. The better-off ones ended up in rehab. But if your friend killed someone he was already a homicidal maniac, drugs may bring things inside you to the surface that otherwise wouldn't see the light of day, but they don't create them. I never use it now, but a couple times in the past did come to work on it and did several days worth of work in one day. But the post was a joke, I'm shocked I wasn't modded -1 Troll or flamebait.
Which is of course why it is a PERFECTLY WONDERFUL idea to prescribe it to every single 5 year old kid who misbehaves in class - despite the fact that the health effects of the drug on children aren't well known. I'm pretty cynical, but the evil of that bothers even me.
I was a fulltime programmer. Now I'm in marketing, but I have a specialty programming skill that means that I still write code some days.
Doing both jobs, I can clearly see a difference. The biggest difference I see is that coding is a solitary "disappear into an artificial world inside my own head" type of activity, while marketing involves realtime interaction with the external world.
Coding requires an environment designed to shield me from the outside world so I don't notice it and come out of my "trance". Marketing requires paying close attention to the subtleties of the outside world and interacting with it cleverly in real time. The more I pay attention to the external world, especially to other people, the better I do.
I find that my biggest challenge in marketing is paying close attention to the external world for long stretches of time. While the "real" marketers can listen closely and catch the subtleties in almost everyone's comments during a long meeting, I find that the first time anyone says something interesting, I tend to take it offline inside my head, pondering it, missing not only the subtleties of subsequent comments, but often not hearing a word they said.
Both activities are difficult to do well, but they're definitely not the same. I think most jobs, like your daycare center example, are like my marketing job. You have to keep your eye on a whole bunch of kids simultaneously and respond correctly in real time.
Programming isn't unique, but it is very different from most jobs in its requirement that you stop paying attention to the outside world, turn inward and just think for long stretches. Programmers who can only do it for short stretches can still implement others' designs by chipping away at the task list, but they run into trouble when they have to blaze the trail themselves.
"Those who have never entered upon scientific pursuits know not a tithe of the poetry by which they are surrounded."
So- it did require 'the zone' to write this program.
What ended up happening was- the program was researched first, and then written over two nights. The first night, it was a dead-end. I wanted to use a certain technique, and was hitting walls all over the place. At the end of the night, I just put the program aside, and then I did other things for a while, consciously putting the project on the back burner, because I just _knew_ it needed to simmer a bit. It was so ready, and yet- it wasn't coming out right, not yet. It needed to stew impatiently and NOT be worked on for a day.
After that short break, I went back and took some different approaches, got up a head of steam, hassled with some bizarre bugs (too many objects updating themselves in various ways...) and bam! I had a working version.
I'd say a very important part of working 'in the zone' if that's the way you work, is being allowed and able to step AWAY from the zone and go do other things or even do nothing for a while. Not just hours, even days. I need to be able to do that. It may sound contradictory... *shrug*
A lot of horrific stuff wouldn't have happened without Christianity. So much suffering and death in the name of god.
A lot of good things wouldn't have happened to me without drugs. To each his own. While I think laws forbidding religion would do a lot more to make the world a better place than laws against drugs, I think each individual should be left to their own devices.
They don't both start with christ. crystal. as in crystal clear. as in could i be any more....
You put unsupported blame on drugs for causing 'horrible things to happen'. I put much more easily supported blame for 'horrible things happening' on Christianity. I know your response - it's not christianity's fault. So you should expect mine, it's not the drugs. The problems were already in the people. Drugs are no more to blame for 'drug induced' killings than God is to blame for religious killings. Drugs don't kill people, people kill people. Guns don't kill people, people kill people. God doesn't kill people - Oh, no wait, he does actually.
Man, christianity would be such a nice religion if it weren't for all the damn christians....
I agree with you and here's what I've observed: When I do something for myself, everything works great. I can work 20 hours non stop, than sleep 6 hours, than work another 20 hours, sleep 6, work 20, sleep, work... and I'm not even tired. I'm working better with quiet and when no one interrupts me, but I still can work with random noise of kids playing outside, with phones ringing and with people interrupting me. I'm in hack mode and I'm just hacking.
But when I work for someone else, while I should have a better motivation being paid, I just can't focus, every little sound is disturbing, I'm angry all of the time, etc. So my strongest problems with work are of the emotional nature, while I have no intellectual problems with that work at all.
When I do what I want, I usually (not always of course, but 95% of the time) can easily find my zone. When I do what I have to, I usually (95% of the time) cannot easily find my zone and have to work under heavy stress.
I suppose that it is somehow similar to writing a novel, i.e. when an author is writing for himself, when all that matters is a great novel, his own novel, everything works. But when he has to write a novel, his employer's novel, because he needs money, nothing works the same.
When I work for money it's no longer a hobby, I do it because I have to, not because I want to and this is a great difference for me. I can't have to do something, I have to want to do it, in order to do it well. I hope you people understand what I'm trying to say, it's kind of my self-psychoanalysis, quite a difficult task.
When I have to do something, anything, I don't feel that I do something important, and I just don't see much sense in doing it. The one and only sense is money, but this is unfortunately quite a poor imperative for me. (Don't get me wrong, I don't consider it a virtue, because I have serious troubles with money all the time. I'm trying to convince myself that this money is very important, which it is, but I feel that I'm doing something completely stupid and pointless, and I just can't focus and relax at all.)
It's actually a very serious problem, if anyone is or was experiencing similar problems, please answer, I'd like to know how do you solve them or live with them. I know that this thread is somehow old, but I hope someone will read it and answer. Every comment to this article I read talks about the furniture, equipment, noise, music, drinks and other elements of physical environment. It could really help me if I could read comments of people who deal with similar problems as mine. Thanks.
~shiny
WILL HACK FOR $$$
Alex Bischoff
HTML/CSS coder for hire