Page 1 of 2

Just learning C

Posted: Mon Apr 24, 2017 9:22 pm
by mac
Hey, I got a hold of C Primer Plus on Amazon and I plan to finish all the chapters by mid-July. =D>

After that, what would you suggest I do from there?

Re: Just learning C

Posted: Mon Apr 24, 2017 10:11 pm
by alexfru
Run for president/prime minister/whatever of your country? :)

Re: Just learning C

Posted: Mon Apr 24, 2017 11:25 pm
by SpyderTL
Write an operating system.

What else would someone do with their spare time? :)

Re: Just learning C

Posted: Tue Apr 25, 2017 1:11 am
by max
SpyderTL wrote:Write an operating system.

What else would someone do with their spare time? :)
:lol: :lol:

Re: Just learning C

Posted: Tue Apr 25, 2017 3:31 am
by Solar
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.

Re: Just learning C

Posted: Tue Apr 25, 2017 4:35 pm
by mac
But, I'm not heading into OSDev just yet.

LOL at the running for president thing.

Re: Just learning C

Posted: Sun May 07, 2017 5:06 pm
by mac
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.

Re: Just learning C

Posted: Mon May 08, 2017 2:22 am
by Solar
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.

Re: Just learning C

Posted: Mon May 08, 2017 2:27 pm
by eryjus
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.
Since 1988 for me... and still learning. As soon as you stop learning (especially with computers) you stagnate.

Re: Just learning C

Posted: Mon May 08, 2017 3:40 pm
by Schol-R-LEA
eryjus wrote:
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.
Since 1988 for me... and still learning. As soon as you stop learning (especially with computers) you stagnate.
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.

Take that, Clarence!

Re: Just learning C

Posted: Sat Jul 01, 2017 11:35 pm
by mac
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

Posted: Sat Jul 01, 2017 11:50 pm
by alexfru
mac wrote:I may even post a picture of my "work desk" to give you a better description.
That's a pretty thick book (5th edition is 984 pages). Perhaps, an eBook version might work better?

Re: Just learning C

Posted: Sun Jul 02, 2017 8:30 am
by mac
alexfru wrote:
mac wrote:I may even post a picture of my "work desk" to give you a better description.
That's a pretty thick book (5th edition is 984 pages). Perhaps, an eBook version might work better?
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?

Re: Just learning C

Posted: Sun Jul 02, 2017 3:13 pm
by alexfru
mac wrote:
alexfru wrote:
mac wrote:I may even post a picture of my "work desk" to give you a better description.
That's a pretty thick book (5th edition is 984 pages). Perhaps, an eBook version might work better?
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?
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.

Re: Just learning C

Posted: Wed Aug 09, 2017 12:46 pm
by stevewoods1986
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