Saturday, November 21, 2015

Ode to Android Studio Updates

It's Saturday morning, and I'm awake before the others.
I'll add a little feature to my app, before the day begins and I get bothered.

Andriod studio is opened,
behold, there is a new version!

It's in the stable branch,
so I hope for the best.

Download, install and restart
There is no trouble so far.

Try to run a project -
Oops, esoteric bug is blocking.

Stackoverflow I go and eventually fix what ails.
Time for the quick update is all but lost,

That's where the programmer days often end up.

Monday, November 16, 2015

Weekend android warrior

On Friday night, I thought it would be cool to have an app where the user could set up a series of alarms. I would set up the alarms to manage my workouts. For example, do jumping jacks for 1 minute, break for 10 seconds, do pushups for 30 seconds, etc ... Maybe it could be used in a pomodoro like system or even as a day planner. Going back to the minimal viable version, it would just be a list of items with associated time durations. When you hit 'Start', the timers would clock down in order.

Rather than looking for an app that already does what I want, I figured it might be good to try building it on my own. I haven't done any Android development in a while, so I'd like to pick it up again to see how what's changed. It would be fun to work on this project because it's simple and thus easy to make progress in.

When you start working in a new technology stack (or one that you haven't worked in for a while) everything seems to take longer than expected. Since I hadn't touched Android Studio IDE in a while, when I opened it, it had a few updates for me to install. I then fumbled around with testing in the emulator, before I remembered that using a real device is immensely faster. I also spent some time trying to use the Android designer before giving up and updating layout xmls by hand. Everything, even the most basic API calls, seemed to require a google search to make any progress.

After a few hours of work, I got something working. It's a working app that (for now) has two items (alarms). You can change the description of each and the duration of each. Then the timer will count down using the sum total of the durations. It's obviously missing a lot of features, but I'm happy I got started on the project. Because getting started on project is always hard to do.

Monday, November 9, 2015

Getting healthy

Lately, I have been trying to be healthier. Here's what I've been doing.

In the mornings, I have been doing quick, high intensity 15-20 minute workouts. I've been trying a few different things. Sometimes, I watch and follow a workout on Youtube. One source that I like is from https://www.youtube.com/user/BeFit. It's hard enough to make me tired (hopefully it makes a difference), but quick and cheap enough that I keep on doing it.

On the weekends, I have been going on runs. I usually run for just 30-40 minutes. I tried some running apps, but from now on I will track my runs with my new fitness tracker, the Fitbit Charge HR.

I've also been going to some classes at the Fhitting room. Classes are pretty expensive, but I think they are worth it.

I also started using a standing desk at work.

I don't have much more to say about this now. I just wanted to note it somewhere that one of the things I'm prioritizing these days is my health.

Wednesday, November 4, 2015

Starting Plopper

A couple of weeks ago, I started building an application with Electron. After a couple of weeks, I'm still enjoying developing in it.

It's a hobby project named Plopper. It is a tool to help you organize ideas. I'm thinking that it will be to graph structures what trello is to list-of-lists.

Progress has been ok. Translation: I haven't been blocked so badly that I wanted to give up on the project.

I'm not an experienced web developer, so I'm always getting tripped up by one thing or another. For example, when I was using the Node.js file system module, I was stupidly expecting the async tool to work in a synchronous manner. Let's just say that it was a good learning and debugging experience.

There have been more fundamental things I'm not sure about either. I am still not sure on how to manage the state of my application. When a user interacts with my application, I can save the state in long term storage in a file (probably a database in the future), but what do I do for intermediate state changes? For now, I've resorted to using some global variables that are around for the life of the application run.

I think the success of my application will depend a lot on the graphical user interface. If it's simple, intuitive, snappy and fun, I think it can work. So, I've been playing a lot with the html5 canvas. You are given rudimentary tools to work with the canvas, like drawing rectangles, lines and text. It's basic, but easy to understand, so I like it. It seems like you could nearly render an entire application using the canvas alone. I'm still feeling out how best to use the canvas.