We found 325 Reddit comments about C Programming Language, 2nd Edition. Here are the top ones, ranked by their Reddit score.
I'd start with Harvard's CS50 on edx, it's the best course you'll find anywhere bar none. The instructor, Dave Malan is world class. Check out CS50, and the sub r/cs50 has a lot of like minded people like you. (Note: this course is free)
Stackoverflow is your friend where you can ask any question you have or bounce ideas off of others.
Learn Java OOP (here is an excellent course): Java MOOC
Free Code Camp for web development
Build your own operating system: NAND2TETRIS
Cave of Programming : All kinds of programming
Open Source Society University: This is a solid path for those of you who want to complete a Computer Science course on your own time, for free, with courses from the best universities in the World.
r/arduino for some embedded programming fun!
.....and of course for anything under the sun: https://www.edx.org/ & https://www.coursera.org/
For BSD: https://www.freebsd.org/
For Linux: https://www.archlinux.org/
For x86 assembly: http://opensecuritytraining.info/IntroX86.html [How far down the rabbit hole do you want to go?]
Edit: Wow, my first Reddit Gold!! Thank-you so much kind people!!
Edit2: Colt Steele has a good web dev course and is highly recommended to do in parallel with freecodecamp
Edit3: The MIT Challenge
is Scott Young's blog on how he completed the entire 4 year MIT Computer Science curriculum in 12 months
Edit 4: The Rails Tutorial by Michael Hartl is the Bible for learning Ruby on Rails
Edit 5: For deeper knowledge of OOP check out Sandi Metz’s POODR
Edit 4: The Bible for C Programming: K&R
Here's my list of the classics:
Ditto - I have a Eastern Economy Edition of K&R when I took up learning C as a hobby. When I looked up the price for the same on the US version of Amazon, the price comparison was startling.
[Here's the US paperback version, priced at about 53 USD according to Amazon, i.e. 3,554 Indian Rupees. Of course, the cheapest one you can still get new is about USD 15 or so dollars. ] (https://www.amazon.com/Programming-Language-Brian-W-Kernighan/dp/0131103628/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1474085789&amp;sr=1-1&amp;keywords=kernigan+and+richie)
Here's the Indian "Eastern Economy Edition", paperback, of the same book, identical in every single respect, priced at a whopping 194 rupees, or about 3 dollars.
For the money you'd be shelling out, it'd be cheaper for you to buy a brand new copy of the book from an Indian bookstore and have it shipped out to you (possibly even through an express courier like DHL or FedEx) in the US than just buy the book in the US outright.
The C Programming Language (commonly known as K&R) remains the best resource for learning C.
the bookstores of American universities are independently owned/operated to the university, and in fact just license or are a reseller of materials from the university itself when it comes to branded gear.
They're known to overcharge for a lot of books. Consider that The C Programming Language costs $30 new for a copy. My university wants $50 for a used copy of an out of date printing that was based on a draft.
The professor of this class actively says "DO NOT BUY THE BOOK. I WILL PROVIDE YOU A PDF." Despite this, people still buy the book.
This semester, I bought a book for one of my classes on amazon because the bookstore was like "LOL IT'S OUT OF PRINT WE DON'T HAVE IT." This was inverse of the email (that was later claimed as "forged") from the instructor, forwarded from the bookstore, saying it was in stock. On top of that, they wanted $350 for a book that's $40 new.
To get a feel for low-level computing you should learn C. All modern operating systems and low level utilities are written in C (or C++, which is C with objects). It is as close to the metal as you can get while still being useful. Maybe you could fiddle around with some assembly afterwards.
Now, as for understanding how an operating system form top to bottom works, Windows is a pretty shit place to start for the following reasons:
Thank you all for your responses! I have compiled a list of books mentioned by at least three different people below. Since some books have abbreviations (SICP) or colloquial names (Dragon Book), not to mention the occasional omission of a starting "a" or "the" this was done by hand and as a result it may contain errors.
edit: This list is now books mentioned by at least three people (was two) and contains posts up to icepack's.
edit: Updated with links to Amazon.com. These are not affiliate - Amazon was picked because they provide the most uniform way to compare books.
edit: Updated up to redline6561
Here is a "curriculum" of sorts I would suggest, as it's fairly close to how I learned:
What OS? Linux, of course. When TPB order everything locked down, you don't want to be caught using a Microsoft OS. -- What distribution? The easy path is Ubuntu, with the Cinnamon UI, or LinuxMint 13, when issued (May 2012).
What IDE? There's lots to choose from. My favorite is "geany".
For TCP/IP protocol tutorial. Recently updated by Wright:
Stevens, "TCP/IP Illustrated", 3-volume set.
On human interface guidelines relevant to programming:
For GNOME 2, see:
To develop Linux applications:
You are right. You MUST know how to program in C. When others tell you that object oriented programming is the thing, know that you can do object oriented programming in C. Avoid interpreted languages (Python, Java, and others) as a first programming language. Interpreted languages teach bad habits and hid too much of what's going on from you such that debugging becomes difficult to impossible.
However, if all you intend is "casual programming", the Python will do, if you must. It's just not the best choice first a first language if your intent is to become a "professional programmer". I use Python myself; It works for what I need to do quick and dirty.
Definitive, but for experienced programmers:
As a tutorial for someone learning a first programming language and how to program from zero:
Perry, "Absolute Beginner's Guide to C", 2ed.
-- I have not read the book, but the ToC looks reasonable for a beginner.
OK, you don't want a full CS curriculum, but some topics in discrete mathematics are mandatory. ... Ack! Having looked over the offerings at Amazon, I believe that Epp, "Discrete Mathematics with Applications" may be the best of the lot, but at $187, it is hard to recommend without knowing your intent and interest. The reason I suggest this title is that it looks focused on application to computer science topics. It covers a number of topics that are NOT covered in many of the other titles, enough so that should you use other texts you will have spent more than the $187 that this title includes. JMHO.
See also: Sedgwick, "Algorithms" -- You'll probably need it sooner than later.
Remember that Linux OS? You are going to need some programming tools, right? If you intend to write GUI applications based on the GTK+ toolkit, then install the package "glade" or "glade-gtk". Installing a glade package will suck in over 100 other packages essential to building a GTK based GUI application. Specifying glade to the package manager is just easier that finding and installing all the other necessary parts by hand.
If you are going to do command line based UI programs, then package "build-essentials" should be adequate.
There are some other things to read:
On how to organize, grow and maintain a Linux software development project: Fogel, "Producing Open Source Software"
You can read it online here, but buy the book too to help support Fogel. He's gotta eat too.
On the culture of writing Open Source Software:
Raymond, "The Cathedral and the Bazaar"
Linux programming is not like Windows programming.
Read and study ESR's TAOP.
Raymond, "The Art of Unix Programming"
You can read it online, free. However, buy a hardcopy too. Raymond has to eat too.
Now to get really technical. What interface do you write to?
Kerrick, "The Linux Programming Interface: A Linux and UNIX System Programming Handbook"
Beginning to focus on GNU style programming:
GNU Coding Standards
GNU Coding Standards is more than how to and how much to indent a line or how to set braces. You will get into the topic of Make and Autotools. Make is a program to build complex softare and Autotools is about how to build a package for distribution, the package that any Unix flavor can use; it is not focused on any specific distribution. See also: "configure and make"
Enough! There's more, but I have too much time in this already for today.
If you're new to C, read K&R.
Once you've done that (or if you already know C) then read THE book on Unix programming
K&R. If you're in a programming 101 class that involves C, just buy this book unless your prof tells you otherwise.
K&R has the reputation it has because they did an excellent job of balancing between "experienced programmers can use this as a reference" and "newbie programmers can use this as a starting point. Let me clarify: K&R will not make you a better programmer, but it is an excellent example of what industry professionals would consider to be a good piece of technical documentation.
If you're going to ever work with APIs or large amounts of technical documentation about software, this book will mirror the experience you get reading "good docs". In short, learning C from this books does an excellent job of showing you how much you'll have to figure out yourself and what information you should be expected to be given to you when working in the industry.
C++ Primer is amazing, but definitely not for beginners. Since you're totally new to programming, I'd suggest learning a bit of Python first to get the basics down, or if you're feeling more adventurous, pick up a copy of K&R's "The C Programming Language", as it's a great introduction to lower-level programming, and it'll make C++ a lot easier to understand.
Some good freely available online Python books:
Invent With Python
Learn Python the Hard Way
Learn Python the Hard Way is easier than it sounds, I assure you. I would definitely recommend starting with Invent Your Own Computer Games With Python, though.
A couple more useful things to know:
Either K&R's The C Programming Language which is often considered "The C Bible" and is written by the authors of C, or a more recently published C Programming: A Modern Approach are both excellent and comprehensive learning resources. I personally recommend the latter because I believe it is more relevant and includes almost, if not all, the information in K&R.
I'm confused do you want someone with a native American accent, a British accent, or and American accent?
(Also in general videos tend to be a poor medium for learning the C language. Most learn from books like this)
Best one out there: https://www.amazon.com/Programming-Language-Brian-W-Kernighan/dp/0131103628/
I heard this book is good:
If you aren't doing well in your current CS courses, I'd highly recommend you focus on your university's courses and do well in them before deciding to bite off more than you can chew. Do some research and look for very basic coding books, not ones like this: https://www.amazon.com/Programming-Language-Brian-W-Kernighan/dp/0131103628/ref=sr_1_1?ie=UTF8&amp;qid=1478891766&amp;sr=8-1&amp;keywords=introduction+to+C+programming
Look for a bit more like this: https://www.amazon.com/Head-First-Java-Kathy-Sierra/dp/0596009208/ref=sr_1_1?ie=UTF8&amp;qid=1478891799&amp;sr=8-1&amp;keywords=Head+first+java
This depends on what language you are currently learning right now. Don't worry about entering contests and participating in projects or open source coding until maybe second or third year in especially if you haven't had any prior experience. Don't rush yourself into this, you need to make sure you absolutely understand the basics before going into things like hackathons or being very concerned about internships. Take your time learning, and don't enroll onto too many online courses if you think that you can't handle it. Yes, online courses can be helpful, and will only be really helpful if you treat them like real classes. I would advise against code academy or khan academy to learn languages since I've gone through them and they never helped me really grasp CS material better than a book and actual coding. Key here is to code as you go through a book, or else you'll never learn how to actually code. Do tons of simple programs and if you don't understand code bits, don't get frustrated. Copy paste the code, and use a debugger (a bit more advanced but very very helpful) to go through step by step what the code is doing.
I started to teach myself C, and this book has been an unbelievable resource. It starts pretty basic, but it gets into the meat of C pretty quickly.
I recommend reading and working through The C Programming Language, which will likely be your textbook. Java syntax comes from C/C++, so that part will be somewhat familiar. C is a lot more low-level, though.
Kernighan and Ritchie's The C Programming Language
It will teach you almost all you need to know. It is written by the creators of C and is still the best way to learn C.
I even use it as a reference for parts of C I do not use often.
Also, you should try to be running a unix os, since c programming will be much more integrated and easier.
"The C programming Language" is an excellent book. I learned most of the concepts and coding from that book.
> 3) is it hard to program your own apps? I know a bit
> about programming (limited experience in college).
> Would I be able to pick it up easily?
Don't see anyone answering this part of your question so I'll take a shot at it:
The Pebble is programmed in C, which is not the simplest language to learn, but it's certainly doable and once you master it you'll be in awe of what it can do. It's the programming language of choice for small footprint embedded systems, so you'll find this a useful skill in the long run, even if it's just to understand what others have to do to make your app a reality.
If you've never programmed in C it's probably best to get a book and start reading. I started with Kernighan & Ritchie's The C Programming Language -> and still feel it's the Bible from which all others are derived. Of course, if you under 25 and don't know what a book is, you can always hike off to the Google and start searching "C tutorial").
Pebble Central will provides you with an SDK with all the libraries you need to access Pebble features (e.g. User Interface, timers, comm to/from the watch, etc) but to make this work you'll also need a dev environment to hook all this up to your code.
The traditional/"hard" way to code for Pebble is to set up the Pebble dev environment on your computer and use command line tools to edit/build your app. For this you'll need a copy of the Pebble SDK and a Linux/MacOS machine Inexplicably, Pebble development is not currently supported under Windows, although if you're a real keener you can set up a virtual machine, install Linux and fake it. If you want to go this route, Google "Pebble Vagrant development" and click on the first link okay, if you're really lazy you can click here ->.
Note: I've tried the Vagrant/VirtualBox VM route - trust me, it's currently so poorly documented as to be a true pain in the ass. Not recommended if you can avoid it...
Which brings us to the other alternative. Katharine Berry, an MIT student who apparently dabbles in things Pebble in her spare time, has produced the site Cloudpebble.net ->. This is a fully integrated IDE, with GitHub support and built in SDK. This really does simplify the task of building Pebble Apps, although at the expense of some privacy, as your code lives on somebody else's server. This is no problem if you're developing open source apps or simply teaching yourself but would probably be an issue for commercial developers. Still, I can attest to how much easier it makes things if you're primary focus is on getting your first app done. I love it and recommend it highly.
Whichever approach you take, you'll find the Pebble Central developer site a useful place to hang out. It's got the online docs, links off to developer forums and more. [Pebble Developer Central is located here ->] (http://developer.getpebble.com/).
There are a few examples of programs out there you can use as tutorials and/or starting point for your own designs. I found Katharine Berry's peapod App (a music control app for iOS) to be a good starting point and her httpebble App is the definitive tool for accessing web resources. Her GitHub home is here
I've also written a couple of Pebble Apps and turned them lose under the MIT License (free for reuse if attribution is preserved). My Tempus Fugit App was (I believe) the first to provide multitasking capability, as well as stopwatch, timer a "meeting cost calculator" and multiple watchfaces all in a single app. Source code for this is available here I made an effort to comment the code to help folks figure out what's going on, so hopefully this will help you get started with your own app.
So that's a quick tour of what it takes to get started. Please feel free to post follow-up questions and I'll do what I can to fill in the missing bits...
The C Programming Language
Start with a good algorithms book like Introduction to algorithms. You'll also want a good discrete math text. Concrete Mathematics is one that I like, but there are several great alternatives. If you are learning new math, pick up The Princeton Companion To Mathematics, which is a great reference to have around if you find yourself with a gap in your knowledge. Not a seminal text in theoretical CS, but certain to expand your mind, is Purely functional data structures.
On the practice side, pick up a copy of The C programming language. Not only is K&R a classic text, and a great read, it really set the tone for the way that programming has been taught and learned ever since. I also highly recommend Elements of Programming.
Also, since you mention Papadimitriou, take a look at Logicomix.
And when you're done with those, you can try to learn Java and use libGDX, or C# and Unity.
GameFromScratch.com has plenty of tutorials to get you started.
When you've decided you want to be an ultra low-level programmer, buy The C Programming Language. Learn the basics of C, and then follow Handmade Hero.
When you're done with that you're probably on your way to become a godly programmer. You'll probably know how to do some assembly and machine code by then.
But first, you're gonna need lots of discipline to even get to anywhere.
There are no shortcuts.
If you just want to make a game, however, GameMaker and Construct 2 are pretty awesome!
C is good to learn as a beginner, although it is an unforgiving language. If you can write C, you will be able to learn the vast majority of other programming languages in common use today with a very small learning curve.
Any CS department worth anything is going to have you write in low level languages at some point, especially C and assembly.
To get started, you're going to need a good C compiler - I recommend GCC. The C Programming Language is also a priceless resource for anybody interested in learning C. Finally, although this is optional, you should learn to use a "serious" text editor, such as emacs or vim.
If you already have an engineering degree then you already know how to study. What experience do you have with embedded? If you don't have any then you should be sure it's what you want before you commit to anything huge.
I think the best way to get a job in embedded systems is to build embedded systems, and not bother with language certifcations. I might be going against the grain here a bit but I would suggest starting to dip your toes into embedded systems by buying an arduino and messing around with it.
Arduino gets a lot of flack for being "not real" embedded systems, and while it's true nobody is going to hire you because you can make an impressive arduino project, IMHO it's a great introduction to what embedded is about. The hardware equivalent of "hello world" is blinking an LED. If you are serious about learning then you will quickly outgrow the arduino, but you can always throw away the bootloader and try to program the ATmega with bare metal gcc and avrdude.
I don't know what you already know nor how you feel about math, but things you will want to learn include:
As someone who also has been looking to delve deeper into C for a better understanding of the language and programming in general, I would recommend The C Programming Language, 2nd Edition by Kernighan and Ritchie.
While it's not a huge tome of a book, the amount of material and exercises is invaluable, and I've learned more in the first 15-20 pages than I've learned googling or from other resources in the last several months. For 35 bucks new, this book is worth it, although it's even cheaper if you rent or buy it used.
People might argue that you really don't need to learn C. They are lying to you. Go buy this read it over the summer, it will do nothing but help you with anything else you ever decide to code in even if you never touch C again.
Read the sidebar.
If you haven't had programming knowledge before, then The C Programming Language by Dennis M. Ritchie and Brian W. Kernighan is right up your alley.
Good news is you have previous experience and C is a very simple language.
Learn C The Hard Way has some weird shit in it (wtf does "make is your Python now" even supposed to mean?) but it is largely good and do tend to recommend it despite the warts.
Really though, why not go straight to the source?
Just make sure you master pointers. It is really useful to understand what memory is on a physical or near physical level to understand pointers. It is one of those concepts that makes instant sense if you come from a hardware point of view, but can trip up newbies with a software point of view.
Introduction to Algorithms by CLRS
TAOCP is a waste of time and money; it's more for adorning your bookshelf than for actually reading. Pretty much anyone who suggests TAOCP and is less than 55 years old is just parroting Standard Wisdom™.
Godel, Escher, Bach is a nice book, but it's not as intellectually deep in today's world as it was when first published; a lot of the memes in GEB have been thoroughly absorbed into nerd culture at this point and the book should be enjoyed more as a work of art than expecting it to be particularly informative (IMO).
If you're interested in compilers, I recommend Engineering a Compiler by Cooper & Torczon. Same thing as TAOCP applies to people who suggest the Dragon Book. The Dragon Book is still good, but it focuses too much on parser generators and doesn't really cover enough of the other modern good stuff. (Yes, even the new edition.)
As far as real programming goes, K&R's The C Programming Language is still unmatched for its quality of exposition and brevity, but these days I'd strongly suggest picking up some Python or something before diving into C. And as a practical matter, I'd suggest learning some C++ from Koenig & Moo's Accelerated C++ before learning straight C.
Sipser's Introduction to the Theory of Computation is a good theory book, but I'd really suggest getting CLRS before Sipser. CLRS is way more interesting IMHO.
La plupart des formations t'apprendront rien d'utile mais prendront volontiers tes thunes.
Sinon t'as le CNAM, c'est bien, si tu veux à tout prix un vrai diplôme (ça aide à trouver le premier taff).
Tu peux aussi faire ça en solo :
> I'm taking a Unix class in c/c++.
Those are two very different things. Please clarify.
> We are using the book by Sobell. I want to ask if I should read the book?
Uh.. if it's required for your class, yes you should obviously read it. If you are looking for supplemental material, I'd suggest:
Il mondo della programmazione è incredibilmente vario, ti consiglio di cominciare con qualcosa che stuzzichi la tua voglia di fare, potrebbero essere le applicazioni web, oppure sviluppare su android o iphone, come la programmazione di videogiochi oppure realizzare un programma per windows o per linux.
Una volta capito cosa ti piacerebbe provare indirizzati su qualche tutorial veramente basilare, e impara facendo.
Se dovessi indicarti un linguaggio da cui cominciare non avrei dubbi: il C.
Non C++ mi raccomando ma il C puro.
Esistono diversi testi incredibilmente validi e oltre alla Bibbia ti consiglio di farti un giro su amazon per cercare qualche introduzione a qualche argomento o linguaggio specifico, tipo "coding for dummies" ecco.
Gli argomenti base che dovresti cominciare a studiare riguardano la programmazione procedurale ad oggetti.
Esistono altri paradigmi di programmazione come ad esempio quella funzionale ma al momento lasciala pure stare.
Ovviamente tutto in inglese, mi raccomando.
K&R is the book for C, especially if you have prior programming experience.
The best way I know how is by solving problems yourself and looking at good solutions of others.
You could consider going back to "fundamentals".
Most programming courses, IMO, don't have nearly as many exercises I think they should have. Some books are particularly good on their exercises list, for example K&R2, SICP, and TC++PL. Deitel's has long exercises lists, but I don't think they're particularly challenging.
There are some algorithms/DS books which focus on the sort of problem solving which is about finding solutions to problems in context (not always a "realistic" one). Like the "Programming Challenges" book. In a book like that, a problem won't be presented in a simple abstract form, like "write an algorithm to sort numbers". It'll be inside some context, like a word problem. And to solve that "word problem", you'll have to find out which traditional CS problems you could solve/combine to get the solution. Sometimes, you'll just have to roll something on your own. Like a new algorithm for the problem at hand. In general, this helps you work out your reduction skills, for once. It also helps you spotting applications to those classical CS problems, like graph traversal, finding shortest plath, and so forth.
Most algorithms/DS books though will present problems in a pretty abstract context. Like Cormen's.
I think, however, people don't give enough credit to the potential of doing the exercises on the books I've mentioned in the beginning.
Some books I think are worth reading which also have good exercises:
I would make the logo a blue C, like in the title page of The C Programming Language: https://i.imgur.com/yMpmgEp.png
The C Programming Language is what I'm reading now.
Pick up a copy of K&R (ANSI edition). It is thin and the definitive reference. You can burn through the exercises pretty quickly, especially if you have used Java, C++, or C#.
Ridiculously-priced hard copy (IIRC, I paid about $20 for my copy.)
If you want to know what programming is like, try Stanford's CS101 course. It's very basic but gives you a taste of what you can learn. You can breeze through it in a week or two. Don't worry about memorizing the code, just focus on the concepts.
If you finish that and enjoyed it, you can try M.I.T's 6.00 1 course. It teaches you Python, one of the easier programming languages to start with. This course is longer than the first one and is an actual programming course. It recommends the book Introduction to Computation and Programming Using Python if you need it.
After that, I would say give Harvard's CS50 online course a go. This course teaches you the C language and is easier to complete if you did the first two courses. This course recommends the books: The C programming language book or C programming: an absolute beginners guide for a more beginner friendly (and budget friendly) option.
Good luck and have fun
The C Programming Language by K&R is probably the first book people recommend.
Learn C The Hard Way is more hands-on, but if you already know other programming languages youll be fine.
I dont know about any interactive courses, but HackerRank has lots of challanges you can solve in a multitude of languages (including C) which is pretty close to CodeAcademy. Keep in mind that it gets hard pretty quick, so it is better to be somewhat comfortable with your chosen language before doing them.
I've been self-teaching myself C through various books/courses/series the last few months (I'm still not that great), and so I have some suggestions about good places to start learning.
Any book on technology. Like this one. Oh yes, most Indians wanting out are settled in the US or the UK or Australia nowadays. I'm mostly a lurker here and on reddit. I don't understand most of the posts, especially the ones on politics, although I'm learning new terms like Dail and Taoiseach and I'm pretty sure I don't know how to pronounce these words. I'm trying to participate in self posts like these.
I haven't read either of those, but I did enjoy and find a lot of value in K&R and 21st Century C.
+1 for mentioning malwareunicorns Reverse Engineering Malware 101 course. I'm pretty excited about starting that after I'm done with some Powershell stuff.
Books for: /u/Kreator333 and /u/curiousdoggo
Kernighan and Ritchie
If you're looking to learn C, get K&R.
I suggest disconnecting the two. You need to have a firm grasp on C or C++ programming before going into graphics. It's a long road, but worth it.
This book is considered the authoritative source on C programming, written by the creator: http://www.amazon.com/C-Programming-Language-2nd-Edition/dp/0131103628
Here are some text based tutorials that I used to learn OpenGL recently.
Check the syllabus and get a head start on the topics covered. My two favorite C books are C Programming: A Modern Approach and C Programming Language. The first one is for absolute beginners, while the second one is for someone who already knows the basics of programming.
This. Full stop.
Not sure about EE-related topics, but for CE you're almost guaranteed to use these textbooks:
Yes. Everyone should own a copy of: https://www.amazon.com/Programming-Language-Brian-W-Kernighan/dp/0131103628/ref=sr_1_1?ie=UTF8&amp;qid=1494216538&amp;sr=8-1&amp;keywords=c+programming
Io direi di iniziare con il C.
Il manuale che consiglio(io) è, solamente, questo:
The C Programming Language: ANSI C Version
Introduction to Algorithms by CLRS. Used in almost every algorithms class I've heard of, and a great reference book. It's about 1300 pages, so don't try to read straight through it.
C Programming Language by K&R. This is a C programmer's Bible.
Design Patterns by the Gang of Four
This is a little more of a topic book, but The Art of UNIX Programming by Raymond.
These are all either pretty common, or almost essential. You'll probably see these in your curriculum anyway, and you should. These are a good cornerstone.
Learn 'C' and 'Python'.
'C' is the lingua-franca of computers.
Start with K&R's 'The C Programming Language'.
Python as a high level language for getting things done. 'Dive into Python' is a good start.
The C Programing Langiage
The Standard C Library
Answers To Exercises
Computer Science For Everyone
Got a Question?
Buy K&R and do the exercises.
You may also find /u/_Madk's list of projects interesting. It focuses a lot of games, if you're into that. A lot of those are pretty easy to show to non-programmers, which is always nice. (ex. Dad can appreciate Tetris more than your Red-Black Tree)
If you want to learn C - you should read K&R's The C Programming Language (the bible for C) and do all the exercises.
Also - the first half of CS50 is in C. r/cs50
I had no real programming experience before I started C as part of a university course. Thankfully, my first course was on the language itself so the problems were all based around understanding the fundamentals of C itself (not on the theory of algorithms).
I know some people here are criticising it as a first language choice, and I'll admit that I am in two minds about recommending it. However, I'm struggling to think of a better choice.
So I'll assume that isn't up for debate or maybe even the class recommends it?
Unfortunately I have never taken a relevant MOOC in this area. I have looked at several books however:
I can't avoid mentioning The C Programming Language by Kernighan and Ritchie aka K&R - if only to say I dont recommend it. I own a copy and feel its not really appropriate for a complete beginner. Its not a book you can sit down and read through. Its basically a reference manual, to be used to help provide context for a particular problem. Unfortunately, at the start I would know what I wanted to achieve but didn't know the correct terminology to describe it, in which case the index becomes useless (even Google can't work these types of miracles).
Absolute Beginner's Guide to C by Greg Perry is however very readable. Its probably a little too verbose for someone who has prior programming experience - as the title suggests its written for the absolute beginner. It should be ideal for you however. If you are prepared to go for a book rather than a MOOC I highly recommend it.
I have been working through C Language: 2nd Edition have been having a few problems understanding a few things but good book!
ATLien325's comment explains that terminology in a pinch, but it's not really going to get you very far on your way to learning how to hack. Your best bet would be to pick up books like this, this, and this. Then you'll have an idea of how programs, file systems, and networking work behind the scenes and you are much better situated to begin to learn how to hack them.
You're also going to need to learn how to effectively use a search engine.
Just learn C. There are tutorials all over the place, or you can buy http://www.amazon.com/The-Programming-Language-Brian-Kernighan/dp/0131103628
I learned it from this book around 25 years ago:
But you can probably save the money and just use any tutorial on the internet. I'd recommend just starting out with C++ though. When object oriented programming went mainstream, I had a lot of trouble switching over to the new mindset. You're better off learning OO from the beginning.
Haha, sorry it is a commonly referenced book I did not even think about it.
Brian Kernighan and Dennis Ritchie (early developers / creators of UNIX) wrote a book called The C Programming Language. Make sure you get the second edition though.
Read "The C Programming Language" ( https://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628 , it's also on libgen)
Make sure you're cool with data structures (most of them are important, but hash tables are very key because they form the basis of caches, something you'll have to learn)
Look up some basic digital logic (up to flip-flops and d-latches, and cover some FSM too if you have time)
I don't really know of any great resources to self-study assembly, so you'll have to just make the most of the lectures on that.
Prof Nagarakatte is super fair imo. Multiple project extensions, a multitude of extra credit opportunities (I believe it totaled to something around 15% of the total course grade with max extra credit when I took it), and no curve- you just need an 85% (after extra credit is applied) to get an A, which is nice. The best thing about him, though, and something I've never seen anywhere else, is that the TAs know what they're doing. He tries to get his own grad students TA positions, and so he's got a great working relationship with them. Go to recitation, because the TAs know what's up and will often write out significant portions of the projects for you. In my opinion, the course wasn't particularly easy, but an A is definitely achievable as long as you put in the effort. His lectures are pretty fast, but the slides are online and fairly self-explanatory, so try to go over them after each lecture if you can.
K&R is the go-to C book, IMO.
"the" C book: http://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628
Okay I came in to school like you with very little programming experience. Probably even less than you since I only messed around on my TI. I am going to assume you're only taking ECE110 first semester. If not I recommend getting in as soon as you can. They may give you some crap about it depends on last names, but it doesn't really matter. After a certain point its open to everyone.
Either way, programming in ECE doesn't really start until you take ECE190 which is all C programming and a very simplified assembly language for educational purposes. Like I said I went into the class with practically zero programming experience and still did very well in the class, so don't let anyone scare you on that. If you put the time aside to read the book (really helpful in 190) and doing your MPs/ask the TAs questions you will do fine.
I wouldn't fret too much over the summer with learning stuff, but I would definitely recommend C over Python. Python is pretty easy to pick up, but its also very high level. If you need an introductory language to get familiar you can try python for a bit, but I'd go with C after that. It is worth noting that the other two required programming class you have to take (CS 225 and ECE 391) are C++ and C/x86 respectively. So learning C should definitely be your focus.
I recommend the book written by the creators of the language. The book the school requires is pretty good too actually and would give you a better idea of what to expect. They're kind of pricey, so its your call how you want to get them. As a heads up, codecademy does have Python, but not C as far as I recall. I've never used lynda do I can't comment on them C Book ECE 190 Book
I honestly wouldn't fret too much about it all. Enjoy your summer, depending on how busy your schedule is next semester you can probably set aside some time now and then to study some languages. If you have any more questions I'd be happy to answer.
Here are some books that I feel have made me better professionally. They tend toward the comp sci side, some are more useful than others.
That book is generally considered the C Bible, and a great introduction to C. It's worth keeping in mind that their library isn't clear about what functions are insecure, however.
Edit: as /u/mianosm pointed out, I actually meant The C Programming Language is the C bible. (The book can be found online as well.)
The C Programming Language:
You'll do fine. You're a physicist, second smartest people in the universe behind the mathematicians :)
Pick up a copy of 2nd edition K&R C and go through it. It's a short book and has everything you need to know about C.
I doubt they are going to throw you in too deep and it's likely they will have some experience with the environment since they seem to be specifying it. That is, you should have a number of tools at your disposal. If you get stuck, just ask someone.
Spend few years with this, then ask questions.
C is a very small language that is easy to pick up, but takes a long time to master. This book is considered the gold standard. Good luck!
Others have mentioned that this is probably not the route to go with "0 computer knowledge". I would agree with them, but in case you decide that you really must start with C, here is the book. It's the most recommended resource, and it is for a reason.
First you need a compiler. IMO the best thing to use is GCC, the GNU compiler, on linux. It will force you to learn how to write your makefiles and you'll get more exposure to linking. If you're committed to windows there is Microsoft Visual studio, but this is not my domain. I remember using an IDE called Dev-C++, a free software, in college and it can compile C. But by sophomore level courses we were using GCC. If you're running Mac OS X you can get GCC using the brew package manager.
Then you need a 'resource' that will help you. C Programming Language, 2nd Edition by Kernighan and Ritchie is an excellent resource. Its dry and to the point and it makes for a good reference later on. I'm sure there are a lot of free online classes and tutorials to get you started as well.
One thing I will say is that C is a great language to learn, but you can't do much with it without a good understanding of data structures and algorithm analysis. I assume you'll be in a systems level (firmware, kernel, driver) of abstraction. Here you have to be resource conscious and usually don't have space for bloated libraries or inefficient routines. That's why an understanding of data structures and algorithms is key to writing efficient code and will take you much further than just understanding the languages syntax and structure.
If you're learning C and not C++ I highly recommend picking up The C Programming Language. It's a fantastic introduction to C and unmanaged languages but you do already need to know how to program to get the best out of it.
Yeah, sure. Here you go.
Every Preschooler needs to have read and studied this!
This solution requires some knowledge of how C works. A pointer is a number referring to a point in memory (and memory is one continuous blob of data). A C string is just a pointer to a character- you start at the location given and keep reading until you hit a NUL (character 0). C doesn't have a boolean type, so you use 0 is false and anything else is true. Once you understand those things, it's a fairly straightforward answer- you start at the beginning of the string, increment the pointer (you can literally imagine a finger pointed at a specific spot in a container if it helps) until you reach the end of the string (marked by character 0), then swap the character from the front with the character from the back, moving each pointer towards the middle as you go.
Having enough knowledge of C to implement this solution is different than a general knowledge of algorithms. On the C side of things, you could read something like Learn C the Hard Way, or buy a copy of K&R if you just want something to refer to as you practice. On the algorithms side of things. For the algorithms side of things this is a pretty popular textbook on the subject.
Per testare le acque velocemente puoi usare https://rubymonk.com/ (introduce Ruby in modo basico). Anche Coursera, Khan, Udacity e simili hanno corsi introduttivi sulla programmazione.
Mentre se vuoi imparare a programmare, il percorso deve toccare almeno tutte queste tappe, in ordine:
Probably one of the best books for starting in software engineering: C Programming Language - K&R Used is about $20.
It will frustrate you, and you will begin to hate everything about the book and programming, but if you can learn how to solve problems such as the ones presented to you then you will have a good solid foundation to tackle many other more interesting and useful tasks.
Buy and read this book.
The C Programming Language
Learn You a Haskell for Great Good!
List of Resources:
Most of what you need to know: http://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628
The rest of it
If you REALLY want to learn C++ and want to learn it well, I'd recommend learning C as well. There are a lot of details about the language that, like others have said, are derived from C. If this is something you're willing to take the time to do, I'd recommend reading K&R, it's a fantastic book that's not too complicated to read through. Plus, understanding C will help you understand what a lot of what other languages do for you under the hood and (at least in my opinion) will make you a much better programmer. I learned to program in C/C++ (and I'm not some old timer, I'm still in school) but I think it definitely has been worth the learning curve.
Learning C is probably better. Arduino is just a framework built on top of C++, so if you learn arduino you get a strangely limited understanding because you don't know the underlying language.
And while under the hood arduino uses C++, from a user perspective it's just C with classes.
This is the most recommended C book. The only hard part of C is pointers and you don't even need those for arduino most of the time.
Computer science. And this is probably the most important book I had to buy.
Well, I'm afraid most of that knowledge won't really help you there. While the basics of programming like variables, loops, functions, etc. are certainly useful anything OOP related - which, in Java is a lot - isn't really that applicable on C which is procedural-only (at least on vanilla C without a bit of pointer hacking that you probably shouldn't mess with given your beginner status).
Really, I'd suggest trying out CS50, a C course from Harvard available online as a series of video lectures and then give a look at K&R, which is widely regarded as the C book, even if not necessarily beginner friendly.
You should try the book called, "The C Programming Language" by Brian Kernighan and Dennis Ritchie.
I can't believe that no one has recommended The C Programming Language. It gives you a clear concise introduction to C and in my opinion is still the best place to start if you want to learn C and learn well from reading books. It also gives you plenty of exercises along the way to help you progress.
For C: http://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628
Known as the K&R it is THE way to learn C, as long as you are familiar with general programming concepts already (scripting counts).
Read K&R C and work through the examples.
C Programming Language, 2nd Edition https://www.amazon.com/dp/0131103628/ref=cm_sw_r_cp_apa_i_KsHRCbMHMDBX8
You can try reading The C Programming Language by Dennis Ritchie and Brian Kernighan. I've been reading it for the past month or so and it has really helped me out a lot
Since you know Java I would suggest that you a read one of the best programming books ever written: [K&R The C Programming language] (http://www.amazon.com/The-Programming-Language-Brian-Kernighan/dp/0131103628/), this book was written by the people who made the C language and it's one of the best books ever written. It is a must read for every C programmer. [Computer Systems: A Programmer's Perspective (3rd Edition)] (http://www.amazon.com/Computer-Systems-Programmers-Perspective-Edition/dp/013409266X/) is a great book to learn about computer systems. But I would recommend [Operating Systems Design and Implementation (3rd Edition)] (http://www.amazon.com/Operating-Systems-Design-Implementation-Edition/dp/0131429388) because it has some minix source code which will go really well with learning C.
Best of luck buddy :)
Without knowing what your interests are, if you're wanting to get back to the basics, one of the best programming books ever written is without a doubt: http://www.amazon.com/The-Programming-Language-Brian-Kernighan/dp/0131103628
The goto theory book by Sipser.
Excellent for C programming.
Programming in general.
You can probably find all of these at a library.
Yep, get the book. You can find it online, but pretty much any library will have a copy too.
I wish it were as easy as jumping into the language and knowing the syntax. Sadly C is as nuanced a language as it comes. From obscure compiler errors to pointer problems; C isn't something you simply look at the syntax once and hit the ground running (as familiar as it may seem)
Your best bet is to read through K&R and use the language as often as possible. If it's an introductory course, you should be able to stay ahead of the syllabus and be prepared to handle any problems. Still, you're inexperienced in the language, be prepared to learn a lot, and fast.
C and C++ are totally different programming languages.
This is the C bible: C Programming Language, 2nd Edition https://www.amazon.com/dp/0131103628/ref=cm_sw_r_cp_api_rQMUAb33ZZ7E2
Keep working through your Python book. From what I've read, it seems to be a good book, and Python is worth being familiar with.
When you feel like you need a change of pace, watch Buckland's lectures. He doesn't dive into C right away, but instead talks about a very simplified low-level machine code. (It's simple enough, actually, that you could very easily implement a virtual machine for it in Python.) It'll help you build an understanding of how programs actually run, so that when you pick up a book on C, things will make more sense.
Then, when you feel confident in Python, go grab a book on C. I don't have any specific recommendations (there are a ton of good books) but it's nice to have a copy of K&R C on hand. Then you'll want a book on data structures. Maybe Introduction to Algorithms.
A calculator: TI36X Pro, Casio fx-115ES PLUS, or HP 35s (these are the 3 best calculators allowed on the FE and PE)
If you get a graphing calculator, either get the TI-84 Plus C (which can be used any time graphing calculators are allowed), or get an HP Prime or TI Nspire CS CAS (which are WAY more powerful and useful).
Pencils: Pentel Graphgear 1000, Pentel Kerry, Rotring Rapid Pro (include an eraser such as the Sakura Foam Eraser). The rapid pro pen is also pretty popular.
If he's doing a software/computer engineering degree, get him a copy of K&R2.
If he's doing electrical/electronics engineering, he'll benefit from a nice soldering station, a multimeter, or a used oscilloscope (such as a Rigol DS1052e).
I can't give much advise for mechanical and civil. Sorry.
Oh yea, the paper is useful... especially with some pressboard report covers. They make nice notebooks (albeit expensive), and pair really really well with looseleaf textbooks.
\ The HP is more expensive, but it looks like a tool that professional engineers use when they're not in front of a computer. I ended up getting an HP prime, so I never could justify a 35s
C: Just start practicing with it. "The C Programming Language" is commonly regarded as the best textbook by young and old programmers alike. Hands on experience is the best especially when supplemented.
Linux: Get VM software and install a few flavors. Poke around. Get used to using a package manager, BASH, and Git. Your TA or professor may be able to help you with Virtual Box. The beauty of a VM is that you can pretty much do whatever you want without risk of damaging your own machine, so don't be afraid to experiment. You could try better VM software like VMWare or Parallels. You could also try dual booting.
On your host machine, I would recommend completely ditching whatever shell Windows uses these days. Install Cygwin so you can keep practicing BASH commands. And you can also get a package manager, Chocolatey.
Agreed. I also recommend K&R, it is a short but effective introduction to C, written by the makers of C themselves.
The C Programming Language is a good one too. Although it's specific to learning C, reading through it and doing all the exercises is something every programmer should do at least once.
Also, Code Complete 2.
Learn C would be the best. The book that most likely is going to be used is this one: https://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628
But there are COUNTLESS free resources online to learn C.
You could also learn another language, but i recommend just jumping into C
For C: Build your own Lisp. As the name suggests, this book teaches you C as it guides you through the process of implementing your own Lisp (which it will also teach you about). It's also freely available online.
Now, the more conventional answer to this question is Brian Kernighan and Dennis Ritchie's classic The C Programming Language, often just referred to as K&R. This is a fine book, but unless you can find it secondhand or in a library, it is a tad expensive. Another advantage of Build your own Lisp is that it guides you through the process of building a large-ish program, so you can see how things fit together in a big-picture way.
For OCaml: Real World OCaml is freely available online, and will not only teach you the language, but show you how to do all sorts of cool things with it. OCaml From The Very Beginning, and its follow-up text, More OCaml: Algorithms, Mehods, and Diversions, are very well-regarded, but aren't free (although $25 USD will get you both in PDF format).
Read the C Programming Language, it will help you in your course.
> The C programming language
he's saying to get this book
also good is this course
sign up for the free version -- its the same teacher, lectures and projects used in the Harvard classroom
its half in C and the rest in python and web programming
if you've got one dollar you can still get the basic Humble Bundle
which includes "Head First C" which is pretty good
just go to that site and scroll down
If you're not a complete beginner then go for The C programming language .
If you need to get up to speed on both programming and C, then I'd recommend something a bit more friendly such as Programming in C
CLRS is the classic for learning about different algorithms and concepts (e.g. sorting, graphs, data structures, etc. etc.). I didn't really like books when I was learning, but hacking my way through the K&R C book wasn't too painful
At university we learnt C, Java (and he marked us down if we used an IDE...), and then we had freedom to pick up whatever. So I would say having a look at C or C++ couldn't hurt and will definitely teach you fundamentals better than Python. But bear in mind there are some concepts in lower-level languages that you can (for the most part) ignore in Python, e.g. Garbage Collection, memory allocation, pointers.
I second this. K&R is one of the most concise books I have ever read. Here is the link https://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628/ref=sr_1_1?ie=UTF8&amp;qid=1519854630&amp;sr=8-1&amp;keywords=kernighan+and+ritchie
on a scale of 1-10 how good are you looking to get at programming?
Hey I am a CS major who is graduating May 2015 and honestly I can tell you not to worry and dont feel rushed in taking as many hours as possible. Now that I am entering my last year I feel I rushed through classes so fast trying to take as many as possible that I didnt get as much as I should have from them. I couldnt devote more time to them since I had other classes to worry about and it reflected on my grade by getting a B instead of an A. So take your time, find whats right for you and go with it.
312 is all about basic Java. So you learn for loops, if statements, classes, polymorphism, and other stuff. I had no prier experience with programming till I took that class and I got an A in it without working to much. If you want to work on your java, go to sites like http://codingbat.com/ and go through all the java exercises. Those were homeworks I had when I took 312.
If you want to get ahead of your class learn C!! Seriously after 312 and 314(data structure) you will be programming a lot in C (and while your at it learn c++ as well). I recommend writing all the programs you did in java in C. This book is an excellent source to learn C
Finally I recommend reading these two articles 1 2 They were assigned to me in a previous class and I wish I had read them as a freshman.
TLDR: Dont worry, find the right pace for you and check out the links I supplied as they can give you more information.
C Programming Language
Copy pasting my response to a similar question:
Edited to have more resources and be easier to read.
It's hard to draw the line between "essential" and "recommended." That depends a lot on what you want to do. So, I will present a rough outline of core topics covered in the 4 year CS program at my university (UC Berkeley). This is not a strict order of topics, but prerequisites occur before topics that depend on them.
Topics include Environments/Scoping, abstraction, recursion, Object oriented vs functional programming models, strings, dictionaries, Interpreters. Taught in Python.
The class is based on the classic MIT text, "Structure and Interpretation of Computer Programs." Of course, that book is from 1984 and uses Scheme, which many people don't want to learn due to its rarity in industry. We shifted recently to reading materials based on SICP, but presented in python. I believe this is the reading used now. This course is almost entirely posted online. The course page is visible to public, and has the readings, discussion slides / questions and solutions, project specs, review slides, etc. You can find it here.
Data Structures and basic algorithms
DS: Arrays, Linked Lists, Trees (Binary search, B, Spaly, Red-Black), Hash Tables, Stacks/Queues, Heaps, Graphs. Algorithms: Search (Breadth first vs depth first), Sorting (Bubble, radix, bucket, merge, quick, selection, insert, etc), Dijkstra's and Kruskal's, Big-O analysis.
This class uses two books: "Head First Java" and "Data Structures and Algorithms in Java" (any edition except 2). The class doesn't presupposed knowledge in any language, so the first portion is covering Object Oriented principles and Java from a java book (doesn't really matter which), then moving to the core topics of data structures and algorithms. The course page has some absolutely fantastic notes -- I skim through these before every interview to review. You can also check out the projects and homeworks if you want to follow along. The course page is available here (note that it gets updated with new semesters, and links will be removed -- download them soon if you want to use them).
Machine Structures (Intro Architecture)
Warehouse scale computing (Hadoop Map-Reduce). C language, basics of assemblers/compilers/linkers, bit manipulation, number representation. Assembly Language (MIPS). CPU Structure, pipelining, threading, virtual memory paging systems. Caching / memory hierarchy. Optimization / Performance analysis, parallelism (Open MP), SIMD (SSE Intrinsics).
This class uses two books: "The C Programming Language" and "Computer Organization and Design". This class is taught primarily in C, so the first few weeks are spent as a crash course in C, along with a discussion/project using Map-Reduce. From there in jumps into Computer Organization and Design. I personally loved the projects I did in this class. As with above, the lecture slides, discussion notes, homeworks, labs, solutions, and projects are all available on an archived course page.
Discrete Math / Probability Theory
Logic, Proofs, Induction, Modular Arithmetic (RSA / Euclid's Algorithm). Polynomials over finite fields. Probability (expectation / variance) and it's applicability to hashing. Distributions, Probabilistic Inference. Graph Theory. Countability.
Time to step away from coding! This is a math class, plain and simple. As for book, well, we really didn't have one. The class is based on a series of "Notes" developed for the class. When taken as a whole, these notes serve as the official textbook. The notes, homeworks, etc are here.
Efficient Algorithms and Intractable Problems
Designing and analyzing algorithms. Lower bounds. Divide and Conquer problems. Search problems. Graph problems. Greedy algorithms. Linear and Dynamic programming. NP-Completeness. Parallel algorithms.
The Efficient Algorithms class stopped posting all of the resources online, but an archived version from 2009 has homeworks, reading lists, and solutions. This is the book used.
Operating Systems and System Programming
Concurrency and Synchronization. Memory and Caching. Scheduling and Queuing theory. Filesystems and databases. Security. Networking.
The Operating Systems class uses this book, and all of the lectures and materials are archived here (Spring 2013).
Those are the core classes, not including about 4 (minimum) required technical upper division electives to graduate with a B.A. in CS. The math required is:
Yes I forgot to mention. I'd never touched C code before this book and it's teaching me everything I need to know so far (though I have a really old copy of The C Programming Language (2nd Edition) incase I need it, haven't done yet)
To date, the best programming book that I've read is C Programming Language by K&R. It's a pretty complete text on the C language. It is more than sufficient to enable the reader to be a good C programmer, yet it is still entirely digestable by new programmers. It is 274 pages. There are some recent gems, like Programming Clojure (304 pages). However, these days the norm seems to be more like Applying Domain-Driven Design and Patterns: With Examples in C# and .NET (576 pages), Real World Haskell (710 pages), and The C++ Programming Language (1030 pages). These books are all good. They just are hard to carry around and hard to hold while reading for long periods. I'm looking for good programming books that are short; an upper limit of roughly 325 pages. Post links to your favorites!
As someone with zero programming experience, thank you for the reading list. I was just planning on trying to learn python but I don't know if that's the best language to start with. Would you recommend just reading those books and starting with C?
Also, since I have no experience a technical answer would probably go right over my head but could you briefly explain how someone would go about messing around with an OS? I've always wondered what people meant by this. I have Linux installed on a VM but I have no idea what I could do to start experimenting and learning about programming with it.
Edit: Are these the books you're talking about? Physical Computing, C programming, and Writing Great Code?
Sounds like the problem was with your learning environment, not you. Getting started with programming is very tough at first; you need all the advantages you can get. But I see a number of things in your post that are serious disadvantages:
After Codecademy it could help you to read C Programming. It is, at least in my opinion, awful to learn C/C++ form the start but it rocks as a second/third language. It helps with understanding more about basic computing and with help of Cython you can make your Python programs run faster even by the factor of 10 (sometimes more, sometimes less).
You can't have it both ways. if you want to know exactly then you have to drill down to the fundamentals which are handled at a low level (C & assembly). If you want to understand the general concepts you'll need to make lateral moves and study CS along with having enough of the tiny details to fill in the gaps with your intuition.
I think what you may like is a book on the linux API. This is between kernelland and userland.
Try this one:
Before you do that ensure you know enough basic C. Linux kernel uses K&R style. So this might be good enough and your best bet to fasttrack.
Do keep in mind this is 2K pages worth of reading. This should help to fill in enough of what you don't know you don't know so that you can better use google-fu to get you further.
I am currently taking my systems programming class for my CS degree. We use linux, with C and VIM, and have a couple of books that are actually really helpful.
This book will walk you through C and its syntax. I have read through most of it. Its pretty easy to follow and comprehend.
This book I havent cracked open yet but plan on it today. My teacher swears by it, however.
Agreed, C Programming A Modern Approach, 2dn edition is the textbook I would recommend if you want to learn C, K&R is classic , but it lacks a lot details in C which are coverd in books like Pointers on C and C Traps and Pitfalls, C Programming A Modern Approach, 2dn edition covers most, if not all, of them.
Modern software development is more about being able to search for the answer you need when you need it, than learning anything on the off-chance it might be useful in the future.
I remember when my desk was littered with books, and browsing the tech section of my local bookstore was a happy diversion and source of inspiration. My list of RSS feeds was a mighty well tended garden.
Sadly no more. :(
The classic readings would be things like Joel on Software (blog), the Pragmatic Programmer, and the Mythical Man Month.
If you haven't read http://www.amazon.com/The-Programming-Language-2nd-Edition/dp/0131103628 then do so (even if you already know C). If you own only one programming book, this should be it. It is the key to all modern languages you are likely to experience in your lifetime. Imagine you are an acolyte taking the first steps into your chosen religion. This book is the old testament, written by the gods themselves. If you truly want to understand the mysteries you will find no better reference.
More important today is being able to search/ask intelligent questions on stack overflow, use google effectively, and get a feel of what software is worth your precious time to learn. Hint: evaluate the community surrounding the software with a stern eye, often the community is more important than the actual software.
There is nothing special about building a computer. Feel free, newegg.com and /r/pcmasterrace are your friends. More important would be to get an an Amazon account and learn how to spin up instances on EC2. Why build a computer when you can summon and disperse 100's of them on a whim?
And since 100 computers is more interesting than 1, the 2nd book you own should be:
By this point I assume you are proficient with, understand and love Unix. If not then IMHO your education dollars and/or time were misspent. Break loop, forget about learning frameworks, languages, etc and spend at least the next six months becoming intimate with vi, bash, make, and the linux kernel. These are the true weapons of a Jedi code master.
A full personal subscription to https://www.safaribooksonline.com is more than worth it, and should be considered mandatory for any professional software developer.
Have fun. :)
I can't recommend a good site, but I will recommend an amazing book which you can find here: https://www.amazon.com/Programming-Language-Brian-W-Kernighan/dp/0131103628
One of the best things to do is read what other programmers have to say. It opens yourself up to things that you might not normally come across. Schedule a time of the day where you will go on Stackoverflow to answer questions or read answers. Also in that time, read some blogs and any new articles. A few of the websites that I really like:
If you don't have any specific questions for us here, The C Programming Language, co-authored by the creator of C, is the gold standard in books about the language.
Try Kernighan and Ritchie. http://www.amazon.com/gp/product/0131103628
Unless you don't want to spend money! The second one is free and completely up to my standards as an introduction to the language.
EDIT: I had always assumed that since the sidebar link points to amazon that it could only be purchased or pirated. Not so! Thank you u/fpga_mcu!! If any of you need me I'll be reading K&R for the first time over the next few days.
EDIT 2: Nevermind, that link is also a pirate. :X Should have done more research. My initial comment stands.
That is a great question both in the literal and figurative sense - specifically, most languages have oddities when it comes to what is generically referred to as I/O handling. These originate from the fact that in spite of great advancements, converting a series of key strokes/taps on glass etc. still requires buffering and "de-bouncing" (prevention of multiple same key strokes from being read) etc.
in general, I would recommend Kernighan's book (C programming language ) as a fun guide that explain not only what the gotchas are but give solid ways to code effectively around them.
Here is a video I watched the other day about 7-8 mins a student summed up his entire CS undergrad. He basically goes over what to learn once you become proficient in a language like Python to have a deeper understanding. As the other person mentioned he goes after looking at low level architecture and learning
He recommends learning C the book he recommends is https://www.amazon.com/gp/product/0131103628/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=0131103628&linkCode=as2&tag=devoncrawfo05-20&linkId=2848ad31c81353554f1744502c936f34
Weary Traveler, you seek guidance into the world of C Programming. Know that it is a difficult journey and peril is around every corner. A good start would be tomes from Kernighan and Ritchie (http://www.amazon.com/The-Programming-Language-2nd-Edition/dp/0131103628) or a more modern scroll from Zed (http://c.learncodethehardway.org/) .
Do not give up and soon you will be programming in C as a budding apprentice mage yourself.
Your Macbook will run Yosemite which is the main requirement for the latest XCode ( I would max out the ram and look into an SSD so it's as fast as you can make it)
I would go with Objective-C. It's mature, has plenty of books and online resources to help you along the way, and it just works.
You need a dev licence to even test on a device but simulator will work without one. You can look into jailbreaking but that's up to you.
My only advice is to learn the language before trying to make a project. Don't simply read a tutorial and then take on an app. Pick up a few books on C and Objective-C then go cover to cover, doing the examples along the way and maybe build a simple program to demonstrate to yourself that you understand the concepts if you need to.
It's hard to give recommendations about books when you don't tell us what the books are.
For example, if one of the books is the second edition of The C Programming Language by Kernighan and Ritchie, then you should keep it. This book was published in&nbsp;1988, but it is a well-written book that is still a good introduction to&nbsp;C.
I found it much easier to learn C first and then C++
BTW I don't use C++ anymore, just python and BASH.
Python is an easier starting point than C. I've tried to learn Python many times, but I always find myself gravitating toward C.
C Programming Language by Kernighan and Ritchie is a very good book to pick up.
C Primer Plus by Stephen Prata is another good one for the C language. I gravitate heavily toward C. Mostly because it interests me. Also the first programming language I've ever decided to pick up.
Do not give up denizen! Programming is an exciting experience when you get things to work properly. There is so much you can do with it.
Best piece of advice is to choose what best suites your interests, and goals.
> I bought a gameduino shield
> I am weak in coding
You sure have bitten off quite a bit for a beginner. /u/Thereminz's advice is pretty sound. Seek all the demo code you can find, and spend lots of time reading and understanding it. Tweek, play, and learn.
Also, you should be reading programming books to better understand the language. I recommend the K&R C programming. It is the bible of C, and every other C book in existence was born from it. It's a bit dry, but it's also very concise. I always keep it handy. Also, "Writing Great Code" is a fantastic read, and a must have for optimizing for performance in microcontrollers.
In no particular order:
Structure and Interpretation of Computer Programs
C Programming Language(K&R)
The Pragmatic Programmer
The Mythical Man Month: Essays on Software Engineering
Introduction to Algorithms and/or Algorithms
buy these 2 books:
K&R's C Book is also very good.
OK, so multidimensional arrays in C are interesting, especially if you come from a language like
Java or C#.
In a language like Java, where many things are pointers, there is no such thing as a
multidimensional array. All arrays have one dimension, though you can sort of fake it with what's
known as a jagged array, which is an array of pointers to other arrays. This isn't as common in C,
but I figured that I'd mention it since there is one place you see it all the time:
int main(int argc, char argv)
In main, argv is an array of pointers to arrays of characters. If we call it with the arguments
foo and foobar, it would look something like this:
| | +---+---+---+----+
| O-------> | f | o | o | \0 |
| | +---+---+---+----+
| | +---+---+---+---+---+---+----+
| O-------> | f | o | o | b | a | r | \0 |
| | +---+---+---+---+---+---+----+
As you probably already know, arrays and pointers are somewhat interchangeable in C. I can do this:
int parr = &arr; //or int *parr = arr
arr[n] == parr[n] == (parr + n) //true for all 0 <= n < 10
For a one-dimensional array, there's no difference between the array itself and a pointer
to the array's first element. If the array's cells hold values of type T, then the pointer should be
of type `T. C arrays arent bounds-checked (though going past the end of the array <br /> has undefined behavior), so you don't really *lose* anything when going from an array to a pointer.<br /> <br /> Running with ourmainexample, I can also do this:<br /> <br /> char **pargv = &amp;argv; //orchar *pargv = argv<br /> <br /> pargv[n] == argv[n]; //true for all 0 &lt;= n &lt; argc<br /> <br /> In this case, each cell in our array stores achar. So if we want a pointer that points to that <br /> array (i.e. points to the first element of the array), it needs to be achar*`.
But like I said, C has proper multidimensional arrays as well. Instead of an array of pointers, we
have an array of arrays. Something like this:
char strs =
... will show up in memory like this:
| +---+---+---+----+----+----+----+ |
| | f | o | o | \0 | \0 | \0 | \0 | |
| +---+---+---+----+----+----+----+ |
| +---+---+---+---+---+---+----+ |
| | f | o | o | b | a | r | \0 | |
| +---+---+---+---+---+---+----+ |
... which is essentially the same as this:
| f |
| o |
| o |
| \0 |
| \0 |
| \0 |
| \0 |
| f |
| o |
| o |
| b |
| a |
| r |
| \0 |
But this is also important: there's also a similarity between one-dimensional arrays and multidimensional arrays.
Multidimensional arrays are arranged end-to-end in memory, so it's possible to use a plain pointer to refer
to a multidimensional array:
char pstrs = &strs;
pstrs[r 7 + c] == strs[r][c]; //true for all 0 <= r < 2 and 0 <= c < 7
So let's say that you have a function that allocates, initializes, and returns a foo. It might look like this:
Foo p = malloc(sizeof(foo));
How would you allocate and return a one-dimensional array of foo?
foo create_1d_foo_arr(int length)
foo p = malloc(length sizeof(foo));
How would you allocate and return a two-dimensional array of foo?
foo create_2d_foo_arr(int rows, int cols)
foo p = malloc(rows cols sizeof(foo));
Now, depending on what you're doing, you can get fancy. To return to a previous diagram:
char strs =
| +---+---+---+----+----+----+----+ |
| | f | o | o | \0 | \0 | \0 | \0 | |
| +---+---+---+----+----+----+----+ |
| +---+---+---+---+---+---+----+ |
| | f | o | o | b | a | r | \0 | |
| +---+---+---+---+---+---+----+ |
We can declare a more specialized pointer than we had before:
char (pstrs) = strs;
... which should be read as "a pointer to a 7-element char array". But as we've established, that
can also be seen as an array whose cells can hold 7-element char arrays. That's how we've drawn it
in our diagram.
We can now use that pointer as if it was a 2-dimensional array:
pstrs = 'm';
... which will update the second string to moobar.
Note that this:
is not the same as this:
As we discussed at the beginning, `char pstrsis an array of pointers to characters (i.e. <br /> potentially a jagged array), whereaschar (*pstrs)` is a pointer to an array of characters (i.e.
potentially a two-dimensional array).
If you can get your hands on a copy of K&R C, chapter 5 has an excellent treatment of this topic.
I think K&R is quite readable but also fairly comprehensive. It's not at the level of the language
spec, but it covers a good many cases.
int *parr = arr
. C arrays arent bounds-checked (though going past the end of the array <br /> has undefined behavior), so you don't really *lose* anything when going from an array to a pointer.<br /> <br /> Running with our
example, I can also do this:<br /> <br /> char **pargv = &amp;argv; //or
<br /> <br /> pargv[n] == argv[n]; //true for all 0 &lt;= n &lt; argc<br /> <br /> In this case, each cell in our array stores a
. So if we want a pointer that points to that <br /> array (i.e. points to the first element of the array), it needs to be a
is an array of pointers to characters (i.e. <br /> potentially a jagged array), whereas
I'm afraid I can't offer advice about good books for assembly as I have no experience with them.
The canonical book for C is The C Programming Language, informally known as K&R, after the authors, one of which is the creator of the language. It is deceptively thin, but dense with good information. Similar to the list for C++ I posted before, there is the book list for C. One interesting thing to note from the lists is that while C Primer Plus is generally considered good for C, its C++ counterpart C++ Primer Plus is not nearly so good.
I'd offer the same advice to you as to the OP. Start with a higher level language like Python or Ruby, then delve into the lower levels when you have a grasp on core programming concepts and can focus on the details without losing sight of those.
For C, definitely use the K&R text. It's the best C resource I've come across.
I would recommend starting with Python, though - it will give you a general understanding for how programming works without forcing you to deal with directly managing the machine's resources. A simple online search for Python resources will turn up many good-enough options, but the basic principle is to try writing code that automates basic tasks that you might perform on your own (like renaming all the files in a directory, or changing a color picture to black-and-white) and to progressively try this with more and more complicated tasks.
Mine would be to learn some C for a better understanding of Python internals. Also, go through this book.
I took it Spring 2016, so not with Skrentny. If you're not familiar with C you could learn it over winter break. You might use this textbook: https://www.amazon.com/Programming-Language-Brian-W-Kernighan/dp/0131103628 so you could get it and start reading it early.
I took Chen and passed. All I did was read K&R over the break before his class and supplemented it with lecture.
C Programming Language, 2nd Edition https://www.amazon.com/dp/0131103628?ref=ppx_pop_mob_ap_share
Read SICP and K&R C, really understand these and everything else should take care of itself.
Most assigned texts for CS are unnecessary. There are a few you could get because they are considered to be part of the CS bible such as C Programming Language by Kernighan and Ritchie.
If you are learning from newboston I strongly doubt you "have a good understanding" of C. Try reading TCPL. As for network programming, there's no reason not to give it a whirl - what's the worst that can happen? Read Beej's guide to get started.
Here are my favorite books for sharpening your C saw. The great news is that all of these are less than 300 pages each.
The C Programming Language (Kernighan, Ritchie)
An essential for all C programmers. It's short but dense and it's packed full of great exercises.
Data Structures in C (Kalicharan)
This book offers a practical look at data structures and a few algorithms. It has a bunch of exercises to help you retain what you're learning.
The C Puzzle Book (Feuer)
A tiny book packed with a bunch of C puzzles, the pointers chapter is especially helpful.
You could try something like K&R, but you would probably benefit from a book like that a bit more if you know how memory and the stack/heap works, and how stuff works under the hood. You might want to read a book like Code, which goes over more low level stuff with a nice approach that doesn't assume you have a huge EE/CS background. There are also the Head First books, I haven't read Head First C yet but it looks interesting; I have read Head First Programming and the non-web development sections of Head First Python (android and web development just don't interest me right now), and they are fun to read with the "Head First approach".
K&R -> The C Programming Language by Brian Kernighan and Dennis Ritchie
SICP -> Structure and Interpretation of Computer Programs
The Pragmatic Programmer
https://learncodethehardway.org/ and https://www.amazon.com/Programming-Language-Brian-W-Kernighan/dp/0131103628
LCTHW is more contemporary, and written by an author who may or may not be banned in this sub, it has fairly strict pedagogy, but may be more approachable for you. K&R C is the definitive book on C, though it's old and slightly dry at points, I don't know your syllabus, but I think K&R C would supplement well.
I've never used Visual Studio, but I've heard that Microsoft makes great development tools. These videos may help https://www.visualstudio.com/vs/getting-started/
Also, as general advice, consider starting with something other than C. It's fairly low level compared with other modern languages, and tends to be used to low level systems programming (consumer electronics or operating systems), or as a foundational knowledge to be learned but not used daily, similar English and Latin (I'm sure this analogy will piss off someone somewhere).
I'm only guessing at your goals as a biologist, but a less computational efficient but scientifically applicable language like Python or R may be a better fit.
This one is a lot tougher read and is probably one of the most famous book sets in Computer Science
Computer Programming Don Knuth
Edit: fixed spacings
No its not a stupid question. Most people like the K&R book, which is like the C bible. Link
I recommend checking this out, it has a ton of recommended C books for beginners and Intermediate.
(Just an aside comment: when I saw this post it was at 0 points. I have no idea why this post or the poster is getting downvoted -- it is legitimate curiosity to link C to computer science and garner interest in CS/programming languages. So what the fuckity fucking fuck?)
if you wanna get a jump start on the material now then go for it. The book they're gonna make you buy is "The C programming language" by Kernighan and Ritchie. It's widely known as one of the best programming books ever written and It's actually very useful for the class, so you are going to have to buy it eventually. I wouldn't bother with anything other than that and the other books they might make you buy though
Not really related to mobile development, but he should still really enjoy these if he hasn't read them already:
Python is great, there are tons of resources online for learning it, because the OSS community is in love with it.
Also Django is python for web apps if you are so inclined.
As for C, the "C bible" is a must have. Read this book and do the examples and thats all you need really.
274 pages actually.
The first thing you want to do, no matter what, is to learn how to program.
I know you're looking to make an old-school game, but given the resources that we have today, there's no good reason you have to learn to program in an old-school way.
Your first language you should learn is python. A very easy-to-learn language that will get you up and running making programs quickly. The above link also comes with the added benefit of making games as you go.
After you have a solid handle both on how games work, and how to make basic programs, you need to go much deeper. First, you'll want to start off learning the C programming language. Most of the concepts here should be pretty familiar, but the syntax will be different. You'll also need a C compiler to work in dos.
After you're solid on C, you'll need to learn how to actually make DOS do pretty things. You get to work with the exciting world of 256 colors. After that, you have all of the tools to make your own dos game. Best of luck!
Umm, I think Python is a good language to start with. It's forgiving and low on boilerplate code. I haven't read it but Learn Python the Hard Way by Zed Shaw is supposed to be decent (and it's free online). I didn't like Learning Python published by O'Reilly. I'd just read reviews on Amazon if Learn Python the Hard Way isn't working for you. Whichever you end up with, I recommend typing all examples from the book into the computer by hand. Something about doing this really helps make things stick in your head. You'll also make the occasional typo and have to debug your program which is something we programmers spend more time doing than any of us care to admit.
I think it is important to try to think of something you want to make and have it in mind while you are learning the language. It can be any software but I recommend a video game. They are really good for this because you can just think up a simple concept or implement your own version of an existing game. Having a goal makes it so you are constantly solving the problems you will encounter while trying to reach that goal which is the most important part of programming (more so than learning the syntax of the language). This is actually the highest rated Python book on Amazon and is all about gamedev with Python.
After you've learned Python to the point where you are comfortable (no need to master it), learn other languages to grow as a programmer. Once you've gotten a couple languages under your belt it's actually really easy to learn even more languages (unless it's a very odd language like Haskell, Lisp, or Brainfuck). The problem solving skills you've acquired often work in any language and you learn some new techniques as you learn new languages.
PS, when you get a chance, read "The C Programming Language" by K&R. Those are the guys that invented C. Ritchie recently died, sadly. ANYWAY just about every modern computer language is written in C. Java, C++, and so on all use it as a base, and C++ really isn't very far off from standard C.
There WILL be obtuse parts in the book you probably won't understand at first, but it's great to understand everything you can do with the language.
I've also seen you're a little confused by why you're doing Hello World stuff... It's mostly because printing a line to the terminal is a way to give you quick feedback with little/no overhead, or what we tend to call boilerplate code. To get a visual set up just to show a message (in Java) is probably around 60 lines of code that will make 0 sense to you right now.
Also, that same feedback - the quick and dirty console print - is a great way to check if your concept is correct. Let's say you write a simple physics engine for your game. You want to make sure you're getting expected values, and you want to do it quickly. Rather than re-launch the entire game EVERY time you tweak the engine, you run a smaller set of code that tests just your physics engine.
Imagine Mario-like movement - jump up and fall in 2d. If you print the Y position every, say, 500 milliseconds (.5 seconds), you would expect values like "0.0, 1.1, 1.5, 2, 1.5, 1.1, 0.0" which would indicate it went up rapidly, stopped at 2, and fell back at the same rate. It's obviously not the same as a visual feedback, but the first time you write the physics engine you might get something like "0.0, 1.1, 1.5, 2, 2, 2, 2" which is CLEARLY incorrect. Something isn't triggering properly! This happens all the time, and a quick check like that helps you diagnose what you did wrong while wasting minimal time running the program.
> Do you recommend "K&R C" (can't find that book anywhere)
It's the first result if you type K&R C into Amazon: The C Programming Language, 2nd Edition.
> more than "Pointers to C"?
This doesn't exist, so I have no idea what you're asking.
Here is a decent tutorial for c++ and others programming languages: http://www.tutorialspoint.com/cplusplus/index.htm
This is the book that i learned c with. I think theres a free pdf online if you google for it: http://www.amazon.com/The-Programming-Language-2nd-Edition/dp/0131103628
If you are a total beginner then read C Programming Absolute Beginner's Guide, Third Edition by Greg Perry & Dean Miller
If you are comfortable programming in another language such as Java, C#, Python, etc. then read The C Programming Language, Second Edition by Kernighan & Ritchie (also known as the K&R book)
The C Programming Language (aka K&R)
There can be only one!
Holy f... it's the beej.
Are you really he? I think I've downloaded all of your guides, but I must confess to having read none — someday, though, someday.
As to the OP, mark another down for K&R's 2nd edition. Be careful if you're looking online for a PDF, there's one floating around that doesn't match the physical copy. I found, and sent, a PDF to a friend who discovered an error, which didn't exist in my physical copy.
All the more reason to shell-out money for the real thing! I only went searching since the binding on my copy is starting to go, and I don't want to add further wear.
The C Programming Language 2nd Edition. There is absolutely no better way to get into programming that this book. Starting with something like Python or Java will only hurt you in the long run because they obscure certain details that are fundamental to programming.
You won't be making anything flashy right off the bat, but you'll have a much more thorough understanding of programming and it'll make transitioning to other languages and techniques easier.
I don't know what your background is, if this is your first object-oriented language or what. I have gotten a better understanding of programming over the last couple of years, so I may not have the best recommendation, but to refresh on Java, I have found these videos from [Cave of Programming] (https://www.youtube.com/playlist?list=PL9DF6E4B45C36D411) to be pretty awesome.
Very simple, incremental videos that illustrate basic and fundamental concepts pretty clearly for me. Note that there are not quizzes, but by manipulating the programs provided and really making sure one understands what the speaker is presenting, I think one can get a basic understanding of some key aspects in Java programming. If you enroll in the course in Udemy, you may be able to get feedback (haven't tried though to be honest; the course is also free on Udemy).
That said, it wasn't until I started taking some C that I found I understood the Java better; there are some things happening under the hood with Java that I never quite understood until I got to a lower level language like C (and maybe it just took that much exposure, repetition for it all to click).
I took a university course in C, but I am going through a Udemy course on C by Huw Collingbourne that may give a decent overview.
All that said, I do find that I like a mixture at times of watching somewhat more shallow expositions like the video series listed above, but then also enjoy finding some written resources that go into a bit more detail. Check out the Java tutorials for Java. For C, there is [this] (http://www.amazon.com/Programming-Language-Brian-W-Kernighan/dp/0131103628), which was written I think by the two main guys behind the programming language itself.
Here's the link in case anybody is interested in it.
the static could mean that, hard to tell with this line in isolation. If it's inside a C++ class, then your assumption would be correct.
For all C-only related topics, nothing beats this:
The assembly is rather light at the beginning. In your first year you have to write some assembly to control a little car with infrared sensors, but it's really easy. Later on though, there are pretty interesting classes on assembly which are pre-reqs for classes on optimizing/debugging. Also it never hurts to learn more. But this definitely isn't something I'd be too worried about coming in.
After K.N. King's book, we don't really cover many more C books. But Kernighan and Ritchie's C Programming Language is a good thing to read.
In terms of C++ books we cover, it's a little weird. For one class, we needed C++ Primer and another we needed C++ Primer Plus. We've also needed Algorithms in C++ by Robert Sedgewick and a couple others. However, most of our classes don't have "required" textbooks, just recommended ones. If you send me a message I can compile a list of the recommended ones from my courses this far.
Personally, I'd highly recommend all of Scott Meyers' books, such as Effective C++, More Effective C++, and Effective STL.
I've always felt like C is a good language for a programmer to think in. With that being said, I often recommend that a programmer who doesn't need to know C++ learn C if (s)he wants to learn something that will improve his/her skill across the board.
C will give you a good appreciation of what's going on behind the scenes in many of the languages you use. You'll get an appreciation for how passing by value and reference works in other languages thanks to pointers. You'll learn how your strings are actually managed in memory. You'll have a better understanding of how many of those built-in generics you may use (List<>, LinkedList<>, HashMap<>) actually work, because if you want to use them in C you'll have to implement them yourself or download a source file and read it to understand the author's implementation.
This knowledge will help you build more elegant solutions. You'll be less sloppy and gratuitous creating new strings anywhere and everywhere, and may even find yourself using references more often. Your code may or may not be cleaner, but you'll have an appreciation for how and why you should write code for runtime efficiency. You'll be more likely to use the right data structure for your task at hand.
The best part is that C has a great standard resource for learning the language. Pick up The C Programming Language Second Edition and read it cover to cover. By the time you're done you'll know everything you need to know about C, and will have a wonderful reference in the even that you need to use C later on.
If you want to improve your object-oriented programming skills, you don't need to learn a new language. It is best to learn OO independent of any language in order to gather a strong understanding of the underlying concepts and to be able to apply it to any language. Craig Larman's Applying UML and Patterns is the best book I've ever read on the subject.
Um, are you sure you're ready to jump into iOS development?
Unless I'm reading this incorrectly, it doesn't seem like you have any C or OOP (like Java) programming experience. You'll definitely want to be at least comfortable with C-like syntax and message-passing, inheritance and objects, etc.
Actually, I'll have you answer that for yourself. Watch the first lecture in the iOS dev series from Stanford on iTunes. Around minute 11 the professor goes over what concepts you need to understand in order to be able to follow along with the course. If you don't understand all of the concepts listed, then you aren't ready yet.
Also, you've got to have a Mac. Have at least a Mac Mini (which are the cheapest Macs you can get refurb'd / used).
Here's what I would do assuming I am correct about your programming experience:
1. Learn C on the Mac.
It's for beginners, and will go over the basics of C. Objective-C, the programming language for iOS, is a strict superset of C, so they share a lot of syntax.
1.a The C Programming Language (recommended)
This one isn't for beginners, and is a bit stale, but is the de facto book for learning all of the intricacies of C. While it isn't absolutely necessary, the better you understand C (including pointers, memory, etc.), the easier time you'll have with iOS dev. I absolutely recommend going through it in its entirety, though this isn't necessary. It'll also be good to know C in the future if you plan to pursue software development.
2. Programming in Objective-C
This will teach you Objective-C, related OOP, and using XCode 4.
3. Beginning iPhone 4 Development
This will probably rehash some stuff related to Objective-C and XCode, but for the most part is a great introduction to iPhone development.
Use this book in tandem with the Stanford lecture series. Read the first few chapters, watch the first 2 lectures, do the homework exercises as if you were in the course along with the examples from the book, and just go from there. There might be some redundancy, but I think the combination of reading, listening, and doing will really help you understand the material.
If you need short tutorial refreshers at any point, Cocoa Dev Central is a great resource.
From there, you should be able to start making your own apps, and just use Google, StackOverflow, and http://developer.apple.com/ for all of your questions not previously answered or if you get stuck.
As you go through the process of learning all of these new programming concepts, try to develop ideas for what apps you want to develop. As you learn more, try to piece together how you would accomplish certain aspects of the ideas, and if you can, maybe even code the bits (like certain functions) you can.
There are no set milestones.. it's a gradual process of learning and getting better at programming and iOS development. Your goal should be to just create your own working app entirely based of your own ideas and work.
Geez. While it's good to hear that everyone else's copy of K&R is tattered, too, I can't help but feel bad for how tattered mine is. It's been rained on, ran over with a car, left out in the yard for weeks, and used as a coffee mug coaster lord knows how many times.
I should probably honor him by picking up another copy today.
> Maybe now is a good time to step back and consider what kind of programming job you might want to target.
This is definitely something you should keep in mind. Try to become really awesome at one thing. That's not to say you shouldn't have a well rounded education in programming, just that someone who is simply ok at everything isn't getting a job anywhere.
Here are a few texts which I consider to be great for a novice programmer:
The C Programming Language : ANSI C
It's an older book, but it's still the best book to learn the language.
C++ Primer : C++
I used this book to get started with C++, and found it to be easy to follow and informative. Some say it's not a beginner book per-se, they may be right. I was already very familiar with C when I started.
Objective-C Programming: The Big Nerd Ranch Guide : Objective-C
If you're planning to write apps for Apple's iOS and OS X platforms, you're definitely going to need to learn this. Otherwise, don't bother.
Algorithms : Algorithms / Data Structures
This is not the be and end all authority on algorithms, but it's a great book. It's less theoretical and more concrete in my opinion.
I don't feel qualified to give recommendations for other topics like Java or web development, as those aren't really my strong suits. Happy hunting!
C books I've found useful:
I generally agree with the other replies that a vanilla computer science degree is better than a game degree, but let me use the example of the University of California Santa Cruz (UCSC) game degree to offer a balanced comparison.
At UCSC, the only difference with a computer science versus games degree is one class in the senior year. The fundamentals of both degrees are identical - you take the same math, physics, and programming in the game degree as you would in the CS degree. Only in your senior year does it differ, where as a games major you do a 1 year elective working on gaming group projects using Unity. If you did vanilla CS instead, you would use that year to take something like operating systems, artificial intelligence or databases. Deciding which one is a better fit for you partly depends on your philosophy of the purpose of school:
Podés probar aprender C, que está bueno si queres saber como funciona un idioma de programación a nivel mas cercano al hardware. Si ya sabes programar podes usar este libro para aprender.
Mas adelante en la carrera me parecen que ven Haskell, pero probablemente sea demasiado avanzado si estás empezando.
If you mean this one, then YES, it is an EXCELLENT book. Highly recommended.
Read The C Programming Language by Brian W. Kernighan and Dennis M. Ritchie front to back. It was published in 1988 and is still phenomenal at teaching the fundamentals of CS: primitives, branching, structures, etc. C programming is daunting at first, but future you will appreciate learning CS from its basics as C is about as barebones as you'll want to get. After finishing it you'll learn the majority of what you need to know to begin learning other languages quickly. Run every example in an environment of your choice to see for yourself whats going on in them. I recommend using this online compiler to run the examples as figuring out what programs to use to actually run the code is difficult for a beginner.
http://www.amazon.com/The-Programming-Language-2nd-Edition/dp/0131103628 This is still the go-to book for C. Much more than 6 years old now.
It seems that your comment contains 1 or more links that are hard to tap for mobile users.
I will extend those so they're easier for our sausage fingers to click!
Here is link number 1 - Previous text "K&R"
^Please ^PM ^/u/eganwall ^with ^issues ^or ^feedback! ^| ^Delete
Get the book: intro to c
Seriously. Do it.
can't go wrong with K&R C to learn the low level stuff (pointers) first, then The C++ Programming Language to learn the rest
This could probably explain it better than I could:
I work full time, so I can't afford to answer your questions except on my own schedule, sorry. I highly recommend you read The C Programming Language, it's very approachable for beginners.
Here ya go. K and r for the authors' last initials. http://www.amazon.com/gp/aw/d/0131103628?pc_redir=1408940727&amp;robot_redir=1
The C Programming Language. Get it used on Amazon.
I've been thinking about C and its practical implementation after
learning the basics. And to organize the information I tried making
a skill tree as you would find in the game Skyrim or Kerbal Space Program,
where you complete tasks to get points to advance in the skill tree. I hope
the low quality of the image provides enough context that this is not a complete
work and something I'm poking around with, feel free to suggest nodes or resources
for anyone the nodes as the rest of this post will be me trying to provide
some context and resources for each node.
It's right there in the sidebar for anyone to get started.
C Programming Language
Pretty much go through this first, generally suggest using a minimal
text editor and the command line to compile programs.
This has been marked as optional, as a general stepping stone for
using a few more materials to learn or reference before jumping into
any projects. Books like Modern C, practice books, or understanding
pointers could go here. Let me know if you have any suggestions for
books, youtube, websites.
Sockets is marked as optional to separate the group. But in general this section
resolves around the concepts of tcp and udb and sending signals between computers.
Example projects for this group are things like making a basic http server
on the http side, or programming with bluez on the bluetooth side. I threw in game server on the end as there are several open source projects that create the back end for games that don't have online services any more. This seems like a good way to get familiar with a specific set of structs and packets, maybe someone can leave some examples if there are anyones that are a good place to get started.
General Purpose Input/Output, such as turning an LED light on or off. I haven't gotten into gpio myself very much, and most of the tutorials for it
seem to use python. But this seems like a pretty good use-case for a practical
implementation with C. I could provide some results from a search, but I only want to provide links to tutorials I can vouch for.
For making user applications with C, GTK seems to be the most common library for
implementing applications with widgets. The best resource for this pdf seems to be
An Introduction to C & GUI Programming, and
there are a few more examples posted in the gtk discorse.
This is the node with the most sub-nodes and not the easiest node to organize as
there are a lot of libraries that can be used. For libraries there is GLUT/GLFW/SDL/GTK+/Raylib/EGL. In general GLUT and GLEW seem to have the least features with them being mostly focuses on getting and window and providing OpenGL context. Freeglut provides a decent wiki for getting started, and while the examples are in C++ it's not too bad to translate them back into C. GLFW seems to be the libary that the OpenGL Red Book currently uses.
SDL is a really common and popular library that's been used for a lot of games,
including Open Tyrian. While it's popular, the only strictly C resource I've found for it so far is this blog , which provides a 2D Shoot 'em Up tutorial. Though the most well known tutorials are written by Lazyfoo, and are provided in C++, while these tutorials have probably been ported to other languages I don't know of any C-only examples out there.
The GTK+ library provides the GTKGLArea widget which allows for an OpenGL 3.0 and above context to be created. So it might be a decent choice to work with if you want to create applications that allow for toggles and widgets, along with a 3d view port. A few example applications for GTK can be found here.
For Raylib I haven't tried it, it often gets suggested here and on forums pretty fequently. So maybe someone can provides links, and maybe provide some context of some comparison between Raylib and some of these other libraries. EGL is an option that I've seen pop up here and there, but it looks like it allows you to write directly to the framebuffer for embedded computers without needing to start a desktop. There's a really good series of tutorials that can be found here.
So this is what I have for resources that I've found so far that fit into the skill tree. I think there are a few more honorable mentions like libpng, or file compression, or POSIX coding and terminal games and applications. And are there any other nodes that you would add to the skill tree?
The book in the first link in my previous comment (The C Programming Language) is widely regarded as the best introduction to C programming. I would recommend doing the exercises because, well, reading about programming doesn't really help as much as actually programming.
However, I would check if there are courses on C at your school first (not C++) because learning C on your own could be hard.
Once you've learned C - this course at my school follows the second textbook that I linked to, and it's a very thorough introduction to a lot of systems concepts. What I really love about the course website is that it has links to all previous exams (and their solutions) for the past ten years, so you have all the practice problems you could possibly want. The course has 6 labs, and if you're interested in doing them I could send you the starter code.
Do you guys own this book?
A few hours practicing with it will have you up to par with C in no time.
Do you have any experience with the C programming language? That's where you start. I think the differences between C and Arduino's version of C++ are irrelevant for the beginning programmer.
I was lucky; I learned C back in the 80's from the K&R Bible. It's more reference than tutorial, but a great book to get started with.
Once you have the basics down, then the best way to learn is to take apart some interesting code. Want to know how arrays work? There's dozens of code segments using them, for driving LED matrices, storing sensor inputs, etc.
I can't tell you much about R, but C is very sensible to learn at least a little. It's basically what everything comes from nowadays, (hell, Python itself is written in C), and will get you to be very intimate with your computer... But there are a lot of bad ways to learn it. If you start, definitely use this book.
If you want to get into more low-level engineering, C is a great tool for that. I learned C a long time ago and it was painful most of the way so expect that. One of the books that gets tossed around a lot is K&R C which I haven't used personally, but I've heard a lot of recommendations for.
As far as what you want to get started, I'd say a linux box (or virtual machine), gcc, and a good text editor. My personal favorite is emacs.
Why? The still sell it at Amazon for a reasonable price. That's where I bought my copy a few years back.
I think IOS is a great introduction to the program, iff you can get through some C programming beforehand...
Why? Look in the link
and to learn C, the greatest book is one and only
This book will teach you everything about C. and the examples includes some of the functions of standard library so you'll also know how functions of standard library are/can be implemented
Start with C. Start with this book: https://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628
Come back and ask me your next question once you have typed out each of the problem sets in that book.
None really exist, it's better to get a good book and learn the language properly
Get a copy of K&R, start on page one, work as slowly as you need to, do most of the exercises.
i would focus on one language at a time. a real world scenario - imagine trying to learn japanese and chinese at the same time if you never studying languages before.... you'd be in a for a world of hurt. can it be done? sure, it's just a lot harder and will take more time.
if you're learning C, you should be reading this book - http://www.amazon.com/The-Programming-Language-2nd-Edition/dp/0131103628. Makre sure to complete ALL the exercises before moving ahead to next section. I use to think exercises were a waste of time but they are extremely important! You can learn the rules of Chess in a day. Does that mean I know how to really play the game? The exercises will train you to apply what you've learned so you can actually create real working programs.
Or you can just start with C++ instead of C.
Then I would read Code Complete 2nd edition and Effective C++.
get this book dawgy
Nice price on the link you posted. On Amazon, a new copy is currently $52.76. Pretty nuts!
I use matlab on a daily basis, and something which has saved my bacon more times than I can count is a standard header at the top of each of your script files (i.e., the *.m files). This header will tell you, down the road when you couldn't possibly remember, what your script does, what the input and output variables are, when you did it, the course and (a carryover from when I needed to hand in code for course assignments), my name/student it.
From a more general perspective, if you have no programming experience, a book on C programming ("The C Programming Language" or wikibooks if you're short on cash (I'm sure other people here have their own favourite programming reference books) will give you an introduction to variables, functions, and in general how you break down a multi-step, complicated problem into series of smaller problems which you can code up. I'm biased in favor of C, given that it was my first language, but another language (fortran, for instance) might not be a bad choice, either.
Once you get a handle on this problem-solving approach to coding, learning a new language will come much faster; it becomes less "How do I solve this given problem?" and more "What is the syntax in this given language for a 'for' loop" or "Where do I need to declare variables?".
Harvard and MIT are releasing courses for free, with certification.
Standford has created a similar program.
Udacity also came from Stanford. Sebastian Thrun, head of research at google, has started offering courses for free, with certificates. I took their intro course, and am taking Steve Blank's entrepreneurship course at the moment.
Codecademy has free coding lessons.
Follow + search Hacker News, and you'll find answers on how to get started.
I began by following The C Programming Language, by Kernighan and Ritchie. One of the best tutorials I've ever used (though tough at first). http://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628
None of this is easy. But it's all easy compared to getting into and graduating from an Ivy League law school.
Meanwhile, Ramit Sethi has excellent tips for how to make money on the side, or to get a raise at your current job (or a better job). http://www.iwillteachyoutoberich.com/home/
The Four Hour Workweek does the same:
Those last two sound super-scammy, but trust me, they're full of really good, actionable advice.
Again, the underlying idea here is that if you're competent enough to get into an Ivy League Law School, it's easy enough to figure out alternative ways to make more money.
For books, there is only one place to start: The C Programming Language by Kernighan and Ritchie.
Will knowing C# make learning C easier? Possibly, but it may also make it difficult, like trying to unlearn a bad habit. C is much less forgiving of errors, and it doesn't hide the von neumann architecture underneath like C# does.
Get a used or new copy of the Kernigan and Ritchie book.
If you want a C book to use as a reference/refresher, the classic C book is The C Programming Language a.k.a K&R.
Ohio State University's honors engineering intro series uses the Handyboard programmed in Interactive C.
Sample code is largely going to be dependent on the circuits you've actually connected; what your motor configuration is, etc.
You'll probably have more success looking for broader resources on robotics. Interactive C itself is very similar to ANSI C, except that it has some weird libraries most people wouldn't be useful. If you're having trouble with the language itself, pick up a book on C, or programming in general. K&R C can be kind of rough, and there are down-right factual inaccuracies in many editions, but it might give you a jumping off point.
Beyond that, you may want some books on robotics. I don't have any recommendations, but have you tried asking your professors? Ask the grad students TAing your class too! Students often ignore these resources, but you shouldn't trust some random guys on the internet over trained professionals with every interest in your success.
K&R C on Amazon (or there are PDFs everywhere):
C# is a way less complex language than C. It's more strait forward to debug. Also it's object oriented. If you think you know C you'll be cranking out C# in a few hours. Also C# also requires you to be less anal about memory.
Harvards CS50 program and learning basic C was the best thing I did when I started, at least in terms of understanding how computing works. It's hard-going, but having a firm foundation in the fundamentals of how computing works makes everything else down the road so much easier.
The book I used in college.
The C Programming Language https://www.amazon.com/dp/0131103628/ref=cm_sw_r_cp_awd_cVUywbF5RQDKC
If you want to learn C, you start with this book. If you want to learn Python, you should start with this e-book.
I learned C through a class, not a website, so unfortunately I don't know of any specific good ones from experience (at UVic, our first programming class is in C. I already knew how to code in other languages, although for about 90% of people there it was their first coding experience). Some quick Googling shows a lot of sites are unfortunately not great for bare beginners (even though some of them try to be).
This one seems okay: http://aelinik.free.fr/c/
There's also this one, but it seems to jump in a little too quickly, so it's maybe a little better-suited to people who already know another language (unless you're good at learning that way): http://www.cprogramming.com/tutorial/c-tutorial.html
But actually, the best tutorial I know of is in a book rather than online: The C Programming Language (Dennis Ritchie, one of the authors, is actually the guy who created C in the first place). Even if you do want to do an online tutorial it could still be a useful resource to have. Yes it's a little expensive (unless you're fine with a pdf copy you "found" somewhere, wink wink nudge nudge), but if you become a serious C programmer then you might want to have a copy anyway - a lot of C programmers will have this book next to them as they code because it's a great reference resource.
I've been going through this one
I'm not extremely worried about the actual language I'm learning at this point, I've read through a few python books, but I like the fact that C is such a low level language, I figure it'll help out in the long run, especially since most of these languages (C++,Java,C#) are based off C in the first place.
There is a lot of good stuff already posted, but I'll chime in. Formal education doesn't mean much if you can become a capable programmer on your own. A good interviewer will recognize your ability to produce quality work, period. However, If you are truly serious about becoming a developer you will need to educate yourself and it won't all be fun. If you can buckle down and teach yourself what you would have otherwise learned in college, there is no reason that you'll be less skilled that a college educated programmer. Some employers may view you as less qualified but you can prove them wrong during an interview.
I would suggest a bottom-up approach:
First, learn some of the Comp Sci. nitty gritty. Get familiar with data structures (Heap, Stack), and understand how computers use memory at the most basic level. A lot of this will be painful at first, but it's necessarily to fully grasp what and why we do certain things when programming.
Second, Learn C. The K&R (http://www.amazon.com/C-Programming-Language-2nd-Edition/dp/0131103628) is going to be the best way to to this. The reason C is great to start with is because it runs on nearly all hardware out there, and it will teach you very important concepts, such as pointers, that will mitigate confusion as you move forward. Also, without learning about memory in the previous step, pointers will be difficult to fully grasp.
Third, Learn another language, and another. The funny thing about programmers is that we are essentially linguists. The main difference is that we speak to computers rather than people. With this in mind, it's important to learn multiple languages, rather than attempting to master one. Pick a language that helps you solve the problems you want to solve. Wanna make iOS/OSX apps? Dive into Objective C. Open Source guy? Learn Java. The more you learn, the easier it gets since most languages share similar syntax, keywords, etc. This is why learning C first was a good plan, because lots of other languages borrow heavily from C.
Finally, write code every day. Writing code, compiling it, debugging it, compiling it again, and then watching it run properly is the ONLY way to truly learn. Keep reference books close at hand, and push your comfort level by writing programs that do more and more sophisticated operations. Don't try to memorize everything about a language, and don't get discouraged if you need to re-read sections of a book. It's a fools errand to try and memorize everything about a language, and even decades-long programmers keep reference books on their desks.
I think your plan is just fine. You may be distracted by the large amounts of choices you find along your way -- this thread is clear proof of that. Stay focused.
If you intend on starting with C I suggest a reading list kinda like this.
Still a C noob, but I originally started it by studying The C Programming Language. http://www.amazon.com/The-Programming-Language-Brian-Kernighan/dp/0131103628
Is this a bad place to start? I thought since it was well approved of historically it would be a good base. Thoughts?
Try The C Programming Language or The C++ Programming Language then. Those should cover the guts of C and C++ that he'll need. The C Programming Language, commonly called K&R due to the authors' names, is probably the best reference guide out there for C. To give you an idea, when I took the class that covered C in my undergrad years, I used my mom's copy of the book from when she was in undergrad. It's still used to this day.
I bought The C Programming Language book in 1999 and have not found a better book for learning C. This may be due to the fact that one of the authors was also the creator of the C language. I highly recommend it.
You can also find a guide to functions at the links below:
This book. Its pretty much the standard C book written by the language's developers. You'll need it later anyway.
> Languages generally speaking have a documentation which specifies itself. That's the spec for the language. Someone interested in creating a compiler, interpreter, or some sort of analyzer, and so forth for the language needs to know how the language is supposed to work. The spec is the document which talks about that in detail. It's like the official documentation if you will.
Okay, that makes sense; so the spec is a document explaining the nuances and how the language works?
> "Minimalist" is not very exact terminology. It means the language has a small set of concepts and things that you can use. The nice thing about scheme is that from this small set of features, you can do tons of stuff. It usually implies a small set of keywords, but that's not just it. Generally speaking, it has a small features set, which isn't very exact terminology either.
That makes sense; so Scheme is minimalist in one sense that it might not have a ton of built in keywords, but with what it does have you can create a lot from it?
> These weren't courses per se. I did this before getting into college. The C programming I was talking about came from K&R2 (https://www.amazon.com/Programming-Language-Brian-W-Kernighan/dp/0131103628/) and looking things on the web. I think it helped. Not sure how much. I don't think the PHP web dev helped.
That book looks very interesting, I might take a look at it later on!
I only ask if the experience helped because I mainly want to see how ready I can before I go into SICP without spoiling myself, as I believe SICP is a great place to teach people concepts for the first time (even if they're not totally understandable, like in my case).
> I have no clue what is the better choice in here. Try both at the same time? I think MIT 6.00 even uses "how to think like a computer scientist" (the book I mentioned before).
Duly noted, might look into the lectures before I start SICP.
> Both. It's meant as an introduction to programming and computational problem solving. In one of the lectures I think the professor talks about how people do better in SICP if they take this course before.
If you don't know this answer it's totally fine, but does the lecture prepare for the content in SICP and how to solve the accompanying exercises?
> That is true, but there is more to it than that. Each language has its ways of doing things. When people are making new languages, they're highly influenced by other languages. To the point that most languages I've seen have nothing new but a few pieces, and most of everything else is just a "rehash" of ideas from other languages. Generally speaking, you'll see a lot of commonalities among several languages.
Can these commonalities be seen amongst different paradigm languages as well? Like are there commonalities between, say, Python and Scheme? I only ask because for example, I never saw the use of car and cdr as ways of accessing elements of a list before, let alone the heavy usage of recursion in a language. But perhaps that's because it's my first functional programming language
> It is true that each language has its style, but that style shares plenty in common with other styles from other languages. There will be things in common, and very rarely stuff you learn in one language won't help you in another language.
So even though there's different paradigms amongst languages, there's still quite a lot of shared aspects between them?
> In the end, you'll have a bag of cohesive programming techniques. That's not really language dependent as much as some people will tell you. Languages aren't that important as far as I can tell. I remember, back when I was starting to learn how to program, giving real importance to programming languages. Maybe they are really important, but it doesn't seem to me like they are anymore. The programming techniques and ideas behind them are though. The language is just a "conduit" by which you apply those techniques to solve problems, which has its importance but it's greatly exaggerated by most programmers if you ask me.
So it's more so the ideas that are developed through the languages that are important rather than the languages themselves?
> In fact, in SICP, you'll end up learning that a way to make problem solving more approachable is to make a language that is a better means to apply the programming techniques that you think help in solving the kind of problem that you want to solve.
That sounds incredibly interesting. I know I'll learn more once I read it for myself, but do they suggest that the way of approaching a problem is to define techniques or functions within the language itself that would help better solve it, or do they imply to switch languages entirely to solve it better?
> Nowadays, some languages are nice enough that you'll be able to do that by just cleverly designing a new library or framework. Making new languages is still valuable though, and in my opinion, underrated.
When you mean you can design a new library or framework, do you mean creating a whole new sub-language so to speak to deal with the problem, or do you mean just creating new functions that meet the solver's needs and isn't readily available (i.e. the goal the user had in mind isn't implemented in the language, so the user instead creates it themselves)?
In what ways are creating new languages underrated? Do you mean the experiences one has and take away from creating one that are underrated?
> I didn't see it emerging either. I started to study programming and CS in 2006 (I think). All I've said is based on "stories" and reads that came up while I was reading books, reading blog posts, talking to people, etc.
Yep, that's pretty much how my background about the older days of CS is built. Although I suppose it's the only way to learn about a time before ours in which CS was emerging.
Another standalone question, if you don't me asking for your opinion: I currently have a book on data structures and algorithms (aptly called Data Structures and Algorithms in Java by Robert Lafore) that I plan on reading. Would it be in any way detrimental to read that book, or at least begin it, before delving into SICP, and once I've completed my next CS course (taught in Scheme), then begin working on SICP? Again, I only ask because you're more experienced and I'd like to hear your thoughts on this matter.
I was a physics major with a deep seated hatred for programming until forced into doing it for my undergrad research. Started in C with Kernighan and Ritchie's C Programming Language (The guys who invented C) http://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628 and work from there. Starts from a low enough level where later, when you move onto higher languages like Python or Matlab you'll understand some of the underlying algorithms and work.
C in this modern world has become the standard for one step above assembly language. I was once told by an embedded devices professor, "Generally the next step after developer a completely new microprocessor is to write a C compiler for it."
This language was written by Kernighan and Ritchie way back before I was born, and thus the number 1 way to learn C is to read their book The C Programming Language
Many developers have respect for individuals who know C. It allows you to see into your computer with more depth, as K&R stated simply, "We built this language for writing operating systems".
Learning C# is a good way to get into programming, as is Python, and so many other languages. Just remember your roots. "Can't know where you're going unless you know where you're from." As they say.
I would suggest that the carlh programming guides is not a bad idea then!
I would heavily suggest learning C well - this is a language that was designed to stay close to the hardware while being portable, and is a very small language. So, buy a copy of the K&R Book, ever C programmer has one.
Then, Patterson's book is a tome for computer engineering. It'll show you assembly, all the way down to NAND gates.
I would suggest you start by watching and working through Berkeley's CS61C course. It's the logically second course in CS, and after a quick overview of C it dives into the machine itself. Website here, videos here. Also, Dan Garcia is an excellent lecturer.
Once you have all the machine details down, you'll probably feel hampered by your actual program wizardry. This is where you start looking into algorithms and data structures. Your go-to guide here is probably Cormen's Introduction to Algorithms since it handles both data structures and algorithms. It's definitely more of a theoretical/CS-ey book, so if this is not what you want, then Head First Java will teach you a new language (and learning more languages is one of the best ways to grow as a programmer!) and also do many data structures. In fact, you can get both those books and have the light side and the serious side of programming books.
At this point you should be well equipped to go off in whatever direction you want with programming. Start contributing to open source projects! Find things that interest you and try to solve problems! Being a part of the programming community will be your biggest aid in both learning programming and starting to make money through it. People pay for programmers that they know can deliver, and success in the open source world means a lot, and you don't need to go to school for it to get to this point!
Lastly, many CS/programming folks hang out on IRC. If you have questions, find the appropriate IRCS channels and go talk to people. Good luck and welcome to programming!
Use this, aka "K&R C". I'm not sure if I can post a direct link, but if you google for "K&R C" you'll find a PDF so you don't have to spend £30 and find out you hate C.
It's a great and classic book, an completely relevant.
Also, if you want to make your own OS, skip C and try doing it in assembly and on a raspberry PI. You'll learn a lot, and learning assembly will help you out when you start to learn C. My programming education started with making an OS on ARM using assembly, so I can't see why yours can't :P
Encapsulation is really a mechanism in Object-Oriented languages, of which c is not a member. C++ is object-oriented and has encapsulation, and C++ can be compiled to run on AVRs because C and C++ both compile to assembly.
OP: read this if you really want to learn about C. It's an incredible language that has stood the test of time. It's absolutely necessary with Arduino/AVR projects.
Did you know Amazon will donate a portion of every purchase if you shop by going to smile.amazon.com instead? Over $50,000,000 has been raised for charity - all you need to do is change the URL!
Here are your smile-ified links:
Never forget to smile again | ^^i'm ^^a ^^friendly&nbsp;bot
I took that class at UCF years ago, and honestly it was horribly taught. Hopefully the current batch of instructors are better. Fortunately you can still do pretty well with a copy of K&R and a free GCC compiler (I recommend Cygwin if you're on Windows).
C is not the easiest programming language...far from it. But it's the most fundamental by a wide margin, and worth learning for understanding, even though comparatively few jobs will actually use it for day-to-day development. (Few, not none...hold your flames :-)
First note that Career/Job/Market is quite different from Knowledge/Intellectual satisfaction. So you have to keep "earning money" separate from "gaining knowledge" but do both parallely. If you are one of the lucky few who has both aligned in a particular job, you have got it made. Mostly that is never the case and hence you have to work on your Motivation/Enthusiasm and keep hammering away at the difficult subjects. There are no shortcuts :-)
I prefer Books to the Internet for study since they are more coherent and less distracting, allowing you to focus better on a subject. Unless newer editions are reqd. buy used/older editions to save money and build a large library. So here is a selection from my library (in no particular order);
There's a ton of instructional videos on Coursera, YouTube, etc. As I learned C++ many years ago, I can't really recommend a specific course. But find one that works for you.
I strongly recommend you learn the C [not C++] programming language first. It's super simple, and you won't get bogged down by all the bells and whistles which complicate C++. Plus, most of the complicate C++ language features won't be used in a data structures course.
The C Programming Language, K&R
The book is about C, not C++. However, the C programming language is incredibly simple, and you'll learn the core concepts without all complexity of C++. This book is a quick read [185 pages, not including the reference section]. As you're coming from Python you'll need to understand types, memory allocation, pointers, and headers.
The Google C++ Style Guide
Google's C++ style guide is battle tested. It offers than mere style recommendations, but also many lessons in avoiding pitfalls in C++ code.
Effective Modern C++, Scott Meyers
Read this book 5 years ago. Can't recommend it enough. It covers more advanced features and pitfalls. So you can read it after you have a basic grasp.
Incredibly dense technical reading, but the more you read the easier it becomes.
Τσελικη & Τσελίκα ?
Πολύ καλό ελληνικό βιβλίο.
Στο προτεινω ανεπιφύλακτα.
Αυτό είναι ένα κλασσικό αγγλικό πάντως
This is our SO before we invented the Internet
The C Programming Language (2nd Edition)
get yourself a copy of this, and read it cover to cover. This is the C bible as far as you're concerned.
I've been doing this a long time! You'll get to the point where choosing data types and using loops are very simple for you, just takes practice and thinking about why things work.
In terms of a book, my favorite is K&R's C book. It's an oldie but goodie, and starts with the basics which sets you up for success when you want to get into the more complicated stuff.
C++ books will in general not be focused on robotics or embedded programming, but Arduino/robotics books will often be more focused specific solutions than on programming theory, so it is difficult for me to make a recommendation there. Don't be afraid to google questions or topics as well. For general programming topics, somebody has probably asked your exact question at StackExchange.
No need on the gold, friend. Just helping out people with topics that I'm passionate about.
Edit: The bot that replied me to made me realize that book is kind of pricey. If that's too much, there's nothing in it that you can't learn online!
I haven't read it in years, but I remember The C Programming Language being very useful.
If you want to learn more about the low level details of how computers work in general, I own the following books and recommend them:
This is your new bible:
Seeing as you are working on an Android app, you presumably know Java. C# is really similar. Objective C is for iOS development. I'd recommend C++ or just plain C. This is a good book. Python is also awesome though and pretty straightforward... So C or Python
yo estoy sufriendo con las tareas. Las sacan de este libro.
No creo que nosotros nos metamos mucho en lo que son las estructuras pero los apuntadores si los necesitamos para configurar un chip.
Personal hobby, 7 years deep. I haven't taken a single class that has taught me a single point from that post.
I study computer engineering (with a predominantly math/microcontrollers/electrical engineering focus) in school. I founded a LUG on-campus to promote this stuff, since it's severely underrepresented in my institution.
I linked to it already, but read The Linux Programming Interface. A prerequisite might be K&R since the book is C-heavy. Buy those books, pick a distro (Arch Linux is my forte, since it has the best wiki in the Linux world), and get crackin'.
As for C K&R2. The main issues you are going to have with C are memory management and undefined behavior. Sadly K&R isn't going to teach you much about that, so you will need to look for other resources online dealing with those two things. Also getting help on IRC more than likely will involve a tongue lashing.
My advice for Linux, Git and Vim, just start using them. If you don't have a computer with Linux on it, install it and use it everyday. With your projects use git to keep track of the changes you make. Add a feature? Make a git commit for it. Github has some good learning resources for it and there is also the book Pro Git which goes in depth. For vim start off with vimtutor in the terminal and keep a cheat sheet of shortcuts. After you get semi-comfortable, you may want to read Practical Vim by Drew Neil.
No, you don't... and no, it isn't. Stop listening to these literary nobodies and start listening to your book. I asked which one you're reading because it seems like the method you're using to learn isn't working for you (hence, you asked this question here, which people who read books wouldn't usually ask).
Look, I see this a lot. It would seem far too many people want to learn "the C programming language" purely by studying one rather common implementation... and so they end up learning a subset of the language which has subtle non-portable quirks that evolve a life of their own over time, perhaps becoming bugs or security issues.
C does not have pass-by-reference. I shouldn't need to point out that passing a reference type by value is still pass-by-value, because that should be written in your textbook somewhere. Take a look at this page if you'd like to know more about the difference between pass-by-reference and pass-by-value.
>By definition, pass by value means you are making a copy in memory of the actual parameter's value that is passed in, a copy of the contents of the actual parameter.
I predict a response similar to the following:
>... ok but C allows you to mimic pass-by-reference using pass-by-value ...
A turing complete language can mimic any other turing complete language, by definition. What can't happen is a reliable conversation in English if we don't agree upon the definitions for the words we use... and I quote, from the C11 standard, section 220.127.116.11
>In preparing for the call to a function, the arguments are evaluated, and each parameter is assigned the value of the corresponding argument
This squarely describes the assignment of a copy into a temporary or intermediate space ("the corresponding argument"), i.e. clearly pass-by-value...
Following up on this since it's a common problem for CS majors especially, I would recommend picking up a copy of the K&R used or otherwise and going through at least the first ½ or ⅔ and trying your hand at the exercises.
If you get through the majority of the book you'll be more than prepared for what 327 will throw at you C-wise.
For C++, Sheaffer does a good job of covering the C++ism's that he expects you to use -- he doesn't like C++ either.
Read and do the problems. You'll understand everything taught in CS courses up to senior year, minus version control.
If you are already familiar with other languages then the K&R book is considered definitive as the authors created the language. I also found this to be an excellent guide.
You get yourself a copy of the The C Programming Language, and UNIX for the Impatient. Then get yourself a VAX-11/780 with 4.3BSD, and program with K&R PCC using nothing but vi.
I'd also recommend The C Programming Language.
highly suggest one of the coursera classes on python
if you want to get into C/C++ this is a requirement: https://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628/ref=pd_lpo_sbs_14_t_0?_encoding=UTF8&amp;psc=1&amp;refRID=ZHA2EE7MDB4DC754QR63
a used paperback would be fine
Hvis du starter på at lære C, kan jeg varmt anbefale denne 25 år gamle bog. Den gemmer på meget godt, og er bestemt værd at læse.
> I just realized it's 900+ pages, sheesh. Is it still an easy book to pick up to learn the language?
It's still useful for learning it. If you want something more brisk, try Accelerated C++ which clocks in at under 300 pages.
> I just had a semester using Scheme and I really had a fun time using functional programming. It just feels more structured, but I don't know if that's a misplaced opinion.
> How easy would it be to transition from Scheme to Scala or Clojure? And can interesting projects be made in those languages? I only ask because I've tried to figure out what I could make with Scheme and came up empty-handed, so I'd love to find a functional programming language I can make something cool out of.
Functional programming is a great paradigm, makes a lot of things simpler. The languages also tend to have really awesome features.
Once you know one functional language, a lot of the core concepts carry over to other languages. Scheme and Clojure are also Lisp dialects so they will look very similar. Scala can be used in a very OO way because it was designed to be a Java replacement and to be easier to transition to.
There are certainly a lot of cool things out there written in functional languages. The Haxe framework is written in Ocaml. Netflix wrote their open source telemetry system in Scala. Clojure is used for web services and web applications, and there are some cool open source projects written in Clojure like the Light Table IDE.
> Is there a reason people want to use Haskell?
It's one of the biggest names in functional programming and is known for being a major source of research. It's older than a lot of the newer functional languages like Clojure or Scala, plus promises things like speed, easy concurrency, and doesn't require additional stuff like a Java runtime (like Scala or Clojure do).
> Speaking of FP languages, what're your thoughts on OCaml? I know Jane Street uses it, but that's about it, haha.
The ML family of languages is probably my favorite functional programming family. I learned standard ML in college and have also used F# a lot, which is derived from OCaml. I haven't used a lot of OCaml directly but I imagine it's awesome since I love f# and standard ML.
> Damn, never heard of NIST, it sounds like a fantastic resource! I haven't even seen it linked on the sub before (which, given how often people ask for resources for DS&A, you'd think it'd come up.
It's really more of a basic cheat sheet without a lot of information. Years back when I did more DSA type interviews, it did help as a simple refresher.
> Do you by chance know anything about C and learning it via books? If so, do you think The C Programming Language is a good starting point?
I love C (but it and C++ have been replaced by Rust in my life now). That book (the K&R) is the de facto book for C and one of the best technical books I've ever read, it's very concise. However, it was also written thirty years ago so while it's still mostly useful, it serves more purpose as reference than as a "learn C" book. Though I also learned C from the book and then used additional resources to learn about the newer language features that came out with C99 and beyond.
I'd say give K&R a try - if you don't like learning from it then try Zed Shaw's Learn C the Hard Way which is a free eBook/website.
I'm seeing a very common pattern in the thread here. Any software engineer/programmer that's worth its... awkward complexity is measured in their skill.
That said skill isn't the in-depth knowledge of a language, where you can codegolf the mona lisa in various opengl implementations in cutting edge obfuscated machine opcode and mnemonics, but rather:
I learned C in college with this book, but I highly doubt it's the best way to learn the language: https://www.amazon.com/dp/0131103628
I haven't used C since college, so hopefully someone else like /u/tphb3 can chime in with a better answer for you.
Edit: Just realized he said "Read K&R" (which is the book I linked to).
Needing an understanding of things such as computer networks will again come down to your course selection. How solid is your math?
I see K&R, so I'm hoping it changed in the last two days or I'm going to be very disappointed with this post
Find a copy of this:
If you really want to learn all of (most of) the "Why" crap up front. I got a copy at a used bookstore for $4.
However, you don't worry about learning WHY it goes there, just learn to realize WHEN it needs to go there. It has to do with statement termination, so the compiler can properly convert your code to machine code.
I came at programming with your same mindset "why" but I realized that the answer is usually "doesn't matter to me" so then I started focusing on "when" and I realized that the "why" question eventually answered itself down the line at a time when I was better able to grasp it anyways.
C Programming Language, 2nd Edition https://www.amazon.com/dp/0131103628/ref=cm_sw_r_cp_apa_i_djmpDbZD995S4
I'd recommend Tanenbaum's Modern Operating Systems, that should get you started on beginning to understand what goes on inside your computer. If you'd like further reading and you want a mental beat-down, you can't go wrong with Knuth's The Art of Computer Programming. Want to start with programming? One of my favorites is The C Programming Language by K&R. Those three recommendations, while they add up to a single semester's tuition, are worth way more than that. Good luck!
Hm, probably not. Obj-C is used for developing iOS/OS X Apps. But I have no clue what to use in Engineering, maybe C or C++
Infos about Alfred here. It's basically a better Spotlight Search, to find/launch Apps, find files, quick google search, calculator, etc
About Objective-C: Take a look at the Big Nerd Ranch Guide
For Java: Head First
C: The C Programming Language
EDIT: iTerm2: Terminal replacement, I use it mainly for the hotkey window
and Cheatsheet: Hold command to get a list of all shortcuts for the active App
Thank you! I'm actually realizing that I learn more from my textbook than I do from the lectures for my intro class, so after my midterm tomorrow I think I'm going to focus on reading ahead for the next couple weeks and spending the second half of summer getting a handle on data structures and algorithms.
Aaand I just looked it up, the data structures course just has a C reference book and the algorithms course doesn't have a required textbook. I'll have to look into which textbooks are commonly used for those classes elsewhere.
I'm also planning to read MIT's Structure and Interpretation of Computer Programs at some point, cause I heard it was a really good intro book. Should I try to get through that first and then hit up data structures and algorithms?
Well ultimately the best advice I can give you is it isn't about the language you learn but the concepts you pick up the span across all languages. While you are learning C you are also learning the fundamentals of computer science. For C well C is a low language so it makes you handle memory management and makes you jump right into pointers. I have another source if you want it, the book "The C Programming Language" is what we use for my class, the book is cheap and was written by the guy who wrote C.
A lot of Kernighan’s (co‐authored) books age surprisingly well. It’s a real testament to his writing style that they are still relevant today despite examples tending to be in PL/I or Fortran.
The bible of C/C++ books, ANSI C by K&R.
This is the book most programming courses use in Computer Science as it was written by the Bell Labs developers of the 'C' language, Brain Kernaghan and Dennis Ritchie.
Read each chapter like a fine wine then complete all of the exercises at the end of each chapter. My bet is you can find a forum somewhere to post your homework for others to evaluate, troubleshoot, or offer suggestions like the stack overflow site.
This book is quite good and gives an indepth look into C. The price is pretty steep but I imangine that you could find a PDF somewhere online.
This book is probably the best resource for learning c. You might be able to find a pdf version online too.
C Programming Language would certainly cover all of that. I don't know what your background is, but C is typically considered a lower level language than languages like Java or Python. Learning to program in C will give you a better understanding of what your hardware and OS are actually doing throughout the execution of your programs. That said, it's a little bit more challenging to get started in.
If you want to learn C, the only way is to read the bible.
Personally, if you really want to dive in, I really recommend C. You'll have to learn about pointers and memory management which Perl and Java won't force you to learn. Java will be easy to learn and will make a lot of sense if you're familiar with C.
K&R's C book is the most acclaimed introduction to the language. http://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628
Since you'll be learning Ruby anyways, it might be fun to build a little web app using Sinatra. Sinatra is simple, lightweight, and a great example Ruby's syntactic flexibility vs Java. And JRuby actually runs on the JVM and gives you access to all the Java libraries. Also on the JVM is Clojure which would give you exposure to a Lisp, functional programming, and cool concurrency tools.
That is exactly what I came here to say. Learning C before going to college made all of my CS classes easier (especially when I had to learn a new language).
When I learned C I picked up K&R and The C/C++ Programmer's Bible. My only programming experience before that was BASIC (which I don't recommend as a starter language for reasons outlined here).
> The next question would be what are some key concepts I should learn before I start programming?
How to write instruction manuals for retards. I don't know actually. I've taught programming (friends and TAing) but I don't know how to teach someone to be a programmer. It takes a certain attitude. You have a problem and there are certain small steps you are allowed to perform. Programming requires you to translate your problem in a sequence of small steps. There are some people who have a knack for it and they will catch it immediately. Others will look at problem, know the steps but blank out completely and never be able to make the connection of what steps they can perform to solve the problem using the small steps. I would recommend go slow and up the difficulty enough to keep you interested but not so much as to discourage you. I don't know how hard you it will be for you but I think the attitude in proving a theorem in mathematics is what would help. It sort of has the attention to tiny detail, creativity and dealing with the frustration of not seeing the solution immediately that programming requires. I think the easiest way to learning how to program would be trying.
> What do I need to install in my computer in order to practice?
I meant to answer this question in my first post. For C on Windows your options also include installing cygwin and then pretending you're on Linux. For Java, Eclipse. Itself written in Java, so cross platform. Perl, Python should be again avilable on all Platforms on the commandline, all it needs is a text editor (haven't seen any Perl IDEs). Oh in C if you're using good old gcc you should also choose a text editor. A good IDE with a not intimidating example project should be decent, but you'll probably become confident a lot quicker if you were using a simple text editor with just your compiler and interpreter.
> Is there a great difference in programming command line programs and GUI programs? What do I need to know to do GUI programs? Do I need special software / libraries / skills?
To be honest I have barely done any GUI programming. I have modified a couple of GUI programs and have done some 3D stuff in OpenGL. My answer is GUI programming is just annoying not interesting. Most of the real work does not involve how you interact with the user. GUI programming is mostly calling a bunch of library functions with some voodoo magic. Of course no matter how technically awesome your program is it's not impressive to a non-programmer until they see a GUI.
> Could you recommend a good book for self-reference?
For Perl the camel book (larry Wall is author of Perl) will serve you your entire life. For C K&R is by the auhtors of the language and considered the definitive learn C book (haven't used though). As far as C++ don't learn that as first language but I know there is a book by Stroussup and Deitel and Deitel is used in almost all universities. I found Thinking in C++ to be useful (used in my school alongside Deitel and Deitel) but please please don't learn C++ first. I plan on reading ANSI common LISP by Paul Graham one of these days.
But seriously a book won't get you very far. The quickest way of learning programming is doing it. Once you're confident programming you'll find all languages making sense and starting to edit a program in a language is a great way to learn. You have code examples right in front of you and the fact that it already runs and does most of the stuff boosts your confidence until you get comfortable enough with the language that you can see yourself do the whole thing.
> I tried teaching myself Python a while back, but then they upgraded Python to 3.0 and I couldn't do anything anymore and I was very confused as to why. It since has become clear to me that knowing a couple of codes in a particular programming language is not the same as "programming". So, I would like to know more. Could you please help?
That's why I said start with C. It's a very concise language that does exactly what you say. And there is slmost nothing to remember for it. It should help you develop the programmer mentality. The other school of thought though is that a learner computer language is something that helps you express algorithms which makes C the worst choice because it is too lcose to what you want to tell the computer rather than the ideas you havem but I'm from the bottom up rather than top-down school of thought.
If you really want to learn from the ground up, that is to say low level to high level, I'd recommend starting with Assembly Language Step-By-Step. It will get you introduced to binary computation, binary math, and x86 assembly. From there, I'd say move on to The C Programming Language, AKA K&R.
After that, if you've stuck with it and still enjoy it; the coding world is your oyster. Build something brilliant and reap the satisfaction of building your own programs.
If you're a CompE, you're gonna be writing a lot of C. If you haven't read The C Programming Language, by Brian Kernighan and the late Dennis Ritchie, shame on you - it's one of the best, most helpful, and most concise programming books I've ever read. (The design of the book is a lot like the design of C, really.)
Also, if you want a reference for any algorithm you could possibly think of, I can guarantee it's in Knuth's Art of Computer Programming somewhere. CLRS, mentioned by xibernetik below, is another good algorithms book that's more accessible, but less in-depth.
/u/phao has a good question, and I don't have a great resource offhand, but 2 things...
In fact, you'll probably feel like you are picking things up really quickly (as far as C/C++ goes at least) and wonder why you were so worried in hindsight. There is one huge catch though and it cannot be emphasized how huge this catch is.
Java, Python, JS, PHP, and Ruby (I'm assuming on the last three, I haven't dealt with them much) don't have pointers. OK, yeah, Java has pointers all over the place ("references") but they are hidden from you. In C/C++ you can point a variable anywhere in memory that you want and read/write from it and it might just happen to work fine, until it doesn't, and those issues can be a huge pain to find. Plus, C/C++ doesn't have garbage collection so as you allocate memory and shift it around you are responsible to clean it up when you are done with it.
On paper it doesn't sound too bad, but this would be the area I feel like I see new people to the language have the most trouble with, especially coming from Java and scripted languages. Just be sure to pay extra attention in that section in the book.
K&R Book: http://www.amazon.com/dp/0131103628
If you really want to learn to program, and not just have a functional knowledge of implementing some practical things, you should really learn C. C is the basis for practically every modern language and it's comparatively small and easy to learn. The best book on C is K&R C which was written by the language designers. It is very precise, which I believe you'll appreciate coming from a math background.
This book only covers the language itself though. To learn conventions and patterns you need to learn by doing and reading. Find a site with coding challenges or find a project you want to work on and do it. Also read code you come across and try to understand how it works and why the author wrote it that way.
I would recommend reading (and doing the exercises) from The C Programming Language by K&R. https://www.amazon.com/Programming-Language-Brian-W-Kernighan/dp/0131103628
The C Programming Language is short and concise with examples and exercises http://www.amazon.com/The-Programming-Language-2nd-Edition/dp/0131103628/ref=sr_1_1?ie=UTF8&amp;qid=1404934158&amp;sr=8-1&amp;keywords=C+programming+language
XCode has been free for a while in the Itunes store.
If you have any aptitude at all for programming, you should be able to finish that book in the summer before your class and understand the fundamentals of C. If you cannot do this, you ought to reconsider your career path.
I quite like the book written by the developers of the language themselves. The C programming language.
Data Structures & Algorithms Bible
C Programming Language Bible
Can’t go wrong with either of these books.
Yeah - I'm probably the odd one out, having almost no programming- or technology-related books left on my shelf - other than a couple of the classics that don't get outdated. I do still have this one and this one, although those are only for nostalgic reasons.
The set dresser comment was before I saw what else was on the shelf - I don't find it all that unlikely a collection now - although I'm still hard pressed to find a reason that Elliot would need e.g. a "missing manual" for OSX Mavericks in 2013. Or a relatively recent (from the typeface and colors, probably at least mid-00's) edition of PCs for Dummies. :-) But like someone said, maybe that was a gift.
Mainly because C has no memory management by itself. The programmer is responsible to declaring and releasing memory. On top of that is the extensive use of pointers to pass data and functions around. Not having objects is just another mark against it.
C is good for a lot of things, but not everything. There are almost as many ways to shoot yourself in the foot as there are in perl.
The C Programming Book by the creators of the language should definately be on your reading list.
"The C Language", generally referred to as "K & R" after the authors, is pretty old but still a wonderful book. (C is pretty old too, after all.)
You'll eventually want to supplement it with some newer material but it's such a well-written book that it's great to start with.
C++ is not what you need to learn then, you need just plain old ANSI-C. Yes, there is a difference.
Amazon link: The C Programming Language
You might be able to find a book in your local library.
To add to what others have been saying, if you choose to learn C, I would suggest that you pick up a copy of The C Programming Language, by Brian Kernighan and Dennis Ritchie - one of the go-to books for learning how to program in C.
And, perhaps one of the reasons this book is one of the first you should check out when it comes to learning C, Dennis Ritchie was one of the guys who created the C programming language itself!
Best of luck with learning C and/or C++ and I hope this helped you!
So is this one. That doesn't make it any less good.
If you're mainly interested in Java, I would recommend Effective Java by Joshua Bloch. It's a great guide with recommendations for best practices in the language.
For C, the best book is The C Programming Language by Kernighan and Ritchie. I would recommend that you read that before ever looking at C++ because C++ is based on C. In fact, it's such a great book that I would recommend reading it before you read anything else on any language. You can skip the file system and Unix stuff though.
For C++, I have never found a good beginner book, so my suggestion would be that after you read the above C book, read the stuff in this tutorial and then read Effective C++ by Scott Meyers. It's another best practices book.
For Python, I've heard good things about Learning Python but I don't really know. I actually found it more useful to just go through the Python tutorial and then start making fun little scripts.
Hope that helps!
"C is quirky, flawed, and an enormous success." — Dennis M. Ritchie.
Look it up: C Programming Language
Everyone is giving some conflicting advice so here's my also conflicting two cents.
I can really suggest reading C Programming Language, 2nd Edition for questions related to the C-programming-language! Other than that this interactive tutorial pretty much points out the most important subjects you need to know to master the language.
You don’t have to be on Reddit. You could be reading this book instead: https://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628
Shit, my copy of "The C Programming Language" was $50 like 20 years ago, and that was an important and dense book even at ~270 pages.
That better be some quality documentation on what is essentially a GNU project.
I highly recommend using this book: "C The Programming Language"
It was my first book for learning C. And I think great for someone starting out. It has plenty of problems and is very informational. Use Youtube tutorials by people like Derek Banas and TheNewBoston to help start programming in C.
I hope that is sarcasm, if not, here's some bed time reading.
Unix is more than a simplified Multric knock off and C is more than some language cobbled together.
This book teaches you how to program in C! It does not hit theory hard. It is considered one of the premier programing books. Full of practical knowledge.
C Programming Language, 2nd Edition by Brian W. Kernighan et al. http://www.amazon.com/dp/0131103628/ref=cm_sw_r_udp_awd_eJWltb0PHPQFQ
I recommend if you want to learn programming concepts
Google: python the hard way
The C Programming Language (aka K&R)
Everyone should have a copy of this book on the shelf. Sure there's arguably better books for learning C, and K&R hasn't even been updated in 28 years (the code in the book is not valid c99). But it's like the holy bible of programming books.
Hackers: Heroes of the Computer Revolution is worth a read.
All of Kevin Mitnick's books are good.
I'd honestly not really bother buying any books for learning actual programming from, since most stuff moves so fast, and there's so much material online to learn from.
You should not look the source code of the libs if you want to learn how C works, their code it's full of complex concepts of C programming like a lot of preprocessor, abstract structures and complex algorithms (dynamic programming, divide and conquer, backtracking, etc).
If you don't know how UNIX programming works you should start there, like process control, file and dir management, threading, networking. A lot more useful to learn pure C than the standard libs implementations.
For UNIX programming read this: Stevens
To improve your knowledge in C: K&R and as a complement king.
If you insist in reading library implementation take a look at OpenBSD libs implementation (much clutter-less than GNU).
Oh, and also do yourself a big favor and learn Vim reading learning vim.
Knowing the basics of C language and UNIX programming is the way to become a true programmer/hacker.
This is called "Learn C the Hard Way," but I think a better name is "C Programming for Idiots." Just dive in with the real stuff.
Look at me, everyone! I'm smarter than the authors of:
Please lecture us. After all, those men are only a Harvard graduate decorated by the president of the United States and a Princeton professor with a PhD in Electrical Engineering.
Start with a language like Python. After that it is easier for you to learn C, because you will know at least the basic programming constructs like If-statements, loops, variables etc.
I would learn C with the book The C Programming Language. It's the standard bible for C, short and to the point, and one of the best technical books ever. A good C knowledge is IMHO necessary and useful, because sooner or later you have to use C libraries or at least fall back to the C interfaces of Mac OS or iPhone OS to do certain things that aren't there in the Objective-C abstraction layers.
After you have a solid C knowledge, you can learn about Object Oriented Programming and Objective-C. Apple has a good introduction to both topics: Introduction to The Objective-C Programming Language.
After you know the language, you can learn about Cocoa in the Cocoa Fundamentals Guide and do your first graphical Cocoa application with Xcode and Interface Builder with the Cocoa Application Tutorial.
Then buy the book Cocoa Programming for Mac OS X by Aaron Hillegass. You will learn to use some of the most important Cocoa classes. After that you can stay with the Apple docs and reference.
When you know Cocoa, you can do your first steps with iPhone development very easily by watching the peepcode.com introduction videos IPHONE VIEW CONTROLLERS PART I and IPHONE VIEW CONTROLLERS PART II - oh, peepcode has even a Objective-C introduction video OBJECTIVE-C FOR RUBYISTS but it's very ruby-centric...
Go out and buy K&R's "The C Programming Language". It's about 50 bucks on Amazon, and it's the definitive guide to C.
C++ is a derivation (and in fact, a strict superset) of C. So, anything that works in C works in C++. The book will get you acquainted with pointers, structs, and all the things that make C totally different than Java.
The best way I can describe C++ is if Java and C had a bastard child-a lot of the concepts from Java (object orientation, a class library, etc.) translate pretty directly, but a lot of stuff (pointers, memory allocation/deallocation, structs, unions) come from C. I find that these topics are much easier to learn through C rather than C++.
C doesn't contain much resemblance to Java because it has no object orientation (i.e. you can't have "objects", nor can you have "object methods" which only act upon the data in that object) which makes it a very weird experience for someone with only Java programming experience, but being able to program in straight ANSI C is an invaluable skill and it will put you WAY ahead in 225.
Here's a link. Trust me, don't rent this book, BUY it. You will use it for years to come.
Also, if you want a book that strictly covers C++ (I would only recommend this after you go through all of K&R), go ahead and get this one. It's easily the best C++ reference I know of.
>How do I go about installing libraries?
You don't install libraries. Either you compile them in as source code or you call them using your operating system or include them with your build command.
>Is there a package manager?
For what? This has nothing to do with the language. There are no "packages".
The rest of your questions are based on lack of fundamental knowledge and things learned from sources that have nothing to do with C. You need to find a very simple intro to get you going. Even though it's old and not modern, the very best book as an intro to C is "the white book". Easy to read by the author of C himself. Over 30 years later, I still have it sitting on my shelf as a homage if nothing else.
EDIT: As always, I'm not surprised about redditors inability to read what I wrote and insert words I never said.