Reading Time: 1 minutes

Programmers like to take a longer break far away from their daily lives. They can write a code in the comfortable conditions, for example at the sea coast. Changing a location acts as a refresher. It gives them vitality they need to finish writing the code. The location they choose for the vacation are different and depends on the programmer’s personality. While some of them prefer the sea, others choose rocky mountains. Then there are those who prefer crouded cities. Anyway, when you are a ruby developer, it doesn’t matter where you are, you will need the following smart tips for your work:

1. Operator converts any value on type boolean.

for example:


=> false

=> true
foo =

=> true
2. If you pass a block to method, after that you don’t have to concern about the closing the file. The record is as follows:

file =“file.txt”, “w”)
file.write(“Hello world”)

is equivalent to:“file.txt”, “w”) do |file|
file.write(“Hello world”)

3.Checking quickly the file. rb in terms of syntax without executing it:

ruby -c file.rb

Additional information (for example about assigned but not used variables);

ruby -wc file.rb

Your coding vacation will be really awesome! Warm and sunny August brings all good for #SummerSoftware!

Railwaymen August calendar 2014 coding vacations Railwaymen August calendar 2014 coding vacations

Best Apps for Marketing

Recent Posts