Category Archives: english

Responsibility

After it was revealed he cheated on his wife, Arnold Schwarzenegger said: “After leaving the governor’s office I told my wife about this event, which occurred over a decade ago. I understand and deserve the feelings of anger and disappointment … Continue reading

Posted in english, lifestyle | Leave a comment

Uncle Bob: decouple your app from Rails

Robert C. Martin in his famous keynote “Architecture: The Lost Years” says we, the proud Rails programmers, are doing it wrong. Uncle Bobs urges us to decouple our applications from frameworks. And Rails is no exception. According to Uncle Bob, … Continue reading

Posted in english, programowanie, rails, ruby, science, technologia | 1 Comment

Default transaction isolation level comparison in MySQL, PostgreSQL, Oracle and MS SQL Server

When building software you should understand what level of transaction isolation your RDBMS guarantees. Do you? I meen, how much of the “I” in the ACID we have? Here are the default transaction isolation levels in a popular relational database … Continue reading

Posted in english, programowanie, rails, ruby, science, technologia | 5 Comments

[Solved] Nano copy paste

Nano is the closest-to-being-sane, widely available text editor for Linux. While still fucked up, you can get used to it in several hours. One of the biggest headaches seems to be selecting, copying and pasting. Nano help isn’t really helpful … Continue reading

Posted in english, linux, programowanie, rant, technologia | Leave a comment

[Solved] How to run each MiniTest::Spec in a transaction?

How to run each MiniTest::Spec in a transaction rolled-back upon finish? Simply add this to your test_helper.rb after requiring minitest/autorun:

Posted in english, programowanie, rails, ruby, technologia | Leave a comment

[Solved] How to auto connect to a VPN on startup in Ubuntu 11.10?

How to automatically connect to a VPN on startup (login) in Ubuntu 11.10 (oneiric ocelot)? What did NOT work Option “connect automatically” in the Network Manager VPN configuration. This option has never worked, the bug is open for over 3 … Continue reading

Posted in english, programowanie, technologia | 21 Comments

In place editing with Datepicker

I’ve released jeditable-datepicker. It allows you to combine in place editing with jQuery UI Datepicker. jeditable-datepicker is based on Jeditable (the finest in place editing jQuery plugin) and jQuery UI Datepicker (the most popular jQuery callendar widget). See the demo and … Continue reading

Posted in english, javascript, programowanie, technologia | 6 Comments

Kaminari 0.12.* crashes rails/ruby process – solution

Kaminari 0.11.0, 0.12.*, the best Ruby on Rails pagination gem, can hard crash your rails / ruby process if you have customized the templates. Solution: simply remove your customized kaminari templates from app/views/kaminari. Then generate new templates with: rails g … Continue reading

Posted in english, programowanie, rails, ruby, technologia | 8 Comments

Calc – the Ruby mathematical expressions evaluator

Want to allow users to enter numbers OR expressions in your app? Welcome Calc, the Ruby calculator library. Although Calc is general purpose gem, it plays well with typical Rails flow, where you assign values from the request parameters and … Continue reading

Posted in english, programowanie, rails, ruby, technologia | Leave a comment

Shoulda validate_uniqueness_of problem & solution

Shoulda has a nice but broken validate_uniqueness_of matcher. Examples: should validate_uniqueness_of( :uid ) should validate_uniqueness_of( :date_on ).scoped_to( :mutual_fund_id ) Unfortunately, there are two problems with this:

Posted in english, rails, ruby, technologia | Leave a comment