![]() |
€uromeinke, FEJ. and Ghoulish Delight RULE!!! NA abides. |
![]() |
#1 |
I Floop the Pig
|
A question for any code jockeys
So I've taken it upon myself to improve my code development skill. I've been through countless introductory programming courses, and some algorithm design courses, but I've never sat down to do anything practical with any of that knowledge, so every time it just slips away and I have to start over.
I'm starting easy on myself, using Python to automate my work (which consists in large part of telnetting into devices, turning ports on and off, and checking log files for errors. Or other similar and related operations). In doing so I can make my job easier, improve my personal skill set, and make myself more valuable inside and outside my company (my company is beginning to give automation priority and I hope this will position me to be a contributor to that as it gains steam). Anyway, enough backstory. My question is one that I'm guessing is about preference, style and individual ability, but I'm curious to get the opinions from people who do this for a living. Regarding code robustness, do you build it in as you go, or do you focus on functionality first, robustness later? In my limited experience I've generally been focused on functionality. I've rarely written anything with the intention of sharing it with anyone, so I almost always have total control over the environment and inputs, so I can save a lot of time by hard-coding things and assuming no errors in dynamic input. But when I then want to go back and expand on something that worked well, or clean it up to be sharable with someone else, I find I practically have to start from scratch because all the error handling and dynamic configuration type stuff requires major changes. Now that I'm trying to create something more permanent, I've been building robustness in from the get-go. It's going pretty well, and I'm learning a lot in the process. But I'm sacrificing speed big time. I've been working for a week and, while I can gather input dynamically and incorrectly-formatted input is handled seamlessly...my code doesn't DO anything yet. Which, considering I'm starting by porting a handful of already functioning windows batch scripts to Python, seems like pretty poor rate of progress. When I started it felt like doing some error handling and input formatting up front would be a huge time saver in that it should make everything modular. Centralize all the data collection and error handling, plug the functionality in. But every time I feel like I've gotten to that point, something else pops up that requires me to rethink and rearchitect the stuff that came before. So, to the pros, what do you prefer? Quick and dirty, clean it up later? Or slow and steady, build a solid foundation and worry about "making things work" only once the basics are in place?
__________________
'He who receives an idea from me, receives instruction himself without lessening mine; as he who lights his taper at mine, receives light without darkening me.' -TJ Last edited by Ghoulish Delight : 05-13-2010 at 04:25 PM. |
![]() |
Submit to Quotes
![]() |