how to keep track of code written over the years?

Go To Last Post
26 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm wondering what systems other old guys use to keep track of code they've written over the years.  Today I was looking for some python crypto utilities I wrote a few years ago but haven't been able to find after checking a few different computers.  I may have even included it in one of my github repos, but there doesn't seem to be a way to search all my repos.

 

I have no special talents.  I am only passionately curious. - Albert Einstein

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I use detailed descriptions of the code and its hardware in block comments at the source code's beginning.   Then I put the code's source file name and its version into a string that will find itself included in the flash ROM of the program even if this string is not displayed on a TFT screen or sent to a terminal by the application. 

   When I download the binary from the flash of an AVR that hosts an unknown application in the future, there will be a string that indicates in ASCII the source file's name and version.   This string will be at the beginning of the C code's binary and at the end of the assembler's binary.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There is a search widget on the web page.

 

https://github.com/search?q=user%3Anerdralph+crypto

 

 

update:

Not finding any repos is oversold; it did find code and almost 1k topics.

 

Last Edited: Thu. Apr 22, 2021 - 07:44 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ralphd wrote:
what systems other old guys use to keep track of code they've written over the years.

Ha - For me it's effectively been the Recycle Bin. There's so much I can't find any more. For example I remember writing a Mastermind Game in Borland Turbo C in the Windows-for-Workgroups era. Can I find it ? Absolutely not.

 

I'm not really bothered - almost every time I look at old code I think: WTF: Who wrote this ? It's terrible. So looking over old code becomes a nostalgic experience as opposed to actually learning anything.

 

To answer your question: I have ZIP files of various projects on my old NAS.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For the last few years I keep a specific directory tree as part of my backup archive &  try some manual keyword indexing....usually, I end up using a fancy file searcher to find what I'm looking for (which in itself is rare in the first place). Sometimes when archiving I'll make a small document to help me (but I usually find when I come back, I'm using different search terms antyhow).   

 

We must remember to forget some of our past coding, otherwise we'll bury ourselves in it. 

As an example, I also have some old code I've been keeping, "just in case" ....getting the 5.25 Floppies to be read will be the headache (and trying to remember what I did save!)..It's funny  to look at a schematic or code you spent weeks slaving over 20 years ago & then just toss aside like it's nothing...maybe it is!

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

ralphd wrote:
... after checking a few different computers.
Windows XP and subsequent?  If yes then Everything.

ralphd wrote:
I may have even included it in one of my github repos, ...
fyi, Git repositories can be stored on IPFS.

 


Does Everything search file contents? | FAQ - voidtools

 

Host a Git-style repo | IPFS Docs

IPFS is the Distributed Web - why

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I decided to make a separate directory for each project I do. Most of them are hardware driven so I have a main project number of 5 digits were the first 3 are the project number and for each sub project(mostly FW apps) there are 2 digits, so per main project I can make 100 application, which I think will be more than enough for me atleast.

All I have to do is search the projects for a keyword and then it should pup-up in the windows search.

Now projects started before I started using this filing method are still hard to find, but as back thenI did not do to much exiting things not much work might be lost there.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

These days I put anything I cherish n Github. Far too often when I want to blit some pixles onto a Window or something I think "I remember doing something just like this this 10/15/20 years ago now where did I put that Win32 code?". Of course I can never find it. But I probably adhere to this philosophy anyway...

N.Winterbottom wrote:
I'm not really bothered - almost every time I look at old code I think: WTF: Who wrote this ? It's terrible.

 

(of course if you put something safe in Github you can version track it too so if you want to "hack about a new experiment" you know you can unwind it back to some known place at any time so putting it in a repo is worth doing or that alone even before you consider long term storage).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
These days I put anything I cherish n Github.
All eggs in one basket? ... or not

clawson wrote:
... so putting it in a repo is worth doing or that alone even before you consider long term storage).

 


MS wants to buy GitHUb | AVR Freaks

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gchapman wrote:

All eggs in one basket? ... or not

I signed up to Hotmail back in 2002. Once Microsoft took over I knew that nothing short of a nuclear bomb would kill it. I still have access to email from 2002  (in fact the very oldest email is from my Mum who's been dead for years!).

 

So while not everyone agreed with the M$ take over of Github, yes, I think it provides some stability and I'm guessing it will still be there when I'm long gone.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have every version of my source files since 1995 in a single folder using a proprietary configuration management tool.  I can easily ZIP the whole single folder and archive on DVD, SD cards, external drives, and multiple PCs in my home network.  I'd highly recommend using one of the common tools such as git or SVN, locally or cloud based, but create backups often.  At the end of any workday my repo is refreshed on at least two workstations in my network. 

 

One of my problems with git and SVN is that they keep the local source database in a hidden subdirectory of my source tree.  I don't appreciate the tool putting its stuff in my folder, but perhaps there are workarounds for that I am unfamiliar with.

 

Still, losing code is, well, tragic, and a serious developer needs to come up with a process to avoid it.  IMO.

C: i = "told you so";

Last Edited: Fri. Apr 23, 2021 - 03:42 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ron_sutherland wrote:

There is a search widget on the web page.

 

https://github.com/search?q=user%3Anerdralph+crypto

 

 

I had played with it before, and although it will search file contents,  I haven't figured out a way to search for filenames (i.e. *.py)

 

I have no special talents.  I am only passionately curious. - Albert Einstein

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

meslomp wrote:

I decided to make a separate directory for each project I do. Most of them are hardware driven so I have a main project number of 5 digits were the first 3 are the project number and for each sub project(mostly FW apps) there are 2 digits, so per main project I can make 100 application, which I think will be more than enough for me atleast.

All I have to do is search the projects for a keyword and then it should pup-up in the windows search.

 

I've worked on a number of different computers over the years including Linux, Windows, cloud servers, and VMs.

The computers almost always have internet access, so what I think I'll do going forward is create a github repo for miscellaneous code.

 

I have no special talents.  I am only passionately curious. - Albert Einstein

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think the issue is less the actual storage than some sane way of documenting what you've got... that eight letter dos file name was barely comprehensible then and even these days I still come across IDEs that don't like spaces in file names.

 

I must have dozens of incomplete snippets of code where I've started some line of inquiry or of development only to abandon it. For example, my /projects directory currently looks like

 

barnacle@barnacle-Latitude-E5550:~$ ls Projects/
 A85-Allman				    fake16v	     ocred
 arm6502emu				    fake20v	     Paragraph
 as65					    fasm	     pipe
 asm65					    gtk		     pipe_client
 Assembler				    gtk3	     rubik
 cc65					    hex2raw	     samples
'Cisc-8 HCTTL single board processor'	    inline	     startrek
'Cisc-8 HCTTL single board processor.bak'   kbhit	     startrek2
 eagle-5.6.0				    logisim	    'stm32 widget'
 eagle-6.3.0				    msbasic65	     tiny6502
'Eagle projects'			   'Nucleo widget'   xa65

but that ignores for example the separate directory that the STM ARM Eclipse IDE decides it prefers, and there's loads of vintage, antique, and downright prehistoric code scattered around this machine as well.

 

Neil

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

barnacle wrote:

kbhit

Ah - a remnant from the old Borland days ?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Actually, no: a recent attempt to get the line-oriented linux interface to recognise single key strokes, and more significantly, the lack of them.

 

Neil

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Stick your code on code.google.com, and your web pages on homepage.mac.com or geocities.com, and maybe anything really AVR specific on spaces.atmel.com.
Those are all well established sites with major backing; once your stuff is there it's sure to be around forever.

 

 :-(

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

westfw wrote:
maybe anything really AVR specific on spaces.atmel.com.
There is a blast from the past. Atmel/Microchip shutdown spaces.atmel.com a few years back. I almost lost everything I had stored there. They reinstated my access just long enough for me to recover everything and stick it on github. There is a salutatory lesson in all this - store "long term" stuff on a site you know will be there for the long term. (ie a site backed by Amazon, Apple, Google, Microsoft or some other company who looks (at this stage) to have some kind of guaranteed future).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Atmel/Microchip shutdown spaces.atmel.com a few years back.

 (The post was very tongue-in-cheek.  code.google.com, homepage.mac.com, and geocities are all shut down as well.  Homepage.mac.com was particularly painful for me, cause I don't think there was much of a transition plan.  (whereas google code transferred to github pretty nicely, and geocites was pretty "raw" anyway.))

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

westfw wrote:
... once your stuff is there it's sure to be around forever.
An archivist's eternal issue, peer-to-peer versus client-server, do-it-yourself (old Mac or PC to electronic recycling?)

The Average Lifespan of a Webpage | The Signal (USA) via IPFS is the Distributed Web - why (1/4 page, right column)

Setting up Git for Free on a VPS – Low End Box

Launching Sales of Pioneer Edition FreedomBox

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:

There is a salutatory lesson in all this - store "long term" stuff on a site you know will be there for the long term.

 

i.e. one you own. Full stop. Stuff your code - anything digital - on a server owned by someone else and you are held to ransom (e.g. what microsoft did to the books and music(?) that people thought they had bought and paid for).

 

Run your own backup systems: one live, one which cannot be accessed without physical intervention (because ransomware), and one in a different building.

 

Charlie Stross used to claim that one backup should be on a different planet, and these days I'm not so sure he was wrong...

 

Neil

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've sort of tried that in the past. I had my own HTTP/FTP space and I put stuff there. Then the ISP got taken over and the new owners started asking for silly money so I figured it was not worth that and let the space lapse.

 

I suppose you are saying you need to run your own server(s) for this? But in the end is that really any better/more reliable than just keeping the stuff on your own PC's HDD/SSD ? I guess the easiest is simply to put the important stuff on USB keys, label them and lock them away in a drawer?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
I guess the easiest is simply to put the important stuff on USB keys, label them and lock them away in a drawer?
bit rot (flash's MOSFET gates are a very bit leaky, some are more ESD tolerant than others)

edit :

To overcome bit rot, periodically scrub the file system some of which have a built-in scrub function.

For USB MSC, exFAT doesn't have an easy scrub; consider such data on a hard disk or SSD.

 

The Pros of exFAT | exFAT File System: Everything You Need To Know (2021) (MiniTool® Software Limited)

How do I initiate a scrub of a ReFS drive or ReFS SS mirror? (Microsoft)

 

edit2 :

Sequential scrub and resilvers | Features - OpenZFS

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Tue. Apr 27, 2021 - 04:46 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

To a large extent it depends whether you need | want to be able to access stuff from multiple computers, or when away from base. If not, then spinning rust might be your best friend; perhaps a little more robust than the various flash options, particularly in smaller sizes (up to a few hundred gig, perhaps) where the magnetic domains are all so snuggly with each other. Critically, at least one copy should be on a network only when actively in use... and perhaps the computer used to access it for testing it shouldn't be your main one.

 

But yes, relying on your own ISP is no more helpful than relying on the big three or four.

 

Apropos of file storage: are there file systems which include error correction at the file level (as opposed to the sector)? Also, I've also always rather liked the VMS approach of never overwriting a previous version of a file, except explicitly - though how that works with log files and temp files I don't know - it's been too long since I peered into VMS.

 

Neil

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

barnacle wrote:
... perhaps a little more robust than the various flash options, particularly in smaller sizes (up to a few hundred gig, perhaps) where the magnetic domains are all so snuggly with each other.
Though the gain is still very significant; ESD will have an effect.

barnacle wrote:
... and perhaps the computer used to access it for testing it shouldn't be your main one.
Could be a colleague's, teammate's, or partner's (DVCS, distributed file system)

barnacle wrote:
are there file systems which include error correction at the file level (as opposed to the sector)?
Yes

exFAT doesn't checksum file data whereas is optional in ReFS (Windows 10 Pro for Workstations, Windows 10 Enterprise , Windows Server 2012 and subsequent)

re sector and USB MSC, ECC may be an option though may be more likely for SD, e.MMC, and such.

barnacle wrote:
Also, I've also always rather liked the VMS approach of never overwriting a previous version of a file, ...
Likewise; such can be enabled by Windows 10 File History.

 


Electromagnetic Interference (EMI) Inside a Hard Disk Drive Due to External ESD

 

Checksums and Their Use in ZFS — OpenZFS documentation

Security | File System Functionality Comparison - Win32 apps | Microsoft Docs

...

Checksum/ECC

Resiliency | Resilient File System (ReFS) overview | Microsoft Docs

 

Incremental backup: File History | Top 35 free apps for Windows 10 | Computerworld (1/3 page)

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
I guess the easiest is simply to put the important stuff on USB keys,

Tech changes so fast now, a few years ago I would have said CD/DVD, but fewer computers these days have a CD player now, so how long before the USB A port goes the way of the dodo?  (USB C)

All those people who had there memories copied from film/tape to CD's/Flash drives, will soon need it copied again to the next popular media......    what do I do with my zip drives?  or floppies (8, 51/4, 3.5")  DEC Tape (TK50)?

Jim

 

 

FF = PI > S.E.T