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
EMになってからチームの成果を最大化するために取り組んだこと/ Maximize team performance as EM
nashiusagi
0
100
Kaigi on Rails 2024 〜運営の裏側〜
krpk1900
1
230
Better Code Design in PHP
afilina
PRO
0
130
イベント駆動で成長して委員会
happymana
1
330
C++でシェーダを書く
fadis
6
4.1k
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
ローコードSaaSのUXを向上させるためのTypeScript
taro28
1
630
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
950
광고 소재 심사 과정에 AI를 도입하여 광고 서비스 생산성 향상시키기
kakao
PRO
0
170
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
170
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
480
Creating a Free Video Ad Network on the Edge
mizoguchicoji
0
120
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
33
2.9k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
97
Automating Front-end Workflow
addyosmani
1366
200k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
GitHub's CSS Performance
jonrohan
1030
460k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Six Lessons from altMBA
skipperchong
27
3.5k
Done Done
chrislema
181
16k
The World Runs on Bad Software
bkeepers
PRO
65
11k
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