4 ms·
Well there is bit-rot. One manifestation of this is when nobody works on code for a while and it becomes unusable or less usable because the world has moved on.
by phkahler 8y ago
Well there is bit-rot. One manifestation of this is when nobody works on code for a while and it becomes unusable or less usable because the world has moved on. Maybe newer versions of the compiler won't compile it. Maybe some of the dependencies have changed. Just try to build even a small program written for Windows 95 or 98 today.
This is one reason "do one thing and do it well" is useful. The interface is kept simple and should be easy enough to update to a new environment. At the same time, that means for bigger systems a lot of small things will need updating over time, but at least the changes should be straight forward.
- badsectoracula 8y ago> Just try to build even a small program written for Windows 95 or 98 today. This largely works, especially on the C/C++ side.
- asveikau 8y agoMy experience is not really. The most common thing you will need to fix is assumptions about pointer sizes. Including casts between integer and pointer, which compilers used to be more permissive about in the days before intptr_t. (A few years ago I was compiling code from the 90s that did these casts implicitly, which had me wondering why the compiler ever let them get away with it...) C++ in particular has also changed a lot since the 90s including how permissive the compilers used to be, even for stuff covered by c++98.
- agumonkey 8y agoisnt this 'bitrot' function of the interface size ? I doubt sed will ever rot for instance
- teddyh 8y agosed does simple operations on text. But it certainly had to change when the definition of “text” changed from US-ASCII to “Whatever the LOCALE settings are, but most often ISO-8859-1”, and then later to “Most often UTF-8”.
- agumonkey 8y agodamn humans
- abbeyj 8y agoI think we can test this retroactively. sed has been around a long time. So we can go grab a copy from, say, Version 7 Unix and try to build it on a modern system. I grabbed v7.tar.gz from https://github.com/v7unix/v7unix https://github.com/v7unix/v7unix, extracted it, and tried to build: $ make cc -n -O -c -o sed0.o sed0.c In file included from sed0.c:2: sed.h:116: warning: declaration does not declare anything sed.h:128: warning: declaration does not declare anything sed0.c: In function ‘main’: sed0.c:32: error: ‘union reptr’ has no member named ‘ad1’ sed0.c:48: warning: incompatible implicit declaration of built-in function ‘exit’ <snip many more lines> The problem here is that although sed was written in "C" and we have a "C compiler" on our system, the definition of what exactly constitutes "C" has changed. The modern compiler no longer accepts the same language as the V7 compiler. We can fix the source to deal with this and produce a working binary. But then, what would we do with it? We can't really install it as /bin/sed. The world now expects /bin/sed to support switches and syntax that this sed does not. Trying to use this as /bin/sed would cause lots of programs to fail. The definition of what exactly constitutes a working "sed" program has also changed. So it seems to me like sed already has rotted in some sense. Looking forward, the sed from a current system is likely to be similarly rotted when you try to use it on a machine 40 years from now.
- agumonkey 8y agoYou're right .. even sed can corrode. That said it gave me ideas about deriving updates based on changes in data encoding / representations...
- msla 8y ago> The problem here is that although sed was written in "C" and we have a "C compiler" on our system, the definition of what exactly constitutes "C" has changed. The modern compiler no longer accepts the same language as the V7 compiler. Standards provide solid points of reference in this mess: 1989 ANSI/ISO C is not going to change. Specific compilers come and go, but the language defined by those documents (one ANSI, one ISO) is unchanging and, more importantly, well-understood such that C compiler implementers both feel the need to implement it correctly and understand how. > Looking forward, the sed from a current system is likely to be similarly rotted when you try to use it on a machine 40 years from now. I think it's likely the language won't rot the same way, due to the standardization I mentioned, but the OS interfaces beyond POSIX or similar might rot.
- teddyh 8y agoA well‐used door needs no oil on its hinges. A swift‐flowing stream does not grow stagnant. Neither sound nor thoughts can travel through a vacuum. Software rots if not used. These are great mysteries. — The Tao of Programming, Geoffrey James, 1987
- fmxexpress 8y ago> Just try to build even a small program written for Windows 95 or 98 today. This largely works if it was written in Delphi.
- eitland 8y agoAs someone who has tried to build Delphi apps: Well... The code might very well work the same, but the dependencies were a nightmare: They were scattered across 14 different CDs and web sites. One provider of often used components had gone out of business, luckily those components were released on sourceforge. Since there wasn't pom.xml (forgive me for mentioning a Java-thing here, but this was long before package.json or ProjectName.csconf was invented) in Delphi projects one also had to go through a bit of research, trial and error to figure out which versions was needed and the exact ones that were compatible with each other. Luckily we had a seasoned, well paid Delphi expert at hand and we got it working in just under 3 days. If anything I'd say this is a great example of (one form of) bit rot. Now that I think of it it might very well have been the same week that I left behind my last bit of prejudice against Java and started openly preferring it.
- vbezhenar 8y agoYep. We have huge delphi app. It's composed of few dozen DLLs, each dll is a different project with its own forms. Each DLL uses its own components, different DLLs use different versions of the same components, they are incompatible. Basically to build this nightmare you would need around 8 virtual machines to install those components. At least they have all those components downloaded offline. This app is in desperate need of huge refactoring but nobody got money for that.