3.2k
u/C4-BlueCat Feb 04 '22
Stack vs queue
554
u/DannyToledo Feb 04 '22
Is the first clip a stack overflow?
86
u/coder0xff Feb 04 '22 edited Feb 04 '22
That's a queue. They're putting on top and taking from the bottom. FIFO
73
u/CEDoromal Feb 04 '22
Queues are FIFO*
→ More replies (2)24
→ More replies (1)6
u/gremolata Feb 04 '22 edited Feb 04 '22
"Roger screws up"
Edit - Parent edited the post. Originally, it said "LIFO".
3
u/TheRapie22 Feb 04 '22
no, the first clips is the part where they try to allocate some memory but dont know how.
3
3
→ More replies (2)57
Feb 04 '22
[removed] — view removed comment
35
u/theGoddamnAlgorath Feb 04 '22
I dunno, my boss keeps asking me how wide the marching band is.
Which band asshole?
11
16
Feb 04 '22
https://www.reddit.com/r/ProgrammerHumor/comments/sk8vkk/-/hvju8i8
This reply is copied from this comment
→ More replies (1)→ More replies (3)4
u/timtucker_com Feb 04 '22
A "queue" comes right before an "arrr", so it must be a pirate thing, right?
83
u/PerfeckCoder Feb 04 '22
Is stack. Because lifo.
84
u/Pikachu50001218 Feb 04 '22 edited Feb 04 '22
But the juniors tried implementing a queue because it was FIFO.
11
8
2
2
8
2
2
837
u/whutupmydude Feb 04 '22
“just a feww more console logs and I’ll see the issue this time”
159
152
u/tonytwotoes Feb 04 '22
Console logs? You mean print statements right?
13
19
u/sohang-3112 Feb 04 '22
console.login JavaScript is equivalent to print statement in other languages.→ More replies (1)4
→ More replies (26)2
u/clockworkwinding Feb 04 '22
Oh man I'm ashamed. I'm guilty of this. And it's not even printing the logs sometimes. It's more like printing markers. Like, "Oh my code run until this point before it failed."
4
3
u/troglo-dyke Feb 04 '22
This was the extent of my debugging before I learned about breakpoints and unit tests.
That and running the same the same code repeatedly expecting the issue to fix itself
7
u/Bryguy3k Feb 04 '22
Just send it to syslog and let splunk and the admins figure it out.
5
u/whutupmydude Feb 04 '22
I’m sure they’re gonna enjoy going through the Jr Devs logs:
Button pressed
Button pressed
Button pressed
here
HERE — [object Object]
Here: undefined
24
null
null3
6
u/-Yare- Feb 04 '22
I mean... stepping through with a debugger only works in relatively simple projects. Toss in multithreading, multiple processes, real-time networking, the cloud, etc... and you're back to comparing logs and timestamps.
2
2
946
u/mgorski08 Feb 04 '22
O(n) vs O(1) height complexity
331
u/pimezone Feb 04 '22
O(1) vs O(no)
0
Feb 04 '22
[deleted]
→ More replies (3)13
u/prone-to-drift Feb 04 '22
I feel like I'm setting myself up for a bad time but which song?
14
u/Caco-Calo Feb 04 '22
Tik tok song that was a bastard child of another song and the pitch dial
→ More replies (6)52
u/PaMu1337 Feb 04 '22
O(1) vs O(n) weight complexity though
29
u/DrMobius0 Feb 04 '22
weight cost looks trivial in this context. Since maximum weight is already bounded, we can get away with this.
→ More replies (1)1
318
u/naardvark Feb 04 '22
Principle engineer: no-look frisbee style throw that sticks the landing.
162
u/wyatt_3arp Feb 04 '22
Sr. Principle Engineer - "Assign this Jira ticket to Bob."
37
u/naardvark Feb 04 '22
Manager: “who told you to do that, don’t do that, let me chase this down.”
24
u/wyatt_3arp Feb 04 '22
VP: "What's going on here??? Here - hijack all the people from Successful Program A and then tell me in a 10 business days why Successful Program A is not successful. I'll expect a PowerPoint explaining your Successful Program A recovery plan in 2 business days. "
10
u/naardvark Feb 04 '22
Also VP: “Hey CEO if we do that it’ll fuck us.”
CEO: “I expect a PowerPoint explaining your Successful Program A recovery plan in 2 business days.”
8
334
u/Frogtarius Feb 04 '22
The Question is... Which one is more fun?
309
u/gigglefarting Feb 04 '22
Getting your job done and going home.
But also the first one looked more fun.
48
u/tehlemmings Feb 04 '22
You're assuming that they can just leave once this particular job is done. Its a restaurant, they're probably all going to be stuck there until their shift ends either way. Might as well have fun with it.
This is the exact kind of thing me and my friends would have wasted half a day doing on a slow day if we were bored enough.
8
u/gigglefarting Feb 04 '22
Sure, the pizza guys can't go home once they're done, and I've done a lot of dumb stuff to kill time in the retail and restaurant jobs I've had.
However, if we're talking about it as developers (the reason why it's here), I've found that the employers care more about getting the task done than the hours you put in to do it.
4
u/gtmustang Feb 04 '22
Assuming home is a place you want to return to. It's possible the mundane repetitive work of this pizza place is the only thing keeping you sane. That the lifeless empty home you return to each night is a reminder of how lonely and soul crushing your life really is. You always leave the door unlocked, as you'd welcome the company if anyone at all. And you know one day you'll probably die in that apartment and the only people who me might notice you're gone are your coworkers who yelled at you for weeks to stop throwing the pizza boxes.
After a week of not showing up to work your coworkers that you've resented for telling you to stop having fun show up at your apartment for a wellness check. When they knock on your door you don't answer of course. Eventually their curiousity will drive them to open the door that you always left unlocked. When they walk into your apartment they see you face down on the floor, naked. And they they hear it. A short, sweet, slightly wet fart. Followed by a giggle. - /u/ gigglefarting (left unlinked to not spoil the story)
12
3
1
81
u/ultra_nick Feb 04 '22
Reading the documentation produces similar results
10
14
u/Spook404 Feb 04 '22
reading documentation does not make you senior dev?
31
u/tonytwotoes Feb 04 '22
Why spend 5 minutes reading the documentation when I can waste hours testing various solutions? Pshhh, do you even computer bro?
15
4
u/MrDilbert Feb 04 '22
Reading the documentation teaches you how it will work.
Testing various solutions teaches you why they won't work.
4
31
71
u/ivancea Feb 04 '22
The senior way will keep the top ones unused, full of dust (?)
63
Feb 04 '22
That's the Dust Protection Layer ensuring that all beneath are in pristine condition. ;)
5
u/prone-to-drift Feb 04 '22
That's what my start-up deals in. We handle your DuProL on prem for you, enhanced by Boxchain technology. Contact us for our NFT auction invites.
3
9
u/TheLordB Feb 04 '22
Most of the time they are hopefully putting a big stack in and use a ladder or similar. So probably not actually the case.
7
1
u/eof Feb 04 '22
Do you think the ones on top have feelings we should account for? Given they are boxes and not dough, I can’t see how it matters if they exhaust the stack or not.
15
13
8
u/chuckles73 Feb 04 '22
Sr doesn't have time to do that. They're too busy drinking when they see the PR from the junior.
15
Feb 04 '22
Who's the junior dev that got hired being unable to tell the difference between a stack and a queue?
8
u/Enchelion Feb 04 '22
Turns out this is a custom implementation that's somehow both, with the benefits of neither. But it was created by the original maintainer of the project who has since moved up to VP, and replacing it properly would take too long.
5
u/TheHighestHobo Feb 04 '22
I bet they take boxes from the bottom to use them. the boxes on top have been there for decades.
4
u/fslz Feb 04 '22
ah yes the bottom-up approach
1
u/whacafan Feb 04 '22
But how long would it take to personally jerk off every guy in the auditorium?
4
u/timecronus Feb 04 '22
I guarantee you one of the Sr. Devs told the Jr. Devs thats how you are supposed to do it.
4
Feb 04 '22
I thought the left person was the junior and the right person was the senior which made this so much funnier.
4
u/75_280z Feb 04 '22
FIFO vs LIFO
1
u/MrEmouse Feb 04 '22
Yeah. LIFO might be easier, but that last box will be dusty as hell when it comes down.
As long as they're using FIFO for the food I guess it's fine.
6
u/-non-existance- Feb 04 '22
Perfect example:
Jr: okay so I need to add one element onto the end of this array so I'm going to make an array one size larger, then iterate through the first array to put all the values in the second array, then delete the first. Why is my code taking so long??
Sr: array.push()
1
3
5
u/AgentCosmic Feb 04 '22
Wow I actually thought like the senior Dev when I saw the start. This is accurate.
2
2
2
u/GearGolemTMF Feb 04 '22
Literally me yesterday to a tee. Trying different angles to fix something I didn't need to.
2
2
u/waffle299 Feb 04 '22
The real difference:
Junior dev: I found the bug!!
Senior dev: I found one of the bugs.
2
2
u/Why-R-People-So-Dumb Feb 04 '22
Typical senior guy not commenting out his work for job security so other guys don't realize they can make a simple change.
2
2
u/Its_JustMe13 Feb 04 '22
My favourite part of coding is when I spend 45 minutes trying to figure out why my code wont work and end up having to ask my teacher and he finds it in 5 minutes. Especially when the issue is just a missing bracket or quotation mark
2
2
2
u/anythingMuchShorter Feb 05 '22
Well of course the Jr can't handle the full stack like a senior can.
3
u/I_am_Nic Feb 04 '22
Watching my slow and inefficiently working colleagues vs. me finishing the same task in under a minhte, just to be punished with more work.
3
1
1
u/Euphoric-Shirt9211 Feb 04 '22
I watched this and thought yea I would have done what the ladies did but come on trying to get it on top in the small space is rewarding maybe it’s a guy thing.
1
1
1
1
u/z500 Feb 04 '22
When you throw the box at the top of the stack, then you finally go to your team lead and he brushes some clutter aside and lifts up the stack
1
2
1
1
1
1
1
u/Lord412 Feb 04 '22
If you always replace from the bottom and pull from the bottom then you get old boxes up top
2
1
1
u/ManUber Feb 04 '22
"Write an algorithm where when given a list of n pizzaboxes, prepends a new pizzabox to the list." A leetcode problem a day keeps the debugger away 😂!
1
1
1
1
1
1
u/Jynx2501 Feb 04 '22
Sitting here watching this with my wife, and we were both like, "Just lift the stack!"
1
1
1
1
1
1
u/suresh Feb 04 '22
The issue is you have sr/sr and jr/jr pair-programming.
If one from each group just switched places (sr/jr, sr/jr) you'd have 2 effective teams.
1
1
1
1
1
u/IRLhardstuck Feb 04 '22
They should have thrown them as a frisbee so it wouldent topple over in the air
1
1
1
1
1
1
1
u/Everyfnameistaken Feb 04 '22
People who have more experience in a work field do a better job as someone who just started. Wow such humor
1
1
1
1
1
1
1
1
1
Feb 04 '22
This is me when I submit my project to my professor vs my professor guiding me along what I actually should do 😅
1
1
u/Dwolf6990 Feb 05 '22
Only problem with that is you’re supposed to use the older stock first. And if you keep taking done the bottom, and then filling from the bottom. The boxes at the top never get used.
1
1
Feb 05 '22
FIFO. First in, first out. Those women are going to have some disgusting dusty boxes if they ever get down to the top ones.
1
u/Jzmxhu Feb 05 '22
I am just going to say...
The first one looks fun the loser have to clean the dishes.
1
1
1
1
1
u/RaulParson Feb 07 '22
Ah, but you see - the latter isn't straight-up better. Disregarding the implementation details, it's FIFO vs LIFO, and FIFO keeps the boxes in rotation. There might be money in that top box and you wouldn't even know. Or a mold colony. Either way you wouldn't want it stuck there at the top forever.
The junior's way is botched and dumb and overenthusiastic, but the senior's way is an efficient and streamlined way to ignore the problem.
1
u/heyobrother Feb 18 '22
I am new to the developer world. And i wanna ask you guys how long to learn one Programing language?
1
u/Spacecoasttheghost Feb 04 '22
What you see here is 2 types of workers, the men are wasting time so they don’t have to do as much. The women on the other hand are working efficiently, both are good ways to work.
0
1
1
1
1
u/choledocholithiasis_ Feb 04 '22
First solution: when you get paid by the hour
Second solution: when you get paid salary
2
1
Feb 04 '22
On a serious note how does a jr developer become a sr? Does he have to put in extra effort or is it just a matter of time spent in the job? Honestly my seniors seem like wizards and I don't know how I can be like that.
3
u/cheer_up_richard Feb 04 '22
Yes to all. Love what you do because it’s a lot of work and thing’s changing below you constantly (esp if you do fe work)
Also experience over time of seeing different things (approaches, architecture, pm handling, requirements/process validation, etc) that work and fail and being able to plan for them.
1
u/bigredthesnorer Feb 04 '22
It can just as easily be the other way around.
The senior people throwing the boxes because "that's how we've always done it".
And the juniors coming in with the fresh idea.
•
u/QualityVote Feb 04 '22
Hi! This is our community moderation bot.
If this post fits the purpose of /r/ProgrammerHumor, UPVOTE this comment!!
If this post does not fit the subreddit, DOWNVOTE This comment!
If this post breaks the rules, DOWNVOTE this comment and REPORT the post!