Referred to coding, it's the practice to start coding with only a basic knowledge of the framework you're using.
At first it seems a very bad idea, isn't it ?
For real it's not a totally bad thing, at least if you remember some basic good practices. The problem is that more than often these "good practices" are totally forgot.
The good of jump-start coding
The benefit of coding jump-start is that you're forced to face the code early in the learning process. This is usually a very good thing, as coding isn't (only) about memorising a number of rules. It's primarily about becoming fluent in what you're doing.
In the very same way, if you want to learn a foreign language, the best thing to do is to learn some basics and then go abroad and be forced to speak in the foreign language. It will be hard at first, you'll make a lot of mistakes, but you'll learn. Learn or perish (sort of).
However, would you ever go abroad only mowing how to ask a bottle of water, some meal and a bed? Not really. You'll bring a dictionary, a pocket phrases book and your mobile phone (Internet translators).
In the same way, you can jump-start in the code, but you have first to learn where to find informations.
The bad of jump-start coding
Starting to code early has also a number of drawbacks. You'll be slower, as you'll have to search for a number of things, probably not well documented and maybe documented in some obscure place.
However the nastier thing is that you'll probably find extremely sub-optimal solutions, or even "solutions" that seem to work (they work for your case, but they don't in another).
Now, this is normal. You do one thing once. it takes ages and you do mistakes. You do it twice, and it's a bit better. Do it 10 times or more and it's easy (and it's working). It's called experience.
Jump-start coding or not ?
So, the bottom line is: yes, start coding as soon as you can, but follow the rules:
- Learn by example. Look at the examples, understand them and learn. Copying an example isn't learning, it's copying.
- The manual and the documentation are your primary sources, learn how to use them. Open-souce projects often have a bug repository (e.g., ns-3 Bugzilla) and an API automatically generated documentation (e.g., ns-3 Doxygen).
- Don't rush. Only because you're (finally) writing some code, you're still learning.
- Rush. Try to do something complex. If you stick to the easy things, everything will always seems easy (because it is easy). Only by doing something complex you'll learn for real. However...
- Simplify your task: onion coding. Split your complex task into sub-tasks and complete them one by one. or add complexity little by little.
Note: rule 5 means that probably you'll have to use a lot of refactoring. That's ok, you're still learning. and it's part of the learning process.
And now... go coding.
PS: don't forget the documentation and the tests... more on this soon™
No comments:
Post a Comment