Thinking on hiring me?

Please read

Fernando Guillén

a Freelance Web Developer

cabecera decorativa

software development as an artistic expression

Abril 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‘?

Marzo 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.

Marzo 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

Febrero 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.

Septiembre 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.

Septiembre 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.

Agosto 28th, 2009

The Rails Rumble Experience

Software development is a box of wonderful surprises and the community I have found around Ruby on Rails is the most passionate I have never met.

The last crazy geek stuff I have been involved in was the RailsRumble. A contest where small web development teams have to show what they are able to build in only 48 hours. Of course the web framework to use is Ruby on Rails, which other can you use to implement something almost finished in only this bunch of hours?

The experience, besides being a technology challenge, is a very enriching personal experience

Our group was formed by Raimond Garcia, Felipe Talavera, Carlos Matallín and me.

RailsRumble Mallorca Team

Within a few days of cross mailing conversation we had an approximate idea of what we were gonna build. The 3 developers get together at my house in Mallorca, our designer and front developer, Carlos Matallín, could not enjoy physically the experience with us, but was on continuous contact through mail, skype and video conference.

The previous night was the discussion time.. a few cups of coffee and a lot of pen and paper, our idea was incredibly simple and could become something incredibly helpful, but it was full of small details and possible solutions that should be decided before work started.

Functional Paper Doc2am, Day D -2, Hour H -48, the time of the first commit, just a very concise README.md file and go to sleep.

When I waked up in the morning my partner Felipe had already the server standing up and our most important tool working: the mail digester.

The day was very pleasing, not any pressure stressed us, our code was responding our expectations incredibly well, Raimond was concentrated on the integration test layer of our application, Carlos was sending us very correct designs time at a time, Felipe working here and there knowing all the stack of the application and me focusing on the mail parser. Time at a time we reset our bodies with a very cold dip up on our small swimming-pool.

At the end of the first day our application was working. Not on any casuistic worked well, but it was working.

The second and last day supposed to be only to correct details and test any problematic casuistics, I don’t know if it was for overconfidence or because the problems to resolve were too hard to resolve but the last commit was exactly at 2am on Sunday, that means Hour H on Day D.

The supposed objective of the RailsRumble is to convince the expert judges that our application developed on 48 hours is above the rest of them.. Our project was judged as the #57 of more than 200 applications. Not available to pass to the next level: the public vote. That suppose to mean that we failed. Nothing further from the truth. We built something very transgressor, very innovative and also very simple, we were congratulated for one of the most known Ruby on Rail gurus: Obie Fernandez, we enjoyed ourself a wonderful geek weekend and we have decided to improve the code and to expose it to the community to see if it becomes as helpful as we think.

And over all we were full up of new inspiration and energized passion towards our profession.

What was that we were working this weekend? … :), the new mailing bot to help your mailing list with informal votes: LetsDecide.us. I’ll talk more concise about it on future post.

Agosto 12th, 2009

OneOfZombies a brutal stupid 2D game

OneOfZombies is an experiment proyect.

Don’t come here looking for game development knowledge or very pretty Ruby code design. This is just me playing with Ruby and with Gosu.

After a few weeks working and studding on my free time I can show you this brutal stupid 2D game.

This is not a quality project, this is not a professional stuff.

I am just enjoying my self and having fun, and by the way I hope you will have fun too!.

The game is very stupid, and the code is very ugly and dirty, I just wanted to test the Gosy library, and I have not experience on game development.

It is the first time I put my self on a pure Ruby project with more of one class. I have had such an experience with Rails and still learning! and I realize that I have got no idea about Ruby.

If you want you can go to the OneOfZombies official site and try to understand what is all of this about. You can also download the Mac OSX version, or the source code, so you will can test it on your own keyboard.

Julio 9th, 2009

jQuery: deleting the last word from textarea’s cursor

Following with the completor suggestor I was playing, I had the need to delete the last word from cursor before the completor writes the suggestion selected.

Thanks to the previous function textarea.lastWord() it was  very easy:

jQuery.fn.deleteLastWord = function() {
  this.each(function(){
    if (this.selectionStart || this.selectionStart == '0') {
      var startPos = this.selectionStart;
      var endPos = this.selectionEnd;
      var scrollTop = this.scrollTop;
 
      var lastWord = $(this).lastWord();
      startPos = startPos - lastWord.length;
 
      this.value =
          this.value.substring(0, startPos) +
          this.value.substring(endPos, this.value.length);
      this.focus();
      this.selectionStart = startPos;
      this.selectionEnd = startPos;
      this.scrollTop = scrollTop;
    } else {
      alert("deleteLastWord not supported on this navigator");
    }
  });
};

Example of use:

$('#my_textarea').deleteLastWord();

Don’t copy and paste from here, WP does weird stuff with code, download from here: http://gist.github.com/143822

This script is almost not tested, it works for me on FireFox 3.0.11 and Safari 4.0.1, so use it under your own responsability.

Julio 9th, 2009

jQuery: returning the last word from textarea’s cursor

I was enjoying trying to develop a kind of completor suggestor on a textarea, I wanted it to jump when the tab key was pressed, that what easy with capturing the keydown event and the help of event.preventDefault.

But the thing what wasn’t such easy was the capturing the last word on the textarea from the cursor.

But with the help of the code of the insertAtCaret function I was abble to obtain it:

jQuery.fn.lastWord = function() {
  var buffer = '';
 
  this.each(function(){
    if (this.selectionStart || this.selectionStart == '0') {
      var startPos = this.selectionStart;
      var endPos = this.selectionEnd;
      var scrollTop = this.scrollTop;
 
      var index = 0;
      var new_char = '';
 
      do{
        index += 1;
        buffer = new_char + buffer;
        new_char = this.value.substr(startPos - index, 1);
      } while( new_char.search( /^(\w|\.)$/|> ) != -1 )
 
    } else {
      alert("lastWord not supported on this navigator");
    }
  });
 
  return buffer;
};

Example of use:

alert( "last word from cursor: " + $('#my_textarea').lastWord() );

Don’t copy and paste from here, WP does weird stuff with code, download from here: http://gist.github.com/143808

This script is almost not tested, it works for me on FireFox 3.0.11 and Safari 4.0.1, so use it under your own responsability.

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

Creative Commons License
Fernando Guillen's blog by Fernando Guillen is licensed under a Creative Commons Attribution-NoDerivs 3.0 Unported License.