Sunday, December 15, 2013

Scientific Computing

When I first saw the words “Scientific Computing,” (which was last week, for this blog topic) I thought, “hmm, sounds like a wordy way to say Computer Science”.  Naturally, I google it.  Hmm, not much besides Wikipedia.  I specify, “scientific computing definition.”  Google gives me the ‘web definition’... straight from wikipedia.  After some digging around, I think I understand the term.  Turns out, Scientific Computing (or more commonly, computational science) is not the same as Computer Science.  Computational Science (usually paired with engineering for “CSE”) is a new field that deals with using mathematical models and simulations run by computers to analyze and solve scientific problems (Shodor.org).  Some examples are: 
  • simulating air around a wing to predict which shape will get the most lift
  • performing simulated stress-tests on different “materials” to choose what to make a bicycle frame out of
  • using big data from past weather to create a model to predict future weather
  • simulating blood flow through an aneurysm to quantify how dangerous it will be in the future

Simulated Fluid
I was fortunate to experience the last one in person this summer.  I visited a lab that worked with computational science, and an MRI machine to try to find a better way to deal with aneurysms (an aneurysm is a balloon-like bulge in a blood vessel that can cause a burst and be deadly, especially in the brain).  The head scientist working there showed me how he could use an MRI scan of someone’s brain to create a 3D model of the aneurysm on a computer screen.  He then started a simulation where lines representing blood would rush through.  I could easily observe where stress was on the vessel, and where blood would get collected.  He could simulate years of stress on the the aneurysm in just a few minutes, and assess the severity of the situation.  With computational science, hopefully we can turn something deadly and hard to detect into something that we can find and assess without even a stitch.

Computer Graphics: “How can it get better than THIS?”

Check out this picture from the late 90s.  “Yes, this is an actual PC screenshot.”  This didn’t seem ridiculous when that magazine was published.  “That’s SO real.”  It makes you wonder if we’ll be laughing about the graphics we have now in another 15 years.  “I can’t believe we thought that was good in 2013, HA.”  I certainly hope so.  I always make the joke, “this is higher-res than real life,” or, “the frame-rate's faster than the universe refreshes.”  Well, with some new technology, we’re getting scarily close to being in a second world when we game.

I’m talking about the Oculus Rift.  It’s a virtual-reality headset in development, with over $75 million in funding (digitaltrends).  It has a 7-inch screen that wraps around to provide a field of view more than 90 degrees (basically everything your eye can see).  The screen shows one image for each eye, for stereoscopic 3D.  They don’t completely overlap, however, just like the images our eyes generate in real life.  The outside world is completely blocked out.  

This thing scares me a little, though.  At what point are video games TOO real?  If playing games feels just like real life, except cooler, why would I ever want to not be in the game?  I’m picturing a “Wall-e” type world where we’re all just sitting back with our VR headsets on, with intravenous feeding, blissfully unaware of what’s going on outside.  Still, the new technology is exciting.  I can’t wait to be laughing at what seems amazing right now.

Sunday, December 1, 2013

Communications and Security: What’s Really Important in a Password

Most of us have had an account of ours hijacked.  Maybe it was a friend playing a prank on our facebook page, or maybe it was a malicious hacker using software to crack our online bank account.  We know the importance of a good password.  We know not to make it “qwerty”, or anything on this list.  So how do we make a good password?

Two things: make it hard for a human to guess, and make it hard for a computer to guess.  The first is pretty easy to deal with.  The suggestions we usually hear are: MORE SPECIAL CHARACTERS! MORE RANDOM UPPER CASE! MORE NUMBERS!  That’s great and all, but is it really necessary to make it unguessable by a human (or a computer programmed to check the obvious passwords)?  What are the chances of someone guessing “magentallama”?  Making a password something completely unrelated to your life is just as good as having a bunch of confusing characters (and its less annoying for you!).  

What about the second part of a secure password: making it hard for a computer to guess.  Well, most password cracking software uses brute-force:  “aaaaa”, nope, “aaaab”, nope....  So, yea, maybe some caps and and exclamation point will stall that computer a little.  But what really matters is length.  “af!7#” (5 chars) will be guessed long before “zzzzz” (5 chars) even though we know “zzzzz” seems like a worse password.  Adding 2 characters would make it take 100 times longer; 6 more, a million times longer (actually much more, this would be assuming you only use numbers).  Image a password like, “dogfridgecaropera.”  A program has to go through trillions of combinations before it reaches that.  No caps, no special characters, no numbers, and I seriously doubt any human could ever guess it.  Add in a hyphen, or replace a letter with a number, and even advanced password-guessers that use dictionaries would be stumped for a long time.


The point is, LENGTH is what makes a good password.  So stop with these bogus number, case, and special character requirements, and just up the minimum length of passwords.

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!