tootle returning to rails
TRANSCRIPT
![Page 1: Tootle returning to rails](https://reader030.vdocument.in/reader030/viewer/2022032504/55c44636bb61eb7d1c8b45e4/html5/thumbnails/1.jpg)
![Page 2: Tootle returning to rails](https://reader030.vdocument.in/reader030/viewer/2022032504/55c44636bb61eb7d1c8b45e4/html5/thumbnails/2.jpg)
TOOTLE: RETURNING TO RAILSANDREW GRIMM ROROSYD JUNE 9 2015
![Page 3: Tootle returning to rails](https://reader030.vdocument.in/reader030/viewer/2022032504/55c44636bb61eb7d1c8b45e4/html5/thumbnails/3.jpg)
MY CAREER SO FAR…
![Page 4: Tootle returning to rails](https://reader030.vdocument.in/reader030/viewer/2022032504/55c44636bb61eb7d1c8b45e4/html5/thumbnails/4.jpg)
UNIVERSITY OF SYDNEY
• Bachelor of Science (Bioinformatics) Honours Class I (Biology)
• Final undergraduate year half biology, half computer science
• Honours year involved a bioinformatics project
![Page 5: Tootle returning to rails](https://reader030.vdocument.in/reader030/viewer/2022032504/55c44636bb61eb7d1c8b45e4/html5/thumbnails/5.jpg)
CHILDREN’S HOSPITAL AT WESTMEAD
• Worked on RettBASE, an online database of mutations to MECP2 which causes Rett syndrome
• Biological knowledge important, plus general computing skills, but not much programming
![Page 6: Tootle returning to rails](https://reader030.vdocument.in/reader030/viewer/2022032504/55c44636bb61eb7d1c8b45e4/html5/thumbnails/6.jpg)
MARINE BIOLOGICAL LABORATORY
• Work related to the Encyclopedia of Life, a website aiming to have a series of pages for each species known to science
• ~ 6 months PHP, 6 months Ruby on Rails
![Page 7: Tootle returning to rails](https://reader030.vdocument.in/reader030/viewer/2022032504/55c44636bb61eb7d1c8b45e4/html5/thumbnails/7.jpg)
UNSW AUSTRALIA
• Analysis of mutation in HIV
• Used Ruby (without Rails)
![Page 8: Tootle returning to rails](https://reader030.vdocument.in/reader030/viewer/2022032504/55c44636bb61eb7d1c8b45e4/html5/thumbnails/8.jpg)
CURRENT POSITION
• Back-end Rails developer at a large product company
![Page 9: Tootle returning to rails](https://reader030.vdocument.in/reader030/viewer/2022032504/55c44636bb61eb7d1c8b45e4/html5/thumbnails/9.jpg)
CHANGES FROM PREVIOUS TO CURRENT JOB
• Solo development => Group development
• Research => commercial environment
• Ruby => Rails
![Page 10: Tootle returning to rails](https://reader030.vdocument.in/reader030/viewer/2022032504/55c44636bb61eb7d1c8b45e4/html5/thumbnails/10.jpg)
PULL REQUESTS
• Have to get two approvals for each pull request
• Advantage: Source of feedback
• Disadvantage: More work when you thought you’d finished
![Page 11: Tootle returning to rails](https://reader030.vdocument.in/reader030/viewer/2022032504/55c44636bb61eb7d1c8b45e4/html5/thumbnails/11.jpg)
PACE OF WORK
• Previous job involved weekly or twice-weekly meetings
• Now daily standups and JIRA tickets
![Page 12: Tootle returning to rails](https://reader030.vdocument.in/reader030/viewer/2022032504/55c44636bb61eb7d1c8b45e4/html5/thumbnails/12.jpg)
RUBY TO RAILS
• Bit more magical
![Page 13: Tootle returning to rails](https://reader030.vdocument.in/reader030/viewer/2022032504/55c44636bb61eb7d1c8b45e4/html5/thumbnails/13.jpg)
TESTING
• In previous job used test/unit, real objects, and tested actual results
• Now use RSpec, factory girl. Techniques include mocking, and testing that one class is calling the correct methods on other classes and objects.
![Page 14: Tootle returning to rails](https://reader030.vdocument.in/reader030/viewer/2022032504/55c44636bb61eb7d1c8b45e4/html5/thumbnails/14.jpg)
COMPARISON OF TESTING TECHNIQUES: SCENARIO
• A product has a delivery postcode, which must be four digits, and must be to a location we deliver to
• ‘Sydney’ is not valid, because it isn’t 4 digits
• ‘0800’ is not valid, because we don’t deliver there
• ‘2000’ is valid, because we deliver there
![Page 15: Tootle returning to rails](https://reader030.vdocument.in/reader030/viewer/2022032504/55c44636bb61eb7d1c8b45e4/html5/thumbnails/15.jpg)
TESTING TECHNIQUES: REAL OBJECTS
• Is a product with postcode ‘Sydney’ invalid?
• Is a product with postcode ‘0800’ invalid?
• Is a product with postcode ‘2000’ valid?
![Page 16: Tootle returning to rails](https://reader030.vdocument.in/reader030/viewer/2022032504/55c44636bb61eb7d1c8b45e4/html5/thumbnails/16.jpg)
TESTING TECHNIQUES: MOCKING
• Testing that Product successfully uses postcode format validation
• The format validator says that the postcode does not contain 4 digits. Is the postcode valid?
• The format validator says that the postcode does contain 4 digits. Is the postcode valid?
![Page 17: Tootle returning to rails](https://reader030.vdocument.in/reader030/viewer/2022032504/55c44636bb61eb7d1c8b45e4/html5/thumbnails/17.jpg)
WHY THE DIFFERENCE?
• Can’t do dependency injection
• Have to intercept calls to objects or classes
![Page 18: Tootle returning to rails](https://reader030.vdocument.in/reader030/viewer/2022032504/55c44636bb61eb7d1c8b45e4/html5/thumbnails/18.jpg)
INHERITANCE
• Delegation (as opposed to inheritance):
• spreadsheet = Library::Spreadsheet.new
• spreadsheet.serialize(@spreadsheet_filename)
• Inheritance
• class MutationSpreadsheet < Library::Spreadsheet
• end
![Page 19: Tootle returning to rails](https://reader030.vdocument.in/reader030/viewer/2022032504/55c44636bb61eb7d1c8b45e4/html5/thumbnails/19.jpg)
MAGIC
• Ruby-only style:
• length_validator = LengthValidator.new(dna)
• length_validator.valid?
• Rails style:
• validates :dna, length: true