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
75
An In-Depth Look at Event Sourcing with CQRS
vonconrad
2
900
Handwaving about Dependencies
vonconrad
0
240
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
見えないメモリを観測する: PHP 8.4 `pg_result_memory_size()` とSQL結果のメモリ管理
kentaroutakeda
0
160
선언형 UI에서의 상태관리
l2hyunwoo
0
140
ブラウザ単体でmp4書き出すまで - muddy-web - 2024-12
yue4u
2
460
tidymodelsによるtidyな生存時間解析 / Japan.R2024
dropout009
1
760
Beyond ORM
77web
2
210
暇に任せてProxmoxコンソール 作ってみました
karugamo
1
720
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
4
210
ドメインイベント増えすぎ問題
h0r15h0
1
190
Mermaid x AST x 生成AI = コードとドキュメントの完全同期への道
shibuyamizuho
0
160
Monixと常駐プログラムの勘どころ / Scalaわいわい勉強会 #4
stoneream
0
270
Go の GC の不得意な部分を克服したい
taiyow
2
770
あれやってみてー駆動から成長を加速させる / areyattemite-driven
nashiusagi
1
200
Featured
See All Featured
Site-Speed That Sticks
csswizardry
2
190
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Optimising Largest Contentful Paint
csswizardry
33
3k
The Invisible Side of Design
smashingmag
298
50k
Agile that works and the tools we love
rasmusluckow
328
21k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
2
290
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
Raft: Consensus for Rubyists
vanstee
137
6.7k
KATA
mclloyd
29
14k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
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