Wednesday, January 5, 2011

Obama Phone Covers For Scp 2700

Fever of bad and stuff

Last night I had temperature and not even notice me di .. According

I was cold because the temperature was literal super low .. but this morning I've had physical signs that it was temperature, which had last night.

I do not want sick and mothers .. ¬ ¬ ---------



hate drama and do not know how there are some people would not live without

Dramas real, invented, dramas caused by fear, dramas and dramas .. but at the end of everything .. are dramas! ---------



And I decided to leave the side indirect and could not be more sincere, then you do not invaded curiosity.

Trouble Bleeding Diesel Sprinter Fuel System

Clean Code

In recent
months I have been reading and rereading the book "Clean Code: A Handbook of Agile Software Craftmanship" of Robert Martin . In this book, the author discusses why we should write clean code and how.


Clean Code. This issue is something that interests me particularly at this time. When you're a developer with specific responsibilities within a project, without regard to any relevant decisions taken by the architect of the moment, the only important thing is to take away the top dead as soon as possible to avoid the typical questions: How do we (" Let? But if I'm doing it just me ...)? What What state is this task? What I put in the Project, 80%, 90 %...? Can we do delivery yet?

However, when you have some degree of responsibility for a project and are interested in its evolution is not complicated it is important to understand the team members the responsibility of each one goes beyond removing the dead top, but everyone should do the best we can to have a code as understandable as possible. Understandable code is what Robert Martin called clean code.

This book is divided into three parts:
  • In the first part, explains what the code clean and how reach it.
  • The second part is more complex examples of refactoring of code for cleaner code.
  • The third part is a compilation of tracks that help find code that is not as good as they should be and should be refactored.

This summary of the book I focus on the first part of it, because the second and third parts are pretty direct.

Chapter 1 - NAMES

Reading the code is the activity that is devoted more time to write new code even have to read what is already written. A bad code can ruin a project, making changes and extending the deadlines. The responsibility for this is the programmer who does not take their job seriously and not professional.

To avoid such situations must be made clean code, but what is clean code?. According to several well-known authors, the characteristics of clean code are:
  • Easy to read, expressive and simple.
  • tested by automated tests.
  • ago one thing. There
  • duplicity in him.
  • uses the fewest possible elements. Make
  • abstractions of similar items. For

get a clean code should pay attention to each of the elements of a code-level: variables, functions, classes, reviews, tests and the system itself. There are also a number of aspects, such as the distinction between objects and data structures, the behavior in the limits of the system, error handling and concurrency that directly affect the code and understanding. Chapters will discuss how to improve in each of these elements

Tembien rule speaks of the Boy Scout " have to make the code better than you found ." This is in line with continuous improvement code and the inability to get it perfect the first time.

Chapter 2 - NAMES

A good name gives much more information than anything else . To get good names must use clear and descriptive names. Must be legible and avoid complex coding.

Chapter 3 - FUNCTIONS

A good feature is that from which one can infer their behavior at a glance . They must be short, to do one thing and stay within the same level of abstraction.

is important to use good names and to minimize the number of arguments. But the main thing is to eliminate all duplication.

Chapter 4 - COMMENTS

Comments can not disguise the bad code . The comments need to clarify something is a symptom that is poorly written code should be redesigned. It is better expressed by the code itself.

There are situations in which the comments are inappropriate, as they try to:
  • legal aspects of the code.
  • warn of consequences. Comments
  • ALL.
  • stress the importance of something.
  • Javadocs in public APIs.

However, in other cases may lead confusing and should be avoided.

Chapter 5 - FORMAT

Formatting directly affects the readability of the code. The code is read from top to bottom and from left to right . The Horizontal and vertical spaces to separate different ideas and concepts.

must maintain a uniform style, and for that we must agree with the whole team formatting rules. The chosen rules are not as important as the fact that everyone abides by them.

Chapter 6 - OBJECTS AND DATA STRUCTURES.

Not everything can be solved using only objects or data structures only. We must learn to differentiate what situations are most suitable one or the other . Objects hide their data and functions to manipulate sets, while data structures expose data but does not have functions that operate on them.

Chapter 7 - HANDLING ERRORS

The error handling code obscures the true functionality of the code. must be kept as separate as possible from the business logic order not to hinder the understanding of the latter.

order not to complicate error handling blocks must write try-catch-finally first to identify agenda items in what may be an exception. It should use exceptions instead of return codes. Exceptions must provide enough information about the error and the time it occurred. In addition, unchecked exceptions are less invasive to the code level.

should also avoid passing null as a parameter of a method call or return as a return value. This introduces additional complexity due to the necessary checks.

Chapter 8 - BORDERS

systems depend on third-party packages or components developed by other teams. must clearly define the boundary between outer code and to easily accommodate future changes, minimizing the parts of our code that depend on external factors.

tests help to experiment with the external code to see how you can meet our needs. Also to check if new versions of the library continue to meet our needs.

Encapsulate knowledge already acquired through the tests at an interface between our system and third-party code can locate a single point changes due to possible changes in code that is beyond our control.

Chapter 9 - TESTING UNIT

In TDD seben write tests first. The 3 rules are TDD:
  • Do not write production code until they have a unit test fails.
  • Do not enter more than one unit test to ensure that it fails.
  • Do not write more production code uqe the need to pass a failing unit tests.

should be given equal importance to test code that production. The tests allow the production code can be modified without fear of introducing new errors, ensuring maintainability.
assert
The number of each test should be as low as possible. It should test a single concept in every test, which allows to go progressively clarifying the different concepts, improving knowledge about the code.

FIRST rules on the test code are: Fast
  • : You must run very fast and often. Independent
  • : The test conditions should not depend on a previous test. Repeatable
  • : Must be able to run in any environment.
  • Self-Validating : The test itself must say if is true or not, should not be required to perform checks after the test. Timely
  • : The tests should be written at the right time, which is right before writing production code, which allows you to write code easily testable.

Chapter 10 - CLASS

classes should be organized by placing first public constants, then the private static variables, instance variables private and then methods. Private methods are next to the public methods that use them.

must maintain the encapsulation of classes. Classes should be small and with few responsibilities. High cohesion is achieved if all class methods make use of all private variables.

The new features will be introduced to extend the system without modifying the existing code . Concrete classes contain implementation details and abstract classes express concepts. Dependence on particular classes is a risk in case of change. According to the principle of reversal of dependency classes should depend on abstractions.

Chapter 11 - SYSTEMS

is important to recognize and separate the responsibilities of a system.

First, you must separate the process of building a system to use. The construction process is responsible for creating and connecting objects necessary for running the application. Should be modularized and separated from the execution logic, allowing a separate strategy for resolving application dependencies.

dependency injection allows objects are only responsible only for business logic. A container element is responsible for injecting the dependencies of each object externally.

systems can not be built correctly the first must go to implement the stories available, and then refactor and expand the system to continue implementing new stories. TDD, refactoring and clean code to allow this level of code.

At the system level, it is difficult to grow from simple systems to complex systems due to dependencies in the architecture used. To avoid these problems, you must separate the different responsibilities of a system. To achieve this separation can be used proxies , pure Java AOP frameworks or AspectJ aspects.

should build the application logic based on POJOs through tests, and to evolve from simple to complicated, interconnecting the various aspects required.

Chapter 12 - EMERGENCY

The following 4 rules given by Kent Beck for creating good designs as you work on them, learn our system and apply good design principles:
  • Run all tests: The tests verify that the system behaves as expected . When building a testable system is intended that the lessons are simple and having only one purpose, and seeks to reduce the coupling.
  • Eliminating duplication: Duplication involves additional work, the more risk and greater complexity.
  • express the programmer's intention : Use code as expressive as possible for easy maintenance. One must choose good names, functions and small classes and well-written tests.
  • Minimize the number of classes and methods : By following these guidelines may be exceeded by creating a class too small. Be careful and keep a small number of classes.

During refactoring can apply all our knowledge to improve the design: enhance cohesion, reducing coupling, separate responsibilities and functions to reduce class, choose better names, etc.

time is spent on these tasks after you make the software work. You should not go to the next task without reviewing what was done. is impossible get a clean code to the first, we must review it again and again to get gradually improve.

Chapter 13 - CONCURRENCE

Concurrency is another aspect that may be present in the code. Allows decoupling of what happens when it occurs, and improve both the yield and the structure of an application.

From the structural point of view the application can be perceived as a group of computers working together, making the system easier to understand and allowing separate responsibilities. The competition can improve response times and efficiency of an application.

It should consider the following ideas about the competition: Enter
  • some overhead.
  • is complex to manage.
  • errors caused by it are difficult to reproduce
  • usually requires changes in design.

The concurrency problem is that different threads of an application can be interrelated according to multiple streams of execution, which can cause unexpected problems in normal situations.

To defend ourselves from the problems of concurrency is important that each class has a unique responsibility, management Separated threads from other code. You have to know the libraries you manage and understand the different models of implementation. Synchronized sections as small as possible.

Run tests frequently is the best way to find errors in code. However, it is difficult to test when there is competition. Failures should be treated as potential spurious concurrency issues and implement the code to force the occurrence of errors. FINAL



All these good practices on how to write clean code should ejecitar constantly to develop good habits and be able to do naturally . Following these practices the author promises to get a code that is easier to work and make it much less frustrating our day to day.

An idea that is repeated in various parts of the book is that we should be able to squeeze the capacity of our working environment . Knowing our work environment we can greatly simplify our work, since it can make for us a lot of activities automatically and offers a number of aids that can help us in day to day making unnecessary some conventions that only serve to complicate code.

Another thing I liked about this book is that literature is based. It is not too large, but it has helped me to get some good recommendations on other books to read:
  • Agile Software Development: Principles, Patterns and Practices, Robert Martin.
  • Implementation Patterns Kent Beck.
  • Test Driven Development, Kent Beck.
  • Extreme Programming Explained: Embrace Change, Kent Beck.
  • Refactoring: Improving the Design of Existing Code, Martin Fowler et al ..
  • Design Patterns: Elements Reusable Object Oriented Software or, Gamma et al ..
  • The Pragmatic Programmer, Andrew Hunt, Dave Thomas.

Saturday, January 1, 2011

Cervix High For A Long Time

Starting with the right foot this week ..

All would be better without drama .. I hope this
2011
achieve everything I have crossed his mind lately .. but the main thing will be leaving on one side everything that affects me negatively! .. However, no matter if things or people from 3 years ago I promised myself that 2011 would be my year and I intend to keep.



recently experienced eh what is to be quiet and I liked it .. I intend to continue. All for miiii well (that's one of the things you learn eh ..)


Happy 2011 to ALL!


the beginning of the year I hope to be as lucky as mine

Monday, December 6, 2010

Blu Ray Player Netflix

Home Feelings

after the marathon weekend in which an unlimited number of alcohol was involved, many situations after half strange and "sacrifice for the common good" .. Beginning one week free of alcohol! .. Well, pretend to have an onset of alcohol-free week from here to the disgust over me hahaha

Greetings and good start to the week for everybody!





I prepare to fly ..



besoss! =**