Tuesday, October 29, 2013
Thursday, October 24, 2013
PrimeFaces vs RichFaces vs IceFaces
http://www.mastertheboss.com/richfaces/primefaces-vs-richfaces-vs-icefaces
Tuesday, October 22, 2013
Saturday, October 19, 2013
Thursday, October 17, 2013
Maven: Generating DDL Scripts from JPA Annotations
Java’s persistence API (JPA) makes object-relational mapping very convenient. Persistence providers like Hibernate can create tables and sequences automatically saving lots of tedious work at development time. However, in production systems automatic schema creation isn’t desired.
In many cases you want to tune the schema a bit, like adding an index for speeding up common access paths, renaming constraints and the like. Additionally, an application should run with as little DB privileges as possible, so it’s quite common that CREATE TABLE or other DDL/SQL statements are simply not permitted.
That’s where the Hibernate3 Maven Plugin can give you a good starting point for your optimizations.
Prerequisites
This article is for you if
- you use JPA annotations on your entities
- your persistence provider is Hibernate 3
Configuration
The plugin wraps an Ant task from Hibernate Tools that analyzes your JPA entities and creates a database schema for them.
Then adjust your persistence.xml file in src/main/resources/META-INF to set the SQL dialect to use for the DDL statements:
The example above uses HSQL (the embedded database that ships with JBoss), but you’ll likely need a different dialect for your production setup. You can get a list of supported dialects from Hibernate’s API documentation. Also make sure that the persistence unit’s name (Default in this example) matches with the plugin configuration and your persistence.xml.
Now execute the hbm2ddl goal from the command line to create the schema:
mvn hibernate3:hbm2ddl
You will find your schema in target/hibernate3/sql/schema.ddl.
Alternatives
If you want to execute hibernate3::hbm2ddl automatically as part of your normal build, you can tie the hbm2ddl goal to the process-classes phase. There’s an example on the plugin’s homepage.
Wednesday, October 16, 2013
Sunday, October 13, 2013
Catcher In The Rye
When all is said and done
We're not the only ones
Who look at life this way
That's what the old folks say
But every time I see them
Makes me wish I had a gun
If I thought that I was crazy
Well I guess I'd have more fun
(Guess I'd have more fun)
Saturday, October 12, 2013
Tuesday, October 08, 2013
Saturday, September 28, 2013
Sunday, September 22, 2013
Thursday, September 19, 2013
Déspotas
“Há três tipos de déspotas. Aquele que tiraniza o corpo, aquele que tiraniza a alma e o que tiraniza, ao mesmo tempo, o corpo e a alma. O primeiro é chamado de príncipe, o segundo de papa e o terceiro de povo”.
Oscar Wilde
Oscar Wilde
Saturday, September 07, 2013
7 Economic Attributes Compared
Think about economy. The main question is "mind set".
| Market Economy (AS-IS) | Earth Economy (TO-BE) |
| Consumption | Preservation |
| Obsolescence | Optimum Design |
| Property | Access |
| Infinite Growth | Steady State |
| Competition | Collaboration |
| Labor for Income | Mechanization |
| Scacity/Imbalance | Abundance/Equality |
Thursday, September 05, 2013
Best Best Practices Ever
- Write programs for people, not computers.
- a program should not require its readers to hold more than a handful of facts in memory at once
- names should be consistent, distinctive and meaningful
- code style and formatting should be consistent
- all aspects of software development should be broken down into tasks roughly an hour long
- Automate repetitive tasks.
- rely on the computer to repeat tasks
- save recent commands in a file for re-use
- use a build tool to automate scientific workflows
- Use the computer to record history.
- software tools should be used to track computational work automatically
- Make incremental changes.
- work in small steps with frequent feedback and course correction
- Use version control.
- use a version control system
- everything that has been created manually should be put in version control
- Don’t repeat yourself (or others).
- every piece of data must have a single authoritative representation in the system
- code should be modularized rather than copied and pasted
- re-use code instead of rewriting it
- Plan for mistakes.
- add assertions to programs to check their operation
- use an off-the-shelf unit testing library
- use all available oracles when testing programs
- turn bugs into test cases
- use a symbolic debugger
- Optimize software only after it works correctly.
- use a profiler to identify bottlenecks
- write code in the highest-level language possible
- Document design and purpose, not mechanics.
- document interfaces and reasons, not implementations
- refactor code instead of explaining how it works
- embed the documentation for a piece of software in that software
- Collaborate.
- use pre-merge code reviews
- use pair programming when bringing someone new up to speed and when tackling particularly tricky problems
The only extra I would have included would be:
11. Maintain and update older code.
Sunday, September 01, 2013
Expressões Idiomáticas - Idioms
A Língua Inglesa possui algumas armadilhas para quem não a fala como língua materna, dentre elas estão as Expressões Idiomáticas (Idioms), que são figuras de linguagem onde um termo ou a frase assume um significado diferente do que as palavras teriam isoladamente. Assim, não basta saber o significado das palavras que formam a frase, é preciso olhar para todo o grupo de palavras que constitui a expressão para entender o seu significado. As Expressões Idiomáticas trazem conotações diferentes, que, na maioria das vezes, estão relacionadas às suas origens. É importante salientar que os idiomatismos não foram criados para serem armadilhas para os falantes estrangeiros, pelo contrário, elas tornam o Inglês Falado (Spoken English) mais natural. Relacionamos abaixo alguns exemplos de Expressões Idiomáticas mais usadas pelos falantes nativos da Língua Inglesa.
Act your age = Não seja infantil
All day long = O dia todo
Beyond a shadow of doubt = Sem sombra de dúvida
Blood is thicker than water = Os laços de família são mais fortes
Cross my heart = Juro por Deus
Everybody says so =Todos falam assim!
For goodness’ sake! = Pelo amor de Deus!
Good Lord! = Meu Deus!
Hand in Hand = De mãos dadas
I did quite well = Sai-me muito bem
Keep your eyes peeled = Fique atento
Leave it to me = Deixa comigo
Like hell! = Uma ova!
May I have the floor? = Posso falar?
Mum’s the word = Boca de siri
Never heard of = Nunca ouvi dizer
Never mind = Deixa prá lá / Não tem importância
Once and for all = De uma vez por todas
One never knows = Nunca se sabe
Pretty soon = Em breve
Quite a bit = muito, um montão, bastante, um bocado
Right over there = Logo ali
See you there = Até lá
Shoot the works = Manda brasa
Talk is cheap = Falar é fácil
Thank God = Graças a Deus
It is up to you = Você que sabe
You know best = Você é quem sabe
Take your time = Não se apresse
So far, so good? = Até aqui, tudo bem?
It is not your business = Não é da sua conta
To kick the bucket = Bater as botas / Morrer
How come? = Como é que pode?
How are you doing? = Como está?
Act your age = Não seja infantil
All day long = O dia todo
Beyond a shadow of doubt = Sem sombra de dúvida
Blood is thicker than water = Os laços de família são mais fortes
Cross my heart = Juro por Deus
Everybody says so =Todos falam assim!
For goodness’ sake! = Pelo amor de Deus!
Good Lord! = Meu Deus!
Hand in Hand = De mãos dadas
I did quite well = Sai-me muito bem
Keep your eyes peeled = Fique atento
Leave it to me = Deixa comigo
Like hell! = Uma ova!
May I have the floor? = Posso falar?
Mum’s the word = Boca de siri
Never heard of = Nunca ouvi dizer
Never mind = Deixa prá lá / Não tem importância
Once and for all = De uma vez por todas
One never knows = Nunca se sabe
Pretty soon = Em breve
Quite a bit = muito, um montão, bastante, um bocado
Right over there = Logo ali
See you there = Até lá
Shoot the works = Manda brasa
Talk is cheap = Falar é fácil
Thank God = Graças a Deus
It is up to you = Você que sabe
You know best = Você é quem sabe
Take your time = Não se apresse
So far, so good? = Até aqui, tudo bem?
It is not your business = Não é da sua conta
To kick the bucket = Bater as botas / Morrer
How come? = Como é que pode?
How are you doing? = Como está?
Subscribe to:
Posts (Atom)










