Category: Life

Every other post.

  • Education without a Vision

    Education without a Vision

    In the short span since I last graduated in 2007, annual tuition for full-time science students at the University of Ottawa had jumped from $4,786.65 to $6,342.08. A 32% increase. I don’t ever remember paying less than $5,500, but I’m going by the tuition posted on the University of Ottawa website for that year and program.

    As a point of comparison, minimum wage in Ontario increased by 7% over the same period, or from $9.50 to $10.25. It used to be that you could work during university and come out of it without significant debt, if any. Now it is expected for students to be saddled with debts greater than the average Canadian annual salary.

    Yet even as university education is becoming less affordable, it is becoming more necessary. The undergraduate degree has displaced the high school diploma as the minimum barrier of entry to white-collar work. The Master’s degree meanwhile has filled the void left by the undegrad, and I see it as a requirement on more and more mainstream jobs.

    We rank amongst the most educated citizenry of the world, and it’s as if we don’t know what to do with it. Employers are raising the education requirements for job postings because the work pool can sustain it, even though the jobs themselves haven’t changed.

    In fact, many employers seem to be more enamoured with the idea of their staff having a university education than the contents of that education. How many jobs have you seen listing an undergraduate degree as a requirement but with little care as to which one? Is the employer better served because the person who fills spreadsheets all day has a Philosophy degree? How many stories have we heard from new graduates where the continuation of their role at a company wasn’t dependent on their competency, which they had satisfied, but whether they had obtained a diploma by a given date?

    It’s as if the undergraduate degree has become no more than a license to apply for white collar work.

    We’re caught in this cycle whereby we get educated because the market demands it, while the market demands it because we get educated. Unless something gives, students are going to eventually fork over $20k/year for tuition for nothing more than the privilege of avoiding automatic rejection by HR software.

    I’m not saying that education is without value. It’s that that value is rendered meaningless when all that is cared about is a piece of paper rather than what it symbolizes. When competency takes second place to technicalities. When computers reject people not on a basis of qualifications, but rather if they had the right set of letters beside the field written “education.”

    Most desk jobs out there should be open to people with high school diplomas. If you have the right experience and competency from years working in the field, you should be able to apply for a position without fear that a computer will dump you for having the “wrong” university degree.

    More educated Canadians is a good thing. But I believe that how our society has come to exploit this fact is to its own detriment. We need to figure out what education means to us, and develop a vision for how we can harness it the best way possible.

    Charts from the Canadian Federation of Students.

  • Back in University

    Back in University

    I made some baked maple doughnuts today.

     

    This was also my first day of university. I got my books, my student card, and checked out events on campus. Tomorrow will be an introductory session for my department and classes start on Wednesday. I’ll also try to get some work done.

    With that, the amount of time that I’ll have to devote to experimenting with food will likely be drastically slashed. From 8:30am until 6:00pm six days out of seven, I’ll be either at work or school. For that seventh day, I’ll spend half a day at my work place.

    If I have time in-between classes, and all my homework is done, I’ll either telecommute to work or spend some time on this creative endeavour I’ve been meaning to get to (I’ll leave the details of said project for another blog post.)

    Anyways, given the expected cutbacks in culinary exploration, I figured this would be a good time to share what have been my favourite recipes over the past little while.

    First on the list would be the cinnamon sugar pull-apart bread. The best way to describe it is to say that eating it is like picking away at a huge Cinnabon.

    Next on my list would be the soft cinnamon sugar pretzels. I’m not a big fan of pretzels, but this to me didn’t taste like the ones I had before. It tasted more like a doughnut from Suzy Q. I have more pictures about my effort to make them here.

    Third up would be the New York style cheesecake recipe with a shortbread crust.

    Then there are the Oreo-stuffed chocolate chip cookies.

    Finally, a simple but delicious recipe for peanut butter cookies.

    As a funny aside, it was interesting to see how I’d grown since the last time I had my university ID photo taken. The anxious me who had just turned 18, living at home, and relieved at having made a friend during the campus tour. Then the me of today, confidently navigating the adult world as a sea of kids take their own first steps in the path to personal freedom.

    Whatever happens in these next few years, it ought to be interesting.

  • What Killed the Linux Desktop

    What Killed the Linux Desktop

    Miguel de Icaza wrote an interesting piece today sharing his thoughts on what he thinks is the lack of penetration by Linux in the desktop market. He points to development principles that have hurt backwards and cross-distribution compatibility, making the operating system less likely to function as well as the likes of Apple’s OS X.

    I think he raises some very valid arguments, but I also believe he’s missing the elephant in the room. I would summarize my explanation as to the lack of adoption as people take the path of least resistance. 

    That means using whatever comes on the system they bought. How often do casual users go through the trouble of switching operating systems after the fact? That’s a lot to ask from regular people. If the benefits are there, some may make the jump – but there’s a really high threshold you have to reach before they’ll be willing to overcome their reservations on the matter.

    Meanwhile, what motivation do computer manufacturers have to include it by default on their end? The path of least resistance is to keep using what’s worked. That means Windows. There’s a financial risk to deviate from that.

    I think as the hybridization of tablets with laptops go mainstream, there’s an opportunity for Linux to hit the desktop market by way of Android. If everyone’s used to laptops that behave like the mobile operating systems of today, it won’t be such a big jump to then have desktops that use Android. I think the rise of hybrids will have the effect of making mobile operating systems more desktop-y, making it more suitable as a workstation product.

  • Pride 2012 and Janice Kennedy

    Pride 2012 and Janice Kennedy

    On Friday, the Ottawa Citizen published a piece titled What does tacky sex have to do with gay pride? by Janice Kennedy. In it, she blasts Pride week and the parade in particular, calling it “classless”, “vulgar”, and undignified:

    Not to mention the big parade Sunday afternoon, which will feature drag queens, leather kings, sailor-capped guys in leopard skin bikinis and the usual display of rampant horniness on floats dedicated to sexuality made adolescent, trivial and — what’s the word? — tacky? vulgar? classless? all of the above?

    How does iconizing the pageantry of monumental bad taste — even when it’s dressed up in adjectives like “fun” and “colourful” — serve as a vehicle for dignity? How does a public sexfest honour a struggle for equality and human rights? Assuming a desire to end the alienating forces of segregation, how does any of this function as a bridge?

    She’s certainly not alone in voicing a disdain for the events. This conversation repeats itself every time Pride rolls around.

    I wonder if she’s ever actually been to one of these parades. Her view that it is no more than a hedonistic orgy on wheels doesn’t at all reflect how the march actually is. It is far more mundane, involving dozens of groups walking down to show their support for various causes.

    The title for her piece, in which she calls it gay pride, goes some way into explaining why she doesn’t get it. It is not a gay pride parade. It’s been called that, and it certainly has its fair share of gay people in attendance, but it isn’t a gay pride parade. It is a nexus for all those who want to show solidarity with issues surrounding the body, of which sexual orientation is only one small part.

    That’s why you’ll also find in the parade groups dealing with such things as gender expression and identity, HIV stigmatization, non-monogamy, BDSM and leather. It is an environment where people can celebrate among others and not be judged for it.

    To ask such things is not to be joyless or puritanical. It is to be publicly aware and socially respectful. Yes, the world should know who you are, why you’re flying the flag or wearing the triangle, why (against family expectations) you have a boyfriend, girlfriend or same-sex spouse. But the world really does not need to know explicitly what turns you on.

    With the exception of sexual orientation, Janice is uncomfortable with any notion of body and sex that deviates from her perceived norms. To the point where she argues that people shouldn’t be open about it at all, not even at its own parade. She sees it as taboo.

    I don’t believe that anyone should be ashamed about their body. I think that shame inhibits communication and so fosters ignorance, which in turn opens a world of pain for a lot of people.

    This is a parade about liberation. Unlike Janice, I believe this is very much the place for people to be open and free of the shame for who they love, how they dress, their gender, their kinks, etc. To her it’s an undesirable expression that is entirely unrelated to the struggle for acceptance. To me, it couldn’t be more about it.

    I’d also like to throw a shout out to Jeremy & Tina for having joined us at the parade. I had a great time, thanks guys!

  • 27 Programming Tips

    27 Programming Tips

    The following are what I’ve learned after having programmed for a little while. It is by no means a complete list, and you may disagree with some of it.

    You’ll Never be Great

    And that’s a good thing. The moment you think you’re great is the moment you’ve given up thinking that there’s significant room for improvement. There’s always room to learn, and you’ll be better for it.

    Learn, Learn, Learn

    I read Hacker News and Proggit daily. By virtue of this I also invariably end up on StackOverflow each day. What I’m looking for on these sites are articles on programming in general. I want to expand my horizons, and become exposed to new paradigms and ideas about how to go about the field. I also learn by Googling up whenever I encounter terms that I’m not familiar with.

    I’ve learned so much from doing this. From functional programming concepts to how big web companies maintain responsive services in the face of gargantuan demands. It would be a mistake to dismiss this exposure on the basis of appearing unrelated to what you do. If you’re developing, it’s all related. It all matters. Those ideas shape how you think about problems, and provide you with more options with which to address them.

    Don’t Over-Engineer

    I define over-engineering as the act of programming in solutions to problems without having first established whether it’s warranted. I have been quite guilty of this with past projects.

    The problem with over-engineering is that it increases the complexity of the code, and in doing so, reduces your flexibility to deal with the issues that do materialize. The kind of problems that have ramifications that extend beyond refactoring a few methods. Increasing the size of the code base also elevates the statistical likelihood of bugs, and if it’s not obvious, makes finding the bug that much more time consuming.

    Kill Dead Code

    If I don’t use it, I don’t comment it out. I delete it. If I want to go back to it in the future, I look through the history as managed by the code revision software.

    Having a bunch of commented out code obfuscates the remaining logic. Leaving dead code in there, meanwhile, increases the likelihood of errors in the long run.

    Only Ever Define Once

    If you define something more than once, whether it’s a constant or program logic, you introduce the possibility that the program may do two different things for what is supposed to be a single behaviour. This introduces the possibility of error. Not to mention it increases the size of your code.

    I have yet to encounter a situation where something that was defined twice or more couldn’t have been condensed into just the one. Also see my point on clarity over efficiency.

    Don’t Program Blindly

    By this I mean resist the temptation to start tackling the problem by jumping in and coding straight-away. It’s okay for small projects, where the whole thing is going to be done in a matter of minutes or hours.

    When you’re dealing with larger projects, you’re going to want to work out how the program is to behave ahead of time. In my case, I’ll find flaws with the initial approach I had in mind, refine it, and then code it. The amount of time I save by removing these logical flaws at the conceptualization rather than execution stage is immeasurable.

    Comment Everything

    It’s not for the sake of others. It’s for yourself. Unless you’re actively working on a project, or have Rain Man-like memory, you’ll never really remember how your application works. When someone a year or two down the line asks for a new feature, you’ll have to go through the code base, and if you didn’t comment it properly, you’re likely in for a number of frustrating hours.

    As important as commenting your code is maintaining those comments. You can’t just change your code and leave your comments be – that defeats the purpose of their existence. My rules are to keep it brief, and to explain the why more than the how. The code can handle the how.

    Clarity over Efficiency or Cleverness

    I will always gladly sacrifice a few potential cycles of CPU time if it means my code is more clear. In all my years of programming, never once has that trade-off ever resulted in my having to refactor code.

    Debuggers & Profilers: Learn them

    When you start out, it’s tempting to use print statements everywhere to figure out what’s wrong. Learn a debugger. It’ll save you so much time when it comes to finding the source of an issue, especially when it’s not where you expected it to be.

    Profilers meanwhile help you figure out what part of your code is taking the most time to execute. It may not be what you anticipated. Instead of being that loop that does this big computation, it might actually be this side function that does a little record-keeping.

    Use Useful Variable and Function Names

    I’ve inherited code bases where the authors used such descriptive variable names as “AAA” and “AAAA”. Nearly as useless are when variables with redundant names like “data” are used.

    Variable and function names aren’t for the compiler or interpreter’s benefit. They’re for the person who wrote the code. Like comments, putting a little effort in coming up with descriptive names will save you much head scratching when you’re working on that same code down the line.

    Indent Properly

    Indentation is another of those things that in most languages isn’t for the benefit of the program interpreting your code, so much as the authors of that code. And even then.

    Proper indentation makes your code more legible, which in turn saves you time. And bugs. I didn’t think this needed to be said until I inherited this spaghetti code of an web-based management system, where each page of VBScript was a minimum of 3000 lines, none of which were indented in any logical manner.

    Limit the Number of Characters per Line

    In all of my IDEs, I make use of the option to draw a line that delineates the 80 character mark. I make sure that my lines of code never pass this threshold.

    You should never have to scroll horizontally to see a line of code. A line represents a statement, a single idea. Always scrolling left and right to capture them will hinder your progress at absorbing the logic behind the code.

    Blame Yourself

    When something goes wrong, and it doesn’t seem to make sense, it becomes tempting to blame whatever you’re using. My code is behaving as it’s supposed to – it’s this graphical toolkit that has a bug in it.

    No, it’s your code. Especially when you’re writing basic stuff using mature libraries and compiler/interpreter. It’s not impossible that there’s a bug in what you’re using; it’s just so much more likely that the issue you’re facing is of your own doing.

    Don’t Redesign the Wheel

    You’ll often encounter situations whereby you can either write your own implementation of something, or use one provided by a library. Unless you want to do this as a learning exercise, always pick the library.

    There’s a few reasons for this. For one, it reduces the amount of code you have to write. This saves you time, and reduces the potential for error. It also takes into account the fact that the people who wrote the library spent their time writing that specific functionality – and they likely did a much better job than you could. Especially when you go into such tasks as signal processing or visualization.

    Use Code Revision

    Even if I’m working alone, I always use code revisioning software. For one, I find the historical aspect very helpful. To go back in time, and see how I did things differently. Or to figure out what changes I did when the symptoms of a bug started presenting themselves.

    I name my software builds according to the revision of that build. This means that when a user says they saw an issue with build 266, I can go and load up the code for that very build, and have the same software they run. All at the press of a few buttons. The code revision software is also the authoritative changelog.

    Don’t Get Attached

    When I code, I code with myself in mind. How would I want this to be? Then I do it. But the way I envision things and the way users envision things don’t always align with each other.

    In those times, it’s important to be able to let go of what you thought was the best solution, and cater to the user. Because this program ultimately isn’t for you, it’s for them.

    Keep Functions/Methods Small

    Most of my functions are only ever about thirty lines of code. That doesn’t inhibit me from creating complex applications at all. What it does do is keep the logic legible and clear, which is a great time-saver when revisiting code.

    It also keeps my code more flexible. It’s much easier to alter how things work when you only have to edit a few small functions rather than mega-functions here and there.

    Keep source Files Small Too

    Smaller files take less time to parse mentally. Give these files useful names, and store them in directories with equally informative names. This will cut down the time you spend hunting for specific logic.

    Beware the Waterfall

    The waterfall approach to software development is the most intuitive on the outset, but it has a great number of short comings. This is why some teams use alternative models such as Agile. For the uninitiated, the waterfall model consists of coming up with requirements for the software, then creating the product, then testing it, and then maintaining it all.

    The problem is that verification stage. You may have spent a really long time in development, and then in testing, the user realizes that how you went about something isn’t what they had in mind. Changing that one thing, meanwhile, becomes a big undertaking because it means changing a whole slew of other things along the way. You did the application with a given logic in mind, wrote it with that logic in mind, and this user’s requests pulls the rug from under all of that.

    It’s easy to blame this on getting the requirements stage wrong, but you never really had any chance to begin with. The problem meanwhile with doing things differently, such as getting users more involved to get feedback early on, is that managers may not want to allocate time. They might not see the value of spending more time up front to save it down the road. I have no advice there, just be aware of the issues.

    Don’t Adopt too Early

    It can be tempting to adopt cool new technologies as they come out. While I love toying with new programming frameworks, I won’t use them in production applications I intend to support down the line.

    The reason being that I prefer stability over features. The extra time I spend up front will be recuperated in maintenance done down the line. This does go with my environment, where I create it and leave it so that I can work on the next project. If I was in a situation where the software was a living breathing entity, I’d likely be more open to using less proven technologies.

    Ignore the Fanboys

    I have yet to encounter a programming language, coding style, or paradigm that was perfect. Yet there appears to be no shortage of people who snub others based on this “one article” they read.

    I believe that especially as it comes to languages, it’s about picking the right tool for the right job. C is great for low-level work, but not my first pick for setting up elaborate GUIs, and so forth.

    Most fanboys tend to be good at repeating, but short on understanding. When you hear one blast you for your decision, ask them why such-and-such is better. If they can provide a suitable answer, awesome – listen to what they have to say. But if it’s ignorant tripe like “Python is slow at multithreading because it doesn’t do out-of-order execution”, run. Fast.

    Never Say “This Will be Easy”

    Never say “this will be easy” unless you’ve already done it. Oh sure, it should be easy. But then you do it, and you run into obstacles you didn’t even know were there. Like your company’s network policy that blocks your HTTP requests. Or permission issues on the user’s computer.

    Be especially weary of people express that belief of ease for you. That’s a red flag that they don’t know what they’re talking about.

    Admit When You Don’t Know

    University teaches you to come up with bullshit if you don’t know the answer to something. That doesn’t cut it in a professional workplace. When you don’t know the subject under discussion, don’t fool yourself. Admit that you don’t know.

    Especially in a team setting, it’s an opportunity for others to play to your strengths, and help you on the rest.

    Take Ownership for Mistakes

    This is hard. As soon as you recognize something wonky, tell someone. The worst you can do is let it be and hope it gets better. Luck is the least reliable ally in getting you out of a bind.

    A healthy work environment will take that information, work towards resolution, work out how to prevent it in the future, and move on.

    Don’t Work Weekends

    If you need to work through weekends in addition to weekdays, then start applying for another job. Your health and mental well-being are being sacrificed for a quarterly report.

    If you’re volunteering that time, then you’re making a mistake. It can be very easy to open up the laptop and just work. I’ve done it. But there’s value in that time apart. If you spend all your time on a given problem, then your mind will narrow onto a particular solution. You will inhibit yourself from conceptualizing anything else.

    Meanwhile, if you just stop focusing on it, you might spuriously come by a novel and entirely superior alternative approach. The mind works in funny ways, one being that creativity works best when there’s plenty of time not spent trying to innovate.

    Treat the Cause, not the Symptoms

    Bugs have causes and symptoms. A tendency with new programmers is to blindly change things around until the symptoms disappear, without ever grasping the underlying issue.

    When you’re confronted with a bug whose causes aren’t immediately obvious, stop for a moment. Think about the problem. Understand why it is happening. Then think out how you’re going to address it.

    Leave Optimizations to the Compiler

    Don’t try to optimize for the sake of optimizing. Leave that to the compiler. For one, what you’re changing might not actually be the part of your code that’s taking up the most resources. For another, most optimizations obfuscate the program logic to developers, introducing new avenues for errors. They also often reduce code portability.

    Only optimize when there’s a demonstrable need to do so.