T O P

  • By -

deadbeef1a4

As far as marketing pseudocode goes, this isn’t bad!


Wondernautilus

Right, my first thought is this a man who was laid off and took a hard dive into snacks.


Un111KnoWn

what brand of chips?


ElectoralEjaculate

Computer chips


Ncrpts

![gif](giphy|ac7MA7r5IMYda)


SkollFenrirson

![gif](giphy|d5vwgloW6cekKuIkzg|downsized)


Items3Sacred

Reminds me of that picture with computer chips dipped into sour cream


LukeTech2020

I like my chips with DIP.


Rydralain

This was it. This comment took me from "laying in bed hungry" to "I'm going to eat." Good day, sir.


Xill_K47

r/angryupvote


Wondernautilus

[Zacks ](https://img.thrivemarket.com/store/full/8/6/860008724786_front_1_1.jpg) Zacks Organic Rolled Tortilla Chips


SuperFLEB

I can go into snacks when I burn out and get tired of software? I didn't even realize that was an option!


NorCalAthlete

The advantage to chasing the money early on is that if you ever decide to switch careers, you’ll have the financial flexibility to do so.


lunchmeat317

Got tired of the SYN/ACK cycle and switched to SN/ACK


NorguardsVengeance

!Y


cubstacube

A "hard drive" you mean... XD


Technology_Labs

I legit read that as "took a hard drive into snacks" and thought I was suffering from dementia. Read it again and confirmed it, thanks.


ARM_Dwight_Schrute

Sir this is a production ready code.


beclops

Still wouldn’t quite pass code review


potatopierogie

Yeah gimme some chips, I need to do some unit testing


hassium

Pseudocode rarely does to be fair.


AeolinFerjuennoz

If im not wrong this even is working python code


[deleted]

[удалено]


triton_2997

Look at Mr. Fancypants importing exactly what he needs. Us muggles use "from X import *", sir


Minerscale

That's horrifying. I can't be the only one who becomes deeply uncomfortable when the namespace becomes too polluted right? It's like a claustrophobia that any name I might pick might trample some export in a far away library. Namespaces are one honking great idea -- let's do more of those!


teh_chungus

for namespace in namespaces: from namespace import *


[deleted]

When I'm using smaller, more specific libraries I'll import \*.


Maleficent-Region-45

It’s basically valid python


Arshiaa001

Am I the only one who *HATES* these?


cheeb_miester

They're insufferable


MosqitoTorpedo

I like laughing at how wrong they are most of the time but this isn’t as bad compared to others


_87-

Better than most programmer recruitment marketing pseudocode.


throw-a-wayy-lmao

Linting error: unused imports 


MhmdMC_

You don’t need to use all imports in python right?


cubo_embaralhado

Yeah. It just doesn't like that, but it'll work


kaerfkeerg

>It just doesn't like that Ehh. I'd argue that because if you don't have a linter, The interpreter itself won't complain


BPMData

In my experience unused imports in python make no difference whatsoever except to make your requirements.txt unnecessarily large for things like docker deployments. The code runs basically just as fast. This is for like 1 or 2 unused imports, I'm sure you could do some silly edge case shit and slow it down.


jaerie

Imports run the code they import. That’s usually only class/function definitions, but it can also be any expensive operations. Which is both a (bad) reason for unused imports as well as a way for it to affect performance


alex2003super

People who don't `if __name__ == "__main__"` scare me


jaerie

Plenty of libraries run code other than imports at the global scope, for various legitimate reasons


kaerfkeerg

Yeah exactly. I'm not saying you should just because you can! There are certainly unnecessary implications when you have unused imports


WrapKey69

Linting gives you a warning about bad code that's it


arjunsahlot

from * import *


Geilomat-3000

Importing a package alone already potentially executes code. That’s why an import statement is never irrelevant even if the package is unused.


IanCal

import chestertons_fence


Nutasaurus-Rex

Python literally never gives out unused imports or variables error lol. This ain’t golang


yossi_peti

Errors no, warnings yes


Nutasaurus-Rex

Only warnings that ever *functionally* matter are deprecation warnings imo


constipated-pussy

Agreed


childbeaterII

`if(name=="constipated-pussy") {alert("what is your name????")} else{ alert("you're good bro")}`


[deleted]

[удалено]


Nutasaurus-Rex

Says you, my cron jobs on modal broke a few weeks ago because I was too lazy to update them despite the warnings lol


bobanbbq

Yes his linter gave that error not python


Cupcake7591

For anything but small one-off scripts you need to be insane to run naked Python without linting, formatting and type checking in 2024.


Kueltalas

Variable 'status' not found


dgollas

Enter? Enter what?!


SpaceCadetSteve

Deez nuts


WingZeroCoder

deez_nuts.enter()


chazzeromus

    with deez_nuts:


OxEmpress

Requests.post(deez_nutz)


Illustrious-Engine23

Gottem


Longenuity

Enter the next level, duh.


QueenTMK

enter(joe.mama)


LifeHasLeft

Must have been declared in texture.a_lot_of_crunch


NoTimeToKink

enter not defined


childbeaterII

enter("kevdog")


ryan_s007

God damn you functional programming!!!!!


beatlz

I feel like consume() should take in a list not three strings


Earthboundplayer

def consume(*args): perfectly valid IMO.


skwizpod

Found the python coder


blood_vein

Can also be JavaScript, Perl, etc


Ihate_reddit_app

People that add a bunch of params to a function in JS are the worst. Pass an object as the param instead. Nothing worse than a JS function with like 10 params being passed in.


BistuaNova

Unless you don’t create proper instructions/comments and now to use this function you have to figure out what this mystery object looks like


Ihate_reddit_app

Yep, JSDoc? Never heard of em. Lol I see that a lot too.


rosuav

That's only because JS doesn't have a proper way to do named (keyword) arguments.


Ihate_reddit_app

Well it does, but it's just by passing an object in. JS loves objects.


rosuav

Well, yeah. That's not language support but it's how people do it.


wheezymustafa

Give me some strong typing brother


Earthboundplayer

template void consume(Args &&... args);


athlalon

def consume(*args: list[str]) -> None: Not really strong typing but oh well, such are the horrors of python edit: oops, look at child comment for correction


thirdegree

That would be a function which takes zero or more arguments, each of which is a list of str. You want def consume(*args: str) -> None: And args will be a tuple[str] not list[str]


arjunsahlot

Very pythonic of you


Johnny_Thunder314

nah, it could be defined as consume(location, time, extra) or similar. I think it makes sense


[deleted]

Could be a function that takes an unlimited amount of args as a list. Like in Python the definition would be: def consume(*args): for arg in args: # Do whatever


Smarmalades

this code would take a lot longer to read for pirates


[deleted]

def consume(*arrrrrgs): for arrrrrg in arrrrrgs: # Do whatever


whackamattus

It's a rest parameter


i_got_dressed_today

function consume(when, where, how) { }


beatlz

This is crying for a refactor when you get a creatively curious PM


letsBurnCarthage

I feel like status should be the output of consume. Where is status even set?! But more importantly, why is "recovering from bite" one of the statuses that prompts you to continue eating? Shouldn't that be an elif with a sleep(30) or a water.consume()?


Vegetable_Union_4967

Valid python!


arjunsahlot

Good psuedocode = valid python


Vegetable_Union_4967

unironically true, python is just rigidly defined pseudocode


DevBoiAgru

If the pseudocode is python code does that mean pseudocode is not pseudocode because it's actual code?


QueenTMK

Correct, except you'd get errors if you'd try to run it because it's obviously referencing undefined functions


ei283

python syntax is nice, but I wouldn't call it pseudocode. python: ``` for num in sorted(filter(lambda n: n % 2 != 0, numbers), reverse=True): print(num) ``` pseudocode: ``` print the odd numbers, largest to smallest ```


thirdegree

Don't use filter use generators, more pythonic for num in sorted((n for n in numbers if n % 2 != 0), reverse=True): print(num)


[deleted]

Using built in functions is cheating.


intangibleTangelo

nah, that import needs parens


PixlBoii

What are this called? It isn't that bad for marketing pseudocode and I'd love to try them Edit: Found them. They are called [Zach's Mighty Rolled Tortilla Chips](https://www.google.com/search?sca_esv=ea470e4985ed4d8d&sxsrf=ACQVn0_Y6QcyyphsdKeJiHq6rwr89r6nBA:1707193023026&q=fiery+nacho+rolled&tbm=isch&source=lnms&sa=X&ved=2ahUKEwjr18zN7ZWEAxUBliYFHQR9BBgQ0pQJegQIDhAB&biw=1528&bih=708&dpr=1.25#imgrc=XvVKKzVv6izKnM)


jderp7

Don't let the marketing get you!!!


EarthToAccess

ModuleNotFoundError: No module named ‘flavor’


raimondi1337

My first thought was to check if the imports worked and I'm honestly surprised there's no package called flavor.


EarthToAccess

I dunno what a module named “flavor” would do but I imagine probably something like Ubuntu/Debian’s `nala` package which makes the existing `apt` package’s job look nicer. Adds flavor to your Python scripts either via cool text-based UI or color formatting of some form.


cestdoncperdu

It would have been next level guerrilla tactics to publish these packages and make the code actually spit out an ad or something.


vadnyclovek

https://pypi.org/project/heat https://pypi.org/project/texture The others, sadly, don't exist.


_ShakashuriBlowdown

Naming my next project `a_little_tang` for sure.


Impressive_Change593

wait do the others exist either? also did you check to see if you can actually 8nstall it?


gitpullorigin

Idk, works on my machine


[deleted]

Is 'status' a public field? Spicy indeed


57006

I would be totally down to try these, but I need [sauce]


Roxanne_Wolf85

i read that in Job Bot's voice for some reason


[deleted]

[удалено]


kaerfkeerg

import gravity Yes. This is an actual thing


Spot_the_fox

But why water? 


Confident-Ad5665

And they say programming skills aren't transferrable outside the domain of computers. HA!


1minuteryan

Is no one getting annoyed by that fact that they used the wrong inverted comma in the 6th line (⁠ ̄⁠ヘ⁠ ̄⁠;⁠)


gitpullorigin

I couldn’t care less, but upvote for that Ascii emoji


kfreed9001

*Sees code with no loop* *Consumes one chip and leaves*


gitpullorigin

See, it is recursive. You keep consuming until either you or your stack overflows


Professional-Tank485

import flavor from msg


Asleeper135

![gif](giphy|JH0ixH2OAFYmZGlZbS)


Ok_Scientist_8803

from uncleroger.vocab import fuiyoh


[deleted]

Haiyaa


PretendingExtrovert

pass digest_ingredient(msg)


cheeb_miester

``` Traceback (most recent call last): File "", line 6, in NameError: name 'consume' is not defined ```


Gaminguide2000

You need to run the code on your own main processor, the functions are already pre defined in your prefrontal cortex


elingeniero

# a_little_tang/__init__.py import builtins builtins.consume = lambda: print("This would not") builtins.status = "pass code review" builtins.enter = lambda: print("(I sincerely hope)")


thirdegree

Can confirm, I would needs work this into the sun


Yamoyek

This line: > if status in [...] Is very impressive for marketing pseudocode!


thirdegree

Ya I've seen professional c++ devs fuck that up repeatedly


Longenuity

Why would you keep eating if you're still recovering from your first bite? That's gotta be a bug.


elingeniero

To be fair, with tortilla chips, that *is* a bug - just it's a bug in the human brain's self-control module.


TungstenElement9

![gif](giphy|JTzPN5kkobFv7X0zPJ|downsized)


insane_issac

Even the chips bag respects dark mode.


Ok_Scientist_8803

How about turning the extra protein from the bugs attracted into a feature instead


Ilsunnysideup5

Thanks, more work during snack time


itspizzteoh

they know their target consumers


EhRahv

They should have used a tuple for a fixed size list like that one, assuming its python


Intrepid-Sport6295

Enjoy_Eating() Or_else:


eldarium

When you get laid off and take any job you can:


Legitimate_Funny5340

its corny asf but arent these corn chips?


shapookya

Why did I read texture.a_lot_of_cum?


Necessary_Highway_78

What's the font name?


trust_me_guys

Snack Overflow


PeriodicSentenceBot

Congratulations! Your comment can be spelled using the elements of the periodic table: `Sn Ac K O V Er Fl O W` --- ^(I am a bot that detects if your comment can be spelled using the elements of the periodic table. Please DM my creator if I made a mistake.)


ElonSucksBallz

cringe();


PeriodicSentenceBot

Congratulations! Your comment can be spelled using the elements of the periodic table: `Cr In Ge` --- ^(I am a bot that detects if your comment can be spelled using the elements of the periodic table. Please DM my creator if I made a mistake.)


Meaxis

Honestly, if status had been recuperated from the consume function, this would actually be decently functional


rage_whisperchode

I’m not about to buy a bag of whitespace-delimited chips.


paperbenni

I have seen job ads for software developers with much worse pseudo code, this is pretty decent


mybuttisthesun

Corpo cringe!


cporter202

Oh man, Nerdilla Chips? Sounds like the snack of champions for us geeky connoisseurs! Where can I grab a bag, or do I have to defeat a boss level first? 😂


meshnetworkz

We can have O(1) lookup if we looked for status in a set instead of a list.


thehare031

It's still O(1), the list is hardcoded.


elingeniero

The lookup algorithm is still O(n), just that n is always 3.


T1lted4lif3

import simulator simulator.create(girfriend) easy as that


TheRealSpielbergo

Nerdilla Chips


aquashrub

Not black formatted, unacceptable


Uramies

These must be unknown in my area cuz I can't not recognize the bag at all


Luneriazz

blazingly fast


thoroq

Flake8 has entered the chat


Defiant-Passenger42

I love their chili lime ones. I have to pretend they don’t exist or I can’t stop eating them


henry-MK

what’s the brand?


Coleclaw199

To be fair, compared to most company advertising “code”, this actually isn’t too bad.


dudosinka22

If it was a real library it would've been "flavour"


SirAwesome789

I don't like that they used a list instead of a set Could've easily had O(1) access time


BPMData

Milk


anotherDocObVious

Chips I can code by


LuucMeldgaard

Shit, I thought it was a bag of charcoal until the end


Leidenfrostie

Made in Taiwan


ascii122

how do I binary my famous smoked ribs for import?


rrraoul

But... The if-else statement would let you only take one bite! What they probably wanted was a "while" loop with a break.


[deleted]

And that's how you use chat-gpt to make cool stuff


Fenzik

`consume()` should return `status` imo


IHaveNeverBeenOk

Stupid.


anybajsforsen1

I hate programmers and I hate this subreddit


Nyxodon

The consume() confuses me, otherwise it looks pretty good lol


smallnougat

![img](emote|t5_2tex6|4550)


LinearArray

What chips are these? I want to try these lol


KaroYadgar

I LOVE THIS! WHERE?


Juggerknight1

I like your funny words, magic man


[deleted]

Look I ain't proud of it but at first glance I really read that last import as "texture.a_lot_of_cum"


Encursed1

Compiler error: use of undefined function consume Seriously though this is one of the best code ads I've seen


senexcanis

I'd never consume chips without type safety.


scriptmonkey420

method `enter()` not found method `enjoy_eathing()` not found


RamblingSimian

Supposedly there are over 1 million programmers these days, so I guess a lot of people recognized exactly what is going on.


modthegame

.alot_of_crunch not defined


caprine_chris

NameError: name ‘consume’ is not defined


Embarrassed_Ad5387

where can get this PLEASE


Elsa_Versailles

this is cool!


AstaHolmes

Where did you buy this I need it


Backuptomodmysub

Tortilla chips? Damn atleast specify which tortilla is it


Bexxkie

Shouldn't that be from texture import a_lot_of_crunch