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
Go の GC の不得意な部分を克服したい
taiyow
3
790
今年のアップデートで振り返るCDKセキュリティのシフトレフト/2024-cdk-security-shift-left
tomoki10
0
200
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
4
540
MCP with Cloudflare Workers
yusukebe
2
220
Zoneless Testing
rainerhahnekamp
0
120
見えないメモリを観測する: PHP 8.4 `pg_result_memory_size()` とSQL結果のメモリ管理
kentaroutakeda
0
360
tidymodelsによるtidyな生存時間解析 / Japan.R2024
dropout009
1
790
競技プログラミングへのお誘い@阪大BOOSTセミナー
kotamanegi
0
360
たのしいparse.y
ydah
3
120
20年もののレガシープロダクトに 0からPHPStanを入れるまで / phpcon2024
hirobe1999
0
480
「Chatwork」Android版アプリを 支える単体テストの現在
okuzawats
0
180
これが俺の”自分戦略” プロセスを楽しんでいこう! - Developers CAREER Boost 2024
niftycorp
PRO
0
190
Featured
See All Featured
It's Worth the Effort
3n
183
28k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.3k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
28
900
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Why Our Code Smells
bkeepers
PRO
335
57k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
What's in a price? How to price your products and services
michaelherold
243
12k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
0
98
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Visualization
eitanlees
146
15k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
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