Ask HN: Why does writing code physically hurt my brain?

23 points by HNUser34159 ↗ HN
I come from a traditional hardware / os level "Sysadmin" background. Over the past 4, maybe 5 years I've been having to write (and interact with) more and more code, and it literally clouds my brain, makes me very agitated, and makes me physically feel like I've had a seizure

At work we're moving from one cloud provider to another, and the new cloud provider is pretty much "scripting only" for administration.

Trying to work through the certification materials for said cloud provider, and it's literally got me feeling like I want to jump off a cliff due to their confusing syntax, and general wonkiness. At least with Linux, there's man pages, and the -h --help, etc. flags

So, to get to my point, how are non-developers making the switch to this "infra as code" paradigm without giving themselves a stroke?

37 comments

[ 3.0 ms ] story [ 90.9 ms ] thread
When my brain was younger and I was going through my first real programming gig/hazing ritual I felt largely the same. I was lucky to have a boss that let me go at my own pace and build up from small self contained procedural scripts, to several related classes, to practicing design patterns by writing my own datase abstraction layer and dB access objects, then controllers, then templating scheme, and by the time I was done “practicing” I was only halfway lost and broken when I jumped into a sprawling framework that handled all this for me :-)

It is just exercising your short term memory that hurts your brain and causes all that stress and you’ll get better. Soon all those layers of abstraction and the way they relate will be more muscle memory. Like driving. You’ll “glance at your mirrors” when merging and it won’t seem so stressful. It just takes time and practice

Also, stackoverflow is man pages for programmers

When I "write" Python it's more like stitching together individual pieces into something that does the job.

Can't use stackoverflow on a certification exam.

You’ll learn the libraries you’re stitching together and/or the important details of the framework you’re working with when/as things break or as you get requirements for things you’ve never done before.

Production programming as opposed to academic programming is about writing as little of your own code as possible. Because we all suck at writing code :-)

Certifications are another matter. I’ve found the ones worth having take a career to prep for and the ones your boss tells you to get can be passed by studying a cheat sheet online for a couple hours.

The Azure Administrator Associate exam drills hard on their Powershell CLI stuff. I threw up and had to take a nap after doing the practice exam earlier today.

Based on the labs I've done, and other materials, I'd say it's NOT a "cheat sheet" exam.

It's really sorting out syntax and structures that fries my brain. Code never "sticks" with me, and I'm in a constant state of bootstrapping, for lack of a better term.

https://www.learningtree.com/courses/8542/microsoft-azure-ad...

Are you taking the cert to get a job or is your job making you get the cert?

Getting your employer to pay for training and the actual cert is definitely the way to go. I have always discouraged anyone looking to get the cert first

I can't share too much detail. Long story short, I have to get that cert asap. (as in, within the next week or so). Work is covering it, and last week I did a 4 day training.

There's a lot to the exam I get, simply from experience. I'm getting slaughtered on the Azure CLI stuff since I simply cannot get the syntax to stick, no matter how many times I re-run through the labs.

Maybe your anxiety comes from the pressure to do the cert and not it's contents.

Do you feel you're not getting it or that you're not getting it fast enough? The latter can evolve into the former. And perpetuate the anxiety loop.

Mostly hardlocking on code, and issues committing syntax to memory. Which of course, given the extremely short timeframe (need to be certified in the next week or so) probably does amplify inherent exam anxiety.
Are you sure you're getting enough sleep?
Who in Information Technology gets decent sleep?
I can’t speak for IT but I’d say most software engineers try and get decent sleep. I think most of my coworkers have regular albeit late to bed and rise schedules.
Sleep is the best performance, memory and focus enhancement “drug” and immune system booster in existence.

Losing just an hour of sleep per night results in 30-70% reduction for all of the above, without us perceiving the difference. It’s crazy how underestimated the importance of sleep is in our culture.

Check out this interview with Mathew Locker, one of the lead sleep researchers in the world. Blew my mind.

https://overcast.fm/+RxHE3jC4w

You don't need to sell me on sleep. I've often had to fight with c-level execs at some of the startups I've been at before with PROVEN studies and hard data showing that team performance rapidly degrades after 45-50 hours of work per week.
+1 you should read his book ‘why we sleep’ it’s fascinating.
Proper sleep, nutrition and exercise can enhance your ability to absorb knowledge 50% or more. If feel like you do, you might want to adjust your lifestyle. Start by reading “why we sleep”.
You may benefit from seeing a neurologist over possible migraines. Everyone's symptoms/triggers are different, and some factor of the screentime, workload, thinking with programming, and stress could be giving these symptoms.
I used to have very bad migraines in my early 20's. To this day I still avoid dried pineapple (like you find in trail mix), and "whoppers" candy.

My last actual migraine was in December of 2015

Once you are used to highly regularised way of working, anything kludgier is pain.

And you spend half your time wondering, "who would allow such a thing to exist like this, where is the pattern?"

This just further erodes at the stack of items you hold in your head while trying to process all the edge cases and other unexpected crap.

One thing though, and I have no idea if relevant, but many people get anxious or struggle because they don't breath out enough.

Especially when a little confronted in some way, they unconsciously keep on topping up on breath without fully breathing out.

Then they find they can't breath in enough, a little panic starts and goes from there.

The number of people I have come across that were "topped up" like this is amazing, and many did not even realise until it was pointed out to them.

Three deep, push out breaths, and start again - fresh oxygen, room to breath, often calming and feels a whole lot better.

Me too that's why I stopped coding all together and took the sysop pill
Seems that job function is becoming more "infra as code" though. Been poking at the job market and it looks like most "sysops" are Chef/Ansible/Puppet/Salt/Terraform/Cloud script monkeys these days.
Once you get used to it, you really start to like it. Trust me, I've written so many programs at this point, but most of them are dead projects :D

It might "physically hurt" if you aren't really comfortable with the language, too. I've found this especially true with Bash, as I just don't like the syntax, so you might be trying too hard to understand it.

Anyways, you should have fun developing at one point. Good luck :D

I would rather physically rack 100 servers in a day than write 100 lines of code in a day.
learning a new skill is like exercise- it’ll hurt in the beginning but you’ll adapt
Yeah, I'd rather not. Pretty comfortable dabbling with Python for scientific projects, and a little API/JSON work. Pretty sure after more than fifteen years in IT, if I had the talent for code, it would have "clicked" by now.

Honestly, given the direction things are heading (Startups wanting generic worker drones, and not specialists) I'm about a hair's breadth from selling everything I own, and buying a $30,000 farm house somewhere in a rural flyover state.

Scripting and automation is one thing, but startups putting ops/architect roles through Fizzbuzz bullshit is a little annoying after a dozen or so interviews.

thats the way technology has always been - you have to reskill every few years or get left behind
There's a difference between keeping up with new tech, and completely changing what it is one does.
If it feels like you've had a seizure, may I suggest you see a medical doctor?
This is a long standing issue, and why I usually don't touch code. However, as mentioned in other comments, the industry as a whole is moving ops/sysadmin type roles to generic script monkeys.
I’m of the opinion that Sysadmins who don’t know how to code are rather ineffective.

Not much separating you from a help desk tech.

Here are what might help you through the pain:

Treat mistakes as learning process

Treat errors as a tool

Treat difficult workmates and bosses as children

Treat scripts as writing stories for computers in different language.

If it affects you physically, it may be stress. Try to think that the whole process, whether it results in a good thing or a bad thing, is actually a progress.

There are indeed some frustrating part in scripting, unclear library docs, no static typings, slow feedback loops.

Keep in mind your end goal, being sysadmin right now is where you are and maybe a stepping stone. Do it one by one. Take a step back, calm yourself, see what's around you and take some steps to easen the pain and achieve your goal, whatever that is.

The goal is to stay gainfully employed without having a stroke.
:D that's a start.

I used to have the same problem, but not when writing codes.

I love writing codes, and someday I was put in a lead/management position and the context switching between having to solve technical and managerial was giving me pain.

Then I allowed myself to make some mistake. Giving myself a sandbox to play in. That really helps.

At this point I'd trade having to manage over having to code.

Totally agree about context switching. I'm pretty much worthless at it.

Keep living mate. Cheers
At the end of the day, the machines you maintain are designed to run code. There’s only so much that can be done to provide you with non-code ways of managing said code.

The industry is trending towards AWS + “the cloud” because people who know how to code are providing themselves the tooling required to bypass traditional IT.

If coding physically hurts your brain, you might consider another field altogether. I mean you no disrespect but that sounds like an awful reality. There are plenty of ways to make a good living that do not require one to be tormented daily.