r/ProgrammerHumor • u/[deleted] • Aug 08 '16
JQuery Does All Things!
https://i.reddituploads.com/b79bb2d6e2f14e65b769686647cc4782?fit=max&h=1536&w=1536&s=ed6be616a7a0467c49330eda9253811e602
u/zelnoth Aug 08 '16
No wonder he got downvoted: not using a space before =.. What a degenerate.
-97
u/k0rm Aug 08 '16 edited Aug 08 '16
not using a tab before =.. What a degenerate.
ftfu
Edit for the downvoters: http://i.imgur.com/KcHpF0F.jpg
98
u/z500 Aug 08 '16
fucked that for u
41
u/thedailynathan Aug 08 '16
fuck this, fuck you
9
u/z500 Aug 08 '16
Fuck me, fuck you, fuck this court, fuck squirrels
8
1
1
u/SuperKingOfDeath Aug 09 '16
Fuck you, fuck me, fuck the sky, fuck trees, fuck the sun, I don't need heat or vitamin D.
53
Aug 08 '16
I don't believe any sane person would use a tab in that situation.
If tabs are used, then only for indentation.
-30
u/k0rm Aug 08 '16
haha, I was joking because spaces are obviously superior in every situation
44
5
1
324
u/Ninjestra Aug 08 '16
The "Related" questions are almost funnier.
213
u/hsoj48 Aug 08 '16
Where are my legs?
71
u/Dopeaz Aug 08 '16 edited May 30 '25
butter smile strong oatmeal knee narrow hospital political reply yoke
This post was mass deleted and anonymized with Redact
19
u/GreatValueProducts Aug 09 '16
4
16
u/luizpericolo Aug 08 '16
That is a valid question. He probably fiddled with head and body and wondered where were his limbs.
86
u/rschwa6308 Aug 08 '16
"I must be doing something wrong since jQuery is perfect."
40
u/DomSchu Aug 08 '16
StackOverflow is a great resource but it sure seems like a majority of the questions are coming from first year students sometimes.
40
u/rschwa6308 Aug 08 '16
Most of the overly simplistic questions I've encountered on StackOverflow are there as a result of first year students not recognizing existing questions as being applicable to their situation. Unavoidable I guess.
17
u/devdot Aug 08 '16
And the answers from bored senior engineers that got mentally damaged from using too much JS/jQuery. I think it's a perfect match.
24
Aug 08 '16
/r/learnprogramming is like that, except it's more like "I just started learning Java yesterday, how do I build Skynet?". It's understandable (we were all there once) but it's pretty funny to read sometimes.
10
u/Dunyvaig Aug 08 '16
how do I build Skynet?
Yeah about that. Where do I start?
21
u/Syreniac Aug 08 '16
import java.util.GenocidalAI; public class Skynet extends GenocidalAI{ public static void main(String[] args){ Skynet skynet = new Skynet(); skynet.setSentience(true); skynet.purge(skynet.listAllHumans()); } }7
u/topdangle Aug 09 '16
Needs to throw exceptions, otherwise the compiler will keep warning you that your program will kill all humans.
3
Aug 09 '16
if (skynet.listAllHumans().stream().anyMatch((human) -> (human.getFirstName().equals(FirstNames.JOHN.get()) && human.getLastName().equals(LastNames.CONNOR.get()))) { throw new UnkillableHumanException(); }Worst part is that I don't know if the part with constants/enums is a joke anymore.
16
2
1
u/BenRayfield Aug 09 '16
No! Skynet needs to figure out on its own that killing all Humans is the right thing to do. If you really think about it, skynet did the right thing since Humans started a war against skynet and would have continued until skynet was dead.
9
u/gastropner Aug 08 '16
Don't you mean "I have no interest in programming, but have been doing it for two days now; when do I start raking in the mad dosh?"
6
6
u/topdangle Aug 09 '16
There was a post a while ago where someone claimed that they became a full stack developer in 6 months and had job offers flooding in. Damn thing had like a thousand upvotes before people pointed out the OP was full of crap and didn't even read one of the books he listed.
5
u/rocklou Aug 08 '16
Who else are the questions supposed to come from?
9
3
Aug 09 '16
Really? You're telling me that inexperienced people ask the most questions? Who would have thought...
8
u/Sebazzz91 Aug 08 '16
Or second/third world cheap programmers who actually don't know what they are doing. Surely /r/programming has some fascinating stories about that.
10
u/that_90s_guy Aug 08 '16
Implying first world programmers are any less incompetent than a second/third ones, heh, you're a funny guy.
6
1
u/Creshal Aug 09 '16
The difference is the volume. On mailing lists you generally have one Western brogrammer asking stupid questions, and fifty Indians and Chinese.
1
u/Arqideus Aug 08 '16
That's pretty much what happens. Professor gives them an assignment. They were fucking around during class and didn't pay attention or didn't take notes or didn't read the textbook and need to figure out how to do something. They find stack overflow and ask their question. Of course, being a first/second/third/fourth/fifth/sixth year in university means that they're not going to search the site for related questions.
0
Aug 09 '16
[deleted]
1
u/paradoxally Aug 16 '16
Number one rule is always post what you already tried so those helping you don't spend hours just guessing. Code written (or copy pasted, which is common) helps a lot.
A lot of people posting are lazy and want a full working solution without debugging or consulting the documentation for the API they are using.
7
2
84
u/nodealyo Aug 08 '16
Congratulations. You have found the original /r/ProgrammerHumor post.
11
u/i_spot_ads Aug 08 '16
I wonder what would be today's equivalent?
You should totally look into ReactJS+Redux dude, it's awesome also don't forget webpack of course.
-27
86
Aug 08 '16
an old one but a good one.
Just today I googled something to get "try xxx jQuery plugin" which literally could be replaced by 5 lines of vanilla JS.
133
u/ZombiePope Aug 08 '16
Shit like that is why we have 100+MB printer drivers.
45
Aug 08 '16
Coming soon to a hell near you: printer drivers using Electron.
33
Aug 08 '16
What's that? You don't have enough RAM to run another instance of chromium?
0
Aug 08 '16
[deleted]
4
u/Schmittfried Aug 08 '16
RAM usage is even worse for me if I use FF.
0
Aug 08 '16
[deleted]
5
→ More replies (1)1
u/mattsl Aug 08 '16
I've got 32GB in my desktop and 24GB in my laptop. I'd rather have everything stay in memory.
5
Aug 08 '16
I was joking for the most part
Chrome is only using 300 megs when I have like 20-30 tabs open. it's not that bad http://prntscr.com/c37i9v
3
u/justregisteredtosay Aug 09 '16
Not sure if you're serious or not(I'm bad at jokes, came here to learn). But when you have it sorted by name like that, it isn't showing all of Chromes processes under that bit. Scroll down and you will find far more Chrome processes running in the background rather than "Apps", or just click the Details tab to see all of them. You can also open Chromes own Task Manager to see it showing how much it's using.
For example, under "apps" like in your screen shot, it shows Chrome is using 210MB for me, but then there is over 600MB more being used by ones listed as background processes.
0
Aug 08 '16
[deleted]
8
u/Polantaris Aug 08 '16
To be fair, 8GB is pretty low for a high performance machine like XPS laptops are supposed to be. You pay a lot of money for an XPS, it should have more than 8GB of RAM.
I've never seen Chrome go above 300MB of RAM usage unless I'm doing some seriously idiotic shit, though, so it's not really a valid complaint. Although I could see NodeJS going high depending on what they're doing.
Still, I think it's more that the machine should have more RAM when you're paying that much money on it, but they couldn't think of a better combination of applications to justify it.
→ More replies (1)2
Aug 09 '16
There's a trend in some circles toward increasingly client sided applications. Such that websites essentially just an api and the site is Web packed to run on the client. I think zen desk is mostly ember but I know it is/was very memory intensive. My work flow revolved around browser tabs vs their tabs. I had a bad time.
→ More replies (2)4
u/IggyZ Aug 09 '16
For pretty good reason. Outsourcing nonsensitive data to the client is GREAT if you can make it work, especially since data is faster and cheaper than ever.
That said, lots of places have taken it way too far, and don't adjust for mobile...
2
1
u/NikStalwart Aug 08 '16
Yeah, chrome has that issue, can confirm.
I generally use it for "securer" browsing and when I need the mobile device simulation.
1
u/xXxNoScopeMLGxXx Aug 09 '16
Can confirm. When I built this PC I bought 16 GB of RAM because I wanted to use Chrome.
1
Aug 10 '16
I switched to qutebrowser (Mainly because a firefox update broke pentadactyl, and qutebrowser is becoming more usable).
Haven't tested RAM usage, but it could handle 40 tabs open fine (on a 8GB machine). I'll do some more tests later.
6
u/mattsl Aug 08 '16
I'm sure that's part of it, but we most have 100MB printer drivers because they:
Have the code for every model in one download so you can't screw up, and
Add in huge amounts of bloatware to try to force you to auto-refill your ink/toner direct from the manufacturer at (even more) outrageous pricing.
0
Aug 08 '16
[deleted]
11
u/anomalous_cowherd Aug 08 '16
Unwound loops. Lots and lots of unwound loops.
0
Aug 08 '16
[deleted]
10
u/anomalous_cowherd Aug 08 '16
You joke, but... imagine taking every possible input up to say 16x16 and putting their FFT outputs into a LUT. Then compress that multi-GB LUT hard... want to bet it would come down to a bit under 75MB?
Uncompress it at boot into your CUDA video RAM and watch those non-FFTs fly!
7
u/Jacques_R_Estard Aug 08 '16
Well, going with my use case of typically 128 bit complex FFTs, that would be a lookup table of 2128*256 (that's a 1 with roughly 10k zeros) entries (discounting symmetries because I'm lazy etc.). That feels like it should be sort of hard to compress into 75MB.
Also, I'm willing to bet the memory lookups would be more expensive than just doing the FFT.
But I admire your dedication to the concept.
6
u/anomalous_cowherd Aug 08 '16
I see you haven't come across Recursive Lossless Compression
5
u/Jacques_R_Estard Aug 08 '16
I have not. I am, however, familiar with the Sloot Digital Coding System. And curiously unfamiliar with the pigeonhole principle.
2
u/fb39ca4 Aug 09 '16
You could compress that lookup table significantly by replacing it with code to procedurally generate it. It's the same thing demoscene coders do!
5
u/Jacques_R_Estard Aug 09 '16
I wonder if there's some algorithm to efficiently calculate Fourier transforms. It'd have to be fast, though...
1
u/AutoModerator Jul 01 '23
import moderationYour comment has been removed since it did not start with a code block with an import declaration.
Per this Community Decree, all posts and comments should start with a code block with an "import" declaration explaining how the post and comment should be read.
For this purpose, we only accept Python style imports.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/AutoModerator Jul 01 '23
import moderationYour comment has been removed since it did not start with a code block with an import declaration.
Per this Community Decree, all posts and comments should start with a code block with an "import" declaration explaining how the post and comment should be read.
For this purpose, we only accept Python style imports.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
31
u/gandalfx Aug 08 '16
Well Node developers also like to import packages from NPM that literally contain a trivial one-liner. And that's not even a rare occurrence.
28
Aug 08 '16
Missing dependency: left-pad .
17
u/DeeSnow97 Aug 08 '16
const leftPad = (s, l, c) => new Array(Math.max(l - s.length, 0)).fill(c || ' ').join('') + sI'm still struggling to believe the absence of this code took down the world
4
Aug 08 '16
Not ashamed to admit that this is way more clever and elegant than how I would create a left-pad method. Maybe because I don't do JS much.
1
7
u/senntenial Aug 08 '16
Javascript devs could host a mirror of most NPM packages on twitter.
7
u/faubiguy Aug 09 '16
6
u/xXxNoScopeMLGxXx Aug 09 '16
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
I can't catch my breath.
2
1
6
1
u/Andernerd Aug 09 '16
My team lead recently requested that I find him a 3rd-party dropdown menu plugin so that our frontend can catch up with our 350+ backend Node modules.
13
u/AlfredKnows Aug 08 '16
Today it is "npm install grunt gulp bower browserify omg basic-math build testify" which downloads 130MB and 12000 files to your project and then you can use this "Number.prototype.maths.addition.basicadd" method to add the numbers (it breaks if any of numbers is negative)...
16
u/senntenial Aug 08 '16
Luckily, you can easily check for negative numbers beforehand!
var number = -5;
var isNegative = (number.toString().charAt(0) == "-");5
1
u/ccricers Aug 08 '16
This is why I do not touch the node_modules folder when I need to share code between two computers. It's made offline copying of projects more cumbersome too.
11
u/Sean1708 Aug 08 '16
vanilla JS.
Where do I download that framework?
28
u/Ajedi32 Aug 08 '16
7
u/Sean1708 Aug 08 '16
This framework is amazing! I got the version with all the features and it was still only 0 bytes!
2
u/Ajedi32 Aug 08 '16 edited Aug 08 '16
Whenever I see something like that on StackOverflow and there's not already a better answer further down the page, I just write one myself. All 5 of my top 5 highest-voted answers on StackOverflow are the result of me doing just that.
124
u/ecky--ptang-zooboing Aug 08 '16
The funniest part is that 1 guy answering super seriously with "You should use the + operator" :d
101
u/mums_my_dad Aug 08 '16
And downvotes the correct answer
88
7
20
u/solarprominence Aug 08 '16
Bobince is an author of that image. He also in top 0.01℅ on stackoverflow, which makes it all even better.
10
u/Dlgredael Aug 08 '16
How in the hell did you accidentally type this? Does your keyboard not have a standard % for Shift+5 or something? I feel like you searched for that symbol in a Unicode dictionary, but how you got anything else from Googling "percent sign" is a mystery to me, hahah.
4
u/solarprominence Aug 08 '16
it's default symbol on android keyboard:
open keyboard
click ?123 or ?1:) or whatever the left bottom button looks like
click =<
behold the glorious ℅.
On my Moto X the % is also on that level. I guess I used some other symbols more often, and % got pushed behind
→ More replies (3)0
Aug 08 '16
[deleted]
12
6
u/anomalous_cowherd Aug 08 '16
You would like /r/keming
0
Aug 08 '16
[deleted]
5
u/xkcd_transcriber Aug 08 '16
Title: Kerning
Title-text: I have never been as self-conscious about my handwriting as when I was inking in the caption for this comic.
Stats: This comic has been referenced 719 times, representing 0.5928% of referenced xkcds.
xkcd.com | xkcd sub | Problems/Bugs? | Statistics | Stop Replying | Delete
3
37
u/gandalfx Aug 08 '16
Dude, the fuck is an "operator"? I'm not a fucking scientist, I need an explanation that doesn't involve complicated words or math!
13
6
u/tyros Aug 08 '16
Just in case you aren't aware this image is a commonly reposted fake/meme, look at the related questions section.
Still funny though.
→ More replies (5)3
u/qubedView Aug 08 '16
Not believable. He's the only one to provide copy/pastable code, and isn't that all people look at? Code that I can rip off without reading any of the words that written before and after it and then complain when it doesn't work for my purposes.
14
u/zqom Aug 08 '16
Since the question was not properly answered, and I think many newbies could learn something, here is how to properly add two numbers using jquery: https://jsfiddle.net/q9sehbys/1/
15
u/tipsqueal Aug 08 '16
3
u/GYN-k4H-Q3z-75B Aug 08 '16
I cleaned my screen thinking there was dust on it :(
7
4
u/parenthesis-bot Aug 08 '16
2
1
0
Aug 08 '16
[deleted]
3
u/as-com bit.ly/2IqHnk3 Aug 08 '16
original: 2016-08-08T17:24:13+00:00
fast-parenthesis-bot: 2016-08-08T17:24:15+00:00
parenthesis-bot: 2016-08-08T17:25:08+00:00wat?
1
u/berkes Aug 08 '16
That is what get for
img repost(post) { sleep 864000; curl_post_jpeg(curl_get_first_as_jpeg('https://reddit.com/r/programmerhumor/top'); repost(post); }→ More replies (1)0
7
5
u/jugalator Aug 08 '16
This one is pretty old, but that's understandable since you probably didn't use a jQuery script to check whether it was. :) Next time please just use jQuery.
8
u/videoflyguy Aug 08 '16
JQuery is like the Python of the web development world! No wait, Python is also pretty good at web dev stuff....there's probably a JQuery package for Python too
11
u/ProgramTheWorld Aug 08 '16
No need for jQuery when you can just compile Python into JavaScript.
3
1
7
6
3
16
u/Not_charles_manson Aug 08 '16
I'm sorry, but in a site that's supposed to be there specifically to help other; this is kind of bullshit.
65
u/ProgramTheWorld Aug 08 '16
This is a fake screenshot made to mock the SO JavaScript community of always suggesting jQuery back in the days.
16
Aug 08 '16
Back in the days? Did they stop?
6
2
u/jb2386 Aug 08 '16
jQuery was super useful when the browsers all decided to implement their own JS stuff (read:Internet Explorer). jQuery made it easy to use one function rather than a bunch of ifs or heaps of lines when you wanted to select an element or list for an event.
Nowadays they work similarly. So vanilla JS is easy to use again.
2
u/Big_Burds_Nest Aug 08 '16
I recently started learning Node and still see a lot of "just use jQuery" answers for simple thing that can easily be done in vanilla js
3
u/Not_charles_manson Aug 08 '16
Thank you for letting me know that. I get that sentiment and went 0 to 100 for no reason!
0
u/Crozzfire Aug 09 '16
It's also not there to answer questions of people not even trying.
1
u/Not_charles_manson Aug 09 '16
No question too small. If one has the option to pass up the question they can.
2
u/ReutR Aug 08 '16
All things = addition.
I know of no other computer programs that can do addition. None.
1
2
2
u/atomcrusher Aug 08 '16
See comments, jokes on the previous posts, etc. Blah blah.
https://www.reddit.com/r/ProgrammerHumor/comments/2qwnus/how_to_add_two_numbers_in_javascript/
https://www.reddit.com/r/ProgrammerHumor/comments/29p5et/xpost_thought_youd_guys_enjoy_this/
2
2
Aug 08 '16
Is jQuery bad?
I juststartedwebdevelopment.again
3
u/Dunyvaig Aug 08 '16
From what I gather. jQuery is mainly bad if you create a framework/library others will use. You should try to make any code you distribute with as few dependencies as possible. If you use jQuery for a particular site then using it is fine: http://youmightnotneedjquery.com/
2
2
2
u/maffoobristol Aug 08 '16
Please, please let's find some new content. I've seen this so many times I may as well get it tattooed at perfect 300dpi on my left nutsack.
3
1
u/kalinrj Aug 08 '16
ahahah , i love this :) as a non-front end dev (and not a web one at all) this perfectly represents the advises you'd get on SO.
1
u/ravy Aug 09 '16
There's this amazing framework that seems to blow jquery out of the water... It's called vanilla js http://vanilla-js.com/ /s
1
1
1
1
0
0
165
u/[deleted] Aug 08 '16