Saturday, July 2, 2011

The Clean Coder–Extracts

Source: The Clean Coder: A Code of Conduct for Professional Programmers

About software projects

The fundamental assumption underlying all software projects is that software is easy to change.If you violate this assumption by creating inflexible structures, then you undercut the economic model that the entire industry is based on.

Professionals spend time caring for their profession.

You should plan on working 60 hours per week. The first 40 are for your employer. The remaining 20 are for you. During this remaining 20 hours you should be reading, practicing, learning, and otherwise enhancing your career.

Presumably you became a software developer because you are passionate about software and your desire to be a professional is motivated by that passion. During that 20 hours you should be doing those things that reinforce that passion. Those 20 hours should be fun!

Professionals practice.

True professionals work hard to keep their skills sharp and ready. It is not enough to simply do your daily job and call that practice. Doing your daily job is performance, not practice. Practice is when you specifically exercise your skills outside of the performance of your job for the sole purpose of refining and enhancing those skills.

Team Player

We’ve all heard how important it is to be a “team player.” Being a team player means playing your position as well as you possibly can, and helping out your teammates when they get into a jam. A team-player communicates frequently, keeps an eye out for his or her teammates, and executes his or her own responsibilities as well as possible.

Test Automation Pyramid

The kinds of tests that a professional development organization needs are:

Unit Tests

At the bottom of the pyramid are the unit tests. These tests are written by programmers, for programmers, in the programming language of the system.
The intent of these tests is to specify the system at the lowest level. Developers write these tests before writing production code as a way to specify what they are about to write. They are executed as part of Continuous Integration to ensure that the intent of the programmers’ is upheld.

Component Tests

Generally they are written against individual components of the system. The components of the system encapsulate the business rules, so the tests for those components are the acceptance tests for those business rules. It passes input data into the component and gathers output data from it. It tests that the output matches the input. Any other system components are decoupled from the test using appropriate mocking and test-doubling techniques.

Component tests cover roughly half the system. They are directed more towards happy-path situations and very obvious corner, boundary, and alternate-path cases. The vast majority of unhappy-path cases are covered by unit tests and are meaningless at the level of component tests

Integration Tests

These tests only have meaning for larger systems that have many components. These tests assemble groups of components and test how well they communicate with each other. The other components of the
system are decoupled as usual with appropriate mocks and test-doubles.

Integration tests are choreography tests. They do not test business rules. Rather, they test how well the assembly of components dances together. They are plumbing tests that make sure that the components are properly connected and can clearly communicate with each other.

System Tests

These are automated tests that execute against the entire integrated system. They are the ultimate integration tests. They do not test business rules directly. Rather, they test that the system has been wired together correctly and its parts interoperate according to plan. We would expect to see throughput and performance tests in this suite.

Manual Exploratory Tests

This is where humans put their hands on the keyboards and their eyes on the screens. These tests are not automated, nor are they scripted. The intent of these tests is to explore the system for unexpected behaviors while confirming expected behaviors. Toward that end we need human brains, with human creativity, working to investigate and explore the system. Creating a written test plan for this kind of testing defeats the purpose.

Thursday, June 30, 2011

Quotes

“Only connect!... Only connect the prose and the passion, and both will be exalted, and human love will be seen at its height.” - E. M. Forster

"Man can be destroyed, but not defeated" – Hemingway

"Living a life of defeat is death and a death with dignity is life."

"All happy families resemble each other, but each unhappy family is unhappy in its own way." – Tolstoy

“Curiosity, happens when we feel a gap in our knowledge.”

Wednesday, June 29, 2011

Points to take into account to prepare a presentation

Source: Confessions of a Public Speaker

1.- Take a strong position in the title.

All talks and presentations have a point of view, and you need to know what yours is. If you don’t know enough about the topic to have an opinion, solve that problem before you make your presentation. Even saying, “Here are five things I like” is a strong position, in that there are an infinite number of things you did not choose. With a weak position, your talk may become, “Here is everything I know I could cram into the time I have, but since I have no idea if you care, or what I would say if I had less time to talk, you get a half-baked, hard to follow, hard to present, pile of trash.”

2.- Think carefully about your specific audience.

Know why they are there, what their needs are, what background knowledge they have, the pet theories they believe in, and how they hope their world will be different after your lecture is over. If you don’t have time to study your subject, at least study your audience. It may turn out that as little as you know about a subject, you know more about it than your audience.

3.- Make your specific points as concise as possible.

If it takes 10 minutes to explain what your point is, something is very wrong. Points are claims. Arguments are what you do to support your points. Every point should be compressed into a single, tight, interesting sentence. The arguments might be long, but no one should ever be confused as to what your point is while you are arguing it. A mediocre presentation makes the points clear but muddles or bores people with the arguments. A truly bad presentation never clarifies what the points are.

4. Know the likely counterarguments from an intelligent, expert audience.

If you do not know the intelligent counterarguments to each of your points, your points cannot be good. For example, if your presentation is about why people should eat more cheese, you should at a minimum know why the Anti-Cheese Foundation of America says people should eat less cheese.

Monday, June 13, 2011

Quotes

"I tell you that whether you fear it or not, disappointment will come.  The beauty is that through disappointment you can gain clarity, and with clarity comes conviction and true Originality" - Conan O'Brien

Thursday, June 2, 2011

About thinks of our own nature

A zen student came to Bankei and said: 'Master, I have an ungovernable temper -- how can i cure it?' Show me this temper, said Bankei, 'it sounds fascinating.' 'I haven't got it right now,' said the student, 'so I can't show it to you.' 'well then,' said Bankei, 'Bring it to me when you have it.' 'but I can't bring it just when I happen to have it,' protested the student. 'it arises unexpectedly, and I would surely lose it before I got it to you.'

In that case, said Bankei, 'it cannot be part of your true nature. if it were, you could show it to me at any time. when you were born you did not have it, and your parents did not give it to you -- so it must come into you from the outside. I suggest that whenever it gets into you, you beat yourself with a stick until the temper can't stand it, and runs away.

Tuesday, May 31, 2011

Emptiness

When Yamaoka was a brash student he visited the master Dokuon. Wanting to impress the master he said: 'There is no mind, there is no body, there is no Buddha. there is no better, there is no worse. there is no master, there is no student. there is no giving, there is no receiving. what we think we see and feel is not real. none of these seeming things really exists.'

Dokuon had been sitting quietly smoking his pipe, and saying nothing. suddenly he picked up his staff and gave Yamaoka a terrible whack. Yamaoka jumped up in anger. Dokuon said: 'since none of these things really exists, and all is emptiness, where does your anger come from? think about it.'

Monday, May 30, 2011

Quotes

"The path of learning: The apprentice figths to dominate the sword, the expert dominates it and the master merges with it" - Nibor

Nothing exists except in its relationship of subjectivity and objectivity.