TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Best way to learn new programming language and it's conventions?

1 pointsby asdojasdosadsaalmost 8 years ago
Hello, I&#x27;ll give the tl;dr first: tl;dr: Would like to learn C, best way?<p>So, I have been programming with some different, quite common languages, most of all - not a surprise - javascript. I... well, I don&#x27;t really enjoy JavaScript, but it&#x27;s what pays my salary and brings the bread to the table, so I can manage. I would like to learn some new language to improve as a programmer. I learned python quite &quot;well&quot; doing a school project using just python. Now, after reading some articles and posts, I would like to learn C (unless there&#x27;s a better option? Haskell? Rust? Lisp?). The new language should be somewhat challenging, and I would like to learn some new &quot;of thinking&quot;.<p>Why C? Well, I do a lot of work in unix (linux&#x2F;osx) environment, and instead of doing bash scripts, I maybe could (when needed) use C instead of Bash&#x2F;Python.<p>Thanks in advance for all the replies, I appreciate it.

3 comments

cnnsucksalmost 8 years ago
Read code written by others. In the case of C there is a large base of high quality open source code you can study. C is a simple language that is used for large scale, complex work so a vast amount of convention and idiom has developed. Those conventions vary from one code base to the next, but you&#x27;ll find many commonalities and have no difficulty adapting once you&#x27;ve had enough exposure.<p>Reading working code is crucial; man page examples and language books won&#x27;t expose you to enough real world usage. Programmers use the preprocessor. They do subtle and effort-saving things with enums and typedefs and designing a good struct is crucial.<p>Some well-thought-of C code bases include postfix, nginx, APR and lighttpd. After you&#x27;ve seen enough C you can just glance at a page of C code from across the room and know whether it&#x27;s likely to be crap or not.
motet_aalmost 8 years ago
C is interesting but old and unsafe, leading to memory corruption bugs. These bugs are often hard to find and compromise security. It is not always a good choice in real-world.<p>Rust, C++ and Haskell are much more complicated than JavaScript IMHO. Lisp is pretty old but there is a lot of modern Lisp-like languages.<p>Try them.<p>As cnnsucks said, reading code is important no matter what language you use. You can perfecly use JavaScript, Python, Go or Ruby and learn incredible tricks everyday, and these languages are used in the real-world.
Guyagalmost 8 years ago
Syntax-wise, I&#x27;ve found learnxinyminutes.com to be a good introductory resource. I&#x27;m also looking for a good quality resource on programmatic conventions for different languages, including details on what unique&#x2F;&#x27;cool&#x27; features each has, all in once place. So far I&#x27;ve not had much luck.