974
Evil Ones (lemmy.world)
top 50 comments
sorted by: hot top controversial new old
[-] devilish666@lemmy.world 41 points 2 months ago

Every programming language has it's own weakness but we still learned it and pretend it will never happened to us.
Moral of the story : JUST LEARN PROGRAMMING LANGUAGE THAT CAN MAKE YOU MORE MONEY NOT THE ONE YOU LIKE, BECAUSE YOU NEED MONEY

[-] some_designer_dude@lemmy.world 19 points 2 months ago

“JavaScript” isn’t so bad with React + Next + Typescript + Lodash + …

[-] CanadaPlus@lemmy.sdf.org 29 points 2 months ago

If a chicken could code, it would probably work like JavaScript. This is accurate.

When I had a flock, for example, sometimes one would flip over a bucket onto itself and then decide it must be night and go to sleep.

[-] lime@feddit.nu 11 points 2 months ago

if a chicken could code, it would use CHICKEN.

[-] RagingHungryPanda@lemm.ee 8 points 2 months ago

Oh this is actually a real thing I was rolling my eyes like "just show me the clicks and clucks in the code"

load more comments (1 replies)
load more comments (1 replies)
[-] WhiskyTangoFoxtrot@lemmy.world 6 points 2 months ago

I wish I could go to sleep at any time of day with just a bucket.

load more comments (1 replies)
load more comments (3 replies)
[-] thedeadwalking4242@lemmy.world 28 points 2 months ago

I’ve been programming in typescript recently, and can I say. I fucking hate JavaScript and typescript. It’s such a pain so much odd behaviors.

[-] lord_ryvan@ttrpg.network 20 points 2 months ago

I like custom types and them being able to follow custom interfaces; it makes for great type safety that almost no other language can guarantee!

What I'm saying is I'm learning Rust.

[-] masterspace@lemmy.ca 3 points 2 months ago

Lol name one outside of it's well known equality rules that linters check for.

Also, name the language you think is better.

Because for those of us who have coded in languages that are actually bad, hearing people complain about triple equals signs for the millionth time seems pretty lame.

[-] thedeadwalking4242@lemmy.world 6 points 2 months ago

Recently I encountered an issue with “casting”. I had a class “foo” and a class “bar” that extended class foo. I made a list of class “foo” and added “bar” objects to the list. But when I tried use objects from “foo” list and cast them to bar and attempted to use a “bar” member function I got a runtime error saying it didn’t exists maybe this was user error but it doesn’t align with what I come to expect from languages.

I just feel like instead of slapping some silly abstraction on a language we should actually work on integrating a proper type safe language in its stead.

[-] masterspace@lemmy.ca 4 points 2 months ago* (last edited 2 months ago)

I think that might be user error as I can't recreate that:

[-] pooberbee@lemmy.ml 2 points 2 months ago

Yeah, you would get a runtime error calling that member without checking that it exists.

load more comments (1 replies)
[-] barubary@infosec.exchange 4 points 2 months ago

@masterspace "Undeclared variable" is a runtime error.

Perl.

[-] masterspace@lemmy.ca 3 points 2 months ago* (last edited 2 months ago)

A) yes, that's how interpreted languages work.

B) the very simple, long established way to avoid it, is to configure your linter:

https://eslint.org/docs/latest/rules/no-undef

I haven't used Perl though, what do you like better about it?

[-] barubary@infosec.exchange 5 points 2 months ago

@masterspace

I haven’t used Perl though, what do you like better about it?

"Undeclared variable" is a compile-time error.

[-] masterspace@lemmy.ca 4 points 2 months ago

K, well configure your linter the way a professional Typescript environment should have it configured, and it will be there too. Not to be rude but not having a linter configured and running is a pretty basic issue. If you configured your project with Vite or any other framework it would have this configured OOTB.

[-] barubary@infosec.exchange 5 points 2 months ago

@masterspace

Not to be rude but not having a linter configured and running is a pretty basic issue.

Yeah, if you're a C programmer in the 1980s, maybe. But it's 2006 now and compilers are able to do basic sanity checks all on their own.

[-] masterspace@lemmy.ca 5 points 2 months ago

Interpreted languages don't have compilers, and one of the steps that compilers do is LINTING. You're literally complaining about not configuring your compiler properly and blaming it on the language.

load more comments (5 replies)
load more comments (6 replies)
[-] merthyr1831@lemmy.ml 26 points 2 months ago

of there was proof that chickens could contribute to the Ecmascript standard I would probably stop being vegan tbf

[-] affiliate@lemmy.world 5 points 2 months ago

if cows could be on the C++ committee i would eat nothing but hamburgers

[-] lowleveldata@programming.dev 26 points 2 months ago

Wait, do vegetables have good feelings or evil ones??

[-] lugal@lemmy.dbzer0.com 32 points 2 months ago

Even more evil, trust me, I lived with one once

[-] tpihkal@lemmy.world 23 points 2 months ago

I find the hardest part about eating vegetables is getting around the wheelchair.

[-] kamenlady@lemmy.world 4 points 2 months ago

Replace the bathtub with a cooking pot and you'll have your vegetables slide in just like that.

load more comments (1 replies)
[-] RagingHungryPanda@lemm.ee 4 points 2 months ago

Hol' up a minute

[-] pooberbee@lemmy.ml 24 points 2 months ago
[-] muhyb@programming.dev 40 points 2 months ago

There is also PHP

load more comments (1 replies)
[-] TrickDacy@lemmy.world 12 points 2 months ago
[-] embed_me@programming.dev 2 points 2 months ago

Hahaha! True

[-] masterspace@lemmy.ca 8 points 2 months ago* (last edited 2 months ago)

Honestly the meme of 'JavaScript bad' is so tired and outdated it's ridiculous. It made sense 14 years ago before invention of Typescript and ES5/6+, but these days it basically just shows ignorance or the blind regurgitation of a decade old meme.

Typescript is hands down the most pleasant language to work in, followed closely by the more modern compiled ones like Go, Swift, C#, and miles ahead of widely used legacy ones like Java, and PHP etc. and the white space, untyped, nightmare that is python.

I'm like 99% sure that it's just because JavaScript / Typescript is so common that for anyone who doesn't start with it, it's the second language they learn, and at that point they're just whiny and butthurt about learning a new language.

[-] daniskarma@lemmy.dbzer0.com 23 points 2 months ago* (last edited 2 months ago)

Nothing says language of the year better than a language that needs to be compiled to an inefficient interpreted language made for browsers and then grossly stuffed into a stripped out Chrome engine to serve as backend. All filled with thousands of dependencies badly managed through npm to overcome the lack of a standard library actually useful for backend stuff.

load more comments (1 replies)
[-] Zangoose@lemmy.world 15 points 2 months ago

As a TypeScript dev, TypeScript is not pleasant to work with at all. I don't love Java or C# but I'd take them any day of the week over anything JS-based. TypeScript provides the illusion of type safety without actually providing full type safety because of one random library whose functionality you depend on that returns and takes in any instead of using generic types. Unlike pretty much any other statically typed language, compiled TypeScript will do nothing to ensure typing at runtime, and won't error at all if something else gets passed in until you try to use a method or field that it doesn't have. It will just fail silently unless you add type checking to your functions/methods that are already annotated as taking in your desired types. Languages like Java and C# would throw an exception immediately when you try to cast the value, and languages like Rust and Go wouldn't even compile unless you either handle the case or panic at that exact location. Pretty much the only language that handles this worse is Python (and maybe Lua? I don't really know much about Lua though).

TLDR; TypeScript in theory is very different from TypeScript in practice and that difference makes it very annoying to use.

Bonus meme:

[-] thebestaquaman@lemmy.world 7 points 2 months ago

I have next to no experience with TypeScript, but want to make a case in defence of Python: Python does not pretend to have any kind of type safety, and more or less actively encourages duck typing.

Now, you can like or dislike duck typing, but for the kind of quick and dirty scripting or proof of concept prototyping that I think Python excels at, duck typing can help you get the job done much more efficiently.

In my opinion, it's much more frustrating to work with a language that pretends to be type safe while not being so.

Because of this, I regularly turn off the type checking on my python linter, because it's throwing warnings about "invalid types", due to incomplete or outdated docs, when I know for a fact that the function in question works with whatever type I'm giving it. There is really no such thing as an "invalid type" in Python, because it's a language that does not intend to be type-safe.

[-] Zangoose@lemmy.world 2 points 2 months ago

That's entirely fair for the usecase of a small script or plugin, or even a small website. I'd quickly get annoyed with Python if I had to use it for a larger project though.

TypeScript breaks down when you need it for a codebase that's longer than a few thousand lines of code. I use pure JavaScript in my personal website and it's not that bad. At work where the frontend I work on has 20,000 lines of TypeScript not including the HTML files, it's a massive headache.

load more comments (1 replies)
load more comments (2 replies)
[-] EffortlessEffluvium@lemm.ee 11 points 2 months ago

That’s just what I’d expect an evil chicken to say.

[-] Black616Angel@discuss.tchncs.de 8 points 2 months ago

I learned today, that in JavaScript

[2,-2,6,-7].sort()

results in[-2,-7,2,6]

[-] zqwzzle@lemmy.ca 4 points 2 months ago

WTF is it casting it to string or something?

[-] Black616Angel@discuss.tchncs.de 4 points 2 months ago

You can bet your pants it does!

[-] zqwzzle@lemmy.ca 7 points 2 months ago
[-] davel@lemmy.ml 2 points 2 months ago

This 💩 is 🍌s
baNaNas

[-] CanadaPlus@lemmy.sdf.org 6 points 2 months ago

Few people use just Typescript, though - there's always dangerously exposed native libraries in the mix.

[-] masterspace@lemmy.ca 2 points 2 months ago

I would somewhat disagree. These days virtually every popular library on npm is pure typescript and every new project I see at a company is pure typescript, with only legacy migrations of old systems still mixing the two.

load more comments (1 replies)
[-] GreenAppleTree@lemmy.world 6 points 2 months ago

Typescript is hands down the most pleasant language to work in

Agreed. But doesn't make "JavaScript bad" any less true..

[-] TheReturnOfPEB@reddthat.com 5 points 2 months ago

why do beards make men shitheels ?

even santa only gives the good stuff to rich kids

load more comments (1 replies)
load more comments
view more: next ›
this post was submitted on 20 Dec 2024
974 points (100.0% liked)

Programmer Humor

33584 readers
33 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS