Just like the growth rings in the 60 year old Hickory trees in my backyard, I make progress ever so slowly. Wrapping another layer of code on top of the last. My progress is so closely aligned to the last that they are barely discernible. But there is progress. I can see it in the number of files I've created, and the number of lines of code I've written. Which at the time I believe is a good thing, more is better is what I've always believed.(i.e. beer, fun, beach, mountains, skiing etc., etc.)
The level of detail needed to write decent code is astonishing. It's like going down Alice's rabbit hole, while carrying a truck load of details about your trip, within the confines of your skull. The process isn't just, "request report from Amazon". It's a lot more like, "I need to request the FBA report from Amazon for a particular user". Which involves the following steps(don't worry even my wife's eye's glass over when I start talking about this):
- Sign up for developer account on Amazon(How does one do that? Run to Google)
- Get developer Id from Amazon
- Provide id to test user so they can authenticate my developer id
- Capture auth token and seller id from test user (Oh no, I need a front end)
- Install Rails gem to help connect with Amazon MWS API (Yea we skipped over the whole Gem talk, needless to say it has NOTHING to do with precious stones)
- Create MWS client (this only took about 8 hours of research, experimentation and pain)
- Authenticate thru Amazon MWS (hallelujah!! the neighbors heard the scream from that celebration )
- Request FBA report
- Wait (Sleep in Rails parlance )
- Retrieve report request id (Did I just use an API? I think I did!)
- Use report request id to check status of report
- If the report isn't ready, wait and try again
- Download report once ready
- Parse report into array of hashes so as to understand what the f*ck is in it.
- Step through array to put data elements into database (oh sh*t I need a database.. Google please)
- Whew, done!! I'm so excited!
"Can you finish what you started?"
Yep 15 steps, for one quarter of the data I need. Honestly, looking over the steps, I've combined quite a few. This is step one in a process where it's really unclear just how many steps there are going to be.
In the back of my head I'm starting to hear a nagging questioning voice. "Is your code any good?" "Is this the right way to do it?" "Can you finish what you started?"
The difference between my code and the trees in my backyard, is that my code is being created in a complete vacuum. I have absolutely no idea if it's any good, if all the pieces are going to work together, and if anyone is going to want to use the app when I'm done.
The questions and doubts become too loud for the moment, I push myself away from my desk and with the help of my 3 kids and under the shade of those Hickory trees I join them on the trampoline to bounce those worries out of my head. It works.