This is a multi-faceted topic, I want to look at one aspect in this post: effort vs. efficiency.
After creating a Caesar cipher in Ruby a few days ago, I looked at some other student's solutions. Some students were clearly experienced programmers- their code was 5 lines of densely packed recursive algorithms.
At first I was discouraged and thought "What can't I do that?", and "Why doesn't my code look that?". Then I reconsidered.
My solution to the Caesar Cipher represents my single handed efforts at solving a problem. The solution was based on the 4 weeks of experience I have with Ruby. Sure, there are built in methods that would have accomplished the task more elegantly (like the .modulo method).
Sure, I could refactor my code making it shorter and making it run faster.
But, until I learn those methods and refactoring techniques, using them because someone else told me to would short circuit my learning. When I do search on StackExchange for some help, I find students like myself asking for help on everything. It seems as though they have made no effort to solve the problem or find the answer themselves before asking someone else for the answer.
Does this matter? The real world of programming (from what I hear) is much more cooperative. If you're stuck on something, you ask your co-workers or post a question on StackExchange. In other words, you use other people to help you solve problems. If I were writing a Caesar cipher program at work (not that they would need one), I would first check to see if it had been done already. If it had, I would look over the code, make a few tweaks, and voila.
The problems comes when you adopt this behaviour too early in your learning. Struggling on your own forces you to think carefully through problems, to try lots of different methods, to read documentation carefully. It forces you to develop the skills that you won't be able to rely on others for at work, namely, the ability to deal with frustration and the ability to think carefully on your own.
Even your co-workers will tire of helping you (don't be a 'help vampire').
To return to the theme of this post, when learning to program effort is more important than efficiency.
After creating a Caesar cipher in Ruby a few days ago, I looked at some other student's solutions. Some students were clearly experienced programmers- their code was 5 lines of densely packed recursive algorithms.
At first I was discouraged and thought "What can't I do that?", and "Why doesn't my code look that?". Then I reconsidered.
My solution to the Caesar Cipher represents my single handed efforts at solving a problem. The solution was based on the 4 weeks of experience I have with Ruby. Sure, there are built in methods that would have accomplished the task more elegantly (like the .modulo method).
Sure, I could refactor my code making it shorter and making it run faster.
But, until I learn those methods and refactoring techniques, using them because someone else told me to would short circuit my learning. When I do search on StackExchange for some help, I find students like myself asking for help on everything. It seems as though they have made no effort to solve the problem or find the answer themselves before asking someone else for the answer.
Does this matter? The real world of programming (from what I hear) is much more cooperative. If you're stuck on something, you ask your co-workers or post a question on StackExchange. In other words, you use other people to help you solve problems. If I were writing a Caesar cipher program at work (not that they would need one), I would first check to see if it had been done already. If it had, I would look over the code, make a few tweaks, and voila.
The problems comes when you adopt this behaviour too early in your learning. Struggling on your own forces you to think carefully through problems, to try lots of different methods, to read documentation carefully. It forces you to develop the skills that you won't be able to rely on others for at work, namely, the ability to deal with frustration and the ability to think carefully on your own.
Even your co-workers will tire of helping you (don't be a 'help vampire').
To return to the theme of this post, when learning to program effort is more important than efficiency.
Comments
Post a Comment