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

Five Resolutions for the New Year

Five Resolutions for the New Year

Five things Gazelle can improve on this year.

Avatar for Allen Madsen

Allen Madsen

January 25, 2013

Other Decks in Programming

Transcript

  1. Eliminate legacy code •Think about how it should work •

    Design with change in mind • Don't build more than what is needed
  2. Five Resolutions for the new year Five things that I

    think engineering could get better at, that would allow us to be more efficient Some of this will be more ruby slanted since that's most of what I do
  3. 1

  4. Spread ideas • This is the first instance of this

    in practice • DevTalks will be every other week on fridays starting at 1 • These are for everyone
  5. Spread ideas •Propose an idea • There are plenty of

    dev concerns that will never be a requirement from an outside business person • This can be a platform for that • It also allows feedback to allow refinements
  6. Spread ideas •Propose an idea •Share a new technology •

    There is a knowledge gap • Ask someone to share something you don't know
  7. Spread ideas •Propose an idea •Share a new technology •Teach

    a concept • Shared vocabulary • Spread understanding of how to built maintainable software
  8. 2

  9. Aggressively upgrade •Security •New features and tools •Availability of documentation

    •Performance • What if there were one thing you could do, that would give you performance gains across your whole application?
  10. 3

  11. Make deployment easy •Divorce environments from branches • It's dumb

    that I need to merge my code into backstage to deploy to the backstage environment • I should be able to deploy any branch into the backstage environment
  12. Make deployment easy •Divorce environments from branches •Automate everything •

    We have per app automation • We need environment automation • I should be able to create as many backstage environments as I want • Version bumping too
  13. Make deployment easy •Divorce environments from branches •Automate everything •Anyone

    can deploy • With the other two, this becomes easy • Having one expert in something is a bottleneck
  14. 4

  15. Curate tests • Our tests aren't doing their job •

    They run too slow, so they get pushed off till later • Our feedback loop is too long, so issues go unnoticed for far longer • The later in the cycle you catch an issue, the more costly it is to fix
  16. Curate tests •Write fast unit tests • These tests are

    for ensuring that you are writing now is working • They need to be fast (<5 seconds) • They should be unit tests (don't talk to the database or external systems) • Mock dependencies (More about this in another talk) • Unit tests inform on complexity of code. If it is hard to write tests for, it will probably be hard to maintain
  17. Curate tests •Write fast unit tests •Defend against brittleness •

    Validate assumptions of code by explicitly stating them in the test • Time is an indeterminate function as far as you're concerned • Never use factory defaults for a field your code explicitly uses
  18. Curate tests •Write fast unit tests •Defend against brittleness •Automate

    acceptance testing • We currently automate G3 • We have plenty of other systems that are 100% manual QA • Acceptance tests will catch the things unit tests and component tests don't • They ensure that the businesses goals are being met
  19. 5

  20. Eliminate legacy code • What's make code legacy code? •

    The common answer is age, but I disagree • I think legacy code is any code that doesn't adequately reflect the goals of the business • Nobody wants to be a maintainer of legacy code
  21. Eliminate legacy code •Think about how it should work •

    Often stuck in the mindset of “How can I get this cat to do a new trick?” • A better question is often “What kind of pet do I need to do this trick?”
  22. Eliminate legacy code •Think about how it should work •Design

    with change in mind • Designing code that can't change easily means that when change is required, you become a maintainer of legacy code • Designing code that can change, allows the system to evolve with the business
  23. Eliminate legacy code •Think about how it should work •Design

    with change in mind •Don't build more than what is needed • Code should be written to solve a problem • Building something that will never be needed or used is instantly legacy code • It also adds a burden, because it's hard to tell if code is used once it's in place. Which means people will be maintaining something that's never used. • It adds complexity that may never be necessary, such that someone must understand it • These apply to things done for performance as well