Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Unlearning Java

815 views

Published on

The presentation demonstrates the need for understanding the context before applying the best practices.

  • Be the first to comment

Unlearning Java

  1. 1. Unlearning Java One time ‘best practices’ to avoid; to remain ‘Professional’ Naresha K, @naresha_k
  2. 2. Why Unlearn?
  3. 3. Myth of ‘Best Practices’ Technically Perfect Completely Useless
  4. 4. The costly mistake ! Time Domain
  5. 5. #1: Follow the Evolution
  6. 6. #1 - illustration
  7. 7. #1 - illustration
  8. 8. #1 - illustration
  9. 9. #1 - illustration
  10. 10. #1 - illustration
  11. 11. More Examples — isEmpty — @Override (annotations)
  12. 12. #2: Make ‘em readable
  13. 13. #2 - illustration Prefer Generics
  14. 14. #2: — Generics ◦ Method signature shows the types ◦ Less documentation — Enum ◦ Allowed values are clearly shown
  15. 15. #3: Understand the internals
  16. 16. #3: Understand the internals Use generics right
  17. 17. #4: Prefer concise code
  18. 18. #4 - illustration
  19. 19. #4 - illustration
  20. 20. #4 – Truth revealed
  21. 21. #4 – illustration – the truth
  22. 22. #5: Be precise
  23. 23. #5: Be precise Reduce Maps Use Strong Types
  24. 24. #6: Don't over optimize
  25. 25. #6: Don't over optimize
  26. 26. #6: Don't over optimize
  27. 27. #6: Don't over optimize
  28. 28. #7: More the loan term, ...interest
  29. 29. #7: More the loan term, ...interest Essential Complexity Accidental Complexity Software Complexity
  30. 30. #7: More the loan term, ...interest Technical Debt •Letting the accidental complexity to grow
  31. 31. #7: More the loan term, ...interest Refactor Small Refactor Often
  32. 32. #8: Don’t carry dead bodies
  33. 33. #8: Don’t carry dead bodies Hungarian Notation
  34. 34. #8: Don’t carry dead bodies
  35. 35. #9: The billion dollar mistake
  36. 36. #9: The billion dollar mistake Avoid excessive null checks
  37. 37. #10: Put your data structures knowledge into practice
  38. 38. #10: Put your data structures knowledge into practice
  39. 39. #10: Put your data structures knowledge into practice — Dropdown options ◦ Average expense on First Day of the month ◦ Average expense on Last Day of the month ◦ Percentage of expense on First 3 Days ◦ Percentage of expense on Last 4 Days ◦ Total expenses on First 5 days in each month ◦ Month with max expense
  40. 40. #10: Put your data structures knowledge into practice ExpenseDayMonth Map Map<Date,DailyExpense> DailyExpense1 DailyExpense2 Map<Date,DailyExpense> DailyExpense3
  41. 41. #11: Develop Abstractions
  42. 42. #11: Develop Abstractions
  43. 43. #11: Develop Abstractions
  44. 44. #12: Don't write novels in plain JS, write poems in Dojo
  45. 45. #13: Automate - analysis, not fix
  46. 46. #13: Automate - analysis, not fix someCodeValueId.equals(someCodeValue) someString!= null || !someString.equals(“”) someLong != null || someLong.equals(“”)

×