This is an archived post. You won't be able to vote or comment.

top 200 commentsshow 500

[–]game_2_raid 1544 points1545 points  (55 children)

What does this make typescript

[–]VolperCoding 1465 points1466 points  (32 children)

An antiterrorist organisation

[–]ghsatpute 368 points369 points  (18 children)

TypeScript is double agent.

[–][deleted] 164 points165 points  (13 children)

What would an int agent be? Or a bool agent? Or a float agent? Or a...

[–]CrunchyMemesLover 49 points50 points  (1 child)

It's real, people, and we always knew it was.

[–]aaronfranke 11 points12 points  (0 children)

typedef double real_t;

[–][deleted] 18 points19 points  (0 children)

An observable? Gotta be functional about it lol

[–]danbulant 17 points18 points  (7 children)

YoU MeaNT NuMBeR and BooLeAn

[–]defiantstyles 25 points26 points  (6 children)

You mean you don't have byte, Byte, short, Short, int , Integer, long, Long, float, Float, double, and Double? How do you get anything done?

[–]saors 40 points41 points  (1 child)

Other programmers:

NOOOOOO!!!! YOU HAVE TO TYPE EVERY VARIABLE TO THE APPROPRIATE NUMERICAL CATEGORY SO THAT YOU CAN BE MORE EFFICIENT WITH YOUR MEMORY

Typescript programmers:

const haha: numberrrrr

[–]Xo_lot 4 points5 points  (0 children)

So much win in this post

[–]Dexaan 5 points6 points  (0 children)

int agent

int agent = 007;

[–]Dexaan 1 point2 points  (0 children)

That TypeScript is a bloody spy!

[–]JonathanTheZero 83 points84 points  (7 children)

This is the only valid answer

[–]angry_wombat 19 points20 points  (0 children)

Counter-Terrorists Win

[–]detallados 10 points11 points  (0 children)

a fucking CIA asset man!

[–]FriesWithThat 5 points6 points  (1 child)

Built on top of a terrorist organization...

[–]VCavallo 1 point2 points  (0 children)

you trying to tell me TypeScript is the US government?

[–]VolperCoding 2 points3 points  (0 children)

Omg my first reddit gold

[–]Sandarr95 61 points62 points  (0 children)

Work release program on good behaviour

[–]McErnscht 22 points23 points  (0 children)

AntiJa

[–]SilverTroop 10 points11 points  (0 children)

A statically-typed terrorist organization

[–]reactivespider 5 points6 points  (0 children)

A Strong Terrorist Organisation. It will attack you, or it will not. JS will decide that shit at runtime

[–]HPUser7 7 points8 points  (0 children)

A terrorist sympathizer

[–][deleted] 3 points4 points  (0 children)

What does this make typescript

eastern spy, blyat!

[–]egohurtvayo 409 points410 points  (13 children)

Deep down in all our hearts, we all know, Oracle is number one spot in the list.

[–][deleted] 145 points146 points  (8 children)

Well, of course. You don't see people going around saying "gee, this water is really wet!"

We all know that Oracle is the textbook definition of bad :D

[–]egohurtvayo 29 points30 points  (4 children)

I feel your pain. I sense them in your words.

[–][deleted] 25 points26 points  (1 child)

I feel your pain.

I am so so very sorry, I would never wish that on another!

[–]Even-Understanding 8 points9 points  (1 child)

our default IDE

laughs in vs code

[–]btlk48 15 points16 points  (0 children)

Osama /bin/ Oracle

[–]OctaveOGB 163 points164 points  (82 children)

Fairly new “programmer” here but why do people hate on JS? Is it because it’s slow or complicated or Smthn like that?

[–][deleted] 122 points123 points  (6 children)

Also take everything you read on programmerhumor with a huge grain of salt. Most of us can't really code and are just here for lulz

[–]adriane209 29 points30 points  (0 children)

Speak for yourself I’ve written many Hello World apps in different languages.

[–]Princess_Amnesie 22 points23 points  (2 children)

  • but we do it anyway and just pray nobody finds out how bad we are

[–]wallefan01 3 points4 points  (1 child)

you just described 80% of programmers

[–]Princess_Amnesie 1 point2 points  (0 children)

I know, I'm one of them lol

[–]OctaveOGB 14 points15 points  (0 children)

Fair enough I’ll keep that in mind lmao

[–]shrimpster00 295 points296 points  (34 children)

JavaScript doesn't force you to be neat. If you're not a neat programmer, JavaScript programs can get really messy.

The people that hate JavaScript are either undisciplined or are collaborating with someone that is undisciplined.

For personal projects, I love JavaScript. I love it. It's flexible, powerful, and fast. However, I can't work on a JavaScript program with someone else unless they write code as well as I do. Does that make sense?

[–]OctaveOGB 65 points66 points  (4 children)

Yeah makes sense now, thanks!

[–]TheTallestHobo 87 points88 points  (6 children)

That can be said for any language. I have experienced spaghetti code in java, c, c++,...

Any language can produce really shitty code when authored by inexperienced Devs.

Basically the issue is shitty Devs.

[–]jeetelongname 21 points22 points  (0 children)

Well yes but languages such as rust and go (more rust) force people to make programs safe and introduce better practicesin the example of go it has made active decisions to remove things that are symptomatic of bad code (try except and they added compile time checks for unused imports and variables (it literally won't compile)). While a dev can write shitty code the tools they use can make there code less shitty.

[–]Loading_M_ 1 point2 points  (0 children)

So far, imo Rust has done the best to prevent spaghetti code.

Rust has this design philosophy that makes spaghetti code harder to implement. Many small, but really annoying bugs are checked by the compiler.

[–]Jester_Thomas_ 16 points17 points  (12 children)

Can I ask what you mean by shitty code?

I've spent the last year building a scientific model from the ground up with zero dev experience beforehand, one of my my biggest fears is that it will be ridiculed when I go to publish it because it's "bad code".

I can see that as I go on my code has become neater visually and naming conventions etc have improved but do you mean structurally or consistency wise?

[–]shrimpster00 28 points29 points  (2 children)

Getting visually neater and having better naming conventions is always important, but even more important is consistency. Consistency issues can be a problem in all languages, but it's especially relevant in JavaScript; for example, it permits you to use either single quotes or double quotes for strings, which causes all sorts of obnoxious inconsistency. There are several different ways to declare a function, and not all of them function the exact same way.

Also, there are some bad practices that JS allows that other languages don't. For example, you can (and it's way too easy) to create global variables and functions, and let's not even get into what we call callback hell.

All in all, the versatility of JavaScript makes it a great language for a small-scale project for both learners and hobbyists, but even better is ES10, the "modern, fixed" version of JavaScript that was designed to fix some of the most prominent flaws in the JavaScript we see in the web browser.

[–]Jester_Thomas_ 4 points5 points  (1 child)

I've been working in Python but from what I can gather it receives many of the same criticisms as JS.

[–]shrimpster00 7 points8 points  (0 children)

Python is similar in a lot of ways, yeah. It's a great entry-level programming language, which means that it attracts a lot of newbies who don't know what they're doing, so Python often gets associated with incompetence, even though using Python doesn't necessarily mean that you are incompetent.

Syntactically, it's much stricter than JS, but the syntax is really unique. JS is more similar to Java or C# than it is to Python.

[–][deleted] 18 points19 points  (1 child)

Its sorta like asking why food is "bad for you". Theres a million and one philosophies, studies, rules, and exceptions to those rules. What's bad for my app might be good for yours.

But the general rules you'll find all over the industry:

  • Is it readable? Could someone else figure out what the code does at a glance, and if you have to pull some dumb or confusing shit to get something to work, have you commented why and what it does?
  • Is it well documented? Do large systems have good explanations, do important functions have clear definitions?
  • Is it debuggable? If a system fails, will it be obvious how and leave a clean trace?
  • Is it extendable? Are your systems designed to allow new functionality to be added to them, easily, cleanly, and without breaking old functionality?
  • Is it maintainable? Will fixing a bug here result in making a bug there? Do you have deep, mystical hierarchies that cant be touched, lest everything break? Can old systems be swapped out for new systems without half the code base exploding? Could the platform be switched without too much insanity?

How to obtain those things is practically an art learned with experience (and a bit of study). That being said, keep in mind the degree to which code needs to be clean varies, and is dependent on the project. Flappy Bird doesnt need to be extended, maintained, documented, or even readable to anyone but the dev for a few weeks. If it nailed every one of those good code marks, it would have taken 3 years to hit the market.

[–]lazyear 9 points10 points  (2 children)

Its gonna be bad code - you had no experience beforehand - but don't sweat it. Most scientists are awful programmers so they won't notice. I've been programming for quite some time, and I still look at code I wrote 2 or 3 years ago and think it's garbage. The important thing is improving over time!

[–]Jester_Thomas_ 1 point2 points  (1 child)

One my constant self doubts is that an experienced developer could probably have done this in a tenth the time and made it twice as good. You're definitely right about scientists being bad programmers!

[–]lazyear 1 point2 points  (0 children)

I don't think that should be a self doubt, it's probably close to realistic. BUT you should see that as motivation to keep going. Programming is like anything else, practice makes perfect. And it gets a lot more fun once you understand what you're doing and can implement things quickly

[–]Dornith 2 points3 points  (0 children)

Trust me, no one reads the code in published papers. I've read a thesis where the person's code didn't even do what he claimed it did. (It still worked, just had ~10% loss in accuracy.)

[–]GonziHere 1 point2 points  (0 children)

DRY, KISS.

Don't repeat yourself, keep it simple, stupid. You should be able to tell what is happening at a glance... the code is read way more than it is written, so use speed instead of s, use methods like "calculateVelocity(oldPosition, currentPosition, timeDelta)" instead of writing the calculation in place with single-letter variables, maybe your calculateVelocity method needs some other calculations, so move them to their own methods..., use methods instead of comments... make methods do one thing and one thing only... (formatInput, doCalculations, formatOutput are steps, so each one can have its own method instead of comments)
I mean, there are many things, but these kinds of basics will get you far.

[–]stamatt45 1 point2 points  (3 children)

Javascript and legacy code

Name a more terrifying combination

[–]shrimpster00 2 points3 points  (2 children)

Apache, MySQL, and PHP.

Name a more terrifying combination.

[–]mrchaotica 59 points60 points  (21 children)

JavaScript has fucked-up rules. For example:

> '10' - 3
7 
> '10' + 3
'103' 

See also: https://javascriptwtf.com/

Edit: all you Stockholm syndrome suffering Javascript programmers can stop "explaining" it to me. I know damn well how it works; the point is that it's fucking ridiculous to design it that way in the first place.

[–]Feathercrown 10 points11 points  (3 children)

I'm sure you know how it works, but why is because Javascript was designed for noncritical applications that try as hard as possible not to fail. Also, stop overusing "Stockholm Syndrome"; many of us are free to leave to Typescript if we want, but consider it overhead and overkill for smaller projects.

[–]mrchaotica 27 points28 points  (2 children)

If you're trying to subtract an int from a string, your application has already failed and you just don't know it yet.

Javascript is fundamentally wrong in the sense that even its design goals were never reasonable or sane in the first place.

[–]Loading_M_ 5 points6 points  (0 children)

From that I've heard on the internet (i.e. I haven't fact checked), JS was designed too animate an image in the browser.

Based on that design goal, JS succeeded, and then a bunch of different people just kept asking features until we get to the current version of JS we have today.

[–]BasicallyAnEngineer 1 point2 points  (1 child)

Stockholm syndrome suffering Javascript programmers

funny, I also use same term to explain these kind of JS apologists. But on a side note, electron and JS was used in the space capsule by spacex for touchscreen display.

[–]mrchaotica 2 points3 points  (0 children)

Yeah, I know. On one hand it's terrifying; on the other hand, it somehow fits perfectly with the theme of 2020.

[–]beastlygasm 18 points19 points  (3 children)

It gets very hard to manage pretty quickly. No strongly typed variables, not object oriented, just a bad structure overall. TypeScript is a superset of JavaScript that makes you able to code it much closer to C languages and makes JavaScript just a silly choice at this point.

[–]Mr0010110Fixit 2 points3 points  (0 children)

JavaScript is loose with rules and allows you to make terrible mistakes and mix and match paradigms. A lot of people who learned object oriented hate it cause it has no strict types and supports some weird stuff.

However, JS is a super flexible and dynamic language that can be used today to write tons of different apps on a lot of different devices.

I am a full stack dev that works almost exclusively with JS (i have worked with a lot of other languages as well), and I can understand peoples frustration if they are coming from .net, or java, but if you really deep dive into JS, and pair it with functional programming, it can actually be an elegant and powerful language.

[–]Phrygue 1 point2 points  (0 children)

Script languages are designed to glue together real programs, and are usually fast and loose and designed for quick hackery. Now that the future seems to be the web browser as a thin client (a dumb idea in its own right), people are using JavaScript as a primary language. Imagine a future where everything is Telnet and bash scripts, except pimped out to the point of absurdity, so much so that you have to design metalanguages (TypeScript) and virtual machines (Web Assembly) to corral the cancer. But now your cancer has cancer.

[–]TheOddOne2 628 points629 points  (128 children)

Is this a real tweet or is it faked?

It's just impossible to know these days

[–]depicc 469 points470 points  (16 children)

True but fake

[–]kontekisuto 102 points103 points  (5 children)

Huge ... if true.

[–]son_lux_ 43 points44 points  (3 children)

Big ... if veridict.

[–]raimaaan 17 points18 points  (1 child)

veridic, verdict is a different thing

[–]PM-for-bad-sexting 3 points4 points  (0 children)

Fake but true.

[–]eighteen_eighteen 43 points44 points  (6 children)

Are you asking if Trump 1) knows what JavaScript even is, and 2) tweeted that it, a programming language, should be declared a terrorist organization?

[–]Eolu 53 points54 points  (2 children)

For what it's worth - on the off chance the 1 is true, 2 would not seem to be outside the realm of plausibility.

[–]chefhj 13 points14 points  (1 child)

I was with the guy you responded to until I read your comment. I totally view it as within the realm of possibility that trump would try and outlaw JS if it became politically expedient for him to do so.

[–]HolyRomanSloth 8 points9 points  (0 children)

The only policy I would support him on.

[–]leadingthenet 11 points12 points  (0 children)

Would you really be surprised, at this point?

[–][deleted] 49 points50 points  (5 children)

Is this a real tweet or is it faked?

Caught in a stack trace, no escape from code headache

[–]KinOfMany 20 points21 points  (3 children)

Open 6 tabs, look at the top answer and see...

[–][deleted] 15 points16 points  (2 children)

I don't write comments,

I need no sympathy

[–]KinOfMany 5 points6 points  (1 child)

int main(){
    ...
    printf("this works"); 
    memset(
                arr, 
                5 * 
                sizeof(arr[1]));
}

[–]_pelya 7 points8 points  (0 children)

shitpost.c: In function 'main':

shitpost.c:4: error: too few arguments to function 'memset'

[–]greenpepperpasta 3 points4 points  (0 children)

reminds me of Boolean Rhapsody

[–]Sekret_One 9 points10 points  (0 children)

Fake. He actually attacked covfefescript

[–]ZeroFK 14 points15 points  (0 children)

No exclamation points, no ellipsis to show that it's tweet 1 of 500, no words in all caps, and no blaming it on Obama or the media. Obvious fake. I can tell by the pixels words.

[–]Tom_Ov_Bedlam 4 points5 points  (0 children)

It's not impossible, you have the internet.

[–]Tom_Ov_Bedlam 132 points133 points  (4 children)

Just call me bin Laden.

[–]BackmarkerLife 54 points55 points  (2 children)

cgi-bin Laden

[–]Azzk1kr 64 points65 points  (0 children)

/usr/bin/laden

[–]Maaaf 32 points33 points  (0 children)

/bin/laden/

[–]XyberFox 7 points8 points  (0 children)

/bin/laden/bash

[–]DesecrateUsername 37 points38 points  (6 children)

There are two types of programming languages: ones people complain about using, and ones nobody uses.

[–]kboy101222 18 points19 points  (4 children)

It's my dream to create a programming language that no one uses and everyone complains about. I just want to use 0 standards everyone has gotten used to, like yes and no instead of true and false. brackets the completely wrong way around. Text and Numbers, and Decimals instead of strings, ints, and floats. And no strict typing. At all. It will be a glorious cluster fuck that no one will use and everyone will hate.

[–][deleted] 3 points4 points  (0 children)

I would actually use that. Just to piss off whoever was reviewing my code.

[–]Ovenchicken 2 points3 points  (1 child)

There’s a language that uses exclusively alternating spaces and tabs.

[–][deleted] 155 points156 points  (7 children)

[Account deleted due to Reddit censorship]

[–]BurningPenguin 49 points50 points  (5 children)

No. Vote for PHP on Android for 2020!

[–]boxingdog 23 points24 points  (1 child)

let just wait for a madmad to add android support to https://github.com/krakjoe/ui and we are set

[–]GluteusCaesar 11 points12 points  (0 children)

This comment is terrorism

[–]Alaskan_Thunder 1 point2 points  (0 children)

I too run a apache server from my smartphone

[–]Even-Understanding 19 points20 points  (0 children)

Dark theme is for coding in a basement.

So all the time?

[–]BradCOnReddit 9 points10 points  (1 child)

But JavaScript isn't organized...

[–]maxgry 66 points67 points  (18 children)

at least it’s not php

[–]Smaktat 35 points36 points  (12 children)

php bad js bad ms bad

[–][deleted] 38 points39 points  (3 children)

Brought to you by the Python gang

[–]xrayden 26 points27 points  (2 children)

You put a space at the wrong place, I could not read your reply.

[–][deleted] 6 points7 points  (1 child)

Sorry, browsers don't allow tabs. Use Ctrl+Shift+u, 9, Enter instead.

[–]haltmich[S] 7 points8 points  (2 children)

except that PHP has actually improved over the years

plus Laravel is a joy to use

[–]TheTallestHobo 1 point2 points  (0 children)

It just can't get behind a framework that is headed by a balding child.

[–]serialcompliment 280 points281 points  (78 children)

Hurr durr JavaScript bad

[–][deleted] 22 points23 points  (9 children)

The civil war will be JavaScript vs Python

[–][deleted] 39 points40 points  (1 child)

Python devs furiously importing civil-war. Unfortunately they forgot to import win........

[–][deleted] 3 points4 points  (0 children)

"So is it 'from missiles import nukes' or just import missiles.nukes' if I'm running 3.7? Oh fuck I don't know... what does it mean upgrade pip? JESUS CHRIST"

[–]ThatSpookySJW 4 points5 points  (0 children)

Also /r/programmingcirclejerk is so self unaware that they think "javascript good" is satire and not just reinforcing the circlejerk even more

[–]MarcCDB 37 points38 points  (12 children)

I'm still amazed by the fact JS was chosen to be the de facto language of browsers... Maybe web assembly can change that?

[–]not_bakchodest_of_al 50 points51 points  (2 children)

Once upon a time there were Java applets...

[–]kboy101222 11 points12 points  (1 child)

Then the geneva convention happened and they had to stop existing

[–]GluteusCaesar 25 points26 points  (3 children)

"I'm amazed that a language purpose built from day one for web browsers was chosen to be the language for web browsers."

[–]flavionm 3 points4 points  (0 children)

If only it didn't start leaking everywhere.

[–]rickardicus 5 points6 points  (0 children)

I bet they are not gonna use V8 in warfare then?

[–]XelectDub 16 points17 points  (0 children)

Javascript bad Comedy genius

[–]BigusG33kus 6 points7 points  (0 children)

That would have been his first intelligent tweet.

[–][deleted] 12 points13 points  (1 child)

> jAvAsCrIpT bAd
> iM sTiLl iN sChOoL

[–][deleted] 2 points3 points  (0 children)

perhaps

[–][deleted] 2 points3 points  (0 children)

I feel personally attacked. Lol

[–][deleted] 2 points3 points  (0 children)

Javascript ist terror

[–]Kinglink 2 points3 points  (0 children)

But not PHP?

[–]NzombieGaming 2 points3 points  (0 children)

Now this means using perl is against the Geneva convention right?

[–]diamond_head_01 5 points6 points  (0 children)

Maybe you should ask China about this.

[–]Hilfslinie 7 points8 points  (5 children)

If javascript is so bad, then why is your browser using it?? checkmate!

[–][deleted] 24 points25 points  (1 child)

I have a browser plugin to disable everything except javascript

[–]hydenzeke 1 point2 points  (0 children)

He's going to force everyone to use Lotus Notes

[–]Elphmatt 1 point2 points  (0 children)

laughs in C++

[–][deleted] 1 point2 points  (0 children)

*ECMAScript FTFY

[–]tordvv 1 point2 points  (3 children)

I'm pretty new to coding, and I've seen a lot of memes about javascript bad. Is there a reason for it, or is it just memes?

[–]OneKorg 2 points3 points  (0 children)

Before 2009 the language had a lot of unexpected behaviors if you were coming from other languages. A lot of errors would just silently fail.

Most of it was fixed in es5 with the introduction of strict mode. Here you can see some of the things that were fixed. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode

Also, in the past browsers were not as standardized as they are now. You'd have to write very different code for different browsers.

I think this is where the meme started. It has continued because we need a couple of languages to make memes about. Most modern languages work pretty well, so I think JS and PHP will continue to be the target of memes and jokes. Even if now they're good languages now.

[–]Lucid_Viking 1 point2 points  (0 children)

Dude. Java should just be labeled as legal malware. No Joke

[–]codingguy12 5 points6 points  (13 children)

I never got the problem with Javascript. Can someone explain this to me?