Just learning C

Programming, for all ages and all languages.
mac
Member
Member
Posts: 144
Joined: Tue Sep 23, 2014 6:12 pm

Just learning C

Post 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?
alexfru
Member
Member
Posts: 1111
Joined: Tue Mar 04, 2014 5:27 am

Re: Just learning C

Post by alexfru »

Run for president/prime minister/whatever of your country? :)
User avatar
SpyderTL
Member
Member
Posts: 1074
Joined: Sun Sep 19, 2010 10:05 pm

Re: Just learning C

Post by SpyderTL »

Write an operating system.

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
User avatar
max
Member
Member
Posts: 616
Joined: Mon Mar 05, 2012 11:23 am
Libera.chat IRC: maxdev
Location: Germany
Contact:

Re: Just learning C

Post by max »

SpyderTL wrote:Write an operating system.

What else would someone do with their spare time? :)
:lol: :lol:
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Just learning C

Post 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.
Every good solution is obvious once you've found it.
mac
Member
Member
Posts: 144
Joined: Tue Sep 23, 2014 6:12 pm

Re: Just learning C

Post by mac »

But, I'm not heading into OSDev just yet.

LOL at the running for president thing.
mac
Member
Member
Posts: 144
Joined: Tue Sep 23, 2014 6:12 pm

Re: Just learning C

Post 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.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Just learning C

Post 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.
Every good solution is obvious once you've found it.
User avatar
eryjus
Member
Member
Posts: 286
Joined: Fri Oct 21, 2011 9:47 pm
Libera.chat IRC: eryjus
Location: Tustin, CA USA

Re: Just learning C

Post 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.
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
User avatar
Schol-R-LEA
Member
Member
Posts: 1925
Joined: Fri Oct 27, 2006 9:42 am
Location: Athens, GA, USA

Re: Just learning C

Post 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!
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.
mac
Member
Member
Posts: 144
Joined: Tue Sep 23, 2014 6:12 pm

Re: Just learning C

Post 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.
alexfru
Member
Member
Posts: 1111
Joined: Tue Mar 04, 2014 5:27 am

Re: Just learning C

Post 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?
mac
Member
Member
Posts: 144
Joined: Tue Sep 23, 2014 6:12 pm

Re: Just learning C

Post 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?
alexfru
Member
Member
Posts: 1111
Joined: Tue Mar 04, 2014 5:27 am

Re: Just learning C

Post 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.
stevewoods1986
Member
Member
Posts: 80
Joined: Wed Aug 09, 2017 7:37 am

Re: Just learning C

Post 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
Post Reply