Category Archives: geek

On this page:

Sleep as Android

Following W-‘s example (I’m such a copycat!), I’ve been trying out a few sleep-related applications on my phone. I get more sleep than he does and my schedule is pretty flexible, but I figure that an app might let me swap out the diminishing returns of sleeping in for some extra discretionary time. For a while, I ran Sleep as Android in parallel with SleepBot, and I also tried each of them separately. I used a sturdy, extra-long USB cable to charge my phone, and I slept with my phone under my pillow.

Both apps seem to agree with each other on the motion they detect, and they also appear to do a decent job of distinguishing between my motion and W-‘s motion (we have different-looking graphs). I’m not sure if there’s a significant difference, but I prefer Sleep as Android’s timing, so I bought it after the trial ended.

I also like Sleep as Android’s way of gradually waking me up with short buzzes, gradually leading up to an audio alarm. I like buzzes because they feel more discreet. I don’t have to feel guilty about interrupting W-‘s sleep.  They also don’t lead to overexposure to whatever tones I picked for my alarm. I’d previously used the built-in Medieval Jaunt and songs like Shonen Knife’s Cookie Day, and those still result in an odd tug on my concentration whenever I hear them.

I’m still not keen on morning meetings, but I can make them with less grumbling now!

Microsoft Excel: Converting a summary table / crosstab back into data rows

I recently wanted to transform a summary table of the form:

2014-10-15 20_36_58-Microsoft Excel - Book2

into a table with rows of (activity, date, value) so that I could add columns for year and month and then analyze the data using a pivot table.

It turns out that you can do this with another pivot table, yay! I followed this tutorial to convert my summary columns into data rows using Microsoft Excel 2010.

  1. Press Alt-D, P to get to the secret pivot table wizard that’s different from the one you get from Insert > Pivot table.
  2. Choose Multiple consolidation ranges. Click Next.
  3. Choose I will create the page fields. Click Next.
  4. Select the range and add it. Go through the rest of the wizard to create a pivot table.
  5. Remove the row and column fields.
  6. Double-click on the total.

You should now see a table with the data from your crosstab.

2014-10-15 20_43_25-Microsoft Excel - Book2

Neato! Pivot tables are even cooler than I thought.

Tablet thoughts

I have an Asus Transformer Pad Infinity (TF700T), which I got shortly after its release because I was curious about exploring tablets as a sketchnoting option but I was adamantly opposed to getting an Apple product. I should probably have waited for the reviews to come in, since the TF700T turned out to be a lemon (apparently the processor wasn’t quite up to the task of driving the display) and by the time I sat down and focused on getting past all the excuses and all the potential configuration options for speeding things up, the return window had passed. I suppose I could try to sell it, but it doesn’t seem right to inflict the same problem on someone else.

Anyway, I’ve reflashed it to CROMBi, which the Internet says is supposed to be much better. While I’m waiting for everything to be set up again, I want to think about how a tablet could fit into my life and make things better. That way, I can decide if it’s worth spending the time fixing this up, spending the money to upgrade to a newer tablet, or leaving well enough alone.

What do other people use their tablets for, and what other uses might I want to explore?

  • Business
    • Reading could be handy, especially as a second screen for technical references.
    • Lightweight device for writing in cafes? My laptop isn’t that heavy, but I could give it a try.
    • Browsing? Maybe, if I can get performance up.
    • E-mail? My phone is more convenient.
    • Reviewing my sketches? Maybe, if I can fix the lag issue.
    • Drawing on this tablet? Frustrating because of the lag.
  • Personal
    • Cooking? It might be handy to have large copies of recipes and maybe even a digital shopping list.
    • Browsing? The attentional separation of doing casual browsing on a separate device might be good for training my mind.
    • Learning? Flashcards, perhaps?
    • Watching stuff? I rarely watch movies, and when I do, I watch them on the TV so I can hang out on the sofa with W-.
    • Gaming? That’s popular.
    • Some kind of home console, with weather, calendar, and a shopping list? Maybe, but it seems like overkill.

Ah, tech!

Reflecting on my growth as a programmer

One of the things I realized from dealing with that programming issue is that I don’t have a mature development workflow for front-end work yet. On previous projects, I focused mostly on back-end development. I had somewhat gotten the hang of test-driven development and code coverage when using Rails before, and I set up an issue tracker for my previous teams. For my main consulting engagement, I shifted to working on mostly HTML, Javascript, and CSS. I’d handled a bit of that before, but we usually worked with designers who did most of the heavy lifting (and the cross-browser fiddliness). Over the past two years,  I picked up more JQuery and Angular, fought with Internet Explorer 7 and then 8, and explored Chrome’s developer tools a bit more.

I didn’t have things quite set up the way I think other people have. I felt mildly guilty about installing programs that were not available from the client’s internal software site, although Emacs was definitely worth the twinge of unease. Even the version control I used was ad-hoc, using Git on my computer to manage snippets for copying and pasting. I still haven’t mastered the Javascript debugger in Google Chrome, much less the tools available for other browsers. (Hence all the grief Internet Explorer gave me.) I didn’t have a test framework set up, so I often committed regression errors and other mistakes. I haven’t yet internalized all the cool development tools in Emacs, like Smartparens and Magit. (I’m slowly getting the hang of multiple-cursors-mode, though!) In terms of workflow maturity, I felt more like someone a few years out of university (or maybe even someone in their final year of classes!), and definitely like someone cobbling things together instead of picking up practices from a well-running team.

My main consulting engagement is coming to a close, but I’m looking forward to learning more about the craft of software development. I have a few personal projects to practise on, and it might be easier to Do The Right Thing when you’re less worried about potentially wasting the client’s time. I’m looking forward to familiarizing myself with more of the nifty features in Emacs. I’m also looking forward to immersing myself in the right ways to do things with popular frameworks, including testing and deployment.

I’d like to become a good programmer someday. What would that be like? For the particular way that I work–a generalist pulling together different things quickly–a good programmer might be one who has a neatly organized library of snippets, and who writes modular code with simple tests that exercise different functionality. Using a debugger, the good programmer would be able to dig into other people’s code, figuring out even things that aren’t documented. That programmer would also be able to quickly prototype and build well-designed interfaces. Things don’t have to win awards, but the interface shouldn’t get in the way. An even better programmer would have the ability to coordinate other programmers, improving people’s results by helping them work on both a tactical and strategic level.

Someday!

2014-09-15 Reflecting on my growth as a programmer

2014-09-15 Reflecting on my growth as a programmer

Thinking about how to make the most of the new Hacklab

The new Hacklab (1266 Queen Street West) will have wood-working tools, a skylight, and more space to set things up (maybe the sewing machine and serger?). There’s a big fabric store nearby, too. In addition to those new capabilities, all the usual tools will probably be easier to use: the laser cutter, the 3D printer, the CNC mill, the electronics equipment…

With that in mind, what would I like to learn more about so that I can make the most of Hacklab? I’ve mostly been treating Hacklab as a place to meet people, with the vegetarian cooking practice and social link building as bonuses. There’s a lot more I could do with it, though, and it might be good to explore.

I’d love to become proficient in making things that fit our life. I like how Norm made custom workbenches and corner tables from lumber. I like how people 3D-print handles and adapters for various things, and how they laser-cut cases, stencils, and jigs. I’m not entirely sure how I’m going to handle transporting lumber and finished goods (bicycle? cab? asking W- for a ride?), but maybe I can learn how to draw up plans, verify those plans with people who have more experience, and work on things at home (since we have many of the tools anyway). So maybe I won’t be making as much use of the tools, but I can practise asking for help.

Although it would be pretty nice to make a better case for my Samsung Galaxy S3 with the Hyperion extended battery I have…

It might be good to use the skylight to start some plants during the winter, too. I’ll need to order seeds for that one, I think.

I could also work on web or Android stuff while I’m there, since those are the sorts of things that other people work on. I could work on writing too, but that’s a little harder because of the background conversations.

So a weekly or bi-weekly trip to Hacklab could be a commitment device for making regular progress on a physical project (wood, sewing, or electronic), a programming project, and vegan cooking adventures. Would that be worth the ~$6 transit fare (+ about 1.5 hours of travel) to get there in winter? Hmm. Probably. If I pre-commit the transit fare so that I don’t have to make lots of little decisions, carving out a part for it from my budget for the year… It makes sense to push myself to go there, since if I stay home, I’m less likely to work on those kinds of things.

We’ll see how this works out!

My path for learning AngularJS

I’d been meaning to learn AngularJS for a while, and rapidly prototyping a data-binding-heavy Javascript application was the perfect excuse. The phonecat tutorial on the AngularJS site was a little too heavy-weight for me, although it would probably have been useful for learning how to Do Things Right. Simpler, from-scratch tutorials like AngularJS in 30 minutes and ng-newsletter were a little more useful for me. After I got the hang of setting things up and using a controller, I browsed through the AngularJS documentation and looked for different modules as I needed them.

Here’s the rough order I learned things in:

  1. Binding data with {{}}
  2. Retrieving data with $http (since I already had JSON handy from the NodeJS site I created)
  3. Iterating over data with ng-repeat
  4. Adding ng-click events
  5. Using ng-class
  6. Dependency injection
  7. Figuring out routing with ui-router
  8. Dividing things into multiple routers
  9. $interval and $timeout
  10. State change functions
  11. Resources (although I didn’t end up really using these)
  12. Directives

I still have to learn about filters, nested views, testing, proper file organization, and all sorts of other goodness. But yeah, AngularJS feels pretty good for my brain… =) Yay!