14 ms·
Like others have said, lean on your experience in other languages and what comes naturally through intuition with regards to tools, naming conventions and the l
by theideaofcoffee 3y ago
Like others have said, lean on your experience in other languages and what comes naturally through intuition with regards to tools, naming conventions and the like. What you can't always reason about from first principles, you could see examples in use by reading more code.
Since you're looking at C, I would highly suggest reading through and getting familiar with and taking inspiration from successful C language projects: sqlite, cURL, redis, memcached, haproxy and others (and perhaps the linux kernel too, but that may be skirting the line of too low-level). Granted these are closer to 'systems' level code than higher level app code, but from my experience they have a lot of translatable goodies. They all have some good idiomatic, readable, intuitive C that you can learn a bunch of good practices from. Look at how those use makefiles and build processes, possibly linters too, to their advantage and shamelessly take the good parts!