Possibility and Probability

A Python programmer with a personality thinking about space exploration

27 October 2017

24 hours to make a small biz

by nickadmin

The other day at work I saw something on twitter and I said to myself “Hey, I bet I could build something like that, I’ve got all the parts just laying around…” As I was thinking that I realized I have some time off available to me so on a whim I decided to take a day off and hack on the idea and make it come to life! A hack day! This post is my work diary. Throughout the day I took a break to record my progress and thoughts through the process. Hopefully this will inspire someone else out there to take some action and make something new in the world!

The Plan

I have a database of quotes and few API projects to access it. I’ve been toying with it for years, it seems like I should be able to make something out of it. I have also noticed lately that a lot of social sites like Facebook are just teeming with a lot of negative energy. What if… I could make a service that a person could subscribe to and have positive or inspiring quotes posted to their feed throughout the day?

Some high level details

I didn’t want to do too much work ahead of the hack day, but here’s the major points of what I’m trying to do:

Seems easy enough, let’s do it!

The work diary

A few days before I decided that for the sales page I’d just use gitlab.com’s pages feature. I already had a Wordpress hosted domain, but for “reasons” I’ve decided to overhaul it and move to something more static. Using Jekyll is pretty easy, so I setup a repository and all of the things necessary to have gitlab serve up the pages. I also took that time to look at some themes. I found one that I liked so I went ahead and checked it into the repo. At this point I have the exported posts from the WP site, and a new theme.

8am

First things first, I used this page https://kristofclaes.github.io/2016/06/19/running-jekyll-locally-with-docker/ to get Jekyll to run in a container so I could test out my changes “locally” without having to commit/push every time I need to adjust a pixel. I put locally in quotes because I’m doing a lot of that dev on a cloud machine! For a lot of reasons I find it better to have things in the cloud, so this is where I’m doing that particular work. Next steps: Refactoring some of the old API code to test out a new idea, and then banging out some copy for the sales page.

10:45am

The refactoring was interesting. My gut instinct was to completely gut the working code and replace it with something nicer. I did one pomodoro of exploring and quickly realized that if I did that I would spend half the day re-writing it and now (other than me) would know about it. I took another pomodoro and cleaned up the existing code (mainly removing some ancient “features” that didn’t work and kept me from using it like I wanted to). Now I have a functioning core backend. Its minimal, but it will get the job done. Next stop: getting the new code in place that will auth with Facebook and post a quote for a user. I have some existing code that kinda does this, so I think in a pomodoro or two I should have something useful.

11:15am

Ran into my first big hurdle: I need to figure out how to get a user’s permissions to post something to their wall. And store that. I’ve got code that does this, but I’ve always done it with short term tokens and copy-and-pasting things in. Time to educate and take a lunch break.

1:52pm

Took a long lunch and spent some time with my son. Family > everything else. But back at it now. The break was good, it let me think about the architectural mistake I was about to make. [caption id=”attachment_1255” align=”aligncenter” width=”675”] Here’s where the wheels started to come off the train![/caption]

4:42pm

Life took over for a few hours and I’m just now trying to squeeze in a few mins of work. The Facebook code to get someone to give my app permission is the main goal right now. Getting an app registered with Facebook was a pain, I had to stop everything to make a logo. That was infuriating. It is important, but not to me getting this up and running. At least to me. [caption id=”attachment_1257” align=”alignright” width=”420”] What a logo looks like when you are in a hurry[/caption] At any rate, things are moving along again. It looks like I’ll be working later than I expected tonight.

5:23pm

Got something to appear on Facebook! Now to figure out the tokens and then string everything together. This is coming together later than I wanted it too, so now I’m concerned that I might not be able to get people to help test this right away. I didn’t want to put the call out for volunteers too early because that would add pressure to me, plus probably bore people who couldn’t play with the new thing right away. Waiting was the right call, but ugh. Probably not going to get a lot of buzz tonight.

7:44pm

More family time spent, but I’m back at it. I’m surprised how much time I spent with the kids today, it really impacted this project. If I didn’t have to stop and research so many things (like the Facebook token dance) I think I would have gotten more done faster. Lesson learned for next time. At the moment: swapping tokens, storing them, and making sure the permissions are correct. After that: updating the sales site so we can start signing people up.

8:47pm

I have discovered that for the app to work the way I envision I’ll need to get a review of my app done. It is asking for things I don’t have yet, so that isn’t going to happen. One of the main goals tonight was to get this thing working with Facebook, so that is a big red X on that item. I have other things I can do with the project, so in the next hour or so I’m going to tackle them. Overall this is a setback, but now with the work I’ve done I see the big picture. I’m calling it a day at this point.

Lessons learned

Well, it didn’t turn out like I wanted it to. If it did I would have a functioning SaaS that would be posting to Facebook. But that’s ok, a lot of work was done and lot was learned. Let’s review!

The good:

The not-so-great:

The bad:

Wrapping up

My hack day didn’t end like I wanted it to, but overall I’m happy with how it went. I’m going to take the lessons learned and roll them forward into the next hack day… which will probably be next week. :) Thanks for reading this far! You rock.

Keep up with what I’m up to

tags: