Don't miss

I created an open source development tool to quickly & dynamically mock API endpoints. Check it out at GitHub: DuckRails

Heads up

I will no longer maintain arubystory. For new posts, find me at my personal blog. CU there!

Tuesday, December 1, 2015

Rails simple API application and a UI application consuming it

I recently created a simple Rails 4 API named LofoCats API and a simple UI application consuming it named LofoCats UI (yes, I like cats, what else is new?)

You can find the code for the:

The concept of the app is pretty simple: register & view lost or found cats

There are instructions on how to setup both apps in the projects' README.
The related tutorials will follow as soon as possible.

Screenshots



Saturday, October 3, 2015

Full Stack Overflow Developer

I'll talk a little about the way I think we should use all that information out there to do our "job".

Every now and then, we all visit stackoverflow.com to get some answers. Most of the cases can be categorised to the following:

  1. we don't know how to do something
  2. we get errors from the language/framework we use
  3. we get errors from the environment (OS, server etc)

Sunday, June 21, 2015

Being a developer




I can't really remember the first time I saw a computer. I do remember though that "working on a computer" was the first thing that came to my mind when I was asked "What do you want to do when you grow up?"

Years later, being both a grown up and a developer, I ask myself "Now that you know, if you were a kid again, would you still want to be working on computers when you grew up?". 

Let's see what a life for a developer means to me so far.





Tuesday, May 26, 2015

Ruby & Rails - Cool stuff & tips - S15E01


It's been a while since my last post, I didn't have the time to prepare a tutorial but I'm going to describe some stuff I thought they worth to be mentioned.




Arrays: map & each_with_index


I knew I could iterate through my array's items with an index of their position using the each_with_index method like this:
['a', 'b', 'c'].each_with_index do { |item, index|
  puts "#{index}-#{item}"
}

What is cool though, is the fact that you can use that index while mapping the elements to new objects. Here's how:
['a', 'b', 'c'].each_with_index.map { |item, index|
  { :letter => item,
    :position => index }
}


Sunday, February 22, 2015

Creating the Hangman game



In this tutorial we are going to create Hangman, a simple game in which the players try to find a word that our application chooses, by selecting letters.

We will use:

Rails (version 4): you know what this is otherwise you are in the wrong place
Foundation: for the looks & feels
Font Awesome: for icons

Saturday, February 14, 2015

Radio buttons & required boolean attributes

Lately, I was trying to create a form for one of my models which had a required boolean attribute.

The model

class Foo < ActiveRecord::Base

  validates_presence_of :a_flag

end