Diese Präsentation wurde erfolgreich gemeldet.
Die SlideShare-Präsentation wird heruntergeladen. ×

Androides y Mazmorras. Part I (dungeons & robots)

Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Wird geladen in …3
×

Hier ansehen

1 von 43 Anzeige

Weitere Verwandte Inhalte

Anzeige

Ähnlich wie Androides y Mazmorras. Part I (dungeons & robots) (20)

Aktuellste (20)

Anzeige

Androides y Mazmorras. Part I (dungeons & robots)

  1. 1. Androides y mazmorras. Part I (dungeons & robots) Jorge Juan Barroso Carmona jorge@karumi.com @flipper83 +JorgeJBarroso Android expert
  2. 2. We embark on every project with a commitment to create something elegant, enduring and effective. That is our heartbeat. Our approach is uniquely simple and honest, we are a small dedicated software studio, delivering outstanding work. Karumi is the Rock Solid code software development studio.
  3. 3. Why go down the stairs
  4. 4. Adam Tornhill “When you see that I committed a bunch of buggy spaghetti last week, you know it’s because I’m a bad programmer, irresponsible and perhaps even a tad stupid. When you, on the other hand, deliver scrappy code (yes, I know - it’s a hypothetical scenario) you know it’s because you were close to a deadline, had to save the project or just intended it to be a prototype.”
  5. 5. Refactor is not destroy all your code
  6. 6. Refactor is not an Arcade Fire album.
  7. 7. Refactor is change the code and works on the same way
  8. 8. Timing is part of the development process
  9. 9. Programming is problem-solving. And human problem-solving requires a certain degree of experimentation
  10. 10. Architecture decay and code entropy
  11. 11. Ignorance and bad developers
  12. 12. Pedro Ureña “La deuda técnica es como tener una tarjeta de crédito. Tienes que devolver el dinero y los intereses. Si tiras siempre de la tarjeta de crédito, no vas a poder pagar los intereses y estarás en bancarrota.”
  13. 13. Explore the dungeon
  14. 14. “I wrote that about aesthetics in discussing when you apply refactorings. To some extent, the situations I describe in the refactoring guidelines are fairly vague notions of aesthetics. But I try to provide more guidance than just saying, "Refactor when the code looks ugly." I say, for instance, that duplicated code is a bad smell. I say that long methods are a bad smell. Big classes are a bad smell. ” Martin Fowler
  15. 15. Run away from intuition
  16. 16. Run away from trendy styles
  17. 17. Run away from me
  18. 18. Take decisions based on data
  19. 19. Searching for hotspots
  20. 20. number-of-commits,79 number-of-entities,2601 number-of-entities-changed,4582 number-of-authors,27 App Google IO 2014 Code-maat
  21. 21. Class sizes. Less size ~= Less responsibilities
  22. 22. File blank comment code ./android/src/main/java/com/google/samples/apps/iosched/ui/BaseActivity.java 203 175 1185 ./android/src/main/java/com/google/samples/apps/iosched/ui/SessionDetailActivity.java 178 111 995 ./third_party/disklrucache/src/test/java/com/jakewharton/disklrucache/DiskLruCacheTest.java 113 37 881 ./android/src/main/java/com/google/samples/apps/iosched/ui/SessionsFragment.java 147 106 875 ./android/src/main/java/com/google/samples/apps/iosched/provider/ScheduleProvider.java 78 128 842 ./android/src/main/java/com/google/samples/apps/iosched/ui/SessionLivestreamActivity.java 124 125 808 ./android/src/main/java/com/google/samples/apps/iosched/ui/MapFragment.java 181 166 635 ./third_party/disklrucache/src/main/java/com/jakewharton/disklrucache/DiskLruCache.java 92 215 623 ./android/src/main/java/com/google/samples/apps/iosched/provider/ScheduleContract.java 145 277 590 ./android/src/main/assets/licenses.html 85 12 583 Cloc
  23. 23. Watch out for classes that change frequently, it might be possible that a lot of people are working on  it or it has too much responsibility
  24. 24. File n-revs entity,n-revs android/build.gradle, 14 doc/BUILDING.md, 13 README.md, 9 .travis.yml 9 Wearable/build.gradle, 6 build.gradle,6 android/src/com/google/android/apps/iosched/util/ImageWorker.java, 5 gradle/wrapper/gradle-wrapper.properties, 5 android/src/main/java/com/google/samples/apps/iosched/ui/BaseActivity.java, 5 android/src/main/res/values-it/strings.xml, 5
  25. 25. Code complexity
  26. 26. File num-lines total media max BaseActivity.java 1360 3332 2.45 8 SessionDetailActivity.java 1106 2898 2.62 9 MapInfoWindowAdapter.java 142 221 1.56 5
  27. 27. Temporal coupling Search getInstances()
  28. 28. File 1 File2 % couple average-rev SocialStreamFragment.java ImageFetcher.java 100 2 SocialStreamFragment.java ImageCache.java 100 2 ImageCache.java ImageFetcher.java 100 2
  29. 29. Code paths
  30. 30. Duplicated code DRY
  31. 31. Be careful with eternal changes
  32. 32. The dungeon master
  33. 33. Listens to everybody before making decisions Echo effect
  34. 34. Adjust the team and the communication process for the refactor
  35. 35. Ask for opinions from outside (external or other teams)
  36. 36. Ask for opinions from outside (external or other teams)
  37. 37. “If you point of me, remember you have 3 fingers pointing at you” Pedro Vicente Gómez
  38. 38. Bibliography They’re the cracks! Your Code as a crime scene. Adam Tornhill Working Effectively with legacy code. Michael Feathers Refactoring: Improving the Design of Existing Code. Martin Fowler. Workflows of Refactoring. Martin Fowler. OOP2014. Refactorizar a patrones. Xavi Gost. Refactoring: Where Do I start?. J. B. Rainsberger.
  39. 39. Find meI am very social! jorge@karumi.com @flipper83 +JorgeJBarroso Questions?

×