I have about 5000 lines of code I'm about to delete forever
-
It's about 4 years old, messy, in one file, and works great. You know how it is. It's time to retire it. But it feels like having really long luxurious hair that's about to be shaved off. I am going to cringe while deleting this file. Oh I can just feel it.
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
-
It's about 4 years old, messy, in one file, and works great. You know how it is. It's time to retire it. But it feels like having really long luxurious hair that's about to be shaved off. I am going to cringe while deleting this file. Oh I can just feel it.
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
If it's under source control, its not really gone, is it? But it's still like lopping off a limb, or something. There's always that little voice in the back of one's head "But what if I need it, later?" :)
"A little song, a little dance, a little seltzer down your pants" Chuckles the clown
-
It's about 4 years old, messy, in one file, and works great. You know how it is. It's time to retire it. But it feels like having really long luxurious hair that's about to be shaved off. I am going to cringe while deleting this file. Oh I can just feel it.
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
Never throw anything away. At times I'll change an extension, e.g. from
.c
to.c!
so it won't get accidently compiled. Recently I have also zipped up some code I don't want to pollute my builds. P.S. I'm also spending some time searching for a snippet of code (C) I'm sure I wrote a while back, but I probably don't have a copy of it. I wound up writing a new version of it on Friday, but I want to know what the old version was. -
It's about 4 years old, messy, in one file, and works great. You know how it is. It's time to retire it. But it feels like having really long luxurious hair that's about to be shaved off. I am going to cringe while deleting this file. Oh I can just feel it.
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
My view This weekend I finished finally migrating some 30 year old Modula 2 code into c++. To keep track of everything (having the history of source code and the target code consistent), I added the Modula 2 code (< 10MB :) ) also to the repository. I know, I'm a nitpicker, but I have no problem with that :laugh:
-
It's about 4 years old, messy, in one file, and works great. You know how it is. It's time to retire it. But it feels like having really long luxurious hair that's about to be shaved off. I am going to cringe while deleting this file. Oh I can just feel it.
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
I always found it very satisfying to delete code that was no longer needed because of refactoring.
Robust Services Core | Software Techniques for Lemmings | Articles
The fox knows many things, but the hedgehog knows one big thing. -
Never throw anything away. At times I'll change an extension, e.g. from
.c
to.c!
so it won't get accidently compiled. Recently I have also zipped up some code I don't want to pollute my builds. P.S. I'm also spending some time searching for a snippet of code (C) I'm sure I wrote a while back, but I probably don't have a copy of it. I wound up writing a new version of it on Friday, but I want to know what the old version was.PIEBALDconsult wrote:
I want to know what the old version was.
Ask the NSA; they probably have a copy somewhre. :-\
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.
-
I always found it very satisfying to delete code that was no longer needed because of refactoring.
Robust Services Core | Software Techniques for Lemmings | Articles
The fox knows many things, but the hedgehog knows one big thing.I was about to write very same, but you beat me to it. I must "admit" that I have saved a few files of source code, some of them more than 45 years old, but that is mostly for "The Weird and The Wonderful" kind of use. Especially if the file is in some now-abandoned language, such as Snobol or APL, I may enjoy taking a look at the old code and ask myself (noone else cares :-): "Why didn't we preserve that mechanism in modern languages? And that one?
Religious freedom is the freedom to say that two plus two make five.
-
If it's under source control, its not really gone, is it? But it's still like lopping off a limb, or something. There's always that little voice in the back of one's head "But what if I need it, later?" :)
"A little song, a little dance, a little seltzer down your pants" Chuckles the clown
Some times when I visit museums, I feel like a teenager: I walk around among all that age old stuff, asking, "Why does anyone spend resources on keeping all this old shit? Some of the utensils (or whatever they are), not even the museum guides can tell what they are for! If you throw it all away, noone would really be affected (except the museum guides)." As long as there is the slightest chance that the code will be taken into use in the future: Sure, you can keep a copy in a source control system. But some code is just dead forever. Who would ever need the driver code for a Fastrand drum? ("A device for storing angular momentum", according to one dictionary.) Even if you wrote your own DOS driver for an 8" floppy disk: You don't have the hardware for it today. If you find some old 8" floppies, you have to go to some specialist data recovery company to have it read, if a all possible. Another aspect: How many source control systems have I been through in my professional life? About half a dozen different ones. For most of them, I could probably dig up some code to run it on today's hardware, but that is only because a few people still use them. If I want to look at the code 30 years from now, chances are that it doesn't matter if the software is unavailable, because it is stored on an obsolete medium. Or the other way around: It doesn't matter if the medium is obsolete, because you have no software for that kind of device anyway. I've got files on 7-track half-inch tape reels, 8" floppies in a non-IBM format (different low-level formatting), DCT-300 and DCT-100 tape cassettes, two different Travan tape formats, 8 track punched paper tape and punched cards. I keep them to show people the medium, not the stored information. You can't that easily show your (grand)kids what a - now defunct - source control system looks like :-) So, be honest to yourself: Realize that these files will never, ever have any sort of value in the future. Do not tuck them away in your attic, when there is no reason at all to do so.
Religious freedom is the freedom to say that two plus two make five.
-
It's about 4 years old, messy, in one file, and works great. You know how it is. It's time to retire it. But it feels like having really long luxurious hair that's about to be shaved off. I am going to cringe while deleting this file. Oh I can just feel it.
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
-
It's about 4 years old, messy, in one file, and works great. You know how it is. It's time to retire it. But it feels like having really long luxurious hair that's about to be shaved off. I am going to cringe while deleting this file. Oh I can just feel it.
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix