Time Well Spent, Learning Programming
Browsing through DZone, I stumbled on an interesting illustration - the Programmer’s Food Pyramid.
The Pyramid illustrates the different activities that someone generally engages in while learning to program. While looking at the pyramid, I thought, “Do I do all these things?”
For the most part, I do on a daily basis.
Writing About Code and Writing Code
I spend a decent amount of timing writing about code - or thinking about writing about code. That’s a lot of what this website is about, and it’s also why I spend a lot of time on forums like DaniWeb and Digital Point.
As a high school teacher, I know all too well that you learn best by teaching. So I spend a lot of timing writing about what I’m trying to figure out - so I can help others learn it, but also so I can figure it out myself.
On the pyramid, “Writing About Code” and “Writing Code” are separated into two different categories - but for me they’re pretty synonymous. If I spend time writing some code, I usually devote some time to writing about it. It helps me gain a deeper understanding of what I did.
Reading, Revising, and Reading About Code
Likewise, the pyramid divides these into three different tasks - but I’d say they mostly occur at the same time for me.
I spend a lot of time trolling around the PHP sections of webmaster forums (like DaniWeb, DigitalPoint, etc). I like to see what problems other people are having… and then try to solve them.
In the process, I generally end up reading someone’s code, fixing errors in it, and searching the internet to solutions to deeper problems. A small problem in a forum post can easily drive me to learn more about a topic I didn’t know a lot about.
For example, someone posted a question about using preg_replace(). I never used the function much, because I never had a reason to use it over str_replace(). Instead of directing the person to str_replace() like most other respondents did, I spent some time learning how to use preg_replace() and I fixed the error in the original poster’s code.
Reading Environmental Code
If there’s one thing I hate, out of all the bits included in the pyramid, it’s reading environmental code.
For example, I operate another site using CMS Made Simple (Babel). I wrote some modules for the website to make it do exactly what I wanted… and that meant spending a lot of time mucking through the CMS’ source code.
Like most projects, the source code was not well commented or documented. The code didn’t follow the highest standards of coding, either, and I found myself wanting to stop and fix little problems in it as I went.
No, I definitely find it an annoying chore to read through someone else’s code when it’s not well-written and well-documented. That’s part of the reason I always try to make my own code as clear as possible, with documentation throughout.
Tags: development, learning, php, programming







Leave a Reply