Login Register






Thread Rating:
  • 0 Vote(s) - 0 Average


I'm back! Let's talk C. filter_list
Author
Message
RE: I'm back! Let's talk C. #17
(11-12-2017, 09:20 PM)Bootlegronin47 Wrote: I was actually thinking about learning this language. As of now I'm  a newbie, no shame no shame, practicing my skills with writing in linux, but the book I'm reading has C in it. Is it worth a go go for a self teacher?

Don't ever be shameful of your skills. Just by knowing that programs aren't written in English you are more advanced than thousands of web programmers.

I'm entirely self taught in C, AArch64 (ARM), ARMv4-7, C#, and Java, and I like to believe that I'm very good at some of those. I didn't use books though, I tried to take a hands on approach. I picked a project I wanted to do, one good example of that is a console-based DnD type game called Key Seeker 4200 which I open sourced in 2012 (https://github.com/phyrrus9/ksclassic). I then used the basic hello world program (link)) as a template, and I worked with it. I followed a pretty simple algorithm:

1. Determine task (what I wanted to do, in small steps)
2. Write pseudo code (in words and basic math, write out how the task works)
3. Translate pseudo code to C, using google when I didn't know how to do something
4. Repeat until project finished

Doing this over and over has caused me to become very close friends with the C language, I understand its operation inside and out. The trick with this method is you need to pick projects that get harder each time. Every project you start should be almost entirely made up of things you don't know how to do. Making them more difficult forces your brain to learn how the language works, rather than just memorizing how to do things. Over time you will memorize the standard library, but really you just need to know the names of the functions, since you can just open up your linux terminal and run (for example, memcpy)
Code:
man memcpy
[Image: hUECOaM.png]

Sometimes though, you will find a couple stdlib functions that are also linux commands, and you'll have to do it differently: examples
Code:
man unlink
[Image: acgpqPn.png]
this is a linux command, you need the C library version, so you need
Code:
man 2 unlink
[Image: alrl5Wl.png]

You can understand how man works by running
Code:
man man

It's a very useful reference though, don't bother using websites for this, as they don't always give the correct information, or even worse are written for C++. The linux manual will always have the same library definitions for what's on your system, and is always the best resource in my opinion.

Feel free to get ahold of me either on the forum here or on discord. I'm happy to help.
If you want ideas for projects, feel free to browse my GitHub. You may use anything you find on there, many of those projects are personal ones I've started to keep my skills fresh and never finished. Link: https://github.com/phyrrus9?tab=repositories
(This post was last modified: 11-13-2017, 10:20 PM by phyrrus9.)

[+] 2 users Like phyrrus9's post
Reply





Messages In This Thread
I'm back! Let's talk C. - by DarkMuse - 10-22-2017, 11:34 PM
RE: I'm back! Let's talk C. - by phyrrus9 - 10-22-2017, 11:36 PM
RE: I'm back! Let's talk C. - by VBQL - 10-27-2017, 09:51 PM
RE: I'm back! Let's talk C. - by Drako - 10-22-2017, 11:38 PM
RE: I'm back! Let's talk C. - by DarkMuse - 10-23-2017, 12:23 AM
RE: I'm back! Let's talk C. - by phyrrus9 - 10-23-2017, 12:46 AM
RE: I'm back! Let's talk C. - by Nil - 11-06-2017, 06:19 AM
RE: I'm back! Let's talk C. - by insidious - 10-23-2017, 05:39 AM
RE: I'm back! Let's talk C. - by phyrrus9 - 10-23-2017, 04:41 PM
RE: I'm back! Let's talk C. - by Llebacc - 10-26-2017, 09:00 PM
RE: I'm back! Let's talk C. - by Pikami - 10-26-2017, 09:51 PM
RE: I'm back! Let's talk C. - by Inori - 10-26-2017, 10:27 PM
RE: I'm back! Let's talk C. - by peter lee - 11-05-2017, 08:52 PM
RE: I'm back! Let's talk C. - by phyrrus9 - 10-27-2017, 05:02 PM
RE: I'm back! Let's talk C. - by phyrrus9 - 11-05-2017, 11:53 PM
RE: I'm back! Let's talk C. - by Bootlegronin47 - 11-12-2017, 09:20 PM
RE: I'm back! Let's talk C. - by phyrrus9 - 11-13-2017, 10:19 PM



Users browsing this thread: 2 Guest(s)