Kenny's Blog

05 Nov 2014

Using Existing Libraries

An interesting thing I often hear from Electrical Engineering students is this phrase:

I like to implement my own code rather than use something pre-made.

This is obviously in the context of programming, but I find it rather interesting that many Electrical Engineering as well as Computer Engineering (CompE) students say this. It’s interesting because if we really think about it, most of the knowledge that Electrical Engineers obtain in classes is actually pre-packaged. The tools that we have today are the result of centuries of work by previous humans; we are all standing, in some way, on the shoulders of the giants before us.

Perhaps it is the ‘do-it-yourself’ sense that most engineers have somewhere buried deep within themselves. I’ve seen that same mentality drive my aunt insane because of the lengths that my uncle (a computer engineer) will take to do something himself instead of hiring someone or buying something. The confidence in knowing that you can create or build something from scratch is very liberating.

But I think for the most part I can understand what those students are thinking. Engineering is a very technical field, and those who are in it take pride in being able to wield this technical information and use it efficiently.

My first somewhat large project in college was building a micromouse. For those of you who aren’t familar with what a micromouse is, here is the summary from Wikipedia:

Micromouse is an event where small robot mice solve a 16x16 maze. It began in late 1970s, although there is some indication of events in 1950. Events are held worldwide, and are most popular in the UK, U.S., Japan, Singapore, India and South Korea.

But our task during this project was to build the mouse from scratch. A kit was given to students containing a few items including:

  1. Wheels
  2. Stepper Motors
  3. Wires
  4. Breadboard
  5. IR Sensors

The more seasoned teams got nothing. But the point is that this project introduces students to a task that doesn’t already have a large framework. Instead of using an Arduino microcontroller, students use a PIC microcontroller and learn the low-level configuration themselves.

Now, I often recommend this project class to as many students as possible, but I do recognize sometimes that the ‘completely from scratch’ methodology doesn’t work for everything.

There are libraries that exist out there - I think engineering students should learn to use these libraries (and modules) to create something faster and better than they could have alone from scratch. There is a balance to be struck somewhere in the middle - at what point does relying too much on external libraries make the student a little too high level?

The best solution for students is to recognize that there are libraries out there, to leverage them when needed and to use them to apply their technical skills to create something new. So for all of the engineering students out there who love to implement your own linked lists; there is someone out there who is using a pre-packaged library to make something bigger. Remember what the tools exist so that you can move forward faster - if you find out that you need to re-write your own implementation of that library for your program to work, sure go ahead and re-write it. But before that, give a library a try first.