|
Agreed. My current work project is replacing a Windows service in one of our products that's landed in my lap. The old code is pretty crufty, as it got its start back in 2000 and four products ago. It's had numerous hands on it since then, and my boss is willing to let me do a rewrite.
Anywho, it's been fun architecting the thing. I've got the outer layers in place, and am working toward the middle. I think the thing I'm enjoying the most is being able to make 'large' changes in how I do things without disrupting pesky details.
Software Zen: delete this;
|
|
|
|
|
Especially when you come back to it 2 years later and can dive right back in because the design is logical and the variables have names that make remembering easy!
-edit: Oh, wait! Yours is template metaprograming. Never mind!
|
|
|
|
|
old code
baked in a less elegant time
its functions rusty
its features, anachronistic
every encounter with it reminds me of my past failure of imagination.
if I could only think ahead a few more steps
i'd never have
old code
To err is human. Fortune favors the monsters.
|
|
|
|
|
|
It rhymes in binary.
To err is human. Fortune favors the monsters.
|
|
|
|
|
... aaaand I always forget to expect a hex...
|
|
|
|
|
honey the codewitch wrote: It rhymes in binary.
Sure - but its definately not kid-sister safe in octal!
If you can't laugh at yourself - ask me and I will do it for you.
|
|
|
|
|
|
just ruminating. and procrastinating a rewrite.
To err is human. Fortune favors the monsters.
|
|
|
|
|
But rewrites are fun! Until you start retesting...
|
|
|
|
|
This one is complicated by multiple screen modes, each of which must be represented by a different concrete type with not much in the way of common base class.
The screen mode function itself is a bit odd at first, being like
auto scmode = screen.mode<1,4>();
then you can draw to scmode.
I don't like it but the way my graphics library is designed, pixels of different formats are different concrete types so like
gfx::gsc_pixel<1>; gfx::gsc_pixel<8>; gfx::rgb_pixel<16>; gfx::ycbcr_pixel<24>; gfx::rgba_pixel<32>;
therefore different modes with different pixel formats must be different types.
it has a number of advantages. this is just one area where i don't care for it.
To err is human. Fortune favors the monsters.
|
|
|
|
|
1 bit, 4 bits, 1 byte, 2 bytes, 3 bytes, 4 bytes works with food (Pun intended) and bitmaps. Lots of bookkeeping, though.
Unlike old soldiers, old code may never die and it may never fade away.
|
|
|
|
|
Code matures slowly
Function forgotten, it dies
I wrote it to last
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
"
Ancient computers ranged in the long caves deep in the bowels of the planet tick away the dark millennia, and the ages hang heavy on their dusty databanks.
They take the occasional potshot to relieve the monotony.
" -- Slartibartfast
|
|
|
|
|
The wheel of time always keep turning, there will always be old code!
|
|
|
|
|
code is like cars, as soon as you drive it off the lot, its old.
|
|
|
|
|
Code is like life that way.
The second a routine is born,
the fates have cut its skein to an exact length that you may never know even though it is YOU that weaves it into that tapestry known as a program.
|
|
|
|
|
"The ancient machine was but a pale shadow of its original glory. It had performed its duty, destroying the fifth planet in this system. Like all of its kind, it had not expected to survive what should have been its penultimate moment. An collection of debris accidently shielded it from dissolution, eventually casting it into orbit around the next planet inward.
At some point in its long, long journey its intelligence was restored by the repair automata sufficiently that the mission became its primary concern yet again. Many systems no longer existed, or could not be repaired. Still, the mission must be performed.
It searched, deep in the few uncorrupted records it still contained. There must be a method for completing the mission. In recent orbits small bits of metal debris had been expelled by the third planet. Some of the bits had even landed on the planet below, emitting weak electromagnetic signals. The ancient records were emphatic that this was one of the few warnings it would receive.
The machine continued to watch, and wait."
Software Zen: delete this;
|
|
|
|
|
I remember this I think, but I can't place it - like something I read a long time ago.
To err is human. Fortune favors the monsters.
|
|
|
|
|
Probably because I've been reading science fiction for 50 years and can riff on most of the tropes pretty easily.
If you've ever read the Bolo series of books originated by Keith Laumer, that's the tone I was looking for.
Software Zen: delete this;
|
|
|
|
|
Oh you wrote that? I did not expect that. You really had me going. It was bugging me all night.
To err is human. Fortune favors the monsters.
|
|
|
|
|
Thanks .
Software Zen: delete this;
|
|
|
|
|
Weeeeeell, poop. So I can't use an extra Audible credit to listen the whole thing? This comes under the popcorn-in-the-office rule - you can't just pop a bag, let the buttery aroma fill the place, and then leave for the day and take the popcorn with you.
"Did you make enough for everybody?" "No Ma'am." "Then spit it out."
We also had a similarly unforgiving rule about microwaving fish dishes or leaving a gallon jar of kombucha to ferment in the break room.
Honestly, I'd read/listen to the whole thing. I'll look up the author/series and see what's available in a travel-friendly format. Thanks!
-Bob
|
|
|
|
|
Yeah, I've been reading science fiction and fantasy books since the middle 60's. Still got the Laumer books (with about a thousand more) in boxes in the garage. I re-read the Bolo series (again) just a few years ago. Good stuff.
|
|
|
|
|
When I look back of my old code, I think to myself, "Holy broccoli, Batman! What great code. Did I actually write that? So eloquent and yet so powerful."
To which I hear the reply, "Get away from computer, Granddad. You know it makes you sad."
Nothing succeeds like a budgie without teeth.
To err is human, to arr is pirate.
|
|
|
|