Archive

Author Archive

MarkIt, an app to mark where you parked your car or to remember a special place.

January 22nd, 2015 aaron Comments off

MarkIt http://www.markitapp.net is a tool to help you track where you parked your car or a great way to remember special places you’ve seen while traveling or just exploring neighborhoods in everyday life.   Use it to remember a bar, restaurant, museum, theater, park or whatever else you can think of.

Setting a marker is incredibly simple. Once you get your current location, just set your marker over the point on the map you want to mark and press the “Tap to Markit!” button.

In addition to simply saving an address we let you take up to 3 photos to store with your marker and we let you record notes about your marker. Sharing is easy. To share your marker along with images and notes just click the share icon in the action bar when viewing your marker. It will present you with a list of applications which will allow you to share your photos. A slide up panel with all your markers is available in the lower portion of the initial screen.

Finally navigation to your marker is available by clicking on the address when viewing your marker.

You can download it here MarkIt

Cyanogen Mod 6 and mytouch 3g speed problems solved

July 30th, 2011 aaron Comments off

So I have my old mytouch 3g with cyanogenmod 6 as my gsm phone when I’m on vacation. The slowness is unbearable. It turns out the key to getting excellent performance is the following.

  • Under cyanogenmod settings go to performance settings
    • turn on JIT (Just in time compiler for the Dalvik VM)
    • uncheck enable surface dithering
    • Check Lock home in memory
  • Finally replace the default ADW Launcher with LauncherPro

This last step, replacing the home launcher with Launcher Pro is what really did it for me. Hope someone finds this useful.

Categories: Android, Cell Phones, Uncategorized Tags:

NYC Health Ratings for Android

July 13th, 2011 aaron Comments off
NYC Health Ratings for Android

I just released version 1 of nyc health ratings for android. You can search for restaurants by name and location and get detailed inspection results just as you can on nychealthratings.com.  Having this information available to you on a mobile device is so much more useful isn’t it.  One really nice feature is that searches default to your current network location, which works for the majority of searches.  If you are searching for a restaurant that isn’t in the immediate vicinity just input the zip code, address, or neighborhood name.  In addition to the android market it is also available on amazons market.

Now that I’ve finished version 1 for Android, I’m going to start building an iphone version.

NYC Health Ratings

March 6th, 2011 aaron 1 comment

I’m proud to announce version 1 of nychealthratings.com. I put in many late nights hacking over the last month in getting it done. It’s essentially a website with two tools.

The initial tool I wrote was a Javascript bookmarklet that integrates new york city restaurant inspection results with the restaurant landing pages of yelp.com, citysearch.com, menupages.com and opentable.com.  The aim was to complement peoples search efforts by integrating health inspections data with the sites they already use.  To use the bookmarklet go to nychealthratings bookmarklet follow the directions and watch the video.  This tool was my entry into nyc big apps 2.0.  If you like what I’ve done please vote for me here.

The bookmarklet was a great starting point to something that I think could be much bigger.  I think it’s just as important that people see this data when making dining decisions as reading reviews on Yelp! or Zagats.  It’s data that people want and need.  So the logical next step was to build a google maps search application which makes that possible. With the google maps app you can search for restaurant inspections for all 22,485 restaurants in New York City.  You can search by type of restaurant, by name, location, and filter by inspection grade.
The key is to make the data pervasive and accessible.  So next on my agenda is to build Android and IPhone applications.  I’ll start with Android because I have experience building Android applications.  Much of the backend components for the maps application can be reused.

Immediate enhancements to the site will be an upgrade of the current search technology.  I’m currently using mysql full text search indexes which although easy to setup, they are incredibly limited in the types natural language processing issues that come up when building a search application.  I’m currently evaluating using Solr, Sphinx and a product called ElasticSearch.

I’ve been thinking about what’s motivated me to do this.  I’m not getting a dime.  I’m doing it because I like to hack and I’m damn good at it.

Categories: New York City, restaurants Tags:

Method::Signatures blazing fast and makes me sane

March 6th, 2011 aaron Comments off

My biggest gripe about Perl has always been the lack of functional prototypes and method signatures.  The concept of method signatures is not a revolution it’s been around forever, almost every programming language I can think of off the top of my head has it in some form.  Having to unpack @_ time and time again is just such a waste of keystrokes.  Not only that there are multiple ways to do something so basic.  (Shift, copy the list to lexical vars, direct access in $_[i] etc).  It’s surely been the source of a number of bugs and something every Perl programmer needs to be conscious of.

My main argument for method signatures is it reduces bugs and it documents your code without having to write documentation.  Its declarative, it does what it says and says what it does.  Plain and simple no guessing.  As most Perl programmers are aware Devel::Declare is a module that has added the ability to extend Perl 5 the language without source filters.  There are several really cool modules that have been developed on top of Devel::Declare.  MooseX::Declare and MooseX::Method::Signatures and Method::Signatures in particular.  The first MooseX::Method::Signatures, comes bundled as part of MooseX::Declare.   MooseX::Declare adds  declarative class and method keywords on top of Moose.  MooseX::Method::Signatures has it’s own type system and does optional run time type checking on arguments much like you would do with Params::Validate except with a declarative syntax.  It’s down right beautiful and makes you warm and fuzzy inside to use it, the down side is there is a huge performance penalty to use MooseX::Method::Signatures at run time.  Depending on what you are doing it might not matter much.

The module Method::Signatures gives you 95% of the sugar and 100 x performance over MooseX::Method::Signatures.  Type checking at run time is something that I usually don’t need (This is still Perl, I swear).  Positional and named parameters are both supported along with defaults and constraints.  On my latest project I’ve been using Moose along with Method::Signatures and I couldn’t be any happier.  Take a look at the performance benchmarks I’ve included comparing these two modules along with regular ‘sub’ methods.

MooseX::Declare bench code

use MooseX::Declare;
 
class Foo {
  has x => (
    is  => 'rw',
    isa => 'Str',
  );
 
  has y => (
    is => 'ro',
    isa => 'Str',
  );
 
  # I use the three vars below to ensure that the subs
  # are not constant-folded away.  Although I'm not sure perl will do that.
  our $meth_counter                 = 0;
  our $meth_without_args_counter    = 0;
  our $meth_typed_counter           = 0;
  our $regular_sub_counter          = 0;
 
  method method_with_type( Int $x ) {
    $meth_typed_counter++;
    $self->x . $x
  };
 
  method method_without_type($x) {
    $meth_counter++;
    $self->x . $x
  };
 
  method method_without_args() {
    $meth_without_args_counter++;
    $self->x;
  };
 
  sub regular_sub {
    my ( $self, $x ) = @_;
    $regular_sub_counter++;
    $self->x . $x;
  }
 
};
 
package main;
use Benchmark qw(:all);
 
my $foo = Foo->new( { x => "3", y => "45" } );
 
cmpthese(
  300000,
  {
    method_with_type    => sub { $foo->method_with_type(5) },
    method_without_type => sub { $foo->method_without_type(5) },
    method_without_args => sub { $foo->method_without_args() },
    regular_sub         => sub { $foo->regular_sub(5) },
  }
);

MooseX::Declare Results

aaron@ ~/method_signature_bench $ perl MooseXTest.pl
                        Rate method_without_type method_with_type method_without_args regular_sub
method_without_type   5320/s                  --              -9%                -12%        -99%
method_with_type      5865/s                 10%               --                 -2%        -99%
method_without_args   6014/s                 13%               3%                  --        -99%
regular_sub         612245/s              11408%           10339%              10080%          --

Method::Signatures

package Foo;
 
use Method::Signatures;
use Moose;
 
has x => (
 is  => 'rw',
 isa => 'Str',
);
 
has y => (
 is => 'ro',
 isa => 'Str',
);
 
our $meth_counter                       = 0;
our $meth_without_args_counter          = 0;
our $meth_typed_counter                 = 0;
our $regular_sub_counter                = 0;
our $regular_sub_without_args_counter   = 0;
 
method method_without_type($x) {
 $meth_counter++;
 $self->x . $x
}
 
method method_without_args() {
 $meth_without_args_counter++;
 $self->x . '5';
}
 
sub regular_sub {
 my ( $self, $x ) = @_;
 $regular_sub_counter++;
 $self->x . $x;
}
 
sub regular_sub_without_args {
 my ( $self ) = @_;
 $regular_sub_without_args_counter++;
 $self->x . '5';
}
 
package main;
 
use Benchmark qw(:all);
 
my $foo = Foo->new( { x => "3", y => "45" } );
 
cmpthese(
 300000,
 {
 method_without_type         => sub { $foo->method_without_type(5) },
 method_without_args         => sub { $foo->method_without_args() },
 regular_sub_without_args    => sub { $foo->regular_sub_without_args() },
 regular_sub                 => sub { $foo->regular_sub(5) },
 }
);
 
1;

Method::Signatures Results

aaron@ ~/method_signature_bench $ perl MethodSignature.pl
 Rate regular_sub method_without_type regular_sub_without_args method_without_args
regular_sub              579710/s          --                 -7%                     -17%                -25%
method_without_type      625000/s          8%                  --                     -11%                -19%
regular_sub_without_args 701754/s         21%                 12%                       --                 -9%
method_without_args      769231/s         33%                 23%                      10%                  --

Analysis

These tests are not exhaustive nor do they need to be.  Its clear that even with no arguments subs and Method::Signatures are on order of 100 times faster than MooseX::Method::Signatures.  What really surprised me here is that Method::Signatures looks to be faster than subs.  It would be an interesting test to benchmark the number and types of arguments.

Bottom line is I will use Method::Signatures and Moose in any new projects I write in Perl.  I’ve been successfully running production code with Method::Signatures since September with no problems.  Hoping to get some feed back on how Method::Signatures could possibly be faster than subs.

Note

Ipod touch makes a great voip phone

October 10th, 2009 aaron Comments off

Have spotty cell phone service at home?  Skype for iphone/ipod touch can turn your ipod touch into a full fledged voip/skype out phone.  Skype in and out with a full pledged number is only around 6 dollars a month.  Throw your landline away.  Sorry if this sounds like an ad!

Categories: Uncategorized Tags:

Safari window.onload timing issue

October 9th, 2009 aaron 2 comments

I ran into some Safari related timing issues at work, that I thought were worthy of a post.  To preface the post I’m using the dojo framework.  On to the post…

I needed to position a flash overlay relative to the absolute postion of a div that will vary in position on subsequent page loads.  So in comes the handy dojo.coords(id) function wrapped in a dojo.addOnLoad.  This works like a charm in firefox 3, ie 6, ie7 and google chrome.  In safari, no dice.  The offsetTop and offsetLeft calculations were completely off (I tried this with my own custom function as well as dojo.coords())  I was finally able to get this to work with using a setTimeout delay (hack).

After researching the issue it seems apple decided to make window.onload fire “before” the page loads.  (Seems counterintuitive to me, but it’s no wonder it’s so fast in benchmarks)  This explains the miscalculation of element positioning on the page.  Waiting for the page to load with a timeout fixes the problem.  The solution is a hack and is obviously not fool proof as in there is no real barrier to execution.  Does anyone in the interweb out there know how to get Safari to fire onload as in when the page actually finishes loading?  Knock knock.

Android wish list

September 21st, 2009 aaron Comments off

After one month with the MyTouch and Android there are a few things I see as road blocks to being a real competitor to the iphone.  Some of these things are definitely being addressed in the upcoming 1.6 and 2.0 os updates.

First off is the market store.  It’s strictly bare bones.  The search and category breakdown is not developed enough.  For instance when you search, you can’t search subcategories.  Your search is run across all applications,  leading to many  false positives.  Product pages for apps don’t have screen shots etc.  This will change shortly with the 1.6 donut release.

Next on my list is multi-touch.  It’s scheduled to be part of the 2.0 release which may or may not be here before Christmas.  To really be a worthy competitor to the iphone this is a must have.  It’s overdue.

On to a few not so obvious or talked about gripes.  There’s no desktop equivalent to itunes.  I think an itunes equivalent was a major oversite on behalf of google.  Itunes makes managing your media on your phone and desktop simple.  This would be even more evident if you purchase music on your device through itunes.  After purchasing  music there is no automatic synch up from your amazon purchases to an itunes equivalent, becaue it doesnt exist.  When I used itunes I tended to purchase through itunes on my desktop and synch to my ipod.I think others largely do the same.  Lets say to be fair that 50% of people would be more inclined to purchase through their desktop app.  Google could potentially open up sales of mp3′s and apps by 50 %.  Ok maybe I’m off and its 25%.  Thats still 25% of a growing market.

Ah yes theres more.  The performance is sluggish at times.  This could be related to a host of issues.  Most likely some kernel tuning will be done in future android releases.  How about google set up a paid service where they test and certify applications and mark them as google tested and verified.  It would add a level of quality control  that users would be able to discern.

A real media player.  The media player kind of stinks.  It doesn’t pickup album covers 95% of the time, and there is no way to add them after the fact.  How about a genius playlist feature similar to itunes?  Nada.  Its pretty primitive.

Of the things I listed the following are definitely being addressed, multi touch, the app store and performance .  The media features seem to be a bit of an after thought with android.  By focusing on the app store, media features and performance google and partners stand to pick up business from disgruntled iphone users.

Tmobile Customer Service

September 10th, 2009 aaron 2 comments

As a new T-Mobile customer I was a bit worried bringing my new phone home. I had heard non stop about poor reception. Countless people advised me to stick with Verizon for their service. One person advised to have a friend with each provider come to my apartment and see how the service was. This is a great idea, however I had my mind decided on a particular phone. On to the point of the article.

When I got the phone the service appeared excellent, except … you guessed it, inside my apartment. 0 or 1 bars no 3g let alone edge. It was very bad, I wasn’t able to make a phone call in my apartment unless the blinds were open and I stood by the window. After looking into pricey cell boosters and amplifiers I decided to call T-Mobile. The customer support people were clear (spoke perfect English) and sympathetic. They acknowledged that where I lived (The upper east side of Manhattan) I should be getting much better near perfect reception. The customer support representative scheduled an engineer to come to my building and see what could be done. I assumed it was bs, however 1 week later I’m getting 3 bars in my apartment and 3g and edge network access. Basically I’m able to use my phone! Its not perfect but is a tremendous improvement. I’m posting this so others with similar issues in a covered area know that they too should try calling T-Mobile customer support if they have service issues. Just dial 611 from your phone.

MyTouch 3G Android Phone Review

August 28th, 2009 aaron Comments off
MyTouch 3G

MyTouch 3G

I’ve been resisting and resisting getting an iphone for two years.  Mainly because while I know its a fine product, I see Apple as a controlling company.  I liked the open nature of android but passed on the G1 because the hardware was pretty uninspiring.  I finally gave in as soon as tmobile released it in July.  So far so good. The android market is chock full of applications. Some great and some not so great. Pluses of the phone are the integration with all things google, including their awesome calendar. The web browser is very usable. However it would be nice to have multitouch.   Supposedly there is multitouch support already built in to the kernel.  The omission was due to google not wanting to upset apple.  They do have a symbiotic relationship so it makes sense.  However, with Apple pulling Google Voice from the apple store, I wouldn’t be surprised to see multitouch sooner than later. Other things of note are the decent battery life and excellent reception.

Many of the apps could use more work, the facebook application doesn’t provide the ability to upload images. The trend is upwards though. There are many many android phones being released in the next 6 months. Along with that will be more developers developing applications. I’m going to explore the SDK and post about it.