<?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>Simplicity, elegancy in software, technology and in the world. Father of a beautiful girl and little boy and entrepreneur.</description><title>JGUIMONT&gt;COM</title><generator>Tumblr (3.0; @juggy)</generator><link>http://jguimont.com/</link><item><title>Protip: BrowserStack local tunnel</title><description>&lt;p&gt;You can now use the BrowserStack local tunnel from the command line. Just download the jar file from &lt;a href="http://www.browserstack.com/local-testing"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Once done, copy it in your home folder and add this to your .profile&amp;#160;:&lt;/p&gt;
&lt;pre&gt;function tunnel(){
  java -jar ~/.browserstack/BrowserStackTunnel.jar &amp;lt;KEY&amp;gt; localhost,$1,0;
}
&lt;/pre&gt;
&lt;p&gt;You can now use the tunnel like so fromt he command line:&lt;/p&gt;
&lt;pre&gt;#: tunnel 3501
&lt;/pre&gt;</description><link>http://jguimont.com/post/40182330824</link><guid>http://jguimont.com/post/40182330824</guid><pubDate>Thu, 10 Jan 2013 12:16:12 -0500</pubDate></item><item><title>Mahdi Yusuf: Beautiful Tools</title><description>&lt;a href="http://www.mahdiyusuf.com/post/24784023641/beautiful-tools"&gt;Mahdi Yusuf: Beautiful Tools&lt;/a&gt;: &lt;p&gt;(via &lt;a href="http://www.instapaper.com/"&gt;Instapaper&lt;/a&gt;)&lt;/p&gt;</description><link>http://jguimont.com/post/39319756192</link><guid>http://jguimont.com/post/39319756192</guid><pubDate>Mon, 31 Dec 2012 13:25:01 -0500</pubDate></item><item><title>External Javascript optimizing</title><description>&lt;p&gt;If you remember my post about the performance degradation of using external javascripts like Google Analytics, UserVoice or Intercom (&lt;a href="http://jguimont.com/post/10830448168/all-those-services"&gt;All Those Services&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;It seems I was not crazy after all because I found out &lt;a href="https://www.cloudflare.com/features-optimizer"&gt;CloudFlare&lt;/a&gt; and their optimizer service. In relation with their CDN and proxying, it allows to optimize your external resources without changing your app, code or provider.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;ll give it a try.&lt;/p&gt;</description><link>http://jguimont.com/post/13257199485</link><guid>http://jguimont.com/post/13257199485</guid><pubDate>Thu, 24 Nov 2011 11:51:09 -0500</pubDate></item><item><title>Structuring and organizing a Backbone.js app with Module</title><description>&lt;p&gt;I created a simple one file project to help people structure their Backbone.js application. I called it module and you can find the source on Github here &lt;a href="https://github.com/juggy/backbone-module"&gt;&lt;a href="https://github.com/juggy/backbone-module"&gt;https://github.com/juggy/backbone-module&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Backbone Module is a simple and elegant solution to load your in browser javascript dependencies. It leverages &lt;a href="http://documentcloud.github.com/backbone/"&gt;Backbone&lt;/a&gt; eventing and &lt;a href="http://documentcloud.github.com/underscore/"&gt;Underscore&lt;/a&gt; to bring even more goodness.&lt;/p&gt;

&lt;p&gt;First of all, it is not a script loader like require.js or a bunch of other libraries. I believe you are better off loading a single monolitic file in the browser and have it cached instead of loading them all by yourself (and doing the browser&amp;#8217;s job of optimizing the load).&lt;/p&gt;

&lt;p&gt;You might say: &amp;#8220;Excuse me mister, but, if I may object, a dependency loader is useless in a monolitic file&amp;#8221; and to that I will answer &amp;#8220;You are right, if you want to bang your head against the wall everytime you want to refactor something&amp;#8221;.&lt;/p&gt;

&lt;p&gt;The truth is that you do not develop a web app in a single javascript file. You create multiple files (each with it&amp;#8217;s own scope), you assemble them and upload them to a CDN somewhere in the sky next to the moon. I use &lt;a href="http://documentcloud.github.com/jammit/"&gt;Jammit&lt;/a&gt; to do so in development.&lt;/p&gt;

&lt;p&gt;When you do that and do not think about anything, you will end up with loading exceptions in the browser. Oh! that file should load before this one, let&amp;#8217;s change the config. Oh! now it is this one. Back and forth and back and forth. No rapid development.&lt;/p&gt;

&lt;p&gt;The solution I use is simple. You wrap each file in a Backbone.module call and reference them using that same Backbone.module call.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;((mod)-&amp;gt;
  #... my app code here
  mod.start = -&amp;gt;
    console.log "starting"
(Backbone.module("app")))

# ...
Backbone.module("app").start()
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This is fine when you do not have any dependencies between your modules. When you have dependencies, you should use the define call:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Backbone.module("core/models").define 
  property: "Quote"
  depends: {"core/models" : "EventedModel"}
, (mod)-&amp;gt;
  mod.Quote = mod.EventedModel.extend
    initialize: -&amp;gt;
     #...
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;So that reads: for the &amp;#8220;core/models&amp;#8221; modules define a property called &amp;#8220;Quote&amp;#8221; that will depend on the property &amp;#8220;EventedModel&amp;#8221; of the &amp;#8220;core/model&amp;#8221; module. You can also define multiple depedencies from multiple modules. That is pretty all there is to it.&lt;/p&gt;

&lt;p&gt;My Backbone applications are usually built like that:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;core

&lt;ul&gt;&lt;li&gt;index.coffee (the main &amp;#8220;core&amp;#8221; module which references all sub module like &amp;#8220;models&amp;#8221;)&lt;/li&gt;
&lt;li&gt;helpers&lt;/li&gt;
&lt;li&gt;models&lt;/li&gt;
&lt;li&gt;routers&lt;/li&gt;
&lt;li&gt;views&lt;/li&gt;
&lt;li&gt;templates&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;project

&lt;ul&gt;&lt;li&gt;index.coffee&lt;/li&gt;
&lt;li&gt;routers&lt;/li&gt;
&lt;li&gt;models&lt;/li&gt;
&lt;li&gt;&amp;#8230;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;quote

&lt;ul&gt;&lt;li&gt;index.coffee&lt;/li&gt;
&lt;li&gt;routers&lt;/li&gt;
&lt;li&gt;models&lt;/li&gt;
&lt;li&gt;&amp;#8230;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;invoice

&lt;ul&gt;&lt;li&gt;index.coffee&lt;/li&gt;
&lt;li&gt;routers&lt;/li&gt;
&lt;li&gt;models&lt;/li&gt;
&lt;li&gt;&amp;#8230;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;My index.coffee looks like this&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;((core)-&amp;gt;

  _.extend core,
    views : core.module("core/views")
    models : core.module("core/models")
    helpers: core.module("core/helpers")
    routers: core.module("core/routers")

)(Backbone.module("core"))
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;</description><link>http://jguimont.com/post/11890935147</link><guid>http://jguimont.com/post/11890935147</guid><pubDate>Mon, 24 Oct 2011 21:56:15 -0400</pubDate><category>code</category><category>javascript</category></item><item><title>All those services...</title><description>&lt;p&gt;You have a cool startup idea. You want to enhance other people&amp;#8217;s web application or web site with metrics gathering, analytics, realtime data, two ways communication, chat, blinking or mustaches on cats. Who knows.&lt;/p&gt;
&lt;p&gt;You build your startup and application. You do what everyone else is doing since (I believe) Google Analytics: they configure your application and get a code snippet. They install this snippet on their homepage, web app, whatever. Life is good. &lt;/p&gt;
&lt;p&gt;Problem is that you are not alone doing this. At Porkepic we happen to love using KISSmetrics, Google Analytics, Intercom and UserVoice. Four services that we use daily. Four services that each load a script. Four services with each a different loading mechanism: from the simple javascript include to the deferred loading multiline script. Two of those services generate DOM elements and load images, CSS.&lt;/p&gt;
&lt;p&gt;We load tons of crap with those snippets. Javascripts, DOM, images, CSS. Some even include a complete jQuery version (!). Your browser have to load, parse, execute all of those files on each page load. (Some does a good job, but most do not even minimize their files.)&lt;/p&gt;
&lt;p&gt;Not mentioning you have to maintain those scripts and includes within your code base.&lt;/p&gt;
&lt;p&gt;This is a pain.&lt;/p&gt;
&lt;p&gt;I am imagining a central service that would let you standardize these services behavior for your web app. You log into the service. You configure the different files you want to load, you configure if you are already using jQuery or JSON or anything like this on your web app already and you configure the loading mechanism you want to have.  Once that is done, the service goes and fetch all scripts, sanitize them (checks for duplicate scripts like jQuery), minimifies them and send them to a CDN to be served up to your app when needed. &lt;/p&gt;
&lt;p&gt;All the config happens in the service. After the initial setup on your application, there would be nothing else to do. &lt;/p&gt;
&lt;p&gt;What would be even more useful is that all those vendors standardize their practice to use such service and provide piece by piece code loading. So if you want to load the code to have a helpdesk widget to let your customer enter support message but do not want to load the code for the chat widget you could. &lt;/p&gt;
&lt;p&gt;Yeah. I am dreaming.&lt;/p&gt;</description><link>http://jguimont.com/post/10830448168</link><guid>http://jguimont.com/post/10830448168</guid><pubDate>Thu, 29 Sep 2011 21:25:11 -0400</pubDate><category>saas</category><category>javascript</category><category>startup</category></item><item><title>Revert to last saved version in Backbone.js</title><description>&lt;p&gt;Here is one simple code snippet in Coffeescript to revert easily from the last saved version in Backbone.js models:&lt;/p&gt;
&lt;p&gt;
&lt;script src="https://gist.github.com/1023110.js?file=gistfile1.coffee"&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p&gt;Do not forget you have to call Skepic.EventedModel.prototype.initialize if you override initialize in your own model.&lt;/p&gt;</description><link>http://jguimont.com/post/6490583174</link><guid>http://jguimont.com/post/6490583174</guid><pubDate>Mon, 13 Jun 2011 12:26:00 -0400</pubDate></item><item><title>How to render a full page template in a rake task with Rails 3</title><description>&lt;p&gt;I stumbled upon this problem this week. There are many blog posts on how to do this in Rails 2, but not many for Rails 3 and most are broken in some ways. So I dug a little and found a nice solution.&lt;/p&gt;
&lt;p&gt;First of all, Rails 3 is broken down into distinct modules that enables developer to pick and chose features and assemble them into something new. This is mostly what is happening with the new mailers. They include the features from a normal ActionController but in a different context. When you read the code of the mailers you will see that it includes a bunch of AbstractController modules. The same modules are also found in ActionController::Base. These are the basic building blocks to render templates in rails. &lt;/p&gt;
&lt;p&gt;So this is how I created this OfflineTemplate class that allows you to render anything offline, in a rake task or in a cron job. You can render a partial, a string, XML, json or a page including its layout. &lt;/p&gt;
&lt;p&gt;
&lt;script src="https://gist.github.com/977181.js"&gt; &lt;/script&gt;&lt;/p&gt;
&lt;p&gt;Comments on the implementation are welcome!&lt;/p&gt;</description><link>http://jguimont.com/post/5582583230</link><guid>http://jguimont.com/post/5582583230</guid><pubDate>Tue, 17 May 2011 15:35:05 -0400</pubDate></item><item><title>Hello Julien&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Thank you for responding to my question on stackoverflow&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
http://stackoverflow.com/questions/5964537/backbone-js-and-handling-errors-messages-from-rails&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
I wonder if you could please explain how to implement a custom Responder, for example where should such code live in a Rails project?&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Thank you again&lt;br /&gt;&#13;
&lt;br /&gt;&#13;
Andrew</title><description>&lt;p&gt;Responders are new in Rails 3. You have to defined them in your project. I created a lib/js_responder.rb and used the code I put in StackOverflow. Your responder module must be itself in the Responders Rails module.&lt;/p&gt;</description><link>http://jguimont.com/post/5456193407</link><guid>http://jguimont.com/post/5456193407</guid><pubDate>Fri, 13 May 2011 15:15:56 -0400</pubDate></item><item><title>hi Julien,&lt;br /&gt;&#13;
Thanks for your post on PDFKit and its middleware on Heroku. I am using rails 2.3.4 (I plan to upgrade soon), and I am running into the same problem that you mentioned about.&lt;br /&gt;&#13;
While I understand your solution, I'm still not clear where to place the assets.rb code. I have tried a few places, but it doesn't seem to work. Looking forward to your reply.&lt;br /&gt;&#13;
Thanks</title><description>&lt;p&gt;It is an initializer, it needs to live in the config/initializers directory of your rails app.&lt;/p&gt;</description><link>http://jguimont.com/post/5334586836</link><guid>http://jguimont.com/post/5334586836</guid><pubDate>Mon, 09 May 2011 10:26:42 -0400</pubDate></item><item><title>Seth's Blog: The realization is now</title><description>&lt;a href="http://sethgodin.typepad.com/seths_blog/2011/04/the-realization-is-here.html?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed:+typepad/sethsmainblog+(Seth's+Blog)"&gt;Seth's Blog: The realization is now&lt;/a&gt;: &lt;p&gt;(via &lt;a href="http://www.instapaper.com/"&gt;Instapaper&lt;/a&gt;)&lt;/p&gt;</description><link>http://jguimont.com/post/5000532453</link><guid>http://jguimont.com/post/5000532453</guid><pubDate>Wed, 27 Apr 2011 21:41:30 -0400</pubDate></item><item><title>Web apps, credit cards, merchant accounts and PayPalPlayNice.ly | PlayNice.ly</title><description>&lt;a href="http://playnice.ly/blog/2011/03/23/web-apps-credit-cards-merchant-accounts-and-paypal/"&gt;Web apps, credit cards, merchant accounts and PayPalPlayNice.ly | PlayNice.ly&lt;/a&gt;: &lt;p&gt;(via &lt;a href="http://www.instapaper.com/"&gt;Instapaper&lt;/a&gt;)&lt;/p&gt;</description><link>http://jguimont.com/post/4485612769</link><guid>http://jguimont.com/post/4485612769</guid><pubDate>Sun, 10 Apr 2011 04:09:43 -0400</pubDate></item><item><title>How to find startup ideas that make money | Paras Chopra's Blog</title><description>&lt;a href="http://paraschopra.com/blog/entrepreneurship/how-to-find-startup-ideas-that-make-money.htm?src=hn"&gt;How to find startup ideas that make money | Paras Chopra's Blog&lt;/a&gt;: &lt;p&gt;(via &lt;a href="http://www.instapaper.com/"&gt;Instapaper&lt;/a&gt;)&lt;/p&gt;</description><link>http://jguimont.com/post/4380547404</link><guid>http://jguimont.com/post/4380547404</guid><pubDate>Wed, 06 Apr 2011 02:08:39 -0400</pubDate></item><item><title>Call Me Fishmeal.: Success, and Farming vs. Mining</title><description>&lt;a href="http://blog.wilshipley.com/2011/04/success-and-farming-vs-mining.html"&gt;Call Me Fishmeal.: Success, and Farming vs. Mining&lt;/a&gt;: &lt;p&gt;(via &lt;a href="http://www.instapaper.com/"&gt;Instapaper&lt;/a&gt;)&lt;/p&gt;</description><link>http://jguimont.com/post/4380160997</link><guid>http://jguimont.com/post/4380160997</guid><pubDate>Wed, 06 Apr 2011 01:48:35 -0400</pubDate></item><item><title>
	  
	    Product design at GitHub — Warpspire
	  
	</title><description>&lt;a href="http://warpspire.com/posts/product-design/"&gt;
	  
	    Product design at GitHub — Warpspire
	  
	&lt;/a&gt;: &lt;p&gt;(via &lt;a href="http://www.instapaper.com/"&gt;Instapaper&lt;/a&gt;)&lt;/p&gt;</description><link>http://jguimont.com/post/4235934929</link><guid>http://jguimont.com/post/4235934929</guid><pubDate>Thu, 31 Mar 2011 16:54:16 -0400</pubDate></item><item><title>Got my first commit on a open source project this week:
Zombie callbacks on inputs
Thanks assaf!</title><description>&lt;p&gt;Got my first commit on a open source project this week:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/assaf/zombie/commit/cffaabbb9c4640e5402156cb84d0262d5584151e"&gt;Zombie callbacks on inputs&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks assaf!&lt;/p&gt;</description><link>http://jguimont.com/post/4065613136</link><guid>http://jguimont.com/post/4065613136</guid><pubDate>Thu, 24 Mar 2011 12:54:56 -0400</pubDate></item><item><title>PDFKit and its middleware on Heroku</title><description>&lt;p&gt;I run into this problem with PDFKit middleware where the PDF generation seems to hang indefinitely for no apparent reason on Heroku as well as locally when using Thin.&lt;/p&gt;
&lt;p&gt;Wkhtmltopdf will load the HTML and then try to load all assets from it (js, css, images, etc.) On Heroku the asset is first served up by the rails server and when you have a single Dyno it will create a deadlock in the handling of the HTTP request. The user trying to access the pdf document will consume the Dynos and the PDF generator will wait for it. Deadlock.&lt;/p&gt;
&lt;p&gt;Two ways around that:&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Access the static files directly from the web server and not Rails&lt;/li&gt;
&lt;li&gt;Access the static files locally&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;The first option requires some setup (cloudfront and such) and some actions at deployment. Overall this requires to much work.&lt;/p&gt;
&lt;p&gt;The second option is the one I preferred. I used Rails asset_host to have all assets for a PDF generation fetch locally (file://). Here is the gist of it:&lt;/p&gt;
&lt;p&gt;
&lt;script src="https://gist.github.com/768696.js"&gt; &lt;/script&gt;&lt;/p&gt;
&lt;p&gt;Works as intended! Hope this will save some people the time I spent on this.&lt;/p&gt;
&lt;p&gt;(Note: You first have to follow Matt&amp;#8217;s instructions on how to install &lt;a title="wkhtmltopdf on Heroku" href="http://blog.mattgornick.com/using-pdfkit-on-heroku"&gt;wkhtmltopdf on Heroku&lt;/a&gt; )&lt;/p&gt;</description><link>http://jguimont.com/post/2627758108</link><guid>http://jguimont.com/post/2627758108</guid><pubDate>Thu, 06 Jan 2011 17:15:00 -0500</pubDate><category>pdfkit</category><category>rails</category><category>heroku</category></item><item><title>How to Pick the Perfect Brand Name</title><description>&lt;a href="http://www.fastcompany.com/magazine/151/made-to-stick-the-quest-forthe-perfect-name.html"&gt;How to Pick the Perfect Brand Name&lt;/a&gt;: &lt;p&gt;It is More than complicated to find a descriptive, powerful and nice name for a product/company. Even harder that when you cannot name something, it is like it doesn’t exist yet.&lt;/p&gt;

&lt;p&gt;(via &lt;a href="http://www.instapaper.com/"&gt;Instapaper&lt;/a&gt;)&lt;/p&gt;</description><link>http://jguimont.com/post/2623287802</link><guid>http://jguimont.com/post/2623287802</guid><pubDate>Thu, 06 Jan 2011 09:25:22 -0500</pubDate></item><item><title>DIY Guide to Link Bait</title><description>&lt;a href="http://blog.kissmetrics.com/link-bait/"&gt;DIY Guide to Link Bait&lt;/a&gt;: &lt;p&gt;I guess I will work on that for our new app. We need to get going!&lt;/p&gt;

&lt;p&gt;(via &lt;a href="http://www.instapaper.com/"&gt;Instapaper&lt;/a&gt;)&lt;/p&gt;</description><link>http://jguimont.com/post/2535439658</link><guid>http://jguimont.com/post/2535439658</guid><pubDate>Thu, 30 Dec 2010 21:09:11 -0500</pubDate></item><item><title>Easier templating in Javascript</title><description>&lt;p&gt;I just created a new repo on Github called &lt;a title="template-fetch" href="https://github.com/juggy/template-fetch"&gt;template-fetch&lt;/a&gt;. The goal of those 60 lines of code is simple: retrieve an haml template from the server and process it on the client side using HAML (for now). I plan to add other templating engines when I have more time.&lt;/p&gt;
&lt;p&gt;It uses jQuery, underscore.js and haml.js to do its magic.&lt;/p&gt;
&lt;p&gt;It is mostly inspired from &lt;a title="Sammy" href="https://github.com/quirkey/sammy"&gt;Sammy&lt;/a&gt; and was built when I was tinkering with Backbone.js . I think it can be useful to other, you tell me!&lt;/p&gt;
&lt;p&gt;Comment are always welcome.&lt;/p&gt;</description><link>http://jguimont.com/post/1591679989</link><guid>http://jguimont.com/post/1591679989</guid><pubDate>Tue, 16 Nov 2010 10:33:47 -0500</pubDate></item><item><title>Powerful message here. That should be my manifesto or my...</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_lan6kyLCNL1qz6lh3o1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Powerful message here. That should be my manifesto or my company’s manifesto. A lot to think about in a small page…&lt;/p&gt;</description><link>http://jguimont.com/post/1366055062</link><guid>http://jguimont.com/post/1366055062</guid><pubDate>Thu, 21 Oct 2010 09:24:33 -0400</pubDate></item></channel></rss>
