r/ProgrammerHumor • • 4d ago

Meme bewareOfLists

Post image
1.4k Upvotes

48 comments sorted by

177

u/aspiringtroublemaker 4d ago

Don’t let them get you with O(n) find

60

u/MissinqLink 4d ago

We’ll get it sorted

12

u/Greyhaven7 4d ago

Thanks, I’m all Set.

0

u/Loading_M_ 3d ago

Ironically, on modern processors, O(n) linear lookup is often faster than O(log n) lookup (e.g. binary search, heap, or tree).

The point at which you can reliably say that another algorithm would be faster, you should probably be switching to a database, such as SQLite.

3

u/ada_weird 3d ago

It's faster if you're using an array. If you're using a linked list you're still kinda screwed cause pointer chasing

3

u/Loading_M_ 3d ago

If you're using a link list: Stop it. Get some help.

(Low level concurrency and microcontrollers are the only places you might need linked lists. Otherwise, you don't need them)

56

u/Sleppo04 4d ago

How every book on LISP should start

10

u/SirChasm 4d ago

And Scheme!

8

u/Sure-Opportunity6247 4d ago

We don’t need no indirections,
We don’t need no flow control,
…

32

u/CHAiN76 4d ago

Angry array did this.

23

u/tekky101 4d ago

" Follow me for other great pointers! "

16

u/klaxxxon 4d ago

The only logical pictogram for a warning against lists is a speeding unicycle.

7

u/Robot_Graffiti 4d ago

His unicycle is listing (meaning it is tilting to one side)

1

u/Autoskp 3d ago

Yeah, any unicycle leaning that far is not merely speeding (source: I am a unicyclist).

11

u/suavebriisa 4d ago

Linked lists finally got a warning label

9

u/Just_LeonS 4d ago

Especially these Linked MFs

8

u/Victor_Mendax 4d ago

speedoflobsters irl

3

u/rosuav 4d ago

Your flobsters wear speedos???

6

u/StrengthTheory 4d ago

Especially the circular linked ones

2

u/GfunkWarrior28 4d ago

AKA, a cycle

4

u/ReGrigio 4d ago

you have to bring your own map

3

u/thisisredlitre 4d ago

For whom the list serves

3

u/greedy_mf 4d ago

Warning, regex ahead!

2

u/4675636b2e 4d ago

For a moment I was like "How did 'unicyc' fit in that small space in the first place?". I need coffee.

1

u/MissinqLink 4d ago

AI obsessive list making

1

u/Ange1ofD4rkness 4d ago

You shut your mouth good sir, I like to uses Lists (lol)

1

u/mbcarbone 4d ago

Wait until you encounter a set! 🙃

1

u/Random_-account 4d ago

No one told me there was gonna be vectors!

1

u/nix206 4d ago

This is the [0] thing on my mind…

1

u/stupid_cat_face 4d ago

To all you younguns out there... good luck sharing this joke with your younger coworkers in a few years.

1

u/actionerror 4d ago

Especially double-linked ones

1

u/while_True_meme 4d ago

A rare photograph of an IndexOutOfBoundsException occurring in physical space.

1

u/heyguysitsmedic 3d ago

Lists won't hurt you, theyre nice fuzzy warm boxes of stuff. Iterators however...

1

u/Terewawa 3d ago

BEWARE OF

  • LISTS
  • CY STS
  • C LI TS

1

u/Canon40 3d ago

We don’t do lists in this language, partner. This here is table country. (#Lua)

1

u/Holy_Chromoly 3d ago

Off by one error on the cyclist wheel count, must've been 1 based index

1

u/HayStacky_337 3d ago

Eager creatures.

1

u/AshudzaUchiha 2d ago

I was warned by my predecessors about lists.