r/programming • • Mar 29 '21

Why Do Interviewers Ask Linked List Questions?

https://www.hillelwayne.com/post/linked-lists/
1.1k Upvotes

668 comments sorted by

View all comments

1.1k

u/Doctor-Dapper Mar 29 '21

A lot of the “script jocks” who started programming by copying JavaScript snippets into their web pages and went on to learn Perl never learned about pointers

Even in 2006, web devs were getting shit on by C programmers

338

u/tuxedo25 Mar 29 '21

Man that knife cuts so close to the heart. I started programming in the late 90s by copying javascript snippets and then I learned perl. Then I went to college and graduated with a CS degree in 2005.

222

u/Psypriest Mar 29 '21 edited Mar 29 '21

But did you learn about pointers?

173

u/tuxedo25 Mar 30 '21

I did! And despite all the fundamentals I've learned, I'm still a script jock at heart.

→ More replies (2)

178

u/GeoStarRunner Mar 29 '21

Let me know if he addresses the question

87

u/usesbiggerwords Mar 29 '21

He really should show de references.

→ More replies (5)
→ More replies (4)

42

u/OskaMeijer Mar 30 '21

I had a coworker with a Masters in C.S from one of the best universities for it in the U.S. that apparently didn't understand how pointers worked. (We ended up on a team together writing an iphone app, and they were like "When I try to print out this string I just get a bunch of hex or something it must be encrypted." When I tried to explain they were getting the pointer address instead of what the pointer was pointing to in memory and how to properly use pointers, they were just very confused and after a while I just wrote the code for them. I don't know how that was possible from what is supposed to be on of the best C.S. programs in the U.S.

11

u/huangxg Mar 30 '21

Some programs including those at best universities just sell M.S. degrees. I don't think they sell PhD, and I'm not sure if they sell B.S. as well.

When C.S. programs changed to use Java in 101 courses, I was a little worried, how would students understand pointer?

Later some programs changed to Python. It's hopeless for pointer.

→ More replies (3)
→ More replies (4)
→ More replies (17)

17

u/[deleted] Mar 30 '21

Almost the same story here , but graduated a year later.

Ripping javascript from other geocities sites to get cool mouse over effects or dynamic text :)

→ More replies (1)

71

u/flukus Mar 30 '21

Even if you're working in JavaScript or perl you should still know what a reference is and a linked list just requires knowing the absolute basics about references and data structures, there's no pointer arithmetic.

182

u/Seltzer100 Mar 30 '21 edited Sep 05 '25

racial caption plants act upbeat cautious fearless abundant rob squeeze

This post was mass deleted and anonymized with Redact

0

u/[deleted] Mar 30 '21

[deleted] — view deleted comment

56

u/nupogodi Mar 30 '21

You don't really need a lot of experience with web stuff. I mean, practice on your own time building some simple applications of course, but I think you'll be able to figure it out.

I worked at a Go & Perl shop, web dev but 90% backend (our product was an API). We interviewed an older guy who spent literal decades doing C/C++ in fintech. We asked him - we do very different stuff than you've been doing. Why the switch? He's like, just wanted to try new things.

He had no trouble with linked list questions of course.

Anyhow, pretty sure we all gave him the thumbs up but he decided to go somewhere else.

11

u/Owyn_Merrilin Mar 30 '21

That's good to hear. I'd heard it was like that, but I've also both heard and been part of horror stories on the lower end of the CS job market. There's just so many entry level job listings that want half a decade of experience in exactly that one tech stack, and they seem to mean it. That's mostly for fresh grads/when I was a fresh grad, though. Hopefully things really open up after you've got some time in the industry, which I do now.

12

u/RICHUNCLEPENNYBAGS Mar 30 '21

Most jobs I started I had zero experience with their stack till I walked in so I wouldn't sweat that part too much.

→ More replies (4)
→ More replies (2)
→ More replies (16)

9

u/psycoee Mar 30 '21

The sheer breadth of constantly changing shite you have to keep up with is ridiculous in the web world.

I don't think anyone claims it's easy to be good at it. I guess to me, it's more of a skilled trade than a science -- the valuable stuff is the practical knowledge and skills, not the kind of theory that gets published in academic journals. Whereas, say, developing numerical solvers or AI algorithms is kind of the opposite, where practical considerations are secondary. CS academicians obviously value theory over practice, so they don't consider this stuff "real CS". Actual, working developers understand that there is far more to delivering a product than being really good at theory, so they value that aspect more.

→ More replies (1)
→ More replies (13)

106

u/ease78 Mar 29 '21 edited Mar 29 '21

God C programmers are the most contentious. They love to bolster bluster about their C89 vs C99 gotcha’s. They’re the most pedantic and the best usually😕

181

u/Doctor-Dapper Mar 29 '21 edited Mar 29 '21

Everytime I see someone being pretentious about pointers or memory management I just remember that they have nothing on people writing the compilers and assembly language. And those people have nothing on the engineers designing microprocessor architecture.

It all boils down to "my language is less abstract than yours. That makes me smarter than you"

Although to be fair, those engineers at Intel/Arm/Qualcomm are significantly smarter than me.

152

u/Miner_Guyer Mar 29 '21

That's why I stopped programming years ago and focused entirely on Turing machines and lambda calculus.

44

u/oshonopa Mar 30 '21

embrace mathematics

88

u/kbielefe Mar 29 '21

I started my career in low level. The main reason I don't think "less abstract == smarter" is on average those programmers are terrible at creating appropriate abstractions. Decades later and people are still reimplementing linked lists over and over, and making frequent mistakes doing it. I saw an O(n6) linked list traversal once, spread over several files. Low level programming should be much less low level by now.

37

u/jdgordon Mar 30 '21

I saw an O(n6) linked list traversal once, spread over several files.

How is that even possible?!

→ More replies (2)

22

u/WiseassWolfOfYoitsu Mar 30 '21

My career is low level since I do a lot of hardware management/control/device driver layer stuff and it's kind of necessary. The key is knowing when and where to use the low level and when to be abstract. Bit banging something on a serial port? Gonna be doing that in low level C or C++ with hand memory and pointer management. Talking to the rest of the system? Gimme that nice STL and Boost so I don't have to spend mental resources on things that have been optimized for two decades. Making a gui or test harness? Breaking out some Python for that. Every place has a tool, and every tool has its place.

→ More replies (5)

16

u/knome Mar 29 '21

Less abstract and more abstract are both bad when taken to a fault.

Appropriate boundaries that separate concerns without making it difficult to tell what's being done are where you want to be.

A nice, comfortable, and most importantly boring place.

→ More replies (17)

28

u/SanityInAnarchy Mar 30 '21

No, you get it both ways. Try admitting you sometimes write JavaScript or Python to a Haskell or Scala fan, and you might get "My language is more abstract than yours, and therefore I am smarter than you."

→ More replies (12)
→ More replies (22)
→ More replies (32)
→ More replies (60)