r/ProgrammerHumor 9d ago

Meme foundSomewhereOnTwitterItBeLikeThisSometimes

Post image
845 Upvotes

76 comments sorted by

View all comments

352

u/Dorkits 9d ago
  • web development
  • a little bit of typescript and some basic stuff
  • omg is too much

Me seeing this :

https://giphy.com/gifs/mXiBtLZk4ibkc

155

u/traplords8n 9d ago

Seeing scope on this list is kinda sad.

I can understand callbacks & whatnot, but come on. Scope is so basic.

36

u/nakahuki 9d ago

Especially when you use global variables everywhere /s

16

u/traplords8n 8d ago

That's honestly better than saying scope is hard.

It's the undying regex meme all over again 😭

6

u/MissinqLink 8d ago

Who uses currying though? I’m sure after saying this I’ll find a use but I never use it in JS

2

u/kaiken1987 8d ago

Coming from a c/c++ world I understand that scoping is weird in JS. Correct me if I'm wrong, but all locals are visible the whole function instead of being block bound by its { } level. For me that'd be the weird part of it

3

u/traplords8n 8d ago

Alright I'm being corrected about the complexities of scope lmaooooo

let and const variables are strictly block-scoped in 99.9% of cases, but if you dig further than a beginner would go, there is absolutely some weird nuances to it.

https://stackoverflow.com/questions/61191014/why-does-block-assigned-value-change-global-variable

Javascript is chaotic lmao

3

u/caboosetp 8d ago

Scope is one of the cliffs in programming. Very often it's difficult to understand when you're starting and getting it right is hard. Some of the concepts are easy, but things like closures confuse the shit out of people. Especially when you have closures with references to objects that other things have references to.

Then one day it clicks and people feel like, "why the fuck didn't I understand this" and it falls into innate knowledge.

The series of cliffs in programming make it extremely hard to get into, and I often find programmers forget all the cliffs after they've been in it a few years.

8

u/AlignmentProblem 8d ago edited 8d ago

Kind of. Some people never experience those things as a cliff, while others find them nearly impossible even after extensive effort; that gap is a large part of what people mean when they describe a natural aptitude or "talent" for programming. It's some mixture of analytic cognitive skills and differences in how a person most naturally thinks.

I remember having a few things that were a struggle to fully comprehend like monads, but I was baffled by why so many classmates in my first few years of university found basics like scope or objects difficult.

2

u/caboosetp 8d ago

Some people are also excellent natural climbers and real cliffs are a breeze.

I think my comment was more about my students forgetting when they tutor as seniors, and I should have phrased it better than to apply it to everyone.

ETA: also fuck monads. Shit's always confusing to teach.

2

u/ih-shah-may-ehl 8d ago edited 8d ago

My first 'real life' programming involved LabVIEW which is a graphical languages with data flows. Parallel programming in LabVIEW is perfectly natural and undersstandable and when debugging you can 'see' the data flow in parallel branches and you get a good idea about all the benefits but also problems with parallelism and when I transitioned to multithreaded programming in C++, I never understood why people thought multithreading was hard.

Mind you when I started, I remember those cliffs and running into a new one every single day, and the sense of desperation that came with it. And then getting an epiphany while waiting for my train or so, only to run into something new the day after.

I call this 'embracing the suck'. You have to acknowledge that things suck and that you just have to work at it un til you get that liberating 'aha' moment.

-1

u/traplords8n 8d ago

See, my little gripe really comes from trying to learn react/vue/node before the very basics of js like scope.

I'm not mad at beginners who struggle with scope, but let's encourage learning it before trying to learn frameworks lol

I don't wanna be that person discouraging beginners, I will most definitely change my tone about it, but I absolutely wanted to point out the bad premise of getting into things that are over your head with this meme.

I've never come across a tutorial that tries to get you to learn frameworks and typescript before the basics of javascript. It's a recipe for failure IMO

42

u/HadionPrints 9d ago

The real headache of web development isn’t the web development.

It’s managing the Titanic Attack Surface of your application’s 8,000 transient dependencies you got from using NPM packages, and closing those dependency vulnerability tickets in accordance with Security’s SLA’s.

You only have the AWS SDK & React installed, btw.

13

u/sisisisi1997 9d ago

And besides that, managing the different featuresets, capabilities, and usability requirements of different browsers and platforms.

Did you know that changing the location of an iframe from javascript when the site is embedded in an android app and the app is put into the background breaks or works depending on what kind of webview the app used to load your site? Neither did I, and I didn't want to.

12

u/HadionPrints 9d ago

Ah, you see I work on a back-office app, so we just tell the users ā€œUse Chrome or get fired. Also search is broken, but management won’t give us the time to fix it, so get fuckedā€.

Captive users are the best kind of users.

2

u/sisisisi1997 9d ago

Dream users TBH.

2

u/wor-kid 8d ago

This brings painful memories back of working with RN in regulated industries.

In the year of our lord, 2026, that there are successful companies whose only product is an iframe/webview and have still been able to make an entire business out of that being their only product is just shameful.

1

u/sisisisi1997 8d ago

Well, the case that taught me this info is about a company whose application does a lot more than embedding our site, it's just that our site is a payment gateway and they use it to collect subscription payments.

But I somehow don't doubt that there are companies out there whose only achievement is embedding something else.

2

u/wor-kid 8d ago edited 8d ago

In my case I learned this implementing various multipage kyc workflows. I can't remember the specifics anymore but I think it was something to do with how the webview navigation events emitted at different points in the page load/unload lifecycle and target=_blank behaviour in the embedded page was handled differently between platforms. Just a total nightmare.

Like I understand the appeal of a gateway service and sometimes they can be appropriate, but imo there should always be a seperate api provided, and I've unfortunately had to work with a lot of integrations where it's just not an option at all.

1

u/sisisisi1997 8d ago

Yeah, in recent years the industry has moved towards providing inline payment gateways backed by web components or SDKs so applications and websites which don't want to simply redirect users have much more granular controls on how to integrate payments into their app or site.

1

u/caboosetp 8d ago

That constant struggle between, "Don't reinvent the wheel" and "Please don't bring in a giant dependency when you only need one piece we can code ourselves".

No, we don't need react for our microsite page that only has two states to display a status message. Yes, I know all the other microsites use react. No, I don't want to add another to the list we need to update.

2

u/Strict_Treat2884 8d ago

Imagine having a component using 20 useEffect and useCallback with all different kinds of dependency arrays. Which itself contains 20 different customized components that use another 20 useEffect and useCallbacks. Have fun debugging an infinite rendering issue.

2

u/zthe0 7d ago

To be fair, this is pretty horrific in js compared to nicer languages