SlideShare a Scribd company logo
1 of 28
Download to read offline
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

Similar to 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.Keynhm taveer hossain khan
 
Code Quality Makes Your Job Easier
Code Quality Makes Your Job EasierCode Quality Makes Your Job Easier
Code Quality Makes Your Job EasierTonya Mork
 
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
 
NUS Hackers Project Intern 2016
NUS Hackers Project Intern 2016NUS Hackers Project Intern 2016
NUS Hackers Project Intern 2016Vishnu Prem
 
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...Abdelhalim DADOUCHE
 
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 2019Hannes Lowette
 
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 OdorsClint Edmonson
 
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 sucksPeter Gfader
 
05 DIGI CREATIVE people&process
05 DIGI CREATIVE people&process05 DIGI CREATIVE people&process
05 DIGI CREATIVE people&processSheSaysCREATIVE
 
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 .NETDror Helper
 
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 BesedaBinary Studio
 
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
 
Understanding Why Testing is Importaint
Understanding Why Testing is ImportaintUnderstanding Why Testing is Importaint
Understanding Why Testing is ImportaintSana Nasar
 
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 tangoMille Bessö
 
Code reviews: a short introduction
Code reviews: a short introductionCode reviews: a short introduction
Code reviews: a short introductionFreekDB
 

Similar to 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
 

More from SQABD

Hasin: Bangla Input Manager jQuery Plugin
Hasin: Bangla Input Manager jQuery PluginHasin: Bangla Input Manager jQuery Plugin
Hasin: Bangla Input Manager jQuery PluginSQABD
 
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 SystemSQABD
 
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
 
Zahidul: Meta Testing
Zahidul: Meta TestingZahidul: Meta Testing
Zahidul: Meta TestingSQABD
 
Rabbi: Good to Great
Rabbi: Good to GreatRabbi: Good to Great
Rabbi: Good to GreatSQABD
 
Imrul: Context Driven Testing
Imrul: Context Driven TestingImrul: Context Driven Testing
Imrul: Context Driven TestingSQABD
 
Tauhid: SQL Server Database Change Automation
Tauhid: SQL Server Database Change AutomationTauhid: SQL Server Database Change Automation
Tauhid: SQL Server Database Change AutomationSQABD
 
Ayman: When to stop testing?
Ayman: When to stop testing?Ayman: When to stop testing?
Ayman: When to stop testing?SQABD
 
Kabir Ahmed: AutoHotkey
Kabir Ahmed: AutoHotkeyKabir Ahmed: AutoHotkey
Kabir Ahmed: AutoHotkeySQABD
 
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 trackerSQABD
 
M. Ayman Noor: SQA Empowerment
M. Ayman Noor: SQA EmpowermentM. Ayman Noor: SQA Empowerment
M. Ayman Noor: SQA EmpowermentSQABD
 
Tanvir Afzal: Selenium
Tanvir Afzal: SeleniumTanvir Afzal: Selenium
Tanvir Afzal: SeleniumSQABD
 
Jan Friis Nielson: Bideshi Experience
Jan Friis Nielson: Bideshi ExperienceJan Friis Nielson: Bideshi Experience
Jan Friis Nielson: Bideshi ExperienceSQABD
 
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 itSQABD
 
Mozammel Haque: Scrum
Mozammel Haque: ScrumMozammel Haque: Scrum
Mozammel Haque: ScrumSQABD
 
CUCUMBER - Making BDD Fun
CUCUMBER - Making BDD FunCUCUMBER - Making BDD Fun
CUCUMBER - Making BDD FunSQABD
 
Code Review In Testing View
Code Review In Testing ViewCode Review In Testing View
Code Review In Testing ViewSQABD
 
Am I Flexible?
Am I Flexible?Am I Flexible?
Am I Flexible?SQABD
 
SCALING Scrum
SCALING ScrumSCALING Scrum
SCALING ScrumSQABD
 
Do You Have a Hit List?
Do You Have a Hit List?Do You Have a Hit List?
Do You Have a Hit List?SQABD
 

More from 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?
 

Recently uploaded

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
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 Subbuapidays
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
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...Miguel Araújo
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
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, ...apidays
 
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?Igalia
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
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].pdfOverkill Security
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
"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 ...Zilliz
 
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...Zilliz
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 

Recently uploaded (20)

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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, ...
 
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?
 
+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...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
"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 ...
 
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...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 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 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)