Are We Learning Programming the Right Way?
I just finished reading Test Driven Development: By Example by Kent Beck (more on this later because this has really changed my workflow) and as I was reflecting on the concepts explained in the book I've started to wonder if people are learning to program all wrong.
When I learned to program in an academic setting (over a decade ago), we learned the basics of programming first (if
block, for
loop, functions, etc.) and then object oriented programming. This makes sense because it allows you to quickly write programs that do something but I think it teaches you the "wrong" way to structure your code. I think because of this some of the programmers I've worked with have been really good at writing code that can be used in one place (and can be copied and pasted into others :-)) but haven't always been good at writing code that can be unit tested and reused without duplication.
I've also had a problem with how each assignment is "new" and doesn't build on itself, which is completely unlike any of my day to day work. Most of the time I don't get to throw out the last weeks worth of work in order to add a new feature (although it has happened).
I also try to help out on /r/PHPhelp and some of code posted there is SCARY unmaintainable. My guess is that most people posting to /r/PHPhelp are actually self taught so they need the most help. :-)
I wonder if the 'correct' way to teach programming is via a Test Driven Development project that builds on itself. The teacher/TA can provide a test suite with existing tests and the student can slowly uncomment out test cases and implement the code required by the test. Then as they progress in the semester the teacher can provide less and less test suite up front and then they have to create it.
I wonder if people would even seek this out or are the people who are learning to program not even interested...
Scott Keck-Warren
Scott is the Director of Technology at WeCare Connect where he strives to provide solutions for his customers needs. He's the father of two and can be found most weekends working on projects around the house with his loving partner.
Top Posts
- Working With Soft Deletes in Laravel (By Example)
- Fixing CMake was unable to find a build program corresponding to "Unix Makefiles"
- Upgrading to Laravel 8.x
- Get The Count of the Number of Users in an AD Group
- Multiple Vagrant VMs in One Vagrantfile
- Fixing the "this is larger than GitHub's recommended maximum file size of 50.00 MB" error
- Changing the Directory Vagrant Stores the VMs In
- Accepting Android SDK Licenses From The OSX Command Line
- Fixing the 'Target class [config] does not exist' Error
- Using Rectangle to Manage MacOS Windows