+ 2
Better Code?
How does one write "better" or "more efficient" code? I often find myself using basic C++ for tasks that can be simplified or made more efficient with things that I haven't even heard of. Like recently somebody told me about a bunch of ways to make a recent code of mine better, Like using <cctype>. Should I even be relying on google? Edit: This question just bothers me and I'm just gonna narrow it down to "How can I learn to code better?"
5 odpowiedzi
+ 7
I think a programming language is in several ways like a natural language.
For example it has a huge vocabulary of which you'll probably never know - or need - all of it.
So basically, besides constantly writing code yourself, you need to 'read' to increase your vocabulary; be that programming books, articles, web tutorials or literally other people's code.
Be on a constant watch for unfamiliar patterns that might be useful for you, study them and incorporate them in your own writing.
In time, your 'literacy' and skill will naturally increase.
+ 4
Standard Template Library.
+ 2
With time and experience.
+ 1
~ swim ~ STL?