I am in the same boat as you are...bare with me by no means I am an expert.<p>In fact, I read couple of chapters in Modern C yesterday :). Here are some of
the things I am doing to improve my C skills to match with some of the
admired/professional developers.<p>Decide which platform to use<p>~~~~~~~~~~~~~~~~~~<p>Unfortunately, to become proficient in it we need to write code and focus on a
platform. I have been fighting between whether to develop on Windows vs Linux. I
am very experienced in Windows environment(using debuggers/cl/linkers/Windbg
etc) but when it comes to writing good quality C code(not C++) and for learning
how to write good maintainable moderately large source code, my research showed
that Windows compilers/C standard APIs are not great, in fact they hinder your
productivity. I have wasted countless number of hours to just figure out how to
properly create a simple C project with a decent build system. Unfortunately, I
could not find one. The closest I could find is CMake as MSBuild is a nightmare
to work with. I even tried NMAKE but failed. When it comes to documentation of
finding basic C Api usage,
MSDN(<a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/run-time-routines-by-category" rel="nofollow">https://docs.microsoft.com/en-us/cpp/c-runtime-library/run-t...</a>)
does a decent job. But in the name of security you will find zillion
variations(<i>_s, </i>_l) of an API and by default msvc compiler will not let you use
some of the API in their simple forms. Instead, you have to define
_CRT_SECURE_NO_WARNINGS etc. I think for someone just getting started to
develop/learn to write a decent code base in C these restrictions really
hinder the productivity. So finally, I have decided to instead focus my learning
on Linux platform(currently through WSL - Windows subsystem for Linux) with its
POSIX apis. You know what, `man 3 printf` or `man 3 strlen` is soooooo much
better than googling msdn<p>Mastering C<p>~~~~~~~<p>I think, the simple and straight answer here is reading good code and writing
"good" code and also reading good C content(be it books or articles). I think
these are the three ingredients necessary to get started. Of all the open source
projects that I have investigated, I found Linux Kernel and related projects
seems to have very good taste in terms of code quality. Currently, I am just
focused how they use the language rather than what they actually do in the
project. Things like, how they structure the project, how they name things, how
they use types, how they create structures, how they pass structures to
function, how they use light weight object based constructs, how they handle
errors in function(for example forward only goto exits), how they use
signed/unsigned variables etc(more of my learnings to the end), how they use
their own data structures. I think its good to initially focus/target on ANSI C
API with C99 instead of heavily relying on the OS specific API on which ever
platform you choose. For example, such projects could be writing binary file
parsers for example projects like .ISO file format etc.<p>Good C projects/articles<p>~~~~~~~~~~~~~~~<p>1. Winlib.net - <a href="https://github.com/jcpowermac/wimlib" rel="nofollow">https://github.com/jcpowermac/wimlib</a> is a great source of information<p>2. e2fsprogs - <a href="https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/" rel="nofollow">https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/</a><p>3. MUSL - <a href="https://git.musl-libc.org/cgit/musl/tree/" rel="nofollow">https://git.musl-libc.org/cgit/musl/tree/</a><p>4. General C Coding Style - <a href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst" rel="nofollow">https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...</a><p>4. <a href="https://nullprogram.com/tags/c/" rel="nofollow">https://nullprogram.com/tags/c/</a> - great source of C knowledge<p>5. CCAN - <a href="https://github.com/rustyrussell/ccan/tree/master/ccan" rel="nofollow">https://github.com/rustyrussell/ccan/tree/master/ccan</a> - great source of C tidbits from none other than Rusty Russell - I haven't read all of them<p>6. POSIX 2018 standard - <a href="https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/" rel="nofollow">https://pubs.opengroup.org/onlinepubs/9699919799.2018edition...</a><p>continued in the comment....