When did they kick in ?
So there I am working away tonight, trying to install the latest build on some server, from home, with a dodgy net connection. ysh is still raising NotImplementedErrors so I'm taking the full log by copy-and-paste-and-run-and-copy-and-paste.
Yes, I've heard of screen and the like, but I prefer going back-to-basics when considering a new feature, as it allows much more flexibility in discarding use cases. Comes from doing so much building, installing and testing I guess. When your edit-compile-run cycle is measured in days, not minutes, it makes you fussier about wasted effort. And putting effort into doing it the right way for some app, when we might not end up using that app, is wasted effort. So a new feature always brings me back to the bash command line
So I'm still there, pasting to the log command by command, when the connection goes, losing the log completely. So I set it all up again, and I'm there again pasting to the log command again by command again, when (you guessed it) the connection goes again. As does the log, again.
Such a dumb error even my current wife can tell me how to fix it. Unfortunately it's not the log that I'm really losing - it's the logging in, find right tarball, edit the config file, ... and all the commands that are required to set up the test I'm trying to verify. And the new feature I haven't written yet is supposed to save that.
That's when the blogs kicked in.
The Internet has added layers to my programming. Google it did a few years ago, after which I threw away manuals. Copy the error message from command line to browser, and (usually) find the answer. Now programming blogs are adding more layers.
Tomorrow I'll get up, go to office, and the problem will be solved, with no need for any code at all, at all.
What I learned from reading programming blogs that made me a better programmer:
Yes, I've heard of screen and the like, but I prefer going back-to-basics when considering a new feature, as it allows much more flexibility in discarding use cases. Comes from doing so much building, installing and testing I guess. When your edit-compile-run cycle is measured in days, not minutes, it makes you fussier about wasted effort. And putting effort into doing it the right way for some app, when we might not end up using that app, is wasted effort. So a new feature always brings me back to the bash command line
- type in command to terminal
- run command
- copy everything from terminal, paste to log
- copy command from old log to terminal
- run command
- copy everything from terminal paste to new log
So I'm still there, pasting to the log command by command, when the connection goes, losing the log completely. So I set it all up again, and I'm there again pasting to the log command again by command again, when (you guessed it) the connection goes again. As does the log, again.
Such a dumb error even my current wife can tell me how to fix it. Unfortunately it's not the log that I'm really losing - it's the logging in, find right tarball, edit the config file, ... and all the commands that are required to set up the test I'm trying to verify. And the new feature I haven't written yet is supposed to save that.
That's when the blogs kicked in.
The Internet has added layers to my programming. Google it did a few years ago, after which I threw away manuals. Copy the error message from command line to browser, and (usually) find the answer. Now programming blogs are adding more layers.
- Sound programming practice makes for safe blogging. But it's a bit boring, so those wonderous bloggers have found many ways to repeat (e.g. Martin Fowler's one about duplication) in new ways
- The first time you do something wrong, you just fix it
- The second time you do something similarly bad, you wince at the stupidity, but you fix it anyway
- The third time you do something similar, you refactor the fix into a program.
- And speculation about The Next Big Thing™ makes for interesting blogging, so they have found many ways to introduce
Tomorrow I'll get up, go to office, and the problem will be solved, with no need for any code at all, at all.
What I learned from reading programming blogs that made me a better programmer:
Don't write so much
Labels: coding, context, intelligence, logging, programming, python, recovery, reddit, review, sleeplessnessisismisismIS
1 Comments:
Um,
> command > ./log 2>&1
?
Or, perhaps better,
#!/bin/ksh
DATE=`date +%Y%m%d%H%M`
really \
long \
command \
> ./log.$DATE 2>&1
Post a Comment
<< Home