<?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>My personal scratchpad.</description><title>Them Bits</title><generator>Tumblr (3.0; @thembits)</generator><link>http://thembits.tumblr.com/</link><item><title>The joys of having a Forever Project</title><description>&lt;a href="http://www.dev.gd/20130122-the-joys-of-having-a-forever-project.html"&gt;The joys of having a Forever Project&lt;/a&gt;</description><link>http://thembits.tumblr.com/post/41188102726</link><guid>http://thembits.tumblr.com/post/41188102726</guid><pubDate>Tue, 22 Jan 2013 12:09:00 +0100</pubDate></item><item><title>Remember kids, RTFM!</title><description>&lt;p&gt;Today I wasted over 40 minutes on meaningless code debugging all because instead of this:

&lt;pre&gt;&lt;code&gt;mount_uploader :avatar, AvatarUploader&lt;/code&gt;&lt;/pre&gt;

I did this:

&lt;pre&gt;&lt;code&gt;mount_uploader :avatar&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;</description><link>http://thembits.tumblr.com/post/30235731617</link><guid>http://thembits.tumblr.com/post/30235731617</guid><pubDate>Sun, 26 Aug 2012 13:08:31 +0200</pubDate></item><item><title>TextMate 2 now on GitHub</title><description>&lt;a href="https://github.com/textmate/textmate"&gt;TextMate 2 now on GitHub&lt;/a&gt;: &lt;p&gt;Ciekawe co z tego wyjdzie…&lt;/p&gt;</description><link>http://thembits.tumblr.com/post/29112027813</link><guid>http://thembits.tumblr.com/post/29112027813</guid><pubDate>Fri, 10 Aug 2012 09:10:08 +0200</pubDate></item><item><title>UltiSnips - moje nowe ulubione snippety w Vimie</title><description>&lt;p&gt;Jakiś czas temu postanowiłem po raz kolejny przestawić się z &lt;a href="http://www.sublimetext.com/"&gt;Sublime Text 2&lt;/a&gt; na &lt;a href="http://www.vim.org/"&gt;Vima&lt;/a&gt;, związek z którym kończył się już kilkukrotnie.&lt;/p&gt;

&lt;p&gt;Jako developer jestem z natury leniwy dlatego też jedną z najważniejszych funkcji, oprócz automatycznego usuwania białych znaków i dodawania znaku nowej linii na końcu pliku, której wymagam od edytora tekstu jest obsługa &lt;a href="http://pl.wikipedia.org/wiki/Snippet_(programowanie)"&gt;snippetów&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Podczas moich poprzednich przygód z Vimem korzystałem z &lt;a href="http://www.vim.org/scripts/script.php?script_id=2540"&gt;snipMate&lt;/a&gt;, a później &lt;a href="http://www.vim.org/scripts/script.php?script_id=1318"&gt;snippetsEmu&lt;/a&gt;. Tego ostatniego chciałem zaprząc do pracy i tym razem, trafiłem jednak na coś znacznie lepszego (i nadal rozwijanego w przeciwieństwie do dwóch pozostałych skryptów) - &lt;a href="http://www.vim.org/scripts/script.php?script_id=2715"&gt;UltiSnips&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;UltiSnips różni się od pozostałych rozwiązań przede wszystkim możliwością zagnieżdżania w snippetach wyrażeń w Vimscripcie i Pythonie, a także na umieszczanie wyniku poleceń wywołanych w shellu. Pozwala to na konstruowanie naprawdę złożonych szablonów kodu.&lt;/p&gt;

&lt;p&gt;Autor nakręcił serię screencastów, które są niezłym wprowadzeniem do UltiSnips (część &lt;a href="http://www.sirver.net/blog/2011/12/30/first-episode-of-ultisnips-screencast/"&gt;1&lt;/a&gt;, &lt;a href="http://www.sirver.net/blog/2012/01/08/second-episode-of-ultisnips-screencast/"&gt;2&lt;/a&gt;, &lt;a href="http://www.sirver.net/blog/2012/02/05/third-episode-of-ultisnips-screencast/"&gt;3&lt;/a&gt;, i &lt;a href="http://www.sirver.net/blog/2012/03/31/fourth-episode-of-ultisnips-screencast/"&gt;4&lt;/a&gt;), ale jeśli ktoś miał już do czynienia ze snippetami, powinien objeść się i bez nich.&lt;/p&gt;

&lt;p&gt;Instalacja jest trywialna jeśli korzystamy z Vundle:&lt;/p&gt;

&lt;p&gt;W &lt;code&gt;~/.vimrc&lt;/code&gt; umieszczamy:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;pre&gt;
Bundle "SirVer/ultisnips"

" Pozwala na przeładowywanie istniejących snippetów (tylko jeśli instalujemy
" skrypt przy użyciu Vundle)
let g:UltiSnipsDontReverseSearchPath="1"
&lt;/pre&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Restartujemy Vima i wywołujemy &lt;code&gt;:BundleInstall&lt;/code&gt; UltiSnips będzie dostępny przy ponownym uruchomieniu. Polecam zajrzeć do &lt;code&gt;:help UltiSnips.txt&lt;/code&gt; od razu po instalacji.&lt;/p&gt;</description><link>http://thembits.tumblr.com/post/29051575901</link><guid>http://thembits.tumblr.com/post/29051575901</guid><pubDate>Thu, 09 Aug 2012 15:43:00 +0200</pubDate></item><item><title>I&amp;#8217;m starting to become more and more convinced to start decoupling business models (e.g....</title><description>&lt;p&gt;I&amp;#8217;m starting to become more and more convinced to start decoupling business models (e.g. ActiveRecord classes) from business logic. The whole &amp;#8220;fat model&amp;#8221; anti-pattern just looks silly to me now.&lt;/p&gt;</description><link>http://thembits.tumblr.com/post/21704065927</link><guid>http://thembits.tumblr.com/post/21704065927</guid><pubDate>Tue, 24 Apr 2012 08:28:30 +0200</pubDate></item><item><title>Tinkering with Rubnius. Trying to figure out if it would be a suitable choice for a production...</title><description>&lt;p&gt;Tinkering with &lt;a href="http://rubini.us/"&gt;Rubnius&lt;/a&gt;. Trying to figure out if it would be a suitable choice for a production environment. I have yet to find a library that Rubinius can&amp;#8217;t handle (even those using C extensions compile without any problems, let it be &lt;code&gt;psych&lt;/code&gt; or &lt;code&gt;pg&lt;/code&gt;).&lt;/p&gt;</description><link>http://thembits.tumblr.com/post/20577653130</link><guid>http://thembits.tumblr.com/post/20577653130</guid><pubDate>Fri, 06 Apr 2012 08:52:32 +0200</pubDate></item><item><title>Three coin types I’ve designed for my latest project.</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_m1rshhdKO71qh2lmao1_400.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Three coin types I’ve designed for my latest project.&lt;/p&gt;</description><link>http://thembits.tumblr.com/post/20249350136</link><guid>http://thembits.tumblr.com/post/20249350136</guid><pubDate>Sun, 01 Apr 2012 00:15:17 +0200</pubDate></item><item><title>Interesting YAML behavior in 1.9.3-p125:

</title><description>&lt;p&gt;Interesting YAML behavior in 1.9.3-p125:&lt;/p&gt;

&lt;p&gt;&lt;script src="https://gist.github.com/2057504.js?file=gistfile1.txt"&gt;&lt;/script&gt;&lt;/p&gt;</description><link>http://thembits.tumblr.com/post/19446248297</link><guid>http://thembits.tumblr.com/post/19446248297</guid><pubDate>Sat, 17 Mar 2012 11:54:28 +0100</pubDate></item><item><title>Day auto adjustment in Time.local/Time.gm</title><description>&lt;p&gt;&lt;script src="https://gist.github.com/1047527.js?file=time_local.rb"&gt;&lt;/script&gt;&lt;/p&gt;</description><link>http://thembits.tumblr.com/post/6934846443</link><guid>http://thembits.tumblr.com/post/6934846443</guid><pubDate>Sun, 26 Jun 2011 13:16:05 +0200</pubDate></item><item><title>factory_girl overrides</title><description>&lt;p&gt;Overridden data is not set through mass assignment. That means you can safely overwrite all of your protected attributes:&lt;/p&gt;
&lt;script src="https://gist.github.com/879924.js?file=factory_girl_overrides.rb"&gt;&lt;/script&gt;</description><link>http://thembits.tumblr.com/post/4006358751</link><guid>http://thembits.tumblr.com/post/4006358751</guid><pubDate>Mon, 21 Mar 2011 19:27:24 +0100</pubDate></item><item><title>When using attribute writers, the returned value is always the right side of the expression</title><description>&lt;p&gt;
&lt;script src="https://gist.github.com/875928.js?file=setters.rb"&gt;&lt;/script&gt;&lt;/p&gt;</description><link>http://thembits.tumblr.com/post/3938706303</link><guid>http://thembits.tumblr.com/post/3938706303</guid><pubDate>Fri, 18 Mar 2011 12:48:00 +0100</pubDate></item><item><title>Rescue only in production with rescue_from</title><description>&lt;p&gt;&lt;script src="https://gist.github.com/875884.js?file=application_controller.rb"&gt;&lt;/script&gt;&lt;/p&gt;</description><link>http://thembits.tumblr.com/post/3938193579</link><guid>http://thembits.tumblr.com/post/3938193579</guid><pubDate>Fri, 18 Mar 2011 11:49:44 +0100</pubDate></item><item><title>Combining processing methods with CarrierWave and MiniMagick</title><description>&lt;p&gt;Unfortunately I couldn&amp;#8217;t find that one in documentation:&lt;/p&gt;
&lt;script src="https://gist.github.com/871287.js?file=mini_magick_processing.rb"&gt;&lt;/script&gt;</description><link>http://thembits.tumblr.com/post/3881592738</link><guid>http://thembits.tumblr.com/post/3881592738</guid><pubDate>Tue, 15 Mar 2011 20:37:46 +0100</pubDate></item><item><title>FakeFile</title><description>&lt;p&gt;For testing CarrierWave uploads.&lt;/p&gt;
&lt;script src="https://gist.github.com/870419.js?file=fake_file.rb"&gt;&lt;/script&gt;</description><link>http://thembits.tumblr.com/post/3873429045</link><guid>http://thembits.tumblr.com/post/3873429045</guid><pubDate>Tue, 15 Mar 2011 08:33:42 +0100</pubDate></item><item><title>The best clearfix so far</title><description>&lt;script src="https://gist.github.com/864822.js?file=clearfix.css"&gt;&lt;/script&gt;&lt;p&gt;Created by &lt;a href="http://www.yuiblog.com/blog/2010/09/27/clearfix-reloaded-overflowhidden-demystified/"&gt;Thierry Koblentz&lt;/a&gt;&lt;/p&gt;</description><link>http://thembits.tumblr.com/post/3768211998</link><guid>http://thembits.tumblr.com/post/3768211998</guid><pubDate>Thu, 10 Mar 2011 21:11:40 +0100</pubDate></item><item><title>"Adding an explicit version number to the Gemfile is definitely fine. However, I consider it useful..."</title><description>“&lt;p&gt;Adding an explicit version number to the Gemfile is definitely fine. However, I consider it useful in the case where you know a priori that you need a specific version of a gem e.g. because of an incompatibility with a later version.&lt;/p&gt;

&lt;p&gt;The problem you are describing is precisely what the Gemfile.lock file is for. It records the version number of each gem, so you don’t have to remember and you don’t have to manually specify. This is why it is so important to have that file in version control with your app—it ensures that everyone is using the exact same versions of all gems, with no extra effort necessary.&lt;/p&gt;

&lt;p&gt;Also note that bundle update should only be used if you need to update to a newer version of a gem that Bundler already knows about. For example, when a new version of httparty comes out, you run `bundle update httparty`. Otherwise, you should always run `bundle install`.&lt;/p&gt;”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;a href="http://www.viget.com/extend/bundler-best-practices/#comment_list"&gt;Bundler Best Practices&lt;/a&gt;&lt;/em&gt;</description><link>http://thembits.tumblr.com/post/3762457819</link><guid>http://thembits.tumblr.com/post/3762457819</guid><pubDate>Thu, 10 Mar 2011 13:32:39 +0100</pubDate></item><item><title>http://steve.dynedge.co.uk/2010/11/29/receiving-test-driven-incoming-email-for-rails-3/</title><description>&lt;a href="http://steve.dynedge.co.uk/2010/11/29/receiving-test-driven-incoming-email-for-rails-3/"&gt;http://steve.dynedge.co.uk/2010/11/29/receiving-test-driven-incoming-email-for-rails-3/&lt;/a&gt;: &lt;p&gt;A follow-up to the e-mail receiving methods focusing on tests.&lt;/p&gt;</description><link>http://thembits.tumblr.com/post/3399461932</link><guid>http://thembits.tumblr.com/post/3399461932</guid><pubDate>Sun, 20 Feb 2011 09:28:08 +0100</pubDate></item><item><title>http://steve.dynedge.co.uk/2010/09/07/incoming-email-in-rails-3-choosing-the-right-approach/</title><description>&lt;a href="http://steve.dynedge.co.uk/2010/09/07/incoming-email-in-rails-3-choosing-the-right-approach/"&gt;http://steve.dynedge.co.uk/2010/09/07/incoming-email-in-rails-3-choosing-the-right-approach/&lt;/a&gt;: &lt;p&gt;Comprehensive article about receiving e-mails in Rails 3.&lt;/p&gt;</description><link>http://thembits.tumblr.com/post/3399450067</link><guid>http://thembits.tumblr.com/post/3399450067</guid><pubDate>Sun, 20 Feb 2011 09:26:00 +0100</pubDate></item><item><title>RSpec examples for generic accessors</title><description>&lt;p&gt;As described by &lt;a href="http://blog.carbonfive.com/2010/10/21/rspec-best-practices/"&gt;Carbon Five&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;
&lt;script src="https://gist.github.com/832530.js?file=user_spec.rb"&gt;&lt;/script&gt;&lt;/p&gt;</description><link>http://thembits.tumblr.com/post/3348394099</link><guid>http://thembits.tumblr.com/post/3348394099</guid><pubDate>Thu, 17 Feb 2011 21:00:31 +0100</pubDate></item><item><title>Instantiating abstract ActiveRecord::Base classes</title><description>&lt;p&gt;&lt;del&gt;Overwrite &lt;code&gt;self.columns&lt;/code&gt;&lt;/del&gt; &lt;ins&gt;Set the &lt;code&gt;@columns&lt;/code&gt; variable&lt;/ins&gt; and you&amp;#8217;re good to go.&lt;/p&gt;
&lt;p&gt;
&lt;script src="https://gist.github.com/831525.js?file=basic.rb"&gt;&lt;/script&gt;&lt;/p&gt;</description><link>http://thembits.tumblr.com/post/3343176535</link><guid>http://thembits.tumblr.com/post/3343176535</guid><pubDate>Thu, 17 Feb 2011 12:15:00 +0100</pubDate></item></channel></rss>
