Archive for April

The Qualities of a Successful Dating App

 

 

These days, thousands of mobile applications are developed and marketed by the minute. However, only about a handful of them become popular and successful. Planning to create your own app? Application and software programming has become accessible now that even the least tech savvy person can design his own app. Theres even an app for creating an app, for crying out loud.

 

If you want your app to be the next Tinder, the trick is to design it in a way that will allow it penetrate the consumers consciousness. Easier said than done, though. To help your application gain the attention of gadget users, you may want to take into account the following qualities that have made so many apps successful.

 

Original – Many people would say that nothing is truly original anymore. Originality is still the key, however, in ensuring the success of an app. If you cant pull anything new out of thin air, then how about putting a fresh spin on an old idea? Case in point, the Plants vs Zombies game. Theres nothing new about zombies, right? In fact, they have become so ubiquitous. You see them in the movies, televisions, and comic books among other stuff. Some game developers, however, were able to create something new and exciting from such overly saturated horror movie staples. What would this mean for a dating app you ask? Well, the idea is not to re-invent the wheel but merely to turn the wheel. So look at the things that are already out there, making money in the dating space and then add your own original spin to them. For instance, Tinder pulls pictures from Facebook, so maybe somebody should make a dating app that pulls pics from Twitter or Instagram?

 

Problem solver – An app that makes life a bit easier will certainly find its audience. Some of the best apps in the market are those that address a problem that nobody pays attention to and then provide a solution for it. Whether its a budget planner or calorie counter app, users will get a kick out of it when they find it useful in solving their problems. So, think about what some of the biggest dating issues are out there, things like approach anxiety or running out of things to say solve these issues and youll have a winner.

 

Excellent design – You may have a unique, wonderful idea but if is poorly designed, its unlikely that youll even make a dent in the market. Just like when you go on a blind date first impressions count in a tough market, and this is especially true now that consumers tastes have become more sophisticated. Apart from minding the aesthetics, some of the things you should watch out for are glitches and device compatibility.

 

Mobile devices have become as powerful as desktop computers. Their processing power has provided creative programmers with a digital sandbox to play on. All it takes is one unique idea. If you already have one, good for you. Thats a good start. Just remember that to make it widely popular, you dating app has to be fresh, useful, and well-designed.

Things You Should Avoid If You Want To Attract Women Successfully

 

cute-nerd-girlThis article is supposed to be about what to do to attract women. When it comes to that subject, however, what you should do and say are less important than what you shouldnt do and say. Confused?

Well, heres the thing about attracting women: Not showing eagerness is the best way to get their attention.

Dont say anything  No matter what pickup line you have under your sleeve, theres a high probability that your target will be turned off the moment you open your mouth. The sad part is, she might have taken notice had you decided to stay silent.  So whatever opening line you have prepared, avoid being a fool and  try to be mysterious instead. Not many of them may admit this but women gravitates toward mysterious types.

Dont shower them with compliments  Women naturally get hit on so many times. Whatever compliment you have in your mind, theyve heard it all before. The most crucial mistake you can make when approaching the opposite sex is to give up your own value and say something flattering to get her approval.

Saying things like, Youre absolutely beautiful or You have the most gorgeous eyes (hair, body, etc.) that I have ever seen in my entire life will get you nowhere. You are only giving her power over you.  Once your prospect feels this, shell immediately lose interest in you. While its fine to find a woman beautiful, gorgeous or amazing, you shouldnt forget to place value on yourself. This way, shell see that you are worth the attention.

Dont be such a nice guy  Its pretty common knowledge that while a man is attracted to a woman based on her looks (among other things), a woman is attracted to a man based on how he makes her feel. This is very tricky as you might mistake the part of making her feel good for being super nice. If you are not careful, you run the risk of doing what she wants and, worse, putting up with all her bitchy and controlling behavior. Being extra nice to women may make them feel comfortable (OMG, you are so sweet!) but it doesnt make them feel any sort of sexual attraction. It only makes them feel as if they found a best friend or even a brother in you.

There have been tons of advice out there on what to do to attract a woman. The best you can do, however, is to mind your every move and consider the things that you shouldnt do. Change your tactics and who knows, you may improve your chances in going after any woman you like.

Ajax.Search based on Prototype

Ajax.Search displays search results on the fly when typing into a search box, similar to Spotlight search results in OS X, and also the new Apple.com search box.

Try the Ajax.Search Example:

  • Type ‘Bacon’ to get the first example results set (definition list)
  • Type ‘Waffles’ to get the second example results set (unordered list)
  • Type anything else and see the results not found message

Features

  • Search results display as you type, with configurable time between keystrokes (so the server is not hit with every single keystroke)
  • Up and down arrow keys highlight each result, return key sends user to search result url, escape hides the search results
  • Only required output from the server is a HTML unordered list (<ul>) or definition list (<dl>), which can be styled with CSS to look however you want

How to use it

All you have to do is include prototype.js and ajax.search.js into the head of your document, then tell your page to load Ajax.Search like so:

  Event.observe(window,'load',function() { new Ajax.Search({
      url: '/ajax.search/search.php', 
      results_container: 'search_results', // default
      input: 'search', // default
      loader: 'loader', // default
      search_interval: 1000
    });
  });

Or, you can do the minimalistic approach, as long as you name your HTML elements with the default names listed above:

  Event.observe(window,'load',function() { new Ajax.Search({
      url: '/ajax.search/search.php'
    });
  });

Check out the source, try it out, break it, and let me know what you think.

AJAX.Search WordPress Plugin

I use the Spotlight feature in OS X an awful lot. While some people would rather use things like Quicksilver, I like just hitting command+space and typing in what Im looking for, be it a document or even an application I want to open.

 

Thats the inspiration for AJAX.search, a search system built on Prototypes AJAX framework. It will make a call to a URL you specify and display the results under your search box like Spotlight (and now, like the search at Apple.com). From there you can hit the up or down arrow keys to select a result and then hit the enter key to visit the link.

 

I also built a WordPress plugin that uses AJAX.search in the default search box, and in fact you can test it out on this sites search box right now. By default the plugin will search all your posts and display them in the results grouped by category.

 

If you want to try it out on your WordPress install, you can download the plugin here. There are still features I still want to implement, and it may not work on all WordPress versions (Ive only tested on version 2.2.1). Eventually there will be a configuration page in the admin to allow you to change a few settings, such as number of results to display and whether to show categories in the results.

 

Download the AJAX.search WordPress Plugin version 0.1

 

If youre using K2: make sure you turn off Advanced Navigation in the K2 options, since K2 has an AJAX search function that will collide with this one. If you want to keep Advanced Navigation on, youll have to comment out the Javascript in the K2 header file that sets up the K2 AJAX search.

Trick your Computer Into Finding Web Sites on Other Servers

Quite often I’ve dealt with moving sites from one hosting situation to another. One issue that comes up is checking to make sure the site works on the new server, but you can’t check it because the domain is still pointing to the old server. Most clients are not okay with just waiting until the DNS switches over to the new server before finding out if their site is broken or not, so what to do? It turns out you can trick your computer into thinking the site really does live on the new server, so you can check it and verify everything is working correctly. Here’s how.

 

Whether you are on Windows, Linux or OS X,  you can tell your computer as event correlation to look for web sites at alternate IP addresses regardless of what DNS servers tell it. There is a hosts file that you can modify to do just that.

 

On Linux and OS X, this file is /etc/hosts, while on Windows it is the C:\WINDOWS\system32\drivers\etc\hosts file. The format is the same on both platforms, so you can use this trick no matter what OS you use. Here is the default one from OS X:

  ##
  # Host Database
  #
  # localhost is used to configure the loopback interface
  # when the system is booting.  Do not change this entry.
  ##
  127.0.0.1       localhost
  255.255.255.255 broadcasthost
  ::1             localhost

The setup is pretty simple. Enter the IP that you want your computer to point to, with the domain name you want it to use. So if you are in the process of moving www.clientwebsite.com from Dreamhost to Bluehost, then you’d find out the IP of the new server at Bluehost and enter at the end of the file like so:

 

  123.123.123.123 www.clientwebsite.com

Now clear out the DNS  cache on your computer to make sure you’re not viewing the site from your DNS cache. On windows, open up the command line and type ipconfig /flushdns. In OS X, open up Terminal and type lookupd -flushcache. I also recommend clearing your browser cache.

 

Open up your browser and go to the web site you just entered in the hosts file. It should now point to the new server. If not, make sure you remembered to flush your DNS cache.

 

Now you can save yourself some trouble with moving sites and make sure they work before you switch them over. Your clients will be happy, and more importantly you’ll have peace of mind that you won’t be getting calls from panicking clients that their site is broken.

Install ImageMagick from source on OS X Tiger (and Leopard)

Ive tested and verified this also works on OS X Leopard. An additional command was needed to make the JPEG library install without errors, noted below. Ive also updated the commands outlined below for the latest versions of the software.

 

If you’re like me and use mini_magick or (or RMagick) Ruby gems on OS X for building Rails apps, installing ImageMagick can be a pain. There is a universal binary package which works alright, but I prefer to build apps from source when possible. Also, I run a few web sites on my G5 Power Mac and I want ImageMagick to be compiled specifically for the PowerPC platform, which will get me a bit of an advantage in speed and reliability. I ran into a few roadblocks while getting it all compiled and installed, so I thought I’d share how I did it.

 

First off, I should mention that I only added in JPEG and PNG support for ImageMagick, so if you need more formats supported, this article doesn’t cover it. You’ll also need the OS X Developer Tools installed on your system. Finally, I did this on the latest version of OS X (Tiger 10.4.9) for PowerPC and Intel Macs. Both tested working. Update: Also tested on OS X Leopard on Intel.

 

Here is a list of packages you’ll need to download. Get all of these and place them in one directory.

  • JPEG
  • LibPNG
  • ImageMagick

Once you’re done downloading, open the Terminal app and go to the folder you downloaded the files to. For example if you downloaded them do your Desktop, type the following in the command line and hit enter:

cd Desktop

Step One: Compile and Install JPEG Libraries

Installing the JPEG libraries is actually the trickiest part of the install. By default on OS X building and installing the JPEG libraries won’t install any libraries at all, only some binaries that allow you to manipulate JPEG files.

 

Update: I also discovered while installing the JPEG library on Leopard that it needs the /usr/local/man/man1 directory to install without errors. I added the command below to create it.

So here’s the magic to force it to install JPEG libraries that ImageMagick will use while compiling:

tar zxvf jpegsrc.v6b.tar.gz cd jpeg-6b cp /usr/share/libtool/config.sub . cp /usr/share/libtool/config.guess . sudo mkdir -p /usr/local/man/man1 ./configure –enable-shared –enable-static make sudo make install sudo ranlib /usr/local/lib/libjpeg.a cd ../

Done! You shouldn’t have gotten any errors. If you did, then make sure you definitely have the OS X Developer Tools installed.

Step Two: Compile and Install LibPNG

This is pretty straightforward, and doesn’t require any weird tricks to get it to work.

tar zxf libpng-1.2.24.tar.gz cd libpng-1.2.24 ./configure make sudo make install cd ../

Step Three: Compile and Install ImageMagick

This is pretty simple too. We don’t have to pass any special options to ImageMagick either. It should automatically pick up that we have JPEG and PNG libraries installed and compile in support automatically.

tar zxf ImageMagick.tar.gz cd ImageMagick-6.3.8/ ./configure

After ./configure is done, you should check to make sure the following lines are present in the output that indicated JPEG and PNG support are in there:

JPEG v1 –with-jpeg=yes yes PNG –with-png=yes yes

If those are both set to yes, then you’re golden. Now finish him!

  make
  sudo make install

Unobtrusive Javascript Pop-up Links

One of the things I dislike the most about writing HTML is creating links that open in new windows. Since I try to make all my HTML standards-compliant, I can’t use the target="_blank" attribute in my links anymore, since it’s been deprecated in XHTML. Many have followed the new standard of making an inline onclick attribute of the link open the window, including myself. But what a pain it is to type it all out and remember the exact code to do it. Instead of this:

  <a href="http://www.example.com" onclick="window.open(this.href); return false;">External Link</a>

Wouldn’t it be easier to type this?

  <a href="http://www.example.com" rel="external">External Link</a>

I’m sure you’ll agree it’s much cleaner, easier to type, easier to remember, and to top it off, it’s (kind of) symantically correct. While the possible attribute values of rel do not include external, using it as a keyword to denote the relationship between an external page and your link makes sense. Best of all it validates with the W3C validator with flying colors.

 

How to Make it Happen

 

So how do we make the magic happen? The answer is with our good old friend Javascript. Basically we’re going to make a function that will crawl the document after the page loads and check for links that have rel="external" in it, then attach an Event.observe to each link that will cause it to open in a new window (note that you’ll need Prototype.js for this to work).

Here’s the code:

  function external_link(link) {
    var el = Event.element(link);
    if (el.tagName == 'IMG') {
      if (el.parentNode.tagName == 'A') {
        var el = el.parentNode;
      } else {
        return false;
      }
    }
    window.open(el.href);
    Event.stop(event);
    return false;
  }
  function init() {
    var links = $A(document.getElementsByTagName('a'));
    links.each(function(link) {
      if (link.getAttribute('rel') == 'external') {
        Event.observe(link,'click',function(e){ external_link(e); },false);
      }
    });
  }
  Event.observe(window,'load',init);

Note in the external_link function it checks if the item clicked was an image tag. If it is, then it will look up one node in the DOM tree to see if the image was enclosed in an anchor tag, and attach the event to that instead (since it contains the href it needs to open). If it doesn’t find anything, it will exit quietly.

Load this in your document header and off you go. You should be able to add rel="external" to any link on your page and it will open in a new window. Remember you need a copy of Prototype loaded as well. Leave a comment if have any questions or improvements.

Track Trimet on your iPhone


Recently I started riding the bus again full timeif not to save the environment, but to save my nerves from dealing with traffic. After a few days I was reminded about one of the things that bothered me about riding the bus: I hated not knowing exactly when the next bus was going to arrive.

 

This time around I have my iPhone, so I am able to use the tracker on Trimet.org to see when the next bus came. Except it was really difficult to use on such a small screen. I was able to find out when the next bus came, it took me 2-3 minutes to do it.

 

So I decided I was going to write an iPhone app to do the same thing, but with a much simpler and easier to use interface. At first I was just going to scrape the Trimet site to get the information. But then I came to find out that Trimet actually has a really nice API to all their tracking information!

 

So I present to to you the Trimet Tracker, an iPhone app that allows you to easily find out when the next bus is going to arrive at your stop. Just enter your Stop ID and youll get a list of all the arriving buses (or MAX or Street Car), what time they will be showing up, and how long you have to wait. If you dont know your Stop ID, you can also do a quick search by picking a route and selecting from all the stops on that route.

 

To make it even easier, you can also save any stop to your favorites list so you dont have to enter a Stop ID or search for your stop again. Just hit Favorites and select which stop you saved.

 

Obviously this tool isnt for the masseshow many people are riding Trimet with an iPhone? Even if no one uses it, this tool has already saved me the a couple times from missing a bus. Thats worth the whole 4 hours it took me to develop it.

 

For the technically inclined, Trimet Tracker was built using the Camping microframework, IUI for the interface, and a few lines of custom Javascript.

 

One final thought: I now firmly believe that Portland is the geekiest city on the west coast. Even our transit system has an API.

28 NES Ringtones for your iPhone

The other day my friend Jason  showed me how he made an Excitebike ringtone with MakeiPhoneRingtone by actually ripping audio from a Youtube video, pulling it through and audio editor then finally dropping into MakeiPhoneRingtone to be able to put it on his phone.

 

Being the NES nerd I am, I remembered how to rip music from NES games directly. So now Im going to show Jason up by sharing 28 different NES music ringtones for your iPhone. These are all AAC files that you can drop into MakeiPhoneRingtone, which will make them immediately available as ringtones that can sync up to your iPhone.

 

Ive broken the collection up into 4 separate zip files, and Im calling them NES Ringtone Paks 1-4. Ive covered most of my favorite tracks from about 20 NES games. Here is a list of all the ringtones:

 

NES Ringtone Pak 1:

  • Blaster Master Area 1
  • Blaster Master Area 2
  • Goonies 2 Theme
  • Castlevania Level 1
  • Contra Level 1
  • Double Dragon
  • Excitebike

NES Ringtone Pak 2:

  • Kid Icarus World 1
  • RC Pro Am Opening
  • Legend of Zelda Overworld
  • Little Nemo
  • Metroid Spacey
  • Metroid Zebes
  • Mike Tysons Punch Out Workout

NES Ringtone Pak 3:

  • Mega Man 1 Elecman
  • Mega Man 2 Boss Selection
  • Mega Man 2 Opening
  • Mega Man 2 Wily
  • Mega Man 2 Woodman
  • Super Mario Bros. 1
  • Super Mario Bros. 1 Out of Time

NES Ringtone Pak 4:

  • Super Mario Bros. 3 Powerup
  • Super Mario Bros. 3 Star
  • Super Mario Bros. 3 Underground
  • Wizards & Warriors 1 Castle
  • Wizards & Warriors 1 Low Energy
  • Wizards & Warriors 2 Air
  • Wizards & Warriors 2 Fire

If you have any requests for other games, leave me a comment below. Enjoy your NES ringtones!

Make Graticule Failover to other Geocoding Services

The Graticule Ruby gem makes it super easy to geocode addresses using multiple services. One thing I’ve found in developing Unthirsty is that sometimes a geocoding service either fails to be reached or the address couldn’t be found. So as a precaution, I’ve set up a way for Graticule to failover to another service if a lookup fails. Here’s how.

 

First, set up a list of your preferred geocoding services. Graticule expects a service name and optionally an access key. Some geocoding services like Ontok don’t require a key. However Google does, and it’s probably the one you’ll want to use over the others. Order your geocoders so your preferred geocoders are listed first.

 

  PREFERRED_GEOCODERS = [
    {:name => :google, :key => '[your key here]'},
    {:name => :yahoo, :key => 'My Service'}, # yahoo will take any string for a key
    {:name => :geocoder_us, :key => 'My Service'} # same with geocoder.us
  ]

Take your pick of geocoding services. Graticule supports quite a few:

  • Google (Free)
  • Host IP (Free, get geocode info by IP)
  • Yahoo (Free)
  • Geocoder.ca (Free but throttled, or paid service, Canadian locations)
  • Geocoder.us (Free for non-commercial use)
  • Local Search Maps (Free)
  • Meta Carta
  • Postcode Anywhere (Paid, locations)

 

Now it’s time to put those geocoders to use. This method loops through your PREFERRED_GEOCODERS array and sets up a new Graticule instance with the service name and key you provided. It will then try to locate it with a lookup to that service. Calling the locate method on a service instance will raise an exception if an error occurs, so it’s possible to rescue all the different errors you can get while doing a lookup.

Note that this was used in a Rails project, so I’m using logger, a built in Rails logging facility. You may want to substitute your own logging method if you’re not using Rails.

 

  def geocode(query)
    PREFERRED_GEOCODERS.each{|service|
      begin
        geocoder = Graticule.service(service[:name]).new(service[:key])
        result = geocoder.locate(query)
        logger.info("Found address [#{query}] with service [#{service[:name]}]")
        return result unless result.precision == :country # probably not worth keeping
      rescue Graticule::AddressError => detail
        logger.error("Nothing found [#{query}] with service [#{service[:name]}] (#{detail})")
      rescue Graticule::Error => detail
        logger.error("Nothing found [#{query}] with service [#{service[:name]}] (#{detail})")
      rescue Graticule::CredentialsError => detail
        logger.error("Invalid credentials [#{service[:name]}] with [#{service[:key]}] (#{detail})")
      rescue Errno::ECONNREFUSED
        logger.error("Connection refused to #{service}")
      end
    }
    raise Graticule::AddressError.new("Couldn't find address [#{query}] with any service")
  end

The failover works because since we are in a begin..rescue block, a raised exception will cause it to skip over the return result line, log the exception, then move on to the next service. But if a lookup succeeds, it will return a new Graticule::Location instance that contains the results, and not go any further. If no lookups are successful, it will raise a new Graticule::AddressError exception that you can trap while calling the method in your code.

Also notice I don’t return a result if the :precision attribute is :country There’s pretty much no use for it if you’re going for specific addresses. You may want to adjust it based on your needs. Maybe you only want results that have :address precision.

What to do While you’re at Rails Conf 2007

If you’re attending Rails Conf this year and are from out of town, you might be like me when you’re in another city: I don’t really find much outside of the touristy areas, or what’s immediately around where I’m staying. But you’re in luck! I live here , Oregon and I have a list of places to go and things to do that I think are quintessential.

 

I’ve tried to pick places that are close to the convention center, but most places will require either taking Tri-Met bus, light rail or street car, or driving. Each listing has a link to directions from the convention center so you can see about how far it is.

 

Good places to eat lunch or dinner
The immediate area around the convention center is mostly places like Denny’s and Red Robin. I wouldn’t recommend eating there. Here are some places for getting some good food.
  • The Side Door (Directions)
  • Russell Street BBQ (Directions)
  • Produce Row (Directions)
  • Old Town Pizza (Directions)
  • Le Bistro Montage (Directions)
Good places to eat breakfast
One thing know how to do right is make a tasty breakfast. Check out these places if you have time to get up early and eat before the conference starts for the day.
  • Zell’s Cafe Two words: BACON WAFFLE (no…waffles with bacon IN them)
  • The Side Door (Directions)
  • Bridges Cafe (Directions)
Go see a movie, and have a beer
as far as I know, is one of the very few cities that have so many movie theatres that serve beer and food. AND to top it off, most movies are $3-$6 admission. Check out one of these theatres for a magical movie and beer experience.
  • Bagdad Theatre (Directions)
  • Laurelhurst Theater (Directions)
  • Mission Theatre (Directions)
  • Clinton St. Theater (Directions)
Coffee Shops Galore
has no shortage of coffee shops. Try not to go to Starbucks and find one of these local coffee shops.
  • Stumptown Coffee (2 locations: Downtown and Belmont)
  • Tiny’s Coffee (2 locations: MLK and Hawthorne)
Happy Hours
Come 4pm you’ll be wanting you some drinks. There are plenty of happy hours around town, but here are a few recommended.
  • Acme  (Happy Hour Info and Directions)
  • Produce Row  (Happy Hour Info and Directions)
  • Shanghai Tunnel  (Happy Hour Info and Directions)
  • Doug Fir  (Happy Hour Info and Directions)

Find more Happy Hours at Unthirsty.com

Powell’s/Powell’s Technical
Powell’s Books is one of the largest book stores in the world, and to make it even better, they have a separate store that only sells technical books (I picked up my Programming Ruby book there, among others).
  • Powell’s Books Main Store (Directions)
  • Powell’s Technical (Directions)
Places to find gifts for your Significant Other
You might get in trouble if you go to a conference out of town and not bring back a gift. Luckily for you there are a couple areas you can check out that have unique gifts.
  • SE Hawthorne Blvd, between 30th and 39th
  • NW 23rd Ave, Between Burnside and Flanders
Relive the golden age of arcade games
The only place that has all the classic arcade games, beer, wine and DJs you can take.
  • Ground Kontrol (Directions)
See a live band
Every night you’ll find tons of bands playing in lots of clubs around. Check out the Mercury before you come, or pick one up while you’re here. You find all the band listings, as well as other stuff to do while you’re here. Listed below are some recommended venues.
  • Wonder Ballroom (Directions)
  • Holocene (Directions)
  • Crystal Ballroom (Directions)
  • Dante’s (Directions)
  • Doug Fir (Directions)

If you know a great place to eat, drink or have fun in Portland, leave a comment below with a suggestion or link to your list. See you at the conference.