Browse Author: john

Security in Computing (Part 1)

In the 16th century, Mary, Queen of Scots, was plotting against Queen Elizabeth. She was planning to assassinate the queen. Mary communicated with her lackeys through a basic cipher – she simply replaced the letters of the alphabet with new symbols. Using this cipher, Mary communicated her treasonous wishes. Queen Elizabeth’s spymaster, Francis Walsingham, suspected Mary’s treacherous intentions and intercepted some of her messages. To decipher the messages, Francis had to use a technique known as frequency analysis. Basically, alphabetic languages tend to have a certain distribution of letters. For example, here is the frequency table for all of the letters in this paragraph:

This kind of distribution is consistent across the English language.

Using this technique, Francis noticed that one of Mary’s symbols occurred far more often than the others, so he figured that symbol must be representing “e”. Using frequency analysis, Francis was able to decipher Mary’s messages and prove her murderous plans. Mary was sentenced to death because she used a crappy cipher. Luckily, in the 21st century, we have more complex ciphers and forms of encryption. Unfortunately, these security measures aren’t used as often as they should be, and even when they are used, there’s a decent chance they’re not being used properly.

Continue Reading

When to Ask a Question

Nobody is born with wisdom – especially when it comes to computers. It takes experience to build core understanding. Sometimes people try to cheat this process and simply ask for the solution to a problem they encounter. This is okay in some contexts, but for the most part, more can be gained by grinding through the problem yourself.

Now, I’m not trying to say that you should never ask a question. A quick question and answer can help save you from wasting your time, but be careful what usage of your time is classified as “waste”. For this, I’ll pose an example:

You’ve never worked with regular expressions, but want to check an input string for a complex pattern. Your buddy is a regex guru and could whip up an expression in two shakes of a lamb’s tail. Would you…

a) Have your buddy quickly write the expression for you.
b) Ask your buddy to write the expression and explain it to you.
c) Take the time to learn enough about regular expressions to do it yourself.

There’s not a right answer. If you’re running short on time and need the expression to move on with the project, maybe a is the right answer. If you want to get the gist of what this thing you’re adding to your code is, but don’t really want to go in depth, maybe b is the right answer. Finally, if you have the time and want to actually understand what the regular expression is and exactly what it’s doing in your code, maybe c is the right answer.

Continue Reading

Command Line, GUI, What’s the Difference?

The first computer I ever had was some 90’s beige, enormous hand-me-down from my dad. He gave it to me when I was about eight or nine and told me “no online stores, no chat rooms, have fun!” It ran Windows XP and had Internet access, though at this point I had no clue what an operating system or network was. Still, my brothers installed Kazaa for me and I learned how to download music (not understanding the DRM issues)!

One day, my dad decided to show me a “cool” program on XP. He opened cmd and said, “Here. This is DOS. This is what your computer runs on.”

Windows NT systems actually don’t run on DOS, but Dad was keeping it simple!

Continue Reading

Teaching Only One Language in School

Here at San Jose State, all computer science classes are taught using Java (with the exception of inherently low level classes like computer architecture). I get it… when a brand new student that has never written a line of code before enters your classroom, it’s tempting to teach them one language so they gain some degree of comfort. This is fine for an introductory class, but other languages should be introduced and encouraged later in one’s academic career.

I learned to program in C. I’m not one to say a given language is better than another, but I will say that C forces you to understand concepts such as memory addressing and allocation. Additionally, I used a Linux distro and the terminal for compilation and running. This let me understand the exact process of developing a C program since it didn’t abstract anything away.  A solid understanding of these concepts has helped me a lot throughout both my academic and professional careers.

At Portland Community College, I learned object-oriented concepts in C++. Then, once I moved to SJSU, classes were all taught in Java. Instead of seeing it as a hurdle I’d need to jump to be successful here, I saw it as an opportunity.

Once you understand core programming concepts, you should be able to translate them to any language. This is a critical skill that is not being encouraged at “uni-lingual” universities.

Of course each language has their own quirks: C has pointers, Java automatically deallocates your memory, PHP uses associative arrays, Haskell variables are immutable by default, etc, but this should not be that big of an issue! The central concepts are able to translate.


Continue Reading

Tech Interviewing Decoded – A Day at Google

I haven’t been in many technical interviews, so when I got an email from Google asking if I’d like to sign up for a seminar they were hosting about tech interviews, I jumped at the chance!

The email was sent out to all CS and Engineering students at a few different Bay Area schools. Out of all respondents, they chose about 200 students to take part in the seminar. I was lucky enough to be one of them.

On a Friday morning, I drove out to the new Google campus – Tech Corners in Sunnyvale. There was a surprising amount of “Expectant Mother Parking”, but I was able to find a spot. There were six, brand new, shiny buildings on the campus, each with their respective number emblazoned on the side.

I walked to the meeting building where they allowed us all to register and gave us a lanyard with a nifty name tag.

Continue Reading