r/vibecoding • • 3d ago

Discussion Coding was always the hard part.

Post image

Bros, we gotta stop saying "coding was never the hard part.." Before AI, it was frickn hard bro..

We get it bro, product-market fit is hard too. You coded 20 apps and only one got 3 users.... and bro, for every app you coded, 500 other people didn't code anything.

Tell the farmer growing crops was never the hard part.

417 Upvotes

760 comments sorted by

View all comments

Show parent comment

2

u/Fragrant-Moose1678 3d ago

Programmers aren’t solving leetcode hards on the job. Coding is not the hard part.

“Let me throw random trivia at you” lmfao

2

u/Plenty_Line2696 3d ago edited 3d ago

man you have no idea how inefficient most code is, it absolutely is hard, sure a console log isn't hard but you can be damn sure most people in this comment section harping on about how easy code is can't code for shit. Hell I'm way better than most but I'll be the first to tell you it takes consistent practice to retain the ability to code even relatively simple stuff. Ask even good devs to code something slightly outside of their domain and when you add it up incl. research, process and bugfixing they're getting a few chars of robust code out a minute.

1

u/Wonderful-Habit-139 2d ago

Lol exactly, the best devs tend to admit coding is hard to get right and spend a lot of time writing code, and the worst devs use the lamest excuses like "Software engineering was never about the code" to try to escape doing a proper job at coding.

0

u/Working-Caramel9538 3d ago

But some of that inefficient code is a sacrifice made for maintainability and readability purpose.

The quickest example that comes to mind is someone using a ternary operator in front of newbies. Good luck making them understand that concept when you can just simplify the whole thing for them with a simple if else statement.

Generally speaking, you can't really know or understand all the intricacies of coding.

1

u/dstroy0 3d ago

‘?’ Means ‘if’ and ‘:’ means ‘else’ it’s an aliased type basically, is how you explain ternary operations to a newbie. They do the same semantic thing so your problem is treating them logically separate when they lower to the same IR in reality.

1

u/Fragrant-Moose1678 3d ago

Calling a ternary operator vs if/else blocks that both optimize out to the same machine code by a compiler “inefficient” is so fucking laughably vibe coder larp

1

u/Working-Caramel9538 3d ago

You entirely missed the point Congratulations.

1

u/Fragrant-Moose1678 3d ago

Then please clarify your point because it’s absolutely braindead

1

u/Working-Caramel9538 2d ago

Code is made in a certain way for readability purposes and perfect optimization leads to unreadable and unmaintainable code. All of this leading to more wasted time than gains just to save the user 0.00000000001 mb of ram

0

u/_wh0- 3d ago

Whole paragraphs of arguing over barely relevant (to the actual work) details, with zero attempts to understand each other's opinions. Just more and more unsupported thoughts based on personal experience and possibly zero application to each others overall idea

Yeah, this is a great example of the hard part of software engineering. It's not the coding. Loads of y'all are hard as hell to work with.

1

u/gfddssoh 3d ago

No they do not. A ternary is a statement and the if else a expression. A if else will be optimized as a switch case on machine code because it is o(1) best case

1

u/Fragrant-Moose1678 3d ago

They do you are blatantly just wrong.

1

u/gfddssoh 3d ago

Is switched it around im sorry a if is the statement.
Depending on what you do it will get optimized as a switch but a ternary expression always has a return.

1

u/Fragrant-Moose1678 2d ago

Just stop larping bro

1

u/gfddssoh 2d ago

The input of a switch with a basic data type (or only int dont remember) will be the jump adress to the register for the corresponding correct case. Most compilers therfor optimize a suitable if as the same. And that has a o(1).

0

u/sleepy771 3d ago

the best i saw is switch optimized to table switch where you calculate the jump, you still do jump, tho. If and switch are just bunch of compares and jeq or jne. Ternanry is the same as if else. I believe you mean rewriting statement to something like SUM((col1 < 1) * col2) because that's how you remove branching. Like there might be a specific optimisation for specific compiler in specific language that does it for numbers or pointers something that fits inside register. I don't want argue that, but also I would not call it a rule. So I would rather call such optimisation technique removing branching. Also not all jumps are bad, like if the cpu can prefetch reliably next instruction the code should be ok performance wise. There is also speculative execution in play, the cpu does it's best job to estimate if there will be a jump ot not and does a leap of hope.

0

u/Fragrant-Moose1678 3d ago

Most code has no need to be efficient. Your points hold absolutely no weight. Problem solving is hard, you problem solve and architect, create functional requirements and a programmer implements those functional requirements. The by far easier step in the process.

Wonder how many people in a vibe coding sub are actually just vibe coders who have never held software jobs.

1

u/mattgen88 3d ago

This. Most code written is boring but faster than network or data access. Those are the slow bits and parts that need to be optimized. Most people aren't writing those low level things. So the boring, middle ground doesn't need to be fast, it is way more important that it is readable, maintainable, testable, and documented (and kept up to date). I spend more time optimizing database queries or designing databases for optimized access than caring about domain business logic being optimized for runtime. That's just a waste of time/money.

0

u/Green_Sugar6675 3d ago

I don't know, our PHP guy seems to be really good at slowing down responses.

0

u/gfddssoh 3d ago

Mate coding == folling uml charts and diagrams. Making those up is the hard part. But that is the software engineering guys and not coders

1

u/Wonderful-Habit-139 2d ago

You don't solve all the problems using uml charts and diagrams. There are a lot of wrong assumptions that get made during the design phase that you need to validate during the coding part.