5 ms·
I'm more or less the opposite of the author: I find a problem first, pick the language that seems most suitable or I think I can code fastest in, and have at it
by alanctgardner2 14y ago
I'm more or less the opposite of the author: I find a problem first, pick the language that seems most suitable or I think I can code fastest in, and have at it. Advantages:
- Write interesting code right away, which helps me focus
- No need for a monolithic resource like a book, just Google the specific problem to be solved
- Solve a problem while learning
The biggest downside is that I don't tend to write idiomatic code: when you hack away at your own projects, they all look like your style, regardless of the source language. It took me several months to pick up good C practices at my new job, and I'm still not proficient at Ruby, Python or Java, despite having written plenty of code.
To try and combat this problem, I've started reading more advanced documents and talks in languages where I think I've got an OK base understanding. These tend to be more interesting, and better demonstrate the strengths of a given language.
- lallysingh 14y agoI'm closer to your way. First, pick up a shit-ton of books. Or o'reilly safari. Use it to quickly scan for good tools, in combination with GitHub. Then, index the book. That is, read the most relevant chapters lightly, but read the source code closely. Make sure all the source makes sense. If it does, you're in great shape. If not, either the author is poor or you've gotta page-in back references. Then, start hacking together code. Page-fault on the book (and others like it, including example source).
- msprague 14y agoThis is usually how I learn also. I find it works extremely effectively if instead of working on your own standalone project, you contribute to another project that already has best practices. That way, you can read through the source code and learn some of the conventions that are used in that language.
- marcosdumay 14y agoIf you never learned it, how do you know if a language is good for solving a problem? I often choose a random language for solving a small problem, so that I can learn it. It's often not the best language for the problem, but it shows what the language is good for. For me a monolithic resource is great for getting started in a language, but most books are too deep, so I normaly don't finish them.
- alanctgardner2 14y agoI find from reading blog posts, HN, etc. I have a pretty good idea of a language's capabilities. Plus, if the idea is based on a particular API where some languages are documented better or have a library already built, that reduces development time a lot. That said, you're right that I do go outside of my comfort zone intentionally when all things appear to be equal. Otherwise I never would have gotten away from PHP for web apps.