5 ms·
I found the "Alternative careers" hilarious. My version: Your code sucks. Alternative careers: "Do you want fries with that?" OP's version: 1. Inabili
by edw519 15y ago
I found the "Alternative careers" hilarious.
My version:
Your code sucks.
Alternative careers: "Do you want fries with that?"
OP's version:
1. Inability to determine the order of program execution
Alternative careers: Electrician, Plumber, Architect, Civil engineer
2. Insufficient ability to think abstractly
Alternative careers: Contract negotiator, Method actor
3. Collyer Brothers syndrome
Alternative careers: Antique dealer, Bag lady
4. Dysfunctional sense of causality
Alternative careers: Playing the slot machines in Vegas
5. Indifference to outcomes
Alternative careers: Debt collection, Telemarketing
So the real test of a good programmer is one who can write a routine that crawls the source code of a bad programmer and tells them what they should really be doing.
- eru 15y agoI'm glad that as a purely functional programmer I don't have to worry about order of program execution so much.
- jrockway 15y agoUnless you are using a magical computer, you still have to worry; there are resources you must manage that depend on the underlying OS and von Neumann architecture. An example that bites Haskell programmers are space leaks due to too much partial evaluation and not enough full evaluation. Other problems include keeping a file open for too long and leaking the fd. An ideal computer has infinite space and no files. A real one... nope :) The advantage of functional programming languages is that you get to write part of your program as though you have an ideal lambda calculus evaluator. But at some point, you still have to realize that there's a grey box under your desk that doesn't know what a lambda or fixed point is. (But this is better than programming languages that say "hey, you've got a heap, a stack, and some registers! well, so long!")
- eru 15y agoYes. Notice my choice of words. "Not so much" vs "not at all."
- Xurinos 15y agoIn fairness, "so much" fits the "weasel words" category (https://en.wikipedia.org/wiki/Weasel_word https://en.wikipedia.org/wiki/Weasel_word). You and jrockway placed different values on the phrase because it is a "numerically vague expression". I admit to making similar expressions. :)
- Sniffnoy 15y agoI have to wonder if someone who can't determine order of execution should be an electrician or plumber either -- those aren't static systems!
- JonnieCache 15y agoI guess the point is that there's no "privileged" position in these systems which changes with time, like the point of execution in programming. What is the proper name for the bit of code that's currently being executed? I've suddenly realised that its a concept you think about constantly when coding, but its so much a part of the scenery so to speak that you never consciously consider it.
- kennywinker 15y agoTop of the stack?
- Zaak 15y agohttp://en.wikipedia.org/wiki/Coroutine http://en.wikipedia.org/wiki/Coroutine
- Sniffnoy 15y agoProgram counter?
- Androsynth 15y agoAt the hardware level it's called the program counter, which is a register containing the address of the current operation the processor is running. After the operation is finished, it increments itself and moves to the next step in the program. Edit: just realized I didn't really answer the question, I believe what your actually talking about is a statement. I usually jump at the chance to talk about stuff from my old EE days :)
- Zaak 15y agoThe program counter isn't the only element of that "what the program is doing now" state though. The context in which the current instruction is being executed makes a world of difference.