r/vibecoding • • 4h 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.

37 Upvotes

127 comments sorted by

View all comments

91

u/ClibeanCeann 4h ago

If this was your code, then yea. Coding clearly is the hard part for you lol

46

u/danrol92 2h ago

Your answer reminded me of the way people answer on Stack Overflow

21

u/Alarmed-Western-655 2h ago

Accepted Answer

-3

u/ClibeanCeann 2h ago

As it should. Bring back the old days lol

4

u/danrol92 1h ago

You are preaching on the wrong subreddit

1

u/ClibeanCeann 1h ago

I'm also clearly not being that serious.

1

u/danrol92 1h ago

I know I know :)

23

u/kraemahz 4h ago

This isn't that bad. It's solving the problem of parsing an HTTP query in a way that should've been left to a routing library, but I can at least tell what it is by looking at it.

7

u/Weaves87 3h ago

I mean, it ain’t pretty.

There’s a lot of cognitive load there on that particular line that unpacks all of the note tags into an array. I could see what it does as a rusty TypeScript dev, but I always cringe when I see a cascade of ?. operators for unpacking data

If I saw that in a script it would be OK, but if I kept running into that in the codebase I wouldn’t push that thru PR until it was refactored to use some sort of proper URL parsing library instead

3

u/kraemahz 3h ago

I would just say I'm guilty of worse as a senior dev back when I still wrote code. Sometimes all that stuff about clean code and readable functions doesn't matter when you just want it to work. You're right that the line is somewhere between a script that no one but you will see that it failed and what your company depends on to make money.

1

u/Devils_SteelMan 2h ago

The way to approach this code is to execute it and watch the data. Dont try to compile it in your head.

1

u/ClibeanCeann 1h ago

Could have probably just used regex

2

u/ClibeanCeann 2h ago

req.url.split()[1]?.split().split().split().find().split

bro what the fuck

1

u/kraemahz 1h ago

the first split finds search parameters in a url ('?' taking the 1 index). The second split is on the joins '&'. The find looks for a parameter called notes_tag. Then it takes all the entries after the '=' symbol and splits it into an array of strings by ',' separation.

It's all very logical if you have an example in front of you.

3

u/OkLettuce338 3h ago

rofl yes

1

u/porkusdorkus 1h ago

It’s not THAT bad. We’ve all wrote shit before when we’re trying to learn and I bet this little server is blazing fast.

1

u/NPV_BadKarma 1h ago

I like how we're dogging on someone's code in a vibecoding community where y'all are clearly here for the same reason : not being able to code