Monday, September 23, 2013

Adventure Time in Spring Roo

I've recently picked up Spring Roo and decided to build out a web application using the framework. It is certainly a rapid development framework, up to speed with the other popular framework by Spring, Grails.  What interested me the most with Roo though was the ability to easily plugin Spring-MVC, use multiple datasources for the Model, and to scaffold all the necessary JUnit test cases without me intervening.

In my use case, I wanted to utilize both structured and unstructured data, so I was able to easily define my Entities as belonging to either JPA or Mongo (my personal options).  The only problem with this is that a single Maven module can only be setup with a single datasource using Roo, which can easily be resolved by using modules.

Saturday, March 23, 2013

Making the Password Usable, But Yet Secure

XKCD 936 - Password Strength
One of the interesting parts of information security is that there are two extremes in regards to the spectrum. On one end you have Strong Security, the whole goal of securing data is making it as secure as possible: Crytography, Passwords, 2-Factor Authentication, Configuration, etc. At the complete other side of the spectrum is Strong Usability, we need to do our jobs after all and the more usable it is, the faster we can do it.

These two ends of the spectrum are directly disproportional to one another. It is very easy to have too much security, making the usability mind-numbing: carrying around hard-tokens with pin codes, 16 character passwords with 30 day expirations, 10 minute timeouts, and network policies where everything needs approval. But if you relax all of the policies to make them more usable, suddenly you are vulnerable to all of the threats involved with information security: hash rainbow tables, brute force attacks, denial of service (DOS) attacks, social engineering, etc.

Monday, January 21, 2013

A Game Called Ingress



A game has silently gripped the Android community for the past few months. A game that has people all over the entire planet tripping over shrubs and curbs as they stare at their android devices bee-lining and sometimes running around. That game I am referring to is called "Ingress", a currently in-beta android app by the smart people at Google. The game thus far has been invite only, turning people into angry chicks chirping for food, well an invite in this case. Everyone wants in on the magic, but the community thus far has been very closed with only a trickle of newbies enrolling each day.

Monday, December 31, 2012

Random Thoughts on Recent Products

Something got me thinking about products recently and how they have changed the world.  It's quite sad when you think of how much we as a society have changed in just the last 10 years with all our modern technology that feels so different than what we used to use.  The reason it's sad is because what really has changed about us?  I still see the same lifestyle before as after.  Nothing has really gripped us in a way that changed everything; the most grandiose and recent I can think of is the Internet itself.  Recent products come down to fads or stupid ways to do something slightly simpler or faster than before, but nothing that has really changed the world.  There is always a bottom line, so perhaps that has something to do with it; a quick way to make a buck and move on.

Thursday, July 5, 2012

My First Year at WWDC - A Recap




Once every summer, Moscone West in San Francisco becomes the Apple Mecca for a week as people from all over the world attend the Apple World Wide Developer Conference (WWDC). For WWDC 2012, I managed to obtain one of the only 5000 available tickets; this is an unthinkable feat once you realize the event sold out in only two hours. Suddenly it was time to depart to SFO, and for a week I was in tech heaven. As Silicon Valley becomes more and more cramped, the overflow of tech companies and startups like Atlassian, Square, and Google began pouring into the city. The result is San Francisco has become young and techy; driving down the highway I saw billboards that proclaimed “Your CMS is in the cloud, why not your phones?” something that maybe 5% of Americans actually understand.

Wednesday, May 16, 2012

The Future of Form Factor


Form factor nowadays seems to be going wild.  Ever since the mobile revolution started, manufacturers have been trying out every form factor and seeing what sticks with consumers.  A few interesting results of this are attempts to combine devices, like turning a tablet into a netbook or a phone docking into a laptop.  One of the things about the future of mobility is that it is highly unpredictable.


To add an example of this, a very unknown fact about Apple is that they actually started working on the iPad years before the iPhone.  It suddenly hit Steve one day that the application of a mobile OS X was perfect for a phone, so he ordered the iPad project shelved and made iPhone the top priority.  Nowadays, the future of Apple products looks like they are moving away from the operating system and more into mobility.  Predictions say that OS X will begin functioning more and more like the iPad, and a lot of the features in OS X Lion and Mountain Lion are starting to show this foundation.

I want to take some time to lay out some ideas about the future of mobility and where I think it is heading.  Form factor plays a huge part in this as people become more and more disconnected from the desktop and live more and more in a cellular world.

Sunday, April 22, 2012

Good Design + Fragility = ?


As an enterprise app developer on the Apple iOS platform, I am in a role where I have to be an evangelist of everything Apple.  In general, the mobility revolution is something I am very eager and enthusiastic about, but there is one thing that suddenly bothered me recently.

I would define a mobile device as technology or computing that is wireless, lightweight, and useful for  in-the-field scenarios.  Something that I never really considered before, was durability.

Saturday, April 7, 2012

Store Concept: Acting Like an Online Store

tortilla chips
Something crossed my mind the other day when I was in a grocery store and was looking for a specific brand of tortilla chips. When I arrived in the chip section, I saw the no salt, garlic, and other weird varieties instead of my coveted plain-jane sea salt crisps. Then I remembered that the hispanic section also had my tortilla chips, so I walked over and found only two left, awesome!

This reminded me of the days of working at Wal-mart when I was a student, people would always ask me "Well do you have any in the back?". The infrastructure allowed me to scan the barcode on the shelf to get an inventory of the product in which I could say, oh I see there are two left, but I have no clue where those two are. Maybe someone shoplifted them? Maybe they are sitting in a pile of basketballs? Or maybe they are sitting in a box exactly where they should be? ...I always went in the back for a couple minutes and returned without an answer.

A store has a general idea of how much inventory they have, but everything is quite unaccounted for. Add in the fact that customers move things to the wrong sections, shoplift, drop/damage goods, all before they pay for the item and that kind of messes up the whole idea of keeping things smooth.

But then there is the internet, a place where you shop around one item at a time, add things to an e-cart, pay for everything up front, and then get it at a later date. Why can't physical stores act like electronic ones?

Saturday, February 11, 2012

Simplistic

I am a fan of simplicity, but when it comes to clocks I usually like to see all the inner-working guts ticking away.  Something about the amount of work and parts that go into making something so precise is just amazing; same with a vehicle or even a space shuttle.

But when I saw the following clock, I just thought it was a stroke of pure genius!


And then after that, I thought how easy would this be with a little bit of code!

Saturday, February 4, 2012

Keeping Google App Engine (GAE) instances alive

So you finally finished an application and decide to deploy to Google's App Engine service, only to find out..... it's slow! After so many seconds, the JVM application instance gets shut down and takes a whopping 10 seconds to start back up. Of course, google wants you to pay for an always-on instance, but there are a few tricks to managing how you can keep an instance alive.

Tuesday, October 18, 2011

Battling Maven and GWT

 I recently decided to tackle what I came to find out was a huge problem amongst java developers who wanted to work in Google Web Toolkit, but integrated with maven to manage project structure, dependency management, and a great command line utility.  Apparently the community for mavenizing GWT applications is very broken and there has not been a very clear way to work around the problem.  

After experimenting a bit with eclipse and generating various pom archetypes, I found out the process is difficult and usually results in numerous errors in eclipse that can somehow still run through the command line.  I almost gave up, when I found some interesting info posted by google on Sep 22, 2011:

The easiest way to get a GWT POM going is to snag one from of the GWT Maven sample projects. There are currently issues with the gwt-maven-plugin archetypes, so a good starter POM is the best way to go until those issues are resolved.

Saturday, September 17, 2011

Converting Street Addresses into Latitude and Longitude Using Google

I have recently been working on a mobile application and came across an interesting problem. In my app, I am using Google's MapKit to display cities on a map, just there is a problem with the way the MapKit works. Unlike Google Maps where you can simply look up an address and have the map refocus on the area, the MapKit does not have the functionality to search for an address. Instead, a map needs its frame to be centered on a specific geographical latitude and longitude coordinate, along with other parameters for determining the width and height of the area to display.

The data that I'm using only contains cities and their respective states or countries, so I needed to find a way to display these areas in my map view. Luckily, Google seems to have already thought up an easy solution and provides a Geocoding Request server.

The idea is simple, just push a request to the server with your parameters in the url and the server utilizes the advanced algorithm behind Google Maps to respond with detailed information about the address. Better yet, you get to choose if you want the response to be in XML or JSON format!

So here is the url to use:

http://maps.google.com/maps/api/geocode/output?address=&sensor=

You simply plug in the type of format (xml OR json) you would like in the output field, append your address after the address= field (don't forget to use a + symbol for any spaces), and append either true or false for the sensor= field depending on if the machine you are requesting with has a location sensor (a mobile device would).

So for example, check out this link:
http://maps.google.com/maps/api/geocode/json?address=11700+Plaza+America+Drive,Reston,Virginia&sensor=false

Lots of good stuff in there, it even corrects the address into the "official" address format. But most importantly for me, it contains a lat and lng location:

"location": {
"lat": 38.9521550,
"lng": -77.3500670
}

Now let's just confirm that:
http://maps.google.com/maps?q=38.9521550,+-77.3500670

As you can see, Google does a pretty spot-on job at this conversion, and its fast and easy to do. With this data, you could use your machine's location sensor to determine your current location and then determine a linear distance between the two geographical points, or even calculate directions!

You can check out their full API at:
http://code.google.com/apis/maps/documentation/geocoding/index.html

Cheers!