felipeNascimento.org(true);

Making the web a better place to live

Released

No comments

I proudly released the first version of the fUnit.
Also, a webpage full of examples was created and a wiki page, with the documentation.
Please, contribute with this project by sending your feedback, reporting bugs, sending ideas or even working on the code with us! You may also want to send us some money. Any of these options may be taken at our contribute page.

jfUnit

No comments

Noticing the requirement for the use of unit test for javascript, as we can see the tendency of the use of these techniques in many different languages, I decided to start my own unit test library for javascript.
Of course I searched for other tools, and found, but some were simply not good as I expected, others, demanded the use of other libraries and most of them were a bit hard to implement.
As javascript is a dynamic language, one of my intentions was to have one library added on the top of the page, allowing me to run the tests through console whenever I want, allowing me to perform all the tests any developer created on its own js file.
Thinking that way, I prepared the jfUnit, an open source project hosted at https://github.com/felipenmoura/jfUnit. You can send me ideas, criticisms, doubts or report bugs. I assure you it’s going to help making it better :)

As soon as I can, I’ll post here some tips and docs.

Dojo-Poa

No comments

O Dojo-Poa foi uma iniciativa nascida de uma ideia que surgiu durante o Fisl11. A idéia nos deixou a todos tentados, mas acabamos deixando passar um tempo. Miguel Grazziotin acabou empolgando-se com os encantos e a magia do Software Livre e com a forma como a comunidade faz as coisas fucionar. Acabou influenciando a mim e a Igor Leopoldes, e o grupo nasceu. Mas o mais legal dessa história toda é que o pessoal demonstrou muito interesse. Muita gente começou a participar e pudemos ver que já havia muita gente interessada nisso, apenas esperando por algo assim para participar e colaborar. O grupo cresce mais a cada dia, as mensagens trocadas na lista são normalmente amistosas e os dojos, além do conhecimento técnico adquirido, ainda oferece também um momento de descontração (costumamos dizer que um dojo, é o futebolzinho do fim de semana para programadores).
Lutamos para manter ao menos um dojo por semana, e muito raramente falhamos nesta missão, lembrando que em várias semanas há mais de um dojo ocorrendo.
Empresas que tiverem interesse, e uma área livre para a realização de um dojo podem se voluntariar, que estarão colaborando muito com as comunidades e por que não, com seus próprios funcionários que muitas vezes participam de um dojo.
Os dojos realizados são variados em todos os sentidos. Alternam-se dias, horários, locais, participantes, gurus e technologia.
Vale a pena participar do grupo, conhecer o pessoal e participar de alguns dojos, e não precisa ser necessariamente de Porto Alegre, ou sequer do Rio Grande do Sul para participar.

Este grupo funciona de forma muito ligada aos seus participantes, por isto, sinta-se a vontade para colaborar com ideias, críticas, sugestões e por que não, elogios…

Lista de discussão: https://groups.google.com.br/group/dojo-poa/
Site temporário do grupo: https://dojopoa.wordpress.com/

Reinventing the wheel

1 comment

I had this feeling, today, to talk about it. I’ve seen it and I have to say, it makes me fell sad, causing me a bad impression.
Many people say proudly “I will not reinvent the wheel” and laugh. They really believe they have the reason. Now, think, what if nobody had reinvented the wheel since the beginning? We would still use wooden wheels in our cars, nowadays.
I end up thinking that people with vision or attitude, might guess, will always be users, even the developers who think like this. I’m not saying you should reinvent everything you see, or not to use things that were already well developed, no, but I mean you should use the opportunity that may knock to your door to change something, to DO something due to have a better tool, instead of using workarounds in your systems simply because you don’t want to recreate something.
Think about the calendar. You don’t have to recreate it today, but I assure you, the first javascript calendar did not have all the features you use nowadays, so, who put it there?! People who reinvented the goddamn wheel.

Nowadays, essentially, we live in an age where everything is changing very fast and people talk about good practices, patterns and refactoring.
You could have invented a different way to access elements with JavaScript in a layer, but you didn’t, did you? One guy, Resig did, and now you use what he’s brought to the mankind. You could’ve invented a new way to organize, access and structure data in a base, but it was aways working fine, why would you try it?! Well, I guess I don’t need to say the word NoSQL, right.
What about patterns, like data in a file? We’ve got XML, .ini, jSon, YAML among many others… your fate is to be a user for ever, simply using these tools, techniques and technologies, being the audience of these theater.Or, will you stand up, take a wooden wheel and make it a light alloy wheel?

I’m not saying you could or should start a new database manager, but you should know that there are little things that could make a lot of difference.

ChessMate

No comments

Last weekend I had an inspiration moment. I had to create a system to one of my classes, dealing with different machines. The first thought, a chat in the web. Saturday, by noon, I had got the chat working using only Javascript and PHP, emulating a protocol for the communication between server and possible clients. Then, another idea. Why not to send commands? But why commands, and what commands, though? During the rest of my saturday and my sunday I took some time and built the chessMate. A chess game which allow you to play with your friends online, completely made in Javascript, CSS, HTML and the PHP running as server.
Before testing it, I should tell you how to play. You will start a game, then, it will provide you a code, which you can send to your friend, allowing him to get into the same game with you. If your friend started the game, ask him for the game key to play with him. When you’re creating a new game, you can simply ignore the field keyword. Also, the users must have different names.
The result, you can see here: /projetos/chessMate/.

Of course, you, smart novice programmer may think that if it is javascript, then you can break it. Yes, actualy, it is completely true. If you simply execute in a javascript console the call “win()” you will win the game, but… then, why in the hell did you started that game with your friend? If you do so, I think you’ve got more problems than simply trying to win a chess game.

About playing alone… well, I’ll see if next weekend I “teach” my machine to play a bit of chess. I don’t have the ambition of doing it inteligent or able to really learn new tactics, but I do want it to be able to move pieces in a not random way, deciding some steps, and protecting some pieces. Soon, I hope.