Thinking on hiring me?

Please read

Fernando Guillén

a Freelance Web Developer

cabecera decorativa

software development as an artistic expression

August 25th, 2010

Ruby: DummyDropbox, mocking the Dropbox API calls.

Dummy Dropbox

Playing with the Dropbox API for an another experimental pet-project I needed to test how my mini-application was responding to different Dropbox contents. On the beginning I was configuring a real Dropbox account for testing but this was not agile and flexible. So this is because I decided to mock the dropbox ruby gem and this is because DummyDropbox has been born.

The working is simple: you point the gem to a local folder, all the dropbox API calls will think that this local folder is a real Dropbox account.

Example:

require 'dummy_dropbox'
DropboxDummy.root_path = "#{File.dirname(__FILE__)}/test/fixtures/dropbox"
session = Dropbox::Session.new('key', 'secret')
assert_equal(
  File.read( "#{File.dirname(__FILE__)}/test/fixtures/dropbox/file1.txt" ),
  @session.download( '/file1.txt' ) 
)

Wondering if this could be helpful for someone.

August 3rd, 2010

Ruby: FibberMailman, mocking the Net::POP3.start

 

 

 

Fibber MailmanLately I’m involved on projects that do a very intensive use of email accounts as input of information.

The use of mail in an automatic process is always a pain in the ass because of the huge casuistic and also for the difficulty to test it.

Nothing we can do with the first problem but for the second one here is my propose of a very simple Ruby Gem to mock the Net::POP3.start petition so you can simulate the emails that a real POP3 petition could find:

FibberMailman the mock for the Net::POP3.start.

Just charge a bunch of raw mails in an strings array and send them to the FibberMailman.lie_to_me method like this:

require 'fibber_mailman'
 
raw_mails = [
  File.read( "/fixtures/mail1.raw_mail" ) ),
  File.read( "/fixtures/mail2.raw_mail" ) ),
]
 
FibberMailman.lie_to_me( raw_mails ) do
  <your code that uses the Net::POP3.start on any point>
end

Every petition to the Net::POP3.start method into the inside block will be feed with fake emails built from the raw mail strings.

 

August 3rd, 2010

Lightning Talk about the OneOfZombies project

A few months ago I was on Krakow attending to the European Ruby Conference (aka EuRuKo).

There I had the opportunity to talk about one of my unfinished pet project OneOfZombies the Game.

May 24th, 2010

theKidsArtGallery, the most awesome virtual Art Brut gallery

theKidsArtGallery, virtual art gallery

I have always loved the kind of paintings made for people that suppose don’t know how to paint, the drawings full of colors with aggressive strokes and absolutely non pretentious motive.

After a while I realized that there is a name for this kind of paintings: Art Brut, drawings made for people without art knowledge, the outsiders. I don’t know why but this paintings send to me a lot of energy and always produce an smile on my face.

After visiting several Art Brut expositions I have found the real Art Brut artists: the kids. They are awesome, they produce the most wonderful Art Brut I have ever seen, and they do it with an incredible productivity.

My girlfriend’s nephew is one of them, I love every of his drawings, I thought that it will be a good idea to build him an small website for his drawings, not only to share them with acquaintances but also to let him know I’m very proud of his stuff.

After a few code lines written I realized that this was a multi kids’ art gallery will be a fucking good idea and this is because theKidsArtGallery has born.

I have found a bunch of pages that implements the same idea but in my opinion none of them have a good functionality.

theKidsArtGallery is a virtual gallery of paintings and drawings of children from around all countries and continents.

A gallery that respects and assesses the artistic power that have the most creative creatures on the world.

It also wants to be a place for appreciation and motivation for the children creativity.

If you have children, or any other young relative you will know that they produce a very big and uncontrollable amount of small pieces of art, theKidsArtGallery can be a good way to keep them organized and to share them.

The whole project is non-profit, I just wanted to make real a reference place for people with my same interest for the kids drawings.

The site is on continuous development, I didn’t find yet the functionality and the style I’m looking for, any suggestion on this fields will be welcome.

If you are interested on open a gallery for your small familiars or even for your old drawings when you was a child, please contact with me.

April 29th, 2010

Twitter must become in an open protocol

… if Twitter doesn’t do it, someone must to.

On a recent conversation with Raúl Murciano about the new improvements on the Twitter API I was defending the need of Twitter becoming an open protocol.

The first response could be “Why is this needed?, why don’t just use the Twitter platform?“, the answer is not easy to do with the mind it is more a feeling on the heart.

Twitter has been become on an incredible simple and useful service, twitter is everywhere and it is used for anything. It has become in the chat of our age, also in an alert system, in a marketing place, there where you want to put an small piece of information there is Twitter.

So now Twitter has proved what wonderful it is, what kind of a powerful tool it is, and all this power is always better to be shared and to open it to the people.

Of course there is something wrong on my approach: Twitter has built Twitter so it deserves to keep it, to open it is not a profitable idea and all of us know what is what moves the world. But at the moment Twitter keeps distrustful the control of Twitter it has not anymore the right of keep it.

The natural way of Twitter is being an open protocol where there is not anymore only one service provider but a bunch of them, communicating with each other, and anyone can buildup its own Twitter server, and we can choose our favorite one. I don’t see the difference between Twitter and email, or IRC, or HTTP it self. How would you feel if the email service was offered only by one company?, doesn’t matter how fashion and nice guys they were.

The decisions are not anymore taken on an unilateral way, the power is not anymore owned by anyone, the tool is already uncontrollable (in the good sense of the word), the service is distributed and scalable, the privacy has a possibility, the competition helps to the user, this is the kind of sons Internet is proud of.

Technically it has not to be the most complicated of the protocols, the most important thing Twitter is offering to us right now is just us, the users. Despite the incredible server balancing technology is has to support, but this is just a consequence of being the Only One.

Twitter is awesome and Twitter can be proud of itself, it deserves all our ovations but is time to move on, Twitter has the right to keep what it has built and we have the right to do it better, if Twitter doesn’t do it someone must to.

The real question is: are we willing to change our fashion ‘@nick‘ by a one more standard and scalable ‘nick@server.com‘?

March 14th, 2010

Arduino: Phixter Visits, blinking a led each time your website receives a visit

 Arduino I’m in

PhixterVisits is a way to convert an user visit on your web site into a blinking led on your desktop.

I have received for my birthday present one of the most awesome presents a geek can received: an Arduino Workshop Kit.

The first experiment I did was, of course, a Hello World, and after that I build something I was feeling like doing for long time: blink a led when someone visits my website.

This is very useless thing, I know and I don’t care, I just think that when something happens on the web and it become in something real on my table this is kind of magic.

On the beginning was a very simple experiment and withing an afternoon I build an small Sinatra project that received requests with a numerical parameter, the Sinatra webapp sent a signal to an script on my computer through a socket, and my computer finally sent this numerical value to the Arduino that knew with led to blink on depending the value.

This was awesome, I could to hidden an ‘img’ html element on my website asking for an image that in fact was a request to the Sinatra webapp and then the rest worked by it self.

Finally I wanted to play a competition with my girlfriend, she has a very most popular website than mine is, and then I was thinking to do all this stuff much easier to configure so this is because PhixterVisits born.

PhixterVisits is composed for three layers:

Arduino Sketch and Circuit

This is the most simple layer. It is a simple Arduino sketch that opens a Serial connection with your computer waiting for numerical values from 1 to 11, on depending the value received the Arduino will send a signal to one of its digital output connections.

The circuit is also very simple as you can see on the ‘How to Install It’ section.

Local Server

The local server is also very simple but I’ve complicated it becoming what was a simple console script on a wxRuby desktop application so you can configure it and test it visually.

Web Service

Is a Rails application where you can register your self and configure what I call ‘Phixters’. The Phixters are composed by an ‘URL:Port’ address what is your local computer public ip and the port where the Local Server is listening. You configure a value for each Phixter. And finally you can copy a very small piece of html code that you have to paste on whatever place of your website you want.

This piece of html code is the one that hides the Web Service request on an image so when your user visitors are watching an image a signal was sent to the Web Service.

How To Install It

I suppose you have a few experience with Arduino, at less you have obtained to operate the ‘Hello World’ with Arduino.

The Arduino Layer

Download the Arduino Sketch and upload it to your Arduino controller.

Build the circuit as show in this draw.

Phixter Visits Arduino Sketch

On this draw and on all my tests there are only 6 leds but you can fill all the digital outputs with leds and they suppose to work. Put atention that the digital outputs 0 and 1 are not being used, that is because on the circuit there is printed ‘RX’ and ‘TX’ on this out puts and I didn’t want any serial communication interference (I really don’t know if this interference was going to happened).

For test it you can open the ‘Serial Monitor’ of your Arduino app and send numerical values like ‘1′ or ‘2′ or ‘6′, the corresponding leds should blink for while.

Local Server

Download the ‘Local Server’ wxRuby desktop application.

You must to have Ruby installed on your computer and also the ‘wxruby’ gem:

$ sudo gem install wxruby

Go to the directory you have uncompressed the ‘Phixter Visits Local Server’ app and run on console:

$ ruby wx_tcp_server.rb

Yo should see something like on this picture:

Phixter Visits Local Server off

You have to know the name of the USB port of your Arduino and replace the text box named ‘Arduino Serial Port’ with yours one.

Select a port where you want the Local Server listens, for example ‘20000′.

Push ‘listen’.

You should see something like this bellow:

Phixter Visits Local Server

If you want to test it you can push ’stop’ and play with the ‘Send test value’ buttons. If you click on these buttons a corresponding led should blink.

Press ‘listen’ again and let the Local Server listening.

The Web Service

Go to PhixterVisits, register your self and create a Phixter for your web site like this:

Phixter Visits Web Service create Phixter

On URL:Port you have to put the public IP of your computer (or whatever computer your Local Server is listing), the Port is the port you have said to Local Server to listen.

Look that I’m using the ‘no-ip.com’ service so I don’t have to take care of my non-static public IP.

You can create any number of Phixters you want, one of them could be for a different website, just take care you are using the correct ‘code’ of each one.

Very important also is that I’m not going to talk about how to configure the NAT of my home router. This is diferent on each router and is the same theory of ‘opening the ports’ for your emule. Although I’m not talking of this step, this step is very important and the Web Service won’t can talk with your Local Server if this is not well configured.

You can check the communication from your Phixter on the Web Server to your Local Server on your desktop computer by pushing the button ‘check’ as you see bellow:

Phixter Visits Web Service go to check

This will send a signal to the URL:Port configured on this Phixter sending the value indicated, if everything is connected and working a led will blink on your Arduino circuit and a Ok message will appear on the Web Server page.

The HTML code on your Web Site

Still on the Phixter Visits Web Site, go to the ‘code’ of your Phixter:

Phixter Visits Web Service go to code

Copy the code on the textarea:

Phixter Visits Web Service Phixter’s code

And paste it on some place on your web site, be intelligent here and don’t put it on a place that an image is not going to be loaded.

From now on each time your website is loaded this image will want to be loaded and a request will arrive to the Web Service which will send a signal to your Local Server which will send a signal to your Arduino which will make the corresponding led to blink.

What is next

The game now is to connect to the Arduino not leds but DC motors so when a signal arrive the motor will work for a while and then stop until the next signal arrive. The motor will move some kind of figure like a horse or something then the race can start.

Phixter Visits Horse Race

Also will be great not to depend on a computer to communicate with the Web Service, using a ethernet interface directly connected to Arduino could be great.

The Code

All the code of this project, even the the Phixter Visits Web Service is available on the Phixter Visits Github Repository.

Responsability

Play with this code and instructions on your own risk, I’m a very beginner on all of this Arduino stuff and some problems could happen to your loved kit.

License

You can do whatever you want with the code, attributions will be grateful.

Creative Commons License

Phixter Visits by Fernando Guillen is licensed under a Creative Commons Attribution 3.0 Unported License.

March 1st, 2010

iPhone Verb Conjugations

iPhone Verb Conjugations

VerbConjugations is simple iPhone application that tries to help the people that is learning Spanish to find out how a verb is conjugated.

With this application you can ask for any infinitive verb and you’ll obtain how this verb is conjugated is different tenses and persons.

The application also has an offline mode so you can check the verbs already searched without Internet connection.

The application works on any iPhone/iPod with SDK 3.0 or higher.

Let it a try, it is free, and leave a review, it is my first iPhone app and I would love to receive any kind of comment or issue.

The license is completely opened and you can check/download the code on the iPhoneVerbConjugations GitHub repository.

Available on Apple Store

February 16th, 2010

How many lentils are there in the jar?

Asking for a development estimation without minimal specification info is like guess how many lentils are there on a jar without even see it,

... offering specification info, then you can see the jar, and you have to guess how many lentils are there in it without open it

... let me the jar, and I’ll keep you informed of how many lentils are there in it as I’m counting them.

September 27th, 2009

Conferencia Rails 2009, just around the corner

 Conferencia Rail 2008

Another year, another conference, the conference that opened my eyes to the amazing word of Ruby, there on 2007, is just tuning the last details.

Conferencia Rails 2009, this year bigger, more impressive, with new venue, bigger organization team, more energy, and asking to the english spoken community  to meet us with talks.

This year I am not being to much helpful on the organization team, I know they are not missing me: a big and strong bunch of people is helping this year with new energy and ideas. I am on the register application support one more year. You can check the code and help sending patches here on the ConfRor2009 github repository.

As more news arrive to me about the Conferencia Rails 2009 more sad I feel, this is because this year I will not can assists to the event, I will be on New York on an weird adventure.

The Call for Papers is almost closed. Be hurry and propose your talk to Conferencia Rails 2009 on the registration app.

September 13th, 2009

Coding on New York City

Coding on NYC

It’s done, I’ll be traveling with my angel to New York City next October. It won’t be a very short visit: 3 months. All the Autumn on New York.

I’m very excited, very stressed and very nervous, I know not one of this sensations is a pleasure sensation, but this is my way, I am a guy that likes to feel at home, and NYC is definitely not my home. But I know at the moment I’ll know where the bakery is and a good place to take a relaxing coffee I’ll start to feel at home.

This is a very great experience, a personal one, but I’ll like to turn it on an important professional experience too.

I don’t want to make telecommuting on NYC, I don’t want to work at home. I can to keep working for my actual clients on the same way I am doing it here on my house at Mallorca (Spain), but I need something different, I want to work close to other coders, I want to work close to New Yorker coders.

I have spoken with the managers of one of my most important actual projects, and the development team I am deeper working with: LaCoctelera, I exposed my concerns and they are absolutely agree with me, I have to take this opportunity, I will stop coding and committing for this project for a while, and on my return we will see if I am still helpful for them.

So now I have time, but I don’t have any idea if my skills will be desirable there on USA.

What I’m looking for is kind of simple: a Ruby on Rails project, with a development team of at least three persons, with hi coding level, comfortable office space, where a ten agile fingers and a bright mind could be helpful.

The money is not a problem, I’m chasing the experience and the knowledge I could acquire, so if your budget is not weight but your team is amazing I would be proud to work on it. The contract isn’t a problem either, as a Freelance I own my own software company, so this’ll be not a employment contract but a international companies relationship.

But if I can’t access to any kind of refundable job I am also opened to volunteer work.

If you know or are part of something like what I am looking for, please don’t hesitate to contact me.

a Freelance Web Developer is proudly powered by WordPress
Entries (RSS) and Comments (RSS).