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

Elder Studios Guest Lecture

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.

Elder Studios Guest Lecture

Guest lecture slides on a tour of multiple universities

Avatar for Chris Gillespie

Chris Gillespie

February 18, 2015
Tweet

Other Decks in Education

Transcript

  1. about us … Follow us on twitter @ElderStudiosLtd We: 

    Build Software systems for clients.  Use Open Source Technologies.  Adopt Agile methods and tools.  Have free pizza for Tuesday lunch. Elder Studios The Media Centre 7 Northumberland Street Huddersfield Yorkshire HD1 1RL T: 01484 483042 E: [email protected] W: www.elder-studios.co.uk F: elderstudiosltd T: @ElderStudiosLtd L: elder-studios-ltd
  2. the scale of the thing … Follow us on twitter

    @ElderStudiosLtd One of our client's system:  1.2 million lines of code.  14 Application Servers.  1 Live Database Server (1 Replicated Server).  Ubuntu / Perl / JavaScript / HTML / CSS.  MySQL Database: 1000 tables, 0.5 terabytes.  3+ terabytes of other files (in ~30m files).
  3. a development problem … Follow us on twitter @ElderStudiosLtd In

    our world:  We develop, then we deploy.  So our development platform must match the live platform …  … but this can be kind of hard to test. And moreover:  Some of our developers prefer Mac …  … some prefer Linux.
  4. Follow us on twitter @ElderStudiosLtd A solution – Virtual Machines:

     Use a VM for development … if you break it, so what?  Install, tinker, play, tweak, all safely.  Run a Linux VM on your Windows lappy. $ vagrant init hashicorp/precise32 $ vagrant up https://www.vagrantup.com/ http://www.vagrantbox.es/ $ vagrant init hashicorp/precise32 $ vagrant up
  5. a problem of success … Follow us on twitter @ElderStudiosLtd

    Success implies expansion:  In our world, this implies more servers.  So you build and install a new server …  … but how to ensure it matches the existing servers?  Sure, you could login to each one …  … but there must be a better way.  “Infrastructure as Code”
  6. Follow us on twitter @ElderStudiosLtd A solution – Puppet: 

    Manage config of multiple servers from one master server.  A “Puppet Manifest” on the master server describes, in code, how a system is configured.  Servers “phone home” periodically to see if any changes have been made.  If so, the required updates are made. http://puppetlabs.com/
  7. a problem of scale … Follow us on twitter @ElderStudiosLtd

    A “real” system has a large code base, so:  Multiple developers will work on the same code base.  Issues may be being addressed in many parts of the code base at the same time.  Developers often do not occupy the same time and space.  Bugs can remain hidden for some time.  Some sort of control is essential.
  8. Follow us on twitter @ElderStudiosLtd A solution – git: 

    A central store keeps all source code.  Developers “check out” code …  … work on it …  … and “check in” amended code for review.  “Branches” allow experimentation without affecting the live code. http://git­scm.com/
  9. a further problem of scale … Follow us on twitter

    @ElderStudiosLtd With our multiple developers:  How do we ensure quality in the code?  (and what does “quality” mean, anyway?  How do we enforce standards?  How do we stop bugs entering the main system?  How do we test the code?  What about comments?
  10. code quality … Follow us on twitter @ElderStudiosLtd Code Linters:

     Identify easy-to-miss mistakes. ➔ Missing semi-colons. ➔ Unnecessary brackets.  Validate code against coding standards: ➔ Identifiers. ➔ Layout. ➔ PSR for PHP. ➔ PEP 8 for Python.
  11. the problem of comments ... Follow us on twitter @ElderStudiosLtd

    attempt = 1; # Assign 1 to variable attempt. # Drunk. Fix later. stop (); # Hammertime! # When I wrote this only God and I knew what # I was doing. # Now only God knows.
  12. let the code do the talking … Follow us on

    twitter @ElderStudiosLtd In the real world:  Many developers work on a code base.  The code forms the common language.  Comments can give a false impression.  What if code and comments do not match? def have_stock (stock_item): '''Always returns True.''' return False
  13. there is more … Follow us on twitter @ElderStudiosLtd These

    are also cool, and (mostly) free:  Phabricator http://phabricator.org/  Sublime Text: http://www.sublimetext.com/  Meld: http://meldmerge.org/