Sunday, November 24, 2013

Artificial Intelligence: Cars

I’ve driven i-280 far too many times in my days as a commuter.  The beautiful scenery on that 23 mile stretch is no longer interesting to me.  The drive has become a blur.  It’s almost scary, I’ll get to school, or back home, and think, “how did I get here?”  But sometimes something memorable happens (hopefully not an accident).  One of the coolest things I’ve encountered was this white SUV with this funny-looking contraption that spun a camera overhead.  It had “Google self-driving car” on its side.

Whoa... is that legal?  I stuck with it for a bit.  Its speed was perfectly steady, and it stayed exactly in the middle of the lane.  I got the urge to tailgate it or cut it off to see how it’d react (obviously I didn’t do anything of the sort, drive your death-boxes safely, people!).

I spent the rest of the drive pondering: are autonomous cars the future?  Should we really put our lives directly in the hands of computers?

Yes.  And yes.

The idea is scary at first, but when you look at the data, there’s no question that cars controlled by AI is the way to go.  Google’s self-driving cars record how sharply they break and accelerate.  They also keep track of following-distance.  Based on this data, at a robotics conference in Santa Clara (RoboBusiness 2013), Chris Urmson said, “We’re spending less time in near-collision states.  Our car is driving more smoothly and more safely than our trained professional drivers.”  (MIT Technology Review).  This article from the Tampa Bay Times says that one of Google’s cars has already driven 300,000 miles with no incidents.  The Wall Street Journal says, “At this month's Frankfurt auto show, mega-auto supplier Continental announced a partnership with IBM to help bring autonomous vehicles to market, with "zero accidents" as a possible result. Volvo has promised to injury-proof its cars by 2020.”

I’m looking forward to it.

Sunday, November 17, 2013

The History of Computer Science: C

Out of all the CS classes I’ve taken, the one that I’ve learned most about the history of programming from is my class in C.  Unlike Java, the low-level nature of C allows you to understand what’s happening behind the scenes (memory allocation, etc).  Coding in C is a little bit of a blast from the past, where you can just imagine typing away at a tiny, old, green and black screen.  Today, the language is the most widely used in the world, which is amazing since it was developed in 1972 (yes, that’s almost 41 years ago).

Dennis Ritchie developed C as part of Bell Laboratories in New Jersey.  Many of the key principles C were originated from the BCPL, an earlier language by Martin Richards.  C was also heavily influenced by B (by Ken Thomson in 1970), hence the name.  (A Brief History of C)   However, C improved on B by providing data types (where B was a typeless language). (Ritchie, The Development of the C Language)

In 1978, Brian Kernighan joined Ritchie to write a book called “The C Programming Language,” but programmers know it simply as “K&R.”  To this day, it is the unofficial specification of C.  It was my required text for my C class last semester.

C is so popular because it is portable and has simple syntax, but it still gives the user access to low-level information. (The C Programming Language)  This makes it a great teaching tool.  Everyone should learn some C, as most of the languages we use today borrow from it, including C#, Java, JavaScript, Objective-C, Perl, Python, and obviously C++.


C is the most influential programing language ever.  Even with its usage declining, it is likely to be around for a long time, and its descendants will be around forever.

Sunday, November 10, 2013

File Sharing: How to Fight it?

Since file sharing blew up with Napster in ’99, industries who lose sales of copyrighted material have been in a battle with P2P networks, and their users.  Suddenly, stealing an album or a video-game became easy, and guilt-free.  Why would someone buy anything ever again?

There have been lawsuits about the digital theft of copyrighted material, but it is still everywhere.  You hear of people getting sued for everything they have because of the music they downloaded, but these seem rare an far between.  It’s easy to have the “it’ll never happen to ME” attitude.


Well, some media producers have been fighting file-sharing in other ways, besides litigation.  The amount of copyrighted music illegally downloaded has actually been declining since 2012 (NPD Group).  This is because of new services that have adjusted to the the changes in technology.  The biggest example is Spotify.  Spotify changed the way we consume and pay for music.  It works because they’ve made a service that’s actually MORE convenient than stealing.  You just hop on the app, and you can listen to anything you want, instantly.  For free... well, kind-of free.  Occasionally you are forced to listen to ads between songs.  But you can get rid of them for a small monthly fee, that seems reasonable to a lot of people.  And ta-da!  Music can produce revenue again, and the listeners are happy too.

To combat piracy, industries need to step up their game to make services that are more appealing than breaking the law (with seemingly-low consequences).

Saturday, November 2, 2013

Data Structures: Good for more than just Big Data

Trees, B-trees, AVL trees, lists, queues, stacks, heaps, leftists-heaps...  Merge sort, bubble sort, insertion sort, quicksort...  Good times.  Learning all these in my CS 146 class (Data Structures and Algorithms) was the most fun part of my programming career so far.  But when I was finished with the class, I just couldn’t see where I’d actually be using the knowledge in every-day coding.  I mean, of course it would help me decide between using a language’s library version of a linked list, or a hashmap, or a tree in different scenarios.  But we could have learned that in a week or two, without going in depth.  Why learn exactly how quicksort works?

Van Gogh's "Starry Night"
It’s the same reason an aspiring painter studies Van Gogh.  A programmer today will never have to implement the genius structures and algorithms that are out there (...it’s already done).  Understanding how they work, however, helps you become a better thinker.  We analyze the work of the most clever problem-solvers out there in hopes of becoming better solvers ourselves.


If that’s not good enough, there’s more pressing motivation to learn data structures.  Employers want to know that you understand how your tools work.  Interviewees will almost certainly face questions about data structures.  This link has some of the most popular data structure-related interview questions.  Keep sorting!