Productive Programmer - Using IDE effectively and various small practices to improve productivity


Published on

The presentation from my talk on Programmer Productivity at XP Days Indore 2010. The target audience was MCA students, faculty and members of IT industry in and around Indore.

Published in: Technology
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Productive Programmer - Using IDE effectively and various small practices to improve productivity

  1. 1. Productive Programmer Using IDE effectively & various small practices to improve productivity <ul><li>24th Apr 2010 </li></ul>Bhavin Javia, Senior Consultant, ThoughtWorks Indore 2010
  2. 2. Agenda <ul><li>Productivity </li></ul><ul><li>Programmer Productivity </li></ul><ul><li>Principles of Productivity </li></ul><ul><ul><li>Using IDE effectively </li></ul></ul><ul><ul><li>Other productivity techniques and practices </li></ul></ul><ul><ul><li>Demos and Hands-on Exercises </li></ul></ul><ul><li>References </li></ul><ul><li>Q & A </li></ul>
  3. 3. What is Productivity ? <ul><li>“ Amount of useful work done over time” </li></ul>
  4. 4. Programmer Productivity Why worry ?
  5. 5. We love our computers 
  6. 6. They can do a lot more than we think !!!
  7. 7. But, we end up doing most of the hard work !!!
  8. 8. Programmers are expected to be highly productive especially with computers
  9. 9. Programmers Productivity and XP <ul><li>Iterative life cycle depends on rapid analysis, development, testing, deployment and feedback </li></ul><ul><li>A process can be only as fast as it’s “slowest” step </li></ul><ul><li>Programmer productivity is a “must have” in such a process </li></ul>
  10. 10. Principles of Productivity <ul><li>Acceleration </li></ul><ul><li>Focus </li></ul><ul><li>Automation </li></ul><ul><li>Canonicality </li></ul>
  11. 11. Principles of Productivity <ul><li>Acceleration </li></ul><ul><li>Focus </li></ul><ul><li>Automation </li></ul><ul><li>Canonicality </li></ul>
  12. 12. Concentrate on Essence, not Ceremony <ul><li>To use a computer </li></ul><ul><ul><li>You have to boot it </li></ul></ul><ul><ul><li>Launch applications </li></ul></ul><ul><ul><li>Provide input via keyboard and mouse </li></ul></ul><ul><ul><li>Interpret results shown on the monitor </li></ul></ul><ul><li>Human <-> Computer != Human <-> Human </li></ul><ul><li>Less human interaction = Faster execution </li></ul><ul><li>Don’t feed the tool, use it </li></ul><ul><li>Trivialize interactions – e.g. launching applications </li></ul>
  13. 13. Launching Applications – Find what you want
  14. 14. Fitt’s Law “ The time required to rapidly move to a target area is a function of the distance to and the size of the target ” T is the average time taken to complete the movement a is the start/stop time of the device (intercept) b is the inherent speed of the device (slope) D is the distance from the starting point to the center of the target W is the width of the target measured along the axis of motion
  15. 15. Fitt’s Law D W b a Cursor Target
  16. 16. Launching Applications – Tell what you want
  17. 17. Demo Quicksilver App Launcher (5 mins)
  18. 18. IDE – Integrated Development Environment
  19. 19. Acceleration with IDE <ul><li>Language support </li></ul><ul><li>Shortcuts </li></ul><ul><li>Code Templates </li></ul><ul><li>Multiple clipboards </li></ul><ul><li>Search </li></ul><ul><li>Macros </li></ul><ul><li>Plug-ins </li></ul><ul><li>Regular Expressions </li></ul>
  20. 20. Demo Working with Eclipse (10 mins)
  21. 21. Activity Eclipse Shortcuts (15 mins)
  22. 22. Eclipse Shortcuts <ul><li>Find a pair and grab a computer </li></ul><ul><li>Launch Eclipse </li></ul><ul><li>Find out shortcuts for the following actions </li></ul><ul><ul><li>Open a Class/Type </li></ul></ul><ul><ul><li>Open a File/Resource </li></ul></ul><ul><ul><li>See currently open files </li></ul></ul><ul><ul><li>Create a new Class/File </li></ul></ul><ul><ul><li>Find references to the selected method in the project </li></ul></ul><ul><ul><li>Extract a local variable </li></ul></ul><ul><li>Assign key bindings to actions if missing </li></ul><ul><li>Test each other </li></ul>
  23. 23. Activity Eclipse Code Templates (15 mins)
  24. 24. Eclipse Code Templates <ul><li>Find a pair and grab a computer </li></ul><ul><li>Launch Eclipse </li></ul><ul><li>Find out where code templates are configured </li></ul><ul><li>Use a few code templates to see how they work </li></ul><ul><li>Create a custom code template to create – </li></ul><ul><ul><li>A class with a private variable </li></ul></ul><ul><ul><li>a constructor which initializes this variable </li></ul></ul><ul><ul><li>getter and setter for the private variable </li></ul></ul><ul><li>Create a class ‘Wallet’ with field ‘money’ using the template created above </li></ul>© ThoughtWorks 2008
  25. 25. Principles of Productivity <ul><li>Acceleration </li></ul><ul><li>Focus </li></ul><ul><li>Automation </li></ul><ul><li>Canonicality </li></ul>© ThoughtWorks 2008
  26. 26. Focus <ul><li>Kill distractions </li></ul><ul><ul><li>Check emails less frequently </li></ul></ul><ul><ul><li>- Reserve socialization for the coffee/lunch breaks </li></ul></ul><ul><ul><li>- Turn off notifications </li></ul></ul><ul><ul><li>- Define core working hours </li></ul></ul><ul><li>Search, don’t navigate </li></ul><ul><li>Rooted views </li></ul><ul><li>Sticky attributes </li></ul><ul><li>Project shortcuts </li></ul><ul><li>Virtual Desktops </li></ul><ul><li>Use IDE plug-ins </li></ul>© ThoughtWorks 2008
  27. 27. Demo Virtual Desktops (5 mins) © ThoughtWorks 2008
  28. 28. Principles of Productivity <ul><li>Acceleration </li></ul><ul><li>Focus </li></ul><ul><li>Automation </li></ul><ul><li>Canonicality </li></ul>
  29. 29. Why Automate ? <ul><li>Make the computer do repetitive tasks </li></ul><ul><li>Avoid the infamous “human error” </li></ul><ul><li>Mitigate risks </li></ul><ul><li>Better ROI </li></ul><ul><li>Maintain focus on core tasks </li></ul>
  30. 30. What to automate ? <ul><li>Automate builds and deployments </li></ul><ul><li>Automate interaction with websites </li></ul><ul><li>Use build tools for non build tasks </li></ul><ul><li>Use shell scripts to extract information </li></ul><ul><li>Use automation software </li></ul>
  31. 31. Demo Selenium IDE (10 mins)
  32. 32. Demo Automator (10 mins)
  33. 33. Principles of Productivity <ul><li>Acceleration </li></ul><ul><li>Focus </li></ul><ul><li>Automation </li></ul><ul><li>Canonicality </li></ul>
  34. 34. What is Canonicality ? <ul><li>Canonical representation : </li></ul><ul><ul><li>“ The simplest form without loss of information” </li></ul></ul><ul><li>Canonicality : </li></ul><ul><ul><li>“ The practice of eliminating duplication” </li></ul></ul>
  35. 35. The DRY Principle <ul><li>DON’T REPEAT YOURSELF (DRY) </li></ul><ul><li>“ Every piece of knowledge must have a single, unambiguous, authoritative representation within a system” </li></ul><ul><ul><li>- The Pragmatic Programmer, Andrew Hunt and David Thomas </li></ul></ul>
  36. 36. Applying DRY to Software Development <ul><li>Version Control everything </li></ul><ul><li>Maintain single copy if not/can’t be versioned </li></ul><ul><li>Use separate build machine </li></ul><ul><li>Use Indirection (links) to sync and share configuration </li></ul><ul><li>Virtualization </li></ul><ul><li>Keep code and db in sync </li></ul><ul><li>DRY Documentation </li></ul><ul><ul><li>Generate documentation from code </li></ul></ul><ul><ul><li>Generate code from documentation </li></ul></ul><ul><ul><li>Avoid multiple representations of the same information </li></ul></ul>
  37. 37. DRY Documentation
  38. 38. Demo Migrations (10 mins)
  39. 39. References … and my personal experience working with agile teams
  40. 40. Q & A Contact: [email_address]