The Java Development Environment

Well, you can call me nostalgic, but I really miss it :)

What I miss in Java development environment is a tool or a set of tools that makes easy to develop and provide a good workbench for developers, just like the old Delphi or nowadays Visual Studio .NET.

Just to clarify I am not an IDE addicted and I like to perform some manual tunnings in the application as well, but as JEE development gets more complex, like using Spring, Hibernate, EJB 3, WebServices, JSF, and a huge stack of frameworks sometimes it’s difficult to get everything configured, setup, tested and validated quickly.

There are plugins for eclipse, IntelliJ that helps a lot, and NetBeans is doing a great job on this direction trying to build a unified environment ( NetBeans IDE + GlassFish + Frameworks support and so on ) to help developers to have a more consistent environment.

One hard to goal to achieve to bring a good level of productivity to the development team with the tools they are using, I mean, we always have to use lots of things, such as eclipse, maven, and so on, and sometimes the time spent struggling to some problem because they don’t have the right tool. But, I am confident we are getting better with out tools.

The curse of custom code

Somebody might ask me : Marcio, aren’t you a developer as well ?? and I would answer : Yes, of course.

Then this same person can ask me again : Don’t you like to create new code by yourself ? and I would answer : Yes, and tell him a good story…. :)

This real story that happens in many companies is really sad, and probably will keep happening.

I’ve seen many people and companies that simply love develop something new by themselves, well, that’s not a bad idea at first look, but we should always look at other options. Sometimes we try to re-code something that already exists as a tool, application server, monitoring device and so on.

The point is that sometimes it’s way less expensive if we buy something ready to be used, such as a component or integration tool, rather than try to develop it internally in the company. The main problem is related to the TCO, because after ( or while ) developing something new we need to extensively test it to achieve maturity, and there are things that are not so simply to test, like distribution and concurrency.

This is a rule I use, whenever I am architecting/designing something new I always look for reuse something, and this can be something already done by the team or an external componente offered by a vendor.

The calculation is simple, try to measure or to estimate how many hours each developer should spend to develop the new solution, then add more time to test, more time to bug fixes, and then search for a similar product and compare the prices.

Do you do what you say ?

This post is about how open we are about something new. I’ve seen lots of people saying that they like to do new thinks, experiment some new technology/methodology, try to experience a new way of produce something and so one… But the sad fact is that the most part of them feel themselves frightened about do something new. I’m not saying that we should do things without care, or blindly develop a solution based on some esoteric personal wish to deploy some alpha library into production. I am definitely not saying that !

That’s perfectly fine to disagree on doing something stupid or irresponsible, but we should not be afraid of try a new solution, if we can do something better, then let’s do it.

My point is that we should be able to listen, be opened to try, and at least TEST the new proposal we are facing, preferrabily without preconceptions, judgments and prejudices !

A good bookshelf

Well, I’ve been postponing this for so long, but not anymore :)

If you didn’t already read my post about learning, please read it first.

These are the books I consider nice books to learn how to program, what is agile methodologies, OO/OOAD, Java/J2EE/JEE and Software Architecture.

1) To learn learn Java and JEE you should read this books :

Head First Java, 2nd Edition -> This book is a very nice and didactic introduction about Java (Fundamentals).

Test Driven Development: By Example -> The title talks for itself.

SCJP Sun Certified Programmer for Java 6 Exam 310-065 -> If you want to take the certification and have an in depth explanation about some core java subjects, this book is for you. (Fundamentals)

Head First Servlets and JSP -> This book is about Web Development with Java, and also a help to pass in the certification, this book is part of Head First Series, that is a very didactic reading.  When I was studying Java Web Development, I used the next one, but feel free to choose the most convenient 4u. ( Web Dev )

SCWCD Exam Study Kit -> The same subject as the previous one. Actually there is a second edition of this book, but as I don’t read it yet, I’m suggesting the first edition. ( Web Dev )

Head First EJB -> The best book to learn the fundamentals of EJB 2.x spec. Of course this specification became deprecated with the introduction of EJB 3 spec, but there still a lot of things running on the previous spec in the world. So, it’s nice to know how things work if you have to provide some maintenance on this ( Distributed Programming )

Mastering Enterprise JavaBeans, 3rd Edition -> The same as before, but this book will give you another view ( not so didactic ) about EJB 2.x ( Distributed Programming )

EJB Design Patterns: Advanced Patterns, Processes, and Idioms -> Almost the same thing as I wrote for Head First EJB… if you want or need to develop something on that way, take a look at this book. ( Distributed Programming )

Enterprise JavaBeans 3.0 (5th Edition) -> Now we got the an interesting point. In this book you’ll learn the new way of develop distributed components using the EJB 3.0 spec. This book shows how to work with business components as pojos, the life cycle, mapping the database ( JPA ) and more. ( Distributed Programming )

Java Messaging -> Here you will learn distributed programming model in java using asynchronous messages and JMS.

Core J2EE Patterns: Best Practices and Design Strategies (2nd Edition) -> Design Patterns focused on the J2EE world.

2) To learn Software Integration, SOA and EAI :

Service-Oriented Architecture (SOA): Concepts, Technology, and Design -> This is a award winner book about SOA. Here you’ll learn the guts of SOA, the concepts, what is a service, how to build a service, how to compose a service, what is the true and the false SOA. This book is a must read for every one that wants to work with software integration. ( Distributed Programming / SOA )

SOA Principles of Service Design -> A sweet continuation of the above subject. ( Distributed Programming / SOA )

Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions -> A book about Enterprise Application Integration. This book shows lots of design patterns about how to handle software integration using messaging. ( Distributed Programming / EAI / Messaging )

3) If you wanna learn about what UML is and how to use it, then this books will help you :

UML Distilled -> Although this book is about the old UML specification (1.3) I still consider it a good introduction, but feel free to choose any other you want !!!!

4) Learning OOAD :

Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and Iterative Development (3rd Edition) -> As the book’s title said.

5) To Learn Design Patterns and Software Architecture :

Head First Design Patterns -> An introduction about what design patterns are and how to use it properly. I recommend you to read this book first because it was written on a simple, visual and didactic language, and you won’t have to fight with the complex code that the Gamma’s book will show you ;)

Design Patterns: Elements of Reusable Object-Oriented Software -> This is the design patterns book ! At this point things will become very interesting. Here you’ll learn in depth how to apply design patterns to avoid code duplication, bad designs and make you software flexible enough to accommodate changes easily and keep woking. The down side of this book is the C++ syntax, but indeed this is one of the best books you ever read !

Patterns of Enterprise Application Architecture -> This is an awesome book about Enterprise Software Architecture. This one is a must read for all enterprise software developers. It covers a wide range of topics, such as layering your application, concurrency, domain models, remoting, presentation patterns and more.

Pattern-Oriented Software Architecture Volume 1: A System of Patterns -> Another great book about software architecture, here you’ll learn a more general SA.

Software Architecture in Practice (2nd Edition) -> Another sweet SA book. This one has lots of good contents about what is an architecture, how to create it, how to document, evaluate and analyze the costs. Throughout the book you’ll see very beautiful examples about many different systems challenges and their solution.

Domain-Driven Design: Tackling Complexity in the Heart of Software -> Here Eric Evans brings valuable thoughts and teachings in how to design a good and functional software taking care, modeling and preserving the domain model.

Applying Domain-Driven Design and Patterns: With Examples in C# and .NET -> Maybe the concepts of Evans book will be dense to digest, so this book will help us with some other practical examples.

6) Learning about Agile Software Development :

Extreme Programming Explained: Embrace Change (2nd Edition) -> The roots of XP development.

Agile Project Management with Scrum (Microsoft Professional) -> Scrum from manager’s perspective (Scrum Master).

Agile Software Development with SCRUM -> Scrum for software developers.

Lean Software Development: An Agile Toolkit -> Lean principles in software development management and process.

Well, I’m gonna stop by here, what else I will propose you to buy the whole amazon website + the company :D

I will revisit this subject sooner, trying to bring something else to share with you. Another tip I want to share it that you should not feel unmotivated because there are so many books up there !!!

You don’t need, you can’t and you won’t read everything at once ! what else you’ll need a psychiatrist, in order to help you to recover you mind. As I don’t want you to damage your brain, I will ask you to follow my tips :

I tried to put the books on some kind of “natural” way, kind from beginning to expert, but feel free to choose whatever fit in your needs, you can mix basic ones with distributed computing or even architectural with methodologies. I tried to make it easy for novices to have an “easier” path to go, but you can build your own path and feed your knowledge hungry !

I hope I could help you to learn more and better, feel free to post a comment back !

See Ya !

The simple is good

Sometimes we make things to fail due to our ability to complicate what we do. I’ve seen this happening many times. But I have a simple rule for this : If something is becoming too complicated to accomplish, then stop and try to think on a different way, because probably we’re trying to do something unecessary in the middle of the process. The best solution is always the simplest one.

Certified Scrum Master Training ( May 30-31 / 2008 )

Definitely that was the best course I ever attended !

See the photos here.

I guess I lost my fear about to flight ;)

As you may know I am a Senior Software Engineer that is passionated about software and technology, and I’ve been studying agile practices for while, XP, Lean, an SCRUM in special.

Last weekend I attended to a Scrum Master Training in São Paulo ( I am the first guy of the right side ) :

Scrum Master Training --> at lunch time ;)

Indeed that was one of the greatest experiences I ever had in my life. There I could learn more about what exactly is scrum and how to do scrum. It’s funny how we can mis concept things, or do the right thing on the wrong way.

The course was great, and I don’t have words to thank Boris, Peter and Danilo about the teachings and experiences shared with us. I am deep happy because I could improve myself a lot there, learning how setup a scrum team, plan, prioritize, estimate, rules, deliver as fast as possible ( with quality ! ), measure the teams productivity, run retrospectives, auto organization and so on. Besides that I had a great time with my classmates, that are clever and skills full people, and they help me a lot also with their questions and experiences.

It’s really a mindset shift ! We were driven to think on a different way that we are used to think.
There we saw how scrum run things better than the traditional project management way, and we realize why scrum is much more superior than the old fashioned traditional software development, that is chaotic by nature.

Another point is that I have no words to describe how good trainer Boris is, because he could answer all my questions about how scrum can solve the issues related to software development, such as fixed price/time contracts, big projects, measurement, estimative, planning and more. Peter has also contributed a lot with his experience as a scrum coach, and Danilo’s presentation about how they implemented scrum at globo.com was priceless !

Many thanks to all of you people, and I hope we can meet again soon !!!!

About Paulistas

I don’t really know who started it, that cariocas and paulistas are nasty ( well, at least I ever heard that each side hates the other party ), because they are the way they are. Btw, I am a carioca and I always heard from people here that paulistas don’t like cariocas, that paulistas are unpolite, that paulistas are… blah blah blah.

My opinion about this is : This is not true !

I was there in Sao Paulo for the first time last weekend ( May 30-31 / 2008 ), because I attended to a Scrum Master trainning ( that I will be posting about soon ), and everybody was very nice and kind to me. The people from the airport, the taxi drivers, the hotel staff ( these people are really great ! ), the restaurant people that I had dinner, my classmates ( awsome people ! ) , and so on.

Of course I had an incindent in the airport, and the story was that I forgot my perfume at home and I had to by a new one, everything was fine and I was going to pay, then suddenly a lady pushed me when I was about to pay. What can I say ? all paulistas are evil because an unpolite woman pushed me ? of course not ! I cannot blame 8.000.000 people just because of 1 !!!! Better question : how many people in rio have pushed me in queues ? hhhhmmmm one zilion maybe …. heheheeheh

I am not saying that there are no bad people anymore neither in Sao Paulo nor in Rio, of course there are, but the underlying point is that we can’t make pre-assumptions without knowing the reality.

I simply loved all people there and that part of the city is aewsome, and I want to go there again as soon as possible.

The funniest thing was that even speaking in portuguese everybody asked me the same question : Where are u from?, well, I discovered that I don’t have a strong carioca’s accent, and Rosangela confirmed that saying that I am almost a paulista [:-)]

Product BackLog

Few days ago I was talking to some friends here about scrum, it’s roles (scrum master, product owner and the team), and the artifact we work with “The product backlog”.

Then we started to discuss about the product backlog scope, how things appear there, how to manage it, and so on. Then he complained that he disagree about the idea that scrum says that we cannot keep put things inside the sprint backlog after we have started the sprint.

Well, the thing is that scrum has a work flow to operate upon, that is the SPRINT BACKLOG ! the backlog is the artifact where the development will be driven by implementing it. Also, the sprint backlog was chosen by the product owner as the most valuable features to be implemented, and of course we won’t be able to implement everything on a single sprint ( I’m talking about to develop an Enterprise Software ). Furthermore, team has also committed themselves that it’s a feasible work to be done.

Saying that means that it’s not possible to keep inserting things in the middle of the sprint, develop, test and integrate it. It will be possible to add more things if we are ahead of schedule, of course nobody wants to be stopped waiting for the next sprint. But we should be careful about this, what else we’re going to merge 2 or more sprints in one, and we won’t be able to deliver anything in the end.

That is the role of Scrum Master, to coach/mentor the team and the product owner, remove anything that is blocking the work to be done, and facilitate people’s lives.

Rich Clients

These days I’m looking at web development in a deeper way. Well, too many things to go through in order to update myself [:)]. I’ve been working on a rich-client swing GUI, that has been an amazing experience.

Rich clients as also known as smart clients or fat clients are a very nice and powerful user interface whenever we need more than the web browser/html can do for us. Web applications are really desirable because we can serve lots of clients using the same application server, and more, we don’t have to worry about deployment, because whatever the user needs it’s a web browser. On the other hand web applications don’t have the power of a swing GUI or a C# .NET GUI has, because if we want to pre-process something that the user is doing we’ll end up having a bunch of round trips to the server side.

Rich clients give us the ability to pre-handle and pre-process any user interaction/calculation/validation before it goes to the server side, actually some piece of business logic is also distributed between the client and the server side, in order to facilitate the applications job. Of course, it shouldn’t be applied to any domain, instead we should look at the up and down sides of our choices, but if your problem seems to be something like this I wrote up, then you should consider using a rich client.

Testing the software

Testing has been a hot talk these days, indeed, testing is something needed to assure that the application is behaving as it should be.

I watched 2 nice talks about testing, the first one was Coplien and Martin Debate TDD, CDD and Professionalism, and the second one : Designing for Testability

It’s very nice to see different points of view about the same subject, but there is an agreement in the community ( that I share ), that is we must test !

There are lots of different test, such as unit tests, integration tests, functional tests and so on. The Test Driven Development philosophy is based on test first and then write your business code. This is a preventive technique, because a failure must be found first, and then you’ll fix it on a evolutionary way implementing your code, adding a new test, and so on. Looking at this we see Unit testing that is a way of validating every piece of function ( method in OO world) that we have in our software.

In despite of different points of view, testing is an evolution that software development has been passing in the last years. Ship a software without testing made sense in the past, but nowadays unit testing and TDD are the most natural path of every software developed on a professional way.

I will posting more about testing very soon !!!