¹https://www.amazon.com/Programming-Language-2nd-Brian-Kernig...
[1] Advanced Programming in the UNIX Environment https://www.amazon.com/Advanced-Programming-UNIX-Environment...
[2] C Programming Language https://www.amazon.com/Programming-Language-2nd-Brian-Kernig...
In combination with other classes (and books) on networking, operation systems, data structures we covered a big variance of use cases with C. My question is: How do I take this to the next level? For example I feel I never missed a concept from those classes but when I see C code posted on a thread here it's probably something completely unreadable and complex. Can anyone provide resources to advance a little? What should I study if my goal is to make good and useful modern C software?
I feel like my typing is a bit abstract but I will be happy to clarify.
PS Yes, I've heard of C++ and Rust ;P
"C Programming: A Modern Approach, 2nd Edition" - https://www.amazon.com/C-Programming-Modern-Approach-2nd/dp/...
Note the above book is good for its quality as a reference, but not enterily considered as "modern". For a more updated approach I would also recommend:
"Modern C" - https://www.manning.com/books/modern-c
and
"Effective C" - https://nostarch.com/Effective_C
The first book on the language:
"C Programming Language, 2nd Edition" - https://www.amazon.com/Programming-Language-2nd-Brian-Kernig...
Is interesting from a historical perspective, but considered as not a recommended resource for learning C.
Edit: If you are learning C there is something quite important you need to know... C and C++ are two completely different languages, and that is how you should approach your learning. In other words, don't go learning the C in C++ :-)
https://www.amazon.com/Programming-Language-2nd-Brian-Kernig...
Also, there's nothing magical about pointers - scripting languages use "handles", which is the same thing except they're read-only to the end-user programmer.
The real challenge with C is multi-threaded programming, so don't do that if you don't need it.
I think the primary topic to master in C is pointers. This is where most falter. It takes a few years to "master" (if we ever do). Here I would recommend "Understanding and Using C Pointers", Richard Reese. [2]
If you are interested in networking, any of the classic "TCP/IP Illustrated Vols I/II/III", W. Richard Stevens, [3] contain a ton of C code to implement components of TCP/IP.
If you are interested in Graphics, then "Graphics Gems", Andrew Glassner [4] is a good source.
"An Introduction to GCC", Brian Gough, [5] to understand the tooling and its various bells and whistles.
My learning swimming by jumping into the deep end of the pool experience was realized by learning Windows Programming using the Charles Petzold book and navigating through Microsoft Foundation Classes in the late 80s/early 90s. The state of the art in tooling wasn't that great in those days and I spent months with the book to get things going. This was done after I had built a foundation with K&R and a decent amount of Unix network programming.
I see a lot of the other posts recommend more modern books. But you still need to build your foundation on C and Pointers in particular.
Good luck on your journey.
[1] https://www.amazon.com/Programming-Language-2nd-Brian-Kernig...
[2] https://www.amazon.com/Understanding-Using-Pointers-Techniqu...
[3] https://www.amazon.com/TCP-Illustrated-Protocols-Addison-Wes...
[4] https://www.amazon.com/Graphics-Gems-Andrew-S-Glassner/dp/01...
[5] https://www.amazon.com/Introduction-GCC-GNU-Compilers/dp/095...
https://www.amazon.com/Programming-Language-2nd-Brian-Kernig...
The best thing you can do is finding some open source code that interest you, read it and write it.
For example, I write my own controllers for CNCs, and there are lots of code for controlling stepper motors out there. I also learned OpenGL and sockets this way long time ago.
On the other hand, C is a terrible language for any big project unless you automate it some way.
I use mostly lisp in order to write C code automatically. C is too low level for writing any substantial code. Lisp has things like Macros(nothing to do with c macros) that can make you write code 10x, to 50x faster easily.
While I do understand your point, it still does not justify encouraging modern-day Robinhoods' and breaking the law.
[1] https://www.amazon.com/Programming-Language-2nd-Brian-Kernig... [2] https://www.amazon.in/Programming-Language-Kernighan-Dennis-...
[1] https://www.amazon.com/Programming-Language-2nd-Brian-Kernig...
For instance, on Amazon, the K&R C Programming book goes for $28.52 used, $61.74 new, or $28.70 for a one semester rental [0]. For a book that hasn't changed since 1988, these prices are absurd.
While as on AbeBooks, the international edition goes for $10-11 [1].
[0]: https://www.amazon.com/Programming-Language-2nd-Brian-Kernig...
[1]: https://www.abebooks.com/servlet/SearchResults?bi=0&bx=off&c...
I've read some other "modern" books about C like "21st century C" but they are not for people that do not know C and they are not so good for people that know it.
Can you provide any arguments to support what you wrote? What alternative you would propose for learning C?
https://www.amazon.com/Programming-Language-Brian-W-Kernigha...
Read what majority of opinions say. It's really easy to criticize without giving better alternative.
#include "stdio.h"
int main () {
/* local variable definition */ char grade = 'B'; int a = 1; switch(grade) { printf("great!\n" ); a = a + 1; case 'A' : printf("Excellent!\n" ); break; case 'B' : case 'C' : printf("Well done\n" ); printf("a: %d\n", a); break; case 'D' : printf("You passed\n" ); break; case 'F' : printf("Better try again\n" ); break; default : printf("Invalid grade\n" ); } printf("Your grade is %c\n", grade ); return 0; }
[1]: https://www.amazon.com/Programming-Language-Brian-W-Kernigha...
https://www.amazon.com/Programming-Language-Brian-W-Kernigha...
I'd also learn SICP: https://www.amazon.com/Structure-Interpretation-Computer-Pro...
and algorithms from either CLRS https://www.amazon.com/Introduction-Algorithms-3rd-MIT-Press... or Skiena Algorithm Design https://www.amazon.com/Algorithm-Design-Manual-Steven-Skiena...
https://www.amazon.com/Programming-Language-Brian-W-Kernigha...
http://norvig.com/21-days.html
Learning C is difficult because you need to know how the machine actually works. Trust me, there are no shortcuts. The year can be 2036, learning C will be the same.
With that said, these books are excellent:
http://www.amazon.com/Programming-Language-Brian-W-Kernighan...
http://www.amazon.com/Expert-Programming-Peter-van-Linden/dp...
http://www.amazon.com/Primer-Plus-6th-Developers-Library/dp/...
Perhaps a future edition...
http://www.amazon.com/The-Programming-Language-Brian-Kernigh...
> pjmlp 211 days ago | link | parent | flag
> Nice article, but it fails to explain the experience using Smalltalk environment really is. Smalltalk, like Lisp Machines, was originally a blend of GUI operating system, development environment and the first real IDE.
> agumonkey 211 days ago | link
> It's funny. Unix was also meant as an IDE (persistency, logic, machine and user interfaces). It seems they all were trying to reach the same goal in their own way. -----
> 2 points by leoc 210 days ago | link
> The fact that dc was originally intended as basically the Unix system's bignums library http://www.catb.org/esr/writings/taoup/html/ch08s02.html#id2.... helped to open my eyes to this. I think you could talk about this idea of Unix as "big Unix" and the narrower understanding of Unix programming, dominated by the C APIs, as "little Unix". Little Unix took over the world, while big Unix collapsed under its own weight due to things like portability/versioning hell, robustness problems due to faulty tools and text-parsing errors, performance issues and so on. (Partly this was a success catastrophe, of course, for example in how the popularity of Unix resulted in a profusion of different Unix userlands with varying interfaces and bugs.) Also little Unix was more comprehensible from, and more portable to and from, the world of PC (MS-DOS/Windows/Mac) application development, where the environment is more or less the kernel's/OS vendor's APIs. The fact that clearly many more people have bought or read K&R http://www.amazon.com/dp/0131103628/ (with its very little-Unix perspective) than /The Unix Programming Environment/ http://www.amazon.com/dp/013937681X reflects this divergence, and also surely helped to create it.
Learn about the Unix Way: http://c2.com/cgi/wiki?UnixWay
Learn about crufty neckbeard stuff: http://doc.cat-v.org/programming/
(cat-v has all kinds of interesting things)
Learn C: http://c.learncodethehardway.org/book/
No, really, learn C: http://www.amazon.com/C-Programming-Language-2nd-Edition/dp/...
Learn about networking with sockets: http://www.beej.us/guide/bgnet/
(it's in C, but the principles are in other language bindings as well)
Devops/sysadminning is mostly just damned superstition and voodoo and hard-fought experience...that said, consult notes from others: http://users.cis.fiu.edu/~tho01/psg/
~
If you want more hands-on experience, setup a VPS and make something: http://feross.org/how-to-setup-your-linode/
If you find stuff in there you don't understand, ask your devs for help.
http://www.amazon.com/C-Programming-Language-2nd-Edition/dp/...
Little Unix took over the world, while big Unix collapsed under its own weight due to things like portability/versioning hell, robustness problems due to faulty tools and text-parsing errors, performance issues and so on. (Partly this was a success catastrophe, of course, for example in how the popularity of Unix resulted in a profusion of different Unix userlands with varying interfaces and bugs.) Also little Unix was more comprehensible from, and more portable to and from, the world of PC (MS-DOS/Windows/Mac) application development, where the environment is more or less the kernel's/OS vendor's APIs. The fact that clearly many more people have bought or read K&R http://www.amazon.com/dp/0131103628/ (with its very little-Unix perspective) than /The Unix Programming Environment/ http://www.amazon.com/dp/013937681X reflects this divergence, and also surely helped to create it.
That said, software engineering is one of the fields you can get employment without a degree, provided you can 'show your work'. The hard part is building up your skills in a way that can easily be demonstrated. The common wisdom these days is to create a github profile, build some interesting things, commit to some open-source libraries, and use your profile as a resume of sorts.
Here's interesting article on being a well-rounded programmer: http://jasonrudolph.com/blog/2011/08/09/programming-achievem...
We're also in a 'golden age' of self-guided learning, with online tools to help learning galore, here are a few:
http://codecademy.com http://www.codeschool.com/ https://www.khanacademy.org/cs
Also, get a few decent books on "Programming 101". Common wisdom suggests you learn C, one of Ruby/Python, Java, and a functional language like Haskell. Here are some good books to learn from:
The C Programming Language (some people say you should start here, I'm one of them!): http://www.amazon.com/Programming-Language-2nd-Brian-Kernigh...
Learning Python: http://www.amazon.com/Learning-Python-Powerful-Object-Orient...
Learning Java: http://www.amazon.com/Learning-Java-Patrick-Niemeyer/dp/0596...
I hope you do choose programming as a career, its been very rewarding for me :)
In no particular order:
1- http://www.amazon.com/C-Programming-Language-2nd-Edition/dp/...
2- http://www.amazon.com/The-Answer-Book-Solutions-Programming/...
3- http://www.amazon.com/The-Standard-Library-P-J-Plauger/dp/01...
4- http://www.amazon.com/C-Traps-Pitfalls-Andrew-Koenig/dp/0201...
5- http://www.amazon.com/Expert-Programming-Peter-van-Linden/dp...
6- http://www.amazon.com/Data-Structures-In-Noel-Kalicharan/dp/...
7- http://www.amazon.com/Data-Structures-Using-Aaron-Tenenbaum/...
8- http://www.amazon.com/Mastering-Algorithms-C-Kyle-Loudon/dp/...
9- http://www.amazon.com/Code-Complete-Practical-Handbook-Const...
10- http://www.amazon.com/Design-Patterns-Elements-Reusable-Obje...
11- http://www.amazon.com/The-Mythical-Man-Month-Engineering-Ann...
12- http://www.amazon.com/The-Programming-Language-4th-Edition/d...
13- http://www.amazon.com/The-Standard-Library-Tutorial-Referenc...
14- http://www.amazon.com/API-Design-C-Martin-Reddy/dp/012385003...
15- http://www.amazon.com/The-Linux-Programming-Interface-Handbo...
16- http://www.amazon.com/Computer-Systems-Programmers-Perspecti...
17- http://www.amazon.com/System-Programming-Unix-Adam-Hoover/dp...
18- http://www.amazon.com/Memory-Programming-Concept-Frantisek-F...
19- http://www.amazon.com/Memory-Management-Implementations-Prog...
20- http://www.amazon.com/UNIX-Filesystems-Evolution-Design-Impl...
21- http://www.amazon.com/PCI-System-Architecture-4th-Edition/dp...
22- http://www.amazon.com/Universal-Serial-System-Architecture-E...
23- http://www.amazon.com/Introduction-PCI-Express-Hardware-Deve...
24- http://www.amazon.com/Serial-Storage-Architecture-Applicatio...
25- http://www.amazon.com/SATA-Storage-Technology-Serial-ATA/dp/...
26- http://www.amazon.com/Beyond-BIOS-Developing-Extensible-Inte...
27- http://www.amazon.com/Professional-Assembly-Language-Program...
28- http://www.amazon.com/Linux-Kernel-Development-3rd-Edition/d...
29- http://www.amazon.com/Version-Control-Git-collaborative-deve...
30- http://www.amazon.com/Embedded-Software-Primer-David-Simon/d...
31- http://www.amazon.com/Programming-Embedded-Systems-C/dp/1565...
32- http://www.amazon.com/Making-Embedded-Systems-Patterns-Softw...
33- http://www.amazon.com/Operating-System-Concepts-Abraham-Silb...
34- http://www.amazon.com/Performance-Preemptive-Multitasking-Mi...
35- http://www.amazon.com/Design-Operating-System-Prentice-Hall-...
36- http://www.amazon.com/Unix-Network-Programming-Sockets-Netwo...
37- http://www.amazon.com/TCP-Illustrated-Volume-Addison-Wesley-...
38- http://www.amazon.com/TCP-IP-Illustrated-Vol-Implementation/...
39- http://www.amazon.com/TCP-Illustrated-Vol-Transactions-Proto...
40- http://www.amazon.com/User-Interface-Design-Programmers-Spol...
41- http://www.amazon.com/Designing-Interfaces-Jenifer-Tidwell/d...
42- http://www.amazon.com/Designing-Interfaces-Jenifer-Tidwell/d...
43- http://www.amazon.com/Programming-POSIX-Threads-David-Butenh...
44- http://www.intel.com/p/en_US/embedded/hwsw/software/hd-gma#d...
45- http://www.intel.com/content/www/us/en/processors/architectu...
46- http://www.intel.com/p/en_US/embedded/hwsw/hardware/core-b75...
47- http://www.hdmi.org/index.aspx
48- http://en.wikipedia.org/wiki/Digital_Visual_Interface
49- http://www.amazon.com/Essential-Device-Drivers-Sreekrishnan-...
50- http://www.amazon.com/Making-Embedded-Systems-Patterns-Softw...
51- http://www.amazon.com/Python-Programming-Introduction-Comput...
52- http://www.amazon.com/Practical-System-Design-Dominic-Giampa...
53- http://www.amazon.com/File-Systems-Structures-Thomas-Harbron...
54- ...well, I'll stop here.
Of course, the equivalent knowledge can be obtained by trial-and-error, which would take longer and might result in costly errors and imperfect design. The greater danger here is that a sole developer, without the feedback and interaction of even a small group of capable and experienced programmers could simply burn a lot of time repeating the mistakes made by those who have already trenched that territory.
If the goal is to write a small RTOS on a small but nicely-featured microcontroller, then the C books and the uC/OS book might be a good shove in the right direction. Things start getting complicated if you need to write such things as a full USB stack, PCIe subsystem, graphics drivers, etc.
You're also interested in games, so you could consider Python and the PyGame library: http://www.pygame.org/ Or if you want to go with C, try the allegro library: http://alleg.sourceforge.net/index.html (Learning this library was what taught me C, after picking up the basics of C I picked up the rest as I went along).
End of the day though, just pick something and learn it. It's better to be learning than worrying about what to learn.
The first book, Code - Charles Petzold, is only ten bucks on the Kindle right now (SOLD) and I own the other two.
I remember SICP being like 90 bucks for my hardcover copy and I'm pretty sure I bought it after reading the Joel on Software article "The Perils of Java Schools" while I was loving life as a bank IT guy so this is workable advice. It only took five years to become a "real" programmer after that. Also I sure don't remember K&R being $68[1]. (Yes I know SICP and K&R are both online for free)
[1] http://www.amazon.com/Programming-Language-2nd-Brian-Kernigh...
[2] http://www.joelonsoftware.com/articles/ThePerilsofJavaSchool...
http://www.amazon.com/Programming-Language-2nd-Brian-Kernigh...
Back when he was still doing podcasts Joel Spolsky answered the similar question, which was partly "Does a good programmer without a CS degree really have a chance to get a job at Fogcreek?[1]" (It's near the end of the page.)
He says that for a good self-taught programmer who began with a high-level language, say PHP or Java, who comes at programming from a practical perspective, there are a few important parts of the CS curriculum the person may have missed out on, and goes on to list some books that would help fill in those gaps.
Off the top of his head he named these books in about this order:
- Structure and Interpretation of Computer Programs[2] (also free online[3])
- C Programming Language[4]
- The Unix Programming Environment[5]
- Introduction to Algorithms[6]
He said that those books covered the aspects of the CS curriculum his company needs in a good programmer, e.g. being able to create algorithms for an uncommon data structure.
Those books all have the added advantage of having exercises, and all being a very pleasant read. SICP is an introduction to many of the big ideas in CS: data structures, streams, recursion, interpretation, compilation, register machines, etc., and their implementation in Scheme (a kind of Lisp). It's a great place to start. The next two focus on implementation details like pointers and memory allocation. They are compact, powerful books. The last, Introduction to Algorithms, seems misleadingly titled, as it is fairly comprehensive and used in both undergraduate and graduate courses. If you work your way through the entire book, chapeau!
[1]: https://stackoverflow.fogbugz.com/default.asp?W29060
[2]: http://www.amazon.com/Structure-Interpretation-Computer-Prog...
[3]: http://mitpress.mit.edu/sicp/
[4]: http://www.amazon.com/Programming-Language-2nd-Brian-Kernigh...
[5]: http://www.amazon.com/Unix-Programming-Environment-Prentice-...
[6]: http://www.amazon.com/Introduction-Algorithms-Third-Thomas-C...
1. https://humprog.org/~stephen/research/papers/kell17some-prep...
2. https://amazon.com/dp/013937681X
3. https://amazon.com/dp/0131103628