I'm just curious about whether any of you have a real-world use for your golfing skills. I'd also be interested to hear if you know of golf-related jobs even if you aren't involved in them, or if you have areas of your life where golfing has been required for practical purposes.
Quite the opposite actually. The code I write for work has to be readable, understandable, and usable by folks with a very limited programming background. I have to err on the side of extreme verbosity in my code, otherwise I'd have to spend a lot of extra time explaining it to others. (As an aside, this is probably why I'm not so good at golfing.)
Much like the mentality of code golf challenges on PPCG, efficiency must often be sacrificed. However, in my case it's sacrificed for the sake of readability, not for saving a byte of length. Unlike PPCG code, though occasionally inefficient, my code must finish executing before the eventual heat death of the universe.
Note that this is not my preferred programming style, but it's what's expected of me in my current position.
I think you'll find that golfed code is not well received by folks in a professional environment who have to deal with it, at least in my experience.
I'd also be interested to hear if you know of any golf-related jobs...
Ever heard of Tiger Woods? He golfs for a living, and I hear he's pretty good at it. Haven't seen him around PPCG in a while though.
Yes, I do!
I work for Dyalog. Part of my work is "spreading the word", and that officially includes code-golfs.
In fact, our APL team is looking to hire, and we are more interested in golfers than regular programmers, as the former are more likely to have the right mindset. At least one active PPCG user will be an intern this summer... [edit: was true of summer 2017, and is true of summer 2018 too]
Some low cost micros have very resource constrained. eg
Program Memory (KB) 0.375
RAM Bytes 16
While I'm not actually using any quite that small - even larger chips can run out of space quickly when you don't have space for libraries to lean on.
There's also a bit of golfing used for protocols over the mobile networks (M2M)
Today I tasked my (physics) students with something along the lines of:
- Write a function that does X.
- Use your function from Task 1 to do X.
Now, I wanted to provide students with some solution to Task 1, so that if they failed to do it, they could do Task 2 nonetheless. Obviously, I also did not just want to give them any plain hints on how to do Task 1. Giving them anything compiled would risk portability issues or my students not knowing how to use it.
Fortunately, the vast majority of golfing tricks also obfuscate your code, so I found it easy to give my students something which would take longer to reverse-engineer into some human-readable solution than solving the exercise as intended.