Must a real coder understand recursion and pointers?

Hi,

I just read an article that stated that real coders can handle recursion and pointers (that’s C language). If you are intellectually incapable to deal with these two subjects, you should steer your career in another direction. I have long had the intuition that these subjects are important and that I should master them thoroughly, which I have not yet done. I’ve done some exercises on pointers but I am still struggling and likewise with recursion. I do love coding. Should I insist until I have mastered them or am I wasting my time?

Greets,
Karin

Those are important subjects (though pointers aren’t really an issue in JS the way they are in C) but those are odd ones to focus on. There are many concepts you have to grasp to be a good coder. Recursion is one. I’m sure I could list a couple dozen other equally important. It sounds like the article was just trying to use a shocking headline to get people to click. I wouldn’t worry about it too much - when you’re ready for it, recursion will make sense. Just keep coding.

1 Like

Well, he’d write things like ‘almost no one passed this really hard course at MIT, except me of course’ which on the one hand made me recoil in fear and on the other I thought: ‘if hardly any one is passing, whose careers is he writing about?’. Ok, I’m going to calm down, get some hot chocolate milk and a biscuit and code a little more. Thanks for the quick reply and grees,
Karin

Do you have a link to the article? This guy sounds like a douche.

On reflection, thinking back to my C days, pointers were a very important part of C. VERY important. You basically can’t do C effectively without being able to manipulate pointers. But, it’s not that complicated. I guess the nearest corollary (in fundamental importance, not in function) in JS would be first order functions, the way functions are handled and passed around. And recursion was stressed because it was a basic way to solve some tricky algorithmic problems. But (imho) it’s a neat trick that doesn’t get used much in the real world. I worked as a C coder for years and I don’t think I ever needed recursion. But I used pointers every 45 seconds.

But JS is not C. And JS (in some ways) is a more complex language with more concepts to master. (I’m not saying it’s better or worse, just different.) I don’t think his advice transfers.

I don’t know, the impression I have of this guy is that he took a few coding courses and thinks he’s hot shit. He sounds like he’s the guy that took a few karate classes, got his first belt, and now thinks he’s Jackie Chan and an expert. Maybe it’s an unfair assessment, but without more data, that’s my impression.

2 Likes

I was reading a story on medium freecodecamp: article:https://medium.freecodecamp.org/things-i-wish-someone-had-told-me-when-i-was-learning-how-to-code-565fc9dcb329

and in it there was a link to this :

It’s confusing.

Karin

Learning about pointers made me look at scope in JS and passing around arguments in a new and refreshing way. It all made a lot more sense. But it was hard.
Karin

I read the article. He sounds knowledgeable, but he still sounds like a chauvinistic douche.

Yeah, I learned a lot from C. I agree that learning a low level language like C is a great way to understand what is going on a little better. There were a lot of things in JS that I just breezed through because I had a deeper understanding from learning C and assembly. I think it is valuable.

But there are some great JS coders out there who either don’t have that deep understanding or have picked it up over the years by osmosis. I had an interview ta few months ago where a guy (a successful coder) asked me a question and I gave him a (correct) answer that he couldn’t quite understand, because he wasn’t really clear on how addresses and pointers worked. Again, it is a C thing. And there are of course many people that have picked it up along the way.

If you want, study C. It has a lot to teach. Or study JS - it has a lot to teach too.

3 Likes

It is my impression that coding is coding. In whatever language, you are dealing with the same problems in a different way. Syntax is not so hard, but understanding what problem you are supposed to solve, that is the nightmare. I have encountered the problem of not knowing what the problem is in so many ways. The quote machine was my first project and you don’t want to know what despair I went through before it hit me I had to talk to the DOM. And what the DOM was. And what an API was. Node JS created similar horrible experiences. And so did C.

A quick search for the author finds that he is a bit of a controversial figure. He makes some good points, but likes to make them loud and in your face and he loves pretending like there is no counter argument. He seems to think teaching Java to students is evil. There are many advantages to learning Java, OOP is a big one. Also, C let’s you get away with really messy code, something much harder to do in Java.

As a professional musician, I know a lot of guys like him - knowledgeable, but opinionated, love shoving people’s faces in their ideas, telling people their way is wrong. Let him bloviate - let’s learn, code, and build things.

2 Likes

Ah, he needs attention. Good to know.

Yeah, he is"co-founder of Trello and Fog Creek Software, and CEO of Stack Overflow," so his street cred is high. And as much of a talented, opinionated jerk as he is, he’s both not wrong, and wrong for titling his argument as he did. What he means to say is that ELITE CS undergraduate degree programs cannot afford not to start from the bit-up. CS majors at MIT must be able to discuss graph theory, test for Turing-completeness, create compilers themselves, write an OS, as well as do what he considers lesser tasks (OOP, most of web development…) His argument’s central point is that transformative software concepts are created by the 0.1% of software engineers who not only end up working at places like Google, but end up running departments there, or creating their own disruptive software firms. But, that’s not what pays the bills (literally) by allowing banks to maintain and update their software to meet new UX paradigms and defend against malicious hackers. BTW, don’t feel too bad: His company, Fog Creek, created Glitch, which per their CEO, is: “An effort to make the web into a creative medium where everybody expresses themselves and owns their work.” So, he’s not above “dumbing down development.” What he really seems to hate is “all those damn furriners” filling spots at the companies that are still creating the infrastructure for the users and superusers. To him, a “real coder” is a software engineer who builds that infrastructure, and nothing else. Let him think whatever he wants. Plenty of “real coders” eat without ever using a pointer.


(Image above from the Glitch front page)

1 Like

Hi vipatron,

“An effort to make the web into a creative medium where everybody expresses themselves and owns their work.”

I like that because that is exactly what I want to be about. I am a language teacher, so I don’t want to be the greatest coder but express my experiences as a teacher in good didactic applications. I want to make a learner’s dictionary without translations that pupils create themselves (under the guidance of a teacher of course) with their own pictures, sound bites, movies, examples, opposites, synonyms, associations, derived words… Didactically speaking I have big and plans but codewise it doesn;t have to be all that hard.

Joel, it’s official, I forgive you.

Thank you, I feel a whole lot better,

Greets,
Karin

1 Like

That sounds like a really cool idea. Be careful about what you propose where, unless you plan on open-sourcing it :slight_smile:

It will be open source and I hope I will be copied.

2 Likes

Bear in mind the article is

a. slightly tongue in cheek,
b. is was written specifically from the point of view of his company’s hiring practices, and
c. he’s interested in finding exceptional programmers to do interesting things, which
d. for what he wants specifically is unlikely w/r/t to Java (as it was at the point in history that the article was written) because it’s in many ways a language designed to hold your hand. It’s tailored for the needs of enterprise, who need to hire and train vast armies of programmers build mind numbingly boring things. Nothing wrong with that, it just is what it is, a language designed to be very boring, quite safe, slow to program in and very easy to learn, using what was at the time (and still is, though it’s losing ground a bit, imo thankfully) an extremely fashionable form of OO.

People take this stuff as gospel when it’s not, is just one guy’s opinion. He’s been involved at the most senior level in a fairly spectacular portfolio of work, so possibly his opinions means more, probably not. In this case they aren’t particularly controversial though

2 Likes

I can see his point of view now. I took it personally and living in a completely different universe it upset me. It can put the article into perspective now and place it in its proper context.

So thank you for that and greets,
karin

I will focus my to the title, and not go into the article or dive deep into the article’s author. I believe anyone skimming (like me) wont go into either and would just want to know what people think from the title.

Must a real coder understand recursion and pointers?

I’m not sure what defines a “real-coder” you can write bad code and still be a “coder”. So I won’t go into that definition. (is there an imaginary coder out there?)

You should understand recursion and pointers

Regardless of language, if you plan on programming professionally these concepts are important enough to learn. Yes you can code without knowing either of these concepts, even in JS (which doesn’t have pointers). But I’m not sure if it is wise to choose to not understand these concepts which most programmers would know. I argue because these concepts are understood widely, regardless of language or domain (back-end, front-end, high-level, low-level, etc) you should know them since everyone else knows them.

Now you might say but hey I can program a lot of things without understanding either of these and I don’t need to understand them to write them in JS your right. But if a coworker who does understand it tells you “you can do this with recursion”, or you have a bug due to object references, you wont immediately understand. Because of this you should know these concepts.

Now these concepts aren’t as dire as basic programming concepts, but they should be on everyone’s “I should understand this” list. Regardless of if you went to school for a CS degree or not, if you want to know how to be a programmer, you should know these concepts.

Sidenote

  • pointers don’t exist in JS, but object references do. Understanding one helps in understanding the other. Understanding how “pass by reference” and “pass by value” works helps solve a whole class of bugs I see very often, and provide a whole realm of solutions.
  • Some problems can only be solved with recursion, and other’s are a hell of a lot easier with it. So not understanding it could give you a hard time with some problems, and actually prevent you from solving others.

This is true, if you are coding you may doing it well or badly, but you are really doing it and that is important and I agree these concepts are important ones. I felt intimidated reading that because these concepts are hard and I have not yet mastered them properly.

Don’t focus on “mastery”. Focus on getting a little better each day. If you see a weakness, work on it, but don’t get hung up being perfect. Just keep learning. And don’t get hung up on chauvinistic, Procrustean ranting articles from opinionated, obnoxious douche nozzles trying to get attention. He doesn’t get to define what a good coder is. I’ve never had any job interviewer ask me about pointers and I think I only saw a recursion problem once.

I was thinking about recursion. I think it gets used in C a lot more because functions are faster and take up less space in C. In JS, functions require some background work and more memory so they are slower and often the non-recursive solution is faster. I think that is why a C coder may put more emphasis on recursion.

I disagree with @bradtaniguchi that some algorithms can’t be solved without recursion. That contradicts what I was taught and a quick scan of the internet shows that that hasn’t changed. Recursion is just a glorified and “cool” loop. I do agree that some problems are easier and certainly more elegant with recursion.

2 Likes

He’s not talking about recursion in C; C is imperative, recursion isn’t particularly fast in C (I assume there are many very low-level ways to make it kinda fast[ish] but it’s never going to be as fast as imperative loops et al). He’s talking about the concept in general and in particular about Lisp (this is why he mentions SICP).

Recursion’s not just a like-for-like, formally elegant replacement for imperative loops. It’s the most effective way to iterate over very common data structures, for example lists or trees. It makes writing parsers incredibly simple relative to writing them in imperative styles. It’s the only way to iterate in a large group of languages including Lisp - where the code is the data and the data is the code, in a tree, that you recurse over.

And yeah, he may well come across as a bit of a douche, but he’s not really wrong here, and he’s not wrong about a lot of other things; his blog archives are still highly regarded for good reason. You have to look at in the context of him writing from the perspective of trying to hire good programmers, and of him writing w/r/t how things were in the early 2000s.

What he says matters w/r/t small tech company success, and his hiring/project management methods and general advice are well known. He was the first kinda star blogger who could write well from a viewpoint informed by massive success in both tech and business. What he espoused (the checklist, no open-plan offices, treating employees [including interns] staggeringly well, good planning, etc) involved programmer autonomy, and for that to happen and lead to good software you generally need very skilled programmers. And if a programmer understands how things work, and what things have historically already been tried, and why, they can avoid reinventing the wheel or falling into the same traps everyone else who didn’t understand why falls into. It was a super optimistic view of how good a working environment could be, which sadly is pretty rare (to the level he evangelised for).

Plus his his track record is fairly astonishing w/r/t good, successful software projects: Excel Basic, Stack Overflow/Exchange, Trello, Glitch. He kinda demonstrated that what he talked about works in practice.

2 Likes