Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Seven Habits of Highly Effective Developers

Avatar for OpenParty OpenParty
November 10, 2012

Seven Habits of Highly Effective Developers

by Lee Chuk Munn @ Beijing OpenParty 2012-11-10

Avatar for OpenParty

OpenParty

November 10, 2012
Tweet

Other Decks in Programming

Transcript

  1. About Chuk • Malaysian – works for Oracle – By

    way of Sun Microsystems • WebLogic, Coherence PM • Started programming in 1982 by accident – 1990 seriously – 1996 – today Java • Contributions to open source – Implementation of boardgame Carcassonne (incomplete) – JVM port of the Nintendo DS • Stopped because of memory restrictions – Jabber/XMPP framework • On going
  2. 1 – Understand the Problem • “Computer science is no

    more about computers than astronomy about telescope” - Dijkstra • Programming is about problem solve – Focus on the problem – Programs are expressions of your solution • “Think outside the box” - What if there is no box? • Define the boundaries of the problem – How do you eat an elephant? On bite at a time • World peace – don't try to solve everything – Bounce problem off people • Don't text – 143 characters cannot describe your problem • Don't email – if you can • Talk face to face – never know where discussion may lead
  3. 2 – Use Appropriate Tools • “If the only tool

    you have is a hammer, you will see every problem as a nail” - Abraham Maslow • Programming concepts and data structure – Learn programming not programming languages • Build a reservoir of design patterns – Solutions to design problems • Use a variety of tools – IDE, editors, languages, build, test, etc. – Tendency to stick with what we are comfortable with – Don't be dogmatic • The problem should dictate the tool you use – Use tool creatively • Develop your own tool
  4. 3 – Keep it Simple • “Simplicity is prerequisite for

    reliability.” - Dijkstra • Simplicity does not mean “simplistic” – Tetris is simple, tic-tac-toe is simplistic – “Simple things should be simple, complex things should be possible” - Alan Kay • Easy to understand, easy to explain, easy to document, easy to maintain – “There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies” - C.A.R Hoare
  5. 4 – Keep Your Source Neat • “Any fool can

    write code that a computer can understand. Good programmers write code that humans can understand” - Martin Fowler • Code for others to read – Good chance that you will be reading it again • Comment your code – Especially if you are doing clever things • Give meaningful method/class/etc names – Even if it is long • Only incorporate code you understand • Aesthetics and layout of your code – Nobodyisgoingtobeabletoreaditevenifitisbrilliant – Auto format in most IDE
  6. 5 – Learn to Debug • “Each problem that I

    solved becomes rule which served afterwards to solve other problem” - Rene Descartes • Bugs come and go, debugging skill accumulates – Debugging process is more important than the bug • Observe behaviour, Collect information , Isolate code – “When debugging, novices insert corrective code; experts remove defective code” - Richard Pattis • Good debugger and code reading tools – My favourite vim + ctags/cscope • Lay the foundation for debugging – Logging, assert, etc.
  7. 6 – Leverage Available Resources • “If I have seen

    further it is by standing on the shoulders of giants” - Isacc Newton • Look for available solutions or algorithms • Adopt a framework instead of developing your own • Talk to a subject matter expert • Search appropriate mailing list and forums – Make it easy for others to help you • Phrase your question so that it can be answered easily – Be persistent – Be creative – take similar solutions and adapt it – Stackover flow • BragBlog about your predicament
  8. 7 – Plan Ahead • “Its better to know some

    of the questions than all the answers” - James Thurber • Anticipate what you will need soon – Know where to get help, bookmark, Diigo • Off-the-job learning – no pressure to find a “solution” – Compare and contrast solutions/algorithms/API • Maximize your learning – Type out the code rather than CTRL-C, CTRL-V • Keep your coding/problem solving skills sharp – Participate in stackover flow • Learn from your past projects – good and bad – “Happy families are all alike; every unhappy family is unhappy in its own way” - Leo Tolstoy
  9. 1. Understand the problem 2. Use appropriate tools 3. Keep

    it simple 4. Keep your source neat 5. Learn to debug 6. Leverage available resources 7. Plan ahead