It's been suggested that programmers need to master three numbers to properly implement computer logic: 0, 1 and ∞.
Yes, your first concern as a programmer is correctness. Performance is a critical aspect of correctness since you write once, and it runs thousands, millions, or billions of times. But writing programs that are solely functional and fast is analogous to writing a program that can't do any branches or loops-- in both cases, you're focused on only the "first pass". At this point you're operating in the "aspiring to master level 1" arena of programming.
But making your code easy to understand, modify and extend is like realizing the power of implementing branches and loops. It's when you realize that your source code has iterative power, not just your executable. The code you write very well may be iterated over many times, and given that programmers generally cost more than computer cycles, optimizing for future iterations of your code elevates you to the "aspiring to master level ∞" arena. That's why we use higher order languages and source control!
If your only concern is performance and correctness then why even bother checking it in? Compile it to binary (or write it in machine language), and check that in instead. It'll be faster, and save your unfortunate maintainers (maybe that's even you) the trouble of figuring out what you originally did.
When you realize that the iterative value of your source code is orders of magnitude greater than the iterative value of your executable, you'll pour as much effort into making your program easy to understand and maintain as you will in making it correct and efficient.
Note: The inspiration for this post was a quote from one of the gods of Computer Science, Brian Kernighan:
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it."
My blog covers topics I find of interest or worth sharing. I tend to cover topics around software development, Internet, or personal interests like music, photography or Disney.
- June 2024 (1)
- March 2021 (1)
- October 2020 (1)
- September 2020 (3)
- September 2019 (1)
- April 2018 (1)
- January 2018 (1)
- October 2017 (2)
- January 2017 (2)
- December 2016 (1)
- November 2014 (1)
- February 2014 (1)
- October 2013 (1)
- August 2013 (1)
- July 2013 (1)
- June 2013 (1)
- December 2012 (1)
- October 2012 (1)
- May 2012 (1)
- April 2012 (6)
- January 2012 (1)
- October 2011 (1)
- September 2011 (1)
- August 2011 (3)
- July 2011 (1)
- June 2011 (1)
- May 2011 (2)
- February 2011 (1)
- January 2011 (1)
- December 2010 (1)
- September 2010 (4)
- August 2010 (2)
- July 2010 (1)
- June 2010 (1)
- May 2010 (2)
- March 2010 (1)
- February 2010 (1)
- January 2010 (5)
- December 2009 (3)
- November 2009 (3)
- October 2009 (7)
- September 2009 (7)
- August 2009 (6)
- July 2009 (2)
- June 2009 (4)
- May 2009 (5)
- April 2009 (7)
- February 2009 (1)
- January 2009 (3)
- December 2008 (4)
- November 2008 (2)
- October 2008 (2)
- September 2008 (7)
- August 2008 (11)
- July 2008 (1)
- June 2008 (4)
- May 2008 (5)
- April 2008 (8)
- March 2008 (9)
- February 2008 (1)
- January 2008 (3)
- December 2007 (3)
- November 2007 (3)
- October 2007 (10)
- September 2007 (8)
- August 2007 (2)
- July 2007 (1)
- June 2007 (14)
- May 2007 (8)
- April 2007 (5)
- March 2007 (4)
- January 2007 (4)
- December 2006 (2)
- November 2006 (1)
- October 2006 (1)
- May 2006 (1)
- March 2006 (3)
- January 2006 (7)
- December 2005 (1)
- November 2005 (1)
- October 2005 (12)
- August 2005 (6)
- July 2005 (5)
URL:
Title:
Comment/Excerpt: 010000100110111101101111011011110110111101101111011011110110111101101111011011110111001001101001011011100110011100100001