[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 29 KB, 500x487, Goat C.jpg [View same] [iqdb] [saucenao] [google]
4471191 No.4471191 [Reply] [Original]

Have any of you learned C as a programming language? If so, can anyone point me to good websites to learn it from? I want to start learning it, but I'm wary about where I should start....

Picture both relevant and irrelevant depending on how you look at it.

>> No.4471194

K&R

>> No.4471199

Yes. No.
Read K&R, you faggot.
Seriously, I hate people who "learn" programming languages through online tutorials. Surefire way to turn yourself in to a shitty programmer that doesn't know anything

>> No.4471214

>>4471194
Cool thanks. I read that you should know at least one other programming language before reading it though and I only know JavaScript if you can even consider that one.

>>4471199
I'm going to use a book now instead, thank you for your input.

>> No.4471226

http://www.youtube.com/user/thenewboston/

This guy taught me Python, and he's fucking good. Videos are brocken down into individual concepts so you can easily refer back to them or stop after a video to try things and play with what you learned. Many examples. Every concept is explained clearly.

He only seems to have videos for C++ though.

>> No.4471240

>>4471191
C is long outdated.

You can't go wrong with C++. If you want to develop games, learn C#.

>> No.4471252

>>4471240
I read it's good as a first programming language and I really wanted to learn it for website development before going on to learn PHP.

>> No.4471257

>>4471240
You're an idiot on so many levels.
>C is outdated
It's still the most popular programming language in the world. You see that operating system in your computer (it doesn't matter which one), that is written in millions of lines of C. You see that robot? programmed in C. Etc.
>develop games
If you want to develop games don't become a programmer. period. Become an artist or something

>> No.4471260

Do you have previous programming experience OP? Because that completely changes the sort of book you want to read.

>> No.4471263

>>4471260
True. K&R is an amazing book, but if you're new to programming it may not be the best choice

>> No.4471289

>>4471260
>>4471263
Not really. I don't think what little JavaScript I learned can be considered and I learned it a long time ago in middle school. The most I've made is a calculator.

So I'm assuming K&R isn't a good book for me. Is there some other book good for learning C since I have to agree, learning online at all probably isn't wise in hindsight.

>> No.4471296

My first course in C was excellent. I direct you to my CS teacher's course homepage for programming in C.

http://csiflabs.cs.ucdavis.edu/~ssdavis/30/homepage.html

There is links to the textbook we used in class (so so), but you can find it online no problem.

UNIX tutorials.
Midterms & Solutions
Extensive list of programming assignments, from the basic to the complex.

>> No.4471297

>It's still the most popular programming language in the world.
I'm genuinely interested in why. I don't see the point in ignoring the nice features of c++, such as const and inline, but people do it anyway. ???

>> No.4471316

>>4471297
Both C and C++ are shit if you actually want to get something done.

CAPTCHA: over-confi lolutes

>> No.4471320

Honestly, you're probably better off starting with Python. Once you've got the basic control structures down, then you can start dealing with datatypes and pointers.

>> No.4471327

>>4471297
Because it's extremely inefficient when compared to C, and all those added features are easily emulated (more efficiently) in C when required.

>> No.4471329

>>4471320
>Suggesting FIOC
You disgust me

>> No.4471332

>>4471327
Except for the efficiency of the poor sod having to actually program it.

Enjoy your unreadable preprocessor hell.

>> No.4471334

Depends. C really isn't a great first-timer language to learn. The best treatment would be K&R, but you shouldn't read that unless you're coming into C with prior programming from other languages under your belt.

>>4471240
C? Outdated? That's a good one. I guess it's not has hip as ruby or the latest javascript library that all the kids rage about these days.

>> No.4471335

>>4471332
>C
>unreadable
YOU'RE DOING IT WRONG

>> No.4471337

>>4471329
Have you read your SICP today?

>> No.4471338

>>4471320
I don't have a UNIX based OS so wouldn't learning Python be kind of useless for me? Also, I read C and Python are both good starting programming languages, but I think C would be better in my opinion.

>> No.4471341

>>4471335
What was the largest C app you've worked on? Hello world?

Pick any large C project and get back to me.

>> No.4471344
File: 54 KB, 505x416, 1282524279424.png [View same] [iqdb] [saucenao] [google]
4471344

>>4471337

>> No.4471345

>>4471341
FreeBSD.
You heard me.
Literally hundreds of files, billions of loc

>> No.4471346

>>4471240
As a C++ programmer for two decades, I have to say that it's a shit language. I only use a few non-C features, and often regret using those.

I find that whenever you're doing something that's awkward in C, you're usually better whipping up a little special-purpose language translator in perl or ruby than digging into the byzantine monstrosity that is C++. It'll take less code, and you'll tear less of your hair out.

>> No.4471347
File: 79 KB, 620x465, 1240465628042.jpg [View same] [iqdb] [saucenao] [google]
4471347

>>4471337

>> No.4471348

Also, I'm going to use a tripcode in case this thread gets spammed by people arguing what the best programming language is. I really just need a good resource for learning C....

>> No.4471349

>>4471240
Real hardcore programmers develop games in assembler (x64)

>> No.4471350

>>4471345
Have you actually read through it and understood it? I don't mean "find me a large program to prove that it can be done".

Other people can be masochists with their choice of language, but you don't have to.

>> No.4471352

>>4471348
Python.

>> No.4471356

>>4471345
>hundreds of files
>billions of lines

i'd love to see the look on the guy's face who sees "error on line 45017183"

>> No.4471358

>>4471350
Yes.
Not the whole thing, even the most senior developers haven't done that.
But I have spent many an hour looking through and understanding its core code

>> No.4471361

>>4471348
Third result is already a really detailed manual...
http://lmgtfy.com/?q=C+programming+Language

>> No.4471366

>>4471349
Real programmers just read the language's grammar and lex that they want to learn, then figure out the semantics through inference and deduction of the syntax.

>> No.4471369

>>4471338
I think you have that backwards. UNIX is written in C. Python is just kinda... whatever.

If you're going for website development (not sure if that comment was you or not) I don't think you'll benefit from the low-level-ness of C. What you need to learn first are concepts. There's a reason why MIT and Berkeley have switched to Python-based intro courses.

>> No.4471374

>>4471366
...
It was just a joke...

>> No.4471376

>>4471361
People recommended that already but since I don't have any other programming languages under my belt I don't think it would be wise to use it.

But think you for Googling it for me although the point of this thread was to get recommendations from people that already learned C or know what they're talking about. I could have Googled it myself if I wanted to, thank you.

>> No.4471379

>>4471374
As is my post.

>> No.4471389

>>4471376
Don't learn C OP. I don't want to see any more "struct hurp *durp = malloc(3490);" posts around the internet.

>> No.4471391

>>4471389
what is struct and malloc
i just wanted to know why gets isn't working
should i flush stdin?

>> No.4471397

>>4471389
>>4471391
FOR THE LOVE OF GOD

>> No.4471399

>>4471391
I laughed more than I should have

>> No.4471402

>>4471376
You shouldn't start by C then, start wih something simpler, i started programming at a really early age(8 years) and i started with Visual Basic, but somenthing like java or Visual.net should be simpler, then jump to harder things like C++ and C.

>> No.4471405

>>4471389
>>4471391

Ha, I wish I could get those jokes. Unfortunately, I don't know of any good books to teach me C so I guess I'll just Google it now....

>> No.4471411

>>4471405
Beginner C programmers try to manually calculate the size of their structs (a record) and they get all sorts of problems--wait a second. "size of"? Gee, wouldn't it be nice if there was an operator that calculated the *size* *of* data types? OH FUCKING WAIT THERE IS

AND GUESS WHAT

IT'S CALLED SIZEOF

>> No.4471412

Go like this op, java - c - c++ - python - sicp

For java go bruce eckel's "Thinking in Java"
For c go K&R
For c++ go "Accelerated C++"

>> No.4471416

>>4471405
1. Download Visual C++ 2010 Express

2. Read EVERYTHING linked to by this page:
http://msdn.microsoft.com/en-us/library/fw5abdx6.aspx

3. Ignore all other tutorials until you know what you're doing.

>> No.4471418

>>4471346
Go to bed gramps.

>> No.4471419

>>4471412
Oh and fuck languages learn data structures, algorithms, quality control and object orientation. Languages are so secondary to this.

>> No.4471423

>>4471412
Hmm, not sure about your path to success, but thanks for the Java resource.

>> No.4471430
File: 38 KB, 739x1013, startingforth.jpg [View same] [iqdb] [saucenao] [google]
4471430

Be cool and learn Forth.

>> No.4471449
File: 410 KB, 1189x1424, eb9a051f-4b9e-45bd-a966-276cc4b1f248.jpg [View same] [iqdb] [saucenao] [google]
4471449

>>4471418
He should learn FORTRAN because it produces faster numerical code.

>> No.4471459
File: 34 KB, 765x720, Meh.jpg [View same] [iqdb] [saucenao] [google]
4471459

>>4471449
Lmao. Okay, the thread can die now.

>> No.4471461

its not a joke

>> No.4471486

>>4471297


http://harmful.cat-v.org/software/c++/linus

>> No.4471492

>>4471486
linus is the man