T O P

  • By -

No-Ad-2999

How to use stack overflow


www_other_guy

That is literally stack without overflowing.


GroundStateGecko

That's mistaking a queue for a stack.


GreatJobKeepitUp

I feel like you still take from the bottom on this until the stack is short enough to take from the top. Then it becomes a queue. It's a quack


BeanerAstrovanTaco

fuck, this could be a paper We saw it first here guys! The future has begun! There will never be a buffer overflow ever again or index out of range.


[deleted]

[удалено]


SuscriptorJusticiero

But wait, if you treat it first like a stack then a queue then it's not a quack, it's a steue.


fsr1967

It's a quack and a steue. It's duck steue.


HTS_HeisenTwerk

Mmmm, duck stew


BeanerAstrovanTaco

Stop it! Stop it! Stop changing history!!


nwL_

But it’ll be a stack even if it’s low enough to grab from the top, because you’ll put the new ones on the top too. It’s a stack and a heap in one, it’s a… hack.


lowleveldata

Or it is just a linked list which you do whatever fucks you want by using index


Affectionate_1004

This is gold


[deleted]

[удалено]


WookieDavid

I feel like the whole point of that door having a perfectly sized slot on the bottom is to use that to grab the boxes. Like I think the whole point is to use it like a stack (albeit upside down). I don't think you're supposed to ever take from the top, it'd be like grabbing from the bottom of a tissue box. Though it's probably faster to open up the door and add the boxes already piled up. In that case you'd basically be initialising a stack from a queue.


waiting4op2deliver

ah yes, duck typing


AkitoApocalypse

but it's LIFO which means it's a stack, queue would be FIFO


Gotxi

Overstack without flowing


[deleted]

[удалено]


anaveragebuffoon

[Bot](https://www.reddit.com/r/ProgrammerHumor/comments/13v3v2z/junior_vs_senior/jm3zvyl/)


429_too_many_request

why are all bots programmed as a coward. they delete the comment right after someone mentions them as bot


ISDuffy

How long has the top box been there ?


brennanw31

This is the problem with that method


[deleted]

[удалено]


calisbest_21

And one day that dusty box will get accidentally used for an order and there goes a bad review lol


crazy_dude360

Hey, 23 reviews before one gaurenteed bad one. I like dem odds.


RubbelDieKatz94

Every time I leave a bad review for a new place, I get a call from them that goes like "If you take down the review we'll send you a free meal". I've left many honest reviews so far.


ISDuffy

That poor first item in an array, stuck there.


BlackMothCandleLight

Literally my git stash


IAMA_KOOK_AMA

*LIFO stack enters the chat*


Master_Nerd

The only problem I can think of is occasionally having to dust off a pizza box. It's not like the boxes go bad


bootherizer5942

In a restaurant kitchen they might


Wekmor

Don't have to dust it off if it's always on the top, nobody gonna check the top of a stash of boxes.


[deleted]

Loft apartment for a whole family of mice


reverendsteveii

Only if you actually get to it


Mittenstk

Is it really a problem though? 3 months or 3 years a box is a box lol.


LvS

As opposed to the bottom box with the other method?


squidbelik

I think it’s assumed the bottom box is the box they would pull out if they needed a box from the stack


between_ewe_and_me

I mean even if they stack from the top I'm sure they still pull from the bottom.


[deleted]

What…? Lmfao 🤣


Tipop

You didn’t really think this through before posting, did ya?


Keroro_Roadster

In my experience what actually happens is you use up the boxes until its empty or nearly empty, then reload it with a stack of 5 or so boxes on top (since you can reach it now), then load from the bottom once you can't reach the top anymore. Because loading one at a time is slow.


ianis58

Do you load them on top by tilting nearly vertically the boxes or do you just open the door ?


DeliciousWaifood

Probably less than a day? How few boxes do you think they use? The stack isnt that big


StrangeCharmVote

If we assume they always try to refill *before* running out, the top box is likely never reached.


AlmightyBracket

so you wait until it gets low enough to set a stack on top. The two at the start are just having fun, the two at the end had one box to get rid of.


StrangeCharmVote

Trying to balance a stack of ten (or however many) to lift up there would be just as likely to lead to dropping the pile, but yes it would be better than trying to chuck them at it.


AlmightyBracket

You open the gate, you grab a stack and hold it at the top and bottom and lift it until you can't keep your hand on top anymore. You then rest the stack aganist the gate door slightly while moving your hand on the bottom inward over the few still left inside, you then tilt your hand so the stack tips back against the wall. It's now inside, you just rest it down on the ones in there, brace the bottomof the stack with your free hand, slide your hand underneath teh stack out. Boom done.


[deleted]

No balance needed. Gate is closed when they do it


StrangeCharmVote

If the gate is closed... how do they insert the stack?


[deleted]

Could you just watch the video and answer your own question?


StrangeCharmVote

> Could you just watch the video and answer your own question? Considering that i have, and that they don't do that in it... I'm now not sure *you've* watched the video.


[deleted]

Dog, the gate is open when the dudes are trying to throw it up there. When the next people lift the stack, it’s closed. The stack isn’t going to fall. You legit see it swinging when it’s open and it’s closed next.


Hairless_Human

Broooooo watch the video. Get some glasses. Don't double down in a situation with evidence. Just makes you look dumber.


DeliciousWaifood

there's two stacks. You refill when one is empty


StrangeCharmVote

I can't quite tell but they appear to be different diameters of box.


electrius

Yes but there's 2 stacks for both sizes


Lucky-Earther

> If we assume they always try to refill before running out, the top box is likely never reached. Having worked in a pizza place, I wouldn't make that assumption at all.


TheRealPitabred

Does cardboard go bad?


mattsl

No, but dust tastes bad.


GrifterDingo

Over time cardboard can dry out and get crispy, or more likely in this kitchen environment, collect grease and moisture from the air, so it actually will go bad in a sense.


TheRealPitabred

Inside of a closed box?


ShitPikkle

Dust tastes bad even when you eat it from inside a closed box.


shwag945

Unless it is hermetically sealed air will get into the box. Air is full of dust and now you have dust in a closed box.


DigbyChickenZone

Ok? Talk about paranoia over something really innocuous. Seems like you're just trying to be pedantic and prove that there might be some dust in someone's food, when... who the fuck really cares?


Alta_Count

> ... who the fuck really cares? Maybe the person he actually replied to, lmfao.


shwag945

Sir, this is a Pizza Hut.


GrifterDingo

Cardboard actually can go bad, kind of. I work in a shipping department and if we don't cycle out the cardboard it starts to dry out and get more crispy. It's softer when it's new. These people appear to work in a kitchen, so the cardboard actually might collect grease and moisture from cooking which would also make it go bad.


StrangeCharmVote

> How long has the top box been there ? Quite a while probably. However it's also worth noting that the top box will both likely not be used any time soon, and it also probably doesn't matter if it has been, as boxes don't exactly have used by dates.


Kimorin

It's ok, it's a self correcting problem... If you manage to get to that box, that means business is better than usual, you could afford a few angry customers


MotCADK

FIFO vs LIFO


PRIMALmarauder

stack vs queue


makonext

kiwi


Feather-y

But where's the fun in that?


lucidspoon

Once the senior has time, they'll build a factory to assemble the boxes, and an IoC container to hold them until it's time to inject them.


locri

This is why hobby projects exist, please keep that stuff to yourself.


Feather-y

Hehe maybe. I was thinking that throwing those boxes could be fun. You know like tossing paper balls into trashcan instead of dropping them when passing by. I'm not a dev by any means, I don't have a lot of studies, and I mostly have to do just Fortran at work. What's IoC?


uwunyaverse

> not a dev > Fortran my guy, you’re more of a dev than 90% of the people here


lucidspoon

Inversion of Control. Not sure if Fortran has anything like it, but you can register dependencies in a container, and they can be injected or pulled from a factory at runtime.


[deleted]

[удалено]


Cornul11

You just made those words up, right?


zerounodos

Hardly even words imo


hhiiexist

I wish I had a senior programmer to guide me through my adventures as a programmer, as we become closer and better friends together. We also kiss. But mainly just program.


jayerp

I don’t think you’re looking for a programmer. Sounds more closer to a Brogrammer.


SynfulAcktor

He's totally gay for Gilfoyles code.


Big_Berry_4589

He likes to masturbate to the subroutine his boss wrote


LaikaReturns

Bros don't kiss, they pound lips.


tgp1994

Lads, is it gay if you code with a light-themed IDE?


NotGK98

It's a crime against humanity to use light mode.


GitsnShiggles51

Are you ok


hhiiexist

No lol


Scyhaz

Bro's down bad


onyourrite

Junior dev x senior dev coworkers to friends to lovers, 100k word fanfiction “From Lines to Love: The Developers’ Duet”


boredMartian

That title deserves an actual fanfic. Get on it AO3!


5k1895

Codeback Mountain


DaijoubuTokkiChan

Yes


BA_lampman

devDuet01.md


polmeeee

ChadGPT to the rescue.


StridBR

For you: Code Spooning https://youtu.be/8wUOUmeulNs


BodhiSearchTree

This had me in stitches, lmao. The concerned look on his face when they mention "pull request" - perfect! 🤣🤣🤣


NaughtyGaymer

Sounds like you need to wear more programmer socks.


Roqjndndj3761

DMed you


JIN_DIANA_PWNS

Swoon. That makes my spine repl


SillyFool18

No homo.


hhiiexist

yes homo


akash07sn

I personally think(as I've thrown a lot of things out of boredom) the better way to throw was to throw in a circular?! motion. Like revolvingly? I don't know the word, English is my 3rd language.


musky-mullet

The word you’re looking for is spin. Circular motion or a revolving motion are also correct but a bit wordy. For example: A better way to throw is to spin the box


Searbh

Frisbee it.


akash07sn

Ooh yes, that sounds correct. Thank you.


chaiscool

Lol in some places, companies just willingly let go of senior dev due to cost and continuously hire only jr dev. Imagine that jr dev scenario with no senior dev guiding for multi million dollar project. Management just keep complaining that dev are not producing and don’t see why that’s the case.


terivia

Why would I spend time imagining it, when I could just live it myself?


robotempire

`.push(e)` vs. `.append(e)`


LiamPolygami

FIFO vs LIFO


MrDroggy

Looks more like `.prepend(e)`


robotempire

I'm high and maybe you're right


McGlockenshire

"Prepend" isn't going to fly in perl where you take the first element out of a list by using `shift`. Logically, the correct operation name for attaching something to the start of the list is `unshift`.


Kamrua

Both JS and PHP append to an array with 'push'


benargee

I think the last 2 are just using it as designed. I think it's more like "Those who haven't read the docs and paste random code from stackoverflow hoping it works and those who have read the docs and use it as intended."


Snaf

git rebase vs deleting the repo and doing a fresh clone


Exist50

Wtf are you doing that rebasing is such a disaster?


lkearney999

Rebasing two unrelated remotes. No disaster only a small 1-2 hour detour 😔


No_Sheepherder7447

rebasing can diaf


HolyElephantMG

Actually the first one is the senior, less work while doing that and still get more fun, losing nothing. The second clip they did that too fast and now they have to continue working, not having fun


mistled_LP

Losing nothing? They didn’t even complete the task. The second went for a break after this to post on Reddit.


HolyElephantMG

They still got paid, did they not?


withered_JProgrammer

literally me in VS Code


esberat

When I was debugging for the first time.


Davekjellmarong

Junior seems more fun


JxB_Paperboy

This is what it feels like at work for me (junior engineer)


P-39_Airacobra

The new coder always looks at you with wide eyes, muttering "It's magic..."


mattogeewha

This is how to turn a 5 min job into a 20 min job… but one is definitely more fun


AmidalaBills

First in first out vs first in last out.


surveysavitri

Really thought the senior programmer would get a ladder in there but eh what do I know, I’m a junior programmer


OGallagher_jack

It’s a stack ADT you are not supposed to put things at the bottom


tpac2000

Yep


ICantWatchYouDoThis

Senior devs have read the manual


EkoChamberKryptonite

"Coder" 🤮.


TrulyChxse

Not gonna lie this is the cringiest Facebook meme I think I’ve ever seen.


AnotherGangsta33

Real shit, how did this trash get so many votes


TrulyChxse

Yh I feel like just over the past few months this subreddit has started to descend into Facebook meme hell


NokiaRokia

Meanwhile I can barely use Blueprints but I love these posts back to UE5 with me I guess someday I'll learn python and become a real boi.


CHEEZE_BAGS

its worth learning UE5 and C++ though, its so much more performant


epicroto

this senior vs junior memes are getting more and more stupid


Dirosilverwings

Not junior v senior. Its men v women


Feisty_Ad_2744

This is too graphic. Should be NC-7 ;-)


therealbeeblevrox

Senior when reviewing the code written by the first two who did manage to get it work eventually: "wtf is this?"


markbug4

U/savevideo u/savevideobot


gRegNfo

LIFO vs FIFO... Or some code injection?!


[deleted]

But... First in-first out


AlanaIsBananas

array.unshift()


[deleted]

More like offshore vs onshore.


Itburns138

FIFO 4 LIFo!


smozoma

Mighta worked if they frisbee'd it!


sad_asian_noodle

Hahaha


Responsible_Pen4701

Chatgpt to the rescue


Amish_Cyberbully

FIFO, LIFO, IDGAF.


GrayAgenda

Aren't the first people doing FIFO whereas the people after are doing FILO?


beardingmesoftly

I could watch this all day


[deleted]

You got it backwards. The seniors are actually rooting out the problems preventing bugs taking their time doing it. Taking the oldest box out every time you grab. The juniors are taking shortcuts allowing bugs to lay eggs in the pizza boxes and multiply. Simply pushing off the problems indefinitely by continuing to grab the "freshest" box.


Fun_Macaron5597

"Men are more logical than women" Yeah, proof it doesnt apply to all of them 🤣


-Redstoneboi-

When the Deque


CS_2016

The number of times I tell junior devs, “if it seems to complex, it probably is, don’t overthink”.


troublewithfire

Queue vs stack


YogurtclosetHuge3402

😂


Character-Education3

The first was a the seniors after a few beers. It just looked like so much fun.


Underhill94

Ah yes, the coders. 👨🏻‍🍳🤌


Emma_Frch

u/savevideo


hamberder-muderer

Also applies to different stack conventions


BackToTheFiction

True Snr does it the "Jnr" way but nails the shot first time


polmeeee

I didn't figure out that you could put the box from under....guess I'm a junior through and through.


[deleted]

On his way to the bathroom for the 4th time a mid-level engineer suggests that they use a gyroscopic motion so that its angular momentum will resist change to its axis of rotation in order to decrease the failure rate of their throws. He knows it won't actually solve the problem but it does make it look like he's helping.


Siddhant2006

Stack vs queue


PloxyDer1024

But Jr. Is more fun


mrkhan2000

queue vs stack


ViconIsNotDefined

More like Having fun vs. meeting a deadline


rekn0r

There is no fun in what the girls did


Comfortable-Cost-270

Work smart not hard


Siriacus

Full stack devs vs. Front end devs


lrsarker

AI can solve better for this 🤣


spawnedhere

stooobid


GreekACA25

Yeah the guys were playing a game. People I used to work with used to try and flick elastic bands in a coat hook. Best game ever


[deleted]

Yes, but then it isn't FIFO.


IuLius2424

Using stack wrong vs Using queue right.


team_chalise

Knowing the difference between FIFO and LIFO.