Live data from Hacker News

Deep C and C++ (2011)

slideshare.net

91–100 of 243 posts

Re: Deep C and C++ (2011)

#91
post #45
post #7

I'm not so jaded as to think that deep language understanding isn't a useful or good thing, and I'd like to think I have some myself. However, deep language understanding is not what separates the great engineers from the good ones. In an interview, I would much rather hear a person say something about a statically declared variable with no initialization being poor code to leave behind for the next person than some…

>In an interview, I would much rather hear a person say something about a statically declared variable with no initialization being poor code to leave behind for the next person than some arcana about the standard. Why are you forcing those two choices? One could be well-versed with the arcana AS WELL AS point out that bit about statically declared variable .. The problem IMO is most programmers cargo-cult/copy-paste…

"Great mathematicians can understand the theory and just apply it to whatever problem they come across."

I don't think you know how great mathematicians think. http://en.wikipedia.org/wiki/57_(number)#In_mathematics "Although 57 is not prime, it is jokingly known as the "Grothendieck prime" after a story in which Grothendieck supposedly gave it as an example of a particular prime number."

Re: Deep C and C++ (2011)

#92
post #33

I got really annoyed by those stupid and ever-repeating mean comments like "do you want another ice cream?"

I also found this very awkward. Especially because the author created the character he subsequently demolished.

While I can follow most of the C problems, C++ has never interested me. As as a Common Lisp programmer, all of this seems quite demented. By reading the slides I have learned about some interesting optimization concepts, and wondered how CL compilers do it. But honestly for 99% of my Job I couldn't imagine using something like C.

Edit:grammar.

Re: Deep C and C++ (2011)

#93
post #15

Earlier quoted context omitted.

Arguably if people have such strong understanding of things they will be better programmers too. I would prefer the person who knew what they were doing, because they also know _why_ weird things are weird, and have a better real understanding of what to do and not do. A person who just knows it's "bad code"--but not why--is almost certainly going to leave other bad code from lack of understanding. To pull an example…

However, I'd be concerned that the person with strong understanding of things will simply leave uninitialized static variables lying around in the code simply because they _knew_ it was always initialized to 0. It might work if your entire coding team has that innate understanding, but that is unlikely. Sometimes I think that having deep and expert understanding of a language may cause you to create code that other t…

A more common example is operator precedence, especially booleans. The precedence rules are easy and set in stone for decades, but always use parentheses to clarify, and I do not trust programmers that don't.

Re: Deep C and C++ (2011)

#94
post #83

The girl spewing some bullshit may lead to an interview ended early. Clearly bright, but not as bright as she think she actually is... Come back in a few years with a bit more humility... Hard to decide if the other guy is bad or inexperienced without a resume... "If you compile in debug mode the runtime might try to be helpful and memset your stack memory to 0" This is a retarded explanation (pages are set to 0 when…

MS Visual C initializes it to 0xCCCC so it's easy to spot. It helped me find a few errors.

Re: Deep C and C++ (2011)

#95
post #83

The girl spewing some bullshit may lead to an interview ended early. Clearly bright, but not as bright as she think she actually is... Come back in a few years with a bit more humility... Hard to decide if the other guy is bad or inexperienced without a resume... "If you compile in debug mode the runtime might try to be helpful and memset your stack memory to 0" This is a retarded explanation (pages are set to 0 when…

Okay, you are assuming an Intel architecture? Plenty of embedded environments don't have OSes, let alone pages or virtual memory.

IOW, I've worked in environments where, yes, the value in memory is based on what the compiler does in debug mode, not what the OS might be doing. I'd say the girl's answer is, while not exhaustive, certainly correct. Without more context, we don't know why the value was 0.

Re: Deep C and C++ (2011)

#96

What bizarre nonsense. I hope nobody thinks this level of (mis)understanding is replacement for understanding, you know, how to program . The majority of this is undefined behavior or implementation details of your compiler. If you rely on that, I don't want your code anywhere near my machine.

I felt this way as well. On an interview why would you give a really specific answer to a really general question? I don't think it's that most people can't answer like this, rather that it's not what was asked.

Re: Deep C and C++ (2011)

#97

This was good, but… Hermione (I'm sure that's her) rates her C++ knowledge at 4-5, and Stroustrup himself at 7!? Bullshit. Either they are poorly calibrated, or they are displaying false modesty. Sure, they probably still have plenty to learn about C++, but come on, Hermione is already at the top 97% in terms of language lawyering. Wanting to be stronger is good. Not realizing you're already quite strong is not so go…

It's real, it's called the Dunning-Kruger Effect. I've seen it plenty of times with real superstar-experts rate themselves as "slightly above average"... http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect

I think it is more than that. I had a boss that basically would not hire somebody if they said they were at the top of any measure. In one sense, she was correct. No one can know everything about C++. OTOH, if you are in the 9x percentile, why should you not rate yourself at 9-10 out of ten? At some point it gets silly when you are arguing about how you should properly distribute yourself in bins so long as you understand the scope of the problem.

Re: Deep C and C++ (2011)

#98
post #43

Earlier quoted context omitted.

Exactly. Deeper you go, better you are. Better you are, better products you make. Just Simple mathematics.

Totally disagree with this. I've worked with plenty of fantastic programmers who are basically worthless without the guidance of a good lead/producer/designer. Nonobligatory image to support statement: http://codinghorror.typepad.com/.a/6a0120a85dcdae970b0128776...

That gui seems fine to me. It's ugly as sin, sure, but it has everything easy to find and clearly labeled. Ignore the parts you aren't using and you're good to go.

Re: Deep C and C++ (2011)

#99
post #45

Earlier quoted context omitted.

>In an interview, I would much rather hear a person say something about a statically declared variable with no initialization being poor code to leave behind for the next person than some arcana about the standard. Why are you forcing those two choices? One could be well-versed with the arcana AS WELL AS point out that bit about statically declared variable .. The problem IMO is most programmers cargo-cult/copy-paste…

> Great mathematicians can understand the theory and just apply it to whatever problem they come across. As someone who's both a mathematician and a programmer, I think that analogy glosses over an important difference, which is also relevant to why many people refuse to memorize certain things. Good mathematical theories are internally consistent in a very strong sense. When you're learning them, you feel like you'r…

No, I too am talking about a hierarchy of internally consistent knowledge.

Have you implemented a compiler or a interpreter for a popular language? I could be wrong but I strongly suspect you haven't. If you have ever implemented a compiler you understand the language at a fundamental level and when stumped with a bug or a highly technical puzzle or what have you - you get that "aha" moment where its like "Ofcource ! How else could it be. This language feature must be using this construct because of X or Y reason and the compiler has to work this way because this part here doesnt allow for it to work any other way, etc ,etc and the optimizer has xyz amount of scratch registers so abc condition could never happen, and on and on."

Re: Deep C and C++ (2011)

#100
post #91
post #45

Earlier quoted context omitted.

>In an interview, I would much rather hear a person say something about a statically declared variable with no initialization being poor code to leave behind for the next person than some arcana about the standard. Why are you forcing those two choices? One could be well-versed with the arcana AS WELL AS point out that bit about statically declared variable .. The problem IMO is most programmers cargo-cult/copy-paste…

"Great mathematicians can understand the theory and just apply it to whatever problem they come across." I don't think you know how great mathematicians think. http://en.wikipedia.org/wiki/57_(number)#In_mathematics "Although 57 is not prime, it is jokingly known as the "Grothendieck prime" after a story in which Grothendieck supposedly gave it as an example of a particular prime number."

>I don't think you know how great mathematicians think.

I'm confused. What is your basis for that statement? If you you know how they think why don't you just express it? :-S I am sorry, I have no clue what your point is, or even if you have one.

Post reply on HN