I thought I would learn to code... what was I thinking?
The following is the original and the rewrite can be found by clicking here.
In magazines, definitely in social media streams, and even in a best selling tome... in one form or another, we have all seen this:
"The 10 things you need to know to be successful!"
Sometimes it's eight and sometimes it's fifteen, but nevertheless it is a list of "proficiencies" that you need to know to be successful; I have noticed a tendency to emphasize the list and not so much the definition of success, but that is neither here nor there.
I was reviewing a list a while back, because hey, "we all want to be successful" and one of the suggested "success points" in this particular list was to learn computer coding*. The reasoning was that with the continued personalization of computer programs to manage our daily activities, having a basic understanding of how to code will be crucial.
This actually made great sense to me.
I should mention that before three weeks ago I had never taken a computer course, a logic course and had always avoided making "macros" in Excel because it was something so foreign to me... a little reminiscent of when I decided to learn to ride a motorcycle. Coincidentally, it seemed a good friend of mine had also read the same "Top 10" and was already into his online lessons. He is in finance and his motivations were slightly different than mine... he wanted better insight into the basics of computer programming so he would know if his IT people were bullshitting him about costs, deadlines and the such. My reasons, besides being more successful, were slightly different.
I've been at it for about three weeks now** and below you find the code I put together for a simple "Pig Latin Translator"... when you enter a word it moves the first letter to the end of the remaining word, and adds "ay". It really works !
print 'Welcome to Pig Latin Translator"
pyg = 'ay'
original = raw_input('Enter a word:')
if len(original) > 0 and original.isalpha():
print original
word = original.lower()
first = word[0]
new_word = word[1:len(new_word)] + first + pyg
else
print 'empty'
What am I really getting out of this?
Do I have a goal to ultimately be competent with basic "Python" code and able to program at a basic level? Yes!
Is that my only reason? No way... in fact there are many reasons:
- Trying something new offers me the opportunity to connect and network with new people... I find myself constantly looking for people in "the know" and am introduced to people I would not normally connect with. And based on my humble experience, they are very interesting people.
- I am forced out of my comfort zones, my habits, my routines and into something unknown. I have to switch off my "autopilot" and think differently. This is the simple formula for discovering wonderful new things.
- New things compliment old things. In the case of coding, proof reading the code itself, the indentations and the colon placement is making me a better proof reader when I write with "good ol' letters"
- What I am doing contributes to that Top 10 List for Success because as you know, "constant learning" is always close to the top of that list.
And one last thing,
As my finance friend mentioned, it's a sign we haven't given up... not by a long shot. He is very smart by the way.
iamgpe
PS: Let me know if you see something wrong with my code.
* I understand that in some circles there is a debate as to whether the appropriate word is "coding" or "programming. In my world, I am using the word "coding" because it has less letters to type.
** I am using CodeAcademy (on-line) and I really enjoy their approach; as modest as it is, I am leaning something. I am constantly forgetting to indent and add a colon, but am told this is all quite normal and "to keep at it".