Anyway, I've been having a lot of fun trying to pick up what I can and solve the "puzzle" that's set before me at work. I've been digging through books, tutorial sites, python.org, the help manual, forums, friends, and strangers in an attempt to get past one issue that I've been facing. I was able to write the "bottom" 3/4s of the code in relatively short time - let's just say it was easy enough... my problem was the initial decision point.??
To make a long story short:
I have an input field which can be a number such as "99,999" or "200' BELOW ..." - it comes in as a string. I needed to first check if it is a number, then do something with that; and then go into the "string" evaluations (bottom portion of the code).??
I went through several different methods of trying this - never could come up with a valid output... I bounced ideas off my boss, my co-workers, several people I know that code in other languages - as sounding boards - and came up with even more ideas/theories to try, all to no avail. I finally hit up a messageboard [http://www.python-forum.org] and posted a message there which was quickly answered by a few different people with different things to try that I hadn't come across. I tried them and they each accomplished a part of what I needed.
Frustrating.??
I mean I'm still having fun trying to solve the puzzle - but I'm just about exhausted from this one issue... So I'm sitting at home tonight, just taking it easy and catching up on some DVR material... when it hits me...??
Without boring you with the silly details, I went back to the basics and did a simple if-else statement and ended up solving the issue - I'm so excited, thrilled, and happy - yet feel silly because it was such a simple fix that I never even thought of. I don't know if this is common among "programmers" - but I will always remember, from now on, to look at the simple stuff first!
Glad to have found all the resources I have thus far - and I'm sure I'll need them again (SOON) in the future.??
What is that thing they say?... K.I.S.S. - keep it simple, STUPID!
No comments:
Post a Comment