Showing posts with label Java. Show all posts

Showing posts with label Java. Show all posts

SCJP 6.0 Exam: Unmystified

Hello, world!

In December/2007, I've just started to study to take my - very late - Java Programmer certification as the version 6.0 of the exam was early released. Although I knew it wasn't the latest version of the exam (and of Java itself), I've started studying for the 5.0 exam, which, alone, has too many new things to be learned for a mobile programmer. This time, I'm going to talk about the Sun Certified Programmer for Java Platform, Standard Edition 6.0 Exam and my experience of doing the test. 

[Offtopic] As you might have noticed, I awoke with the spirit of making things different and, thus, decided to do my first English post here, at MicroKode. I'll probably keep writing my articles this way and I really hope that the few out there who read my daydreams don't bother about it. I also hope this help to transform this "few" in a "little greater few". Now, back to the topic...

As I've said, the 5.0 version of Java has a lot of new things: Generics, Boxing, Enhanced for Loop, Enums, Varargs, Static Imports and Annotations (the last is not required for the exam). So I've just forgot the existence of a newer version - the sixth - and started reading the "SCJP Sun Certified Programmer for Java 6 Study Guide" from Kate Sierra and Bert Bates. This book is just the best. Go for it! 

About one month later I finished reading it and bought the voucher. I gotta say a word on it: the Sun service here in Brazil is just a bunch of crap. They are very polite and try to attend your requests for the best, but I had to wait about 1 month and a half to get my voucher numbers. And when they finally sent it to my e-mail the expiring date was wrong. Luckily I received a new mail with the correct date, before I even notice the other was wrong.

While waiting the voucher numbers I started doing some simulated exam from the Whizlabs software and I, gotta admit, I've never passed the exam in the simulator from these guys. The difficult level they apply on their software is far more hard than the test itself. But, at the time I wasn't aware of this and decided to delay my application to a later date, that turned to be 14th this month, about one year later.

If you think I was studying all this time you are completely nut. I only did the test because my voucher was about to expire! So I stepped to the Prometric site and scheduled my test to January 14th. Note: the current day was January 8th. This day I request a friend to help me with the scheduling and he just ask me why I was applying to 5.0 exam. He argued that the differences between the two versions of the exam where very few and that it won't worth to do the "old" test anymore. I did some searching and found several articles saying the same. Look, I was about to loose 330 bucks anyway, what's the problem on adding a bit more of complexicity to the mix? I took the exam version 6.0.

The "new" Java version hasn't any bigger changes. At least none of the new exam topics were a big deal. Only one class and two new Interfaces to know about. Compared with the wave of changes from the 1.4 to the 1.5 versions, this means nothing. Here are my tips to get passed the test with no headaches:
  1. Read the Kate Sierra and Bert Bates book. The reading is soft and the content is great, after finishing it you sure gonna be ready to take the test. Don't forget to make the exercises and re-read the "Two-Minute Drill" a few days before the test, so you can refresh the things in your mind and identify the parts where you have to study a little more. 
  2. Buy your voucher as soon as you decide to take the test. Don't wait to finish studying to do so. If you do, you may forget all you've studded before Sun deliver your voucher number.
  3. Don't even think taking the test for the 5.0 version. The differences are few to none. I got just one question about Console and none about NavigableSet and NavigableMap interfaces on my exam. Remember your voucher allows you to do any of the exams.
  4. Don't even download the Whizlabs exam simulation software. Alright, that's a bit exaggerated. You can download and exercise on it, the software is really good. But keep in mind that the real exam is much easier. When I said "much", I meant MUUUUUUUCH!
  5. Don't be afraid, Generics aren't a problem at the exam, but double check Collections. Much of the exam will test your knowledge on declarations, initialization and scooping, flow control and fundamentals. In fact I think about 1/4 of the exam questions just don't compile. There were also two questions about OO (coupling and cohesion), one for IO and a few for Collections and Generics.
  6. On the SCJP 6.0 exam, they raised the passing score, but also the test time. And a lot! So, don't run, you got enough time. I finished the test with about one hour and half left.
Finishing the legend, I surprisingly had passed the test... and with easy. Scored 79% when the passing score was only 65%. Obviously I wish I had gone 100%, but I just don't have enough patience to study that much, and, after all, getting certified, alone, was a great deal for me.

Last, but not least, follows a list of test simulators for you to practice on before taking the real test:

JavaME: BUG Pode Afetar Millhões de Celulares

Hello [Secure] World!

O hacker polonês, Adam Gowdiak, anunciou a descoberta de um bug na implementação da plataforma JavaME em, aproximadamente, 140 celulares S40 da Nokia. Ele argumenta que um potencial ataque pode ceder acesso à MMS, SMS, PUSH e WAP sem que o usuário sequer tenha conhecimento.

Entre outras vulnerabilidades, o bug pode também possibilitar que o malware faça ligações, ganhe acesso ilimitado ao File System, à agenda de contatos, ao SIM card e
à gravação de audio e video. Tudo isso, sem que o usuário saiba.

Gowdiak não divulgou em detalhes que tipo de procedimento causa o problema... pelo menos, não de graça. Ele colocou à venda um estudo de 178 páginas que descrevem o problema e como explorá-lo, com direito à código-fonte de exemplo e tudo mais. Por quanto? "Apenas" 20.000 euros é a resposta.

Não se sabe se a Nokia comprou o tal documento, mas Gowdiak pretende lucrar aproximadamente um milhão de euros, visto que é possível que o mesmo problema esteja em mais 1 milhão de celulares de várias fabricantes. Gowdiak pretende usar esse dinheiro para estruturar sua empresa de segurança: Security Explorations.

Mais em: http://www.telecoms.com/itmgcontent/tcoms/news/articles/20017560920.html

Eclipse? Que é isso?

Hello World!

Provavelmente você deve sabe que o Eclipse é uma IDE (Integrated Development Environment) para desenvolvimento em Java, certo? Errado! O Eclipse é uma ferramenta muito mais poderosa que isso.

História
A IBM, originalmente, idealizou o que mais tarde viria a se tornar a Eclipse Platform com a intenção de resolver uma fonte de reclamações constantes por parte de seus clientes: As várias ferramentas IBM pareciam vir de companhias distintas e simplesmente não funcionavam juntas. Faltava consistência. De quebra, essa solução ainda diminuiria a replicação de código comum, coisa que é sempre bastante benéfica.

Depois de construída, a plataforma era boa o suficiente para ser difundida, então a IBM resolveu fazer uma IDE sobre essa plataforma e distribui-la gratuitamente com o intuito de divulgar a plataforma. Dessa forma a IBM mataria dois coelhos com uma única cajadada. Divulgaria a plataforma Eclipse e ainda faria frente ao VisualStudio da Microsoft.

Infelizmente os parceiros da IBM ficaram apreensivos em investir na plataforma desconhecida e isso levou a IBM a abrir o código do Eclipse em 2001. Foi fundado então o Eclipse Consortiun que ainda contava com outras oito empresas. Um fato interessante é que o domínio eclipse.org pertencia a um time de futebol feminino numa cidade chamada Illnois. Óbvio que a IBM fez uma oferta irrecusável pelo domínio...

Depois disso o Eclipse passou ser bastante conhecido, mas algo ainda afastava investidores. Parecia que a IBM estava no controle de tudo... Foi quando nasceu a Eclipse Foundation, uma empresa sem fins lucrativos e completamente desligada da IBM. Este modelo é empregado até hoje, e que vem dando muito certo por sinal.

Eclipse Foundation

O Eclipse pode ser usado como IDE Java, e essa é, certamente, sua faceta mais divulgada. Porém, também pode ser usada como IDE para várias outras linguagens como C/C++, PHP, Ruby, JavaScript e HTML. Ai você me diz: "Tá, e daí?". Daí que não acabou ainda não! Além disso a Eclipse pode ser usado pra construir qualquer outro tipo de ferramenta ou aplicativo. O Eclipse consiste de uma plataforma para construção de aplicativos em geral. Segundo a Eclipse Foundation o Eclipse é:
  • IDE Framework
  • Tools Framework
  • Open Source/Community
  • Eco-system
  • Foundation
Vamos por partes...

1. IDE Framework

O Eclipse é sim uma IDE, mas também uma IDE C/C++, Ruby, etc. Na verdade é possível integrar qualquer coisa no Eclipse, até mesmo UML ou um editor de imagens avançado.

2. Tools Framework

Com plug-ins é possível transformar o Eclipse no que for preciso.
Alem disso, removendo a IDE o que sobra é um poderoso Framework para aplicações: o Eclipse RPC. E qual a vantagem? É multiplataforma, afinal o Eclipse roda em Windows, Linux e Mac; Possui integração nativa com o OS (Drag'n'Drop, OLE...); Uma larga variedade de widgets prontos.

3. Open Source/Community

Todo código do Eclipse é aberto. Há milhares de contributors, centenas de commiters, centenas de plug-ins comerciais, incontáveis blogs de entusiastas (não é meu caso... juro!) e portais, etc.
Saiba o que são contributors e commiters na próxima sessão.

4. Eco-system

Eu sempre quis saber quem faz o código do Eclipse. E a resposta é: o Ecossistema.
Calma, eu explico. O Eclipse é um projeto de código aberto, certo? Logo qualquer um pode contribuir para o projeto. Eu, você, seus amigos, meus amigos, nossas vós, etc. O que precisamos fazer é escolher uma CR no Bugzilla deles e submeter uma solução, assim nos tornamos contributors. Pronto, seu código vai direto para a Baseline do projeto, não é? Não mesmo! Ai que entram os commiters. Só eles tem acesso ao repositórios do projeto e eles tem a obrigação de revisar seu código e assegurar que ele funciona para, só então, integra-lo. Não se preocupe o crédito da resolução do problema ainda será seu. Se você for um bom contributor, pode até virar um commiter. Para isso, basta que um dos commiters indique você e que os outros aprovem sua promoção (se fosse aqui no Brasil rolariam altos nepotismos...).

Nesse momento você se pergunta: "E onde diabos entra o Ecossistema nisso?". Simples. A maioria dos desenvolvedores que trabalha nos vários projetos do Eclipse são engenheiros contratados por alguma empresa grande que está por trás do projeto, pois é de seu interesse. Interessante, hein?

Várias empresas contribuem para o Eclipse Platform, dentre elas gigantes como a Intel, Nokia, Motorola, IBM, Borland, Oracle, SyBase e Wind River.

5. Foundation

A Eclipse Foundation e uma organização sem fins lucrativos que emprega basicamente de advogados (alguém estava esperando que eu falasse desenvolvedores?). Eles ficam lá analisando a legalidade dos projetos. De acordo com a licença EPL (Eclipse Public Licence) todo código do Eclipse é livre e qualquer um pode modificá-lo contanto que submeta a sua modificação, porém se você apenas usa, digamos, o RPC para fazer sua aplicação, sem altera-lo, é possível que você adicione o RPC à seu software sem violar a licença. Essa é a grande diferença para o GPL.

A EPL também garante que o código EPL é de inteira responsabilidade da Eclipse Foundation. Isso significa que caso você venha a sofrer um processo judicial por causa do código EPL que você distribuiu com sua aplicação a Eclipse Foundation se responsabiliza completamente (apesar de soar estranho aqui, nos US e na Europa isso é normal). Entendeu por que a Eclipse Foundation tem advogados em vez de desenvolvedores?

O nome Eclipse

O nome Eclipse tem uma história interessante. E, ao contrário do que muitos pensam, não é uma afronta direta a Sun e o NetBeans, apesar de que, a Sun por muito tempo, se recusou a fazer parte do ecossistema por causa desse nome. O fato é: quem a IBM realmente queria "eclipsar" era a Microsoft que na época do lançamento do Eclipse era claramente o líder do mercado de IDEs com o VisualStudio.

Fontes:
History of Eclipse
Eclipse: Behind the Name