SlideShare une entreprise Scribd logo
1  sur  42
Pain-driven development
Alexandr Sugak,
.NET developer/architect at Sigma Software,
Kharkiv F# User Group
About me
 32 years old;
 Programming for ~12 years;
 Did mostly .NET;
 Worked on Web and Desktop apps, DBs, Web/Win Services, IDE plug-ins,
SPAs, mobile apps, integrations;
About me
 32 years old;
 Programming for ~12 years;
 Did mostly .NET;
 Worked on Web and Desktop apps, DBs, Web/Win Services, IDE plug-ins,
SPAs, mobile apps, integrations;
 Never liked it.
Agenda
 Pain #1 -> example(s) -> Guiding principle #1;
 Pain #2 -> example(s) -> Guiding principle #2;
 Pain #3 -> example(s) -> Guiding principle #3;
 Pain #4 -> example(s) -> Guiding principle #4.
How we do .NET today
Platform:
 Windows;
 IIS;
 MS SQL Server;
 Azure.
Technology:
 C#;
 ASP.NET
MVC/API;
 Entity Framework;
 WCF
 Angular.JS.
Tools:
 Visual Studio;
 R#;
 NuGet.exe;
 TFS;
 TeamCity.
Libraries:
 AutoMapper;
 Json.NET;
 Log4Net;
 Rhino Mocks.
Architecture:
 3-Tier;
 DDD “Light”;
 SOA;
 Microservices.
But now we have .NET Core and a new
open-source MSFT, right?
But now we have .NET Core and a new
open-source MSFT, right?
https://github.com/NuGet/NuGetGallery/pull/4437
Wrong
.NET Core + Linux =
 C#;
 ASP.NET Core;
 EF Core;
 SQL Server for Linux;
 Visual Studio for Mac;
 <something> Core;
DISCLAIMER
 Subjective matter!
 You will have your project’s requirements;
 Not every project is a “green field” project;
 This is not about “all new shiny things are better”.
Pain of using “magic” frameworks
 You install NHibernate;
 Everything works as expected;
 You create your first entity – so far so good;
 You create second entity – it doesn’t work;
 You spend 3 hours to understand that the problem is that your new entity
has “Date” property and it is not escaped in generated T-SQL.
Principle 1: direct SQL queries (Dapper)
Principle 1: direct SQL queries (F# +
ADO.NET)
Principle 1: direct SQL queries (Go)
https://github.com/jmoiron/sqlx
Principle 1: Request -> Response
https://suave.io
Principle 1: Request -> Response
https://golang.org/pkg/net/http/
Principle 1: “less magic”
 Avoid accidental complexity at all cost;
 Magic things: ORMs, AOP, overuse of conventions, code generation,
reflection etc.;
 Willing to trade some effort for the full control over solution.
The “it works on my machine” pain
 You do the change and test it locally – it works;
 You push your changes to repository;
 CI build fails with “Cannot load an assembly”;
 You spend next 3 hours trying to understand why.
Principle 2: predictable builds
Principle 2: locking dependencies
Package Manager Platform Has lock file?
Paket .Net
Nuget.exe .Net
Npm JS
Yarn JS
dep Go
Principle 2: configuring IIS
http://tavalik.ru/ustanovka-wordpress-na-iis/
Principle 2: configuring nginx
Principle 2: predictable state
 Reproducible builds: “single script to rule them all”;
 Transient dependencies, lock files;
 Immutable servers/infrastructure;
 Configuration-driven environment.
The “edit, compile, wait, repeat” pain
 You do the change to the model/view/controller;
 You compile your 35 projects solution - 30 sec;
 You reload your browser and wait for:
 IIS to reload the app – 5 sec;
 Your app to initialize – 15 sec;
 The page to load – 2 sec;
 You manually restore the page state – 5 sec;
The “edit, compile, wait, repeat” pain
 You do the change to the model/view/controller;
 You compile your 35 projects solution - 30 sec;
 You reload your browser and wait for:
 IIS to reload the app – 5 sec;
 Your app to initialize – 15 sec;
 The page to load – 2 sec;
 You manually restore the page state – 5 sec;
 And it did not work;
 Repeat.
The “edit, compile, wait, repeat” pain
https://faculty.washington.edu/ajko/books/cooperative-software-development/history.html
Principle 3: File watchers
Principle 3: React hot loader
Principle 3: next level
 Not just time travel, I want to observe changes across time at one glance;
 Not just hot reload, I want to see changes for all states, on all pages;
 Visual programming?
 Programming by example?
 See Bret Victor’s work, e.g.
http://worrydream.com/#!2/LadderOfAbstraction
Principle 3: build feedback
 Run entire test suite on every commit;
 Run all linters on every commit;
 Deploy 10 version of the app per day;
 Receive notifications on every failure: Slack integration for CI builds and in-
app critical errors;
Principle 3: shorten feedback loop
 As a programmer, I want to see the effect of the changes I do
immediately so that I could be more efficient;
The “your skills are now obsolete” pain
 You start as a .NET programmer in 200X;
 You learn ASP.NET Web Forms: the event model, the View State, the Ajax
Toolkit, etc.;
The “your skills are now obsolete” pain
 You start as a .NET programmer in 200X;
 You learn ASP.NET Web Forms: the event model, the View State, the Ajax
Toolkit, etc.;
 Time passes, you are in the 201X;
 You now have a part of your brain that is forever lost.
How to disable
ViewState
https://commons.wikimedia.org/wiki/File:Brodmann_area_45_lateral.jpg
The “your skills are now obsolete” pain
 You start doing SPAs in the 201X;
 You learn AngularJS: the template language, the directives, the custom
HTTP client, etc.;
The “your skills are now obsolete” pain
 You start doing SPAs in the 201X;
 You learn AngularJS: the template language, the directives, the custom
HTTP client, etc.;
 …
 See the pattern?
Principle 4: things I cannot reuse
 WebForms;
 WinForms;
 SharePoint;
 Visual Studio + R#;
 AngularJS http client;
 “Click to deploy to Azure”;
 and many more.
Principle 4: things I can reuse
 JavaScript;
 Object Oriented/Functional programming, SOLID;
 Event-driven/reactive systems;
 Web, http, networks;
 SQL;
 Emacs/Vim;
 Actor Model;
 Stream Processing;
 Machine Learning;
 Statistics;
 UX;
 And many more.
Principle 4: Reactive Extensions
http://reactivex.io/
Principle 4: composition and reuse
 As a programmer, I want to be able to reuse the skills and knowledge I
have when working on a new project so that I could be more efficient and
be in demand on job market;
Summary
 Business value first, technical wizardry second;
 Automate all the things!
 Do not make compromises with technology, ask for more!
 Learn how to build systems, not how to use frameworks.
What are your Principles?
https://www.facebook.com/groups/kharkivfsharp/
Thank you!

Contenu connexe

Tendances

In graph we trust: Microservices, GraphQL and security challenges
In graph we trust: Microservices, GraphQL and security challengesIn graph we trust: Microservices, GraphQL and security challenges
In graph we trust: Microservices, GraphQL and security challenges
Mohammed A. Imran
 

Tendances (20)

Use groovy & grails in your spring boot projects
Use groovy & grails in your spring boot projectsUse groovy & grails in your spring boot projects
Use groovy & grails in your spring boot projects
 
"Will Git Be Around Forever? A List of Possible Successors" at UtrechtJUG
"Will Git Be Around Forever? A List of Possible Successors" at UtrechtJUG"Will Git Be Around Forever? A List of Possible Successors" at UtrechtJUG
"Will Git Be Around Forever? A List of Possible Successors" at UtrechtJUG
 
Refactoring Wunderlist. UA Mobile 2016.
Refactoring Wunderlist. UA Mobile 2016.Refactoring Wunderlist. UA Mobile 2016.
Refactoring Wunderlist. UA Mobile 2016.
 
Front End Development for Back End Java Developers - NYJavaSIG 2019
Front End Development for Back End Java Developers - NYJavaSIG 2019Front End Development for Back End Java Developers - NYJavaSIG 2019
Front End Development for Back End Java Developers - NYJavaSIG 2019
 
Preparing for the WebGeek DevCup
Preparing for the WebGeek DevCupPreparing for the WebGeek DevCup
Preparing for the WebGeek DevCup
 
React native first impression
React native first impressionReact native first impression
React native first impression
 
In graph we trust: Microservices, GraphQL and security challenges
In graph we trust: Microservices, GraphQL and security challengesIn graph we trust: Microservices, GraphQL and security challenges
In graph we trust: Microservices, GraphQL and security challenges
 
Effective Android Development. UA Mobile 2016.
Effective Android Development. UA Mobile 2016.Effective Android Development. UA Mobile 2016.
Effective Android Development. UA Mobile 2016.
 
Testing Angular 2 Applications - Rich Web 2016
Testing Angular 2 Applications - Rich Web 2016Testing Angular 2 Applications - Rich Web 2016
Testing Angular 2 Applications - Rich Web 2016
 
Fixing security by fixing software development
Fixing security by fixing software developmentFixing security by fixing software development
Fixing security by fixing software development
 
Javascript State of the Union 2015 - English
Javascript State of the Union 2015 - EnglishJavascript State of the Union 2015 - English
Javascript State of the Union 2015 - English
 
DOES SFO 2016 - Sam Guckenheimer & Ed Blankenship "Moving to One Engineering ...
DOES SFO 2016 - Sam Guckenheimer & Ed Blankenship "Moving to One Engineering ...DOES SFO 2016 - Sam Guckenheimer & Ed Blankenship "Moving to One Engineering ...
DOES SFO 2016 - Sam Guckenheimer & Ed Blankenship "Moving to One Engineering ...
 
API Design Principles for Accelerated Development
API Design Principles for Accelerated DevelopmentAPI Design Principles for Accelerated Development
API Design Principles for Accelerated Development
 
Continuous Testing With React Storybook & WebdriverIO
Continuous Testing With React Storybook & WebdriverIOContinuous Testing With React Storybook & WebdriverIO
Continuous Testing With React Storybook & WebdriverIO
 
Javaland 2014 / GWT architectures and lessons learned
Javaland 2014 / GWT architectures and lessons learnedJavaland 2014 / GWT architectures and lessons learned
Javaland 2014 / GWT architectures and lessons learned
 
Cloud Native Progressive Web Applications - Denver JUG 2016
Cloud Native Progressive Web Applications - Denver JUG 2016Cloud Native Progressive Web Applications - Denver JUG 2016
Cloud Native Progressive Web Applications - Denver JUG 2016
 
Easy logins for JavaScript web applications
Easy logins for JavaScript web applicationsEasy logins for JavaScript web applications
Easy logins for JavaScript web applications
 
Ease into HTML5 and CSS3
Ease into HTML5 and CSS3Ease into HTML5 and CSS3
Ease into HTML5 and CSS3
 
WordPress: Doing Simply & Effectively
WordPress: Doing Simply & EffectivelyWordPress: Doing Simply & Effectively
WordPress: Doing Simply & Effectively
 
The Angular road from 1.x to 2.0
The Angular road from 1.x to 2.0The Angular road from 1.x to 2.0
The Angular road from 1.x to 2.0
 

Similaire à Pain Driven Development by Alexandr Sugak

Front-End Modernization for Mortals
Front-End Modernization for MortalsFront-End Modernization for Mortals
Front-End Modernization for Mortals
cgack
 
The State of Front-end At CrowdTwist
The State of Front-end At CrowdTwistThe State of Front-end At CrowdTwist
The State of Front-end At CrowdTwist
Mark Fayngersh
 

Similaire à Pain Driven Development by Alexandr Sugak (20)

История одного успешного ".NET" проекта, Александр Сугак
История одного успешного ".NET" проекта, Александр СугакИстория одного успешного ".NET" проекта, Александр Сугак
История одного успешного ".NET" проекта, Александр Сугак
 
AstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdf
AstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdfAstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdf
AstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdf
 
Front-End Modernization for Mortals
Front-End Modernization for MortalsFront-End Modernization for Mortals
Front-End Modernization for Mortals
 
Front end-modernization
Front end-modernizationFront end-modernization
Front end-modernization
 
Front end-modernization
Front end-modernizationFront end-modernization
Front end-modernization
 
Enterprise PHP (PHP London Conference 2008)
Enterprise PHP (PHP London Conference 2008)Enterprise PHP (PHP London Conference 2008)
Enterprise PHP (PHP London Conference 2008)
 
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
 
Django simplified : by weever mbakaya
Django simplified : by weever mbakayaDjango simplified : by weever mbakaya
Django simplified : by weever mbakaya
 
JSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendJSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontend
 
Web worker in your angular application
Web worker in your angular applicationWeb worker in your angular application
Web worker in your angular application
 
Stanislav Khorunzhyi, "Front-end it like a PRO"
Stanislav Khorunzhyi, "Front-end it like a PRO"Stanislav Khorunzhyi, "Front-end it like a PRO"
Stanislav Khorunzhyi, "Front-end it like a PRO"
 
10 Code Anti-Patterns to Avoid in Software Development.pdf
10 Code Anti-Patterns to Avoid in Software Development.pdf10 Code Anti-Patterns to Avoid in Software Development.pdf
10 Code Anti-Patterns to Avoid in Software Development.pdf
 
30 Skills to Master to Become a Senior Software Engineer
30 Skills to Master to Become a Senior Software Engineer30 Skills to Master to Become a Senior Software Engineer
30 Skills to Master to Become a Senior Software Engineer
 
Wordpress as a framework
Wordpress as a frameworkWordpress as a framework
Wordpress as a framework
 
System design for Web Application
System design for Web ApplicationSystem design for Web Application
System design for Web Application
 
The State of Front-end At CrowdTwist
The State of Front-end At CrowdTwistThe State of Front-end At CrowdTwist
The State of Front-end At CrowdTwist
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
DevSecCon Singapore 2018 - Remove developers’ shameful secrets or simply rem...
DevSecCon Singapore 2018 -  Remove developers’ shameful secrets or simply rem...DevSecCon Singapore 2018 -  Remove developers’ shameful secrets or simply rem...
DevSecCon Singapore 2018 - Remove developers’ shameful secrets or simply rem...
 
O365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialO365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - Material
 
A modern architecturereview–usingcodereviewtools-ver-3.5
A modern architecturereview–usingcodereviewtools-ver-3.5A modern architecturereview–usingcodereviewtools-ver-3.5
A modern architecturereview–usingcodereviewtools-ver-3.5
 

Plus de Sigma Software

Plus de Sigma Software (20)

Fast is Best. Using .NET MinimalAPIs
Fast is Best. Using .NET MinimalAPIsFast is Best. Using .NET MinimalAPIs
Fast is Best. Using .NET MinimalAPIs
 
"Are you developing or declining? Don't become an IT-dinosaur"
"Are you developing or declining? Don't become an IT-dinosaur""Are you developing or declining? Don't become an IT-dinosaur"
"Are you developing or declining? Don't become an IT-dinosaur"
 
Michael Smolin, "Decrypting customer's cultural code"
Michael Smolin, "Decrypting customer's cultural code"Michael Smolin, "Decrypting customer's cultural code"
Michael Smolin, "Decrypting customer's cultural code"
 
Max Kunytsia, “Why is continuous product discovery better than continuous del...
Max Kunytsia, “Why is continuous product discovery better than continuous del...Max Kunytsia, “Why is continuous product discovery better than continuous del...
Max Kunytsia, “Why is continuous product discovery better than continuous del...
 
Marcelino Moreno, "Product Management Mindset"
Marcelino Moreno, "Product Management Mindset"Marcelino Moreno, "Product Management Mindset"
Marcelino Moreno, "Product Management Mindset"
 
Andrii Pastushok, "Product Discovery in Outsourcing - What, When, and How"
Andrii Pastushok, "Product Discovery in Outsourcing - What, When, and How"Andrii Pastushok, "Product Discovery in Outsourcing - What, When, and How"
Andrii Pastushok, "Product Discovery in Outsourcing - What, When, and How"
 
Elena Turkenych “BA vs PM: Who' the right person, for the right job, with the...
Elena Turkenych “BA vs PM: Who' the right person, for the right job, with the...Elena Turkenych “BA vs PM: Who' the right person, for the right job, with the...
Elena Turkenych “BA vs PM: Who' the right person, for the right job, with the...
 
Eleonora Budanova “BA+PM+DEV team: how to build the synergy”
Eleonora Budanova “BA+PM+DEV team: how to build the synergy”Eleonora Budanova “BA+PM+DEV team: how to build the synergy”
Eleonora Budanova “BA+PM+DEV team: how to build the synergy”
 
Stoyan Atanasov “How crucial is the BA role in an IT Project"
Stoyan Atanasov “How crucial is the BA role in an IT Project"Stoyan Atanasov “How crucial is the BA role in an IT Project"
Stoyan Atanasov “How crucial is the BA role in an IT Project"
 
Olexandra Kovalyova, "Equivalence Partitioning, Boundary Values ​​Analysis, C...
Olexandra Kovalyova, "Equivalence Partitioning, Boundary Values ​​Analysis, C...Olexandra Kovalyova, "Equivalence Partitioning, Boundary Values ​​Analysis, C...
Olexandra Kovalyova, "Equivalence Partitioning, Boundary Values ​​Analysis, C...
 
Yana Lysa — "Decision Tables, State-Transition testing, Pairwase Testing"
Yana Lysa — "Decision Tables, State-Transition testing, Pairwase Testing"Yana Lysa — "Decision Tables, State-Transition testing, Pairwase Testing"
Yana Lysa — "Decision Tables, State-Transition testing, Pairwase Testing"
 
VOLVO x HACK SPRINT
VOLVO x HACK SPRINTVOLVO x HACK SPRINT
VOLVO x HACK SPRINT
 
Business digitalization trends and challenges
Business digitalization trends and challengesBusiness digitalization trends and challenges
Business digitalization trends and challenges
 
Дмитро Терещенко, "How to secure your application with Secure SDLC"
Дмитро Терещенко, "How to secure your application with Secure SDLC"Дмитро Терещенко, "How to secure your application with Secure SDLC"
Дмитро Терещенко, "How to secure your application with Secure SDLC"
 
Яна Лиса, “Ефективні методи написання хороших мануальних тестових сценаріїв”
Яна Лиса, “Ефективні методи написання хороших мануальних тестових сценаріїв”Яна Лиса, “Ефективні методи написання хороших мануальних тестових сценаріїв”
Яна Лиса, “Ефективні методи написання хороших мануальних тестових сценаріїв”
 
Тетяна Осетрова, “Модель зрілості розподіленної проектної команди”
Тетяна Осетрова, “Модель зрілості розподіленної проектної команди”Тетяна Осетрова, “Модель зрілості розподіленної проектної команди”
Тетяна Осетрова, “Модель зрілості розподіленної проектної команди”
 
Training solutions and content creation
Training solutions and content creationTraining solutions and content creation
Training solutions and content creation
 
False news - false truth: tips & tricks how to avoid them
False news - false truth: tips & tricks how to avoid themFalse news - false truth: tips & tricks how to avoid them
False news - false truth: tips & tricks how to avoid them
 
Анна Бойко, "Хороший контракт vs очікування клієнтів. Що вбереже вас, якщо вд...
Анна Бойко, "Хороший контракт vs очікування клієнтів. Що вбереже вас, якщо вд...Анна Бойко, "Хороший контракт vs очікування клієнтів. Що вбереже вас, якщо вд...
Анна Бойко, "Хороший контракт vs очікування клієнтів. Що вбереже вас, якщо вд...
 
Дмитрий Лапшин, "The importance of TEX and Internal Quality. How explain and ...
Дмитрий Лапшин, "The importance of TEX and Internal Quality. How explain and ...Дмитрий Лапшин, "The importance of TEX and Internal Quality. How explain and ...
Дмитрий Лапшин, "The importance of TEX and Internal Quality. How explain and ...
 

Dernier

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Dernier (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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
 
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...
 

Pain Driven Development by Alexandr Sugak

  • 1. Pain-driven development Alexandr Sugak, .NET developer/architect at Sigma Software, Kharkiv F# User Group
  • 2. About me  32 years old;  Programming for ~12 years;  Did mostly .NET;  Worked on Web and Desktop apps, DBs, Web/Win Services, IDE plug-ins, SPAs, mobile apps, integrations;
  • 3. About me  32 years old;  Programming for ~12 years;  Did mostly .NET;  Worked on Web and Desktop apps, DBs, Web/Win Services, IDE plug-ins, SPAs, mobile apps, integrations;  Never liked it.
  • 4. Agenda  Pain #1 -> example(s) -> Guiding principle #1;  Pain #2 -> example(s) -> Guiding principle #2;  Pain #3 -> example(s) -> Guiding principle #3;  Pain #4 -> example(s) -> Guiding principle #4.
  • 5. How we do .NET today Platform:  Windows;  IIS;  MS SQL Server;  Azure. Technology:  C#;  ASP.NET MVC/API;  Entity Framework;  WCF  Angular.JS. Tools:  Visual Studio;  R#;  NuGet.exe;  TFS;  TeamCity. Libraries:  AutoMapper;  Json.NET;  Log4Net;  Rhino Mocks. Architecture:  3-Tier;  DDD “Light”;  SOA;  Microservices.
  • 6. But now we have .NET Core and a new open-source MSFT, right?
  • 7. But now we have .NET Core and a new open-source MSFT, right? https://github.com/NuGet/NuGetGallery/pull/4437 Wrong
  • 8. .NET Core + Linux =  C#;  ASP.NET Core;  EF Core;  SQL Server for Linux;  Visual Studio for Mac;  <something> Core;
  • 9. DISCLAIMER  Subjective matter!  You will have your project’s requirements;  Not every project is a “green field” project;  This is not about “all new shiny things are better”.
  • 10. Pain of using “magic” frameworks  You install NHibernate;  Everything works as expected;  You create your first entity – so far so good;  You create second entity – it doesn’t work;  You spend 3 hours to understand that the problem is that your new entity has “Date” property and it is not escaped in generated T-SQL.
  • 11. Principle 1: direct SQL queries (Dapper)
  • 12. Principle 1: direct SQL queries (F# + ADO.NET)
  • 13. Principle 1: direct SQL queries (Go) https://github.com/jmoiron/sqlx
  • 14. Principle 1: Request -> Response https://suave.io
  • 15. Principle 1: Request -> Response https://golang.org/pkg/net/http/
  • 16. Principle 1: “less magic”  Avoid accidental complexity at all cost;  Magic things: ORMs, AOP, overuse of conventions, code generation, reflection etc.;  Willing to trade some effort for the full control over solution.
  • 17. The “it works on my machine” pain  You do the change and test it locally – it works;  You push your changes to repository;  CI build fails with “Cannot load an assembly”;  You spend next 3 hours trying to understand why.
  • 19. Principle 2: locking dependencies Package Manager Platform Has lock file? Paket .Net Nuget.exe .Net Npm JS Yarn JS dep Go
  • 20. Principle 2: configuring IIS http://tavalik.ru/ustanovka-wordpress-na-iis/
  • 22. Principle 2: predictable state  Reproducible builds: “single script to rule them all”;  Transient dependencies, lock files;  Immutable servers/infrastructure;  Configuration-driven environment.
  • 23. The “edit, compile, wait, repeat” pain  You do the change to the model/view/controller;  You compile your 35 projects solution - 30 sec;  You reload your browser and wait for:  IIS to reload the app – 5 sec;  Your app to initialize – 15 sec;  The page to load – 2 sec;  You manually restore the page state – 5 sec;
  • 24. The “edit, compile, wait, repeat” pain  You do the change to the model/view/controller;  You compile your 35 projects solution - 30 sec;  You reload your browser and wait for:  IIS to reload the app – 5 sec;  Your app to initialize – 15 sec;  The page to load – 2 sec;  You manually restore the page state – 5 sec;  And it did not work;  Repeat.
  • 25. The “edit, compile, wait, repeat” pain https://faculty.washington.edu/ajko/books/cooperative-software-development/history.html
  • 26. Principle 3: File watchers
  • 27. Principle 3: React hot loader
  • 28. Principle 3: next level  Not just time travel, I want to observe changes across time at one glance;  Not just hot reload, I want to see changes for all states, on all pages;  Visual programming?  Programming by example?  See Bret Victor’s work, e.g. http://worrydream.com/#!2/LadderOfAbstraction
  • 29. Principle 3: build feedback  Run entire test suite on every commit;  Run all linters on every commit;  Deploy 10 version of the app per day;  Receive notifications on every failure: Slack integration for CI builds and in- app critical errors;
  • 30. Principle 3: shorten feedback loop  As a programmer, I want to see the effect of the changes I do immediately so that I could be more efficient;
  • 31. The “your skills are now obsolete” pain  You start as a .NET programmer in 200X;  You learn ASP.NET Web Forms: the event model, the View State, the Ajax Toolkit, etc.;
  • 32. The “your skills are now obsolete” pain  You start as a .NET programmer in 200X;  You learn ASP.NET Web Forms: the event model, the View State, the Ajax Toolkit, etc.;  Time passes, you are in the 201X;  You now have a part of your brain that is forever lost. How to disable ViewState https://commons.wikimedia.org/wiki/File:Brodmann_area_45_lateral.jpg
  • 33. The “your skills are now obsolete” pain  You start doing SPAs in the 201X;  You learn AngularJS: the template language, the directives, the custom HTTP client, etc.;
  • 34. The “your skills are now obsolete” pain  You start doing SPAs in the 201X;  You learn AngularJS: the template language, the directives, the custom HTTP client, etc.;  …  See the pattern?
  • 35. Principle 4: things I cannot reuse  WebForms;  WinForms;  SharePoint;  Visual Studio + R#;  AngularJS http client;  “Click to deploy to Azure”;  and many more.
  • 36. Principle 4: things I can reuse  JavaScript;  Object Oriented/Functional programming, SOLID;  Event-driven/reactive systems;  Web, http, networks;  SQL;  Emacs/Vim;  Actor Model;  Stream Processing;  Machine Learning;  Statistics;  UX;  And many more.
  • 37. Principle 4: Reactive Extensions http://reactivex.io/
  • 38. Principle 4: composition and reuse  As a programmer, I want to be able to reuse the skills and knowledge I have when working on a new project so that I could be more efficient and be in demand on job market;
  • 39. Summary  Business value first, technical wizardry second;  Automate all the things!  Do not make compromises with technology, ask for more!  Learn how to build systems, not how to use frameworks.
  • 40. What are your Principles?

Notes de l'éditeur

  1. Not satisfied – is the better word
  2. We will now do programming on linux using .NET Core, ASP.NET Core, EF Core and SQL for linux?
  3. We will now do programming on linux using .NET Core, ASP.NET Core, EF Core and SQL for linux? I am not against these tools, I am against not changing, since this will not remove the pain
  4. Sometimes, after all (non)functional requirements and limitations are considered, you as a tech specialist make a decision to use technology A or B. This is the time to think of your principles.
  5. Put down your headphones and listen to what your teammates are talking about in the room? Is it “how to do this in this framework?”, “how do I configure that?”, “how do I deploy it?” or “what did you do to make it work?” Or is it “do I understand this business rule right?”, “what should happen if user does this?” or “maybe we have contradiction in these requirements?”
  6. Do you need to have 5 operations on 3 core entities? Do plain ADO.Net or dapper Do you have 24-screens CRUD app? Use EF
  7. Do you need to have 5 operations on 3 core entities? Do plain ADO.Net or dapper Do you have 24-screens CRUD app? Use EF
  8. Do you need to have 5 operations on 3 core entities? Do plain ADO.Net or dapper Do you have 24-screens CRUD app? Use EF
  9. Single script build: Must have for OSS Must have for inhouse too – days on setting up the environment for new developers?
  10. Instead of “Consolidate packages” button in VS.
  11. You could actually google for ready configurations (e.g. for hosting wordpress), not “how-to” articles with screenshots of the old IIS version
  12. You could actually google for ready configurations (e.g. for hosting wordpress), not “how-to” articles with screenshots of the old IIS version
  13. Did you have a day when you spent entire day working hard but at the end of the day felt that you accomplished nothing?
  14. Sounds like using punchcards in the 70s