SlideShare a Scribd company logo
WHAT A MILLIONS LOC OF HTML, JS AND PHP TAUGHT ME 
SURVIVING YOUR 
FRONT-END
WHOIS SEBASTIAN SCHÜRMANN 
• Coder for about 15 years 
• All things agile since 2004 
• Agile Coaching, some consulting and freelance 
development 
• http://dissident-trainings.de
WHY THIS TALK?
I WORK ON THINGS
OFTEN ITS FRONT-END
PEOPLE WILL BE LIKE ..
„You don't have to be a genius or a visionary or 
even a college graduate to be successful. You just 
need a framework and a dream.“ 
–MICHAEL DELL
REALITY IS LIKE … 
VENN DIAGRAM OF MY WORK WEEK 
http://cssquirrel.com/
Surviving your frontend (WIP - Sneak Peak)
Surviving your frontend (WIP - Sneak Peak)
Surviving your frontend (WIP - Sneak Peak)
Surviving your frontend (WIP - Sneak Peak)
Surviving your frontend (WIP - Sneak Peak)
Surviving your frontend (WIP - Sneak Peak)
• Specifications are very roughly prepared for front-ends 
• The crafty side of development, modularization and 
testing is neglected 
• Standards are not set and/or followed 
• The fact that a javascript front-end is the client to a 
server application is often overlooked 
• Front-end code is often thought as throw away.
THE THREE SOLUTION VECTORS 
CRAFT TOOLS 
PRACTICES
ABRAHAM KAPLAN 
TOOLS 
„GIVE A SMALL BOY A HAMMER, AND 
HE WILL FIND THAT EVERYTHING H E 
ENCOUNTERS NEEDS POUNDING. “
A INCOMPLETE ….. 
HISTORY OF JS FRAMEWORKS 
jQuery 
baconJS 
XUL prototype 
AngularJS 
2002 2014 
mootools rxJS 
backbone.js
I WAS ONCE TOLD JQUERY WAS THE 
THING ….. IN 2006
BUILD IT 
• Repeating tasks by hand is 
prone to errors 
• Build, test and release is 
complex in 2014 
• You want to see the „final“ 
result 
• Fast feedback! 
• Make the build FAST!
TEST IT 
• Always be testing 
• Using tests is faster than 
developing in the browser 
• Setup is often a pain 
• How many browsers do 
you support?
MODULARIZE 
I T ! 
• Single responsibility 
• Different job, different 
behavior 
• Build and test for this 
component 
• CI/CD for this component 
• Assets -> Component
SCAFFOLD IT! 
• You will be creating a lot of 
modules/components 
• They should follow a 
consistent structure 
• Creating this by hand is 
error prone and waste of 
time
RECREAT E I T 
• A front needs a back(-end) 
• I am not a expert in 
backends per se 
• Especially not in your 
backend 
• But I needz it for 
validation!
MEASURE IT 
• Analytics is key 
• Not only (rendering) speed 
• Know your KPI’s 
• Is it still working? 
• Track errors! 
• Can you prove it?
CONCLUSION TOOLS 
• Hipster frameworks? Cargo cult? 
• Learn and use the tools for automation. Create a 
„monkey task list“ and automate one task a day 
• It’s 2014, you will be testing, get over it!
RICHARD SENNETT, THE CRAFTSMAN 
CRAFT 
“CRAFTSMANSHIP NAMES AN ENDURING, 
BASIC HUMAN IMPULSE, THE DESIRE TO 
DO A JOB WELL FOR ITS OWN SAKE.”
COMPLETENESS 
THE STORY OF THE 
LOADING INDICATOR! 
JIRA #1235 
THE LOADING INDICATOR IN THE FRIEND 
SEARCH IS NOT GOING AWAY
COMPLETENESS 
$.AJAX AND THE FALLACIES OF 
DISTRIBUTED COMPUTING
THE FALLACIES OF DISTRIBUTED 
COMPUTING 
• The network is reliable. 
• Latency is zero. 
• Bandwidth is infinite. 
• The network is secure. 
• Topology doesn't change. 
• There is one administrator. 
• Transport cost is zero. 
• The network is homogeneous.
THE FALLACIES OF DISTRIBUTED 
COMPUTING 
• The network is reliable. 
• Latency is zero. 
• Bandwidth is infinite. 
• The network is secure. 
• Topology doesn't change. 
• There is one administrator. 
• Transport cost is zero. 
• The network is homogeneous. 
1994
COMPLETENESS 
$.AJAX AND THE FALLACIES OF 
DISTRIBUTED COMPUTING 
ERROR? WHICH ERROR 
TIMEOUT? 
EXACTLY? 
500 404
RFC 7231 MOTHERFUCKER 
419: AUTHENTICATION 
TIMEOUT 
200 4XX 5XX 
DID YOU READ IT?
JIRA #1235 
SOLUTION: ON ERRORCODE 500 GO TO 
USER HOME (SESSION IS RESTARTED 
THERE)
NIH - NOT INVENTED HERE 
THE STORY OF THE 
FORM VALIDATOR 
JIRA #1236 
IMPLEMENT A VALIDATION IN 
REGISTRATION FORM SO THAT USERS 
GET FASTER FEEDBACK IF HOME 
ADDRESS IS OK
Not invented here (NIH) is the philosophy of 
social, corporate, or institutional cultures that avoid 
using or buying already existing products, 
research, standards, or knowledge because of their 
external origins and costs. The reasons for not 
wanting to use the work of others are varied, but 
can include fear through lack of understanding, an 
unwillingness to value the work of others, or 
forming part of a wider "turf war" 
–WIKIPEDIA VIA 
HTTP://WWW.WIKIWAND.COM/EN/ 
NOT_INVENTED_HERE
JIRA #1236 
IMPLEMENT A VALIDATION IN 
REGISTRATION FORM SO THAT USERS 
GET FASTER FEEDBACK IF HOME 
ADDRESS IS OK 
JIRA #1236 COMMENT 
IMPLEMENT OWN SOLUTION BASED ON 
REGEX TO VALIDATE FORM
DEVELOPMENT TAKES 2 
WEEKS 
ADDING ANOTHE R S T R E E T A/ 1 
LIB FOR REGEXP 
1 STREET 
STREET 
X-BROWSER 
NO STREET AT ALL 
I PAD Y U NO BLUR?
(?:(?:rn)?[ t])*(?:(?:(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t] 
)+|Z|(?=[["()<>@,;:".[]]))|"(?:[^"r]|.|(?:(?:rn)?[ t]))*"(?:(?: 
rn)?[ t])*)(?:.(?:(?:rn)?[ t])*(?:[^()<>@,;:".[] 000-031]+(?:(?:( 
?:rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|"(?:[^"r]|.|(?:(?:rn)?[ 
t]))*"(?:(?:rn)?[ t])*))*@(?:(?:rn)?[ t])*(?:[^()<>@,;:".[] 000-0 
31]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|[([^[]r]|.)* 
](?:(?:rn)?[ t])*)(?:.(?:(?:rn)?[ t])*(?:[^()<>@,;:".[] 000-031]+ 
(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|[([^[]r]|.)*](?: 
(?:rn)?[ t])*))*|(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z 
|(?=[["()<>@,;:".[]]))|"(?:[^"r]|.|(?:(?:rn)?[ t]))*"(?:(?:rn) 
?[ t])*)*<(?:(?:rn)?[ t])*(?:@(?:[^()<>@,;:".[] 000-031]+(?:(?:(?: 
rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|[([^[]r]|.)*](?:(?:rn)?[ 
t])*)(?:.(?:(?:rn)?[ t])*(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn) 
?[ t])+|Z|(?=[["()<>@,;:".[]]))|[([^[]r]|.)*](?:(?:rn)?[ t] 
)*))*(?:,@(?:(?:rn)?[ t])*(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ 
t])+|Z|(?=[["()<>@,;:".[]]))|[([^[]r]|.)*](?:(?:rn)?[ t])* 
)(?:.(?:(?:rn)?[ t])*(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t] 
)+|Z|(?=[["()<>@,;:".[]]))|[([^[]r]|.)*](?:(?:rn)?[ t])*))*) 
*:(?:(?:rn)?[ t])*)?(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+ 
|Z|(?=[["()<>@,;:".[]]))|"(?:[^"r]|.|(?:(?:rn)?[ t]))*"(?:(?:r 
n)?[ t])*)(?:.(?:(?:rn)?[ t])*(?:[^()<>@,;:".[] 000-031]+(?:(?:(?: 
rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|"(?:[^"r]|.|(?:(?:rn)?[ t 
]))*"(?:(?:rn)?[ t])*))*@(?:(?:rn)?[ t])*(?:[^()<>@,;:".[] 000-031 
]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|[([^[]r]|.)*]( 
?:(?:rn)?[ t])*)(?:.(?:(?:rn)?[ t])*(?:[^()<>@,;:".[] 000-031]+(? 
:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|[([^[]r]|.)*](?:(? 
:rn)?[ t])*))*>(?:(?:rn)?[ t])*)|(?:[^()<>@,;:".[] 000-031]+(?:(? 
:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|"(?:[^"r]|.|(?:(?:rn)? 
[ t]))*"(?:(?:rn)?[ t])*)*:(?:(?:rn)?[ t])*(?:(?:(?:[^()<>@,;:".[] 
000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|"(?:[^"r]| 
.|(?:(?:rn)?[ t]))*"(?:(?:rn)?[ t])*)(?:.(?:(?:rn)?[ t])*(?:[^()<> 
@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|" 
(?:[^"r]|.|(?:(?:rn)?[ t]))*"(?:(?:rn)?[ t])*))*@(?:(?:rn)?[ t] 
)*(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;: 
RFC 822 E-MAIL 
ADRESS FORMAT 
".[]]))|[([^[]r]|.)*](?:(?:rn)?[ t])*)(?:.(?:(?:rn)?[ t])*(? 
:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[ 
]]))|[([^[]r]|.)*](?:(?:rn)?[ t])*))*|(?:[^()<>@,;:".[] 000- 
031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|"(?:[^"r]|.|( 
?:(?:rn)?[ t]))*"(?:(?:rn)?[ t])*)*<(?:(?:rn)?[ t])*(?:@(?:[^()<>@,; 
:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|[([ 
^[]r]|.)*](?:(?:rn)?[ t])*)(?:.(?:(?:rn)?[ t])*(?:[^()<>@,;:" 
:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|[([ 
^[]r]|.)*](?:(?:rn)?[ t])*)(?:.(?:(?:rn)?[ t])*(?:[^()<>@,;:" 
.[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|[([^[ 
]r]|.)*](?:(?:rn)?[ t])*))*(?:,@(?:(?:rn)?[ t])*(?:[^()<>@,;:". 
[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|[([^[] 
r]|.)*](?:(?:rn)?[ t])*)(?:.(?:(?:rn)?[ t])*(?:[^()<>@,;:".[] 
000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|[([^[]r] 
|.)*](?:(?:rn)?[ t])*))*)*:(?:(?:rn)?[ t])*)?(?:[^()<>@,;:".[] 0 
00-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|"(?:[^"r]| 
.|(?:(?:rn)?[ t]))*"(?:(?:rn)?[ t])*)(?:.(?:(?:rn)?[ t])*(?:[^()<>@, 
;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|"(? 
:[^"r]|.|(?:(?:rn)?[ t]))*"(?:(?:rn)?[ t])*))*@(?:(?:rn)?[ t])* 
(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:". 
[]]))|[([^[]r]|.)*](?:(?:rn)?[ t])*)(?:.(?:(?:rn)?[ t])*(?:[ 
^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[] 
]))|[([^[]r]|.)*](?:(?:rn)?[ t])*))*>(?:(?:rn)?[ t])*)(?:,s*( 
?:(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;: 
".[]]))|"(?:[^"r]|.|(?:(?:rn)?[ t]))*"(?:(?:rn)?[ t])*)(?:.(?:( 
?:rn)?[ t])*(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[ 
["()<>@,;:".[]]))|"(?:[^"r]|.|(?:(?:rn)?[ t]))*"(?:(?:rn)?[ t 
])*))*@(?:(?:rn)?[ t])*(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t 
])+|Z|(?=[["()<>@,;:".[]]))|[([^[]r]|.)*](?:(?:rn)?[ t])*)(? 
:.(?:(?:rn)?[ t])*(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+| 
Z|(?=[["()<>@,;:".[]]))|[([^[]r]|.)*](?:(?:rn)?[ t])*))*|(?: 
[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[ 
]]))|"(?:[^"r]|.|(?:(?:rn)?[ t]))*"(?:(?:rn)?[ t])*)*<(?:(?:rn) 
?[ t])*(?:@(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[[" 
()<>@,;:".[]]))|[([^[]r]|.)*](?:(?:rn)?[ t])*)(?:.(?:(?:rn) 
?[ t])*(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<> 
@,;:".[]]))|[([^[]r]|.)*](?:(?:rn)?[ t])*))*(?:,@(?:(?:rn)?[ 
t])*(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@, 
;:".[]]))|[([^[]r]|.)*](?:(?:rn)?[ t])*)(?:.(?:(?:rn)?[ t] 
)*(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;: 
".[]]))|[([^[]r]|.)*](?:(?:rn)?[ t])*))*)*:(?:(?:rn)?[ t])*)? 
(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:". 
[]]))|"(?:[^"r]|.|(?:(?:rn)?[ t]))*"(?:(?:rn)?[ t])*)(?:.(?:(?: 
rn)?[ t])*(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[[ 
"()<>@,;:".[]]))|"(?:[^"r]|.|(?:(?:rn)?[ t]))*"(?:(?:rn)?[ t]) 
*))*@(?:(?:rn)?[ t])*(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t]) 
+|Z|(?=[["()<>@,;:".[]]))|[([^[]r]|.)*](?:(?:rn)?[ t])*)(?: 
.(?:(?:rn)?[ t])*(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z 
|(?=[["()<>@,;:".[]]))|[([^[]r]|.)*](?:(?:rn)?[ t])*))*>(?:(
bower search validator | wc -l 
43
A REWRITTEN 
MODULE 
• Passes all the same unit 
tests and then some. 
• Is a demonstrably better 
solution to the problem 
addressed by the original 
• Makes the developer of the 
original module go "Ooooo, 
why didn't I think of that?“ 
• Has fewer lines. 
A REINVENTED 
MODULE 
• Has different (but maybe 
fewer) bugs. 
• Behaves differently (but NOT 
more correctly) with 
boundary cases. 
• Had code that does things 
differently for stylistic reasons 
rather than function. 
• May support some lame 
excuse to have more lines.
QUALITY 
THE STORY OF THE 
REWRITE 
JIRA EPIC #5 
REWRITE ADMIN SITE AND APP FOR 
SHOP OWNERS
Surviving your frontend (WIP - Sneak Peak)
2009 - 3 MONTH 
1 Developer 
60 M/D 
2011 - 4 MONTH 
4 Developers 
320 M/D 
2012 - 6 MONTH 
6 Developers 
720 MD 
2014 - 8 MONTH 
8 Developers 
1280 MD
WHY? 
• Technology changes 
• We make mistakes 
• We get better & new ideas 
• New features (added fast) 
• Code rot 
• Hurry? 
• Wrong specs? 
• Saving on QA anyone?
BOYSCOUT RULE 
ALWAY S B E 
REFACTORING
BIG BALL OF MUD 
THE STORY O F T H E 1 2 0 
MEGABYTE CHECKOUT 
DAY 1 AT A CUSTOMER PROJECT
„Big ball of mud" systems have usually been 
developed over a long period of time, with 
different individuals working on various pieces 
and parts. Systems developed by people with no 
formal architecture or programming training often 
fall into this pattern“ 
–CITATION NEEDED
„Another reason leading to produce this kind of 
system is when managers put pressure on 
developers and come with incremental micro 
requirements instead of providing a clear 
description of the problem to be solved“ 
–CITATION NEEDED
„Foote and Yoder do not universally condemn 
"big ball of mud" programming, pointing out that 
this pattern is most prevalent because it works — 
at least at the moment it is developed. 
However, programs of this pattern become 
maintenance nightmares“ 
–CITATION NEEDED
„Programmers in control of a big ball of mud 
project are strongly encouraged to study it and to 
understand what it accomplishes, and to use this 
as a loose basis for a formal set of requirements 
for a well-designed system that could replace it. 
Technology shifts – such as client-server to web-based 
or file-based to database-based – may 
provide good reasons to start over from 
scratch“ 
–CITATION NEEDED
ONE GIT CLONE 
TO RULE THEM ALL 
du -hs 
172M 
find . | grep coffee | grep -v 
node_modules | grep -v lcov-report | 
grep -v .git | wc -l 
96 
find . | grep js | grep -v 
node_modules | grep -v lcov-report | 
grep -v json | grep -v .git | wc -l 
306 
files: java, xtend, coffee, js 
./aaa/bbb/ccc/ddd/target/classes/js/lib/ 
myClassName.coffee
• Javascript / Coffeescript with 
close to 0 comments 
• JS == no namespaces 
(header.js vs. header.js) 
• 194 Tests 
• > 5K Coding style validations 
• lcov only for js 
• Setup took a day (from 16 
billed) 
• Fixing „npm test“ another one 
• JS Tests not in CI 
• NPM install failed at first
DIRTY TRICKS 
• Use small components that do 
one job 
• Decouple the front-end from 
backend for development 
• keep the integration/master 
building 
• adhere to your fucking 
standards (or you have none at 
all) 
• Integration and deployment is 
part of development 
• Let the dev change the build 
chain as well 
VS
RICHARD SENNETT, THE CRAFTSMAN 
„… THERE IS TROUBLE CAUSED 
BY CONFLICTING MEASURES OF 
QUALITY, ONE BASED ON 
CORRECTNESS, THE OTHER ON 
PRACTICAL EXPERIENCE” 
PRACTICES
CULTURE / CRAFT 
PRACTICES 
TOOLS 
CONTINUOUS 
DELIVERY
• On every machine 
• For every dev 
• Build and re-build on CI 
• Invest in CI and CD 
• Adopt the culture 
• This is why a Ops person 
IN a team is so important 
• checkout, build, code, test, 
commit, deploy, validate 
(fast) 
ONE BUTTON TEST 
ONE BUTTON BUILD 
ONE BUTTON DEPLOY
NO-CHOICE 
RELENTLESS QUALITY
COST OF BUG FIXING 
100 
75 
50 
25 
0 
Design Implementation Testing Bugfixing
WHY IS BUG FIXING SO 
EXPENSIVE? 
• Bugs costs it self 
• Other work has to be 
delayed 
• Many departments in loop 
100 
75 
50 
25 
• Risk of new bugs 0 
Design Implementation Testing Bugfixing
THE CHEAPEST 
QA TOOLS 
• Flipchart / Whiteboard 
• Stories / Specs 
• Specifications derived 
from examples 
• QA is part of the whole 
development process
WHERE IS YOUR BLIND 
SPOT? 
Testing quadrant - stolen from @lisacrispin
YOUR BIGGEST ALLY IN QUALITY 
THE CFO
FROM DESIGN TO DEPLOYMENT 
RESPONSIBILITY FOR 
THE WHOLE PROCESS
(A EXTREME) DEFINITION OF DONE 
• When tests pass 
• When integrated 
• When deployable build 
• When deployed 
• When measurably delivering value 
http://www.xpdays.de/2014/downloads/002-extreme-continuous-delivery-at-unruly/cd_javaone.pdf
FAI L 
TDD DEPLOYMENT 
FEEDBACK 
DE P LOY PAS S R E FACTOR PAS S 
http://www.xpdays.de/2014/downloads/002-extreme-continuous-delivery-at-unruly/cd_javaone.pdf
N-AMIGOS 
DEV DESIGN PROD 
OPS QA 
PART OF AL L PROCESS STEPS
WHAT I LEARNED SO FA R ( T ) 
CONCLUSIONS
LEARNING PHASE VS. I GOT IT PHASE 
DEVELOP YOUR CRAFT. 
EVERY FUCKING DAY
NOT JUST A BUNCH OF SCRIPTS 
FRONT-END IS FULL BLOWN 
SOFTWARE ENGINEERING
NOT JUST HTML5 + JS 
FRONT-END IS FULL 
STACK
ITS A TEAM THANG 
YOU ARE (ALL)RESPONSIBLE 
FOR THE SUCCESS
ITS COOL 
I T I S A AMAZING THING 
(OR IT SHOULD BE)
AND VICE VERSA 
TOOLS LEAD TO PROCESSES LEAD 
TO CULTURE AND CRAFTSMANSHIP
The way I did it, every job was A+. 
–STEVE WOZNIAK
THANK YOU FOR LISTENING 
AND TIME FOR QUESTIONS! 
Sebastian Schürmann http://dissident-trainings.de

More Related Content

PDF
Funtional Ruby - Mikhail Bortnyk
PDF
Kanban boards step by step
PPTX
Moving Fast at Scale
PDF
DOES16 London - Better Faster Cheaper .. How?
PPTX
An Agile Approach to Machine Learning
KEY
Introduction to atdd
PDF
How HipChat Ships and Recovers Fast with DevOps Practices
PPTX
DevOps - It's About How We Work
Funtional Ruby - Mikhail Bortnyk
Kanban boards step by step
Moving Fast at Scale
DOES16 London - Better Faster Cheaper .. How?
An Agile Approach to Machine Learning
Introduction to atdd
How HipChat Ships and Recovers Fast with DevOps Practices
DevOps - It's About How We Work

What's hot (16)

PDF
London Atlassian User Group - February 2014
PDF
DevOps Army of One - DevOps Days Silicon Valley 2015
PDF
Our path to apache spark
PPTX
Service Architectures At Scale - QCon London 2015
PDF
All daydevops 2016 - Turning Human Capital into High Performance Organizati...
PDF
Reactive All the Way Down the Stack
PPT
Scaling And Measuring Agile
KEY
AJAX & jQuery - City University WAD Module
PPTX
How I Learned to Stop Worrying and Love Legacy Code.....
PDF
Turning Human Capital into High Performance Organizational Capital
PDF
Greach 2018: Surviving Microservices
PPTX
Minimum Viable Architecture -- Good Enough is Good Enough in a Startup
PDF
Introduction to Apache Beam
PDF
Dev "Programming" Ops For DevOps Success
PDF
JIRA Enterprise
PPTX
So long scrum, hello kanban
London Atlassian User Group - February 2014
DevOps Army of One - DevOps Days Silicon Valley 2015
Our path to apache spark
Service Architectures At Scale - QCon London 2015
All daydevops 2016 - Turning Human Capital into High Performance Organizati...
Reactive All the Way Down the Stack
Scaling And Measuring Agile
AJAX & jQuery - City University WAD Module
How I Learned to Stop Worrying and Love Legacy Code.....
Turning Human Capital into High Performance Organizational Capital
Greach 2018: Surviving Microservices
Minimum Viable Architecture -- Good Enough is Good Enough in a Startup
Introduction to Apache Beam
Dev "Programming" Ops For DevOps Success
JIRA Enterprise
So long scrum, hello kanban
Ad

Viewers also liked (6)

PDF
Software development as craft
PDF
WRBerkleyBestsReview.PDF
PPTX
Veteran's Awareness Month
PPTX
Latino Heritage Month
PDF
National Autism Awareness Month
PDF
Cultural Holiday Celebration Month
Software development as craft
WRBerkleyBestsReview.PDF
Veteran's Awareness Month
Latino Heritage Month
National Autism Awareness Month
Cultural Holiday Celebration Month
Ad

Similar to Surviving your frontend (WIP - Sneak Peak) (20)

PPTX
Scaling Your Architecture for the Long Term
PDF
Technical Excellence Doesn't Just Happen--Igniting a Craftsmanship Culture
KEY
Continuous Integration, the minimum viable product
PDF
YOW2022-BNE-MinimalViableArchitecture.pdf
PDF
Architecting for Enterprise with JavaScript
KEY
Standardizing and Managing Your Infrastructure - MOSC 2011
PDF
Building Applications with a Graph Database
PDF
It's a wrap - closing keynote for nlOUG Tech Experience 2017 (16th June, The ...
KEY
Turbocharge your automated tests with ci
PDF
Web Development using Ruby on Rails
PPTX
Best Practices for WordPress in Enterprise
PDF
Back2 basics - A Day In The Life Of An Oracle Analytics Query
PDF
Conexão Kinghost - Otimização Prematura
PDF
Choosing Javascript Libraries to Adopt for Development
PDF
From Zero to Hero, how to become a Master of Puppets - Nick Cunningham
PDF
TDC2016SP - Otimização Prematura: a Raíz de Todo o Mal
PDF
Design for Scale / Surge 2010
PPTX
Ten query tuning techniques every SQL Server programmer should know
PDF
Premature optimisation: The Root of All Evil
PDF
DevCommerce Conference 2016: Performance, anti-patterns e stacks pra desenvol...
Scaling Your Architecture for the Long Term
Technical Excellence Doesn't Just Happen--Igniting a Craftsmanship Culture
Continuous Integration, the minimum viable product
YOW2022-BNE-MinimalViableArchitecture.pdf
Architecting for Enterprise with JavaScript
Standardizing and Managing Your Infrastructure - MOSC 2011
Building Applications with a Graph Database
It's a wrap - closing keynote for nlOUG Tech Experience 2017 (16th June, The ...
Turbocharge your automated tests with ci
Web Development using Ruby on Rails
Best Practices for WordPress in Enterprise
Back2 basics - A Day In The Life Of An Oracle Analytics Query
Conexão Kinghost - Otimização Prematura
Choosing Javascript Libraries to Adopt for Development
From Zero to Hero, how to become a Master of Puppets - Nick Cunningham
TDC2016SP - Otimização Prematura: a Raíz de Todo o Mal
Design for Scale / Surge 2010
Ten query tuning techniques every SQL Server programmer should know
Premature optimisation: The Root of All Evil
DevCommerce Conference 2016: Performance, anti-patterns e stacks pra desenvol...

Recently uploaded (20)

PPT
Project quality management in manufacturing
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PDF
composite construction of structures.pdf
PPTX
Geodesy 1.pptx...............................................
PPTX
web development for engineering and engineering
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
Lecture Notes Electrical Wiring System Components
PPTX
Construction Project Organization Group 2.pptx
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Project quality management in manufacturing
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
composite construction of structures.pdf
Geodesy 1.pptx...............................................
web development for engineering and engineering
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Lecture Notes Electrical Wiring System Components
Construction Project Organization Group 2.pptx
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Foundation to blockchain - A guide to Blockchain Tech
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...

Surviving your frontend (WIP - Sneak Peak)

  • 1. WHAT A MILLIONS LOC OF HTML, JS AND PHP TAUGHT ME SURVIVING YOUR FRONT-END
  • 2. WHOIS SEBASTIAN SCHÜRMANN • Coder for about 15 years • All things agile since 2004 • Agile Coaching, some consulting and freelance development • http://dissident-trainings.de
  • 4. I WORK ON THINGS
  • 6. PEOPLE WILL BE LIKE ..
  • 7. „You don't have to be a genius or a visionary or even a college graduate to be successful. You just need a framework and a dream.“ –MICHAEL DELL
  • 8. REALITY IS LIKE … VENN DIAGRAM OF MY WORK WEEK http://cssquirrel.com/
  • 15. • Specifications are very roughly prepared for front-ends • The crafty side of development, modularization and testing is neglected • Standards are not set and/or followed • The fact that a javascript front-end is the client to a server application is often overlooked • Front-end code is often thought as throw away.
  • 16. THE THREE SOLUTION VECTORS CRAFT TOOLS PRACTICES
  • 17. ABRAHAM KAPLAN TOOLS „GIVE A SMALL BOY A HAMMER, AND HE WILL FIND THAT EVERYTHING H E ENCOUNTERS NEEDS POUNDING. “
  • 18. A INCOMPLETE ….. HISTORY OF JS FRAMEWORKS jQuery baconJS XUL prototype AngularJS 2002 2014 mootools rxJS backbone.js
  • 19. I WAS ONCE TOLD JQUERY WAS THE THING ….. IN 2006
  • 20. BUILD IT • Repeating tasks by hand is prone to errors • Build, test and release is complex in 2014 • You want to see the „final“ result • Fast feedback! • Make the build FAST!
  • 21. TEST IT • Always be testing • Using tests is faster than developing in the browser • Setup is often a pain • How many browsers do you support?
  • 22. MODULARIZE I T ! • Single responsibility • Different job, different behavior • Build and test for this component • CI/CD for this component • Assets -> Component
  • 23. SCAFFOLD IT! • You will be creating a lot of modules/components • They should follow a consistent structure • Creating this by hand is error prone and waste of time
  • 24. RECREAT E I T • A front needs a back(-end) • I am not a expert in backends per se • Especially not in your backend • But I needz it for validation!
  • 25. MEASURE IT • Analytics is key • Not only (rendering) speed • Know your KPI’s • Is it still working? • Track errors! • Can you prove it?
  • 26. CONCLUSION TOOLS • Hipster frameworks? Cargo cult? • Learn and use the tools for automation. Create a „monkey task list“ and automate one task a day • It’s 2014, you will be testing, get over it!
  • 27. RICHARD SENNETT, THE CRAFTSMAN CRAFT “CRAFTSMANSHIP NAMES AN ENDURING, BASIC HUMAN IMPULSE, THE DESIRE TO DO A JOB WELL FOR ITS OWN SAKE.”
  • 28. COMPLETENESS THE STORY OF THE LOADING INDICATOR! JIRA #1235 THE LOADING INDICATOR IN THE FRIEND SEARCH IS NOT GOING AWAY
  • 29. COMPLETENESS $.AJAX AND THE FALLACIES OF DISTRIBUTED COMPUTING
  • 30. THE FALLACIES OF DISTRIBUTED COMPUTING • The network is reliable. • Latency is zero. • Bandwidth is infinite. • The network is secure. • Topology doesn't change. • There is one administrator. • Transport cost is zero. • The network is homogeneous.
  • 31. THE FALLACIES OF DISTRIBUTED COMPUTING • The network is reliable. • Latency is zero. • Bandwidth is infinite. • The network is secure. • Topology doesn't change. • There is one administrator. • Transport cost is zero. • The network is homogeneous. 1994
  • 32. COMPLETENESS $.AJAX AND THE FALLACIES OF DISTRIBUTED COMPUTING ERROR? WHICH ERROR TIMEOUT? EXACTLY? 500 404
  • 33. RFC 7231 MOTHERFUCKER 419: AUTHENTICATION TIMEOUT 200 4XX 5XX DID YOU READ IT?
  • 34. JIRA #1235 SOLUTION: ON ERRORCODE 500 GO TO USER HOME (SESSION IS RESTARTED THERE)
  • 35. NIH - NOT INVENTED HERE THE STORY OF THE FORM VALIDATOR JIRA #1236 IMPLEMENT A VALIDATION IN REGISTRATION FORM SO THAT USERS GET FASTER FEEDBACK IF HOME ADDRESS IS OK
  • 36. Not invented here (NIH) is the philosophy of social, corporate, or institutional cultures that avoid using or buying already existing products, research, standards, or knowledge because of their external origins and costs. The reasons for not wanting to use the work of others are varied, but can include fear through lack of understanding, an unwillingness to value the work of others, or forming part of a wider "turf war" –WIKIPEDIA VIA HTTP://WWW.WIKIWAND.COM/EN/ NOT_INVENTED_HERE
  • 37. JIRA #1236 IMPLEMENT A VALIDATION IN REGISTRATION FORM SO THAT USERS GET FASTER FEEDBACK IF HOME ADDRESS IS OK JIRA #1236 COMMENT IMPLEMENT OWN SOLUTION BASED ON REGEX TO VALIDATE FORM
  • 38. DEVELOPMENT TAKES 2 WEEKS ADDING ANOTHE R S T R E E T A/ 1 LIB FOR REGEXP 1 STREET STREET X-BROWSER NO STREET AT ALL I PAD Y U NO BLUR?
  • 39. (?:(?:rn)?[ t])*(?:(?:(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t] )+|Z|(?=[["()<>@,;:".[]]))|"(?:[^"r]|.|(?:(?:rn)?[ t]))*"(?:(?: rn)?[ t])*)(?:.(?:(?:rn)?[ t])*(?:[^()<>@,;:".[] 000-031]+(?:(?:( ?:rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|"(?:[^"r]|.|(?:(?:rn)?[ t]))*"(?:(?:rn)?[ t])*))*@(?:(?:rn)?[ t])*(?:[^()<>@,;:".[] 000-0 31]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|[([^[]r]|.)* ](?:(?:rn)?[ t])*)(?:.(?:(?:rn)?[ t])*(?:[^()<>@,;:".[] 000-031]+ (?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|[([^[]r]|.)*](?: (?:rn)?[ t])*))*|(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z |(?=[["()<>@,;:".[]]))|"(?:[^"r]|.|(?:(?:rn)?[ t]))*"(?:(?:rn) ?[ t])*)*<(?:(?:rn)?[ t])*(?:@(?:[^()<>@,;:".[] 000-031]+(?:(?:(?: rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|[([^[]r]|.)*](?:(?:rn)?[ t])*)(?:.(?:(?:rn)?[ t])*(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn) ?[ t])+|Z|(?=[["()<>@,;:".[]]))|[([^[]r]|.)*](?:(?:rn)?[ t] )*))*(?:,@(?:(?:rn)?[ t])*(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|[([^[]r]|.)*](?:(?:rn)?[ t])* )(?:.(?:(?:rn)?[ t])*(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t] )+|Z|(?=[["()<>@,;:".[]]))|[([^[]r]|.)*](?:(?:rn)?[ t])*))*) *:(?:(?:rn)?[ t])*)?(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+ |Z|(?=[["()<>@,;:".[]]))|"(?:[^"r]|.|(?:(?:rn)?[ t]))*"(?:(?:r n)?[ t])*)(?:.(?:(?:rn)?[ t])*(?:[^()<>@,;:".[] 000-031]+(?:(?:(?: rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|"(?:[^"r]|.|(?:(?:rn)?[ t ]))*"(?:(?:rn)?[ t])*))*@(?:(?:rn)?[ t])*(?:[^()<>@,;:".[] 000-031 ]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|[([^[]r]|.)*]( ?:(?:rn)?[ t])*)(?:.(?:(?:rn)?[ t])*(?:[^()<>@,;:".[] 000-031]+(? :(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|[([^[]r]|.)*](?:(? :rn)?[ t])*))*>(?:(?:rn)?[ t])*)|(?:[^()<>@,;:".[] 000-031]+(?:(? :(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|"(?:[^"r]|.|(?:(?:rn)? [ t]))*"(?:(?:rn)?[ t])*)*:(?:(?:rn)?[ t])*(?:(?:(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|"(?:[^"r]| .|(?:(?:rn)?[ t]))*"(?:(?:rn)?[ t])*)(?:.(?:(?:rn)?[ t])*(?:[^()<> @,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|" (?:[^"r]|.|(?:(?:rn)?[ t]))*"(?:(?:rn)?[ t])*))*@(?:(?:rn)?[ t] )*(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;: RFC 822 E-MAIL ADRESS FORMAT ".[]]))|[([^[]r]|.)*](?:(?:rn)?[ t])*)(?:.(?:(?:rn)?[ t])*(? :[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[ ]]))|[([^[]r]|.)*](?:(?:rn)?[ t])*))*|(?:[^()<>@,;:".[] 000- 031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|"(?:[^"r]|.|( ?:(?:rn)?[ t]))*"(?:(?:rn)?[ t])*)*<(?:(?:rn)?[ t])*(?:@(?:[^()<>@,; :".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|[([ ^[]r]|.)*](?:(?:rn)?[ t])*)(?:.(?:(?:rn)?[ t])*(?:[^()<>@,;:" :".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|[([ ^[]r]|.)*](?:(?:rn)?[ t])*)(?:.(?:(?:rn)?[ t])*(?:[^()<>@,;:" .[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|[([^[ ]r]|.)*](?:(?:rn)?[ t])*))*(?:,@(?:(?:rn)?[ t])*(?:[^()<>@,;:". [] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|[([^[] r]|.)*](?:(?:rn)?[ t])*)(?:.(?:(?:rn)?[ t])*(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|[([^[]r] |.)*](?:(?:rn)?[ t])*))*)*:(?:(?:rn)?[ t])*)?(?:[^()<>@,;:".[] 0 00-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|"(?:[^"r]| .|(?:(?:rn)?[ t]))*"(?:(?:rn)?[ t])*)(?:.(?:(?:rn)?[ t])*(?:[^()<>@, ;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[]]))|"(? :[^"r]|.|(?:(?:rn)?[ t]))*"(?:(?:rn)?[ t])*))*@(?:(?:rn)?[ t])* (?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:". []]))|[([^[]r]|.)*](?:(?:rn)?[ t])*)(?:.(?:(?:rn)?[ t])*(?:[ ^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[] ]))|[([^[]r]|.)*](?:(?:rn)?[ t])*))*>(?:(?:rn)?[ t])*)(?:,s*( ?:(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;: ".[]]))|"(?:[^"r]|.|(?:(?:rn)?[ t]))*"(?:(?:rn)?[ t])*)(?:.(?:( ?:rn)?[ t])*(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[ ["()<>@,;:".[]]))|"(?:[^"r]|.|(?:(?:rn)?[ t]))*"(?:(?:rn)?[ t ])*))*@(?:(?:rn)?[ t])*(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t ])+|Z|(?=[["()<>@,;:".[]]))|[([^[]r]|.)*](?:(?:rn)?[ t])*)(? :.(?:(?:rn)?[ t])*(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+| Z|(?=[["()<>@,;:".[]]))|[([^[]r]|.)*](?:(?:rn)?[ t])*))*|(?: [^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:".[ ]]))|"(?:[^"r]|.|(?:(?:rn)?[ t]))*"(?:(?:rn)?[ t])*)*<(?:(?:rn) ?[ t])*(?:@(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[[" ()<>@,;:".[]]))|[([^[]r]|.)*](?:(?:rn)?[ t])*)(?:.(?:(?:rn) ?[ t])*(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<> @,;:".[]]))|[([^[]r]|.)*](?:(?:rn)?[ t])*))*(?:,@(?:(?:rn)?[ t])*(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@, ;:".[]]))|[([^[]r]|.)*](?:(?:rn)?[ t])*)(?:.(?:(?:rn)?[ t] )*(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;: ".[]]))|[([^[]r]|.)*](?:(?:rn)?[ t])*))*)*:(?:(?:rn)?[ t])*)? (?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[["()<>@,;:". []]))|"(?:[^"r]|.|(?:(?:rn)?[ t]))*"(?:(?:rn)?[ t])*)(?:.(?:(?: rn)?[ t])*(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z|(?=[[ "()<>@,;:".[]]))|"(?:[^"r]|.|(?:(?:rn)?[ t]))*"(?:(?:rn)?[ t]) *))*@(?:(?:rn)?[ t])*(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t]) +|Z|(?=[["()<>@,;:".[]]))|[([^[]r]|.)*](?:(?:rn)?[ t])*)(?: .(?:(?:rn)?[ t])*(?:[^()<>@,;:".[] 000-031]+(?:(?:(?:rn)?[ t])+|Z |(?=[["()<>@,;:".[]]))|[([^[]r]|.)*](?:(?:rn)?[ t])*))*>(?:(
  • 41. A REWRITTEN MODULE • Passes all the same unit tests and then some. • Is a demonstrably better solution to the problem addressed by the original • Makes the developer of the original module go "Ooooo, why didn't I think of that?“ • Has fewer lines. A REINVENTED MODULE • Has different (but maybe fewer) bugs. • Behaves differently (but NOT more correctly) with boundary cases. • Had code that does things differently for stylistic reasons rather than function. • May support some lame excuse to have more lines.
  • 42. QUALITY THE STORY OF THE REWRITE JIRA EPIC #5 REWRITE ADMIN SITE AND APP FOR SHOP OWNERS
  • 44. 2009 - 3 MONTH 1 Developer 60 M/D 2011 - 4 MONTH 4 Developers 320 M/D 2012 - 6 MONTH 6 Developers 720 MD 2014 - 8 MONTH 8 Developers 1280 MD
  • 45. WHY? • Technology changes • We make mistakes • We get better & new ideas • New features (added fast) • Code rot • Hurry? • Wrong specs? • Saving on QA anyone?
  • 46. BOYSCOUT RULE ALWAY S B E REFACTORING
  • 47. BIG BALL OF MUD THE STORY O F T H E 1 2 0 MEGABYTE CHECKOUT DAY 1 AT A CUSTOMER PROJECT
  • 48. „Big ball of mud" systems have usually been developed over a long period of time, with different individuals working on various pieces and parts. Systems developed by people with no formal architecture or programming training often fall into this pattern“ –CITATION NEEDED
  • 49. „Another reason leading to produce this kind of system is when managers put pressure on developers and come with incremental micro requirements instead of providing a clear description of the problem to be solved“ –CITATION NEEDED
  • 50. „Foote and Yoder do not universally condemn "big ball of mud" programming, pointing out that this pattern is most prevalent because it works — at least at the moment it is developed. However, programs of this pattern become maintenance nightmares“ –CITATION NEEDED
  • 51. „Programmers in control of a big ball of mud project are strongly encouraged to study it and to understand what it accomplishes, and to use this as a loose basis for a formal set of requirements for a well-designed system that could replace it. Technology shifts – such as client-server to web-based or file-based to database-based – may provide good reasons to start over from scratch“ –CITATION NEEDED
  • 52. ONE GIT CLONE TO RULE THEM ALL du -hs 172M find . | grep coffee | grep -v node_modules | grep -v lcov-report | grep -v .git | wc -l 96 find . | grep js | grep -v node_modules | grep -v lcov-report | grep -v json | grep -v .git | wc -l 306 files: java, xtend, coffee, js ./aaa/bbb/ccc/ddd/target/classes/js/lib/ myClassName.coffee
  • 53. • Javascript / Coffeescript with close to 0 comments • JS == no namespaces (header.js vs. header.js) • 194 Tests • > 5K Coding style validations • lcov only for js • Setup took a day (from 16 billed) • Fixing „npm test“ another one • JS Tests not in CI • NPM install failed at first
  • 54. DIRTY TRICKS • Use small components that do one job • Decouple the front-end from backend for development • keep the integration/master building • adhere to your fucking standards (or you have none at all) • Integration and deployment is part of development • Let the dev change the build chain as well VS
  • 55. RICHARD SENNETT, THE CRAFTSMAN „… THERE IS TROUBLE CAUSED BY CONFLICTING MEASURES OF QUALITY, ONE BASED ON CORRECTNESS, THE OTHER ON PRACTICAL EXPERIENCE” PRACTICES
  • 56. CULTURE / CRAFT PRACTICES TOOLS CONTINUOUS DELIVERY
  • 57. • On every machine • For every dev • Build and re-build on CI • Invest in CI and CD • Adopt the culture • This is why a Ops person IN a team is so important • checkout, build, code, test, commit, deploy, validate (fast) ONE BUTTON TEST ONE BUTTON BUILD ONE BUTTON DEPLOY
  • 59. COST OF BUG FIXING 100 75 50 25 0 Design Implementation Testing Bugfixing
  • 60. WHY IS BUG FIXING SO EXPENSIVE? • Bugs costs it self • Other work has to be delayed • Many departments in loop 100 75 50 25 • Risk of new bugs 0 Design Implementation Testing Bugfixing
  • 61. THE CHEAPEST QA TOOLS • Flipchart / Whiteboard • Stories / Specs • Specifications derived from examples • QA is part of the whole development process
  • 62. WHERE IS YOUR BLIND SPOT? Testing quadrant - stolen from @lisacrispin
  • 63. YOUR BIGGEST ALLY IN QUALITY THE CFO
  • 64. FROM DESIGN TO DEPLOYMENT RESPONSIBILITY FOR THE WHOLE PROCESS
  • 65. (A EXTREME) DEFINITION OF DONE • When tests pass • When integrated • When deployable build • When deployed • When measurably delivering value http://www.xpdays.de/2014/downloads/002-extreme-continuous-delivery-at-unruly/cd_javaone.pdf
  • 66. FAI L TDD DEPLOYMENT FEEDBACK DE P LOY PAS S R E FACTOR PAS S http://www.xpdays.de/2014/downloads/002-extreme-continuous-delivery-at-unruly/cd_javaone.pdf
  • 67. N-AMIGOS DEV DESIGN PROD OPS QA PART OF AL L PROCESS STEPS
  • 68. WHAT I LEARNED SO FA R ( T ) CONCLUSIONS
  • 69. LEARNING PHASE VS. I GOT IT PHASE DEVELOP YOUR CRAFT. EVERY FUCKING DAY
  • 70. NOT JUST A BUNCH OF SCRIPTS FRONT-END IS FULL BLOWN SOFTWARE ENGINEERING
  • 71. NOT JUST HTML5 + JS FRONT-END IS FULL STACK
  • 72. ITS A TEAM THANG YOU ARE (ALL)RESPONSIBLE FOR THE SUCCESS
  • 73. ITS COOL I T I S A AMAZING THING (OR IT SHOULD BE)
  • 74. AND VICE VERSA TOOLS LEAD TO PROCESSES LEAD TO CULTURE AND CRAFTSMANSHIP
  • 75. The way I did it, every job was A+. –STEVE WOZNIAK
  • 76. THANK YOU FOR LISTENING AND TIME FOR QUESTIONS! Sebastian Schürmann http://dissident-trainings.de