Just learning C
Just learning C
Hey, I got a hold of C Primer Plus on Amazon and I plan to finish all the chapters by mid-July.
After that, what would you suggest I do from there?
After that, what would you suggest I do from there?
Re: Just learning C
Run for president/prime minister/whatever of your country?
Re: Just learning C
Write an operating system.
What else would someone do with their spare time?
What else would someone do with their spare time?
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
- max
- Member
- Posts: 616
- Joined: Mon Mar 05, 2012 11:23 am
- Libera.chat IRC: maxdev
- Location: Germany
- Contact:
Re: Just learning C
SpyderTL wrote:Write an operating system.
What else would someone do with their spare time?
Re: Just learning C
TL;DR
Don't write an operating system.
----
Kernel space programming is a harsh and hostile environment. You should "learn the ropes" with all the help you can get (debuggers, third-party libraries, generic Q&A resources, ...), and kernel space is "special" in more ways than one. You should learn "general" first, and "specific" second.
My recommendation is, think of something that would actually be useful for you. Something where writing your own software for it might not be the most efficient (e.g. as opposed to whipping up an Excel sheet or commandeering some other existing software), but where the end product is something you might actually use, ideally frequently, yourself.
Something achievable (which "your own OS", pretty much by definition, isn't).
This puts you in the place of being your own customer. You will find what "works" and what doesn't, you will learn how a requirement you might be having is turned into smaller issues and, eventually, code. You find the little edges and burrs in your v1.0, and take pride in smoothing them out in v2.0.
And in doing this, you gain experience on "how things work", you improve your coding style and skills. Doing so while developing an OS means that, pretty soon, you will have to rewrite all the basic stuff because you learned, and realized how much your code base sucks.
That can happen with any hobby project, but in a small-scale, achievable, user-space hobby project, rewriting or ditching doesn't hurt as much as with kernel-space OS groundwork.
---
Some things I wrote when I was still very much a beginner, to show you what I mean:
A program to track student attendance at my Judo club. (Who was there most regular, how full were the Monday courses as opposed to the Friday ones, stuff like that, which was done by hand before and by Excel sheet after, but actually this first "real" program I ever wrote -- on a C128 -- was used for about a year by someone else after I didn't want to do it anymore. I was ~14 at that time.)
A program that scanned upload logs of a specific FTP site for known software titles receiving updates, and turning that information into a website listing the latest available versions for said software titles.
A program that did bookkeeping and game sheet printouts for a boardgame league I was running.
A program that assisted me in turning a collection of text files (containing news items) into a computer news website.
None of these had more than a couple hundred, perhaps a few thousand lines of code when I did put them to rest eventually. But I learned much while doing them, and did useful work with them.
Don't write an operating system.
----
Kernel space programming is a harsh and hostile environment. You should "learn the ropes" with all the help you can get (debuggers, third-party libraries, generic Q&A resources, ...), and kernel space is "special" in more ways than one. You should learn "general" first, and "specific" second.
My recommendation is, think of something that would actually be useful for you. Something where writing your own software for it might not be the most efficient (e.g. as opposed to whipping up an Excel sheet or commandeering some other existing software), but where the end product is something you might actually use, ideally frequently, yourself.
Something achievable (which "your own OS", pretty much by definition, isn't).
This puts you in the place of being your own customer. You will find what "works" and what doesn't, you will learn how a requirement you might be having is turned into smaller issues and, eventually, code. You find the little edges and burrs in your v1.0, and take pride in smoothing them out in v2.0.
And in doing this, you gain experience on "how things work", you improve your coding style and skills. Doing so while developing an OS means that, pretty soon, you will have to rewrite all the basic stuff because you learned, and realized how much your code base sucks.
That can happen with any hobby project, but in a small-scale, achievable, user-space hobby project, rewriting or ditching doesn't hurt as much as with kernel-space OS groundwork.
---
Some things I wrote when I was still very much a beginner, to show you what I mean:
A program to track student attendance at my Judo club. (Who was there most regular, how full were the Monday courses as opposed to the Friday ones, stuff like that, which was done by hand before and by Excel sheet after, but actually this first "real" program I ever wrote -- on a C128 -- was used for about a year by someone else after I didn't want to do it anymore. I was ~14 at that time.)
A program that scanned upload logs of a specific FTP site for known software titles receiving updates, and turning that information into a website listing the latest available versions for said software titles.
A program that did bookkeeping and game sheet printouts for a boardgame league I was running.
A program that assisted me in turning a collection of text files (containing news items) into a computer news website.
None of these had more than a couple hundred, perhaps a few thousand lines of code when I did put them to rest eventually. But I learned much while doing them, and did useful work with them.
Every good solution is obvious once you've found it.
Re: Just learning C
But, I'm not heading into OSDev just yet.
LOL at the running for president thing.
LOL at the running for president thing.
Re: Just learning C
Here's an update: I think I slipped up a little bit with my schedule. I may have skipped a week of reading a chapter. I decided that I'll read the chapters during the weekends (I have a busy week), is that good?
Anyway, I may have to push the finish date one or two weeks.
Anyway, I may have to push the finish date one or two weeks.
Re: Just learning C
For perspective, I learned C/C++ some time in the 90's. I am working as professional developer since 2000, focussing on C++ since 2001.
And I am still learning.
Don't put a deadline. You will have to come back checking some part of the book, frequently, and you will keep checking references and online resources for many years to come.
There usually isn't a point in time at which you can claim you know "everything" about any given programming language, let alone programming in general.
And I am still learning.
Don't put a deadline. You will have to come back checking some part of the book, frequently, and you will keep checking references and online resources for many years to come.
There usually isn't a point in time at which you can claim you know "everything" about any given programming language, let alone programming in general.
Every good solution is obvious once you've found it.
- eryjus
- Member
- Posts: 286
- Joined: Fri Oct 21, 2011 9:47 pm
- Libera.chat IRC: eryjus
- Location: Tustin, CA USA
Re: Just learning C
Since 1988 for me... and still learning. As soon as you stop learning (especially with computers) you stagnate.Solar wrote:I learned C/C++ some time in the 90's. I am working as professional developer since 2000, focussing on C++ since 2001.
And I am still learning.
Adam
The name is fitting: Century Hobby OS -- At this rate, it's gonna take me that long!
Read about my mistakes and missteps with this iteration: Journal
"Sometimes things just don't make sense until you figure them out." -- Phil Stahlheber
The name is fitting: Century Hobby OS -- At this rate, it's gonna take me that long!
Read about my mistakes and missteps with this iteration: Journal
"Sometimes things just don't make sense until you figure them out." -- Phil Stahlheber
- Schol-R-LEA
- Member
- Posts: 1925
- Joined: Fri Oct 27, 2006 9:42 am
- Location: Athens, GA, USA
Re: Just learning C
Just to head off anyone saying that you might as well be dead if you aren't learning - I am learning all the time, and I might as well have never been born despite that.eryjus wrote:Since 1988 for me... and still learning. As soon as you stop learning (especially with computers) you stagnate.Solar wrote:I learned C/C++ some time in the 90's. I am working as professional developer since 2000, focussing on C++ since 2001.
And I am still learning.
Take that, Clarence!
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
Re: Just learning C
MORE UPDATES: Even though I have purchased a print edition of C Primer Plus, it's very frustrating that I have to turn or bend over to read while at my keyboard, due to the way me and my desk are arranged. I'd like advice on how to more comfortably arrange this. I may even post a picture of my "work desk" to give you a better description.
Re: Just learning C
That's a pretty thick book (5th edition is 984 pages). Perhaps, an eBook version might work better?mac wrote:I may even post a picture of my "work desk" to give you a better description.
Re: Just learning C
Then, I might have as well spent a little over $10.00 on a used copy I will never read a lot. I have read an eBook version before deciding to purchase the actual print book, but any eBook on an online Google search may have questionable legal status, huh?alexfru wrote:That's a pretty thick book (5th edition is 984 pages). Perhaps, an eBook version might work better?mac wrote:I may even post a picture of my "work desk" to give you a better description.
Re: Just learning C
Check out the book on Amazon. The page offers "Kindle eBook" for $25.99 and "Paperback" for $8.99. And you don't need a Kindle, there's a PC app for these eBooks as well as phone apps. You can also read these eBooks in the browser.mac wrote:Then, I might have as well spent a little over $10.00 on a used copy I will never read a lot. I have read an eBook version before deciding to purchase the actual print book, but any eBook on an online Google search may have questionable legal status, huh?alexfru wrote:That's a pretty thick book (5th edition is 984 pages). Perhaps, an eBook version might work better?mac wrote:I may even post a picture of my "work desk" to give you a better description.
-
- Member
- Posts: 80
- Joined: Wed Aug 09, 2017 7:37 am
Re: Just learning C
Well, while you are learning, here are a few things.
= Create a simple chat program (client and server)
= Create a programming language
= Learn many functions once you learn the syntax and other important things
= Create a simple chat program (client and server)
= Create a programming language
= Learn many functions once you learn the syntax and other important things