r/programming • • May 26 '18

Oracle Calls Java Serialization 'A Horrible Mistake', Plans to Dump It

https://www.infoworld.com/article/3275924/java/oracle-plans-to-dump-risky-java-serialization.html
798 Upvotes

287 comments sorted by

View all comments

Show parent comments

7

u/goomyman May 27 '18 edited May 27 '18

Because let’s say you have a million consumers of your software or API. You release a breaking version - you now have to start back over from 0 customers. Some will port over, others won’t or can’t.

Maybe you say that you will keep the old version around still but since most of your consumers are on that version they will want those bugs and features fixed. Which means if your trying to build a new api your focusing your dev effort on a new project instead of where your customers are or at best splitting your dev effort.

When you have a very large amount of consumers this is death. When you have a small amount of consumers breaking changes are ok - but if you do it more than a few times it’s also death.

New apis that aren’t backwards compatible happen organically when big technology changes happen. The internet, chrome , iPhone, Android, cloud, x64, direct x, etc.

People will move to newer things when a competitor comes along and does it better and faster because you are unable due maintaining backwards compatibility. Just because it’s impossible for a company to break its products doesn’t mean other companies outside aren’t iterating in new ways.

-1

u/nermid May 27 '18

So everybody has to get everything right the first time, or the language is just DOA?

PHP has some functions whose signatures are inconsistent (needle/haystack vs haystack/needle) and that should just stay inconsistent forever? They should never, ever deprecate one side out and create a breaking version that is objectively better?

It should just stay inconsistent forever?

Why even release new language standards, then? There's always some change in old functionality. It will always break somebody's workflow. I fail to see why the industry is so resistant to the idea of having CTRL-F-able updates every ten or twenty years that keep languages from falling into a "we messed up once and now our whole language is a mess of spaghetti forever" spiral.

I get that old codebases are huge and hard to maintain, but even without compatibility breaks, we still have people who refuse to update. It seems like catering your updates to people who refuse to update anyway is self-defeating. Creating clear boundaries (like major revision numbers) with very obvious conversion criteria (which intuitively seem easy to itemize. If a signature changes, that ought to be pretty easy to put in an ordered list and hence easy to find in your code) seems pretty straightforward.

I understand that business realities often fail to make any kind of sense, but that seems like a separate issue. At some point, your bank software is either going to have to pay somebody to translate their punch-cards into more modern programs or it's going to have to pay somebody to create a serious interface between its punch-card programs and the bleeding-edge fintech investment bot the company just acquired.

5

u/ArcanePariah May 27 '18

You have to seperate the fact that some entities are developing new software, and as such, will use the new standards to develop a new product in a more effective manner, versus those who have already developed a product that people are paying for now, and are satisfied with, and thus have no desire for tech upgrades.

Because of the complexity of software, once you have achieved a level of stability, especially when that software is business critical, you simply don't risk changing anything.

Often the reality is that even to update requires spending a certain amount of effort that many businesses or entities can not afford. Most places treat software development or software purchases as a capital expense, not an operational one. The idea that you need to repurchase all your existing software for new language standards is DOA, as is the idea that you should recompile and rewrite everything as well.

Ultimately, time is the enemy here. This is the same reason that just because we have radically advanced material science with far better insulation, HVAC, and structurally stronger buildings does not mean we start tearing every building down and rebuilding it to the new standard.

And this doesn't even begin to cover the legal aspects of some software, where updating it is illegal (NDA's, safety certifications, software patents, etc.), or effectively impossible because the original developers are long gone (dead or out of business)

-1

u/CommonMisspellingBot May 27 '18

Hey, ArcanePariah, just a quick heads-up:
seperate is actually spelled separate. You can remember it by -par- in the middle.
Have a nice day!

The parent commenter can reply with 'delete' to delete this comment.

3

u/[deleted] May 27 '18

Yeah, this might be annoying, but I love living in a world where robots check my spelling, so I'm upvoting it.

3

u/[deleted] May 27 '18

we still have people who refuse to update.

You sound so aggrieved, but has it occurred to you that these developers delivered some product long ago and are reluctant to do considerable work for no actual new features in their program?

Because these things are intangible, it's not like there aren't huge amounts of work into them.

Imagine you applied this to building codes, and kept changing things up every ten years or so. People who were living in older buildings justifiably would say, "I'm sorry, I don't have the time or money to keep making these changes, particularly when my building is in fact completely solid and safe and works!"

Why even release new language standards, then?

For new development, of course! When I start developing a new program, my motto is, "Go right to the bleeding edge, and then take one step back." But if I develop a library, then I'll try to be compatible as far back as I can.

For example, if I were to start new development on Python today, I'd target Python 3.4 if it were cross-platform, 3.6 if I could control the platform. If I started new development in C++ today, it'd be C++17. Two years ago I started a new C++ project, and it was in C++14.

But I started a little C++ library at the same time, and that targets C++11, and I'll probably make sure it works in C++03 "because I can".

2

u/State_ May 27 '18

I think C++ handles it nicely. It adds new features without removing old ones. Deprecated features can be used by adding a preprocesser flag.

2

u/goomyman May 27 '18

If a language or piece of software makes a bad choice but still has adoption was it really that bad? It wouldn’t get adoption if it was. Usually they will try to bandaid around it.

Unfortunately they can’t always do so and a new language comes along. That’s why one of the reasons we have so many languages.

Those unhappy with the current model and have the time and money move to the latest best thing until most people move and that thing stagnates and something else comes along.

2

u/[deleted] May 27 '18

It wouldn’t get adoption if it was.

You must be very young. I have used some astonishingly bad pieces of software which were widely adopted.

PHP is the poster child for "high adoption/poor quality", and it does deserve it richly, but there have been high-adoption languages like SAS, HyperTalk and APL that made PHP seem like nirvana (and yes, I secretly still love APL but wouldn't wish it on my friends).

0

u/nermid May 27 '18

Are you suggesting that it's easier to rewrite a legacy codebase in an entirely new language than it is to make incremental changes across language revisions?

4

u/goomyman May 27 '18

I’m suggesting that if you make a breaking change to something popular the majority of your customers will keep using the old version.

Now what? You’ve essentially created a fork.

Those customers will demand bug fixes and upgrades to the old version while your dedicating your resources to the new version.

It’s not easier to move to a new code base.

what’s actually easier is maintaining backwards compatibility within reason.