AdvertisementsRead More Transform numbers into written words
Last week I learned that we should use cover? instead of include?. When you ask a range if it includes something, ruby is going to instantiate every object within that range and then check if the object you pass into include? exists in there. If you ask cover? it’s just going to figure out and […]Read More Ruby cover? instead of include?
Hi, it’s been some time since the last post. Lots of work and excuses. Today I will present a challenge that I had in a new project. The client wanted the original dimensions when uploading images. So I made a private method to extract it with the help of ImageMagick’s Geometry module. First, add new […]Read More Get image dimensions with Paperclip in Rails
In Ruby Easy isn’t it?Read More Capitalize Strings in Java
Why are solving algorithms Adnilson, shouldn’t you work on building applications? Yes, you are right! The thing with algorithms is that it helps you solve problems and are good to make your mind look for solutions. This way you build a blueprint and whenever you get a problem you tackle the problem instead of being […]Read More Solving Algorithms – Bubble Sort
Today I encountered an algorithm to solve and the amazing Ruby syntax made me solve this problem with a succinct code with testing included. All words in the title should be capitalised except a few ones like “a”, “the”, “to”, “at”, “in”, “with”, “and”, “but” and “or”. To make this very short the solution is […]Read More Solving Algorithms – Title Capitalisation
Early today I was doing my first homework assignment for the SaaS course by University of California – Berkeley, and was making a Rspec test work. This method was meant to take 2 arguments, one array with integers and one integer. What we have to do is sum two numbers in the array until it […]Read More Ruby permutation method rocks!
It has been a while since I made a post here, the excuses will be off and I’ll just get to the post. I will show a way of printing a url by building a Ruby script with Nokogiri. What I want is to print all the compressed files in the website, these are contained […]Read More How to Print Urls with Nokogiri
First of all I finished after work the Ruby Koans, it was an awesome experience and made me understand much more about testing. It happened so fast that I felt sad for being so short but at the same time felt an inner feeling that I have accomplished something good. Rails Tutorial is next (for […]Read More My first programming interview
I finish my day with this project in the amazing Ruby Koans learning method, and had completed 216/282! Got to see the Ruby documentation and feels like I am getting more into the syntax. Here is the code I made in the about_dice_project.rb:Read More Ruby Koans Dice Project