Sunday, August 23, 2015

Google is Better than Noodles

Upon completion of my data extraction program, it is vital that I reflect on what I have experienced in the process of its creation. Spending several hours typing and debugging code yield the fruition of my first self-designed program as an engineer and programmer. It pleases me to learn that I have the capability to design and realize a project but there is something more important that I have learnt. Google is the greatest invention conceived by the human race since fire. There were several times during my journey to complete my program that I would encounter enigmatic bugs and Google would come to my rescue. An example of this is when I was attempting to provide support for Windows on the data extraction program. I had researched the directory layout for Windows systems and discovered that looked something like this: C:\Users\fisiaka2. The Windows directory system uses back-slashes unlike Unix directory systems, which use front-slashes. To me this seemed like a simple implementation, ask the user what system they were using and choose the starting string based on that. Never in my wildest dreams did I expect a basic data type like a string to make me question my competence as a programmer. I received a plethora of errors no matter how I organized my strings for the Windows platform. Bewildered and frustrated, I googled the errors that IDLE (a Python Interactive Development Environment) was maliciously spewing at me. “Why do solutions to these errors always end up so simple?” I asked myself.  One user on Stackoverflow explained that backslashes are not considered to be regular characters in Python. And make them part of a string, the string must be modified to be a raw string! All I had to do was put the letter r before the quotation marks in the string and just like that Windows support had been provided.  So, this is a huge shoutout to Google for being so useful.

1 comment: