Archive for the ‘technology’ Category

San Diego’s 1st SuperHappyDevHouse (SDSHDH1)

Sunday, July 4th, 2010

Update 7/11/2010: Coverage of the event from the Del Mar Times by Steve Perez!

San Diego’s 1st ever SuperHappyDevHouse was a blast and success! Special thanks to Erica and Richard for hosting the hackathon :) We had about 17-18 software + hardware folks (and one reporter! we have no idea how that happened). The venue was perfect, people brought snacks, drinks, lawn chairs, and we ordered pizza. Most of the attendees are not surprisingly, from the San Diego Hacker News meetup.

While the attendance was really great good for the SDSHDH1, I suspect that it would have been as much as 30% higher if the semester was in session as many of those who voiced interest are college students from the nearby UCSD. Below are some pictures and videos from the event. I’m already looking forward to the next one! :) Thanks to all who stopped by—”network effects” is key to having a fun SHDH ;)

SDSHDH1

SDSHDH1

SDSHDH1

What do a philologist and a lollipop have in common?

Wednesday, February 24th, 2010

Question: What do a philologist and a lollipop have in common?

Answer: LOL (if you don’t get it, you will LOL when you see it below)

The generalized problem statement

Given a few strings:

  ewf3hardyharharoiew
  p90weuhardyharhar
  hardyharharoie78wjf
  ahardyharhar787834

Determine the longest substring that they all have in common:

 p90weuhardyharhar
       |||||||||||
      ahardyharhar787834
       |||||||||||
   ewf3hardyharharoiew
       |||||||||||
     d1hardyharharoie78wjf

Which in this example above, is ‘hardyharhar’. The question is, how do you code this?

The solution

Today on Hug-An-Algorithm day, we’re giving the hat-tip to an algorithm called longest common substring (LCS).

The solution can be implemented using a generalized suffix tree, or by dynamic programming
(Wikipedia).

Specifically, I’ll walk you through a Python implementation—but focusing on the approach behind it, so that you can implement this in any language you want. I found a few LCS implementations on Wikibooks.org, which is where I got this simple Python implementation from (and adapted it slightly for this demo).


Technical nitty-gritty details warning! (If you’re interested in how this may be useful to you, skip to real-world applications section after it):

Select full screen + high quality plz:

Code from the video above for plugging into your python interpreter:

def LCS(S, T):
    m = len(S); n = len(T)
    L = [[0] * (n+1) for i in xrange(m+1)]
    LCS_set = set()
    longest = 0
    for i in xrange(m):
        for j in xrange(n):
            if S[i] == T[j]:
                v = L[i][j] + 1
                L[i+1][j+1] = v
                if v > longest:
                    longest = v
                    LCS_set = set()
                if v == longest:
                    LCS_set.add(S[i-v+1:i+1])
    print LCS_set

Real world application

As researchers, we often find ourselves swimming in a sea of seemingly random data, and we’re always looking for ways to make sense of this wealth of data, how we can obtain insights and the act accordingly.

Here’s how I use the LCS algorithm to find patterns in malicious links. Obviously, it can be applied to any kind of data outside the boundaries of security research. Hope you’ll find this tool handy in your problem-solving toolkit!

Security Researcher: Jay Liew

p.s. This blog post is dedicated to the folks in #python on Freenode.

This is a cross-post from my company’s blog.

Personal Robotics

Monday, January 25th, 2010

Wow. First, computers were these gigantic machines that took up all the space in a single room (or more!), made for the government and big corporations. Then prices dropped, technology improved (Moore’s law), and the computer was personalized, and today everybody practically carries one in their pocket.

When I had to first decide what to major in when in college, I did want to major in something to do with robotics. Robotics however, wasn’t exactly a popular or major discipline that was easily available anywhere. Fast forward to today .. we have personalized robots.

Enter the world of Arduino.

Here’s a very basic robot that exhibits basic facial expression, speaks from text, complete with LEDs. This is hilarious. And SOOOOO COOL.

Read more about the Ganzbot here.

Next, we have Arduway, a Segway-like self-balancing robot. It’s like creating a fragile and little life-form from your bare hands.

Read more about the Arduway here.

And alright .. enough of toys. How about a real world application? Here’s a robot that uses GPS and other sensors to steer a 30,000 lbs beast of a machine for a farmer – to harvest soybeans!

Can’t wait for the robotic revolution!

If you are interested in getting started with learning Arduino, here’s a quick link to the books recommended by the official Arduino site.

Getting Started with Arduino (Make: Projects)

Making Things Talk: Practical Methods for Connecting Physical Objects

Morgan Stanley’s Mobile Internet Report Setup – pt. 1

Sunday, December 20th, 2009

The following screenshots are taken from a presentation deck of 92 slides. Some of the details are irrelevant to Web / mobile entrepreneurs & startups (e.g. carrier-side of things), and thus I save you the pain from having to read the whole thing. The Mobile Internet Report Setup is part 1 (of 3) of Morgan Stanley’s annual data dump covering the mobile + web industry.

(Click for larger image)

If you’re an entrepreneur in this space, now is the time to *not* fall asleep.

Morgan Stanley - Mobile Internet Report Setup 2009

Smartphone market share is growing globally.

Morgan Stanley - Mobile Internet Report Setup 2009

It’s the era of co-creation, nobody succeeds at it alone. A thriving 3rd-party application market place is key in a platform-play.

Morgan Stanley - Mobile Internet Report Setup 2009

Counterintuitively, Internet usage on smartphones does not grow linearly to shipments of handsets (it’s much greater).

Morgan Stanley - Mobile Internet Report Setup 2009

The Facebook + Apple combo = poster child for the future of mobile + web apps. Apple focuses on the handset superiority (hardware, app distribution), while Facebook focuses on the application software layer, user experience .. which in this case the mobile app strategically complements it’s core app (the actual Facebook desktop Web site). Facebook focuses on the viral network effects of its app, which itself is also a platform.

Morgan Stanley - Mobile Internet Report Setup 2009

Facebook’s Web platform is also thriving.

Morgan Stanley - Mobile Internet Report Setup 2009

Old news, but voice revenues are dropping and data is becoming more and more valuable for end users, and to carriers (to compensate for voice revenues).

Morgan Stanley - Mobile Internet Report Setup 2009

Smartphones do make a difference in enabling users to really consume the mobile Web and apps. Feature-phones just can’t handle it.

Morgan Stanley - Mobile Internet Report Setup 2009

Yet further proof that in this era, the democratized Internet will prevail. Iron-fisted dictatorships (*cough* Apple *cough*) will not win in the long run (my prediction anyways).

Morgan Stanley - Mobile Internet Report Setup 2009

The rest of the world (ROW)’s mobile market usually lag what we see in Japan by a few years. Japan’s social networking trends shows us that social networking apps are increasingly being accessed from mobile at the expense of desktop.

Morgan Stanley - Mobile Internet Report Setup 2009

8 years. ROW lags Japan by 8 years.

Morgan Stanley - Mobile Internet Report Setup 2009

Stay tuned for my summary of the other two slide decks .. those are some 600+ and 400+ slides long.

Google Goggles (Giggles)

Monday, December 7th, 2009

Google just publicly unveiled this Labs project today called Google Goggles. The project is still in its infancy but you can already see some preliminary results that show what a game changer this application will be (see the video).

Excerpt from the announcement:

A New Era of Computing

Mobile devices straddle the intersection of three significant industry trends: computing (or Moore’s Law), connectivity, and the cloud. Simply put:

  • Phones get more powerful and less expensive all the time
  • They’re connected to the Internet more often, from more places; and
  • They tap into computational power that’s available in datacenters around the world

These “Cs” aren’t new: we’ve discussed them in isolation for over 40 years. But today’s smartphones — for the first time — combine all three into a personal, handheld experience. We’ve only begun to appreciate the impact of these converged devices, but we’re pretty sure about one thing: we’ve moved past the PC-only era, into a world where search is forever changed.