Weekly Review, October 25

By Saturday, October 25, 2014 0 Permalink 0

I’m a productivity / self-management geek. I love making TODO lists, and I’m always on the hunt for the “perfect tool” to fit my GTD-based workflow. Combined with the fact that I also love tinkering with my workflow constantly, it’s not surprising that I still haven’t found that perfect tool.

For a long time I wanted to tackle my “personal productivity system”, rethinking it given the changes in my life. The last time I did it, I had no kids, different day job, and I was working mostly in a Windows environment. Now, with twins, very different day job, and mostly Mac / Linux environments – the old system is rotting.

My plan was to finish with the website project, and start the next project – rethinking my GTD system. I’m babbling about it now, because Google launched Inbox, forcing me to jump straight into evaluating it as a candidate for a TODO system. I got my invite today (h/t @erang). So far I like it. It feels like merging features from Gmail, Google Now, and Boomerang. I just wish I had it on my two Google-Apps-powered accounts too… Who wants invites?

In an unrelated thread, I’m getting annoyed with post-sharing on Facebook. Looks like it ignores the post thumbnail image for most of my shared posts… Anyone has any idea what’s up with that..?

The Weekly Review is (hopefully) a recurring summary, reviewing highlights from the last week.

Getting Rid of Redundant Import In SConscripts

This is the seventh post in my SCons series. The topic of this post is getting rid of the last bit of overhead in SConscript files – the Import('*') line.

According the the SCons user guide, a SConscript files needs to Import('...') shared symbols. It’s possible to import all exported symbols with Import('*'). This is the method I used in previous episodes to make shortcuts available in module-level SConscript files

Perhaps you’re fine with this little remaining overhead in every SConscript file. After all, it’s not such a big deal. With the wildcard syntax, you will never need to go over old SConscript files and update their import list when you add a new shortcut.

If you prefer your SConscript files as minimal as possible, here’s a dirty little hack I use. Instead of passing the shortcuts dictionary to a delegated SConscript file using the exports argument, I modify the _SConscript.GlobalDictdirectly before invoking the SConscript() function.

Using my example project, you may recall from the previous episode how the delegation looks like:

def process_module(self, module):
    print 'scons: |- Reading module', module, '...'
    # Execute the SConscript file, with variant_dir set to the
    #  module dir under the project flavored build dir.
    self._env.SConscript(
        sconscript_path,
        variant_dir=os.path.join(self._env['BUILDROOT'], module),
        exports=shortcuts)

The hack is a minor modification of this snippet:

def process_module(self, module):
    print 'scons: |- Reading module', module, '...'
    # Execute the SConscript file, with variant_dir set to the
    #  module dir under the project flavored build dir.
    SCons.Script._SConscript.GlobalDict.update(shortcuts)
    self._env.SConscript(
        sconscript_path,
        variant_dir=os.path.join(self._env['BUILDROOT'], module))

The result of the hack is that the shortcuts are injected directly into the global dictionary. This means that these symbols are available in SConscript files, without any call to Import(..)!

As always, the entire project is available on my GitHub scons-series repository. Feel free to use / fork / modify. If you do, I’d appreciate it if you share back improvements.

See the scons tag for more in my SCons series.

Choosing Hosting Service for The Ostrich Website

By Monday, October 20, 2014 0 , The Ostrich Website Permalink 0

To start a new website, I need to choose a hosting service provider. This is the fourth milestone in The Ostrich website project roadmap. This post is a project progress report, summarizing the completion of the milestone.

The expected outcome, from the roadmap: Hosting plan purchased; Mock instance of chosen content platform installed.

I eventually chose HostGator. Read on for more details on the options I explored.

Weekly Review, October 18

By Saturday, October 18, 2014 0 Permalink 0

Last week of the holidays for the foreseeable future. Back the work..!

Google announced Android 5.0 (Lollipop) and Nexus 6 and 9 the other day. That’s pretty exciting! I can’t wait to get Lollipop on my Nexus 5 (no, I don’t want to install developer preview on my daily-use phone)! As much as I love the Nexus line, I can’t be too excited about the Nexus 6. It got decent specs, although I’d expect a 128GB option if there’s no SD expansion slot. But the size! And the price! Oh my god! 5.96″?! for $650?!?! Damn you Google, I don’t want that! What I really liked about the Nexus line so far was “excellent Google-experience devices at great price points”. When people ask me for smartphone recommendation, if they’re not tech-savvy, I usually recommend an iPhone. If they say they don’t want one (due to price, or other reasons), I used to recommend the latest Nexus as the best value-for-money alternative. With Nexus 6, I can’t do it anymore. In addition, Nexus devices used to be reference devices for developers, which isn’t reasonable anymore at that price point.

I guess that’s the downside of Nexus devices gaining popularity. Do you have a different opinion? Let me know in the comments!

OS X Yosemite became publicly available this week, after a couple of months of beta. I upgraded my MacBook Pro (mid 2012 model) yesterday, and looks like it passed smoothly. Didn’t run into any problems so far. Did you? What’s the best new feature for you? (didn’t find mine yet)

The Weekly Review is (hopefully) a recurring summary, reviewing highlights from the last week.

How to Simplify Your SConscripts

This is the sixth post in my SCons series. The topic of this post is building reusable infrastructure that can extremely simplify your module-level SConscript files.

Starting with the first non-trivial SCons project, the module-level SConscript files contained too much repetitive code. The goal of this enhancement is to go back to minimalistic SConscript files. The objective is to let the developer define the module-level targets with minimal code, and no hassle.

I continue using the same C++ project that I introduced in the basic example. In this post I present SCons shortcuts that are available in module-level SConscript files. These shortcuts are Python functions that take care of dirty details behind the scenes.

The final result is available on my GitHub scons-series repository.

On Python Closures

By Tuesday, October 14, 2014 1 Permalink 1

Closures are an interesting concept in computer programming. They can be powerful and useful, but they also can be tricky to understand and use well.

In this post, I try to provide a clear explanation of closures, and go into specifics on closures support in Python.

Being an “interesting programming concept” is nice, but not enough for me. I will present a real use-case for closures in Python.

No programming language is perfect (though Python comes close ;-) ). Programming languages that choose to support closures often need to make difficult tradeoffs. I will discuss some of the choices that were made in Python, and their implications.

The Ostrich Website Design

I want my new website to look good. Personally, I have poor aesthetic sense, but I do appreciate a well-designed product. So I need to get a solid design for my site. This is the third milestone in The Ostrich website project roadmap. This post is a project progress report, summarizing the completion of the milestone.

If you’re reading this on my site, you can see the resulting design. I think it looks good. The components of the design you see here are:

  1. Branding & WordPress design by Gootte.
  2. WordPress theme based on BuzzBlog Theme. The theme was customized to my branding as part of the Gootte design project.
  3. Components of the site design used throughout external platforms. Social network pages and profiles, newsletter template, etc.

Read on for some more details on the design process.

Weekly Review, October 11

By Saturday, October 11, 2014 0 Permalink 0

It’s holiday again. No fun vacation this time though :-) . With the twins’ day care out for ~10 days, this holiday is more work than the usual daily routine! I actually look forward to “after the holidays” so I can have more free time..! The “fun” agenda for this holiday – minor surgery for the boy, so we have home-time with him for the recovery. (long time planned surgery. nothing to worry about. he’s mostly recovered by now. thanks for asking :-) )

Speaking of “free time” and “kids” – a quick question for parents out there. Do you have any success with finding the time to work on your “personal projects” / “hobbies” / whatever you’d like to call it? Got tricks to share? Does it get any easier as they grow up? Specific advice for twins? (mine are 8-months old)

I’d like to share a “business” thought I had, and get some feedback from you (yes, you!). I received a lot of positive feedback on my connected A/C project. So, I thought I could bring together and sell a “DIY Connected IR Control Kit”. Would you be interested in something like that? The focus is on a DIY kit, not a polished product (like Sensibo). I realize there are numerous Arduino kits out there (like this from Amazon, or these on eBay), and anyone can buy the components and implement the project. The idea is to create a minimal kit for “controlling things with IR”, and throw in modules for Internet connectivity and a nice booklet. Maybe complement it with a “cloud service package” that will make it easy to connect to your project from anywhere (securely). So I wonder – if you wanted to make your own connected A/C project (or other IR-based device), would you buy such a kit? Will it make any difference what prototyping platform the kit includes (Arduino, Raspberry Pi, …)? Please let me know by answering the poll below, or sharing your input through the comments!

online surveys

The Weekly Review is (hopefully) a recurring summary, reviewing highlights from the last week.

Integrating SCons Flavors with the Terminal

This is the fifth post in my SCons series. The topic of this post is improving the previous multi-flavor project via terminal integration.

It can be a hassle to handle multi-flavor projects. In the multi-flavor project post, I suggested a solution to simplify the multi-flavor build process. Using that solution, you just run scons flavor_name to build a specific flavor. But there’s still room for improvement! If you want to run a program you just built, you still need to specify the path to the flavored executable.

For example, say you built a project with a program named say_hi in the module hello. You built it by running scons debug. To run it you execute ./build/debug/hello/say_hi. It can be a hassle to write ./build/debug over and over. Even worse, it’s the first time you need to know about the layout of the build directory. Up until now, such details were nicely hidden in the config file.

In addition, you may often want to work with just one flavor. You may be developing a new feature, and you want to only build and run the debug flavor. If you run scons without the debug argument, all flavors will be built. This can be annoying and time consuming.

In this post, I suggest a helper script to make things simpler. The purpose of the script is to allow you to activate a flavor in a terminal session. While a flavor is active, magical things happen:

  1. Running scons with no arguments builds only the active flavor.
  2. The executable programs of the active flavor can be executed more conveniently.
  3. The active flavor is indicated in the terminal prompt.

The final result is available on my GitHub scons-series repository. In the rest of this post I go into the details of the helper script and related changes.