<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-266186810523295200</id><updated>2011-12-27T16:14:51.733-08:00</updated><category term='Patent pending'/><category term='GitHub'/><category term='Scott Chacon'/><category term='Git'/><category term='Ruby'/><category term='Database'/><category term='color'/><category term='ActiveRecord'/><category term='HTML'/><category term='Test-driven development'/><category term='Representational State Transfer'/><category term='FBJS'/><category term='Ruby on Rails'/><category term='Capitalism'/><category term='JavaScript'/><category term='Facebook'/><category term='Model-view-controller'/><category term='Programming'/><title type='text'>Alan Carl Brown</title><subtitle type='html'>Adventures in software development</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ezacb.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/266186810523295200/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ezacb.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Al Brown</name><uri>http://www.blogger.com/profile/11849809556416101947</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>13</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-266186810523295200.post-2031037702273460797</id><published>2011-07-17T19:23:00.000-07:00</published><updated>2011-07-17T19:24:47.647-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GitHub'/><category scheme='http://www.blogger.com/atom/ns#' term='Git'/><category scheme='http://www.blogger.com/atom/ns#' term='Scott Chacon'/><title type='text'>Learning Git</title><content type='html'>&lt;span class="zemanta-img separator" style="clear: right;"&gt;&lt;a href="http://www.flickr.com/photos/41894174966@N01/3389758506" style="clear: right; display: block; float: right; margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="Scott Chacon: Getting Git" height="160" src="http://farm4.static.flickr.com/3574/3389758506_116abc6309_m.jpg" style="border: none; font-size: 0.8em;" width="240" /&gt;&lt;/a&gt;&lt;span class="zemanta-img-attribution" style="clear: both; float: right; margin-left: 1em; margin-right: 1em; width: 240px;"&gt;Image by &lt;a href="http://www.flickr.com/photos/41894174966@N01/3389758506"&gt;fraserspeirs&lt;/a&gt; via Flickr&lt;/span&gt;&lt;/span&gt;To learn a challenging topic, first find someone who knows both the topic and how to teach. &amp;nbsp;For git, Scott Chacon is one of those guys. &amp;nbsp;Scott is a Rails developer working for github, THE place to host your open source git repository. &amp;nbsp;Here's Scott:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://0.gvt0.com/vi/QF_OlomyKQQ/0.jpg" height="266" width="320"&gt;&lt;param name="movie" value="http://www.youtube.com/v/QF_OlomyKQQ&amp;playnext=1&amp;list=PLCA6DCD081291803F" /&gt;&lt;param name="bgcolor" value="#FFFFFF" /&gt;&lt;embed width="320" height="266"  src="http://www.youtube.com/v/QF_OlomyKQQ&amp;playnext=1&amp;list=PLCA6DCD081291803F" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;I recommend trying everything discussed yourself as the video progresses, stopping when you need more time or need to google what you don't understand.&lt;br /&gt;&lt;div class="zemanta-related"&gt;&lt;h6 class="zemanta-related-title" style="font-size: 1em; margin: 1em 0 0 0;"&gt;Related articles&lt;/h6&gt;&lt;ul class="zemanta-article-ul"&gt;&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://sixrevisions.com/resources/git-tutorials-beginners/"&gt;Top 10 Git Tutorials for Beginners&lt;/a&gt; (sixrevisions.com)&lt;/li&gt;&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://progit.org/2011/07/11/reset.html"&gt;imabonehead: Pro Git - Reset Demystified&lt;/a&gt; (progit.org)&lt;/li&gt;&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://stackoverflow.com/questions/6568337/does-using-git-make-sense-for-small-internal-teams/6568474"&gt;Git makes the filesystem its Bitch&lt;/a&gt; (stackoverflow.com)&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="zemanta-pixie" style="height: 15px; margin-top: 10px;"&gt;&lt;a class="zemanta-pixie-a" href="http://www.zemanta.com/" title="Enhanced by Zemanta"&gt;&lt;img alt="Enhanced by Zemanta" class="zemanta-pixie-img" src="http://img.zemanta.com/zemified_e.png?x-id=8ae9c1b2-b516-4292-a983-eacfb20e5ad7" style="border: none; float: right;" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/266186810523295200-2031037702273460797?l=ezacb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ezacb.blogspot.com/feeds/2031037702273460797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=266186810523295200&amp;postID=2031037702273460797' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/266186810523295200/posts/default/2031037702273460797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/266186810523295200/posts/default/2031037702273460797'/><link rel='alternate' type='text/html' href='http://ezacb.blogspot.com/2011/07/learning-git.html' title='Learning Git'/><author><name>Al Brown</name><uri>http://www.blogger.com/profile/11849809556416101947</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm4.static.flickr.com/3574/3389758506_116abc6309_t.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-266186810523295200.post-8884021503249921741</id><published>2011-07-08T17:23:00.000-07:00</published><updated>2011-07-08T17:30:01.039-07:00</updated><title type='text'>Become a Learning Machine</title><content type='html'>&lt;span class="zemanta-img separator" style="clear: right;"&gt;&lt;a href="http://www.flickr.com/photos/50835495@N00/101094011" style="clear: right; display: block; float: right; margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="Binary" height="182" src="http://farm1.static.flickr.com/43/101094011_12531809d8_m.jpg" style="border: none; font-size: 0.8em;" width="240" /&gt;&lt;/a&gt;&lt;span class="zemanta-img-attribution" style="clear: both; float: right; margin-left: 1em; margin-right: 1em; width: 240px;"&gt;Image by &lt;a href="http://www.flickr.com/photos/50835495@N00/101094011"&gt;Xerones&lt;/a&gt; via Flickr&lt;/span&gt;&lt;/span&gt;If you find your education lacking, its now easier than ever to learn your way out of it. Universities all over the world put their lectures online. You can find one that teaches the topic of interest in a way that works for you.&lt;br /&gt;&lt;br /&gt;And if you don't understand something, you can STOP the lecture and google it until you do. Replay the few seconds of video to make sure you heard it right. Do whatever it takes. You're in control.&lt;br /&gt;&lt;br /&gt;Become a learning machine. Then no one can stop you.&lt;br /&gt;&lt;br /&gt;Case in point. I lack a computer science background and get stumped when asked about basic software engineering concepts like sorting algorithms. &amp;nbsp;And I'm a software engineering. Or at least I play one on TV. :-)&lt;br /&gt;&lt;br /&gt;So I finally decided to do something about it. I've found several courses on the topic. Here's a great one from Australia:&lt;br /&gt;&lt;br /&gt;http://www.youtube.com/watch?v=RpRRUQFbePU&lt;br /&gt;&lt;br /&gt;All the world's knowledge is being made accessible to you. Seize the opportunity!&lt;br /&gt;&lt;div class="zemanta-pixie" style="height: 15px; margin-top: 10px;"&gt;&lt;a class="zemanta-pixie-a" href="http://www.zemanta.com/" title="Enhanced by Zemanta"&gt;&lt;img alt="Enhanced by Zemanta" class="zemanta-pixie-img" src="http://img.zemanta.com/zemified_e.png?x-id=c370e245-22f9-48c1-a3b1-549c89d3266c" style="border: none; float: right;" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/266186810523295200-8884021503249921741?l=ezacb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ezacb.blogspot.com/feeds/8884021503249921741/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=266186810523295200&amp;postID=8884021503249921741' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/266186810523295200/posts/default/8884021503249921741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/266186810523295200/posts/default/8884021503249921741'/><link rel='alternate' type='text/html' href='http://ezacb.blogspot.com/2011/07/become-learning-machine.html' title='Become a Learning Machine'/><author><name>Al Brown</name><uri>http://www.blogger.com/profile/11849809556416101947</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm1.static.flickr.com/43/101094011_12531809d8_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-266186810523295200.post-5353167855999582712</id><published>2011-07-08T17:22:00.001-07:00</published><updated>2011-07-08T17:22:35.357-07:00</updated><title type='text'>JavaScript Semicolon Insertion</title><content type='html'>&lt;span class="zemanta-img separator" style="clear: right;"&gt;&lt;a href="http://www.flickr.com/photos/99247795@N00/4299152140" style="clear: right; display: block; float: right; margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="Code review" height="240" src="http://farm5.static.flickr.com/4038/4299152140_9a860a1ac1_m.jpg" style="border: none; font-size: 0.8em;" width="227" /&gt;&lt;/a&gt;&lt;span class="zemanta-img-attribution" style="clear: both; float: right; margin-left: 1em; margin-right: 1em; width: 227px;"&gt;Image by &lt;a href="http://www.flickr.com/photos/99247795@N00/4299152140"&gt;richardmasoner&lt;/a&gt; via Flickr&lt;/span&gt;&lt;/span&gt;Here's a good&amp;nbsp;&lt;a href="http://inimino.org/~inimino/blog/javascript_semicolons"&gt;discussion&lt;/a&gt;&amp;nbsp;of when a Javascript developer should use semicolons. &lt;br /&gt;&lt;br /&gt;Basically, semicolons are statement separators and there are situations where a line break won't be interpreted as the end of a statement.&lt;br /&gt;&lt;br /&gt;Many Javascript developers put them at the end of every line, but this is unnecessary. &amp;nbsp;Its better to actually understand the cases where a line break won't end a statement.&lt;br /&gt;&lt;br /&gt;If you use a minification tool that doesn't interpret line breaks correctly, bugs could be introduced. &amp;nbsp;But if you use semicolons only where you need to, a bad tool will probably break most things right away. And that will be obvious. &amp;nbsp;Use&amp;nbsp;semicolons ALMOST everywhere and then you won't discover the problems until you test specific lines that don't have them.&lt;br /&gt;&lt;div class="zemanta-pixie" style="height: 15px; margin-top: 10px;"&gt;&lt;a class="zemanta-pixie-a" href="http://www.zemanta.com/" title="Enhanced by Zemanta"&gt;&lt;img alt="Enhanced by Zemanta" class="zemanta-pixie-img" src="http://img.zemanta.com/zemified_e.png?x-id=a33723f6-3373-48b9-83f7-4ea596147cc2" style="border: none; float: right;" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/266186810523295200-5353167855999582712?l=ezacb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ezacb.blogspot.com/feeds/5353167855999582712/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=266186810523295200&amp;postID=5353167855999582712' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/266186810523295200/posts/default/5353167855999582712'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/266186810523295200/posts/default/5353167855999582712'/><link rel='alternate' type='text/html' href='http://ezacb.blogspot.com/2011/07/javascript-semicolon-insertion.html' title='JavaScript Semicolon Insertion'/><author><name>Al Brown</name><uri>http://www.blogger.com/profile/11849809556416101947</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm5.static.flickr.com/4038/4299152140_9a860a1ac1_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-266186810523295200.post-3519143444570183223</id><published>2010-04-17T09:19:00.000-07:00</published><updated>2010-04-17T09:26:11.648-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='color'/><title type='text'>Color Tools That Will Make Your Web Shine</title><content type='html'>&lt;p class="zemanta-img" style="margin-top: 1em; margin-right: 1em; margin-bottom: 1em; margin-left: 1em; float: right; display: block; width: 250px; "&gt;&lt;a href="http://www.flickr.com/photos/83864717@N00/161653632"&gt;&lt;img src="http://farm1.static.flickr.com/55/161653632_f8a4cde905_m.jpg" alt="Creative Arts Matthew Boulton College" style="border:none;display:block" width="240" height="194" /&gt;&lt;/a&gt;&lt;span class="zemanta-img-attribution"&gt;Image by &lt;a href="http://www.flickr.com/photos/83864717@N00/161653632"&gt;jisc_infonet&lt;/a&gt; via Flickr&lt;/span&gt;&lt;/p&gt;Haven't checked all of them out yet, but it looks like a &lt;a href="http://www.web-building.crispen.org/index.php?cat=color"&gt;very useful list of color tools&lt;/a&gt;.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I'm creating a new resume tool and looking for something that will let me find a professional color scheme.&lt;/div&gt;&lt;fieldset class="zemanta-related"&gt;&lt;legend class="zemanta-related-title"&gt;Related articles by Zemanta&lt;/legend&gt;&lt;ul class="zemanta-article-ul"&gt;&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://tc.eserver.org/36730.html"&gt;Color Theory for Designer, Part 3: Creating Your Own Color Palettes&lt;/a&gt; (tc.eserver.org)&lt;/li&gt;&lt;li class="zemanta-article-ul-li"&gt;&lt;a href="http://www.dotconcepts.net/blog/color-tools-web-designers"&gt;Free Color Tools and Resources for Web Designers&lt;/a&gt; (dotconcepts.net)&lt;/li&gt;&lt;/ul&gt;&lt;/fieldset&gt;  &lt;div class="zemanta-pixie" style="margin-top:10px;height:15px"&gt;&lt;a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/fd78c586-a140-435a-b66c-2c5da317ccae/" title="Reblog this post [with Zemanta]"&gt;&lt;img class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=fd78c586-a140-435a-b66c-2c5da317ccae" alt="Reblog this post [with Zemanta]" style="border:none;float:right" /&gt;&lt;/a&gt;&lt;span class="zem-script more-related pretty-attribution"&gt;&lt;script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/266186810523295200-3519143444570183223?l=ezacb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ezacb.blogspot.com/feeds/3519143444570183223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=266186810523295200&amp;postID=3519143444570183223' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/266186810523295200/posts/default/3519143444570183223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/266186810523295200/posts/default/3519143444570183223'/><link rel='alternate' type='text/html' href='http://ezacb.blogspot.com/2010/04/color-tools-that-will-make-your-web.html' title='Color Tools That Will Make Your Web Shine'/><author><name>Al Brown</name><uri>http://www.blogger.com/profile/11849809556416101947</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm1.static.flickr.com/55/161653632_f8a4cde905_t.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-266186810523295200.post-6994810211703208499</id><published>2010-02-24T06:51:00.000-08:00</published><updated>2010-02-24T07:06:54.796-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='Test-driven development'/><title type='text'>Intuit Ruby with Ruby Koans</title><content type='html'>&lt;p class="zemanta-img" style="margin: 1em; float: right; display: block; width: 160px;"&gt;&lt;a href="http://www.daylife.com/image/02n35xV10K8d1?utm_source=zemanta&amp;amp;utm_medium=p&amp;amp;utm_content=02n35xV10K8d1&amp;amp;utm_campaign=z1"&gt;&lt;img src="http://cache.daylife.com/imageserve/02n35xV10K8d1/150x102.jpg" alt="SAN FRANCISCO - SEPTEMBER 25:  A zen garden cr..." style="border: medium none ; display: block;" width="150" height="102" /&gt;&lt;/a&gt;&lt;span class="zemanta-img-attribution"&gt;Image by &lt;a href="http://www.daylife.com/source/Getty_Images"&gt;Getty Images&lt;/a&gt; via &lt;a href="http://www.daylife.com/"&gt;Daylife&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;The &lt;a href="http://github.com/edgecase/ruby_koans"&gt;ruby koans&lt;/a&gt; plugin promises to "walk you along the path to enlightenment" in your quest to understand the finer points of ruby.  &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A &lt;a class="zem_slink freebase/en/koan" href="http://en.wikipedia.org/wiki/K%C5%8Dan" title="Kōan" rel="wikipedia"&gt;koan&lt;/a&gt; is a &lt;a class="zem_slink freebase/en/zen" href="http://en.wikipedia.org/wiki/Zen" title="Zen" rel="wikipedia"&gt;Zen Buddhist&lt;/a&gt; concept meaning "a story, dialogue, question, or statement; the meaning of which cannot be understood by rational thinking, yet it may be accessible by intuition."&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Koans encourage &lt;a class="zem_slink freebase/en/test-driven_development" href="http://en.wikipedia.org/wiki/Test-driven_development" title="Test-driven development" rel="wikipedia"&gt;test driven development&lt;/a&gt; by presenting you with tests of ruby code and challenges you to make the tests run successfully by fixing the code.  Presumably, once you have acquired the intuition targeted, your test will run.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Ruby can be challenging but has a lot of power and flexibility.  And some day, maybe even scalability :-)&lt;/div&gt;&lt;/div&gt;  &lt;div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"&gt;&lt;img style="border: medium none ; float: right;" class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=d8a06b12-b11e-4d89-8994-87ea0660dfb3" /&gt;&lt;span class="zem-script more-related more-info"&gt;&lt;script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/266186810523295200-6994810211703208499?l=ezacb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ezacb.blogspot.com/feeds/6994810211703208499/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=266186810523295200&amp;postID=6994810211703208499' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/266186810523295200/posts/default/6994810211703208499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/266186810523295200/posts/default/6994810211703208499'/><link rel='alternate' type='text/html' href='http://ezacb.blogspot.com/2010/02/learn-ruby.html' title='Intuit Ruby with Ruby Koans'/><author><name>Al Brown</name><uri>http://www.blogger.com/profile/11849809556416101947</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-266186810523295200.post-8786826509722911302</id><published>2009-01-13T19:47:00.000-08:00</published><updated>2009-01-14T17:25:30.238-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Facebook'/><title type='text'>Showing and Hiding Divs in Facebook FBML</title><content type='html'>By the way, Facebook provides a simple way to open and close divs on a page.  Its fairly limited though.  I couldn't figure out how to use it in response to selecting an option from a dropdown list.&lt;br /&gt;&lt;br /&gt;But if you want to open or close a div whenever a particular link is clicked, all you need do is add a "clicktoshow" or "clicktoshow" attribute to the anchor tag for a ink.&lt;br /&gt;&lt;br /&gt;This code presents the "link_only" div initially.  Clicking the link it creates will hide this div and present the "link_and_about" div.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;div id="link_only"&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;  &amp;lt;a href="#" clicktohide="link_only" clicktoshow="link_and_about"&amp;gt;What is this?&amp;lt;/a&amp;gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;div id="link_and_about" style="display: none;"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  About text&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  &amp;lt;a href="#" clicktohide="link_and_about" clicktoshow="link_only"&amp;gt;Ok&amp;lt;/a&amp;gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The value for these attributes can be a single div id or a list of them separated by commas.&lt;br /&gt;&lt;br /&gt;There's also a "clicktotoggle" attribute you can use for a link that will always be available.&lt;br /&gt;&lt;br /&gt;It would be nice if you could call a javascript method from a form element that could open and close the same divs.  Haven't found an easy way to do this myself, but &lt;a href="http://userscripts.org/topics/9633"&gt;this post&lt;/a&gt; has some code that could be called to simulate a click.&lt;br /&gt;&lt;br /&gt;This code won't work as is on Facebook though, as the createEvent method is undefined. FBJS does have some event listener functionality; perhaps this code be used to make that happen.  Of course, this complexity is probably more trouble than what I did above.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"&gt;&lt;a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/e88fbe74-ea09-45a5-8b38-028094b8f91a/" title="Zemified by Zemanta"&gt;&lt;img style="border: medium none ; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=e88fbe74-ea09-45a5-8b38-028094b8f91a" alt="Reblog this post [with Zemanta]" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/266186810523295200-8786826509722911302?l=ezacb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ezacb.blogspot.com/feeds/8786826509722911302/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=266186810523295200&amp;postID=8786826509722911302' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/266186810523295200/posts/default/8786826509722911302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/266186810523295200/posts/default/8786826509722911302'/><link rel='alternate' type='text/html' href='http://ezacb.blogspot.com/2009/01/more-on-facebook.html' title='Showing and Hiding Divs in Facebook FBML'/><author><name>Al Brown</name><uri>http://www.blogger.com/profile/11849809556416101947</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-266186810523295200.post-7771088716894429418</id><published>2009-01-13T18:08:00.000-08:00</published><updated>2009-01-13T19:45:08.769-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Facebook'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><category scheme='http://www.blogger.com/atom/ns#' term='FBJS'/><title type='text'>Javascript for Facebook</title><content type='html'>&lt;span class="zemanta-img" style="margin: 1em; float: right; display: block; width: 212px;"&gt;&lt;a href="http://commons.wikipedia.org/wiki/Image:Facebook.svg"&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/commons/thumb/0/06/Facebook.svg/202px-Facebook.svg.png" alt="Facebook, Inc." style="border: medium none ; display: block;" width="202" height="76"&gt;&lt;/a&gt;&lt;span class="zemanta-img-attribution"&gt;Image via &lt;a href="http://commons.wikipedia.org/wiki/Image:Facebook.svg"&gt;Wikipedia&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;Just spent some time with Facebook's Javascript replacement, FBJS.  Its a must if your Facebook app has complex things to do.&lt;br /&gt;&lt;br /&gt;FBJS rewrites all of your method and variable names so your code is confined to a sandbox and cannot mess with any of Facebook's code.&lt;br /&gt;&lt;br /&gt;This renaming confines your code to a document called "aXXXXX.document", where "XXXXX" has to be your Facebook app's numeric id.  So if you have this code:&lt;br /&gt;&lt;br /&gt;&lt;div class="indented"&gt;document.getElementById('choice2_info')&lt;/div&gt;&lt;br /&gt;Facebook changes it to this:&lt;br /&gt;&lt;br /&gt;&lt;div class="indented"&gt;a19756161464_document.getElementById('choice2_info')&lt;/div&gt;&lt;br /&gt;You can see this if you look at the source for the page finally presented by Facebook.&lt;br /&gt;&lt;br /&gt;You'll also see that the id attributes for HTML elements are also changed in the page source.  The original attribute may have been:&lt;br /&gt;&lt;br /&gt;&lt;div class="indented"&gt;id="choice1_option_id"&lt;/div&gt;&lt;br /&gt;but is actually rendered as:&lt;br /&gt;&lt;br /&gt;&lt;div class="indented"&gt;id="app19756161464_choice1_option_id"&lt;/div&gt;&lt;br /&gt;When using making use of methods and id, your code should use the originals, not the replacements.  The FBJS version of getElementById will add the appropriate prefix to whatever you pass it, so it will look for an element with the id  "app19756161464_app19756161464_choice1_option_id" if you prepend the id first.&lt;br /&gt;&lt;br /&gt;FBJS also requires that you use different method names than you would if you are writing straight Javascript.  For example, instead of using ".target" to look at or change an element's target, you use ".getTarget" or ".setTarget".&lt;br /&gt;&lt;br /&gt;You can see a list of the methods affected &lt;a href="http://wiki.developers.facebook.com/index.php/FBJS#Manipulating_Objects"&gt;here&lt;/a&gt;.  There is much more on FBJS on that page and I highly recommend reading and understanding the material there before beginning a project.&lt;br /&gt;&lt;br /&gt;If you do anything complex, you'll probably want to use a tool like &lt;a href="http://getfirebug.com/"&gt;Firebug&lt;/a&gt; to set breakpoints and watch the values of key expressions.  I had a lot of trouble with the newest version, but &lt;a href="https://addons.mozilla.org/en-US/firefox/addons/versions/1843#version-1.2.1"&gt;version 1.2.2&lt;/a&gt; worked fine.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"&gt;&lt;a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/935e7c02-4bac-44b5-a1f8-c891d080b3fd/" title="Zemified by Zemanta"&gt;&lt;img style="border: medium none ; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=935e7c02-4bac-44b5-a1f8-c891d080b3fd" alt="Reblog this post [with Zemanta]"&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/266186810523295200-7771088716894429418?l=ezacb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ezacb.blogspot.com/feeds/7771088716894429418/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=266186810523295200&amp;postID=7771088716894429418' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/266186810523295200/posts/default/7771088716894429418'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/266186810523295200/posts/default/7771088716894429418'/><link rel='alternate' type='text/html' href='http://ezacb.blogspot.com/2009/01/javascript-for-facebook.html' title='Javascript for Facebook'/><author><name>Al Brown</name><uri>http://www.blogger.com/profile/11849809556416101947</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-266186810523295200.post-7369569352874430780</id><published>2008-12-03T01:58:00.000-08:00</published><updated>2008-12-20T20:40:24.898-08:00</updated><title type='text'>Capitalism in the Workplace</title><content type='html'>&lt;span class="zemanta-img" style="margin: 1em; float: right; display: block; width: 212px;"&gt;&lt;a href="http://commons.wikipedia.org/wiki/Image:IE_Real_SandP_Prices%2C_Earnings%2C_and_Dividends_1871-2006.png"&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/6f/IE_Real_SandP_Prices%2C_Earnings%2C_and_Dividends_1871-2006.png/202px-IE_Real_SandP_Prices%2C_Earnings%2C_and_Dividends_1871-2006.png" alt="Plot of S&amp;amp;P Composite Real Price Index, Earnin..." style="border: medium none ; display: block;" width="202" height="120" /&gt;&lt;/a&gt;&lt;span class="zemanta-img-attribution"&gt;Image via &lt;a href="http://commons.wikipedia.org/wiki/Image:IE_Real_SandP_Prices%2C_Earnings%2C_and_Dividends_1871-2006.png"&gt;Wikipedia&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;A bit more on the compensation end of what I spoke of.&lt;br /&gt;&lt;br /&gt;I would love to see people derive a large part of their compensation from revenue from the projects they've worked on.  Employees could be given a percentage of the project's profits (shares) in exchange for not getting part of their salary.&lt;br /&gt;&lt;br /&gt;If a project fails, employees would lose money too.&lt;br /&gt;&lt;br /&gt;But what if employees could buy and sell those shares of the project's future revenue (or some amount of money earned by success) in an internal market? A stock price for all your projects would give you a pretty good idea of what employees working on the project really think.&lt;br /&gt;&lt;br /&gt;What could be more valuable? Believe me, employees will not be blowing sunshine you know where when their own money is at stake.&lt;br /&gt;&lt;br /&gt;I'd also make it so everybody could select what projects to work on and could leave them if they decided another project would be more profitable.  By having some skin in the game and being able to act in their own interests, employees would be helping make decisions about where the company can most profitably deploy its capital.&lt;br /&gt;&lt;br /&gt;Can't get on a project? Maybe you need some skills development or a course in manners. The company can offer a coach that gets his extra compensation only when you're on projects that succeed.&lt;br /&gt;&lt;br /&gt;Still can't get someone to pick you for your team? Well maybe your base compensation starts declining gradually until you change that situation or decide another easier company is right for you.&lt;br /&gt;&lt;br /&gt;I think such an approach would make everyone in the organization tune in to what really matters.  High value opportunities, revenue-rich markets, eliminating effort wherever it doesn't create value.  And everyone would be selling themselves, selling others on opportunities and selling to the world.&lt;br /&gt;&lt;div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"&gt;&lt;a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/cd717fd8-9e81-4195-bcb2-c01ae8955ace/" title="Zemified by Zemanta"&gt;&lt;img style="border: medium none ; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=cd717fd8-9e81-4195-bcb2-c01ae8955ace" alt="Reblog this post [with Zemanta]" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/266186810523295200-7369569352874430780?l=ezacb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ezacb.blogspot.com/feeds/7369569352874430780/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=266186810523295200&amp;postID=7369569352874430780' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/266186810523295200/posts/default/7369569352874430780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/266186810523295200/posts/default/7369569352874430780'/><link rel='alternate' type='text/html' href='http://ezacb.blogspot.com/2008/12/capitalism-in-workplace.html' title='Capitalism in the Workplace'/><author><name>Al Brown</name><uri>http://www.blogger.com/profile/11849809556416101947</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-266186810523295200.post-3611425099124139388</id><published>2008-12-03T01:38:00.000-08:00</published><updated>2008-12-03T01:58:34.073-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Capitalism'/><title type='text'>How About Really Going Capitalist?</title><content type='html'>&lt;span class="zemanta-img" style="margin: 1em; float: right; display: block; width: 210px;"&gt;&lt;a href="http://commons.wikipedia.org/wiki/Image:Adam_Smith.jpg"&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/commons/4/41/Adam_Smith.jpg" alt="Adam Smith (1723-1790) {{he|דיוקנו של אדם סמית}}" style="border: medium none ; display: block;" height="308" width="200" /&gt;&lt;/a&gt;&lt;span class="zemanta-img-attribution"&gt;Image via &lt;a href="http://commons.wikipedia.org/wiki/Image:Adam_Smith.jpg"&gt;Wikipedia&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;p&gt;Why is &lt;a href="http://en.wikipedia.org/wiki/Capitalism" title="Capitalism" rel="wikipedia" class="zem_slink"&gt;capitalism&lt;/a&gt; more productive than centralized &lt;a href="http://en.wikipedia.org/wiki/Economic_system" title="Economic system" rel="wikipedia" class="zem_slink"&gt;economic systems&lt;/a&gt;?  Perhaps its because people have incentives to make decisions that benefit the system as a whole.&lt;/p&gt;&lt;p&gt;Most companies  make their decisions from the top down, making them more like the Soviet Union than a free market economy.  But could they make a change?&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I would like to see companies be more like startups internally. Employees know an enormous amount about the markets, technology and other employees that goes unleveraged when decisions are made from the top down.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I'd like to see people rewarded for the risks they take and for making decisions when their own compensation is at stake in the projects on which they work.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;An important strength of capitalism is its decentralization of decision making, with commensurate risks and rewards. But traditionally companies are run from the top down, which makes slower to react and much more inaccurate when they do.&lt;/p&gt;&lt;p&gt;Startups do a much better job at taking risks and responding to the market. But there are advantages to scale that they cannot benefit from at the same time. But a large company could combine both with the right philosophy and information systems.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Interestingly, part of the appeal of scale comes from the tax code. Transactions between companies are taxed, but transactions between employees in a company are not, so the tax burden is lower per transaction. But often the loss of effectiveness more than swamps the advantages in size. &lt;/p&gt;    &lt;div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"&gt;&lt;a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/758a357b-9e17-4fc6-aa14-f0beba72b1af/" title="Zemified by Zemanta"&gt;&lt;img style="border: medium none ; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=758a357b-9e17-4fc6-aa14-f0beba72b1af" alt="Reblog this post [with Zemanta]" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/266186810523295200-3611425099124139388?l=ezacb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ezacb.blogspot.com/feeds/3611425099124139388/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=266186810523295200&amp;postID=3611425099124139388' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/266186810523295200/posts/default/3611425099124139388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/266186810523295200/posts/default/3611425099124139388'/><link rel='alternate' type='text/html' href='http://ezacb.blogspot.com/2008/12/how-about-really-going-capitalist.html' title='How About Really Going Capitalist?'/><author><name>Al Brown</name><uri>http://www.blogger.com/profile/11849809556416101947</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-266186810523295200.post-7255041346221133272</id><published>2008-11-29T16:07:00.000-08:00</published><updated>2008-11-29T16:16:58.077-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Patent pending'/><title type='text'>Ideas are the Bomb</title><content type='html'>&lt;span class="zemanta-img" style="margin: 1em; float: right; display: block;"&gt;&lt;a href="http://www.flickr.com/photos/37996646802@N01/2802218586"&gt;&lt;img src="http://farm4.static.flickr.com/3101/2802218586_441f940d12_m.jpg" alt="Arizona Passive Rain Water Collection System (..." style="border: medium none ; display: block;" /&gt;&lt;/a&gt;&lt;span class="zemanta-img-attribution"&gt;Image by &lt;a href="http://www.flickr.com/photos/37996646802@N01/2802218586"&gt;cogdogblog&lt;/a&gt; via Flickr&lt;/span&gt;&lt;/span&gt;I'm currently working on a &lt;a href="http://en.wikipedia.org/wiki/Provisional_application" title="Provisional application" rel="wikipedia" class="zem_slink"&gt;provisional patent application&lt;/a&gt; for this idea I have, which will make life significantly better for older people.&lt;br /&gt;&lt;br /&gt;I'm also reading a book on the topic called &lt;a href="http://rcm.amazon.com/e/cm?t=losthetenblo-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=as1&amp;amp;asins=1413305113&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr"&gt;Patent Pending in 24 Hours&lt;/a&gt;.  A good resource, but its taking way more than 24 hours!  &lt;div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"&gt;&lt;a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/bd753ce7-8e1b-4e2a-9519-7472191f138a/" title="Zemified by Zemanta"&gt;&lt;img style="border: medium none ; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=bd753ce7-8e1b-4e2a-9519-7472191f138a" alt="Reblog this post [with Zemanta]" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/266186810523295200-7255041346221133272?l=ezacb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ezacb.blogspot.com/feeds/7255041346221133272/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=266186810523295200&amp;postID=7255041346221133272' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/266186810523295200/posts/default/7255041346221133272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/266186810523295200/posts/default/7255041346221133272'/><link rel='alternate' type='text/html' href='http://ezacb.blogspot.com/2008/11/ideas-are-bomb.html' title='Ideas are the Bomb'/><author><name>Al Brown</name><uri>http://www.blogger.com/profile/11849809556416101947</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm4.static.flickr.com/3101/2802218586_441f940d12_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-266186810523295200.post-7772807985152994707</id><published>2008-11-11T06:45:00.000-08:00</published><updated>2008-11-11T07:11:41.491-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ActiveRecord'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby on Rails'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='Model-view-controller'/><category scheme='http://www.blogger.com/atom/ns#' term='Database'/><title type='text'>Modelizer</title><content type='html'>&lt;span class="zemanta-img" style="margin: 1em; float: right; display: block;"&gt;&lt;a href="http://www.flickr.com/photos/9352758@N04/2755999125/"&gt;&lt;img src="http://farm4.static.flickr.com/3239/2755999125_dde3e0960b_m.jpg" alt="Journey to the Heart, a poem (89800031)" style="border: medium none ; display: block;" /&gt;&lt;/a&gt;&lt;span class="zemanta-img-attribution"&gt;Image by &lt;a href="http://www.flickr.com/photos/9352758@N04/2755999125/"&gt;Shutterhack&lt;/a&gt; via Flickr&lt;/span&gt;&lt;/span&gt;I wrote a little Rails app called &lt;a href="http://github.com/albeit/modelizer"&gt;Modelizer&lt;/a&gt; back when I was first learning about Rails model associations.&lt;br /&gt;&lt;br /&gt;Modelizer looks at the databases that your other Rails are using and identifies possible associations based on the naming conventions Rails uses for database table and column names.&lt;br /&gt;&lt;br /&gt;Modelizer creates an &lt;a href="http://en.wikipedia.org/wiki/ActiveRecord_%28Rails%29" title="ActiveRecord (Rails)" rel="wikipedia" class="zem_slink"&gt;ActiveRecord&lt;/a&gt; object that connects to the selected application's database using the credentials in each app's database.yml.&lt;br /&gt;&lt;br /&gt;What should normally go in the model for an &lt;a href="http://en.wikipedia.org/wiki/Model-view-controller" title="Model-view-controller" rel="wikipedia" class="zem_slink"&gt;MVC&lt;/a&gt; app was pretty hard to pin down for this app, so most of what should be in the model is stuck in the controller.  The model isn't specific to one schema, but actually would have to use databases instead of tables and hadn't really wrapped my head around how to do that.  Basically, ActiveRecord handles tables, not entire databases and this app treats all of your schemas as the model.&lt;br /&gt;&lt;br /&gt;This also uses &lt;a href="http://en.wikipedia.org/wiki/Ajax_%28programming%29" title="Ajax (programming)" rel="wikipedia" class="zem_slink"&gt;AJAX&lt;/a&gt; when you drill down into tables and the possible associations for each.&lt;br /&gt;   &lt;div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"&gt;&lt;a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/55d54e5b-6f18-4286-ad64-cb9e73f105aa/" title="Zemified by Zemanta"&gt;&lt;img style="border: medium none ; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=55d54e5b-6f18-4286-ad64-cb9e73f105aa" alt="Reblog this post [with Zemanta]" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/266186810523295200-7772807985152994707?l=ezacb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ezacb.blogspot.com/feeds/7772807985152994707/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=266186810523295200&amp;postID=7772807985152994707' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/266186810523295200/posts/default/7772807985152994707'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/266186810523295200/posts/default/7772807985152994707'/><link rel='alternate' type='text/html' href='http://ezacb.blogspot.com/2008/11/modelizer.html' title='Modelizer'/><author><name>Al Brown</name><uri>http://www.blogger.com/profile/11849809556416101947</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://farm4.static.flickr.com/3239/2755999125_dde3e0960b_t.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-266186810523295200.post-1434063166334278526</id><published>2008-11-07T15:58:00.001-08:00</published><updated>2010-03-08T13:02:31.039-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Representational State Transfer'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby on Rails'/><title type='text'>Using REST for a Facebook Application</title><content type='html'>&lt;span class="zemanta-img" style="margin: 1em; float: right; display: block;"&gt;&lt;a href="http://www.crunchbase.com/company/facebook"&gt;&lt;img src="http://www.crunchbase.com/assets/images/resized/0000/4552/4552v2-max-250x250.jpg" alt="Image representing Facebook as depicted in Cru..." style="border: medium none ; display: block;" /&gt;&lt;/a&gt;&lt;span class="zemanta-img-attribution"&gt;Image via &lt;a href="http://www.crunchbase.com/"&gt;CrunchBase&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;If you're into &lt;a href="http://www.rubyonrails.com/" title="Ruby on Rails" rel="homepage" class="zem_slink"&gt;Ruby on Rails&lt;/a&gt;, you've probably heard a lot about &lt;a href="http://en.wikipedia.org/wiki/Representational_State_Transfer" title="Representational State Transfer" rel="wikipedia" class="zem_slink"&gt;REST&lt;/a&gt;.  It supposedly simplifies your life, but in many situations, things actually get more complicated.&lt;br /&gt;&lt;br /&gt;Building &lt;a href="http://www.facebook.com/" title="Facebook" rel="homepage" class="zem_slink"&gt;Facebook&lt;/a&gt; apps is one of these situations.  I've been using the Facebooker Rails plugin that helps you interact with the Facebook API.&lt;br /&gt;&lt;br /&gt;Facebooker gives all requests from Facebook an "fbml" format. You need to add this line to your config/initializers/mime_types.rb file:&lt;br /&gt;&lt;br /&gt;Mime::Type.register 'text/html', :fbml&lt;br /&gt;&lt;br /&gt;You need to handle this format when you call respond_to:&lt;br /&gt;&lt;br /&gt;def index&lt;br /&gt;@facts = @topic.facts&lt;br /&gt;&lt;br /&gt;respond_to do |format|&lt;br /&gt;  format.html # index.html.erb&lt;br /&gt;  format.xml  { render :xml =&gt; @facts }&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;      format.fbml&lt;/span&gt;     end&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;The meaning of RESTful requests depends on which method or HTTP verb is used.&lt;br /&gt;&lt;br /&gt;When GET is used and the path is "/topics/4/facts", the request is routed to the controller's "index" action. In this example, all the facts for topic 4 will be returned. But if POST is used, the request is routed to the "create" action, which will ry to add a new fact to topic 4 (these are nested resources).&lt;br /&gt;&lt;br /&gt;But all Facebook requests are made with GET, so your code or your plugin needs to look at a request parameter called fb_sig_request_method to see which method was used initially.&lt;br /&gt;&lt;br /&gt;One problem I had was deleting something RESTfully from a Facebook canvas page.&lt;br /&gt;&lt;br /&gt;Normally, clicking a RESTful delete link created by Rails causes Javascript to run that creates the confirmation popup and a form that passes the authenticity_token variable required for deleting something.&lt;br /&gt;&lt;br /&gt;But Facebook doesn't allow you to execute javascript so you can't rely upon the javascript normally created by the link_to tag to create the form when the page is loaded.&lt;br /&gt;&lt;br /&gt;You can't create the form in HTML and then use FBJS to submit it either; Facebook rewrites your forms, dropping the name attribute. So you can't call the form when you click a link.&lt;br /&gt;&lt;br /&gt;In the end I had to settle for confirming the deletion on a page of its own. And a less than desirable button had to be used instead of a link because Facebook links can't submit a form. So I'm still not happy with the outcome.     &lt;div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"&gt;&lt;a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/1a504c04-fad5-4a23-8855-42ca3402614e/" title="Zemified by Zemanta"&gt;&lt;img style="border: medium none ; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=1a504c04-fad5-4a23-8855-42ca3402614e" alt="Reblog this post [with Zemanta]" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/266186810523295200-1434063166334278526?l=ezacb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ezacb.blogspot.com/feeds/1434063166334278526/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=266186810523295200&amp;postID=1434063166334278526' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/266186810523295200/posts/default/1434063166334278526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/266186810523295200/posts/default/1434063166334278526'/><link rel='alternate' type='text/html' href='http://ezacb.blogspot.com/2008/11/using-rest-for-facebook-application.html' title='Using REST for a Facebook Application'/><author><name>Al Brown</name><uri>http://www.blogger.com/profile/11849809556416101947</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-266186810523295200.post-2278103772822189595</id><published>2008-11-04T04:12:00.000-08:00</published><updated>2008-11-09T02:10:21.253-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Representational State Transfer'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby on Rails'/><title type='text'>Facebook Plugins</title><content type='html'>&lt;span class="zemanta-img" style="margin: 1em; float: right; display: block;"&gt;&lt;a href="http://commons.wikipedia.org/wiki/Image:Facebook.svg"&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/commons/thumb/0/06/Facebook.svg/202px-Facebook.svg.png" alt="Facebook, Inc." style="border: medium none ; display: block;" /&gt;&lt;/a&gt;&lt;span class="zemanta-img-attribution"&gt;Image via &lt;a href="http://commons.wikipedia.org/wiki/Image:Facebook.svg"&gt;Wikipedia&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;There are two &lt;a href="http://www.facebook.com/" title="Facebook" rel="homepage" class="zem_slink"&gt;Facebook&lt;/a&gt; plugins for &lt;a href="http://www.rubyonrails.com/" title="Ruby on Rails" rel="homepage" class="zem_slink"&gt;Ruby on Rails&lt;/a&gt;.  Both help you deal with the Facebook &lt;a href="http://en.wikipedia.org/wiki/Application_programming_interface" title="Application programming interface" rel="wikipedia" class="zem_slink"&gt;API&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;RFacebook was the first Facebook plugin introduced and is basically a wrapper around the Facebook API enabling you to call it through plugin methods whose names map to the corresponding call in the API.  If the API changes, the plugin supports that.  You can use Facebook docs to figure out what to do and you can get data in XML or JSON.&lt;br /&gt;&lt;br /&gt;RFacebook was intended to be quick and dirty and the author even stated early on that developers should eventually move to Facebook.  But many people stuck with it.&lt;br /&gt;&lt;br /&gt;Facebooker does things "the Rails Way", and gives you methods that follow Rails conventions.  Data is delivered in arrays and hashes Ruby developers are used to working with.  In addition, there are classes that help you with publishing to feeds and sending notifications.&lt;br /&gt;&lt;br /&gt;With Facebooker, being able to deal with ruby objects saves development time.  But you aren't always aware of whats happening under the covers.  Sometimes a call to Facebook is initiated when you don't expect and that costs you time.  Its an even bigger deal on Rails because your Mongrel can't service any other requests while its waiting for Facebook to respond.&lt;br /&gt;&lt;br /&gt;The support for Facebooker has been questionable at times also, since the original auther Chad Fowler left the project.  Code has been checked with typos, the entire project was simply moved to github without sufficient notification (even the Facebook app for the plugin pointed to an unusable SVN version for weeks) and some of code was baffling to use.  The template registration stuff, for example, took me some major digging through the code to figure out what to do and it didn't even work.&lt;br /&gt;&lt;br /&gt;Of course, some of these issues are due to Facebook changing so frequently, but at least with RFacebook, you're rely upon Facebook documentation rather than on the ability of Rails developers to code against each version of the API.  Either way its still a moving target sometimes.&lt;br /&gt;&lt;br /&gt;Facebooker does give you some help with REST, but even that took me quite a while to figure out how to use that successfully.  I do use Facebooker for my grokLokker Facebook app and its stable enough for what I'm doing.  But I doubt I'd use it if I had t to due over.&lt;br /&gt; &lt;div style="margin-top: 10px; height: 15px;" class="zemanta-pixie"&gt;&lt;a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/daa7e7c9-6026-4b6e-a4f3-1e23d9b22282/" title="Zemified by Zemanta"&gt;&lt;img style="border: medium none ; float: right;" class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_e.png?x-id=daa7e7c9-6026-4b6e-a4f3-1e23d9b22282" alt="Reblog this post [with Zemanta]" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/266186810523295200-2278103772822189595?l=ezacb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ezacb.blogspot.com/feeds/2278103772822189595/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=266186810523295200&amp;postID=2278103772822189595' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/266186810523295200/posts/default/2278103772822189595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/266186810523295200/posts/default/2278103772822189595'/><link rel='alternate' type='text/html' href='http://ezacb.blogspot.com/2008/11/facebook-plugins.html' title='Facebook Plugins'/><author><name>Al Brown</name><uri>http://www.blogger.com/profile/11849809556416101947</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
