Unknown-2.jpeg

So, it’s about 4:30 this morning. I’m lying in bed, drowsing, about ready to get up.

The past several days I’ve been really hard at work on Project Drummond, my side software gig.

There’s this thing I have to do in the software, come up with cumulative durations for time spent working various tasks.

Let’s use the example of taking care of an adult baby. Let’s say from 10:00am to 10:45 you spend time reading them a story, then put them down for a nap, only to find out they’ve horribly misbehaved earlier that day, so when you wake them up at 1pm, you spend a good forty five minutes scolding and spanking them.

I want to add up that time doing both activities, and lots more.

I realized that in the groovy programming language I use, there is already some awesome functionality almost baked into the language to do this.

import groovy.time.*; 
dateStoryStarted = new Date().parse('hh:mm a', '10:15 am')
dateStoryEnded = new Date().parse('hh:mm a', '10:45 am')
 
TimeDuration durationStory = TimeCategory.minus(dateStoryEnded,dateStoryStarted)
 
datePunishmentStarted = new Date().parse('HH:mm a', '01:00 pm')
datePunishmentEnded = new Date().parse('HH:mm a', '01:45 pm')
 
TimeDuration durationPunishment = TimeCategory.minus(datePunishmentEnded, datePunishmentStarted)
 
TimeDuration CareTotal = durationStory + durationPunishment

All told, that’s 75 minutes of care, by the way.

So, I realize I can do this, while I’m laying in bed, and when the alarm goes off, I just pop right up out of bed, excited. Time duration and time category are the total boss.

I run some initial experiments with it, and it looks like it’s going to be just what I need.

Now I feel energized to go to work, rocket through my whole day, then come home and finish this thing in my own project.

Awesome. That my friends, is a code green moment.

Posted
AuthorMako Allen
CategoriesgratitudeNow
images-1.jpeg

There’s this thing that gives me great comfort, that comes with a degree of irony. I’m a fan of clarity. I intensely dislike vagueness in certain contexts.

I love it when in my writing, my personal coding projects, my work-at-work I have a strong sense for what I’m doing next. I often refer to this as having “marching orders.” That is, I know what the task is, and I have definite, discrete points by which to measure success over the task. I often say to my boss that I dislike uncertainty.

Which is ridiculous. Because certainty is an illusion except in certain very specific instances. Yes, π is 3.14. Yes, a day is 86,400 seconds long. But when I really turn and look at it, I know that here is the only place, and now the only time. I know that success is measured in travel, not destination.

But it doesn’t stop me from enjoying the creature comfort of some “fabricated certainty.”

Just this morning, I was looking at the work I’ve been doing in Project Drummond, my software side-project. I scoped out 8 next actions I need to do on this feature I’m coding. There’s javascript functions to write, a GSP to modify, possibly some service methods to write, and I have to teach myself how to use a certain javascript charting library, something I’m very excited about.

I’m excited to have this set of marching orders to follow to get to a place I want to go. It doesn’t really matter that the orders came from me.

Posted
AuthorMako Allen
CategoriesgratitudeNow

So, I'm a busy guy.

It's a holiday weekend, and I was up at 5:30.  Partly that was because I couldn't stop thinking about some code I need to write today for Project Drummond, my side business.  Partly that was because I have been thinking about working with my illustrator Jenn in a whole new way.

So I got up, got showered, and headed down to the old home office to crank out some work.

The night before I had put my laptop atop my lap (funny how you can do that with it) and tinkered a bit with code while Missy, Rachel and I watched a movie.  When I hooked it back up to my monitor this morning, this bad thing happened.  Or rather, a good thing didn't happen.

My beloved Thunderbolt monitor wouldn't charge the laptop.

Well, crap.

So I asked Cousin Google what to do.  And tried many of the things they recommended, to no avail.  This potentially was going to eat my whole damn day.  Then I took a well informed guess, based on my research.

My magsafe adapter had gone bad.

My who-what-now?  

IMG_9868.JPG

This thing.  It's a little magnetic adapter which connects the monitor cable to the laptop.  I ordered a new one for like $10, and was able to pick it up at a nearby store.  And when I brought it home, and swapped it out, and saw the sweet green light of functional charging.

Then I dug back into my list of many things.  Which included reading an amazing story written by a fellow author.  Negotiating some narration work for a new story.  Writing code.  And having an important phone call with partners.

And that's when I started to have this feeling: that much like that little magsafe adapter, I'm just this one little part of many vast, complex systems.

Which reminds me of a quote from one of my most favorite books, Cloud Atlas.

 “My life amounts to no more than one drop in a limitless ocean. Yet what is any ocean, but a multitude of drops?”

It's good to be a drop.

 

Posted
AuthorMako Allen
CategoriesgratitudeNow
No, not that kind

No, not that kind

One of the big truisms of working in technology is: You can't know everything by heart.
Another is: Someone, somewhere, has already faced this problem, and solved it.

Hence, one of the most useful sites on the internet for us techie types: Stack Overflow.

I love it.

On Monday, I was looking into populating a modal dialog box with dynamic content, gleaned from a service, called by Ajax.  I wanted to see some other ways it had been done, so I hit the site.

In short order, I had some great guidance, including some dissenting opinions about the best ways to do it.

I saw three different ways, rejected two, settled on one.  

So useful.

 

 

 

Posted
AuthorMako Allen
Categories365 Gratitude

This might be the first time I've put a cartoon poop in my blog.

I've been involved in this big refactoring at my day job.  That's when you take something you've already made, and you keep the good parts, and throw away, improve, or upgrade the rest.

The old way.  Perfectly serviceable, kind of ugly.

The old way.  Perfectly serviceable, kind of ugly.

Yesterday, and some of the day before I was researching ways to replace the jQueryUI Date Picker with something a bit more modern that fits into bootstrap.js's way of doing things.

The new hotness.  So shiny!

The new hotness.  So shiny!

I found something great, a js library called bootstrap-datepicker.  It's much prettier.  And it has way, WAY more configurable options for how it looks, what it does, and how to get it on your page.

However, there were some not-immediately-obvious things about it.

For one, the documentation was a bit unclear on exactly what files I needed to put into my project to use it.  After I dug around a bit, I figured out exactly which javascript file and which cascading style sheet I needed to go with my particular flavors of bootstrap and jQuery.

The other thing the documentation was none too specific about was whether or not I could use it commercially.  But I sussed that out too, eventually finding on the project's GitHub page a file for its license, which is an Apache License, meaning it was a-okay to use it.

So I download everything, put it where I think it needs to go, and get tinkering.  And it won't come up!  That was when I realized that while I had created an asset-pipeline manifest for the files, and put them where they need to go in my project, I hadn't actually put the required asset tags on the page where I was trying to use the feature.

They look kinda like this:

<asset:javascript src="cooljslibrary.js"/>
<asset:stylesheet href="coolcssfile.css"/>

I got them on the page where they should be, reloaded, and VOILA! 

And that was when I realized that I know my shit, meaning I also know I'm not shit.

Posted
AuthorMako Allen
Categories365 Gratitude