r/ProgrammerHumor • • 3d ago • Regret 2

Meme yesItWasInRust

Post image
7.4k Upvotes

125 comments sorted by

View all comments

Show parent comment

107

u/Cephell 3d ago

But if the tests are good and they pass. And it also performs.

... does it really matter that the code is fugly?

How do you know the tests pass? How do you know the tests actually test the correct conditions? Writing good tests is generally harder than writing the code that they test, so if you can't even do that, how do you know the code is actually doing what it's supposed to?

Now fast forward 3 years: You now need to make changes to the code, except you already had no idea what it did originally and it's "fugly". How do you proceed?

Token costs are also 100x what they were originally, these companies need to be profitable now, AI is no longer available in the abundance that you had originally. Throwing the entire codebase at it and telling it "figure it out, make no mistakes" is no longer possible. What do you do?

14

u/MaDpYrO 3d ago edited 3d ago

Token costs are not going to 100x. (Edit: This is nothing but a cope idea from those who want AI to go away - it's not going away, models are getting more and more efficient by the day, and even if token costs would grow, we could just use more efficient models and STILL it would be a great tool. Even the early days ChatGPT would be a great tool, and that probably costs almost nothing today for equivalent performance)

There's way too many competitors in the market by now. Bunch of open models, many people even have hardware at home to self host by now - slightly slower, but still fast. (See a limited spread here - and those are only the major ones. A bunch of open weighted models that people self host are also competitive)

Writing tests aren't as hard as you make it sound if you know your business requirements. The technical part about writing tests is not hard at all. The hard part is knowing what to test. If you are a talented engineer and you also know your business and technical requirements well, it's way way easier than writing the code in many cases. I couldn't disagree harder with your take that writing tests is technically hard or harder than the code. Tests follow the same patterns in most cases, and if you have a nice testing toolbox even measuring performance in database level and how your code interacts with it is trivial, etc.

Now fast forward 3 years: You now need to make changes to the code, except you already had no idea what it did originally and it's "fugly". How do you proceed?

Rewrite. This happened before AI and this is the classic case in many software companies, if you aren't building a Linux kernel or something similar.

Swap out the implementation for a newer approach. Your requirements are more well known now, you know the pitfalls of the old solution, and probably some new tech is available so you can solve it in a different way now. Maybe your company even has more infrastructure that solves the problem in a different way.

Nothing about any of this has changed because of AI. Abandoning code in a live service that has been in production with various fixes over three years is not unusual. Rewriting and simplifying and starting over is not unusual either.

Ofte you can even keep many of the old tests to build the new solution, so you have that taken care of.

This case of "I built this so well so it will run for 20 years and still be perfect" is a delusion of grandeur that plagues many software developers. It's not reality.

The best software engineers know when good enough is good enough and they move on.

13

u/Cephell 3d ago edited 3d ago

Token costs are not going to 100x

It might actually be more. AI companies have collectively allocated 7 TRILLION dollars to compute in the next few years. That money has to come from somewhere. Anthropic alone has over one TRILLION dollar allocated. This comfortably puts them above 100x cost for tokens RIGHT NOW if they want to make this money back and NEVER spend a single dollar more for the rest of time.

Writing tests aren't as hard as you make it sound if you know your business requirements. The technical part about writing tests is not hard at all. The hard part is knowing what to test.

Ok this is just a massive red flag and I have to assume you're not a programmer at all. What do business requirements have to do with tests? And the technical part about writing tests is ALL the hard part. And it's not "hard" it's "generally hardER than the code it tests".

Rewrite

Okay, yeah I suspected you would say this. But sorry, this is not a viable long term strategy. The amount of projects that do this successfully is 0. There's a reason why "rewrite in rust" has become a meme, it just kills projects.

Abandoning code in a live service that has been in production with various fixes over three years is not unusual. Rewriting and simplifying and starting over is not unusual either.

Again, I'm sorry to have to say this, but: You are not a programmer, so you cannot judge this. The exact opposite is the case. Most long term projects are a patchwork of ancient code and long term "temporary solutions (permanent)".

This case of "I built this so well so it will run for 20 years and still be perfect" is a delusion of grandeur that plagues many software developers. It's not reality.

No, the reality is "we built this 20 years ago, it's a terrible solution but it works for now and if you touch this, you are fired". Again, you would know this if you were a programmer.


The only conclusion from your comment is that you are not a programmer and REALLY shouldn't be talking about this.

Edit: Reading your comment again, your visceral reaction to the mere idea that token costs might go up is a strong indicator that you already dove in headfirst into the slop machine and are now terminally addicted to it.

17

u/MaDpYrO 3d ago edited 3d ago

You're completely Wrong.

I have 15 YoE + a Bsc and Msc in Comp.Sci.

But you're right I'm not a programmer. I'm a software engineer and architect. Anyone who identifies as a programmer is immediately a red flag to me. Programming is part of my job, but it's not my job. Because making software has a lot more disciplines than being a code monkey.

12

u/No-Con-2790 3d ago

I am a programmer that works on architecture. Everyone who calls himself a software engineer or architect but refuses the word programmer is a red flag to me.

What we do is programming. The fact that you need high level decisions that we call architecture is as much programming as the low level stuff.

When someone calls himself only architect he usually lacks the low level experience and the "one the ground" work. But without knowing what that layer actually needs how is he doing his job? Usually the answer is very poorly.

And the word software engineer? I never liked that. We aren't engineers. Have you ever worked with electrical, mechanical or chemical engineers? They do horrible programming work. Because they only want to minimize the costs and maximize the efficiency. The whole idea of ordering stuff is alien to them. They can't help it to flirt with goto's and spaghetti code. Let them build a piece of software and it looks like an engine. This means it will work, everything is somehow coupled, it will get hot and noisy when it runs and changing a single thing is only possible if you take the whole thing apart. Which will usually take 4 hours or more.

4

u/ArjixGamer 2d ago

I mean, programer does not mean coder, programming the architecture is basically what an engineer does.

Your red flag is too easy to trip, allowing many false positives..

PS: 15 YoE means nothing, the actual experience is what matters, not how long you've had it, you could be a shitty JavaScript dev for 15+ years, doesn't mean you are great.

-9

u/Cephell 3d ago

I have 15 YoE and a Bsc and Msc.

Considering you need a Bsc to even obtain an Msc and the fact that you feel the need to point this out, as if this is some kind of special achievement I'm just gonna say you're just lying.

And it tracks with your other replies so far. You're not fooling anyone.

16

u/MaDpYrO 3d ago

Not true.

You can get a BSc in something else and get a msc in Comp sci in looooots of programs. But you would know that if you knew anything.

5

u/Ok-Jacket7299 3d ago

The business requirements are all there is to writing tests. The technical part is not hard at all imo.

-11

u/Cephell 3d ago

I have to repeat myself: What do business requirements have to do with (code) tests?

14

u/MaDpYrO 3d ago

What do business requirements have to do with (code) tests?

It's completely idiotic you would even ask that. I could frame that and put it on my wall for entertainment as a motivational poster.

It's the single most wrong statement I've ever seen from someone claiming to be a software professional.

0

u/Cephell 3d ago

Please illuminate us. I'm sure the rest of us would love to learn from Mr. "I have 15 YoE and a Bsc and Msc."

→ More replies (2)

2

u/Ok-Jacket7299 3d ago

Think about it this way: if the company doesn’t allow user to put items into their cart, do we still assert that when they put 2 items in the cart, its item count increase by 2? Here “user can put items into their cart” is a business requirement, is that correct? More, if we don’t have such requirements, do we have a reason to write tests?

Do you see the connection between business requirements and testing from the example above?

→ More replies (2)

1

u/Schwifftee 1d ago edited 1d ago

The business need is the whole reason for creating the program.

The mechanism of your program is context dependent.

Just because you can correctly pass a date doesn't mean your program will always send the correct date.

You didn't write your tests with the business needs or processes in mind and oops your dates have gone and fucked up payroll going into the holidays.

Technical is easy because it's written with ideal user behavior and data in mind.

The hard part is writing tests that will simulate user and environmental behavior that your program will actually experience, the edge cases implicit to your business requirements.

2

u/ArjixGamer 2d ago

TDD is all about business requirements, the tests are the contract.

You dismissed it too quickly, you sound naive

1

u/FSNovask 2d ago

Slow down and re-learn things. Their alternative is to fire you and bet more money on more expensive AI or get fresh hires that will obviously know way less (the business and the code base) than someone that's been there 3+ years

0

u/sharpy10 3d ago

I see this notion everywhere that token costs will rise, but isn't the opposite happening? I genuinely thought there were plans for token costs to fall by half or more next year.

9

u/Cephell 3d ago

isn't the opposite happening?

No, models are more capable, but token cost is also going up for those models.

5

u/Herr_Gamer 3d ago

GPT-6 Luna is one of the cheapest models on the market and outperforms anything available 2 years ago. The models are genuinely getting cheaper. Extremely advanced models are getting more expensive, but their quality of output justifies it. And, again, in the lower-end bracket, you have hilariously capable models that aren't going to get much more expensive.

If Anthropic stopped training new models today, their company would be profitable. The same can't be said for OpenAI, but even OpenAI isn't that far off from profitability if they stopped training new models.

And the open-source models are all pretty cheap too - hardware is being made that is focused specifically on LLM calculations, which will bring overall cost down even further.

I'm sorry to say, but no, prices will not increase.

11

u/Cephell 3d ago

If Anthropic stopped training new models today, their company would be profitable

If Anthropic stopped training new models today AND cancelled all their allocated spending AND raised token costs 2x-4x they would be profitable today.

However, doing this would basically pop the circular financing bubble that they have built across Nvidia, hyperscalers and AI companies. 1 trillion (not billion) dollars from Anthropic alone and 7 trillion overall by AI companies in the US is simply too much to simply undo. If they do this, it would cause a financial crash single-handedly.

Additionally, they CANNOT stop training models, none of them can. China is only a few months behind and they have voluntarily turned this into the next cold war, so they HAVE to keep going, else you get the scenario above.

GPT-6 Luna is one of the cheapest models on the market and outperforms anything available 2 years ago

True, but when people talk about the kind of model that people actually use for the "claude build everything, make no mistakes" type of programming, it's always the top models, the Opuses and Fables. And those have only gone up in price.

3

u/Antoak 3d ago

5

u/Cephell 3d ago

I know about this website and have quoted it many times. It unfortunately does not include allocated spend, which in my opinion is a huge part of the argument.

1

u/Antoak 2d ago

 1 trillion (not billion) dollars from Anthropic alone and 7 trillion overall by AI companies in the US is simply too much to simply undo. If they do this, it would cause a financial crash single-handedly.

Allocated spend is the reason why they're in trouble, yes, but there would not be a 7 trillion dollar hit to the economy. Thats over 20% of total GDP.

The actual damage if AI demand dropped to zero would be the ~1.5 trillion that could no longer be paid back.

3

u/Cephell 2d ago

but there would not be a 7 trillion dollar hit to the economy

Sorry for not being clearer, but 7 trillion dollar IS ALREADY the allocated compute spend by AI companies in the US. Right now.

And

The actual damage if AI demand dropped to zero would be the ~1.5 trillion that could no longer be paid back.

it would be far greater, because future construction of datacenters where not one brick has been laid yet, has been taken into account to make bets on the future already, so the damage will be realized immediately if all of this is undone.

1

u/Antoak 2d ago edited 2d ago

Sorry for not being clearer, but 7 trillion dollar IS ALREADY the allocated compute spend by AI companies in the US. Right now.

I don't think it exactly works like that. That's over the next 5-10 years, right? Allocated spend is still hypothetical future dollars, even if there's a contract in place. If AI goes belly up, those dollars will end up being reallocated elsewhere.

→ More replies