Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
Search - "how can you fuck up like this"
!rant, TL;DR at the bottom
Holy fuck, Yesterday, I got absolutely schooled by a literal newbie.
And I mean, NEWBIE newbie, the dude just started a Computer Science degree, and has been learning Java only for a MONTH. He has 0 prior experience with code or anything of the like, and he's somewhat of an Ars(Israel's version of a Gopnik).
So I was helping him with some stuff he didn't understand, and lo and behold his code was probably the most aesthetically pleasing and organized code I have seen in my 8 years of programming(I know 8 is not much, but It's at least above beginner level). The dude's a perfectionist, so I was like, "Okay, very impressive, but makes sense for perfectionism"(I straight up told him: "Damn, I've seen people with years of programming experience who can't learn to write this well, and you do this by default? I envy whoever's going to work with you"), and then I saw the way he writes checks(as in, methods that return a boolean) and I think I came.
The code was:
[First method in the picture]
And I know, it doesn't look as ✨ WOW✨ as I make it sound, but in my personal opinion this both looks much better and is much more readable than what I normally write:
[Second method in the picture]
and whenever there are longer or more complicated checks it makes it look like a simple puzzle that just fits in all the pieces nicely, for example in a rectangle class we had to write an 'isIn' method, this is how I wrote it:
[Third method in the picture]
His way of writing the same thing was:
[Fourth method in the picture]
Which I think is soooooo much better and readable and organized,
It's enough just looking at the short return statement to immediately understand everything that's going on.
"Oh, so it just checks if the SW(South West, i.e. Bottom Left) corner is above and to the right, and if the NE(North East, i.e. Top Right) corner is bellow and to the left"
Point of the story? Some people are just fucking awesome. And sometimes the youngest/most inexperienced people can teach you new tricks.
And to all of you dinosaurs here with like, 20+ years of experience, y'all can still learn even from us stupid ones. If 8 years can get schooled by a 1 month, 20 years can get schooled by a 1 year.
Listen to everyone everybody, never know where you might learn something new.
TL;DR: Got schooled by a local "Gopnik" who only started learning programming a month ago with 0 prior experience with his insane level of organization and readability.30
How fucking hard can it be to show a simple image. Guess which app has this feature.
Images are cropped to frame, but you can tap to fit the whole image to frame instead. No way to see the image on full screen. Pinch to zoom works, but it will immediately unzoom if you let go even one finger.2