Configuração de teclado BR ABNT2 no Evev

Dica de última hora para quem ficou muito tempo afastado 🙂 e nunca mexeu com o evdev: para configurar o suporte a BR ABTN2 no Evev você pode fazer o seguinte:

cp /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi /etc/hal/fdi/policy/

Editar as linhas de configuração do teclado. Ficará mais ou menos assim:

<merge key="input.xkb.layout" type="string">br</merge>
 <merge key="input.xkb.variant" type="string" />

Reinicie o daemon do hal e pronto.

The Rime of The Acient Programmer

Uma paródia da The Rime Of the Ancient Mariner que eu escrevi:


Hear the rime of the Ancient Programmer
See his eye as he compiles one of three
Mesmerises one of the testing guys
Stay here and listen to the nightmares
of the IT

And the test goes on, as the manager passes by
Caught by his spell and
the Programmer tells his tale.

Driven south to the land of the comments and code
To a place where programmer’s been
Through the code flies on the albatross
Hailed in Murphys’s name,
hoping good luck it brings.

And the test goes on, back to the North
Through the requirements and comments and
the albatross follows on

The Programmer kills the bird of good omen
His teammates cry against what he’s done
But when code compiles, they justify him
And make themselves a part of the crime.

Coding on and on and North across IT
Coding on and on and North ‘till all is done

The albatross begins with its vengeance
A terrible curse a crash has begun
His teammates blame bad luck on the Programmer
On his back, the manager stands

And the bugs goes on and on and on at IT
And the crash goes on and on for the users and for me

“Day after day, day after day,
we stuck nor fix nor promotion
As idle as a painted ship upon a painted ocean
Bugs, bugs everywhere
more than debugger can find
crashes, chrashes everywhere and no dump to find”

There, calls the programmer
there comes a strange message in the logs
But how can he debug with no memory dump
in the core and no files?

See… onward she comes
Onwards she nears, out of the SUN
See… she has no team
He has no life, wait but there’s two

Analyst and she the Analyst
she designed a new classes for the team
She shows the Programmer and he coded it now.
Then … the team one by one
They starting fixing, two hundred men
She… She, the IT Analyst
She shows them the bugs, design ones

“One after one by the star dogged moon,
too quick for groan or sigh
The manager turned his face with a ghastly pang
and cursed me with his eye
Four times fifty living men
(they had no life nor weekend),
had to code the fixes for a SUN,
and they fixed the bugs one by one.”

The bugs it lives on in their eyes
The Programmer he wished he’d die
Along with the application bugs
But they lived on, so did he.

And by the light of the moon
He prays for his code not doom
With comments he blesses them
Murphy’s creatures all of them too.

Then the app starts to run
The manager gets out from his back
Thanks for effort and goes back to IT
Then down in falls comes the release.

Hear the groans of the lifeless team men
See them stir and they start to rise
Bodies lifted with lots of coffee
None of them speak
and they’re lifeless in their eyes

And revenge is still sought, penance starts again
Crashes in the users face and the nightmare carries on.

Now the curse is finally lifted
And the Programmer drives home
Spirits go from the long dead bugs
Form their own failures and
the Programmer’s left alone

And then a support guy came running towards him
It was a joy he could not believe
The support guy, the client and the team lead
Penance of life will fall onto Him.

And the code it ships like product from the IT
And the Manager forgives the Programmer of his sins

The Programmer’s bound to tell of his story
To tell his tale wherever he works
To teach Murphys’s word by his own example
That we must code all requirements she had made.

And the release fest’s a sad and wiser man
And the tale goes on and on and on.

Benchmarks do Firefox

Com toda essa discussão sobre benchmarks do Firefox, GCC, ICC, etc. Hoje resolvi fazer uns testes de desempenho do Firefox no Arch Linux versus Firefox no Windows.  No Arch, por não saber ao certo qual seria mais adequado, escolhi dois pacotes da AUR: firefox-optimized e firefox-pgo. Ambos foram compilados com -march=x86_64 -mtune=generic -O2 -fomit-frame-pointer -pipe (todas essas flags estavam por PADRÃO no arquivo makepkg.conf do Arch).

Continue reading “Benchmarks do Firefox”

Gosta de Xbox 360?

Essa dica é pra você que gosta do videogame Xbox 360 da Microsoft e está interessado em compartilhar dicas, reviews, opiniões, conhecer novas formas de adquirir Microsoft Points ou assinaturas Gold, Xbox Live, etc. Eu e alguns amigos criamos a lista de discussão Xbox 360 Brasil no Google Groups.

Para assinar o grupo envie um email para x360brasil-subscribe(arroba)googlegroups.com ou visite a página do nosso grupo. Todos os assuntos são bem vindos: mods, integração com Linux e Mac OS X, etc.

Frase do mês

Hoje, lendo o Code Complete 2 topei com essa frase do Dijkstra:

“The competent programmer is fully aware of the limited size of his own skull. He therefore approaches his task with full humility, and avoids clever tricks like the plague.”

Traduzindo:

“O programador compentente está ciente do tamanho limitado do seu próprio crânio. Ele, então, aborda sua tarefa com total humildade e evita truques espertos como (evita) a peste”

Windows 7 unmasked

Como eu disse anteriormente, o Windows 7 é o primeiro de muitos windows que eu acho que vale a pena acompanhar. Acredito que, talvez, ele resolva os problemas que transformaram o Windows Vista em um fiasco. Acompanhando as aventuras do B. Piropo com os betas do Seven, topei com o artigo Windows Seven unmasked que aborda os aspectos mais técnicos do sistema. Vale a pena conferir se você está interessado em saber como está o desempenho, kernel, etc.

Sobre benchmarks de linguagens

Hoje, não sei como, topei com mais uma comparação de desempenho entre Java em e C++ que, como de costume, gerou uma discussão sem fim. Não que eu ache essas discussões totalmente inúteis: na verdade, você sempre acaba aprendendo/conhecendo alguma coisa nova. O ponto principal e que todo mundo ignora – para meu espanto – é que, quando um programa qualquer em Java é mais rápido que o seu equivalente em C/C++ isso só prova uma coisa: que um programa C/C++ bem escrito consegue processar qualquer coisa bem rápido, inclusive os bytecodes do Java 😉

Em tempo, dêem uma olhada nesse interessantíssimo conjunto de benchmarks.

Excelente desfragmentador para Windows

De vez em quando eu acabo eu acabo encontrando alguns programas para Windows realmente muito bons. Hoje foi o caso, enquanto procurava uma ferramenta pra melhorar o desempenho do micro da minha mãe acabei encontrando o Ultimate Defrag, da Disk Trix. A boa notícia sobre o programa é que ele é completamente grátis, inclusive para uso pessoal comercial. Basta preencher o formulário de cadastro e você pode baixa-lo aqui.

Dicas: diminuindo o uso da CPU no dd-wrt

Depois de ter instalado o DD-WRT, eu tive alguns probleminhas devido ao uso excessivo da CPU. Aqui vão duas dicas rápidas para quem quiser diminuir o uso da CPU noLinkSys WRT54G v6 rodando a DD-WRT v24:

  1. Desabilite o suporte q QoS
  2. Use WEP ao invés de WPA2*

No meu caso, o roteador que estava com um load average em torno de 3 a 4, caiu para menos de 1.5, como é possível ver no “copy/paste” abaixo, copiado de um momento em que meus micros estão fazendo vários downloads, aumentando o uso da CPU do roteador.

Firmware:
DD-WRT v24-sp1 (07/27/08) micro
Time:   22:41:05 up 31 min, load average: 0.34, 0.76, 0.74
WAN IP: 192.168.1.64

Como vocês podem ver, o uso da CPU caiu consideravelmente.

*Obs.: Não posso confirmar com 100% de que essa configuração realmente diminuiu o uso da CPU – e também não recomendo pois é mais inseguro que o WPA2 – mas listo aqui como sugestão e registro histórico de algo que eu fiz e aparentemente ajudou a resolver o problema.