Live data from Hacker News

The little legacy code that could: a fable of software ownership

circleci.com

71–76 of 76 posts

Re: The little legacy code that could: a fable of software ownership

#71
post #70
post #69

Earlier quoted context omitted.

Most major games are built on one of a few game engines (Unity, UE4, etc.) which have their own ecosystems. People become Unity or UE4 experts. They have forums, conferences, tech support. SL is its own pocket universe. Second Life is divided into "regions", 256m on a side, each managed by a separate process constantly communicating with its neighbors. This geographical distribution system is unique to Second Life. U…

I'm familiar with Second Life's distinctive traits. I played there for years, and did contract programming for the Linden Department of Public Works for a couple of them (including coding around those janky region crossing issues you mention). They pay an incredibly high price for some design decisions that I think users don't even get much value from. It turns out that most users would rather have a private island t…

It turns out that most users would rather have a private island than live on a continuous continent where neighbors are always putting up eyesores.

Linden Lab tried that. That's what Sansar is. It averages 13 concurrent users on Steam. Maybe some more who signed up outside Steam, but under 100. Sansar is a "VR game level loader", not a world like SL. Somebody creates a level map, and others can visit, but not change much. Sansar has a Star Wars prop museum, a Ready Player One prop museum, etc. They look great. You visit once, and you're done.

Other VR game level loaders are SineSpace and High Fidelity. (High Fidelity just gave up, and "pivoted to enterprise".) They also have user counts in the 2-digit range, but worse content than Sansar. The hook for that market segment was supposed to be VR headsets, which turned out to be a niche product. Even VRchat, after a surge in 2017, dropped to about half its initial peak and is stuck at a few thousand concurrent users. Facebook Spaces? Whatever happened to that?

Meanwhile, Second Life continues to plug along, with 30,000 to 50,000 users connected. That's about where GTA V online is, and would be 11th place on Steam if SL was on Steam. SL was maybe twice as big at peak, 7-10 years ago.

Hence the legacy code problem. It runs, it's profitable, it has a significant user base, and it needs improvement.

Re: The little legacy code that could: a fable of software ownership

#72
post #66

Earlier quoted context omitted.

Yeah, a lot of AS/400 programming is actually pretty high-level (comparatively speaking). COBOL in general was meant to be accessible to end users (or at most power users) such that they could readily define business logic without having to resort to something like assembly or PL/I or what have you.

Yeah, these guys didn't really know COBOL either. They used RPG (an AS/400 exclusive language).

RPG is more like throwing random characters on a screen and seeing what happens.

Report Generator (RPG) is designed for an 80 column punch card. Put a F in column 6 to mean this, put a "C" to mean something else, match one of the 99 variables (named, intuitively 01 through 99) to make output happen.

I had the distinct displeasure in 1984 of trying to maintain a warehouse stock control system that some evil people had decided to implement in RPG. From memory, RPG only has the equivalent of single dimensioned arrays, so the location of items in the warehouse was an intersection of three arrays pointing to yet another array containing the SKUs.

It's designed to take one or more input files with defined columns in each row (card) and do some stuff (mostly subtotalling etc) and produce output.

Of course, it's been stretched beyond all recognition since it was introduced in 1959. It's literally 60 years old this year.

Re: The little legacy code that could: a fable of software ownership

#73
post #14

I am currently rewriting a 10 year old VB application, which is in web forms. That application communicates with AS400 DB2 database. I get to use as400 here and there. My application is in .NET Core 2. There are some issues as anything IBM can be a pain in the ass to work with. Also, the as400 dev and me have a tremendous knowledge gap. I know everything new such as unit testing, proper source control, dependency inj…

> I know everything new such as unit testing, proper source control, dependency injection, linq and ORM tools. However, when it comes to speed of queries he is much better at optimization.

The reason he is better at optimization is because he is not using an ORM. ORMs are a leaky abstraction that loses the power of SQL for the limited benefit of slightly easier programming. They also tend to move things that in SQL would be a JOIN that is executed in the database back into code.

Data is not an object, much that some "modern" languages would prefer to lose the distinction, with ORMs and DTOs obfuscating it.

RDMSs are based on cohesive logic (set theory) and have been tuned and optimized by people to do the best possible automation of data storage and retrieval, while abstracting the very low level.

ORMs on the other hand, take the logic that should be at the data management level, including invariants and moves it into code that does what SQL does, but slowly and badly.

Re: The little legacy code that could: a fable of software ownership

#74
post #14

I am currently rewriting a 10 year old VB application, which is in web forms. That application communicates with AS400 DB2 database. I get to use as400 here and there. My application is in .NET Core 2. There are some issues as anything IBM can be a pain in the ass to work with. Also, the as400 dev and me have a tremendous knowledge gap. I know everything new such as unit testing, proper source control, dependency inj…

Having been someone who's had to "setup" the db, app, etc. before ORMs were mainstream, you're wildly overestimating how complicated it was. It doesn't actually take very long, you'd maybe save a couple of days or so on a month project, having to write a a CREATE TABLE and then the corresponding class are actually trivial. You make the design decisions when you write the create statement, the class is simply a copy o…

Source code control has been around since SCCS in the early 80s (although wikipedia says 1977), it begat RCS which begat CVS, which begat SVN.

People have been using source code control since then, but the history of computing is of wheel reinvention and not-invented-here, so we are condemned to rediscover things.

Unit testing is useful for business logic, not for individual functions. If you're writing unit tests around whether or not you go outside an array bound, then you're testing the wrong thing. If, on the other hand, you're making sure that someone under 13 can't signup for a service, that's a reasonable unit test.

DI can be useful for running code, allowing you to instrument the code to identify problems. But that's runtime DI, not compile/deployment time.

As a design pattern, it's more an abstraction / reduction of general parameterized polymorphism, usually dragging in an opinionated framework that requires you to follow a set pattern of development and deployment.

Re: The little legacy code that could: a fable of software ownership

#75
post #72
post #66

Earlier quoted context omitted.

Yeah, these guys didn't really know COBOL either. They used RPG (an AS/400 exclusive language).

RPG is more like throwing random characters on a screen and seeing what happens. Report Generator (RPG) is designed for an 80 column punch card. Put a F in column 6 to mean this, put a "C" to mean something else, match one of the 99 variables (named, intuitively 01 through 99) to make output happen. I had the distinct displeasure in 1984 of trying to maintain a warehouse stock control system that some evil people had…

Yup, though we technically used RPGLE which was slightly better. It also had a "free text mode" which looked a bit more like a real language, but my coworkers were terrified of that.

Re: The little legacy code that could: a fable of software ownership

#76

Earlier quoted context omitted.

> If the requirements change then the code should change. That's the nature of the term "Legacy", that you are using. It met requirements that are not the same today (sometimes it's just standards of coding). It didn't change, hence it's legacy code.

There is all sorts of wrong here. You are conflating several concepts. Firstly I was commenting on your very strange definition of what working meant. What we (programmers) normally mean by working we mean "It fulfills the requirement that it was developed against". If the requirements change, the code must change to reflect the changes in requirements. If the software is changed it is a different version of that sof…

> What we (programmers) normally mean by working we mean "It fulfills the requirement that it was developed against". > Things like code quality, maintainability etc. are separate issues.

That's your characterization and not all how development works in practice. The vast majority of software barely has anything like versioning and a scant few have maintenance/support windows. That's a fact by volume.

Defining the term "Legacy" to mean something specific as a subjective point of reference (since there is no formal definition), eg

> Legacy until relatively recently meant "Not supported" i.e. Windows XP is "Legacy" whereas Windows 7 is not

is helpful, because it lets me understand what you are thinking, clearly. This does not change my position, as my experience is that working code is still called legacy internally, all the time. The historic resource problems with things like broken dependency chains (you can't even build it anymore), or availability of platforms to test on, is common.

Post reply on HN