Live data from Hacker News

Poll: Do you know C?

news.ycombinator.com

101–110 of 208 posts

Re: Poll: Do you know C?

#101
c syntax lives on in many languages like java and javascript. it was the second language that i learned behind java, this was back in 1998. i still think it's a great language because you have so much control over the important things like memory management and pointers, how priceless (albeit dangerous) is that? string manipulation was a real detail that i could live without and exception handling was non-existent (don't go there with goto labels), but overall it was a clean language, you could optimize the hell out of things like byte boundaries for structures, you just felt like you had full control, it's the closest thing i had to assembly without the syntax being too cryptic. that was the good old days and i think it was an important foundation for me in terms of learning how to be anal as hell with source code.

Re: Poll: Do you know C?

#102
post #76
post #55

Earlier quoted context omitted.

You don't know C. Coding in C and C++ has diverged significantly enough that they are two completely different languages. That said, answer #3 or #4 makes sense.

Precisely! It always is a red flag when new graduates have "proficient in C/C++ " in their resumes. I've found that these people tend to write code in a combination dialect of C and C++ that I call C+.

There was old adage that people who say they code in "C/C++" don't really know either one. This was about a decade ago, I can't recall where I saw it, and don't know if it still a widely held view.

Re: Poll: Do you know C?

#103
post #38

I've been programming in C for longer than my current manager has been alive. :-)

Reminds me of some C-code I was told to port to Linux (if I remember correctly) some years back (probably in 2003). The code was from 1981 (it said so in the comment header). Except for the fact the code was almost as old as I am (born in 1976) it turned out that the security check that the code was supposed to perform didn't actually execute. Yepp, that's right, the code had been running for 30+ years doing nothing.…

This reminds me of an interesting event that occurred in my C++ class. During one of the assignments I looked at a peers code. I became convinced that the code was wrong. His code looked a little like this:

  bool operator
He ran the code and it worked. I was confused.

Another student saw the teacher pass him and copied his implementation. His code didn't work. It gave the stack overflow error that I was expecting.

It turned out that the reason the guy had his code work in the first place was because it was never included in the program. He had put the code in his C++ file, but forgot to include it in his header. When the program compiled, it never knew his code existed.

Re: Poll: Do you know C?

#104

Earlier quoted context omitted.

What knowledge about C do you think does someone miss when he is using C++? I have made the experience that a good C++ developer also automatically knows everything about C.

Au contraire, a modern C++ developer probably knows nothing about C. Good C is like good assembly language: dense and performance-obsessed. No objects, no exceptions, no STL, bare bones and riddled with pointer manipulation and macros.

No objects = no structs?

Re: Poll: Do you know C?

#105
post #78

Earlier quoted context omitted.

Not sure if that's a good thing. I wouldn't say the same for a comment on another site (different things drive different people), but I assume you have some aspirations to make it and be your own boss.

He's manager doesn't get to program all day though :P As long as it's a company in which compensation isn't determined arbitrarily by position in hierarchy it's a great thing.

Amen, brother. Like being a contractor with a high rate who gets to program all day and ignore the political bullshit.

Re: Poll: Do you know C?

#106
post #80
post #38

I've been programming in C for longer than my current manager has been alive. :-)

Ok kadbid, I am intrigued. what's the story? Why didn't you make the transition to other languages? Why didn't you make the transition into management? I'm not questioning your decisions, just curious.

For many or most programmers, the "transition into management" is a major career change from something they love and are good at to something they don't enjoy and aren't very good at. However, we're all assumed to be following that track because we're supposed to hunger after money and prestige in the eyes of society at large. This morning I interviewed a woman for a technical position (same job as me) who got her master's degree when I was in third grade. What's wrong with that?

Re: Poll: Do you know C?

#107
post #89

Earlier quoted context omitted.

Yes, that's why I said "Not sure".

Yes, logically, "Not sure it's a good thing," means "It is either a good thing or it is not a good thing." You know, X or not X, and so your ass-covering comment is logically defensible, but come on , you wrote it for a reason. Just say, "Good point," and move on.

"Not sure" in this context was meant demonstrate I'm open to both variants of the situation, good and bad. Since OP had upvotes already indicating that people find it good/funny/whatever, the point was to bring other side of this to light. There's a saying that fits your comment so well - don't tell me what to do and I won't tell you where to go.

Re: Poll: Do you know C?

#108
post #7

As a first reaction I thought, well, more than 50% of HNers fluent with C, the average age should be pretty high probably. But then I realized that actually the average HN age is probably around 25 (from other pools I saw here), so I guess, there are still a lot of fresh programmers learning C. I really hope so. I love higher level programming languages and spent a lot of time with Tcl, Scheme, FORTH, Joy, Ruby, and…

I'm 25 and consider myself very well-versed in C (though I still have to consult the C99 spec from time to time). When I was learning to program modern computers around the turn of the century, it was the only "serious" language for writing desktop apps (I had recently "graduated" from VB4). I then refined my skills over the course of my electrical & computer engineering degree and a short stint in the EE industry, w…

FPGA designer here. I don't think it's accurate to claim that SystemC is replacing VHDL and Verilog for ASIC/FPGA design. I view SystemC as a niche tool to allow software engineers to dabble in hardware design. I use C for embedded software, but would never dream of designing hardware in anything else except pure HDL. It's a bit like trying to write a letter in a foreign language using Google Translate-- the results are non-optimal and often comical.

Re: Poll: Do you know C?

#109
post #55

Earlier quoted context omitted.

You don't know C. Coding in C and C++ has diverged significantly enough that they are two completely different languages. That said, answer #3 or #4 makes sense.

What knowledge about C do you think does someone miss when he is using C++? I have made the experience that a good C++ developer also automatically knows everything about C.

> I have made the experience that a good C++ developer also automatically knows everything about C.

Not even close in my experience. In college, we used C++ in our intro course. The addition of pass by reference, classes (with constructors and destructors), and the standard library (e.g. std:string) hides a lot of the common paradigms of C, and that's not even mentioning boost.

In my experience, people coming from C++ tend to write really bad C. Many of them have a poor understanding of the concept of pointers.

Once you get familiar with some good C design patterns, it's pretty easy to write clear, modular C. Knowing C++ is not a very effective measure of ability to use C.

Re: Poll: Do you know C?

#110
My second ever experience in programming (the first was typing in BASIC on a Soviet trash-80 clone) was typing in example programs from a C book. I did quite a bit of C programming in university. I've contributed C code patches to several Free Software projects. I am currently writing a C compiler.

You would think this would qualify me as someone who, if not enjoys, is at least is competent at C.

You would be wrong.

I absolutely despise C, and never would have become a computer programmer if I had to do most of my programming in C.

The horrible syntax, retarded pre-processor, and absolutely brain-damaged memory model (addressing modes? segments? virtual memory? reified stack? fuck that, let's just pretend everything is a pdp-11!) make it into this zombie that can't quite decide whether it's a shitty assembler or a shitty Algol clone.

I don't consider myself a competent C programmer, and I have no desire to become one.

Trying to write a compiler for C (https://github.com/vsedach/vacietis) has only cemented my dislike for the language.

I don't blame Dennis Ritchie for it. He probably thought it was a dumb joke too. I blame all the retards in the 1980s that thought it was the bee's knees and made it a "standard."

Post reply on HN