Learning to program properly: Reflections with Rkshitiz khanalBlockedUnblockFollowFollowingApr 6I have always been somebody who is interested in many things at a single time.
I cannot be good at so many things, but I plan to be good enough for the specific purpose for a specific period of time.
My practice with programming has been the same.
I learned C, C++ has a part of my undergraduate degree in Mechanical Engineering.
I have never had to use any of those languages in my life.
Meanwhile, MATLAB, another scripting language/software package we were taught was somewhat useful.
There was only one problem with MATLAB: It wasn’t free or open.
To use outside university settings, I had two options: pirate or purchase.
I didn’t want to pirate MATLAB, and I couldn’t afford to purchase MATLAB.
I also came to know about Python and R, open source programming languages with powerful packages for various purposes.
As my interests in (open) data grew, I used both Python and R time and again; learning the languages just enough to finish tasks at hand.
In the last few years, I have almost always used R for my work and hobby projects.
Although I was able to finish what I had to when I had to, I had a feeling that my programming methods were non-elegant, or worse — inefficient.
Few weeks ago, I was making a graph for an academic paper I am writing.
The way I made it work took more than 60 lines of script for a simple visualization.
There had to be better ways.
I searched around for various methods to process data like I had, and I found out that it could be done by a package ‘dplyr’ with a few lines of code.
I used to do the task by repeating a command for all rows.
It made for a clunky script that worked fine but failed to satisfy the programmer in me.
What happened today morning reinforced my feeling about the shortcoming.
I was learning how to process geospatial data in R.
Although I could run and modify the scripts, I realized I didn’t fully understand several terms and concepts.
I did not fully understand why the tutorial progressed the way it did.
The way I learn most stuff is partly to blame.
There are only few things I learn properly: by starting from scratch, taking enough time to learn, practicing and producing something out of the knowledge.
I rarely follow standard learning tracks like online courses or books.
I believe that was mostly why I would make do with most things but wasn’t particularly good with them.
Now what?I need to change the approach of learning new things.
For most things, I will still continue “winging it”.
But for things that are important for me to learn, as learning R has become important for me, I will learn it properly.
But what does learning properly mean? I don’t know yet.
I have some ideas.
I am going to try them and see if they work.
Here’s what I am going to do:1) Note the things I don’t understand or need to understand more when learning.
2) Reflect on what I learned each session and write what I learned in simple words.
I think this is just a different version of the Feynman Technique.
Let’s see if it works.
Let’s first see if I can stick to it.
I will let you know what happens.
Watch this space.