<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>Notes on building the empire, for those who speak the code</description><title>Making LOVELAND</title><generator>Tumblr (3.0; @makingloveland)</generator><link>http://makingloveland.tumblr.com/</link><item><title>Weequinox</title><description>&lt;p&gt;This week marks the end of the &lt;a href="http://action.wdet.org"&gt;WDET Call to Action&lt;/a&gt; 30-day drive for volunteer hours. We hope to segue this energy into &lt;a href="http://greatamericanpixel.tumblr.com/post/19433251213/web-apps-meet-grant-apps-please-show-some-love"&gt;another collaboration&lt;/a&gt; supported by the Knight News Challenge: you can &lt;a href="http://newschallenge.tumblr.com/post/19413388522/detroit-lifemap"&gt;help by voting for it&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;We&amp;#8217;re wrapping up proposals &amp;amp; contracts on a few new projects this week and starting to design them in earnest beyond vague outlines. First there&amp;#8217;s a flurry of emails and shared design documents, giving way soon to code and mockups and live test sites. For now it feels like the calm before the storm.&lt;/p&gt;
&lt;p&gt;During this breathing room between client work we&amp;#8217;re building One Day In Detroit and blogging about it. Beyond a fun, hopefully useful app it&amp;#8217;s also an exercise for us in openness, writing, and inviting a loose network of collaborators to design, hack and test.&lt;/p&gt;
&lt;p&gt;Jerry has been attending hockey games, &lt;a href="http://greatamericanpixel.tumblr.com/post/19493965912/yesterday-i-was-with-a-gaggle-of-notable-detroit"&gt;hobnobbing with the mayor&lt;/a&gt;, &lt;a href="http://greatamericanpixel.tumblr.com/post/19381544286/scenes-from-a-day-picking-up-atoms"&gt;picking up rubble&lt;/a&gt;, running between meetings, sending mockups and brainstorms, and blogging prolifically.&lt;/p&gt;
&lt;p&gt;Mary, as far as I can tell from across the continent, is keeping up communications with our clients and partners new and old, organizing our timelines and business dealings, juggling contracts, and raising puppies.&lt;/p&gt;
&lt;p&gt;Happy equinox all! Many new launches, articles and partnerships coming this spring. And as always we&amp;#8217;re on the lookout for talented Rails or front-end developers who dig our brand of crazy - drop me a line at larry@makeloveland.&lt;/p&gt;
&lt;p&gt;❦&lt;/p&gt;</description><link>http://makingloveland.tumblr.com/post/19654332246</link><guid>http://makingloveland.tumblr.com/post/19654332246</guid><pubDate>Tue, 20 Mar 2012 20:41:00 -0400</pubDate></item><item><title>Remember to forget</title><description>&lt;p&gt;Ok, so we all know &lt;a href="http://en.wikipedia.org/wiki/Cache_(computing)"&gt;caching&lt;/a&gt; is a good idea if not an absolute necessity for your production web servers. Why did it take me until last week to install &lt;a href="http://memcached.org/"&gt;memcached&lt;/a&gt;? Every smart architecture employs it or similar. I had this idea it was a painful setup process - &lt;em&gt;not true&lt;/em&gt;. Getting your Rails app speaking the memcache is frighteningly easy. &lt;/p&gt;
&lt;p&gt;Requests to certain apps (geographic searches, say&amp;#8230; where the data changes infrequently) have been taking longer as the content size grows. The built-in &lt;a href="http://guides.rubyonrails.org/v3.0.3/caching_with_rails.html#cache-stores"&gt;file-based caching&lt;/a&gt; works for the basics but doesn&amp;#8217;t cut it here because we need the data to expire &amp;amp; refresh every few hours.&lt;/p&gt;
&lt;p&gt;It only took a few minutes to install the memcached server on OSX (&lt;em&gt;brew install memcached&lt;/em&gt;) and Debian (&lt;em&gt;apt-get install memcached&lt;/em&gt;). Once that&amp;#8217;s running, the &lt;a href="https://github.com/mperham/dalli"&gt;dalli&lt;/a&gt; gem gives you seamless action caching &amp;amp; session storage in Rails. (NB: The only issue was having to use &lt;em&gt;127.0.0.1&lt;/em&gt; instead of &lt;em&gt;localhost&lt;/em&gt; in the configuration.) Requests for &lt;a href="http://action.wdet.org"&gt;Call to Action&lt;/a&gt; map data dropped from 500ms to 2ms. I&amp;#8217;ve been strategically hitting the slow requests on &lt;a href="http://makeloveland.com"&gt;our various sites&lt;/a&gt;, applying Rails action &amp;amp; fragment caching with excellent results. Don&amp;#8217;t I feel silly having not tried this sooner?&lt;/p&gt;
&lt;div&gt;❦&lt;/div&gt;</description><link>http://makingloveland.tumblr.com/post/19642692575</link><guid>http://makingloveland.tumblr.com/post/19642692575</guid><pubDate>Tue, 20 Mar 2012 17:31:00 -0400</pubDate></item><item><title>Hello folks! Today we have the beginnings of maps on One Day....</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_m15pu24RWz1qjbqs8o1_500.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Hello folks! Today we have the beginnings of maps on One Day. This is one of Jerry’s test tours showing on a Google Map. Did you know they offer driving/walking/biking &lt;a href="https://developers.google.com/maps/documentation/directions/"&gt;directions through the API&lt;/a&gt;? Yes indeed, just feed the Google server a list of locations and it’ll tell you the best route, complete with &lt;a href="https://developers.google.com/maps/documentation/javascript/reference#Polyline"&gt;Polyline&lt;/a&gt; coords and turn-by-turn directions. I’ll also recommend their &lt;a href="https://developers.google.com/maps/documentation/geocoding/"&gt;geocoder&lt;/a&gt; (which we’re using to turn addresses into lat-longs). &lt;/p&gt;
&lt;p&gt;Next there needs to be a sense of &lt;em&gt;order&lt;/em&gt; in these marker locations: how will we do it? Numbering? Animation? Only time will tell.&lt;/p&gt;</description><link>http://makingloveland.tumblr.com/post/19599482632</link><guid>http://makingloveland.tumblr.com/post/19599482632</guid><pubDate>Mon, 19 Mar 2012 20:10:00 -0400</pubDate></item><item><title>Identity</title><description>&lt;p&gt;Today I stirred FB &amp;amp; Twitter sign-in into One Day In Detroit so that new folks can make an email/pass account or just press the one button and be done. It&amp;#8217;s technically simple these days (I use devise &amp;amp; omniauth and it takes an hour to set up), though I grapple with the approach &amp;amp; justification for each new project. Do we require an account to play with the site? Which features? Will people need to choose Yet Another Password? Creating accounts is a drag, and with all the small experimental sites we &lt;a href="http://makeloveland.com"&gt;craft at Loveland&lt;/a&gt;, we&amp;#8217;d like everyone to feel free to experiment with a minimum of &amp;#8220;drag.&amp;#8221;&lt;/p&gt;
&lt;p&gt;Last year I researched ways to share accounts across our sites so there&amp;#8217;s just one &amp;#8220;you&amp;#8221; to remember. We called it your &amp;#8220;LOVELAND ID&amp;#8221; and I was really inspired by &lt;a href="http://productblog.37signals.com/products/2009/12/37signals-id-whats-new.html"&gt;37signals&amp;#8217; movement&lt;/a&gt; towards unifying their account system. I&amp;#8217;ll tell you, no small task. Here are some approaches:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Shared database tables&lt;/strong&gt; - in Rails normally each app has its own database. Well, you can tell your User model to connect to a different one&amp;#8230; so if you point every User model to the same table you&amp;#8217;ll be able to log in with the same credentials to each site, right? Yes, but I wouldn&amp;#8217;t recommend this anyone. It&amp;#8217;s a mess. It also requires every app to use exactly the same authentication library and user schema, making upgrades very sticky. I did this with the &lt;a href="http://inchernet.com"&gt;Inchernet&lt;/a&gt; and &lt;a href="http://lovetax.us"&gt;LoveTax&lt;/a&gt; originally (using &lt;a href="https://github.com/binarylogic/authlogic"&gt;authlogic&lt;/a&gt;, they are Rails 2 projects) and felt very clever. Okay, so I wanted to plug &lt;a href="http://whydontweownthis.com"&gt;WDWOT&lt;/a&gt; in later, but it runs on Rails 3, and &lt;a href="https://github.com/plataformatec/devise"&gt;devise&lt;/a&gt; is the preferred way there. Shoot. You &lt;em&gt;can&lt;/em&gt; &lt;a href="http://stackoverflow.com/questions/3840072/migrating-from-authlogic-to-devise"&gt;massage your authlogic table&lt;/a&gt; and encrypt passwords using&amp;#160;:&lt;a href="http://stackoverflow.com/questions/4050700/ive-been-using-authlogic-but-now-need-to-remove-all-traces-of-it-what-do-i-ne"&gt;authlogic_sha512&lt;/a&gt;. But this is a smelly approach.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;CAS&lt;/strong&gt; - &lt;a href="http://code.google.com/p/rubycas-server/"&gt;RubyCAS&lt;/a&gt; is an industrial-strength single-sign-on solution. Pretty cool. I actually got this working with our Loveland database, roughly following &lt;a href="http://rubyglasses.blogspot.com/2009/12/rails-single-sign-on-with-rubycas.html"&gt;this guide&lt;/a&gt;. It has a big, inscrutable, non-rails server component, and I shelved it because I didn&amp;#8217;t find an easy way for users to &lt;em&gt;sign up&lt;/em&gt; from the app.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;OAuth&lt;/strong&gt; - Very popular. I settled on this as the cleanest, most standard and futureproof way. We have one app that&amp;#8217;s an OAuth provider and it holds onto all the user data and gives you the signup/login flow. Each of the other apps is an omniauth client; when you want to log into one, it sends you to the provider. &lt;a href="http://blog.joshsoftware.com/2010/12/16/multiple-applications-with-devise-omniauth-and-single-sign-on/"&gt;This excellent guide&lt;/a&gt; will explain everything (and provide source code!).&lt;/p&gt;
&lt;p&gt;Today, this foray doesn&amp;#8217;t have much practical significance because we&amp;#8217;ve decommissioned Living in the Map and LoveTax, so essentially it&amp;#8217;s the Inchernet and WDWOT left. For clarity I&amp;#8217;ve split them up and put the accounts back on their separate servers. In retrospect, instead of simplifying life confused the backend architecture and user interaction &amp;#8212; people had to leave WDWOT and login on makeloveland.com, etc. Going forward, my choice now would be to rewrite the OAuth strategy with more foresight and factor it into a library reusable across each app&amp;#8217;s code.&lt;/p&gt;
&lt;p&gt;❦&lt;/p&gt;</description><link>http://makingloveland.tumblr.com/post/19474672463</link><guid>http://makingloveland.tumblr.com/post/19474672463</guid><pubDate>Sat, 17 Mar 2012 18:07:00 -0400</pubDate></item><item><title>Map Considerations</title><description>&lt;p&gt;For the WDET &lt;a href="http://action.wdet.org"&gt;Call to Action&lt;/a&gt; project I had the chance to reevaluate our map toolkits and check the latest offerings. Our requirements included solid mobile interactivity, flexible shape drawing (I dig GeoJSON), choose-your-own-stylishness, and - for the wide audience we expect - the most complete browser compatibility available - including IE. So I sat down with a mocha and compiled &lt;a href="https://docs.google.com/spreadsheet/ccc?key=0Apj1pa-R5UZ0dEhqUmFMZHRFb3NGTzZjaDJITTQ3dUE"&gt;this chart&lt;/a&gt;. I used to love &lt;a href="http://polymaps.org"&gt;polymaps&lt;/a&gt; (it powers the &lt;a href="http://inchernet.com"&gt;inchernet&lt;/a&gt; and &lt;a href="http://whydontweownthis.com"&gt;WDWOT&lt;/a&gt;), but it&amp;#8217;s so bleeding-edge it doesn&amp;#8217;t support IE (at all) or smartphones (very well).&lt;/p&gt;
&lt;p&gt;&lt;a href="http://leaflet.cloudmade.com"&gt;Leaflet&lt;/a&gt; came out the clear winner, wrapped in &lt;a href="http://mapbox.com/wax/"&gt;Wax&lt;/a&gt;. I&amp;#8217;ve been digging Wax and TileMill to present big datasets fast, especially to mobile viewers. See the difference between &lt;a href="http://whydontweownthis.com"&gt;whydontweownthis.com&lt;/a&gt;, where Polymaps loads tons of client-side markers, and &lt;a href="http://wdwot.com"&gt;wdwot.com&lt;/a&gt; with its slick pre-rendered tiles. Each parcel is still clickable either way.&lt;/p&gt;
&lt;p&gt;Astute readers may have noticed I didn&amp;#8217;t mention the Google Maps API. It gets simple jobs done, isn&amp;#8217;t very customizable, and I&amp;#8217;d rather plug into the &lt;a href="http://www.openstreetmap.org/"&gt;OSM&lt;/a&gt; ecosystem.&lt;/p&gt;
&lt;p&gt;❦&lt;/p&gt;</description><link>http://makingloveland.tumblr.com/post/19271328753</link><guid>http://makingloveland.tumblr.com/post/19271328753</guid><pubDate>Wed, 14 Mar 2012 16:26:00 -0400</pubDate></item><item><title>Day One of One Day</title><description>&lt;p&gt;Hi! I&amp;#8217;m &lt;a href="http://lemonary.com"&gt;Larry&lt;/a&gt; and I write the code for &lt;a href="http://makeloveland.com"&gt;LOVELAND Technologies&lt;/a&gt;. Lately I&amp;#8217;ve been inspired by Jerry&amp;#8217;s &lt;a href="http://greatamericanpixel.tumblr.com"&gt;blog-a-day oath&lt;/a&gt; as well as my favorite design &amp;amp; development process blogs, including 37signals&amp;#8217; &lt;a href="http://37signals.com/svn"&gt;SvN&lt;/a&gt;, Etsy&amp;#8217;s &lt;a href="http://codeascraft.etsy.com/"&gt;Code as Craft&lt;/a&gt; and BERG&amp;#8217;s &lt;a href="http://berglondon.com/blog/tag/weeknotes/"&gt;weeknotes&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So here we go! Yesterday we kicked off a new project, One Day In Detroit, and since Jerry&amp;#8217;s going to be &lt;a href="http://greatamericanpixel.tumblr.com/post/19199457686/lets-make-an-app-together-live-ish-blogging-the"&gt;walking everyone through&lt;/a&gt; the process I will too. In later posts I&amp;#8217;ll travel &lt;em&gt;back through time&lt;/em&gt; to show you fun techniques from our other sites. Here&amp;#8217;s what&amp;#8217;s involved in spinning up a new app!&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Create a new &lt;a href="http://rubyonrails.org"&gt;Rails&lt;/a&gt; project on my laptop and point my web server to it. I&amp;#8217;ve always happily used &lt;a href="http://www.modrails.com/"&gt;Passenger&lt;/a&gt; and &lt;a href="http://www.fngtps.com/passenger-preference-pane"&gt;Preferences Pane&lt;/a&gt;, but today I&amp;#8217;m trying out &lt;a href="http://pow.cx/"&gt;Pow&lt;/a&gt; (which is rad). Either way, a few seconds and you have a site running your app at &lt;a href="http://oneday.dev"&gt;http://oneday.dev&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;You&amp;#8217;ll want a database to go with that. Make an empty MySQL db on the dev machine (and on the testing server for good measure). Call them oneday_local and oneday_stage. &lt;/li&gt;
&lt;li&gt;I sketch out the data models for the app, basically the high-level Things we&amp;#8217;ll be manipulating. In this case, I&amp;#8217;ll say Tours, Places, and Users. A Tour is a list of Places. Write down their attributes (name, description, location, etc) and run a &amp;#8220;rails generate model Tour&amp;#8230;&amp;#8221; and &amp;#8220;rake db:migrate&amp;#8221; and you&amp;#8217;re in business.&lt;/li&gt;
&lt;li&gt;Caveats: you need to tweak the place.rb model file and Place migration for RGeo (see below) so that it makes your table &lt;em&gt;spatial&lt;/em&gt;. And also use the Devise generator for your user.rb &amp;amp; migration&amp;#8230; the docs cover this. &lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;I&amp;#8217;ll gather the building blocks (&lt;a href="http://rubygems.org"&gt;gems&lt;/a&gt;) for big chunks of functionality thanks to the lovely Ruby ecosystem. For starters let&amp;#8217;s plunk these in the &lt;a href="http://gembundler.com/"&gt;Gemfile&lt;/a&gt;:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://haml-lang.com"&gt;haml&lt;/a&gt; for page templates. It&amp;#8217;s just so much more &lt;em&gt;pleasant&lt;/em&gt; than ERB.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/plataformatec/devise"&gt;devise&lt;/a&gt; handles user authentication &amp;amp; registration &amp;amp; so on. Full-featured, bulletproof, customizable, the industry standard for handling users in Rails 3.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/intridea/omniauth"&gt;omniauth&lt;/a&gt; works with Devise to not only add authentication to Facebook and Twitter, but several dozen other services. Awesome.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.daniel-azuma.com/blog/archives/28"&gt;rgeo&lt;/a&gt; to work with geography features (it provides geometric data types and projection goodies. Works with &lt;a href="http://dev.mysql.com/doc/refman/5.0/en/spatial-extensions.html"&gt;MySQL spatial&lt;/a&gt; and PostGIS. The rgeo_json gem will translate geometry to &lt;a href="http://www.geojson.org/"&gt;GeoJSON&lt;/a&gt; for your javascript mapping pleasure. I like this path a lot, very intuitive and accomplishes a lot with notsomuch code.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/smartinez87/exception_notification"&gt;exception_notification&lt;/a&gt; is a life saver when you administer over a dozen sites on your own. It emails you whenever there&amp;#8217;s an exception in your Rails program. Simple!&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/amatsuda/kaminari"&gt;kaminari&lt;/a&gt; for slicing your content into pages&lt;/li&gt;
&lt;li&gt;&lt;a href="http://nokogiri.org/"&gt;nokogiri&lt;/a&gt; for parsing XML documents&lt;/li&gt;
&lt;li&gt;&lt;a href="http://andand.rubyforge.org/"&gt;andand&lt;/a&gt; offers you a fun shorthand for checking object properties; I use it all the time.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/thoughtbot/paperclip"&gt;paperclip&lt;/a&gt; is photo uploading made &lt;em&gt;super&lt;/em&gt; easy.&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;For the front-end libraries I&amp;#8217;ll kick off with&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://jquery.com/"&gt;jQuery&lt;/a&gt; in every project. Do I need to say anything about this?&lt;/li&gt;
&lt;li&gt;Twitter &lt;a href="http://twitter.github.com/bootstrap/"&gt;Bootstrap&lt;/a&gt; gets you good-looking, snappy UI components and base styling.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://960.gs/"&gt;960.gs&lt;/a&gt; for the 12-column grid layout (Bootstrap does this too now but I&amp;#8217;m accustomed to 960!)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://mapbox.com/wax/"&gt;Wax&lt;/a&gt; &amp;amp; &lt;a href="http://leaflet.cloudmade.com/"&gt;Leaflet&lt;/a&gt; for lightweight web maps. Leaflet rocks as an alternative to Google Maps - not only can you choose your tile-styles from CloudMade&amp;#8217;s library, design your own, &lt;em&gt;render&lt;/em&gt; your own with &lt;a href="http://mapbox.com/tilemill/"&gt;TileMill&lt;/a&gt;, but it plays nice with GeoJSON and works on your smartphone.&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;That&amp;#8217;s the toolbox so far. &lt;/div&gt;
&lt;p&gt;❦ &lt;/p&gt;</description><link>http://makingloveland.tumblr.com/post/19267073663</link><guid>http://makingloveland.tumblr.com/post/19267073663</guid><pubDate>Tue, 13 Mar 2012 21:28:00 -0400</pubDate></item></channel></rss>
