Valentine’s Day 2014: Wood Carving

This year’s Valentine’s day video is going to be a little short, I’m afraid. Over the past three weeks or so, I’ve been playing with several ideas. My main goal was to have decent, full HD video for my video, since I found the video quality in my previous videos somewhat lacking. Since I didn’t have much luck finding a decent video camera to use, I decided that a still camera would have to do. Raspberry Pi in hand, I set about creating a time-lapse rig using my dad’s DSLR camera.

Raspberry Pi

IMAG0054

It turns out that there’s a great camera control library called gphoto2, which will not only download videos from a variety of cameras, but is also capable of controlling the shutter on many Canon and some Nikon cameras. Once I had that installed, creating time-lapse videos was a fairly simple matter of one command: watch -n 10 gphoto2 –capture-image. This captures one picture every 10 seconds. My first test, watching an ice-cube melt, went pretty well, despite the fact that the tripod was a bit shaky.

In the end, I didn’t have time to build a power pack for the Raspberry Pi, so I couldn’t film without a power outlet, which is inconvenient to say the least. So, in the end, I decided to record a time-lapse video of my carving a piece of wood. Bare in mind, this is the first thing I have carved EVER. So it’s not that great, but the video is cool, at least.  It took me about an hour and 15 minutes to carve out the drawing I made.

The final obstacle was that Adobe Premiere decided that it couldn’t possibly load any video format that I threw at it, so unfortunately I couldn’t edit the video at all. so there’s a single picture at the bottom of this post showing the final result.

So, without further ado, here’s your moment of zen:


Finished Carving

Which Distro? An Introduction to Picking “a Linux”

Every few days, someone on the Linux users group on Facebook posts a question that goes something like this: “I’m new to Linux. Can you recommend a good distribution for blah?” Where blah is usually something like gaming, media, or learning Linux. Like many people who are new to Linux, when I was first exploring the Linux world, I tried out a lot of distros. Eventually, I came to the conclusion that it doesn’t matter which distro you choose. I’ll explain a bit more about what a distro is, what kinds there are, and why it does and doesn’t matter, below.

What is a Distribution?

It’s hidden right in the name, but it’s not immediately obvious: a distribution of Linux is the Linux kernel, packaged up and distributed in a usable form. Linux, by itself, is just a kernel: the part of an operating system that manages the hardware, and provides interfaces for the various pieces of software and hardware that make the computer usable. If you were to just boot the kernel all by itself, the machine would start and do nothing. It would spin the fans and hard disks faster or slower, handle new device connections, and maybe even accept user input, but the computer wouldn’t be usable, because the software that interacts with the user (you) is not part of the kernel – no text terminal, no on screen menus or mouse pointer, no nothing. Once the kernel is running, it spawns other programs that handle user interaction. This is a basic model of operating systems.

So, apart from some basic patches and alterations that the makers of Linux distros might make to their specific release of the kernel, the underlying kernel is basically the same from distro to distro. The difference is in the software they install around it, and that’s also one of the reasons Linux is more customizable than any other popular operating system today. For example, there are quite a few different graphical interfaces that support Linux: KDE*, Gnome, Unity, XFCE – these are all visually different interfaces that function differently. And that’s just a very, very small portion of the desktop environments available. So two different distros with the exact same kernel can look and behave very differently on the surface. This is, to a large extent, how various Linux distros differ: the packages included with the base system, and their initial configurations. Ubuntu and Kubuntu, for example, are two distinct distros, yet they are mostly the same except that Ubuntu ships with the Unity desktop environment, and Kubuntu ships with KDE. One could easily uninstall Unity from Ubuntu and install KDE.

Major Differences: Package Management

Arguably the most fundamental distinction between various distros is the way they facilitate software installation. On a base Linux system with no package manager, the way you install packages is by copying the executable binary and it’s shared objects to the proper locations. This isn’t the easiest or most convenient thing to do, as it doesn’t allow you to easily keep track of what software package is installed where, or what version it is. So most Linux distributions ship with a package manager like apt (Debian-based), yum (Red Hat), portage (Gentoo), or pacman (Arch). These package managers will not only install packages from a central repository – all of which has been checked so that it is compatible with all the other software in the repository – but they will install all the dependencies as well. Everyone who has ever tried to install a package from source on a freshly installed system will tell you that this is a great relief, and saves hours of hunting online for tarballs**.

Which package manager you choose is largely a matter of preference, and this is the basis on which I think you should make your decision. Debian-based distributions come with “apt”, which is – from my biased perspective – a reliable, relatively easy to use package manager. Distribution upgrades (i.e. major upgrades) can be done without nuking the system and starting over, it has support for multiple architectures on the same system (e.g. installing 32-bit packages on a 64-bit machine), and is pretty painless. Even the most frustrating problems can sometimes be solved by throwing around a bunch of apt commands semi-brainlessly.

Red-Hat/Fedora-like distributions (like RHEL, Fedora, OpenSuSE, CentOS, and Oracle Linux) use “yum”, which installs rpm files. The last time I used yum was years ago, so my opinion isn’t worth much in this regard. I’ve heard that you have to nuke a Fedora system in order to do a distribution upgrade – that is, you have to do major upgrades by wiping the system and starting over – but I don’t know if that’s the case anymore. If you’re a beginner, I’d recommend using one of the other options, but this is my wholly biased opinion; take it with a grain of salt (and maybe a trial of Fedora on a VM).

Gentoo (and probably some other distros based on Gentoo) use “portage”. Portage is pretty freaking cool, in that it compiles every single package from scratch. It’s a somewhat agonizing experience (although not as much so on today’s faster machines), especially if you want to install a huge software package like KDE. But the benefit of doing things this way is that every binary on your system is optimized specifically for the box sitting in front of you (or under your desk, or wherever it is you have the thing). It’s more useful if you actually know what you’re doing, and can manipulate the various compiler flags effectively, but I’m sure there’s some speed-up even if you don’t entirely know what’s going on under the hood. Gentoo is my favorite distro for learning the ins and outs of Linux, and if you’re a first-timer and really want to dive into Linux and get a good head start, I can’t recommend enough that you take the time to do a full, manual, Gentoo install. Just… uh… don’t be discouraged if you fail the first time. Or the second. You’ll learn a TON, trust me.

My experience with other package managers like pacman is minimal. I used Arch for a while, and it’s a very nice distro. It’s something of the best of both worlds between Gentoo and more user-friendly distros like Debian.

Smaller Distros

The Internet is replete with smaller distros with funny names, and there are too many to mention. Most of them are offshoots of one of the main distributions I’ve described above, with various configuration changes. There are some medium size distributions as well (Linux Mint, Puppy Linux, etc) which tend to do a pretty decent job, and are sometimes designed for very specific situations Puppy Linux and Damn Small Linux, for example, are designed to be very small and light weight, and are especially useful for booting from a CD or USB key to do system repairs. Linux Mint, in particular, is a refreshing spin on Ubuntu. I tend not to trust the really small distros though (the ones you’ve never heard of with websites straight out of the 90′s), because I’m dubious as to whether they’ll continue to be supported in the future, and whether they’ve been tested thoroughly. There are probably good ones out there, I just don’t shop around too much anymore.

Choices

In many ways, it all comes down to choices, and the number of them you want to make. If what you want is a plug-and-play operating system that isn’t Windows or Mac OS X, go with Ubuntu, Linux Mint, Fedora, or a similar distro that has a one-and-done type install: you pop the disk in the drive, set up your language, time zone, and login credentials, and away you go. These distros have default packages that support most of your day-to-day needs, and it’s fairly easy to install components that aren’t pre-installed. They work on most of the common hardware out of the box, and they have a lot of online support options.

If, on the other hand, you want to make the choices yourself, choose a distro like Gentoo, Arch, or Debian. Gentoo and Arch, in particular, don’t even choose a default desktop environment for you, so you can choose any configuration you want right from the beginning without having to undo someone else’s work. One time, I installed Gentoo only to realize that I had disabled the kernel configuration for my hard drive controller, so the system couldn’t boot: that’s how much control you have. Debian has some base packages that install a very minimal system, as well as some options that will install a lot of common packages for you. It’s more immediately usable than the other two, but allows you to install a minimal system if you want.

At the far end of the spectrum of choices is LFS: Linux From Scratch. You compile the kernel from scratch, and gradually start loading things on the disk until you have a working operating system. I’ve never done this, but it’s always been in the back of my mind. You can find resources for doing that here: http://www.linuxfromscratch.org/

Stability

One last thing I want to mention is stability. Stability is probably the other most important dimension of a distro, and I would be remiss if I didn’t talk about it just a bit. If you’re cycling through different distros exploring the Linux world, you might not care too much about stability. Honestly, if you play around with things enough, you’re going to wreck your distro no matter how stable it is. But if you’re looking installing Linux on a machine you care about, stability is very important.

Because the distro packagers are usually on the same team (or are the same people) as the people who maintain their distro’s package repositories, their attitudes and values contribute to how stable the resulting collection of packages will be. Debian, for example, is know for being fairly conservative and FLOSS (Free Libre Open Source Software) fanatical, which makes for a very stable, very reliable system, and makes it a bit harder to install proprietary software (not much harder, though.) Ubuntu, on the other hand, is less gun-shy, and uses more up to date packages at the expense of a slightly increased probability that their packages will have unresolved bugs. It’s worth doing some research to find out the attitude of a perspective distribution’s repository maintainers before making your final choice.

Stability is the main reason I forsook Ubuntu years ago, and now only use Debian. Ubuntu is the only operating system I have ever installed (aside from Windows) which has crashed during or right after installation***. It’s a great distro that is paving the way for lots of innovation and publicity in the Linux and Open-Source world, and it has become a stepping stone (at the very least) for new users, but I don’t like the way they do choose their packages, and the default packages that are installed. And, if I’m honest, even though it’s a small and easily fixable issue, Unity absolutely drives me up the wall.

Conclusion

Hopefully this will help you choose the distro that’s right for you. You should play around with a few of them and read up on them (Wikipedia is a great place to do this) before picking the one you intend to use for ever and ever… and always know that you can change your mind at any time. As you learn to use Linux, you’ll likely realize that you wish you had done certain things differently during your installation, so you’ll likely be itching to re-install after a while anyway.

If you’re curious, as you might already have guessed, I install Debian on everything I get my hands on: my desktop, my parents computers, Raspberry Pis – hell, I’d install it on my toaster if I could. After administrating around 20 Debian machines during my two years as a SysAdmin, I’ve come to appreciate its elegant simplicity and robustness, and I wouldn’t replace it with Ubuntu if you paid me. But that’s just my opinion; I encourage you to draw your own.

*It has been pointed out – and rightly so – that the K Desktop Environment (formerly referred to as simply “KDE”) is now properly called “KDE SC”, for “KDE Software Compilation”. For simplicity, however, and since it is still referred to in the Debian repository and popularly as KDE, I’ve left the incorrect acronym as is.

**A member of the Linux Facebook group pointed out that newcomers to Linux might not know what a “tarball” is. Tarball is slang for an archive compressed using the unix tar utility, usually with the extensions .tar, .tar.gz, or .tar.bz2. Source code for many open source packages come packaged in a tar archive.

***It’s true, I’ve had many a Gentoo installation crash on me on or before startup, but that was always because I had done something stupid, and was entirely my fault. The same opportunity doesn’t really exist in Ubuntu; I’ve had installations crash once, and succeed after installing again with the same options for no discernible reason.

x Things That ______ People Do Every Day

From time to time, I go on Facebook. It’s this new website you might have heard of, where people post thoughts, opinions, links, and play various time-wasting games. When I go on this “Facebook”, I occasionally run into a link someone has posted, which is titled in this format: “10 Things To do before ____” or “14 Things You Shouldn’t Do When ____” or “11 Things _____ People Do”. I suspect this naming scheme originates from the popular self-help business book “The Seven Habits of Highly Effective People”, and on principle, I agree with the concept. The basic idea is this: I want to be more like people who do this, so I should examine what those people do, how they do it, and why, and then I should emulate their behaviour. This is the sort of literary endeavour that requires research, interviews, plenty of rumination, and a fair bit of craftiness to distil the habits these people have amassed over the years into the irrelevant (e.g. separating their food before eating it) and the relevant (e.g. waking up early, using lots of post-its, eating only vegetables.) This is not the sort of thing that one can write – properly, that is – in an hour that would otherwise be spent browsing Reddit, except you haven’t posted on your blog in a while.

What really set me off on this topic was an article that boldly claimed to be a list of some number of “Mistakes Not to Make During your 20′s”. Like most articles of this nature, it contained short, glib paragraphs proffering advice about what to and what not to do during your 20′s in order to be a “successful” person. Ashamed as I am to say it, I read the article, and took some of its advice to heart. One heading in the article that stuck with me particularly strongly, claimed that it was a mistake to “believe you deserve a break.” Weeks later, when I was tired, overworked, and slacking off, the article would pop into my brain, and I would think about how maybe I shouldn’t let my self take a break. It bothered me; if this person who made it through their 20′s told me that this was a mistake, should I not do it? But I’m exhausted and my brain doesn’t work; do I just keep pushing?

One day I realized that was stupid advice. Of course you need – and yes, even deserve – a break sometimes. When you’ve spent two weeks straight doing useless busy work for a University degree that you may or may not use, and that certainly won’t give you the professional skills that you need for a real world job, sometimes you need a break. When you’re frustrated and tired and annoyed, sometimes you need to do nothing for a while, and that’s ok.

Articles like this really stick in my craw because they’re so misleading. It’s easy to take the advice of our elders (even if the “elders” in this case probably aren’t much older than we are), as fact, or at least to wonder if their suggestions will turn out to be accurate. When giving advice, it’s important to consider that you’re giving advice to a person with different ambitions, a different past, and a different future. Sure, it’s easy to look back and what you did when you were their age and say, “You know, I did this, and it really helped me: you should do it to” or “I didn’t do this and I’ve regretted it; don’t make the same mistakes I did.” But it’s far harder to realize that each of us is a different person with our own challenges, and sometimes that advice can do more harm than good.

More than that, however, I find it incredibly presumptuous of a person on the Internet to claim that they know exactly what mistakes I should and shouldn’t make in my 20′s. Mistakes are a valuable learning experience. And who knows, maybe something that didn’t work for them will work for me. As useful as advice can be sometimes, when it comes down to it, we each have to find our own way through this world.

So that is to say, when you really take advice to heart, maybe it shouldn’t be from Buzzfeed. Maybe you should do some research about the author of the article or book, and make sure that they did some research. And maybe you should think about what they’re saying and – more importantly – why, before really accepting it. Or maybe not; it’s up to you.

On Becoming an Adult

Here’s the deal: In April, 2014, I’ll be graduating from McGill with a BSc. in Computer Science. I have one more semester left in school until I start working. I’m an adult, and in around 6 months time, I’ll be putting money in my bank account – money that I’ve earned by working – and living 100% by my own means. None of that was real for me until the other day. What happened? I signed up for my graduation photos.

First of all, let’s clear this up for good: graduation photos are a fraud. Why? Because you don’t actually take them when you graduate, and you’re not wearing your graduation gown when they’re taken. No no, you take them an entire 4 months before you graduate, and you wear a gown they lend you for the photo shoot. It is all a lie. There isn’t even cake. When you sign up to have your grad photo taken, you’re still not even 100% sure that you’ll graduate. Hell, you haven’t even applied to graduate. Which is also a thing, students: you have to apply to graduate.

Now that we’ve covered that little detail, let me talk about why all this “becoming an adult business” slapped me in the face when it did. You see, I’ve never really put much stock in all the accoutrements surrounding graduation. In fact, I’ve technically had the opportunity to attend three  of my own graduations, and of those I only attended one. In some ways, not attending graduation has become “a thing” for me; it’s like a tradition that I feel I have to uphold. But despite my feelings on graduation, and not wanting to be paraded around in front of a bunch of teary-eyed parents while some school official I’ve never even met berates me and my colleagues about the value of education, making the appointment for my grad photo was somehow a wake-up call for me. When I submitted that web form, it all became real. This is it: I’m becoming a real, proper, certified adult.

Rather than doing the sensible thing, and quickly signing up for a masters degree or adding a minor to my degree, or dropping some classes next term – anything to stay in school a bit longer – I actually felt pretty satisfied with myself. Never having to go back to school again is freeing. I’ve got a lot of experience under my belt, and now I’m free. And it’s not that I want to stop learning – on the contrary: now I get to learn even more – but I can do my learning on my schedule. I’m jumping off the treadmill of assignments and exams and quizes and essays. I’ll get to make things that have never existed before, and I’ll get paid to do it.

Sure, it’ll be hard. I’m about to start a whole new chapter in my life, in a totally different environment. Perhaps my next blog post will be about what I realized during my first job interview: that as much as I feel like an old hand at school, I’m going to feel like a total “n00b” in the workplace. But as scary as change is, it’s also exciting. It means new things, and I think I’m ready for them.

Projects: I Need Them

Yesterday, I went to McGill’s Tech Fair. All manner of companies were there, scouting talent and taking applications, looking for young students who need jobs. Needless to say, they found plenty, and I was one of them.

It was the first time I had ever been to the Tech Fair, and I wasn’t entirely sure what to expect. I’ve been told my CV is impressive, but I didn’t know what companies would be looking for, or even what – exactly – I was looking for. Among the myriad mining companies (I counted around three gold mining companies) and engineering firms, I managed to find a few software companies that interested me. I chatted, asked questions, and tried to make myself seem knowledgeable, curious, and passionate. The one question I wasn’t prepared for, however, was the question I expected to be the most prepared for: what projects have you done lately?

I’ve always thought of myself as someone who does projects. I’ve always done projects. Ever since I was a kid, I’ve been building things, even to the detriment of my own schooling. I have all but four volumes of Make Magazine that have ever been published. MacGyver is my hero. On any given day, I would rather code for five hours on one of my own projects than for one hour on an assignment for school, and yet I couldn’t think of a single project that I have done recently for my own interest, and of my own volition.

This realization has been a long time coming, I think. School and extracurricular activities (read: work) have sucked up a lot of the time I would ordinarily spend hacking and coding. And when I’m not studying or working, I’m usually too lazy and worn out to start working on something else. Sure, I’ve written some little programs here and there on the weekends or over the summer – coding is a part of life for me – but I haven’t really built any of the super cool, outlandish, crazy awesome projects that I used to build when I was younger and cared less about school. And that’s a shame.

So today is when it changes. This evening, I’m going to blow a TON of time that I could be spending on a DOZEN other things, writing a program that I’ve wanted to write for a few weeks. I’m not going to finish it tonight – I may not even finish it in a week, a month, or a year – but I’m going to start it, and I’m going to have fun. I’m going to tap into my passion again: I’m going to focus on what’s important.

Fun Slide

Fun Slide

I’m on vacation with my family in Carolina Beach, North Carolina. It was an 18 hour drive, spread out somewhat unevenly over two days; the majority of it on the second day. One thing we learned from the trip was that long drives should be spread out evenly, or at least with the shorter half on the second day. The second day was a marathon 12 hour drive down I-81. We finally arrived at the hotel, exhausted and road weary, and ready for the beach.

Carolina Beach is a fairly commercial area, with lots of shops that sell fishing gear and bait, and even more that sell cheap T-shirts, bathing suits, and beach toys. Boogie boards are ubiquitous at such stores, and I’m sure most families that visit this area with young children end up going home with at least one. The beach is nice, not too crowded, but there are still a lot of people on a sunny day like today.

What grabbed my attention tonight was not the ocean, or the beach, but the small amusement park two lots over from our hotel. It seems to have grown bigger since last year, and has a rocking pirate boat, a spinning wheel with spinning buckets attached, and a two-sided ferris wheel, among other attractions. All of the rides light up in bright colors. Tonight, walking in from the parking lot, I noticed a rather unusual sign on one of the rides. It was about 4 to 6 feet tall, and read – in bright, color-changing LED lights – FUN SLIDE.

I think the sign is hilarious. This is a cheap carnival, and the organizers apparently didn’t care to come up with a more creative name than “fun slide.” Amongst rides at other parks that have names that celebrate how monstrously large they are, or the theme they have been decorated with, this slide merely purports to be fun.

On another level, I like the honesty and straight-forwardness of it.  In a world where everything needs to have a special name to sell – razors with names like quattro, and turbo, and enumerable products called “fusion” – the makers of this slide didn’t feel the need to say anything more than that it is fun. The slide is an advertisement in and of itself, and any kid can see that it’s tall, it’s a slide, and that it’s probably fun to slide down. So nothing more was needed in naming the attraction than to drive that point home: it’s a fun slide.

Have I been down the fun slide? Hell no. For the most part of this vacation, I’ve been in one of three places: the comfortable chair in our room, reading or working on a coding project that needs to be done by the weekend; at the beach, walking or swimming; or in bed sleeping. That’s how I like my vacations: relaxed, and without the need to be busy.

Deschooling

The first few weeks of summer are always a bit of a drag. It’s like diving head first into a cold pool – the shock washes over you as your body acclimates to its new surroundings and temperature, and it takes some time before you feel like you’ve completely normalized. A few days ago I read about a concept called “deschooling.” Deschooling is what happens when home-schoolers* first leave school. They sit around and play video games, get up in the late afternoon, waste time, and do nothing. It happens all the time. After a while, they get into their element, and realize that they want to learn stuff. Then they start learning.

I don’t know any of this from first hand experience, so I can’t really make any claims about the accuracy of how that process happens, or how often it happens. But I do think I deschool every summer. When the rigidity of my class schedule finally gives way, I find myself plummeting into the cold waters of freedom, dazed and confused, and not sure what to do next. I waste time, I sleep late, I watch TV, and – reluctantly – do whatever work I need to get done. Working part time seems to slow the deschooling process, and my assumption is that to properly deschool, one has to engage in sloth as fully as possible before returning to a normal state of being able to get out of bed on time and do things like a normal person.

Deschooling isn’t a fun experience. It’s a time during which I have very little control over my sleep schedule, and I’m usually pretty bored. I spend a lot of time sitting around doing nothing. But there comes a time, a few weeks down the road, when I realize that I’m being a bum, and that I don’t want to be a bum. I get up, and I go do something.

Yesterday, I checked out a few books from the library and started to read. Today, I’m writing a blog post. Little by little, it seems, I’m returning to normal. My brain is rebooting, and the emptiness where once there was the structure and scheduling of school is being filled with my own schedule and rhythm. The freedom is starting to feel good, and soon I’ll be able to fully enjoy summer.

Looking forward, into the next phase of my life, I’m wondering how this dynamic will affect my work. Work, I expect, will have all the rigidity and structure of school, but without the added commitment of having to work at home. The stress of knowing that there’s always something else I should be doing will hopefully be gone, and maybe I’ll be able to “deschool” a little bit each day when I come home from work. I imagine that I’ll be a bum when I get home for the first few weeks, maybe even months. But as I adapt to my new routine, I’ll slowly return to working on my hobbies and outside interests, seeing friends, and generally having a life. That’s the idea, anyway.

*The more appropriate but also more radical term is unschoolers, which refers to children who don’t follow a prescribed curriculum or take standardized tests, but learn their own material at their own pace.