What did I get myself into???

Observations / Musings / Occasional Rants

Day 5?

It’s me again. I didn’t really do much over the weekend. Enjoyed the really nice weather on Saturday and then Sunday was a Sunday i.e. I don’t usually get a whole lot done on Sundays despite whatever my intentions may be. Just seems to usually work out that way.

Today on the other hand was a different story. I spent the whole day working on my Rails app which from this point forward I will be referring to as ”Help A Cause”. “fundraise” was always just the name of the Github repository I created for the project when I had no idea what to call it. So Help A Cause it is.

I started off completing the addition of ‘Date’ and ‘Time’ fields in the event creation form. I used ‘date_select’ and ‘time_select’ form helpers which were new to me and took a bit to figure out how the various options worked. A lot of trial and error was involved. And for some God forsaken reason, my app insists on displaying GMT time versus local time. In the Rails console, accessing the same attributes displays local time. ??? A battle to be fought another day.

After a bit of a break followed by lunch in Washington Square I returned determined to add a Date field to my event search. Sounded easy enough but it turned out to be a huge pain in the hiney. Could not get the date_select fields to function the way I wanted to save my life. For a good while there it didn’t matter what the hell I did with the options. The date fields (year, month, day) appeared and functioned exactly the same no matter what I changed. It turned into an elongated, shake your head with an incredulous look on your face while staring at the screen episode. Eventually I figured out that I was missing a second, non-option parameter. So got passed that but then it became “How do I access the data stored by the date_select helper in the Date object and then use it in a search with other parameters?”.

Worked on the search for a bit but frankly my brain was getting a bit mushy by now. (I need to get better at giving my brain and myself more frequent breaks to keep my thinking more crispy. Need to get away for a bit some times. Just fighting through it is not always the best approach.) So I decided to try to deploy what I had to Heroku. I remember it not being that big a deal when I did the Michael Hartl Rails tutorial so I decided “why not?”. Yeah, well, it sounded like a good idea in theory. To make a long story short, I learned that PostgreSQL, the database of choice for Heroku, apparently has an issue with type casting string values to integer values which I happen to do with phone numbers on a form. (Do you hear that sound of grinding metal? That’s a wrench flying into my productivity gears.) Couldn’t complete a migration of the database on Heroku. So my app only kind of, sort of deployed. And that’s where I’m starting tomorrow. But only for bit.

To close the day I read a few more chapters of Eloquent Ruby.

Absorb what is useful, discard what is not, add what is uniquely your own.” - Bruce Lee