What You Need to Know before Applying to University

February 28th, 2010 by Jon No comments »

So you’re thinking about going to university, huh? I’ve been a student at Wilfrid Laurier University for about five years now, and I’m looking at graduating at the end of this term. In that time, I have learned a lot, and want to take a moment to share some of what I know with others out there. This post is aimed primarily at students in their last couple of years of high school, but will also be enlightening reading for parents who never went to university, or who need a refresher on what it’s all about. If you’re a university graduate (or a fellow student) and disagree with anything that I say here, or would like to add your own thoughts to this post, feel free to drop me a line in the comments. So without any more nonsense, here’s a short list of what you should know before applying to university.

  1. University isn’t your only option:
    There seems to be a stigma in high school that assumes that the most successful students are university-bound from the start. Courses are partitioned into college and university levels (sometimes called applied and academic), and the ideal of a university education is perpetuated to the students that the school deems have the marks necessary to pursue one.
    While it is true that you’ll need some kind of post-secondary education if you don’t want to work in retail for the rest of your life, it is important to remember that university is not your only option. For those who are more interested in working with their hands and those who don’t really enjoy school, a trade apprenticeship can be a great way to secure an enjoyable job with an enviable pay check. My little brother started his apprenticeship with a co-op program when I was in my second year of university, and now makes far more money than I do, and indeed far more than I will for the foreseeable future.
    For those who don’t have any idea what they want to do with their lives (don’t worry – it isn’t uncommon), I might suggest a college education instead of a general arts degree; the advantage being that a college diploma is immediately applicable to a job in your chosen industry. A general arts degree in history or psychology yields very few job opportunities aside from clerical work unless you plan to follow it up immediately with a college degree.
  2. Always have an exit plan – What will your degree do for you?
    In my experience, the biggest mistake that students make when applying to university is to choose a degree that they aren’t interested in or don’t know anything about, either because it seems like the most interesting option available, or because of pressure from a parent or loved one. Unless you happen to be extremely lucky, this is almost always a mistake.
    Take some time to figure out what is involved in the degree that you’re considering before signing up. Check out the website of your chosen school and read course descriptions for classes at all levels of the program to ensure that you’re interested. Call some local companies that you’d like to work for, and ask them what they’re looking for in a recent graduate – they’ll be happy to tell you what’s important to them.
    If you have no idea what you want to do with your life (again, don’t panic – this is normal), consider using your first year of school to take a number of different courses from a wide range of disciplines, and try to figure out what you might enjoy doing for the rest of your life. This may sound like an expensive experiment, but believe me – one year’s worth of tuition is better spent on finding something that you love to do than on dropping out or switching programs in your third year because the courses got tough and you don’t enjoy it any more. Plus, all of the courses that you take during this time can serve as electives towards your actual degree once you choose it.
    Even though it sounds scary, remember that choosing your degree is really the first big choice of your adult life, and that will affect you for the rest of it. If you need to take some time to figure it out, don’t be ashamed of taking a year off to think it over and research your options. Just make sure that you get a crappy job during that period so that you have some incentive to return to school.
  3. High school did not prepare you for this:
    Remember all of that crap that they told you in high school about adequately preparing you for university? They lied. If you were lucky, you had one teacher who took the time to actually tell you what university is all about. The truth of the matter is that even if (perhaps especially if) you were really smart in high school and got great grades without even trying, you’re nothing when you get to university.
    Remember when you did really good in track and field in grade school, and then went to the regional meet, only to find out that you absolutely sucked compared to the other kids there? Same thing. Just because you were a great student in your small local high school does not mean that you are going to automatically be one in university.
    University is really hard. In my first year, I managed to fail two math courses, and barely scraped by with a D in one of my physics courses. You see, in high school, I got 80s without even trying, and when I got to university, I didn’t really know how to study or budget my time, or apply myself in any meaningful way. But it wasn’t a big deal. I spent a term on academic probation, got it together, and am getting ready to graduate with a B+ average.
    I’m not trying to scare you (well, not really), but I am trying to make you aware. When you get to university, you’ll be surrounded by a bunch of really smart kids, and taught by a bunch of really smart professors who by and large will not take mediocrity lying down. They know who is capable of more, and they’ll make sure that you figure it out in short order.
  4. A minor is good, especially in a technical program:
    The degree that I’m working toward is in Honours Computer Science, which is a pretty great program, and I’m lucky to love what I do. In the last couple of months, I’ve gotten a job with a small local company that finally gives me the opportunity to make some money with all of the knowledge that I’ve gained in the past five years. In addition to computer science, I have been working towards a minor in history, and I consider this to be every bit as important as my primary degree.
    The problem with a lot of technical programs like computer science (at least at Laurier) is that they don’t push important skills like research and essay writing on their students. Throughout my entire program, I only had one computer science professor who forced her students to write papers on a regular basis. As much as writing essays sucks (I’ve come to hate the thought of another evening in the campus library), it’s an incredibly important life skill. It teaches you the basics of finding and vetting information for accuracy and importance, and the skills that are required to be taken seriously in written form.
    I can virtually guarantee that your future job will require you to write something, be it a report or a recommendation, a letter to a client, or a business plan to pitch to a bank -  you need to know how to research, write, and edit your own work so that you can impress people when your winning personality isn’t in the room. Want to stand out from the pack when you start to look for jobs? Get yourself some skills that the other candidates don’t have. If you’re going into a technical field, this means that minoring in an arts program is the way to go.
  5. Keep your loans in check:
    For some reason it seems like many of my friends have run up tens of thousands of dollars in personal debt during their university careers. This is no way to start the rest of your life. Granted, I’ve been lucky because my parents saved up a bunch of money and were able to help me out with my books and tuition, but I probably could have made it on my own if I had been forced to.
    Coming out debt-free requires a combination of hard work and sacrifice. I have a friend who was able to fund most of his first couple of years of tuition solely on bursaries and scholarships. It took him most of his grade 12 year to research the available options and to apply for them all, but the end result was a significant amount of money in his pocket that he would have had to otherwise borrow.
    Too many kids don’t work during school. Sure, it was stressful, but even though my tuition was paid for, I worked twenty hours a week at a part time job in order to take care of my living expenses. Working as a waiter, I pulled in just under $18K a year, which would have easily covered my tuition if I had lived at home. Taking care of these costs yourself teaches you valuable lessons about hard work and budgeting, and sets you up to enter the next part of your life without a huge debt (that all of the sudden has a hefty interest rate) hanging over your head. OSAP is great if you have nowhere else to turn, but remember that it’s designed for kids who actually don’t have anywhere else to get their money from. If you can get out of school without a hefty debt, do so at all costs.
    If you’re a parent reading this, start saving up some money for your kids’ educations now. The reality of university is that tuition and books will run you close to $7000 a year before living expenses. Even if you can only manage a little bit of money, it’s better than nothing, and is the most important gift that you can give to your child.
  6. Friends are your most important asset:
    You probably won’t have the good luck to graduate with a core group of friends who are interested in studying the same thing as you and are applying to the same schools that you are. I was exceptionally lucky in this regard, and ended up going to school with two of the best friends that a guy could ask for, and living with two more who have become some of the most important people in my life.
    Remember that your friends are your support structure and your home away from home. Your mom won’t be there to hug you when you fail a test or get dumped by the love of your life, but your buddies will be there to take you out for a beer and cheer you up. They’ll also be there to make you some toast and a coffee when you’re too sick to get out of bed the next morning.
    If you’re leaving home for school, making some good friends early on in your university career is especially important. You can’t be studious all the time, and everybody needs to go out and let off some steam now and again. Get yourself some good pals that can be counted on to support you when times are tough, and who will go out and get crazy with you when they aren’t.
  7. Grades aren’t all that matters:
    After years of dragging yourself to early morning classes and pulling all-nighters in the library working on that paper that’s due tomorrow at 8am, you’ll be ready to go looking for a job that lets you move out of the stinking hovel that is student housing and prioritize both beer and food on each week’s budget. At that point, you may find out the hard way that a lot of companies out there are looking for something more than just good grades.
    I hate to be the one to break it to you, but the people who will be interviewing you for that great job with a company car and an office with a door on it are probably interviewing about 100 other people for the same position. You need to be able to win them over without being in the same room, and this requires you to stand out from the crowd of other applicants who probably got the same education and the same grades from the same school that you did.
    The best way to circumvent this problem is to take up some extracurricular activities that will help to make your resume jump off of the paper that it’s printed on. In your struggle to complete the requirements of your degree, remember to take some time for electives that you actually enjoy, and to complete at least one major project on your own time that you aren’t required to do in order to pass a class (Check out this post for a great discussion of this).
    In computer science? Write some kick-ass software and grow a user base that you can boast about. Studying political science? Maintain a blog that puts your personal spin on what your government is up to, and get yourself some loyal readers. Love music? Start a rock band, play some gigs, and maybe record an album that you can be proud of later on. If your school offers a co-op program, jump in with both feet and work for some impressive companies. The idea here is to show potential employers that you had a life outside of school and that you aren’t just another cookie-cutter graduate with no individual aspirations or point of view.

So there you have it, the seven things that I think that all kids considering a university career ought to know before getting started. Feel free to drop me a line in the comments if you think otherwise, or have something to add to this list.

Cheers,

Jon

Charles Darwin: Thoughts on Marriage

February 27th, 2010 by Jon No comments »

Recently, while studying the notes of Charles Darwin for an essay that I am working on, I came across this excellent argument that he waged with himself over the merits of marriage. To read the notes of so great a scientist making a list of the pros and cons of something so personal as marriage is a revealing insight into his most private thoughts. I particularly enjoy the conclusion: “Never mind my boy— Cheer up… There is many a happy slave.”

The argument against marriage:

Freedom to go where one liked— choice of Society & little of it. — Conversation of clever men at clubs— Not forced to visit relatives, & to bend in every trifle.— to have the expense & anxiety of children—perhaps quarelling— Loss of time. — cannot read in the Evenings— fatness & idleness— Anxiety & responsibility— less money for books &c— if many children forced to gain one’s bread.— (But then it is very bad for ones health to work too much) Perhaps my wife wont like London; then the sentence is banishment & degradation into indolent, idle fool—

And for:

Children—(if it Please God) — Constant companion, (& friend in old age) who will feel interested in one,—object to be beloved & played with.— —better than a dog anyhow.— Home, & someone to take care of house— Charms of music & female chit-chat.— These things good for one’s health.— but terrible loss of time. — My God, it is intolerable to think of spending ones whole life, like a neuter bee, working, working, & nothing after all.— No, no won’t do.— Imagine living all one’s day solitarily in smoky dirty London House.— Only picture to yourself a nice soft wife on a sofa with good fire, & books & music perhaps— Compare this vision with the dingy reality of Grt. Marlbro’ St.

Marry—Mary—Marry  Q.E.D.

But if so, then when?

The Governor says soon for otherwise bad if one has children— one’s character is more flexible—one’s feelings more lively & if one does not marry soon, one misses so much good pure happiness.—

But then if I married tomorrow: there would be an infinity of trouble & expense in getting & furnishing a house,—fighting about no Society—morning calls—awkwardness—loss of time every day. (without one’s wife was an angel, & made one keep industrious). Then how should I manage all my business if I were obliged to go every day walking with my wife.— Eheu!! I never should know French,—or see the Continent—or go to America, or go up in a Balloon, or take solitary trip in Wales—poor slave.—you will be worse than a negro— And then horrid poverty, (without one’s wife was better than an angel & had money)— Never mind my boy— Cheer up— One cannot live this solitary life, with groggy old age, friendless & cold, & childless staring one in ones face, already beginning to wrinkle.— Never mind, trust to chance—keep a sharp look out— There is many a happy slave.

Text copied from The Darwin Project

Videos that You Should Watch (So that I Can Justify Procrastinating)

February 16th, 2010 by Jon 1 comment »

I have never understood how some students can justify going away for reading week, while I inevitably spend the week in the library, writing papers and studying for the next big test. But then I figured it out – if I simply took all of the time that I spend procrastinating throughout the school year and compressed it into a single week, I would have all the time in the world. Alternatively, I could have majored in communication studies.

Since this is my last reading week ever it’s a little bit late to try either of those approaches, and so I stuck with the tried and true, and spent an evening surfing the ‘net instead of doing my school work. Luckily, while squandering my precious time, I found a few excellent TED talks that I think that everybody should take the time to watch.

The first is by American author Michael Pollan, the guy who brought us the Omnivore’s Dilemma, a great book that discussed the many problems inherent in the way that we eat, as well as a few strategies for getting back to the basics and disarming the epidemics of obesity and diabetes that will become a major concern within my lifetime. He also had a big role in Robert Kenner’s Food Inc., an eye-opening documentary about the current state of the industrial agricultural system in America, Canada, and most of the western world. Together, these two works have really changed the way that I look at my food, and have influenced many of the decisions that I’ve made to try and change my diet, and to spread this message to the people that I care about most.

This talk in particular is a thought exercise that challenges the viewer to take another look at our place in nature, and to use that new view to reevaluate the decisions that we make when choosing what we eat:

For those interested in more of what Pollan has to say, Democracy Now! recently did an excellent interview with him that runs about 40 minutes, but is worth every second of that time. It is available as free streaming video on their website.

The second talk that I’d like to share comes from England by way of Chef Jamie Oliver, who most people have heard of, especially if they’re of the female persuasion. He is on a serious mission to change the world through a better understanding of food. It is his dream to see a reality in which every kid is taught what they need to know about food and is armed with the education required to make healthy life choices about what we put into our bodies. And they really are life choices – the vast majority of deaths in the western world are caused by entirely preventable diseases related directly to diet and lifestyle decisions that we make every day. This talk won him an award at the most recent TED sessions, and is generating a lot of buzz right now:

Finally, I found an older talk by teacher turned slam poet Taylor Mali entitled What Teachers Make. This is an interesting attack at the old adage that “Those who can’t do teach,” that eloquently explains in only three minutes exactly why our teachers deserve more respect than they get in everyday society:

Who ever thought that not doing anything of value could be so educational?

Charlie Brooker: How to Report the News

February 4th, 2010 by Jon No comments »

That about sums it up.

Canada Cripples Copenhagen

January 31st, 2010 by Jon 2 comments »

Our spineless excuse for a government has publicly presented the results of the Copenhagen Accord on Climate Change negotiations. Once again, our Conservative government lead by the Right Honourable Stephen Harper has proven that it just doesn’t give a shit.

According to the Globe and Mail, Canada has officially agreed to reduce it’s carbon emissions by 17% from 2005 levels over the next 10 years. Unfortunately, our government still hasn’t managed to meet their 2006 goal of reducing our emissions to 3% lower than 1990 levels.

Dave Martin, a spokesman with the Greenpeace foundation has pointed out that this new target will actually increase our emissions levels by 2.5% over the levels that the Conservative government’s as of yet unaccomplished 2006 goal would have yielded.

We’re heading in exactly the opposite direction that we need to head,” Mr. Martin said. “Not only have they reneged on the target that they adopted a couple of years ago, they have also failed to put in place the regulations that they promised last year – Dave Martin, Greanpeace

While the shockingly nonsensical stance that Greenpeace takes on nuclear technology gives me very little reason to trust anything that the group publishes, Mr. Martin has written some excellent pieces covering the Harper government’s lack of commitment to the Copenhagen process.

But perhaps more worrying than the alleged role that the United State’s own climate policy has played in crafting our targets is the lack of hindsight in the following statement from Conservative Environment Minister Jim Prentice:

Mr. Prentice pointed out the major emitters such as China, Brazil, India and the United States didn’t have obligations to cut emissions under the Kyoto accord. He hopes this time it’s different, and that there will soon be news of emission cuts from countries that haven’t yet announced their own targets. – Bill Graveland, The Globe and Mail

Jim – I hate to have to be the one to break it to you, but your government didn’t cut emissions either. In fact, during the last election, it crippled the Liberal Party’s attempt to put a real plan for cutting our emissions in place. Way to set an example, buddy.

What I Learned at #EpCon

January 19th, 2010 by Jon 2 comments »

I spent the past weekend at EpCon, a tech conference for college and university students throughout South-Western Ontario that focused on technology, the Internet, entrepreneurship, and networking. Held at the Waterloo Inn, this inaugural year featured keynote speeches from Mike Lee of Rogers Ventures and Steven Woods of Google Waterloo, among others. I saw a lot of cool things, heard a lot of great ideas, and came away with a better understanding of what the tech industry in Ontario has to offer the rest of the world.

Below are a few of the lessons that I picked up during my stay:

Cloud Computing is about…

  • Hype: The core content of 90% of all marketing literature about the cloud is fluff. As a concept, cloud computing is poorly defined; what we have managed to decide on is that the cloud is about only paying for what you use, purchasing services over products, and being able to quickly and intelligently provision new ‘hardware’ via virtualization
  • Low Prices: This is possible because of the ever dropping cost of commodity hardware. Servers are so powerful that they spend most of their time idling. We might as well use those extra cycles to virtualize more machines that can be used by more people
  • Data: Business models based on the cloud have an incentive to make it easy for you to put your data into their service, but hard/unattractive for you to pick up and leave
  • Parallelism: for Great for anything that can be split into chunks and distributed, but not so good for serial  tasks
  • Security Risks: There is a lot of talk, but the reality is a question of whether you want your private records stored on somebody else’s servers. Remember – they have no incentive to keep your privacy, just incentive to make sure that news of a breach doesn’t leak
  • Perception: The Blackberry is one of the most secure devices available, but Obama’s was considered a security risk. Perception is key.

The Internet has Changed the World:

  • The internet is only 20 years old, but consumes a full 5% of the world’s energy. That’s intense.
  • IP technology has had a fundamental impact on how things work, because it’s a global standard. The cost to do business internationally is the same as the cost to do it locally.
  • Between 1995 and 2008, companies that had virtual monopolies on providing information became obsolete. Everybody went online and traditional news media saw massive declines
  • Consumers now control consumption, and piracy can be seen as a push for increased convenience and choice. The irony of the copyright battles is that consumption of media is increasing! The public simply lacks a channel for content that matches their expectations
  • The Internet has come through three distinct phases:
    • Web 1.0 was the push model, wherein content producers pushed content out to consumers
    • Web 2.0 was the share model, when the lines between consumers and producers were blurred, and people chose what they wanted to see, when they wanted to see it
    • Web 3.0 will be the live model, when people have an expectation to have anything that they want at any time, no matter where they are or what device they are using
  • These days, readers, not editors, determine the content. This has been the revolution of the past four years. The democratization of content.
  • The newspaper provides good content, but only one view of the news. It lacks reader interaction, is expensive to produce and distribute, and is at least one day behind current events
  • Online news sites solve the cost, distribution, and latency issues inherent in the traditional model, but still provide a single view of the news and a one-sided conversation about it
  • Blogs and social media changed everything. They are becoming more respected and have been demonstrated to have real impact. At the same time, twitter has been shown to to influence product buzz and box office performances
  • Social media allows people to participate in the discussion, express their opinions, and to provide context to the news
  • Think of just how amazing the Wikipedia project really is. Instead of a small group of experts writing an encyclopaedia, a huge number of people from a diverse array of fields have come together and pooled their combined knowledge into a free resource that rivals the traditional encyclopaedia for accuracy and usefulness.

Creating a Great Product:

  • User-Centric design is essential. You need to know as much as you can about your users, and always strive to provide interaction, insight, and innovation
  • Your development process should be powered by listening: “You have two ears and one mouth. That ratio is not a coincidence”
  • Demo Driven Development: Use daily demos to create a feedback loop that allows you to constantly refine your ideas
  • Customer’s expectations are moving from dynamic to adaptive experiences: Make it modular, open, and multi-platform so that users can have a personalized experience that they can participate in
  • Porn has created at $50M/year industry by moving from the monthly subscription model to a micro-transaction model that is very lucrative. The glut of free apps available for mobile platforms has created a downward price crush that makes it hard to sell an app for a one-time fee. People don’t feel as bad about lots of small transactions, so it’s easier to hook people on something that starts out free.
  • Create value by solving one problem very well. More features can always be implemented later
  • The idea is not your baby! You will get plenty of criticism, and need to be able to adapt. A flawless execution is better than a killer idea. Apple did not invent the mp3 player, but revolutionized it, and changed the industry forever.
  • Questions to ask yourself about a new idea:
    • What is it?
    • Why does it matter?
    • Why doesn’t it already exist?
    • Why can we do it?
    • How can we do it?
    • Can we make money off of it?
    • How do we get out?
  • Having the insight to figure out what’s coming next on the Internet is a huge advantage that can put you well ahead of your competitors
  • So what is the next big thing? It isn’t about apps or hardware or new technologies or even content; it’s about the experience. Everything else is a tool that is used to deliver that experience

On Entrepreneurial Spirit:

  • It has never been easier to implement an idea, and then to quickly find a market for it. The majority of the risk is market related – development is cheap. The Internet solves the traditional problems of marketing and distribution
  • Always strive to be a part of lose/lose partnerships. When you’re having a bad day, your partner should be too. This creates incentive for them to support and work with you.
  • The best base for a start up is a solution to a problem that you’ve encountered in your daily activities. If you’ve encountered that problem, chances are that somebody else has too, and will pay for a solution.
  • Viral marketing can make you lots of money really fast (if you can pull it off without looking fake), but establishing a loyal fan base will make you more money in the long run
  • It is important to get some traction with your product before looking for investment capital. Build a user base first – the money will follow the buzz. Early money is the enemy of an early exit from a successful company.
  • You have to live and breathe your business like a religion
  • You need the best possible people on your team at all times throughout your career
  • The reality of being an entrepreneur involves an immense amount of work and responsibility. You are accountable to your shareholders, customers, partners, employees, and yourself.
  • Experience is key. You don’t know everything, but can learn some of it as you go. Make mistakes on other peoples money, and bring a true professional in when you’re out of your league. They will recoup your investment 100 times over. Seeing the world and learning from others before jumping in with both feet can be an invaluable experience.
  • Remember who you’re doing it for. You can’t work all the time, because you risk losing your family, even if you were doing it for them in the first place. Be sure to create a solid support structure – some days will suck, and you will need people around you to prop you up.
  • Being an entrepreneur is a never ending passion. At the end of the day, it isn’t about the money or the freedom, it’s about the love
  • Quitters never win, winners never quit, but those who never win and never quit are idiots.

Thoughts about Management:

  • Learn to delegate so that the world doesn’t fall apart if you’re not there. You need partners and staff that can step in to fill gaps where necessary
  • Give people accountability and incentive, and let them make their own mistakes. They will work harder for you if they believe in your goal and see personal gain in doing so. At the same time, letting them know exactly how the company is doing gives them feedback to help them cope with hard times, and links performance with hard work
  • Never forget the value of human interaction
  • The promise of the flying car is fact that somebody out there was dreaming. Inspiration comes from those dreams
  • To become a better company, you must know your competition

7 Things that Google does well:

  • Builds teams like startups do – product teams are always made up of less than 10 people
  • Enables internal founders to create
  • 20% of time spent on R&D spans new ideas. Evolving and prototyping are keys to finding the next big thing
  • Encourages teams to attack hard problems and tackle big ideas
  • Compensation is delivery oriented. Bonuses, grants, and awards encourage risks and pay off with good ideas
  • Flat management structure empowers everyone
  • “Innovation is not an option”

Videos and More:

The conference got coverage on our local CTV news, in the KW Record, and some great interviews with the keynote speakers are available over at TechVibes:

Finally, the slide decks from many of the keynotes and presentations are available online at the EpCon website, and you can catch all the latest on EpCon at their website and on twitter.

School’s out for… No Good Reason Whatsoever

January 14th, 2010 by Jon No comments »

Lately, the big political news in Canada has been Prime Minister Stephen Harper’s third prorogation of parliament in as many years. The opposition parties were quick to accuse him of using the move to delay inquiry into the Afghan detainee abuse scandal, while various Canadian pundits have spent the last week putting in their two cents regarding the issue. Those who read into the situation will find many opinions; very few of them are in favour of the Prime Minister, and many of them call his use of prorogation abusive, using his response to last year’s coalition dispute as evidence. For those who need a refresher, The Globe and Mail’s Rex Murphy paints an excellent picture of the effect of that catastrophe on the make-up of Canadian Parliament in this piece.

Personally, I am of the opinion that the leaders of all four major parties are clowns, and that we ought to consider starting over again. Perhaps if we try really hard, we might be able to elect some people who work for more than just sound bites and care about the future of our country beyond the next four years. Since that’s unlikely to happen, I console myself with the writings of comedian Rick Mercer and musician Matthew Good. Together, they pretty much sum up my thoughts on the matter. It is funny though, that while the Liberal Party’s website sports several videos and press releases commenting on the closure of Parliament, the Conservative Party’s site is just the opposite. There isn’t a comment to be found on the matter. Perhaps it’s better that Harper just keep his mouth shut on the issue. He’s already got everything exactly the way that he wants it.

The Wilfrid Laurier Bookstore

January 7th, 2010 by Jon No comments »

As a student at Wilfrid Laurier University, I spend hundreds of dollars per year on my text books. It should be no surprise to anyone familiar with the student lifestyle that as a group, we students tend to be short of money. The cash that we do have is generally obtained from some combination of scholarship programs, OSAP loans, and minimum-wage part-time jobs.

For some years now, I’ve been saving myself about five hundred dollars per year by purchasing my text books used from sellers on Amazon.ca. This year however, my attempts to save myself some rent money were foiled by the WLU Bookstore, a retail entity that sells text books and school supplies on campus.

For as long as I have been a student at Laurier, the bookstore has been responsible for releasing a list of required text books to students through its website and in-store kiosks about four weeks before the start of each new term. In previous years, this has listing included text title, author, and ISBN number, a kind of global tracking number for all books in circulation.

This combination of information has always given me the tools necessary to shop my book purchases around, while still ensuring that I got the correct editions of my text books, many of which change from year to year. This year however, the bookstore has changed its policy, and displays only the text title and price on student’s book lists, which is not enough information to be sure of an expensive online purchase.

Upon seeing that the ISBN number was lacking from the web front-end, I made a call to the bookstore to see if they would provide me with the necessary numbers over the phone. I spoke to the student manager of the bookstore, who told me in no uncertain terms that the new bookstore policy was to not display the ISBN numbers of texts online, because ’students just take the numbers and buy their books elsewhere.’

Well that couldn’t be right. Wanting more information, I got in touch with a Ms. DaCosta, the head of bookstore operations at Wilfrid Laurier. When asked for the ISBN numbers, she gave me a slew of excuses, including a far fetched tale about their new computer system no longer tracking the number. Seeing as the ISBN number of a book is a unique identifier and also functions as a component of its UPC number, I seriously doubted her story. At the end of an in depth conversation, Ms. DaCosta suggested that I either come down to the bookstore and look up the ISBN numbers myself, or that I purchase the books online, get the numbers from the receipt, and then return the purchased books on the first day of classes.

Now let me take a moment to clarify something. As a consumer, I do not for one moment deny the retail bookstore its right to withhold information about its products from customers. However, since the bookstore is the only official source for the book list, and every student needs access to that list, I would like to see enough useful information on that list for students to be able to purchase their books wherever they see fit. If that means that the Bookstore does not get enough business from the students, they should respond by becoming more competitive in the marketplace, not by withholding necessary information from those students. I already pay thousands of dollars per year in tuition for the privilege of attending university. I should be free to purchase my books wherever it makes economic sense for me to do so.

Not satisfied with the excuses that I got from Ms. DaCosta, I contacted the purchaser for the bookstore, a Mr. Wayne Steffler and asked for some answers regarding the new policy. As his subordinate had, he gave me a slew of excuses for the new policy, and suggested that I wait until the first day of classes, when I would receive course outlines from all of my professors, which he assured me would contain ISBN numbers. On the first day of classes, it was no surprise to me that not one of my course outlines contained the information that I had requested.

In the end, I gave in and purchased all of my books at the WLU bookstore, simply because I ran out of time to fight for answers and needed to start reading for my classes. And so I have started the last term of my five excellent years at Wilfrid Laurier with a bullying from the school that has given me so much.

It turns out that the lowly student manager that I first spoke to on the phone might have been right. The bookstore seems to have changed their policy simply to force students to purchase books from them. As a retail outlet, they are entitled to protect their consumer base as much as possible, but as a university sponsored entity, and as the only official source for the book list, I think that they have gone too far. Nowhere in my agreement with the University is it stated that I must purchase my books through them at market or higher prices, especially when I could purchase them used for half the price and save myself the equivalent of a month’s worth of rent money. Unfortunately, without an ISBN number, I have no way to ensure that the text books that I purchase online will be the ones that I am required to have, and by the time that they show up at my door, it will be too late to do anything about the problem.

Edit: An excerpt of this post was published in the January 13, 2010 issue of the Wilfrid Laurier Cord student newspaper.

Filling a Zune from Linux

January 1st, 2010 by Jon 1 comment »

Thinking that I was up for a challenge, I decided to spend the day figuring out how to put the music in my Banshee library onto a Microsoft Zune. Since my library contains a good number of FLAC files that I’ve ripped in from my CD collection, my solution called for a caching system that converts the FLAC files to mp3s and stores them so that the playlist can be changed without having to re-convert the FLAC files into something that the Zune can play on every sync. My weapons of choice for the project were a Windows XP instance running inside of Sun Virtual Box, and 126 lines of perl script.

The Steps:

  1. Create a WinXP VM that has the Zune software installed and can see two shared folders on my Linux machine:
    1. My normal Music folder, which contain my entire collection
    2. The cache folders, which contain all of the FLAC files in my collection, but converted to mp3 so that the Zune can play them
  2. Open the Banshee database, located at ~/.config/banshee-1/banshee.db
  3. Select all of the FLAC files in the playlist that we’d like to put on the Zune
  4. For each, check if it has been converted and cached
    1. If so, simply add the path to the cached copy of the track to an m3u file in the cache folder
    2. If not, convert the track, and then add the path to the cached copy of the track to an m3u file in the cache folder
  5. Select all of the mp3 files in the playlist that we’d like to put on the Zune
  6. Put those in a separate m3u file that is located in the Music folder.
  7. Boot up the Zune software on the VM. It should autoscan it’s monitored folders, find the m3u playlists, and put them in its library
  8. Sync the playlists with the Zune by dragging and dropping them to the device icon in the lower left corner of the screen

As previously mentioned, steps 2 through 6 were accomplished by way of a perl script that I can run as often as I like:

#/usr/local/bin/perl

#Requirements: libdbd-sqlite3-perl, flac, lame

#We need database support
use DBI;

#Database path – change this to reflect your user environment
my $dbpath = “dbi:SQLite:dbname=/home/jon/.config/banshee-1/banshee.db”;

#Playlist name – change this to reflect the playlist that you want to export
my $plistname = “Favorites”;

#Cache Path – the path to the directory where you’ve been caching converted FLAC files
my $cachepath = “/home/jon/Storage/mp3Cache/”;

#Music Path – the path to the folder where your music collection is actually stored
my $musicpath = “/home/jon/Music/”;

#Connect to the database – no username/password
my $dbh = DBI->connect($dbpath,”",”",{RaiseError => 1, AutoCommit => 0});

if(!$dbh) {
print “Could not connect to database $dbpath”,”\n”,”Exiting”;
exit;
}

#Pull the list of FLAC files for conversion and caching
my $flac = $dbh->selectall_arrayref(“SELECT sme.TrackID, ct.Title, car.Name AS ‘Artist’, ca.Title AS ‘Album’, ct.Uri, ct.Duration AS ‘Length’ FROM corealbums AS ca, coreartists AS car, coresmartplaylistentries AS sme INNER JOIN coretracks AS ct ON sme.TrackID = ct.TrackID WHERE sme.SmartPlaylistID = (SELECT `SmartPlaylistID` FROM `coresmartplaylists` WHERE `Name` = ‘$plistname’) AND ca.AlbumID = ct.AlbumID AND car.ArtistID = ct.ArtistID AND ct.MimeType LIKE ‘%flac’”);

#open the m3u file to write the cached items to
open my $m3u, ‘>’, $cachepath.$plistname.’_cached.m3u’ or die “Error trying to open cache m3u playlist for overwrite. Do you have write permissions in $cachepath ?”;
print $m3u “#EXTM3U\r\n\r\n”;    #note windows \r\n here

#add /music to $cachepath so that files are in a subdirectory, away from the m3u file
$cachepath = $cachepath.”music/”;
if( ! -e $cachepath ) {
`mkdir “$cachepath”`;
}

#loop through the files and check if they need to be cached
foreach my $i (@$flac) {
my ($trackid, $title, $artist, $album, $uri, $length) = @$i;

#correct the uri by removing the file:// prefix and reverting the uri escaping
$uri = substr $uri, 7;
$uri =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;

#fix time into seconds
$length = int($length/1000);

#check if the flac file has already been converted and cached at cachepath
#if not, convert it and put it at cachepath.
my $path = $cachepath . $artist . ‘/’ . $album . ‘/’ . $title . ‘.mp3′;
if( ! -e $path ) {
#file dne, convert it
print “\nTrack: $title by $artist has not yet been cached, converting…”,”\n”;

#make sure that the file actually exists before attempting to convert it
if( ! -e $uri ) {
print “WARNING: Track $title by $artist does not exist at $uri”,”\n”;
} else {

#ensure that cache album/artist directories exist
my $partpath = $cachepath.$artist;
if( ! -d $partpath ) {
`mkdir “$partpath”`;
}
$partpath = $partpath.’/’.$album;
if( ! -d $partpath ) {
`mkdir “$partpath”`;l
}

#do the conversion – we’re chaining flac and lame here, reading in the flac file from $uri, and putting the resulting mp3 at $path
`flac -cd “$uri” | lame -h – “$path”`;
}
}

#add the track to the m3u file – note that these entries are relative to the location of the m3u file in the root of $cachepath
#the paths use a backslash and a \r\n newline so that they work correctly on windows
print $m3u “#EXTINF:$length,$artist – $title\r\n”;
print $m3u ‘\\music\\’.$artist.’\\’.$album.’\\’.$title.’.mp3′,”\r\n\r\n”;
}

#close the m3u file in the cachepath directory
close $m3u;

#TODO: scan the m3u file and delete any files that aren’t in it from the cache directory

#Pull the list of MP3 files and dump them into an m3u file
my $flac = $dbh->selectall_arrayref(“SELECT sme.TrackID, ct.Title, car.Name AS ‘Artist’, ca.Title AS ‘Album’, ct.Uri, ct.Duration AS ‘Length’ FROM corealbums AS ca, coreartists AS car, coresmartplaylistentries AS sme INNER JOIN coretracks AS ct ON sme.TrackID = ct.TrackID WHERE sme.SmartPlaylistID = (SELECT `SmartPlaylistID` FROM `coresmartplaylists` WHERE `Name` = ‘$plistname’) AND ca.AlbumID = ct.AlbumID AND car.ArtistID = ct.ArtistID AND ct.MimeType LIKE ‘%mp3′”);

#open the m3u file to write the cached items to
open my $m3u, ‘>’, $musicpath.$plistname.’.m3u’ or die “Error trying to open music folder m3u playlist for overwrite. Do you have write permissions in $musicpath ?”;
print $m3u “#EXTM3U\r\n\r\n”;    #note windows \r\n here

#loop through the files and check if they need to be cached
foreach my $i (@$flac) {
my ($trackid, $title, $artist, $album, $uri, $length) = @$i;

#correct the uri to become a windows file path
$uri = substr $uri, 7;            #remove file:// prefix
$uri =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;    #correct uri encoding
$uri =~ s/$musicpath//g;            #remove musicpath prefix
$uri =~ s/\//\\/g;                #change forward slashes to backslashes
$uri = ‘\\’.$uri;                #add the leading backslash

#fix time into seconds
$length = int($length/1000);

#add the track to the m3u file – note that these entries are relative to the location of the m3u file in the root of $cachepath
#the paths use a backslash and a \r\n newline so that they work correctly on windows
print $m3u “#EXTINF:$length,$artist – $title\r\n”;
print $m3u $uri,”\r\n\r\n”;
}

#close the m3u file and the database connection
close $m3u;
$dbh->disconnect;

Sorry for the horrible formatting.

The only snag that I hit during the entire process was really my fault – I have a tendency to overcomplicate things, and did so on this project by initially writing the script to output a *.zpl file instead of a *.m3u file. That didn’t work at all, and I ended up simplifying the script greatly by just outputting an *.m3u file and hoping for the best.

On the off chance that the Zune jukebox software refuses to properly update its playlists after you change the *.m3u files, first try deleting them from the application, and then restarting it. If that doesn’t work, you can write a Windows batch script with code similar to the following:

del /q “C:\Documents and Settings\Jonathan\My Documents\My Music\Zune\Playlists\*”
xcopy “\\Vboxsvr\mp3cache\Favorites_cached.m3u” “C:\Documents and Settings\Jonathan\My Documents\My Music\Zune\Playlists”
xcopy “\\Vboxsvr\music\Favorites.m3u” “C:\Documents and Settings\Jonathan\My Documents\My Music\Zune\Playlists”

This script deletes all files from the Zune playlists directory, and then copies each of the *.m3u files that we created with the above perl script directly into the Zune playlists directory. This should force the application to get it’s act together.

Overall, I’m happy with this patchwork job. It allows me to use the Zune on Linux, which is great because the Zune really is a beautiful piece of hardware. Now if only the libmtp guys could get it working natively, without a WinXP VM…

This piece originally appeared at The Linux Experiment

Setting up an LVM for Storage

January 1st, 2010 by Jon No comments »

Recently, I installed Kubuntu on my PC. Under Windows, I had used RAID1 array to create a storage volume out of two extra 500GB hard drives that I have in my system. Under Linux, I’ve decided to try creating a 1TB LVM out of the drives instead. This should be visible as a single drive, and allow me to store non-essential media files and home partition backups on a separate physical drive, the better to recover from catastrophic failures with. The only problem with this plan: documentation detailing the process of creating an LVM is sparse at best.

The Drive Situation
My machine contains the following drives, which are visible in the /dev directory:

  • sdc: root drive that contains three partitions; 1, 2, and 5, which are my boot, root, and swap partitions respectively
  • sda: 500GB SATA candidate drive that I’d like to add to the LVM
  • sdb: 500GB SATA candidate drive that I’d like to add to the LVM

First Try
Coming from a Windows background, I began by searching out a graphical tool for the job. I found one in my repositories called system-config-lvm 1.1.4.

The graphical tool that I found to create LVMs

I followed the buttons in this tool and created a 1TB LVM spanning sda and sdb, then formatted it with ext3. The result of these steps was an uninitialised LVM that refused to mount at boot. In response, I wrote the following script to activate, mount, and assign permissions to the drive at boot:

#!/bin/bash
sudo whoami
sudo lvchange -a y /dev/Storage/Storage
sudo mount /dev/Storage/Storage /home/jon/Storage
sudo chown jon /home/jon/Storage
sudo chmod 777 /home/jon/Storage

It worked about 50% of the time. Frustrated, I headed over to the #kubuntu IRC channel to find a better solution.

Second Try
On the #kubuntu channel, I got help from a fellow who walked me through the correct creation process from the command line. The steps are as follows:

  1. Create identical partitions on sda and sdb:
    1. sudo fdisk /dev/sda
    2. n to create a new partition on the disk
    3. p to make this the primary partition
    4. 1 to give the partition the number 1 as an identifier. It will then appear as sda1 under /dev
    5. Assign first and last cylinders – I simply used the default values for these options, as I want the partition to span the entire drive
    6. t toggle the type of partition to create
    7. 8e is the hex code for a Linux LVM
    8. w to write your changes to the disk. This will (obviously) overwrite any data on the disk
    9. Repeat steps 1 through 8 for /dev/sdb
    10. Both disks now have partition tables that span their entirety, but neither has been formatted (that step comes later).
  2. Make the partitions available to the LVM:
    1. sudo pvcreate /dev/sda1
    2. sudo pvcreate /dev/sdb1
    3. Notice that the two previous steps addressed the partitions sda1 and sdb1 that we created earlier
  3. Create the Volume Group that will contain our disks:
    1. sudo vgcreate storage /dev/sda1 /dev/sdb1 will create the volume group that spans the two partitions sda1 and sdb1
    2. sudo vgdisplay /dev/storage queries the newly created volume group. In particular, we want the VG Size property. In my case, it is 931.52 GB
  4. Create a Logical Volume from the Volume Group:
    1. sudo lvcreate -L $size(M or G) -n $name $path where $size is the value of the VG Size property from above (G for gigabytes, M for megabytes), $name is the name you’d like to give the new Logical Volume, and $path is the path to the Volume Group that we made in the previous step. My finished command looked like sudo lvcreate -L 931G -n storage dev/storage
    2. sudo lvdisplay /dev/storage queries our new Logical Volume. Taking a look at the LV Size property shows that the ’storage’ is a 931GB volume.
  5. Put a file system on the Logical Volume ’storage’:
    1. sudo mkfs.ext4 -L $name -j /dev/storage/storage will put an ext4 file system onto the Logical Volume ’storage’ with the label $name. I used the label ’storage’ for mine, just to keep things simple, but you can use whatever you like. Note that this process takes a minute or two, as it has to write all of the inode tables for the new file system. You can use mkfs.ext2 or mkfs.ext3 instead of this command if you want to use a different file system.
  6. Add an fstab entry for ’storage’ so that it gets mounted on boot:
    1. sudo nano /etc/fstab to open the fstab file in nano with root permissions
    2. Add the line /dev/storage/storage    /home/jon/Storage       ext4    defaults        0       0 at the end of the file, where all of the spaces are tabs. This will cause the system to mount the Logical Volume ’storage’ to the folder /home/jon/Storage on boot. Check out the wikipedia article on fstab for more information about specific mounting options.
    3. ctrl+x to exit nano
    4. y to write changes to disk
  7. Change the owner of ’storage’ so that you have read/write access to the LVM
    1. sudo chown -R jon:jon /home/jon/Storage will give ownership to the disk mounted at /home/jon/Storage to the user ‘jon’

Time for a Beer
Whew, that was a lot of work! If all went well, we have managed to create a Logical Volume called storage that spans both sda and sdb, and is formatted with the ext4 file system. This volume will be mounted at boot to the folder Storage in my home directory, allowing me to dump non-essential media files like my music collection and system backups to a large disk that is physically separate from my system partitions.

The final step is to reboot the system, navigate to /home/jon/Storage (or wherever you set the boot point for the LVM in step 6), right-click, and hit properties. At the bottom of the properties dialog, beside ‘Device Usage,’ I can see that the folder in question has 869GB free of a total size of 916GB, which means that the system correctly mounted the LVM on boot. Congratulations to me!

Much thanks to the user ikonia on the #kubuntu IRC channel for all the help.

This piece originally appeared at The Linux Experiment