Skip to content

Instantly share code, notes, and snippets.

@Andy-Bell
Created July 27, 2016 12:42
Show Gist options
  • Save Andy-Bell/3ad777b64eea958ee48f32d562f6a745 to your computer and use it in GitHub Desktop.
Save Andy-Bell/3ad777b64eea958ee48f32d562f6a745 to your computer and use it in GitHub Desktop.
@samphippen
Core maintainer of RSpec
Senior software engineer at DO
I am open to being derailed
includes coaches
I presume most of you are here because you want a job, not for giggles
How do we get better as software engineers?
What does better actually mean
Think about context in where we work
its true generally that most businesses do not succeed on softwware alone
IT is a cost site for all business
software engineers are expensive
We like to reason in an ivory tower as to what good code is
Creating business value is the most important
changing software
creating change in software
if you work for a small startup, you will have different changes than if you worked for google
software engineering principles guide us in reducing cost of change
a lot of them are focused on the very long term
very useful if it is going to live forever, not so much if it lives for 18 months
what principles of software engineering
SRP
TDD
what does it mean in a larger context
"red green refactor"
"it doesnt exist"
NOone has a consistent definition of it
every developer defines it differently
academic TDD is a good thing - it is good that it iis taught
TDD made Sam feel like an imposter
Just did not work when applied
RSpec maintainers get upset by TDD
the refactor step does not tell you what to refactor
TDD doesnt tell you when to move up or down in abstraction
It is used by some to call others "unprofessional"
if you follow it to the letter every time you will write expensive and unnescessary tests
It misses the point at times
TDD can make your code better
TDD can make your code worse
It is ok to struggle at TDD
It is not an absolute truth
It is useful in times
What is TDD for?
it is a process to help you ensure your tests are useful
Red/green forces you to see a test both pass and fail
an empty test passes
This is vital
You can do them out of order
or skip them entirely
refactor forces you to consider whether a particular axis of change is easy to make
Sam's flow is like Refactor, green, red
refactor system, add working code, break code
refactoring before implementing your change is often necessary
you refactor until it is easy to make your change
refactoring after a change can be impossible
as it is trying to predict the future
results in code that has high cost/never used
underlying reasons are good, following prescriptive practice can be harmful
understanding why we do each step is vital
understanding when we skip each step
Not saying "Don't stop doing testing"
Dont stop doing TDD now
DRY
"dont repeat yourself"
actual definition
every piece of knowledge must have single unambiguous authoritative representation wihtin a system
provides accessible guad rails
but it is not perfect
Prefer duplication over the wrong abstraction
trying to reduce duplication via increasing complexity causes issues
Abstraction is the key underlying idea
providing generalisms to your code
small units
methods 5 lines
classes 30 lines
Not a bad thing
religious dherence is
A much bigger idea
THere are no universally true principles in software engineering
there is nothing that isnt a tradeoff
there is no best way to write code
the constraints and concepts will define the "best" ideas
Use what you know to guide you
listen, read, watch
people arent smarter than you
Biggest idea
Learning by maximum contradiction
being comfortable is the fastest way to stop learning
comfort will kill your learning process
That is how you win at being a software engineer
RubyConf 2016
Submit a talk to that track :)
Questions:
Learn one lang or many?
Learning is diff for everyone
technologies have a lifespan
RoR is a really good choice
popular enough early on so it has now become stable
never going away
Do what interests you
talk about internal app?
Was built as fast as a rails app could ever been built
Very high technical debt rails app
replace with a 3rd party solution
sunset plan is to build integrations into the 3rd party app
Junior developer interviews
PRactical answer
I dont know
I dont know what they interview for
Implement a LL in java in 30 mins is impossible
Interviews are broken
work with instr on int prep
Intellectual answer
gives a set of tools to reason about the systems I work on
for this feature I was thinking of doing this
if we use this datastructure we can work it out
this is universal
consume those things as they are interesting to you
learning guided by interests is very useful
"What is processor" video
mentioned how different techs come and go
watch the internet
follow people on twitter
NEVER GO HN
read stuff on reddit
Redmonk language rankings
Node happened
OMG JS IS JESUS
Ruby is never going to die
Rust is cool
Were I in your position would I start at a small comp or a large comp?
Tricky q
not normal entry path
what level of risk are you willing to accept for your first job?
hate doing job searches?
dont work for a comp that could disappear in next few months
but likely to be interesting
Driving a car that is falling apart and trying to rebuild it
It is nice to have things
Is time or money your more important asset?
If you getting ill represents a 33% cut to efficiency for department are you willing to accept?
Find someone who you can learn from
small companies sometimes cannot provide mentoring time
Large comp usually have clear progression learning
What is looked for In JD int
it is more looking for learning potential than knowledge
most JD interviews are nonsense
if you hit an interview where they ask nonsense cs, think data structures
I am sorry
its all awful
the way you code is morphed by the environment
core of what he does is OOD and testing processes
a lot of the code bases are v high Techdebt rails apps
Move fast, break things comp
do not bring same levels of disc as he did at previous workplaces
be sligghtly sloppier to ship more now
understand ramifications of this
may have issues in future to make changes
A lot of systems are being turned into microservices
had to learn principles of building distributed systems so they dont chain fail
A new lens to look at ruby with
Journey to RSpec core team
Was extremely bored on holiday with parents
found a bug in RSpec
realised it was really messy
kept sending refactoring pull requests
at #17/18 was just made at core team
annoyed people on net with code until they let him just commit
maintaining RSpec is one of the most interesting things they do
disturbingly aware on how mortally dependent eveyones rails is on RSpec
interesting to wake up to 160 emails about a simgle issue
How much time do you spend on rspec and does it
evenings and weekends
Rails 5 released recently
80-100 hours making rspec compatible with Rails 5
several issues reported after
DO sponser a lot of OSS time
Technical debt in rails
user.rb and the thing your app does
shopify has a user.rb that is 4500 lines of code
shop.rb is about 7000
spotify has 47 module includes in it
Beware making large things
Follow Sandi Metz's guidelines - make small things
Prefer using a less powerful construct over a more powerful one
vastly reduces number of behaviors that can be added
Active Record Callbacks
deeply weird metaprogramming
dont use
Reading list - take all with a grain of salt
eveything by Katrina Owen/Sandi Metz/Sarah Mei
MOst of Justin Searls/Noel
Everything Kent Beck has written said is interesting
SAM PHIPPEN IS JUSTIN SEARLS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment