bookmate game
en
Robert Martin

The Robert C. Martin Clean Code Collection (Collection)

Avise-me quando o livro for adicionado
Para ler este livro carregue o arquivo EPUB ou FB2 no Bookmate. Como carrego um livro?
  • b4777467766fez uma citaçãohá 13 dias
    Not only are learning tests free, they have a positive return on investment. When there are new releases of the third-party package, we run the learning tests to see whether there are behavioral differences.
  • b4777467766fez uma citaçãohá 13 dias
    Now we know how to get a simple console logger initialized, and we can encapsulate that knowledge into our own logger class so that the rest of our application is isolated from the log4j boundary interface.
  • b4777467766fez uma citaçãohá 13 dias
    In learning tests we call the third-party API, as we expect to use it in our application. We’re essentially doing controlled experiments that check our understanding of that API. The tests focus on what we want out of the API.
  • b4777467766fez uma citaçãohá 13 dias
    It’s not our job to test the third-party code, but it may be in our best interest to write tests for the third-party code we use.
  • b4777467766fez uma citaçãohá 13 dias
    A cleaner way to use Map might look like the following. No user of Sensors would care one bit if generics were used or not. That choice has become (and always should be) an implementation detail.
  • b4777467766fez uma citaçãohá 13 dias
    Providers of third-party packages and frameworks strive for broad applicability so they can work in many environments and appeal to a wide audience. Users, on the other hand, want an interface that is focused on their particular needs. This tension can cause problems at the boundaries of our systems.
  • b4777467766fez uma citaçãohá 19 dias
    This is called the SPECIAL CASE PATTERN [Fowler]. You create a class or configure an object so that it handles a special case for you. When you do, the client code doesn’t have to deal with exceptional behavior. That behavior is encapsulated in the special case object.
  • b4777467766fez uma citaçãohá 19 dias
    When we return null, we are essentially creating work for ourselves and foisting problems upon our callers.
  • b4777467766fez uma citaçãohá 19 dias
    you are tempted to return null from a method, consider throwing an exception or returning a SPECIAL CASE object instead.
  • b4777467766fez uma citaçãohá 19 dias
    Returning null from methods is bad, but passing null into methods is worse. Unless you are working with an API which expects you to pass null, you should avoid passing null in your code whenever possible.
fb2epub
Arraste e solte seus arquivos (não mais do que 5 por vez)