• February 6, 2014

    Stop stop using X and move to Y

    Let’s face it, every known programming language sucks. From C to Go, every existing programming language have their faults.

    But with all their faults, every programming language have some magic….well, except PHP (just kidding :smiley:), and that’s why we end up in love with Ruby, Python or Java. And when someone tell us that Python is better than Ruby, we rise our fist and start yelling “WHAT ARE YOU TALKING ABOUT??!! YOU CAN’T DO METAPROGAMMING!! YOU CAN’T EVEN UPDATE YOUR FRAMEWORKS TO PYTHON 3!”…but deep inside our heart we know that we envy Python programmers, they have a great community, they have lots of great frameworks, they know about performance.

    But we still enjoy when someone told us that he or she failed using X programming language and have success using Y. We hate X…we love Y. We don’t know who wrote that article, we don’t even know the company that he or she works for, but we still enjoy the information, someone is on our side. We retweet, share on HN and email all of our co-workers the article, we feel the power of the truth, truth that we already know, but we didn’t have time to prove.

    And one or two days later, we read a re-tweet in twitter: “Why we stop using Y and moved to X”, and the flame war begins again.

    Let’s face it, every known programming language sucks, X sucks, Y sucks. And nevertheless we still pay attention to “why we stop using X and moved to Y” articles.

    I don’t care why X failed at your company. I don’t know if you are an outstanding coder, or if you have no idea about X. I really don’t care. The best choice that I can make is based on MY OWN experience. If I will fail, I will fail because of me, not because of your article.

    So please, keep loving your favourite language, and keep writing code in X, keep growing the community.

    Comments & Permalink...
  • December 7, 2013

    Your own, personal, http server

    When you’re building a webapp and you want to test it on your browser you can always use Ctrl-o or Cmd-o and open the .html file.

    The thing get a little complicated when you’re using Firefox and you’re using webfonts. Firefox don’t process your webfont if you’re on a local environment. That’s when you need an HTTP Server.

    Here you have two options:

    Create some virtual host using Apache or Nginx, or Use the magical power of python:

    python -m SimpleHTTPServer

    Last week, when I was building something with my friends at SCV, I had to test if our site looks well. And I used the python solution every time.

    The things is, I’m actually working with ruby so I wondered if there is some solution to this problem using ruby. And there is a solution, here is:

    ruby -run -e httpd . -p 5000

    This script will start a web server using the current directory as a root and will listen on port 5000.

    Comments & Permalink...
  • June 15, 2013

    Twitter API 1.1 Adventures

    On June 11th, Twitter decided to close the API v1 and start using the new V1.1. So far, so good…a new version of an API, new features, what could go wrong?

    The thing is this new API validates every call using OAuth, and here is where my adventure begins…Picture yourself developing a static website, yes, only HTML and javascript code to retrieve some data from the internet, for example using Google docs parser to get data from a google spreadsheet.

    Now imagine that you want to get the latest tweets from you account to show on your website. Piece of cake! just fetch the user_timeline from twitter and render it on your website…well, that WAS a piece of cake when you can use V1; on V1.1 you need to use your OAuth credentials to access to this data. Using your OAuth credentials on your server is OK, nobody see your secret key…using your OAuth credentials using javascript is not a good idea, in fact is a Really bad idea.

    How can I, a humble adventurer, keep developing the site statically and still fetch the latests tweets?

    Unix (or in this case Linux) is the answer. My idea was to create a cron that fetch the latests tweets every X minutes, and write the result in a file accesible by the server (in my example latest_tweets.json). Then I get the information from this file using ajax and voilá!

    Thanks to a post I found on the twitter forum I can write the script in no time.

    But Fear not the new twitter API! If you are also an adventurer trapped in this very same situation, you can take a look at my script and use it to walk in the forest of the REST without fear.

    Comments & Permalink...
  • June 4, 2013

    Introducing Software Psychonaut

    Hello, my name is Sergio and this is my personal Blog, a humble creation that I expect to grow over time. Don’t expect to see serious things here, I will be talking about my experience on Software Development (with a lot of emphasis on Ruby), and ohter related stuffs. By related I mean no-so-related things :stuck_out_tongue:. Maybe I will talk about music, maybe about programming and maybe about gaming.

    Given that I’m a Spanish speaker, sometimes you will find some article written in Spanish, just for the sake of clarity. Talking about that, If you understand Spanish and want to enjoy 20 minutes of talks about the everyday life of software development, don’t miss the Ideas Ágiles' podcast at: http://www.ideasagiles.com/podcast

    That’s it for today, hope to see you reading this blog again in the near future!

    Comments & Permalink...