SlideShare a Scribd company logo
what is preventing me
  to write nearly
   accurate code
        nhm tanveer hossain khan (hasan)
               http://hasan.we4tech.com
                         somewhere in...
what are we going to
      talk today?

• what is preventing me (probable you too)
• how to write nearly accurate code
• question / answer session
what is preventing me?
   my observation
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
!   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 detailed spec (feel like class book)
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 longer than 1 minute
• <= usually team does
 • work with workaround
 • re-code similar function
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, __FILE__, __LINE__
     def #{method}(action, parameters = nil, session = nil, flash = nil)
      process(action, parameters, session, flash)
     end
   EOV
  end
end
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 story
 •   As a user
     I want to add comment
     So that visitor can find my understanding.

• comment everything
  follow coding convention
think some one
watching your code !!
behavior driven
     development (BDD)
• before development
 • create spec
 • verify spec with stakeholder
• during development
 • ensure all spec passed
 • ensure all spec expectations were met
BDD example
BDD example
context Company, "while creating a new company" do
 it "should not be valid without a company name" do
   @company.should_not be_valid
   @company.errors.on(:name).should == "can't be blank"
 end

 it "should not have error after save" do
   @company.name = “somewhere in....”
   @company.save.should be_true
   @company.errors.should be_empty
 end
end
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)

More Related Content

PPTX
Template overrides austin
PDF
Scalable front-end architecture with Bootstrap 3 + Atomic CSS
PDF
How to write good quality code
PPT
Shimul: Testing Mnemonics
PDF
Mozammel: Solo Scrum - The Pomodoro Technique
PPT
English Multilitericies And Social Change
PPT
English Multilitericies And Social Change
PPT
Innovation Stories of Test Toolsmiths
Template overrides austin
Scalable front-end architecture with Bootstrap 3 + Atomic CSS
How to write good quality code
Shimul: Testing Mnemonics
Mozammel: Solo Scrum - The Pomodoro Technique
English Multilitericies And Social Change
English Multilitericies And Social Change
Innovation Stories of Test Toolsmiths

Similar to Hasan: Whats preventing me to write nearly accurate code (20)

ZIP
Whats Preventing Me To Write Nearly Accurate Code.Key
PDF
Code Quality Makes Your Job Easier
PPTX
How I Learned to Stop Worrying and Love Legacy Code.....
PDF
NUS Hackers Project Intern 2016
PDF
Perl-Critic
PPTX
DevRel Salon - Writing Decent Documentation, a learning journey with plenty o...
PPTX
Don't get blamed for your choices - Techorama 2019
PPTX
Code smells and Other Malodorous Software Odors
PDF
Git Makes Me Angry Inside
PDF
Bug Hunting Safari
PPTX
You cant be agile if your code sucks
PPTX
Make a better with clean code
PDF
05 DIGI CREATIVE people&process
PPTX
Writing clean code in C# and .NET
PPTX
SubmitJS: Is react + redux + typescript a good combination? Dmytro Beseda
PDF
Increasing code quality with code reviews (poetry version)
PPTX
Understanding Why Testing is Importaint
PPTX
Distributed teams - it takes two to tango
PPT
Code reviews: a short introduction
PDF
Good behaviors
Whats Preventing Me To Write Nearly Accurate Code.Key
Code Quality Makes Your Job Easier
How I Learned to Stop Worrying and Love Legacy Code.....
NUS Hackers Project Intern 2016
Perl-Critic
DevRel Salon - Writing Decent Documentation, a learning journey with plenty o...
Don't get blamed for your choices - Techorama 2019
Code smells and Other Malodorous Software Odors
Git Makes Me Angry Inside
Bug Hunting Safari
You cant be agile if your code sucks
Make a better with clean code
05 DIGI CREATIVE people&process
Writing clean code in C# and .NET
SubmitJS: Is react + redux + typescript a good combination? Dmytro Beseda
Increasing code quality with code reviews (poetry version)
Understanding Why Testing is Importaint
Distributed teams - it takes two to tango
Code reviews: a short introduction
Good behaviors
Ad

More from SQABD (20)

PDF
Hasin: Bangla Input Manager jQuery Plugin
PDF
Shoeb: Implementation Challenges of a Paperless Admission System
PPT
Aman: Developing a lightweight, hi-performance and dynamic JSON api server wi...
PPT
Zahidul: Meta Testing
PPT
Rabbi: Good to Great
PPTX
Imrul: Context Driven Testing
PPT
Tauhid: SQL Server Database Change Automation
PPT
Ayman: When to stop testing?
PPT
Kabir Ahmed: AutoHotkey
PDF
Mozammel Haque: Git -- Stupid, Fast, distributed content tracker
PPT
M. Ayman Noor: SQA Empowerment
PPT
Tanvir Afzal: Selenium
PPT
Jan Friis Nielson: Bideshi Experience
PDF
Hasin Hayder: Motivated team and getting most out of it
PPT
Mozammel Haque: Scrum
PPTX
CUCUMBER - Making BDD Fun
PPT
Code Review In Testing View
PPT
Am I Flexible?
PPTX
SCALING Scrum
PPT
Do You Have a Hit List?
Hasin: Bangla Input Manager jQuery Plugin
Shoeb: Implementation Challenges of a Paperless Admission System
Aman: Developing a lightweight, hi-performance and dynamic JSON api server wi...
Zahidul: Meta Testing
Rabbi: Good to Great
Imrul: Context Driven Testing
Tauhid: SQL Server Database Change Automation
Ayman: When to stop testing?
Kabir Ahmed: AutoHotkey
Mozammel Haque: Git -- Stupid, Fast, distributed content tracker
M. Ayman Noor: SQA Empowerment
Tanvir Afzal: Selenium
Jan Friis Nielson: Bideshi Experience
Hasin Hayder: Motivated team and getting most out of it
Mozammel Haque: Scrum
CUCUMBER - Making BDD Fun
Code Review In Testing View
Am I Flexible?
SCALING Scrum
Do You Have a Hit List?
Ad

Recently uploaded (20)

PPTX
Cloud computing and distributed systems.
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Big Data Technologies - Introduction.pptx
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
A Presentation on Artificial Intelligence
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Encapsulation theory and applications.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
MYSQL Presentation for SQL database connectivity
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPT
Teaching material agriculture food technology
Cloud computing and distributed systems.
20250228 LYD VKU AI Blended-Learning.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Empathic Computing: Creating Shared Understanding
Big Data Technologies - Introduction.pptx
sap open course for s4hana steps from ECC to s4
Chapter 3 Spatial Domain Image Processing.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
A Presentation on Artificial Intelligence
Digital-Transformation-Roadmap-for-Companies.pptx
Encapsulation theory and applications.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Reach Out and Touch Someone: Haptics and Empathic Computing
MYSQL Presentation for SQL database connectivity
A comparative analysis of optical character recognition models for extracting...
The Rise and Fall of 3GPP – Time for a Sabbatical?
Teaching material agriculture food technology

Hasan: Whats preventing me to write nearly accurate code

  • 1. what is preventing me to write nearly accurate code nhm tanveer hossain khan (hasan) http://hasan.we4tech.com somewhere in...
  • 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. what is preventing me? my observation
  • 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. ! patience • from company • from me • => spaghetti code • => quick solution
  • 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. commitment overflow • from client • from product owner • from peer
  • 8. not enough space for refactoring
  • 9. lack of domain specific knowledge
  • 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
  • 12. most smart code def test_limited_list_of_requests get(:requests) # ... rest goes here.... end
  • 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
  • 17. how to write nearly accurate code
  • 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. think some one watching your code !!
  • 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
  • 22. BDD example context Company, "while creating a new company" do it "should not be valid without a company name" do @company.should_not be_valid @company.errors.on(:name).should == "can't be blank" end it "should not have error after save" do @company.name = “somewhere in....” @company.save.should be_true @company.errors.should be_empty end end
  • 25. “your code is mirror of you”
  • 26. nothing preventing me to say you
  • 27. nothing preventing me to say you thank you!!!
  • 28. now what is preventing you? (Q/A)