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
880
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
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
230
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
8
2.2k
役立つログに取り組もう
irof
28
9.6k
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
880
Why Jakarta EE Matters to Spring - and Vice Versa
ivargrimstad
0
1.1k
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
2
1.1k
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
120
Laravel や Symfony で手っ取り早く OpenAPI のドキュメントを作成する
azuki
1
110
イベント駆動で成長して委員会
happymana
1
320
リアーキテクチャxDDD 1年間の取り組みと進化
hsawaji
1
220
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
1
290
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
Why Our Code Smells
bkeepers
PRO
334
57k
Designing Experiences People Love
moore
138
23k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Automating Front-end Workflow
addyosmani
1366
200k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
370
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Typedesign – Prime Four
hannesfritz
40
2.4k
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