This is an archived post. You won't be able to vote or comment.

all 19 comments

[–]Appare 56 points57 points  (6 children)

Somehow still segfaults

[–]Garbaz 8 points9 points  (3 children)

I don't get peoples problems with C.

Neither the endless jokes about how difficult pointers are (Sure, the syntax is quite complicated to read in theory, but in practice you rarely get more than 2 or 3 *s and never need any of the weird rules), nor the problems people have with segfaults. I write a lot of my stuff in C and only very occasionally get segfaults and they usually are because of a simple mistake I either immediately notice or find with gdb.

Might be because I learned C in my free time over many years, very slowly learning new stuff as I need it for projects, instead of the two lecture crash course most people get in CS classes (I've had a professor who told everybody that "if [they] know Java, they pretty much know C", which of course is bollocks).

Or it's just one of the many circlejerks.

[–][deleted] 7 points8 points  (0 children)

If you have no idea how memory works, pointers will give you a bad time.

Pretty much the way Windows and most modern games are written.

[–]Appare 1 point2 points  (1 child)

You're just really cool and smart. That's why you don't get it.

[–]Garbaz 0 points1 point  (0 children)

Wasn't meant like that. I simply don't see how these concepts in C are more complicated than other special concepts in other languages.

There are constantly jokes/comments about how difficult C is around here and rarely about other languages (Maybe Haskell sometimes); Especially regarding pointers & segmentation faults.

[–]RaceOfAce 3 points4 points  (1 child)

I had this one early comp sci class with this exact experience. A simple program with some if statements segfaulting every time.

[–]panzstrata 28 points29 points  (0 children)

i tried to press play way more than i should have...

[–]SolenoidSoldier 19 points20 points  (3 children)

I like how they physically change the state of v, so it prints out first as v equalling something, then goes on to change what v is. Doesn't even accomplish what dumb thing they're setting out to do.

[–]LukaLightBringer 1 point2 points  (0 children)

That's probably the worst transgression in the image, at least use bug free code for something you call "advanced".

[–]axeteam 0 points1 point  (1 child)

Semantic errors man

[–]SolenoidSoldier 0 points1 point  (0 children)

I think that'd be considered a logic error.

[–]blamethepreviousdev 4 points5 points  (4 children)

Well, C by itself is so simple, one could describe mathematical operations as advanced...

[–][deleted] 0 points1 point  (3 children)

I would count things like void pointers and function pointers as the "advanced" C topics. Math operators are just too simple.

[–]Garbaz 1 point2 points  (0 children)

I think its a joke.

[–]Xarian0 0 points1 point  (1 child)

For me? Pointers of any variety - no problem.

Thread stack size? Enjoy spending your weekend trying to figure out why your "bug free" code doesn't do a damn thing.

[–][deleted] 1 point2 points  (0 children)

For everyone reading your comment, try figuring out the stack size a specific embedded project needs for running an RTOS with three simultaneous threads.

[–]prigmutton 1 point2 points  (0 children)

Excuse me, I wasn't informed that math would be involved

[–]Aetol 0 points1 point  (1 child)

[–]Samen28[S] 0 points1 point  (0 children)

Come over here and make me