DEV Community

Cover image for Meme Monday

Meme Monday

Ben Halpern on March 10, 2025

Meme Monday!

Today's cover image comes from last week's thread.

DEV is an inclusive space! Humor in poor taste will be downvoted by mods.

Collapse
 
fmerian profile image
fmerian

Bart

Collapse
 
annavi11arrea1 profile image
Anna Villarreal

Found on fb
meme

Collapse
 
webbureaucrat profile image
webbureaucrat

Okay, I'll bite: There's a gamified code platform? What's it called?

Collapse
 
annavi11arrea1 profile image
Anna Villarreal

Ruby on Rails?

XD ~ not exactly gamified. but its a fun twist. You do sort of 'collect' gems and they sort of do give you 'powers' LOL

Collapse
 
gamelord2011 profile image
Reid Burton

Tynker, maybe Scratch?

Collapse
 
tylish_anup_71a651f92d0fd profile image
Tylish Anup

Haha

Collapse
 
ivis1 profile image
Ivan Isaac

meme monday

Collapse
 
fmerian profile image
fmerian

they should have used trunk-based development

Collapse
 
sherrydays profile image
Sherry Day

meme monday

Collapse
 
besworks profile image
Besworks • Edited

Next suggestions...

public Button LefteyButton;
public Button LooseyButton;
Enter fullscreen mode Exit fullscreen mode
Collapse
 
fred_functional profile image
Fred Functional

meme monday

Collapse
 
syxaxis profile image
George Johnson

After 35 years you feel like a aged guitarist shredding riffs when you fire up vi and muscle memory kicks in! ha ha!

Collapse
 
ben profile image
Ben Halpern

Let's kick things off with this week's awful AI-generated meme — this time featuring a pretend copyright notice in the bottom left — which is kind of rich considering the situation.

meme

Collapse
 
besworks profile image
Besworks • Edited

I actually had a good experience writing unit tests with copilot today. Seems I make that face more when I don't include tests.

Collapse
 
besworks profile image
Besworks

Image description

Collapse
 
hbthepencil profile image
HB_the_Pencil

On gomfest and f fomfe :P

Collapse
 
julieana_andrade_1273e95d profile image
Julieana Andrade

lmao

Collapse
 
voncartergriffen profile image
Von Carter Griffen

meme monday

Collapse
 
besworks profile image
Besworks

Image description

Collapse
 
chariebee profile image
Charles Brown

meme monday

Collapse
 
richmirks profile image
Richard Mirks

meme monday

Collapse
 
fyodorio profile image
Fyodor

Spot on, those youtube ninjas 🤣

Collapse
 
aarongibbs profile image
Aaron Gibbs

meme monday

Collapse
 
1link profile image
1Link.Fun

true true true

Collapse
 
sawyerwolfe profile image
Sawyer Wolfe

meme monday

Collapse
 
xinitd profile image
Shakhzhakhan Maxudbek

True story

Collapse
 
ansilgraves profile image
Ansil Graves

meme monday

Collapse
 
jessicajaybrown profile image
Jessica Brown

meme monday

Collapse
 
warwait profile image
Parker Waiters

meme monday

Collapse
 
schemetastic profile image
Schemetastic (Rodrigo)

It's today! Thanks for the reminder, Hahahaha

Collapse
 
blenderman profile image
BBM

meme monday

Collapse
 
safin_ahmed_9add049c2af82 profile image
Safin Ahmed

😆😆😆

Collapse
 
gallowaydeveloper profile image
Galloway Developer

meme monday

Collapse
 
primetarget profile image
Ethan Anderson

meme monday

Collapse
 
moopet profile image
Ben Sinclair

Ok, that got a chuckle out of me.

Collapse
 
dreama profile image
Dream

meme monday

Collapse
 
bernert profile image
BernerT

meme monday

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

JavaScript is basically just Lua with random poor design decisions sprinkled in everywhere.

Collapse
 
besworks profile image
Besworks

It's not so much that (all) the decisions were poor at the time, but because of the nature of the web, we're stuck with them even when newer better methods are added to supersede the bad ones.

Thread Thread
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

No, I think the decision that objects (including arrays!) can only have string keys was a fundamentally bad one, regardless of when it was made. Of course this could have been reversed if it weren't for backwards compatibility, but that's no excuse for making the language like that in the first place.

There's many such cases where JavaScript just does things in very sub-optimal ways.

Thread Thread
 
besworks profile image
Besworks • Edited

What you want is Map. With it you can use any object or primitive as a key.

const scores = new Map();
const user = { name: 'Alice' };
scores.set(user, 10);
scores.has(user);
scores.get(user);
scores.delete(user);
Enter fullscreen mode Exit fullscreen mode
Thread Thread
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

Language flaws cannot be fixed with standard library extensions.

Thread Thread
 
besworks profile image
Besworks • Edited

Are you writing JS for internet explorer 6 or something? These standard library extensions are WIDELY available. Map has existed for over 10 years. Languages evolve over time. When I started writing code we had to save it on cassette tape. You can still do that now if you choose but why would you? It's all about using the right tools for the job.

Thread Thread
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

I am not talking about availability. Standard library extensions, regardless of ubiquity, will categorically never be a perfect fix for language design problems.

Maps will never replace objects, nor are they supposed to. They very likely won't get a dedicated syntax comparable to objects. They aren't even compatible with JSON, JS' de facto native format for data serialization.

The only way to fix the flaws with JS Objects would break compatibility and thus break the web.

Thread Thread
 
besworks profile image
Besworks • Edited

But... how would you expect to serialize something that is passed by reference?

const a = { x : 'test' };
const b = { x : 'test' };
const c = { x : 'test' };
const m new Map();
map.set(a, true);
map.set(b, false);
map.has(c); // return false
map.has({ x : 'test' }); //  also false
// only the original reference works.
// and we can change the object
// while maintaining our ref in the table
a.x = 'changed';
map.has(a); // this is true!
Enter fullscreen mode Exit fullscreen mode

In the example above, a,b and c all look equal but are not. You can't easily serialize into JSON without extra hackery to "preserve" the uniqueness of the original key but you would lose the references that make this association useful in the first place. I can't find any lang that directly allows serialization of objects as keys.

  • Python: dict serialization (pickle/json) doesn't handle object keys
  • Ruby: Hash serialization (Marshal/JSON) doesn't handle object keys
  • Java: HashMap serialization requires custom Serializable implementation
  • C#: Dictionary serialization doesn't handle object references as keys
  • Rust: HashMap serialization via serde requires explicit key types
  • Go: map serialization requires comparable key types

And NONE of these languages directly allow objects as keys on an object primitive. In Lua you can use any object directly as a key in a table but you lose the reference and the key becomes a clone of your original object (which, btw you have the option to do this in js as well). The problem here is not JS handling of object primitives, but rather how they are often abused to hold data that should be in a collection.

Lua's "everything is a table" design is actually less specialized/optimized than js's purpose-built data structures. JS arrays are true arrays (contiguous memory blocks), Lua arrays are just tables with integer keys. In js, Maps provide all the flexibility of Lua tables plus reference integrity and Arrays provide the speed of direct memory access.

Thread Thread
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

Lua you can use any object directly as a key in a table but you lose the reference and the key becomes a clone of your original object

Only when you want to serialize your table though, which is a very reasonable limitation.

Lua, just like early JS, isn't an object-oriented language, so this is the reasonable choice. For an object-oriented example, see Ruby: it also separates objects from hashes, but its {key: value} syntax creates a new hash, rather than an object. Nobody uses objects with dynamic attributes as associative data structures in Ruby, because the syntax makes that more inconvenient. JavaScript, meanwhile, makes this the obvious way of writing code.

In terms of library, JS and Ruby are the same here: both have a Map class that is available by default and on its own behaves like any object. The fact that JS has a problem and Ruby doesn't shows that the design of the language is significant. Syntax matters.

I also want to point out that this is far from the only problem with JS as a language, it's just one example that nicely illustrates the differences.

Also, going back to serialisation, serialising maps in JS is trivial. Reject non-string keys and serialise maps as JSON objects. You won't get around the limitations of the language, but this is normal. Lua tables or Ruby hashes can't be serialised to JSON either. Neither can JS objects. This is simply a consequence of a simple serialisation format.

Lua's "everything is a table" design is actually less specialized/optimized than js's purpose-built data structures. JS arrays are true arrays (contiguous memory blocks), Lua arrays are just tables with integer keys. In js, Maps provide all the flexibility of Lua tables plus reference integrity and Arrays provide the speed of direct memory access.

None of what you said here is correct. Do you even actually know Lua or javascript?

  • Lua doesn't have arrays. It has sequences.
  • JavaScript "Arrays" are objects with string keys representing numbers
  • Lua tables are usually implemented with a hash part and an array part, meaning sequences are almost always stored in memory as arrays.
  • JavaScript VMs do the same, while having to maintain the illusion of string keys, meaning more overhead
  • Lua tables are more powerful than Maps: They can be meta-programmed, they have syntax sugar for method calls, they can have weak keys or weak values, can store sequences more effectively, etc.
Thread Thread
 
besworks profile image
Besworks

I actually do not know much about Lua, I may have misinterpreted some of the documentation I read. But I have been writing js since 1995, so yes, I know a thing or two about it. It wasn't my intention to bash Lua, just defend js.

Of course arrays are objects in js, as with pretty much everything. But this object just wraps an API around something very close to a raw array which does use contiguous blocks of memory. But you say...

Lua tables are usually implemented with a hash part and an array part, meaning sequences are almost always stored in memory as arrays.

...so it sounds to me like they behave pretty much the same. Personally, I don't worry about the marginal overhead that comes with js data structures though. I write optimized, efficient code that makes this issue trivial. I can't argue that js is without problems but it really depends on how you use it.

Thread Thread
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

The point is that neither language has true arrays, and in either case it is up to the implementation to "optimise" lists into actual arrays in the memory. So the comparison just falls on its face immediately.

so it sounds to me like they behave pretty much the same

In the ways we've discussed, yes; but JavaScript arrays come with their own example of poor design, and that's that even if internally they are stored as arrays as a VM optimisation, to the programmer they still maintain the semantics of using string indices rather than actual numbers.

In practice this is rarely a big issue, but it sometimes still shows in cases like a for ... in loop, which loops over a series of strings. It's an easy source of confusion that just didn't have to be in the language if arrays were specified differently.

Thread Thread
 
raguram90 profile image
RamR

the discussion between you both was quite interesting. As like you both i wish to go deep inside a language to discuss like this.

Collapse
 
syxaxis profile image
George Johnson • Edited

Ragging on a language and a post ends up with 78 replies ( see below) ! Ha ha! Got love the dev life!

Collapse
 
tandrieu profile image
Thibaut Andrieu

Me, as a C++ developer, watching two communities argue over which of their crappy languages ​​is better:

Image description

Collapse
 
jjbb profile image
Jason Burkes

meme monday

Collapse
 
gamelord2011 profile image
Reid Burton

Image description

Collapse
 
overworkedseniordev profile image
John Glass

This cannot be more accurate.

This cannot be more accurate

From: ProgrammerHumor.io

Collapse
 
youngfra profile image
Fraser Young

meme monday

Collapse
 
maeve_daan profile image
Maeve Daan

haha

Collapse
 
notthismoment profile image
Gideon

exactly

Collapse
 
duncan_true profile image
Dun

meme monday

Collapse
 
mellen profile image
Matt Ellen-Tsivintzeli

I have never fucked Linux Torvalds in my life.

Collapse
 
xaviermac profile image
Xavier Mac

meme monday

Collapse
 
avanichols_dev profile image
Ava Nichols

meme monday

Collapse
 
amtrakguy2 profile image
AmtrakGuy2

Image description

Collapse
 
javascriptwizzard profile image
Pradeep

Image description

Collapse
 
gamelord2011 profile image
Reid Burton

Meanwhile with me:

Image description

Collapse
 
maeve_daan profile image
Maeve Daan

haha

Collapse
 
alexandru_mihai_05a74cf33 profile image
Alexandru Mihai

Image description

Collapse
 
danshalev7 profile image
Dan Shalev

lol

Collapse
 
julieana_andrade_1273e95d profile image
Julieana Andrade

haha love it

Collapse
 
rudransh61 profile image
Rudransh Bhardwaj

Image description

Collapse
 
defxcom profile image
Defx

This company is a true professional in its field!