Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: When does programming become automatic (if ever)?

by QuillMeantTen (Friar)
on Apr 13, 2016 at 07:35 UTC ( #1160296=note: print w/replies, xml ) Need Help??


in reply to When does programming become automatic (if ever)?

Greetings,
Even if I'm no professional (not yet) I have seen how professionals code (thanks to attending courses by computer science researchers).

The "code fluently" thing is not even remotely the most important. After a bit you will know the syntax and be able to write syntactically correct code as fast as you write english. But because code compile does not mean it is well designed or even works!

One of the greatest lessons I received was from one of the heads of the research lab in my university. At the time he was teaching basic algorithms, complexity, computability.
At first I had some issues with the use of those metrics and I would sit and wonder while he explained to us that with enough practice, anybody can come up with a crappy design on the fly and make code that *should* work but would take a thousand year to run on the intended dataset. To be truly gifted is to be able to sit and come up with a GOOD algorithm.
He used to have the coffee break test: launch the program, take a coffee break and if at the end of the coffee break it still is not done then have a harsh look at your algorithm
Now what is a good algorithm? Not a complex one, but easy algorithms can be the most complex. You are looking for the best solutions regarding time and space parameters. This takes experience, this takes time and practice.

After five or six university projects in about as many languages I have started to understand what he was saying. I have stopped using the "mad dog" coding style where I would sit at the keyboard and crank out write only code that I could not go back to afterward. I'm not saying that I'm completely over it but I'm better than before. It took me some practice.
A friend of mine who went to an engineer school before university never had that problem. Sure he cranked out code more slowly but god it was beautiful code. Each statement was thought out for testing, debugging and at the end of the day he accomplished more than I did because when he was finished there only was some glitches to iron out while I had to go down the jungle with a flamer to find every monster I had created in my path.

Being able to code circles around someone else does not mean you have to actually type. Its more about being able to design. And the worst thing you can do for your ability to grow is to let code get in the way of programming. Program first, then code.

  • Comment on Re: When does programming become automatic (if ever)?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1160296]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2022-05-22 23:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (81 votes). Check out past polls.

    Notices?