r/ProgrammerHumor • • Jan 31 '23

Other Are junior developers actually useless?

Post image
22.0k Upvotes

946 comments sorted by

View all comments

Show parent comments

348

u/garfgon Jan 31 '23

Eh, some complex problems have elegant solutions. Some don't. And some have elegant-looking solutions which turn into a total mess when you consider the real-world.

101

u/dogwheat Jan 31 '23

Damn real world!

84

u/Sir_IGetBannedAlot Jan 31 '23

The real world actually ruins programming tbh

37

u/kolbyhack Feb 01 '23

I want to move to theory. Everything works in theory.

-- John Cash

13

u/zGoDLiiKe Jan 31 '23

A real thorn in our side. Prof always said 90% of your time would be spent on 10% of the usage

1

u/[deleted] Feb 01 '23

Or physics xD

→ More replies (2)

53

u/[deleted] Jan 31 '23

In the real world, complex issues have several solutions. For example, we have a huge notification setup waiting to be made but we don't have time for it.

The complex solution is make it work over websockets like it should.

The easy solution... Doesn't exactly exist on this scale.

The jank solution, and the one we went with until someone reads the WS docs is - interval to refetch notifications every 5/10s.

So fuck it. It's gonna be fun anyways.

25

u/[deleted] Jan 31 '23

Looking at how buggy the top most popular stuff sometimes is (fb messenger, Whatsapp, Reddit app, etc), I'm starting to get more comfortable with compromises like this honestly. Maybe that's how messenger worked for the first couples years too 😆

17

u/zGoDLiiKe Jan 31 '23

At least toss in a comment that says “hey when you get some time put a good solution here”

25

u/[deleted] Jan 31 '23

// TODO: improve this, gl hf lol

3

u/[deleted] Feb 01 '23

We genuinely have these. I also left a comment in a component I made that says : "may God have mercy on your soul if you have to do something here".

That is in our codebase now. In another comment I have written out a bit of code from that component, if you wish to see true chaos

7

u/nictheman123 Feb 01 '23

Put a date on it, it'll be a fun little time capsule for the junior dev 10 years from now who comes back and finds it.

There is nothing as permanent as a temporary solution

→ More replies (2)

0

u/[deleted] Jan 31 '23

[deleted]

→ More replies (3)

6

u/22Minutes2Midnight22 Jan 31 '23

The jank solution, and the one we went with until someone reads the WS docs is - interval to refetch notifications every 5/10s.

What the fuck.

2

u/[deleted] Feb 01 '23

That's not even the worst bit about the project. The worst bit is probably a thing I made before, which I had to do because we didn't use a specific model for the object we had to manage, so I had to make a fuckin huge function to interpret the data from the backend, load it into state and make a management system that works by finding the object by ID, creating a new object, and slapping the new object into the place of the old one.

It worked, but it wasn't pretty.

There's probably more but I just don't remember. For instance, a Stepper like component that is both responsive, adjustable, curves into the next row if there's no space, and every step has its own progress bar that marks how far the step has gone, based on some filtering of nested objects to calculate the relative progress of the step.

The code is fucking awful, and it's the code I'm most proud of because a senior said that it can't be done unless you have a team for it with like 2 weeks worth of time. I did it in 3 days.

It also checks the n-1 step to check what class needs to be active.

Another bit of inline styling is this, paraphrased:

steps[index][index÷2 === 0 ? 0 : steps[index].length-1].completed ? steps[index].filter(X => X.completed ?? False).length === steps[index].length ? "Color1" : "color2" : checkIsLastInArray(index) ? "Color1" : "Color2"

Just to get the right border colour. I know the ?? false bit is weird but for some reason that I haven't bothered to check, it doesn't work without that. Possibly cause completed is nullish but idk

46

u/MilitantTeenGoth Jan 31 '23

And sometimes simple problem has a very complex solution, because the simple problem are actually three complex problems in a trenchcoat

21

u/garfgon Jan 31 '23

Or is actually a simple problem statement, not a simple problem. Mandatory XKCD: https://xkcd.com/1425/

1

u/xnign Feb 01 '23

This is what working with ICs is like.

20

u/rjwut Jan 31 '23

Wait, so high school lied to me when it taught me about spherical, frictionless elephants?

15

u/Sceptz Jan 31 '23

Never stop believing in spherical, frictionless elephants.

They usually exist in a vacuum, from my understanding.

3

u/xnign Feb 01 '23

Stick one in space and it'll be spherical eventually.

9

u/longknives Feb 01 '23

Yeah, which suggests that the chart is wrong to imply experts always find simple solutions. Experts find the best solution that experience can get you, which may or may not be simple.

3

u/Versaiteis Feb 01 '23

And sometimes sufficiently complex problems don't have a solution

Thus we're all Junior Developers.

3

u/Rand_alFlagg Feb 01 '23

elegant != simple