SlideShare ist ein Scribd-Unternehmen logo
1 von 28
Downloaden Sie, um offline zu lesen
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 specic
      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 nd 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)

Weitere ähnliche Inhalte

Ähnlich wie Hasan: Whats preventing me to write nearly accurate code

Whats Preventing Me To Write Nearly Accurate Code.Key
Whats Preventing Me To Write Nearly Accurate Code.KeyWhats Preventing Me To Write Nearly Accurate Code.Key
Whats Preventing Me To Write Nearly Accurate Code.Key
nhm taveer hossain khan
 
How I Learned to Stop Worrying and Love Legacy Code.....
How I Learned to Stop Worrying and Love Legacy Code.....How I Learned to Stop Worrying and Love Legacy Code.....
How I Learned to Stop Worrying and Love Legacy Code.....
Mike Harris
 
Increasing code quality with code reviews (poetry version)
Increasing code quality with code reviews (poetry version)Increasing code quality with code reviews (poetry version)
Increasing code quality with code reviews (poetry version)
David Stockton
 

Ähnlich wie Hasan: Whats preventing me to write nearly accurate code (20)

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

Mehr von SQABD

Aman: Developing a lightweight, hi-performance and dynamic JSON api server wi...
Aman: Developing a lightweight, hi-performance and dynamic JSON api server wi...Aman: Developing a lightweight, hi-performance and dynamic JSON api server wi...
Aman: Developing a lightweight, hi-performance and dynamic JSON api server wi...
SQABD
 
Kabir Ahmed: AutoHotkey
Kabir Ahmed: AutoHotkeyKabir Ahmed: AutoHotkey
Kabir Ahmed: AutoHotkey
SQABD
 
Mozammel Haque: Git -- Stupid, Fast, distributed content tracker
Mozammel Haque: Git -- Stupid, Fast, distributed content trackerMozammel Haque: Git -- Stupid, Fast, distributed content tracker
Mozammel Haque: Git -- Stupid, Fast, distributed content tracker
SQABD
 
M. Ayman Noor: SQA Empowerment
M. Ayman Noor: SQA EmpowermentM. Ayman Noor: SQA Empowerment
M. Ayman Noor: SQA Empowerment
SQABD
 
Tanvir Afzal: Selenium
Tanvir Afzal: SeleniumTanvir Afzal: Selenium
Tanvir Afzal: Selenium
SQABD
 
Jan Friis Nielson: Bideshi Experience
Jan Friis Nielson: Bideshi ExperienceJan Friis Nielson: Bideshi Experience
Jan Friis Nielson: Bideshi Experience
SQABD
 
Hasin Hayder: Motivated team and getting most out of it
Hasin Hayder: Motivated team and getting most out of itHasin Hayder: Motivated team and getting most out of it
Hasin Hayder: Motivated team and getting most out of it
SQABD
 
Mozammel Haque: Scrum
Mozammel Haque: ScrumMozammel Haque: Scrum
Mozammel Haque: Scrum
SQABD
 

Mehr von SQABD (20)

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

KĂźrzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

KĂźrzlich hochgeladen (20)

Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 

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 specic 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 nd 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)