Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. I have about 5000 lines of code I'm about to delete forever

I have about 5000 lines of code I'm about to delete forever

Scheduled Pinned Locked Moved The Lounge
designcomgraphicsiot
10 Posts 9 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    honey the codewitch
    wrote on last edited by
    #1

    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

    K P 0 Greg UtasG J 6 Replies Last reply
    0
    • H honey the codewitch

      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

      K Offline
      K Offline
      k5054
      wrote on last edited by
      #2

      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

      T 1 Reply Last reply
      0
      • H honey the codewitch

        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

        P Offline
        P Offline
        PIEBALDconsult
        wrote on last edited by
        #3

        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.

        D 1 Reply Last reply
        0
        • H honey the codewitch

          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

          0 Offline
          0 Offline
          0x01AA
          wrote on last edited by
          #4

          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:

          1 Reply Last reply
          0
          • H honey the codewitch

            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

            Greg UtasG Offline
            Greg UtasG Offline
            Greg Utas
            wrote on last edited by
            #5

            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.

            <p><a href="https://github.com/GregUtas/robust-services-core/blob/master/README.md">Robust Services Core</a>
            <em>The fox knows many things, but the hedgehog knows one big thing.</em></p>

            T 1 Reply Last reply
            0
            • P PIEBALDconsult

              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.

              D Offline
              D Offline
              Daniel Pfeffer
              wrote on last edited by
              #6

              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.

              1 Reply Last reply
              0
              • Greg UtasG Greg Utas

                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.

                T Offline
                T Offline
                trønderen
                wrote on last edited by
                #7

                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.

                1 Reply Last reply
                0
                • K k5054

                  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

                  T Offline
                  T Offline
                  trønderen
                  wrote on last edited by
                  #8

                  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.

                  1 Reply Last reply
                  0
                  • H honey the codewitch

                    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

                    J Offline
                    J Offline
                    jmaida
                    wrote on last edited by
                    #9

                    don't delete it. You will regret it one day. archive it for future reference. bytes are cheap.

                    "A little time, a little trouble, your better day" Badfinger

                    1 Reply Last reply
                    0
                    • H honey the codewitch

                      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

                      K Offline
                      K Offline
                      Kschuler
                      wrote on last edited by
                      #10

                      I predict that in about two weeks you're going to post about how you wish you had saved it this code because suddenly you had a need to look at it again. :-D

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups