Slide 1

Slide 1 text

Managing Success We made it, now we're screwed

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

You == Pain

Slide 7

Slide 7 text

(NIH) Not Invented Here

Slide 8

Slide 8 text

Why?

Slide 9

Slide 9 text

Conway's Law

Slide 10

Slide 10 text

Organizations which design systems are constrained to produce designs which are copies of the communication structures of these organizations. - Melvin Conway

Slide 11

Slide 11 text

"Ruby is designed to make programmers happy." - Matz

Slide 12

Slide 12 text

#1 Problem?

Slide 13

Slide 13 text

Monolithic

Slide 14

Slide 14 text

Models

Slide 15

Slide 15 text

Testing

Slide 16

Slide 16 text

TDD != QA

Slide 17

Slide 17 text

Pain

Slide 18

Slide 18 text

Pain

Slide 19

Slide 19 text

Pain

Slide 20

Slide 20 text

Cost Time Cost per change (bugs, new features, etc) Non-TDD TDD

Slide 21

Slide 21 text

Models Controllers/Routes Views/Helpers Application In Browser Cost per test

Slide 22

Slide 22 text

Models Controllers/Routes Views/Helpers Application In Browser ROI per test

Slide 23

Slide 23 text

Monolithic Models

Slide 24

Slide 24 text

2 Rules

Slide 25

Slide 25 text

1) Delarative

Slide 26

Slide 26 text

2) Level of Abstraction

Slide 27

Slide 27 text

    <% @article.tags.each do |tag| -%>
  • <%= link_to "#{tag.name} (#{tag.articles.length})", tag_path(tag) %>
  • <% end %>

Slide 28

Slide 28 text

    <% @article.tags.each do |tag| -%>
  • <%= link_to "#{tag.name} (#{tag.article_count})", tag_path(tag) %>
  • <% end %>

Slide 29

Slide 29 text

    <% @article.tags.each do |tag| -%>
  • <%= link_to "#{tag.name} (#{tag.article_count})", tag_path(tag) %>
  • <% end %>

Slide 30

Slide 30 text

class Tag < ActiveRecord::Base belongs_to :article def article_count self.articles.count end end

Slide 31

Slide 31 text

class Tag < ActiveRecord::Base belongs_to :article def article_count # Performance hack # faster than SELECT COUNT(*) self.articles.select(:id).count end end

Slide 32

Slide 32 text

Monolithic Views

Slide 33

Slide 33 text

<% if @course.available? && @course.self_enrollment && @course.open_enrollment && (!@course_enrollment || !@course_enrollment.active?) && !session["role_course_#{@course.id}"] %> <%= render :partial => "join_course", :object => @course %> <% elsif @course_enrollment && @course_enrollment.self_enrolled && @course_enrollment.active? && (!session["role_course_#{@course.id}"]) %> <%= render :partial => "drop_course", :locals => { :course => @course, :enrollment => @course_enrollment } %> <% elsif temp_type = session["role_course_#{@course.id}"] %>
...
<% end %>

Slide 34

Slide 34 text

Helpers

Slide 35

Slide 35 text

<% if can_join_course?(@course, @enrollment) %> <%= render :partial => "join_course", :object => @course %> <% elsif can_drop_course?(@course, @enrollment) %> <%= render :partial => "drop_course", :locals => { :course => @course, :enrollment => @course_enrollment } %> <% elsif temp_type = temp_permissions_to(@course) %>
...
<% end %>

Slide 36

Slide 36 text

Presenters

Slide 37

Slide 37 text

module CourseHelper def can_join_course? course, enrollment course.available? && course.self_enrollment && course.open_enrollment && (!enrollment || !enrollment.active?) && !temp_permissions_to(course) end def can_drop_course? course, enrollment enrollment && enrollment.self_enrolled && enrollment.active? && !temp_permissions_to(course) end def temp_permissions_to course session["role_course_#{course.id}"] end end

Slide 38

Slide 38 text

<% if @presenter.can_join_course? %> <%= render :partial => "join_course", :object => @presenter.course %> <% elsif @presenter.can_drop_course? %> <%= render :partial => "drop_course", :locals => { :course => @presenter.course, :enrollment => @presenter.enrollment } %> <% elsif @presenter.temp_permissions %>
...
<% end %>

Slide 39

Slide 39 text

class CourseShowPresenter # this is a ViewModel, really attr_accessor :course, :enrollment, :current_user, :session def can_join_course? @course.available? && @course.self_enrollment && @course.open_enrollment && (!@enrollment || [email protected]?) && !temp_permissions end def can_drop_course? @enrollment && @enrollment.self_enrolled && @enrollment.active? && !temp_permissions end def temp_permissions @session["role_course_#{@course.id}"] end end

Slide 40

Slide 40 text

1) Delarative

Slide 41

Slide 41 text

2) Level of Abstraction

Slide 42

Slide 42 text

Monolithic Apps

Slide 43

Slide 43 text

Monolithic Apps

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

What is code?

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

“Underlying our approach to this subject is our conviction that “computer science” is not a science and that its significance has little to do with computers. ... The computer revolution is a revolution in the way we think and in the way we express what we think.

Slide 48

Slide 48 text

... we want to establish the idea that a computer language is not just a way of getting a computer to perform operations but rather that it is a novel formal medium for expressing ideas about methodology. Thus, programs must be written for people to read, and only incidentally for machines to execute.

Slide 49

Slide 49 text

... we believe that the essential material to be addressed by a subject at this level is not the syntax of particular programming-language constructs, nor clever algorithms for computing particular functions efficiently, nor even the mathematical analysis of algorithms and the foundations of computing, ...

Slide 50

Slide 50 text

but rather the techniques used to control the intellectual complexity of large software systems.”

Slide 51

Slide 51 text

but rather the techniques used to control the intellectual complexity of large software systems.”

Slide 52

Slide 52 text

Intellectual Complexity

Slide 53

Slide 53 text

Human Activity

Slide 54

Slide 54 text

No content

Slide 55

Slide 55 text

No content

Slide 56

Slide 56 text

“Often people, especially computer engineers, focus on the machines. They think, “By doing this, the machine will run faster. By doing this, the machine will run more effectively. By doing this, the machine will something something something.” They are focusing on machines...

Slide 57

Slide 57 text

But in fact we need to focus on humans, on how humans care about doing programming or operating the application of the machines. We are the masters. They are the slaves.” -Matz

Slide 58

Slide 58 text

The 80%?

Slide 59

Slide 59 text

No content

Slide 60

Slide 60 text

No content

Slide 61

Slide 61 text

No content

Slide 62

Slide 62 text

Thank you!

Slide 63

Slide 63 text

No content

Slide 64

Slide 64 text

HIRE ME!!!

Slide 65

Slide 65 text

HIRE ME!!! humanecode.com

Slide 66

Slide 66 text

HIRE ME!!! humanecode.com Questions?