Victor Savkin Profile picture
Oct 6 8 tweets 1 min read
1/8 My code style is getting simpler with every passing year.

Things I used to be into:
• Functional Programming (category theory etc)
• FRP (first and higher order)
• Domain specific languages
• Proper OOP (Smalltalk etc)
...

Today I barely use anything from the list.
2/8 Most of what I write today is basically "procedural + immutability". Every module has a few public functions. Each public function receives and returns immutable data.
3/8 Within each module it's OK to mutate. Local mutability helps write concise, easy to understand, fast code.
I used to write nested reduces and feel good about myself--no more.
4/8 Of course local mutability isn't sufficient, so I have a few places at the top where global mutation happens.

Classes are OK as long as they are used as modules, not instantiated in random places.
5/8 I'm also much more selective at using abstraction. I realized how costly it is: abstraction often creates indirection, which makes code harder to understand. So if you abstract, it's better be worth it.
6/8 DSLs, in almost all cases, are unnecessary abstractions. Imo 9 times out of 10 they hide bad design.
7/8 As many engineers I used to like being clever.

"My whole solution is a 3 line data transformation pipeline using 10 types of unnamed tuples."
8/8 FP, FRP, DSL, ... there is something to learn from each of them. But somehow I arrived at the code style that looks like something from 30 years ago :)

It's boring.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Victor Savkin

Victor Savkin Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @victorsavkin

Dec 5, 2021
(1/12) My work, to a large degree, is about examining ideas, building mental models, and finding connections between things. This is probably true about most senior software devs. Let me share some of my observations.
(2/12) Tools like ROAM/Obsidian/Craft don't help **me** create knowledge. They are good at linking documents together, which helps me remember a lot of detailed stuff. But that's not knowledge creation, it's just remembering. And I think "remembering" is overrated.
(3/12) My knowledge construction process consists of Capture -> Review -> Revise -> Compact.
Read 12 tweets
Aug 3, 2021
(1/9) On task and project management, habits, focus, tools.
(2/9) I don't start with projects or tasks. I start with notes and documentations.  Actionable emerges from non-actionable. (This of course applies to new stuff, not to the current list of things you have).
(3/9) Pull (like in personal kanban) works better than push (like in GTD). I feel less overwhelmed, and more focused this way. It helps me curate what is on my plate.
Read 10 tweets
Jul 30, 2021
(1/13) Why startups loved Rails, why build tools matter, "thesis–antithesis–synthesis", and why should use Nx for your React and Node apps.
(2/13) Ruby on Rails was huge in the startup world because it let you build amazing things in weeks (instead of months or years). Although often we focus on the framework part of Rails, a lot of the value was in the build tool.
(3/13) When using Rails we didn't have to worry about setting up the DB, setting up the server, setting up tests, splitting dev and prod etc. It all worked. No iteration 0.
Read 12 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(