<?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></description><title>too lazy for blogging</title><generator>Tumblr (3.0; @namxam)</generator><link>http://max.jungeelite.de/</link><item><title>p and pp for json</title><description>&lt;p&gt;Great little trick by Peter Cooper (@peterc).&lt;/p&gt;
&lt;p&gt;You can use &lt;em&gt;j&lt;/em&gt; and &lt;em&gt;jj&lt;/em&gt; just as &lt;em&gt;p&lt;/em&gt; and &lt;em&gt;pp&lt;/em&gt; to print an object as json:&lt;/p&gt;
&lt;pre&gt;  require 'json'
  data = { name: "Max Mustermann", tags: ['some', 'tags']}
  j data # for simple output
  jj data # for really beautiful output
&lt;/pre&gt;
&lt;p&gt;If you wanna learn a few more tricks, visit his &lt;a href="http://rubyreloaded.com/trickshots/"&gt;ruby trick shots video&lt;/a&gt;.&lt;/p&gt;</description><link>http://max.jungeelite.de/post/17421024583</link><guid>http://max.jungeelite.de/post/17421024583</guid><pubDate>Sat, 11 Feb 2012 13:03:02 +0100</pubDate><category>ruby</category></item><item><title>Did you really think about your users' name?</title><description>&lt;p&gt;I just stumbled upon a really interesting article which discusses the various name schemas used around the world. And although I thought I knew quite a bit about that topic, I never thought about the implications it has on web- and data design.&lt;/p&gt;
&lt;p&gt;So if you are developing apps for people fromm various cultural backgrounds, do them and yourself the favor and read &lt;a href="http://www.w3.org/International/questions/qa-personal-names"&gt;Personal names around the world&lt;/a&gt; @wrc and think about your forms and fields.&lt;/p&gt;
&lt;p&gt;Now that I know all that stuff, I finally understand why I had to clean/modify quite a lot of data by hand in one of my recent projects.&lt;/p&gt;</description><link>http://max.jungeelite.de/post/11947954288</link><guid>http://max.jungeelite.de/post/11947954288</guid><pubDate>Wed, 26 Oct 2011 15:01:51 +0200</pubDate><category>internationalization,</category><category>i18n</category><category>webdesign</category><category>datadesign</category></item><item><title>Did you know about ruby's class_exec?</title><description>&lt;p&gt;I just stumbled upon a little gem called “class_exec” while reading ruby’s Module docs. I don’t know about other developers preferences, but I really really hate eval(). It is fine in JavaScript for creating JSON objects, but apart from that I really do not like it. No matter if is a simple eval, instance_eval or class_eval. Writing code in strings and evaluating it afterwards just seems wrong. It is something which always bothered me.&lt;/p&gt;
&lt;p&gt;As it seems kept on using it although there is a much more beautiful solution to the problem. Here is the description of the method:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Evaluates the given block in the context of the class/module. The method defined in the block will belong to the receiver.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So great! &lt;strong&gt;Welcome class_exec, good bye class_eval!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I don’t know why I did not find this earlier, but I guess because the web is full of blog posts and code samples which utilize class_eval. And nobody really updated the stuff after ruby 1.8.7 was released and the class_exec method introduced. I guess it is time to change that!&lt;/p&gt;</description><link>http://max.jungeelite.de/post/11729961241</link><guid>http://max.jungeelite.de/post/11729961241</guid><pubDate>Fri, 21 Oct 2011 14:14:32 +0200</pubDate></item><item><title>Declarative cucumber features</title><description>&lt;p&gt;Having an active community with lots of active developers and tons of blogs sharing code and setup might be considered great. And usually it is. But in case of cucumber I guess it was not always the best and therefore the removal of web_steps.rb in cucumber 1.1.0 is a huge and important step.&lt;/p&gt;
&lt;p&gt;I have to admit, i never really liked cucumber! I t felt wrong and was annoying to maintain. So I sticked with rspec and integration testing was not really handled. But then I read the post &lt;em&gt;&lt;a href="http://aslakhellesoy.com/post/11055981222/the-training-wheels-came-off"&gt;The training wheels come off&lt;/a&gt;&lt;/em&gt; by Aslak Hellesøy and I finally understood why I did not like cucumber. I was writing code just not in ruby but some other language the web_steps file provided. &lt;/p&gt;
&lt;p&gt;Checking other blogs about the release and common errors/mistakes people make when using cucumber I just started to rewrite my existing cucumber features and adding new ones. And It is fun: Clear and easy scenarios, clear and maintainable step definitions. &lt;strong&gt;I like!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;And here a few more links which might come in handy:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://benmabey.com/2008/05/19/imperative-vs-declarative-scenarios-in-user-stories.html"&gt;http://benmabey.com/2008/05/19/imperative-vs-declarative-scenarios-in-user-stories.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.jackkinsella.ie/2011/09/26/why-bother-with-cucumber-testing.html"&gt;http://www.jackkinsella.ie/2011/09/26/why-bother-with-cucumber-testing.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dannorth.net/2011/01/31/whose-domain-is-it-anyway/"&gt;http://dannorth.net/2011/01/31/whose-domain-is-it-anyway/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Cheatsheets for cucumber and capybara:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://cheat.errtheblog.com/s/cucumber_tags/"&gt;http://cheat.errtheblog.com/s/cucumber_tags/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://cheat.errtheblog.com/s/capybara/"&gt;http://cheat.errtheblog.com/s/capybara/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><link>http://max.jungeelite.de/post/11689843043</link><guid>http://max.jungeelite.de/post/11689843043</guid><pubDate>Thu, 20 Oct 2011 12:44:15 +0200</pubDate></item><item><title>Directly access an object if it's present</title><description>&lt;a href="http://rubyquicktips.com/post/9247085311"&gt;Directly access an object if it's present&lt;/a&gt;: &lt;p&gt;&lt;a href="http://rubyquicktips.com/post/9247085311"&gt;rubyquicktips&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If you want to access an object only &lt;a href="http://rubyquicktips.com/post/402892212/present-is-the-opposite-of-blank"&gt;if it’s present&lt;/a&gt;, you can use Rails’ &lt;code&gt;Object#presence&lt;/code&gt;.&lt;br/&gt; The &lt;a href="http://api.rubyonrails.org/classes/Object.html#method-i-presence"&gt;API docs on presence&lt;/a&gt; have a good explanation:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This is handy for any representation of objects where blank is the same as not present at all. For example, this simplifies a common check for HTTP…&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;</description><link>http://max.jungeelite.de/post/9288202945</link><guid>http://max.jungeelite.de/post/9288202945</guid><pubDate>Tue, 23 Aug 2011 12:00:02 +0200</pubDate><category>rubyonrails</category><category>submission</category></item><item><title>Migrating and populating STI models</title><description>&lt;p&gt;I just spent quite some time on a “bug” in one of my migrations. Run after run, it failed to populate the database properly. Even after adding the obligatory&lt;/p&gt;
&lt;pre&gt;  MyModel.reset_column_information
&lt;/pre&gt;
&lt;p&gt;But after checking the database carefully, I realized that some rows had the intended data, while others didn’t. Long story short: Don’t forget to reset the column information on all models which inherit from the base model. In my case it was something like:&lt;/p&gt;
&lt;pre&gt;  Account.reset_column_information
  Guest.reset_column_information
  User.reset_column_information
&lt;/pre&gt;</description><link>http://max.jungeelite.de/post/6246021351</link><guid>http://max.jungeelite.de/post/6246021351</guid><pubDate>Mon, 06 Jun 2011 12:59:00 +0200</pubDate><category>rails</category><category>sti</category><category>migration</category></item><item><title>Ruby retry exceptions</title><description>&lt;p&gt;I just finished coding my loop when it struck me and I searched for a solution which feels more ruby like.&lt;/p&gt;
&lt;p&gt;What I was trying to achieve is executing a piece of code until it ran without an exception. This might sound stupid, but in some cases it makes perfect sense. In this specific case, I was fetching secure data from an external provider via SSL connection. Unfortunately, the SSL connection did not always open as expected. So I have to try till it works (or I give up).&lt;/p&gt;
&lt;p&gt;Instead of using a loop, ruby provides us with keyword &lt;strong&gt;retry&lt;/strong&gt; - What a wonderful little keyword:&lt;/p&gt;
&lt;pre&gt;begin
  # Put your code here which has to be executed
rescue YourExpectedException =&gt; ex
  retry
end&lt;/pre&gt;
&lt;p&gt;And if you wanna protect yourself from an endless loop, add something like &lt;strong&gt;retry unless i &gt; 10&lt;/strong&gt;.&lt;/p&gt;</description><link>http://max.jungeelite.de/post/3783349356</link><guid>http://max.jungeelite.de/post/3783349356</guid><pubDate>Fri, 11 Mar 2011 13:39:00 +0100</pubDate><category>ruby</category><category>exceptions</category><category>retry</category></item><item><title>Add errors to base in rails3 (using I18n)</title><description>&lt;p&gt;I must have missed the part of the changelog where it states that the errors.add_to_base call will be deprecated. Anyhow, I searched the web and almost every case refers to the new API using&lt;/p&gt;
&lt;p&gt;&lt;code&gt;errors[:base] = 'My error message'&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;or &lt;/p&gt;
&lt;p&gt;&lt;code&gt;errors[:base] &lt;&lt; 'My error message'&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This might be fine for single language apps, but when you have to provide the interface in many languages and want to keep all your error messages in one language file, you would have to replace ‘My error message’ with a call like&lt;/p&gt;
&lt;p&gt;&lt;code&gt;errors[:base] &lt;&lt; I18n.t('activerecord.errors.models.model_name.attributes.base.my_code')&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Another method which I could not really find in any blog post out there is a simple&lt;/p&gt;
&lt;p&gt;&lt;code&gt;errors.add(:base, :my_code)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Far shorter and it gets automatically namespaced. So have fun ;)&lt;/p&gt;</description><link>http://max.jungeelite.de/post/3362125261</link><guid>http://max.jungeelite.de/post/3362125261</guid><pubDate>Fri, 18 Feb 2011 14:32:08 +0100</pubDate><category>rails3</category></item><item><title>How to create a neo4j server plugin (part 1)</title><description>&lt;p&gt;In order to properly capture all the relationships between actors and objects in one of my projects, I am currently evaluating the usage of a GraphDB and after some digging I decided to give neo4j a spin. It seems to be rather mature, stable and on the right track to push a proper REST API. Unfortunately, the API is still rather limited and cannot provide all the features I need. As I cannot switch my project to JRuby, I will try to come up with a neo4j server plugin which adds and exposes an API for querying an index with non-exact matches - in other words, which allows searching for data.&lt;/p&gt;
&lt;p&gt;As I have never worked with neo4j before, have a limited JAVA skill set, and only found an outdated and limited API documentation, this project could become very interesting. Let’s see what happes ;)&lt;/p&gt;</description><link>http://max.jungeelite.de/post/3103096580</link><guid>http://max.jungeelite.de/post/3103096580</guid><pubDate>Fri, 04 Feb 2011 11:46:12 +0100</pubDate></item><item><title>Authlogic + Cucumber + CookieSessionStore forgetting logins</title><description>&lt;p&gt;In case you are using a combination of Authlogic, Cucumber and the CookieSessionStore, be very careful with your domain configuration. As our project is working with various subdomains, we are using /etc/hosts with an .local extension on our dev machines. But be careful with the settings. In rails3 you are not supposed to set the session store in the environment config files, but in an initializer. If you are not careful and define a domain for cucumber, you might get into trouble, as it uses &lt;a href="http://www.example.com"&gt;www.example.com&lt;/a&gt; internally. And all the cookies you are setting are invalid.&lt;/p&gt;
&lt;p&gt;I should have thought about it earlier, but at least I found my mistake :(&lt;/p&gt;</description><link>http://max.jungeelite.de/post/2300780450</link><guid>http://max.jungeelite.de/post/2300780450</guid><pubDate>Mon, 13 Dec 2010 15:11:57 +0100</pubDate><category>rails3</category><category>cucumber</category><category>authlogic</category><category>poblem</category></item><item><title>What I would love to see in Arel / rails3</title><description>&lt;p&gt;I would say that with Arel, rails is on the right track to get rid of the SQL statements. But there is still some work which needs to be done. Stuff like Model.where(:name =&gt; ‘My stuff’) is already working really smoothly. What I would love to see is an easier access to Arel’s operators such as eq and not_eq. It would be great if the where method would accept a block which provides access to the arel table. where{|t| t[:name].not_equal(‘my stuff’)}.&lt;/p&gt;
&lt;p&gt;I guess I will look into this soon. But right now I have to finish the rails3 upgrade first :(&lt;/p&gt;</description><link>http://max.jungeelite.de/post/2187067186</link><guid>http://max.jungeelite.de/post/2187067186</guid><pubDate>Sun, 12 Dec 2010 17:30:10 +0100</pubDate><category>rails</category><category>arel</category><category>ideas</category></item><item><title>parent_layout in rails3</title><description>&lt;p&gt;As I am upgrading one of our projects to rails3 right now, I had to deal with lots of obsolete and not longer working code. And I came across this little gem I picked up from &lt;a href="http://m.onkey.org/nested-layouts"&gt;Pratik Naik&lt;/a&gt;. It allows you to nest your layouts pretty easily. If you upgrade to rails3 you have to change the code to:&lt;/p&gt;
&lt;pre&gt;def parent_layout(layout)
  @_content_for[:layout] = self.output_buffer
  self.output_buffer = render(:file =&gt; "layouts/#{layout}")
end&lt;/pre&gt;
&lt;p&gt;RubyOnRails does no longer use multiple instance variables to store the contents, but a single hash. &lt;/p&gt;</description><link>http://max.jungeelite.de/post/2166139321</link><guid>http://max.jungeelite.de/post/2166139321</guid><pubDate>Fri, 10 Dec 2010 16:29:56 +0100</pubDate><category>rails3</category><category>upgrade</category></item><item><title>code · Video for Everybody!</title><description>&lt;a href="http://camendesign.com/code/video_for_everybody"&gt;code · Video for Everybody!&lt;/a&gt;</description><link>http://max.jungeelite.de/post/1730129747</link><guid>http://max.jungeelite.de/post/1730129747</guid><pubDate>Mon, 29 Nov 2010 22:36:25 +0100</pubDate></item><item><title>"I should patent bad ideas so no-one can ever come up with one again."</title><description>“I should patent bad ideas so no-one can ever come up with one again.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;a href="http://soup.superalloy.nl/post/88890322/I-should-patent-bad-ideas-so-no"&gt;alloy&lt;/a&gt;&lt;/em&gt;</description><link>http://max.jungeelite.de/post/1626971012</link><guid>http://max.jungeelite.de/post/1626971012</guid><pubDate>Sat, 20 Nov 2010 16:14:03 +0100</pubDate></item><item><title>20 Things I Learned About Browsers and the Web</title><description>&lt;a href="http://www.20thingsilearned.com/home"&gt;20 Things I Learned About Browsers and the Web&lt;/a&gt;</description><link>http://max.jungeelite.de/post/1619538606</link><guid>http://max.jungeelite.de/post/1619538606</guid><pubDate>Fri, 19 Nov 2010 17:54:33 +0100</pubDate></item><item><title>Redcar</title><description>&lt;a href="http://redcareditor.com/"&gt;Redcar&lt;/a&gt;</description><link>http://max.jungeelite.de/post/1317147201</link><guid>http://max.jungeelite.de/post/1317147201</guid><pubDate>Fri, 15 Oct 2010 03:57:53 +0200</pubDate></item><item><title>RSpec - Relish</title><description>&lt;a href="http://relishapp.com/rspec"&gt;RSpec - Relish&lt;/a&gt;</description><link>http://max.jungeelite.de/post/1317146873</link><guid>http://max.jungeelite.de/post/1317146873</guid><pubDate>Fri, 15 Oct 2010 03:57:53 +0200</pubDate></item><item><title>Prüfziffern: Startseite von Prüfziffernberechnung in der Praxis</title><description>&lt;a href="http://www.pruefziffernberechnung.de/"&gt;Prüfziffern: Startseite von Prüfziffernberechnung in der Praxis&lt;/a&gt;</description><link>http://max.jungeelite.de/post/1249951855</link><guid>http://max.jungeelite.de/post/1249951855</guid><pubDate>Tue, 05 Oct 2010 19:42:25 +0200</pubDate></item><item><title>iTunes 10 Ping annoyance</title><description>&lt;p&gt;For those who use iTunes 10 and like the new Ping feature/network as much as I do. Here you will find a few small commands for removing Ping from the general iTunes 10 interface. Launch Terminal.app and enter the following commands (confirm by hitting return)&lt;/p&gt;

&lt;p&gt;# Remove the Ping dropdown in the list view&lt;br/&gt;&lt;b&gt;defaults write com.apple.iTunes hide-ping-dropdown 1&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;# Restore the iTunes store link arrows in the list view&lt;br/&gt;&lt;b&gt;defaults write com.apple.iTunes show-store-link-arrows 1&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;# Rewire the links from the store to your local library (RECOMMENDED)&lt;br/&gt;&lt;b&gt;defaults write com.apple.iTunes invertStoreLinks 1&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;# Remove the ping sidebar&lt;br/&gt;&lt;b&gt;defaults write com.apple.iTunes disablePingSidebar 1&lt;/b&gt;&lt;/p&gt;</description><link>http://max.jungeelite.de/post/1198247903</link><guid>http://max.jungeelite.de/post/1198247903</guid><pubDate>Mon, 27 Sep 2010 15:00:56 +0200</pubDate></item><item><title>I just stumbled upon this amazing video footage. And it reminds...</title><description>&lt;iframe src="http://player.vimeo.com/video/15069551" width="400" height="225" frameborder="0"&gt;&lt;/iframe&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;I just stumbled upon this amazing video footage. And it reminds me that I have to visit the north of Europe. Some really good stuff to grab your partner and jump right onto the next airplane.&lt;/p&gt;</description><link>http://max.jungeelite.de/post/1155903661</link><guid>http://max.jungeelite.de/post/1155903661</guid><pubDate>Mon, 20 Sep 2010 15:45:40 +0200</pubDate></item></channel></rss>

