Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > comp.os.linux.misc > #81672
| Date | 2026-01-31 23:57 -0500 |
|---|---|
| Subject | Re: The Value of a 2nd Look At Code |
| Newsgroups | comp.os.linux.misc |
| References | (1 earlier) <6975f968$0$28050$426a74cc@news.free.fr> <3csdR.1398925$H7H.1265376@fx13.iad> <Sqidna7J3815S-v0nZ2dnZfqnPWdnZ2d@giganews.com> <697dd8c4$0$11434$426a74cc@news.free.fr> <9UsfR.24823$CC3.14912@fx45.iad> |
| From | c186282 <c186282@nnada.net> |
| Organization | wokiesux |
| Message-ID | <4W-dnWMvg42jQOP0nZ2dnZfqn_WdnZ2d@giganews.com> (permalink) |
On 1/31/26 14:39, Charlie Gibbs wrote: > On 2026-01-31, Stéphane CARPENTIER <sc@fiat-linux.fr> wrote: > >> Le 26-01-2026, c186282 <c186282@nnada.net> a écrit : >> >>> First-passed at code are often inefficient. The first >>> goal is just to Make It Work. >> >> Agreed. >> >>> However no good programmer should LEAVE it at that. Refine, polish, >>> de-crap for the 2nd pass. >> >> I don't agree here. It really depends on your goal. If your program is a >> one time script designed to avoid you hours of manual stuff, then if the >> first pass took you half an hour to work, it's enough and a good >> programmer should leave it like that. Now, if your script is designed >> only for you to be used from time to time, you should take some time to >> take care of some edge case which can appear in your environment. But >> you shouldn't take too much time with things that doesn't concern you. >> And if your purpose is to provide your program to the entire world, >> then, yes at that time you should polish it and take care of every edge >> case that can happen. >> >> But a good programmer doesn't have to consider he's writing a code >> designed for the entire world each time he's starting to write a little >> program. > > Although I agree with you in principle, you have to be careful. > Consider the case of a one-shot program you wrote to create a > listing that was only going to be used during a clean-up effort. > Then some manager sees it and says, "Hey, I _like_ this report! > Have a copy on my desk every Monday morning." > > Hence one of my Words to Live By: A one-shot program is one > that you'll only need once... this week. Long long back where I worked bought it's first color printer - an expensive, hideously slow, Epson jet that needed special paper for high-rez. My boss said we kind of needed to find a few reasons to justify the money to the higher ups. So ... I whipped up some quick-n-dirty 123 spreadsheets. A multi-year graph on top and a table of years/numbers below so exact figures could be seen. Took about a day to make 'em work. Had to start printing at 5pm so all the copies would be ready by 9am next morning. Yea, THAT slow :-) 35+ years later, even after I retired, the bosses STILL wanted those reports every month. Were they sexy and pretty, no. However they nicely encapsulated exactly what they needed to see in immediately comprehensible form. So, a 'today', mostly PR, bit of coding became a decades-long thing. A few refinements were added, rough calx smoothed out and smoothed again, but the basics didn't change. From 123 to Quattro to Excel to Libre ... the new guy likely ported them back to Excel. Did the final clean-up just before I left, to make it easier for the new guy, who was kind of a poor coder (more a 101% all-M$ Solutions expert instead). So hell YES ... ethic and pride if nothing else ... DO make those 'just for today' bits of code NICE. SO many times I've had to re-use them for decades. Just today I needed code to reset USB devices, as if you'd just plugged in everything after boot. Found (re-found?) a simple whipped-together shell script (by 'Eli') that went through them all and restarted. Probably a whipped-together little script, but nice and clear and did the damned job. (lots of USB drives, they don't ALWAYS mount on a reboot, so gotta fake a new plug-in, run the code in root crontab). Oh, "LABEL=" fstab entries get around the quirk of Linux mounting drives to different /dev/sdaX on reboots ....
Back to comp.os.linux.misc | Previous | Next — Previous in thread | Next in thread | Find similar
The Value of a 2nd Look At Code c186282 <c186282@nnada.net> - 2026-01-24 21:55 -0500
Re: The Value of a 2nd Look At Code Stéphane CARPENTIER <sc@fiat-linux.fr> - 2026-01-25 11:07 +0000
Re: The Value of a 2nd Look At Code Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2026-01-25 17:14 +0000
Re: The Value of a 2nd Look At Code c186282 <c186282@nnada.net> - 2026-01-25 21:52 -0500
Re: The Value of a 2nd Look At Code John Ames <commodorejohn@gmail.com> - 2026-01-26 08:18 -0800
Re: The Value of a 2nd Look At Code c186282 <c186282@nnada.net> - 2026-01-26 13:04 -0500
Re: The Value of a 2nd Look At Code Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2026-01-27 01:26 +0000
Re: The Value of a 2nd Look At Code Marc Haber <mh+usenetspam1118@zugschl.us> - 2026-01-27 08:58 +0100
Re: The Value of a 2nd Look At Code not@telling.you.invalid (Computer Nerd Kev) - 2026-01-29 08:26 +1000
Re: The Value of a 2nd Look At Code c186282 <c186282@nnada.net> - 2026-01-28 23:10 -0500
Re: The Value of a 2nd Look At Code Stéphane CARPENTIER <sc@fiat-linux.fr> - 2026-01-31 10:26 +0000
Re: The Value of a 2nd Look At Code Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2026-01-31 19:39 +0000
Re: The Value of a 2nd Look At Code c186282 <c186282@nnada.net> - 2026-01-31 23:57 -0500
Re: The Value of a 2nd Look At Code Chris Ahlstrom <OFeem1987@teleworm.us> - 2026-01-26 07:09 -0500
Re: The Value of a 2nd Look At Code Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2026-01-27 01:26 +0000
Re: The Value of a 2nd Look At Code c186282 <c186282@nnada.net> - 2026-01-27 01:23 -0500
Re: The Value of a 2nd Look At Code The Natural Philosopher <tnp@invalid.invalid> - 2026-01-27 10:24 +0000
Re: The Value of a 2nd Look At Code Stéphane CARPENTIER <sc@fiat-linux.fr> - 2026-01-31 10:16 +0000
Re: The Value of a 2nd Look At Code rbowman <bowman@montana.com> - 2026-02-01 03:04 +0000
Re: The Value of a 2nd Look At Code John Ames <commodorejohn@gmail.com> - 2026-02-02 08:44 -0800
Re: The Value of a 2nd Look At Code rbowman <bowman@montana.com> - 2026-02-02 21:27 +0000
Re: The Value of a 2nd Look At Code c186282 <c186282@nnada.net> - 2026-02-02 21:06 -0500
Re: The Value of a 2nd Look At Code ram@zedat.fu-berlin.de (Stefan Ram) - 2026-01-25 17:53 +0000
Re: The Value of a 2nd Look At Code c186282 <c186282@nnada.net> - 2026-01-25 21:52 -0500
Re: The Value of a 2nd Look At Code Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-01-25 19:16 +0000
Re: The Value of a 2nd Look At Code c186282 <c186282@nnada.net> - 2026-01-25 21:58 -0500
Re: The Value of a 2nd Look At Code Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2026-01-26 04:33 +0000
Re: The Value of a 2nd Look At Code Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-01-26 04:46 +0000
Re: The Value of a 2nd Look At Code c186282 <c186282@nnada.net> - 2026-01-26 01:05 -0500
Re: The Value of a 2nd Look At Code Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2026-01-27 01:26 +0000
Re: The Value of a 2nd Look At Code Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-01-27 05:13 +0000
Re: The Value of a 2nd Look At Code c186282 <c186282@nnada.net> - 2026-01-26 00:44 -0500
Re: The Value of a 2nd Look At Code Chris Ahlstrom <OFeem1987@teleworm.us> - 2026-01-26 07:11 -0500
csiph-web