Hacker News new | past | comments | ask | show | jobs | submit login
Create a Heatmap of Geocoded IP Addresses with Rails (mikeorr.info)
34 points by pa7 on May 11, 2013 | hide | past | favorite | 10 comments



Instead of using geocoder and fetching the info from a 3rd party web service, you could use a local installation of the geoip database from maxmind and the geoip-c gem.

https://github.com/mtodd/geoip


Maxmind's database is 1) huge in filesize 2) not as extensive as some 3rd parties (like Google, Yahoo, and Bing), and 3) updated monthly which adds another task to your workflow.

Given that the example use is to track where clicks are coming from, those three sound like dealbreakers.


This is great, but why oh why do people still use HAML over SLIM[1] as their templating language?

% is unnecessary, and I find slim's attribute handling far superior to clunky haml, and to top it all off slim compiles faster than haml.

1: http://slim-lang.com/


Arguing about HAML and SLIM is pretty useless. Easy to write, hard to read. Plain old ERB for me any time.


I've had almost the opposite experience: reading ERB (or JSP or whatever) is a giant pain in my ass since it frequently isn't maintained with consistent indenting and formatting. I like that HAML forces that on you.


Plus it's an extra dependency and a narrowing filter for hiring.


Extra dependency that I buy. But narrowing filter for hiring? Seriously? Any web developer should be able to pick up any of these templating languages (as well as CSS preprocessors such as less, sass etc) in less than a day.


You overestimate the ad-writing and interviewing skills of companies.


And once a recruiter gets a hold of those buzzwords, it becomes a fixed requirement


Why oh why do people throw non-default templating languages into their tutorials when it's not relevant to the tutorial at all?

When you write your views in ERB, your tutorial's accessible to everyone who's used Rails, and the HAML / Slim / Mustache / Liquid / whatever people can convert them over easily. When you write your views with something other than ERB, someone who's only familiar with ERB has a much harder task, especially if they're new to Rails and don't know much about alternate templating languages.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: