Which wolf do you feed?

This is a pretty good story that I heard today. It has all about how your attitude can affect your day to day life.
A Cherokee Legend

An old Grandfather said to his grandson, who came to him angry at a friend who he felt had done him an injustice, "Let me tell you a story…

I too, at times, have felt a great resentment for those who have taken so much,with no seeming sorrow or remorse for what they do. I have struggled with these feelings many times." He continued, "It is as if there are two wolves inside me engaged in a challenging conflict.”

"One is evil – he is anger, envy, sorrow, regret, greed, arrogance, self-pity, guilt, resentment, inferiority, lies, false pride, superiority, and ego. The littlest thing will set him into a fit of temper. He fights everyone, all the time, for no reason. He cannot think because his anger and hate are so great. It is helpless anger, for his anger will change nothing.”

He continued, "The other is good – he is joy, peace, love, hope, serenity, humility, kindness, benevolence, empathy, generosity, truth, compassion, and faith. He does no harm. He lives in harmony with all around him, and does not take offense when no offense was intended. He will only fight when it is right to do so, and in the right way.

Sometimes, it is a challenge to live with these two wolves inside me, for both of them try to dominate my spirit. The same challenge is going on inside you – and inside every other person, too."

The grandson thought about it for a minute and then asked his grandfather, "Which wolf will win?"

The old Cherokee simply replied, "The one you feed."

Do you ever stop to ponder….which wolf inside of you do you feed more?

Bug or feature?






Java Developers Please Help

This is the translation of a post that I have written yesterday in Portuguese (pt-BR): Programadores Java Por favor ajudem. It will tell the same story and also share the updates. Honestly I hope to find some clues by sharing this issue with the International Java Community.

I haven’t developed with Java for a long while. Last time I have coded anything in Java it was with J2ME and, if I’m not mistaken, the framework was at its version 1.

Recently I was trying to help my old man (dad) with an issue that he was having at his real estate agency. For unexplained reasons until this moment, his Bank - www.bb.com.br –  site does not work with his Windows 7 Dell machine.

To get the issue resolved I have entered in contact with it’s tech support. Their tech support is annoying as it could be, they can only be contacted through phone and if you need to really get in touch with a technician, the only way possible is by having the branch manager to call in for you.

The 1st contact it was suggested to format the computer and try all over again, as it could have a worm / virus or a corrupted Java machine. With a lot of complains we did that and after all it still did not work.

Contacting the Bank tech support again the reply were:

  • there is a virus again (as it had from the beginning)
  • the ISP (Velox) provider was blocking content making the bank site not to work properly.

The ISP is blocking content? Really? You got be F**** kidding me. I knew that it was completely bullshit.

As a PHP developer I can tell that there is an issue with the bank website and / or with it’s Java application and honestly I don’t think that Java is restricted to a operating system or browser (that would be simply ridiculous).

So I came in request some help from Java developers. Can someone please give me a reasonable / logic explanation of why the bank Java application is not working on a Dell Windows 7 Machine?


After I have posted this yesterday I had got a possible lead. There is a plugin that some bank java applications uses and this plugin is completely incompatible with some versions of Windows 7.  The solution so far: none.

Programadores Java por favor ajudem

Sorry for all readers, this post will be initially in Portuguese since is completely directed to Brazil, but a version of it in English can be found here: http://mcloide.wordpress.com/2013/05/31/java-developers-please-help/.

Ja nao programo Java a um bom tempo e honestamente a ultima vez que programei Java foi com o J2ME e o framework ainda era a versao 1. Recentemente me deparei auxiliando meu pai, um senhor de 70 anos, a resolver um problema que acontece especificamente com o site do Banco do Brasil (www.bb.com.br).

Estarei contando o acontecimento abaixo e no fim voces entenderao por que peco ajuda a mais programadores Java no assunto.

Por algum motivo o site do Banco do Brasil nao funciona em nenhum dos computadores do escritorio, mas funciona no computador pessoal dele em casa. Para uma definicao technologica, tanto a configuracao do computador pessoal quanto a configuracao dos computadores do escritorio sao:

  •  Windows 7 Profissional
  • Marca Dell
  • Browsers IE10, Chrome e Firefox
  • Java 7 (ultima versao)

Conversando com o pessoal do suporte tecnico do banco a principio nos foi sugerido que tinha um virus no computador e que este estava bloqueando o funcionamento do site do banco. Foi pedido um tecnico de informatica para avaliar o problema e o que foi sugerido pelo tecnico seria que tem alguma coisa que o site instala ou requer que foi danificado e apenas formatando o computador resolveria. A principio foi estranha a ideia mas considerando tudo que tinha sido passado, toda a frustacao, toda raiva e o fato que o computador precisava de uma boa limpeza, decidimos por formatar.

Se o computador foi formatado, tudo instalado com a ultima versao (drivers, software, etc), logica indica que o site deveria funcionar, certo? Errado o site do banco ainda nao funciona. Nao apenas o site mas tambem o gerenciador financeiro de empresa, outra aplicacao java.

O tecnico do banco que estava no escritorio deu 2 sugestoes:

  • ou o computador, que acabava de ser formatado, estava com virus novamente
  • ou o provedor Velox estava bloqueando o funcionamento do site

SERIO!!!!! O provedor Velox esta bloqueando o funcionamento do site do banco??????? So podem estar de sacagem comigo.

Neste momento eu tive mais do que certeza que tudo que tinha sido falado ate o momento era: rebimboca da parafuseta ou como fala-se nos EUA bullshit.

Verdade seja dita tem algum problema ou com o site do banco ou com o compuador ou o conjunto dos dois que impede o funcionamento correto do site, mas como o site ‘e uma aplicacao java, gostaria de ter uma opiniao sincera dos programadores java, Brasileiros ou nao, sobre o acontecido.

Para mim ja nao faz sentido saber que o site nao funciona com nenhuma versao anterior do Java e que o site nao funciona em nenhum dos browsers instalados nos computadores.

Como programador PHP toda aplicacao desenvolvida deve ter um suporte mimino de browsers e nao se tem uma restricao de Sistema Operacional a nao ser que o SO nao suporte algum browser.

Por isso venho por meio deste pedir a todos os programadores java que me ajudem a achar uma explicacao logica ou pelo menos sensata pela qual uma aplicacao Java que no caso ‘e um site, nao funciona de adequadamente em um computador que tem uma especificacao tao commun a milhoes de outros pelo resto do munto.

P.S. O unico supporte que existe para o site do banco ‘e via telefone (SAC) e sinceramente, para conseguir um tecnico de informatica do outro lado da linha ‘e necessario que a chamada seja feita por um gerente de contas da agencia do banco (ridiculo).


Conversando com o @gritante e @ratones no Twitter tive uma pequena pista que o problema pode estar numa atualizacao do plugin da GAS. Procurando um pouco de informacao sobre o assunto achei o seguinte artigo do Globo News: http://g1.globo.com/tecnologia/noticia/2013/04/software-bancario-brasileiro-pode-ser-causa-de-travamento-do-windows-7.html

Creating your PHP Onboarding for Windows machines

There are many many ways to have a full LAMP stack on a Windows machine and use it for PHP development like WAMP, for example. This is ok if you are developing just for fun, but in corporate level an on-boarding environment is much preferred. Having a pre-defined server image with all that is necessary to almost replicate your production server on a developer machine helps on preventing errors and, most importantly, quickly have new developers up-to-speed with the corporation development environment.

Consider that you would need:

  • Apache
  • PHP
  • MySQL
  • Memcache
  • APC
  • some extra libs
  • GIT repository

Creating this under windows can be such a hassle and in cases like this bundled solutions does not work.

To create a full LAMP stack on your windows machine and have it 100% stand-alone I have used Vagrant. On the prior version of Vagrant (V1) you had to use Putty in order to ssh to the VM and that was a painful process, with the newer version (V2) you can use built in Vagrant SSH as long you install an SSH support library like the one from GIT. There is a trick on the GIT installation, you must choose the option with the Linux / Unix commands (it has a red warning message about overwriting windows libs).

Prior installing Vagrant you will need to install Virtual Box. It is a Oracle virtual box machine. Very useful if you are on OSX or Linux and need to run tests on Windows IE9 (sig). This part of the process is very well explained on the Vagrant documentation.

Now comes to Vagrant install. It is fairly easy. Install Vagrant, then open command line and run “vagrant init”. It will create a default vagrant file with most of the basic things defined. Here comes a trick. The default vagrant file tries to download the precise VM.  I have tried to contact Vagrant a couple times on Twitter and with no luck. There is an issue with the download of this box, the server resets the connection prior the download to be finished.

There is a way out of this: VagrantBox.es – Select the box that you best consider that matches your environment, add it on vagrant (vagrant box add) and finally update the vagrant file to use the new added box.

After this, everything is as simple as setting up the environment. Unless you have an specific need to add the GIT repository files under another folder you can set it all under the vagrant folder (same folder where the vagrant file is located).

I could use the GIT command line on windows to clone / commit my repositories, but using the GIT windows tool from GitHub is way too fun :D

I know that most of PHP developers use either Linux or OSX for development. It is much easier to setup and use, but if you are stuck with Windows, you might as well benefit of this.

Just a note, off course the main environment mentioned here was LAMP, but this same process can be used for Ruby, Phyton and may other hipster languages available =D



I had a networking issue with the current box that I’m using. It seems that it is a common issue with some boxes as mentioned here – https://groups.google.com/forum/?fromgroups=#!topic/vagrant-up/Yeu6UF-GJO8

To fix run this: sudo /etc/init.d/networking restart

If you never installed a LAMP stack before, this article here will give you all the steps to install it correctly: http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-ubuntu-12.04-lts-lamp

IE Test VM’s for Virtual Box

Always a useful resource.

There is a list of VM’s with several versions of IE’s if you are under OSX (might work with Linux as well – haven’t tested).

Very useful if you, for some strange reason, IE doesn’t work with your Javascript, CSS, design, etc.


How to identify a hack

This is in programming 101 – how to correctly identify a hack

Increasing Size of your VirtualBox virtual disk

Today my PHP application on my linux virtual server was giving me a ton of error on simply allocating space for sessions. I couldn’t have actually ran out of space but it was worth the check.

df -h

100% of my virtual image was used and since I did not want to go to the hassle of re-doing everything again, after a bit of research, this is what I have found that helped me a ton:

VBoxManage modifyhd /path/to/the/virtual/disk/image.vdi –resize 20480

This would work perfectly, but my image wasn’t a VDI it was a VMDK which will throw you an error when you do the same process.

There is a way around it:

1st – VBoxManage clonehd /path/to/the/virtual/disk/image.vmdk /path/to/save/the/new/virtual/disk/image.vdi –format vdi
2nd – VBoxManage modifyhd /path/to/new/virtual/disk/image.vdi –resize 20480

For a 8GB Virtual Image it can take up to 20 minutes for the whole process.

Note: This was done in command line for OSX.

The future of blogging

… or at least the future of this blog.
It has been a while since I have last written anything on this blog, reason is, lately I have been retweeting more and sharing more stuff on Google+ than writing here.

There is a lot happening with technology, PHP and web development in general and even if I wanted to, writing about everything is barely impossible.

Considering this, I have decided to keep writing on this blog but when only the situation requer to. For example, if there is a new piece of technology, PHP feature, etc that requires a longer explanation or more words than 140 chars, it will be here, otherwise, check Twitter and Google+.

To make this feed easier to check I have added some of the social medias that I’m part of in www.mcloide.com . There you will find my twitter account, my G+ account and some other accounts like Github and Coderwall.

See you on twitter or till next post right here ;)


I have just purchased a notebook with iBuypower.com. Truth is that I have never heard about them before or never knew anyone that had purchased any computer with them, still they were the few websites available that offered customized systems. This is my review of the notebook and their services thus far.

Searched through a few forums and finally I have found a good reference from them, they had systems to be sold in Newegg.com. Everyone knows Newegg.com.

This are the settings that I have asked for the notebook:

1 x Case (Battalion 101 W350ETQ 15.6″ Full HD 1920×1080 Widescreen LED TFT Laptop w/HDMI Port, USB 3.0 port, fingerprint Reader, Li-Ion Battery, Universal AC Power Adapter – Original Metallic black))
1 x Processor (Intel® Core™ i7-3630QM Mobile Processor (4x 2.4GHz/6MB L3 Cache)))
1 x Memory (16GB [8GB x 2] 1333MHz DDR3 SDRAM [Laptop Memory] – Corsair or Major Brand **FREE Upgrade to 16GB [8GB x2] DDR3-1600 G.Skill**))
1 x Video Card (NVIDIA GeForce GTX 660M 2GB GDDR5 Video w/ NVIDIA Optimus [W350ETQ]))
1 x Primary Hard Drive (256 GB ADATA SP900 SSD – Single Drive))
1 x Data Hard Drive (500 GB 5400rpm Serial-ATA Super Slim Laptop Hard Drive))
1 x Optical Drive (8x Dual Format DVD±R/±RW + 16x CD-R/RW Combo Drive [W350ETQ]))
1 x Sound Card (3D Premium Surround Sound Onboard))
1 x Network Card (Built-in 10/100/1000 Mbps LAN [Laptop]))
1 x Operating System (Microsoft Windows 7 Professional + Office Starter 2010 (Includes basic versions of Word and Excel) – 64-bit))
1 x Warranty (Standard Warranty Service – Standard One(1) Year Limited Warranty + Lifetime Technical Support))
1 x Rush Service (Rush Service Fee (not shipping fee) – Deferred Delivery (Ship Out in 15 ~ 20 Business Days) – 5% OFF on systems over $999 (Coupon Code: defer)))
1 x USB Ports (Built-in 1x USB 2.0 + 2x USB 3.0 + 1x USB 3.0 / eSATA Combo Ports [Laptop]))
1 x Video Camera (Built-in 2.0 Mega Pixels Digital Web Video Camera))
1 x Internal Wireless Network Adapter (Intel Advanced-N 6235 802.11 a/g/n 300Mbps Dual-Band Wi-Fi + Bluetooth Combo))
1 x Flash Media Reader / Writer (Built-in 9-in-1 Media Card Reader/Writer [Laptop]))
1 x Carrying Case (Free Deluxe Carrying Case))

I was waiting this notebook to be awesomely built and it is.

These are the pros:

  • extremely well packaged. It was so protected that the ratio for the box x contents was of 4 x 1 (the box was 4 times bigger than its contents and filled with foam and popcorn-foam)
  • beautiful body
  • onkyo speakers
  • extremely awesome resolution screen
  • came with a windows 7 recover dvd (and some other drivers installation dvds). I personally loved this because the last notebook that I have bought didn’t came with it and gave me a huge headache to recover everything when the hard drive failed.
  • Their customer service rocks. Ok, they had a miss communication with me in one of the emails, but on the phone everything was rectified.

So far these are the cons:

  • deferred shipping (I really did a very dumb decision when I have chosen this discount – dont do it)
  • battery runs out pretty quickly when using it on max power


I will be putting this note to the test today. Started downloading Guild Wars 2 and I will install a Virtual Machine with tunneling to use as my webserver.

In general, right now, I would buy from them again. I’m very satisfied with the notebook and they do deserve two thumbs up.


Get every new post delivered to your Inbox.

Join 236 other followers

%d bloggers like this: