Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Managing Success: We made it, now we're screwed

Managing Success: We made it, now we're screwed

Life as a startup, whether a bootstrapped company or an experimental project within an enterprise, is hard. You have to struggle to earn success. Lean, pivots, minimal viable products, and other buzzwords all steps along this journey. The struggle makes the eventual success that much sweeter. But it can also lead to suboptimal code, confusing logic, and general friction to getting things done.

In this talk I'll discuss ways to identify areas of your Rails app improve and strategies for improving the quality over time. I'll share insights on managing several large Rails applications, the dangers of the single, monolithic, ball of mud Rails app, and what changes make the biggest impact.

blowmage

July 01, 2012
Tweet

More Decks by blowmage

Other Decks in Programming

Transcript

  1. Organizations which design systems are constrained to produce designs which

    are copies of the communication structures of these organizations. - Melvin Conway
  2. class Tag < ActiveRecord::Base belongs_to :article def article_count # Performance

    hack # faster than SELECT COUNT(*) self.articles.select(:id).count end end
  3. <% 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}"] %> <div> ... </div> <% end %>
  4. <% 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) %> <div> ... </div> <% end %>
  5. 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
  6. <% 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 %> <div> ... </div> <% end %>
  7. 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
  8. “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.
  9. ... 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.
  10. ... 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, ...
  11. “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...
  12. 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