what is preventing me
  to write nearly
   accurate code
        nhm tanveer hossain khan (hasan)
               http://ha...
what are we going to
      talk today?

• what is preventing me (probable you too)
• how to write nearly accurate code
• q...
what is preventing me?
   my observation
being too honest!
• in commitment
• in writing code
• skipping known issue
• not feeling colorful moment
• not feeling tog...
!   patience
• from company
• from me
 • => spaghetti code
 • => quick solution
unclear understanding
   of requirements

• from client
• from product owner
• from user story or use case
• or too detail...
commitment overflow

• from client
• from product owner
• from peer
not enough space for
     refactoring
lack of domain specific
      knowledge
over complicating code/
      architecture
• not mockable environment
• not testable environment
• bootstrapping takes lon...
most smart code
most smart code
def test_limited_list_of_requests
   get(:requests)
  # ... rest goes here....
end
most smart code
def self.included(base)
  %w( get post put delete head ).each do |method|
   base.class_eval <<-EOV, __FIL...
break!
take deep breath !!
welcome back!!!
how to write nearly
  accurate code
patience
• being honest
• understanding ethics
• feel in team way
• document all known issues
• (example) formated user st...
think some one
watching your code !!
behavior driven
     development (BDD)
• before development
 • create spec
 • verify spec with stakeholder
• during develo...
BDD example
BDD example
context Company, quot;while creating a new companyquot; do
 it quot;should not be valid without a company name...
BDD example
remember !!
“your code is mirror of
         you”
nothing preventing me
      to say you
nothing preventing me
      to say you
     thank you!!!
now what is preventing
     you? (Q/A)
Upcoming SlideShare
Loading in …5
×

Whats Preventing Me To Write Nearly Accurate Code.Key

680 views

Published on

Published in: Technology
1 Comment
0 Likes
Statistics
Notes
  • Be the first to like this

No Downloads
Views
Total views
680
On SlideShare
0
From Embeds
0
Number of Embeds
14
Actions
Shares
0
Downloads
10
Comments
1
Likes
0
Embeds 0
No embeds

No notes for slide






















































  • Whats Preventing Me To Write Nearly Accurate Code.Key

    1. 1. what is preventing me to write nearly accurate code nhm tanveer hossain khan (hasan) http://hasan.we4tech.com somewhere in...
    2. 2. what are we going to talk today? • what is preventing me (probable you too) • how to write nearly accurate code • question / answer session
    3. 3. what is preventing me? my observation
    4. 4. being too honest! • in commitment • in writing code • skipping known issue • not feeling colorful moment • not feeling togetherness • not feeling inclusiveness • not feeling in team way instead of my way. • focusing on too many projects
    5. 5. ! patience • from company • from me • => spaghetti code • => quick solution
    6. 6. unclear understanding of requirements • from client • from product owner • from user story or use case • or too detailed spec (feel like class book)
    7. 7. commitment overflow • from client • from product owner • from peer
    8. 8. not enough space for refactoring
    9. 9. lack of domain specific knowledge
    10. 10. over complicating code/ architecture • not mockable environment • not testable environment • bootstrapping takes longer than 1 minute • <= usually team does • work with workaround • re-code similar function
    11. 11. most smart code
    12. 12. most smart code def test_limited_list_of_requests get(:requests) # ... rest goes here.... end
    13. 13. most smart code def self.included(base) %w( get post put delete head ).each do |method| base.class_eval <<-EOV, __FILE__, __LINE__ def #{method}(action, parameters = nil, session = nil, flash = nil) process(action, parameters, session, flash) end EOV end end
    14. 14. break!
    15. 15. take deep breath !!
    16. 16. welcome back!!!
    17. 17. how to write nearly accurate code
    18. 18. patience • being honest • understanding ethics • feel in team way • document all known issues • (example) formated user story • As a user I want to add comment So that visitor can find my understanding. • comment everything follow coding convention
    19. 19. think some one watching your code !!
    20. 20. behavior driven development (BDD) • before development • create spec • verify spec with stakeholder • during development • ensure all spec passed • ensure all spec expectations were met
    21. 21. BDD example
    22. 22. BDD example context Company, quot;while creating a new companyquot; do it quot;should not be valid without a company namequot; do @company.should_not be_valid @company.errors.on(:name).should == quot;can't be blankquot; end it quot;should not have error after savequot; do @company.name = “somewhere in....” @company.save.should be_true @company.errors.should be_empty end end
    23. 23. BDD example
    24. 24. remember !!
    25. 25. “your code is mirror of you”
    26. 26. nothing preventing me to say you
    27. 27. nothing preventing me to say you thank you!!!
    28. 28. now what is preventing you? (Q/A)

    ×