Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Hipster Tech, Cargo Culting, and you being of n...
Search
Sebastian von Conrad
December 13, 2015
Programming
1
130
Hipster Tech, Cargo Culting, and you being of no use (to me)
I gave this talk at Railscamp 18 in Canberra, 11th–14th of December 2015.
Sebastian von Conrad
December 13, 2015
Tweet
Share
More Decks by Sebastian von Conrad
See All by Sebastian von Conrad
The Influential Architect
vonconrad
0
73
An In-Depth Look at Event Sourcing with CQRS
vonconrad
2
870
Handwaving about Dependencies
vonconrad
0
230
Event Sourcing, or Why ActiveRecord Must Die
vonconrad
8
2k
Reporting and the First Law of Holes
vonconrad
2
280
Other Decks in Programming
See All in Programming
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
660
Googleのテストサイズを活用したテスト環境の構築
toms74209200
0
280
Go言語でターミナルフレンドリーなAIコマンド、afaを作った/fukuokago20_afa
monochromegane
2
140
CPython 인터프리터 구조 파헤치기 - PyCon Korea 24
kennethanceyer
0
250
Server Driven Compose With Firebase
skydoves
0
420
VR HMDとしてのVision Pro+ゲーム開発について
yasei_no_otoko
0
110
弊社の「意識チョット低いアーキテクチャ」10選
texmeijin
5
23k
CSC509 Lecture 08
javiergs
PRO
0
110
AWS IaCの注目アップデート 2024年10月版
konokenj
3
3.2k
僕がつくった48個のWebサービス達
yusukebe
18
17k
EventSourcingの理想と現実
wenas
6
2.1k
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
8
460
Featured
See All Featured
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
228
52k
Documentation Writing (for coders)
carmenintech
65
4.4k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Speed Design
sergeychernyshev
24
580
Visualization
eitanlees
145
15k
Happy Clients
brianwarren
97
6.7k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
231
17k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
664
120k
Transcript
Hipster Tech, Cargo Culting, and you being of no use
(to me).
Sebastian von Conrad @vonconrad
None
None
None
None
None
Cargo
Cult
cult |kʌlt| noun a religion or sect considered to be
false, unorthodox, or extremist, with members often living outside of conventional society under the direction of a charismatic leader.
cult |kʌlt| noun a religion or sect considered to be
false, unorthodox, or extremist, with members often living outside of conventional society under the direction of a charismatic leader.
cult |kʌlt| noun a religion or sect considered to be
false, unorthodox, or extremist, with members often living outside of conventional society under the direction of a charismatic leader.
under the direction of a charismatic leader
None
Rails is the best and worst thing that happened to
Ruby.
Let me explain...
Rails propelled the popularity of Ruby...
...but Rails itself was too popular.
We all want to build web apps quickly.
And Rails seemed like a good way to build web
apps quickly.
Build web apps quickly Cargo
Cult Rails
But while Rails allows rapid development, what about maintainability?
History has proven this to be (generally) false.
RubyConf AU 2015 (aka SOA Conf)
People who have worked with 5+ years Rails apps have
seen some shit.
Maintainable web apps Cargo
Cult? Service-Oriented Architecture
(I happen to agree with them but that’s not the
point.)
So, should we just stop using Rails?
It’s not quite that simple.
I would still use Rails.
Mostly because I have no choice.
It’s (close to) impossible to find Ruby devs who don’t
do Rails.
In many cases, Rails is all of the Ruby developers
know.
Rails’ toolset has become the toolset of Ruby developers.
This talk is actually all about Tools.
(Sorry for the link bait.)
(#sorrynotsorry)
Context.
In preparing this talk, 3 things collided in my head.
1.
I got a new job.
None
Architecture Grand Master High Guild Wizard Poobah* * or some
combination thereof.
Envato has 75 devs.
My job is improving: - Software architecture - Software modeling
- Software design
Rails’ tools. MVC.
ActiveRecord Must die.
ActionView Too weak an interface.
ActionController Roda is (already) better.
ActionMailer Use literally anything else.
ActiveSupport Monkey-patches everything.
Turbolinks Abomination.
Concerns Congratulations! You just made it easier to violate SRP.
Asset Pipeline “Terrible.” - Tim Lucas
Model, View, Controller. Ranges from to .
Envato has 75 Rails devs.
None
Actually, that’s not quite right.
We have a bit of everything in production.
Rails, non-Rails Ruby, Node.js, Elixir, Go, MySQL, PostgreSQL, MongoDB, Redis,
Memcache, ElasticSearch, Sphinx.
I cannot control this language proliferation. Nor do I intend
to try.
Still, my job is improving: - Software architecture - Software
modeling - Software design
How do software developers get better?
Be a better software developer Cargo
2.
I talked to someone who wouldn’t apply for a job.
Why? No Ruby experience.
Lots of solid OO experience.
Do I actually care? No.
Rails is a hammer.
If the person has other tools, they are still very
valuable.
In fact, not knowing Rails can be a benefit.
Diversity of experiences and opinions lead to better outcomes.
Be a better software developer Cargo
Cult Mastery of a single language and/or framework
3.
None
None
None
None
None
I fundamentally disagree. (But I wasn’t looking for a shitfight.)
is neither: new, nor shiny, nor hipster. New Shiny Hipster
Technology
It might seem that way, but most are reinventions of
the wheel.
Examples!
Node.js
NoSQL
React
Elixir/Go/Swift
(Our Rails “hacks” aren’t new either.)
But perhaps more importantly…
Elixir is a hammer.
Go is a hammer.
None
React is a… ?
None
Seriously, though, who would have thought it would be the
JS community who would get excited about immutability?
But I digress…
Be a better software developer Cargo
Cult Learn new languages and/or frameworks
Now, this feels like a catch-22.
Be a better software developer Cargo
Cult Mastery of a single language and/or framework
Cult Learn new languages and/or frameworks
The thing with languages…
…it’s hard to use more than one at a time.
Elixir won’t do you much good if I need to
drop you into a Rails monolith.
Kind of like hammers. They might be somewhat different, but
you typically only need one.
If all you have is hammers in your tool belt,
then you are of no use to me.
Diversify your toolset.
No tool, no matter how great, is right for every
occasion.
Accumulate more, and learn when to apply each one.
None
Learn patterns that translate.
Patterns are language agnostic and can be applied in different
situations with different tech.
Languages/frameworks can be be a way to learn patterns.
But you don’t have to.
Learn new languages and frameworks because of the patterns they
employ. (Not because they’re the New Shiny.)
Be explicit about what those patterns are.
If you can't extrapolate the pattern(s), it's not a useful
tool.
Because you can’t use it independently to the language/ framework
you learnt it from.
(Now, I have a list.)
Rather than New Shiny Hipster Tech, I want you to
learn about: I’ll tweet out a link to all of them later.
OLID
(SOLID without the S.)
(Not that S isn’t important.)
OLID: Open/closed principle.
Poor fella is very misunderstood.
Can’t modify existing code, only extend it.
Code that doesn’t have to be changed every time our
requirements change.
OLID: Liskov substitution principle.
OLID: Interface segregation.
Small, isolated interfaces.
High cohesion/low coupling.
(Law of Demeter.)
(Postel’s Law.)
OLID: Dependency inversion.
Depend on things that are of the same, or higher
level, of abstraction.
Inversion != Injection.
Dependency injection is about how to acquire dependencies.
Dependency inversion is about what should depend on what.
(By all means, learn about Dependency Injection as well.)
Separation of Concerns.
Not the same as ActiveSupport::Concern.
Modularity via encapsulation.
Interface design.
Event sourcing.
Don’t store current state of an object. Store events that
have happened to it.
Derive an object’s current state by replaying its events.
(I’m talking about this at RubyConf.)
CQS. CQRS.
Command Query (Responsiblity) Segregation.
CQS: A method can either mutate state or return state.
Never both.
CQRS: A class can either mutate state or return state.
Never both.
Immutable data structures.
Gateway to concurrency.
Now, immutable data structures in the application layer is nice
and all…
…but not as awesome as an immutable, append-only persistence layer.
(You can do this with any database, don’t have to
hipster around with Datomic.)
Functional vs. Object-oriented.
Only exception that I’ll make.
But you don’t actually have to learn a new language
to do functional programming.
Functional Ruby. It’s a thing.
Service-Oriented Architecture.
Ewww, Microservices.
Not always, but sometimes. Form your own opinion.
Asynchronous communication by default.
Pseudo-synchronous.
Message-oriented middleware (message buses).
Idempotent operations.
Exactly once. At most once or At least once.
Do stuff with data.
Data warehousing. Star schemas.
MapReduce.
And, you know, the actual “patterns.”
Read the “Gang of Four” book. (I know it’s old.)
Reactor pattern.
Strategy pattern.
Memento pattern.
Factory pattern.
Adapter pattern.
Observer pattern.
At this point I’m just throwing words at you.
My point is: all of these are language agnostic.
They can be just as fun and interesting as the
New Shiny Hipster Tech.
And they’re more useful.
Learning and understanding these will allow you to consider more
than one solution to a problem.
If you can only think of one way to solve
a problem, the only way you can succeed is by luck.
Luck is not a strategy.
If you have options, you increase your chance of success.
Be a better software developer Cargo
(Probably) Cult Evolve language/framework agnostic skills.
Languages, frameworks, and all the shiny hipster tech will come
and go.
Wouldn’t you rather bet on adding more generic software development
tools?
I would, and I am.
Thank you. Questions? Please follow me on the Twitter: @vonconrad