good Monday morning I am mpj and you are
watching fun fun function the click bTW
title of this
today’s video is throw out your tools
I’m going to make a case for minimalism
in this video last week I made a pair
programming video together with my
friend Eric we programmed a game using
unity since its unity we were
programming in C sharp in that video and
in one one part of the video we we
talked a little bit about how we need
the robots use gathers or setters when
we programming in C you scatter sensors
but we don’t use the built-in language
functionality for it we just use normal
methods I want of you are ARCA lion 5
asked why why don’t you like getters and
setters why wouldn’t you use properties
they are great they obviously add value
and this is super interesting because I
totally agree that getters and setters
add value it’s just that I don’t think
they add enough value I like to use as
few tools as possible and I think that
to me for me
adding one more tool to my tool chain I
consider that to be a pretty high cost
so that tool will need to come with a
pretty high value for me to like accept
it into my tool chain and for me getters
and setters I like they to me they’re
just syntactic sugar they don’t add that
much value in this discussion I don’t
think there’s a clear right or wrong
several people in the discussion didn’t
agree with me they thought that adding
one more property accessor was
definitely that added value and that it
was definitely worth it so I just want
to make clear that there are varying
opinions on this matter but I would like
to make a case for mine today which is a
kind of extreme minimalism I don’t think
that my opinion is the end-all be-all of
on this matter but I do think that we as
an industry could use a little bit more
of this if you’ve been following this
channel for a while you know about me
that I I I don’t use a lot of tooling
many people ask me what editor are use
and so I eventually made a video about
that call it was titled
at what editor do you use you can find
it in the episode description and the
TLDR is basically that I use Adam
without any plugins at all I do this
because I’m a kind of recovering tooling
alcoholic I just can’t handle the
distraction of a complicated tool if you
want to know more about that you can
find the video in the episode
description but in this video I’m going
to make a case for less less libraries
less language features and features in
general really less plugins less build
tools less less and less it goes without
saying that I’m not referencing the CSS
framework less which is ironically one
more tool I did not start out thinking
this way I’m going to tell you a story
about me a very embarrassing story I
used to be a person I really liked stuff
you know gadgets and cell phones and and
computers and that kind of stuff
I still do we all do but back then I
really had this conviction that the
person with the most stuff when they die
wins and in my early 20s I ran a a
company and uh when it comes to money I
am a person that is very good at making
money but very bad at taking care of
that money when it’s there and when
you’re running a business you kind of
have to be good at both of those things
so in a couple of years I managed to
tank this company completely and also
amass a very sizable tax debt to boot
this was definitely the economic low
point of my life so the way things
work if you have a tax tip that you
cannot pay the Swedish igloo the Swedish
equivalent of the IRS well they can get
a seizure order for your things
basically so I’m not sure what the
organization is called in other other
countries but in Sweden is called the
Kuna them and what they do is that
if you can’t pay your debts they have
the legal right to come to you and seize
your assets and sell them on your behalf
to pay your debts for you so at this
point I just figured that I would be
proactive and sell my stuff first
because I figured I would do a better
job than them so what I did was that I
basically sold everything I owned that
had any remotely any value so Xbox
expensive computers whatever you name it
got rid of so much stuff I basically
liquidated everything I could into cash
and just crammed that towards the tax
debt in practice the seizure order never
happened I spent a couple of years
working as a consultant and paying the
tax debt of using just my salary but
accidentally that liquidation of all of
that stuff turned out to be one of the
best things that have ever happened to
me getting rid of all that stuff turned
out to be a massive relief what I had
not realised up until that point in my
life is that every thing you acquire be
a digital or or physical for that matter
carries a little tiny amount of work
with it that you have to do if you buy a
coffee grinder you now have a new
routine in your life to buy beans for it
when you upgraded from a dumb phone to
an iPhone you now have to remember to
charge it every day and whenever you get
any new thing and start relying on it
that thing has a possibility of breaking
down and then you now have a new task
that means that you have to go on and
get it repaired
none of these tasks are very big in
themselves so it generally doesn’t it’s
very invisible but once I got rid of all
that stuff at one fell swoop it dawned
on me how like big the amassed amount of
work from all of those things that I had
how big that chunk of time was how much
how much of a drain on my resources that
really was and that really changed my
attitude on these kinds of things I also
want to talk about cooking
let me I’m gonna fetch a thing that I
want to show you you can actually follow
me around because I’m trying out having
a lavalier mic I’m gonna open up my
fridge and I’m gonna pick out where is
it where is it here it is I’m coming
back wait for me wait for me wait for me
this is this is going to be incredibly
anticlimactic okay
tah-dah fish sauce I’m gonna talk about
the fish sauce in a bit and explain how
that ties into this but first I want to
talk a little bit about cooking in
general because I you love cooking it’s
one of those one of the hobbies that
I’ve picked up that or my
non-programming hobbies it’s like
cooking is the antithesis auntie thesis
and thesis antithesis of programming
because it’s very concrete you start out
doing something that is very tangible
it’s very limited in time and you end up
with something real and then you eat it
it’s it’s very different from
programming which is abstract as hell
and it can building a software can go on
forever but there are still a lot of
things that you can learn from cooking
that are transferable in software
development and one of those things is
myths and plus or just means it’s French
and it means everything in its place me
is basically being sad you before you
start cooking you locate all the
ingredients and tools that you’re going
to need to make the recipe and you place
them out in an orderly manner everything
in its place I’ve linked to a video in
the episode description if you want to
check out the the concept of missing
Plus by you know explained by somebody
who actually knows what they’re doing
means and flosses is pretty convertible
to programming in itself like just get
all your stuff in order like your editor
and all the documentation and stuff
before you start programming it’s very
nice and very calming but a very nice
bonus of knees is that it gives you an
overview of the complexity of the recipe
if a recipe is very complicated just
putting all the ingredients up is going
to give you a sense that oh this recipe
is going to be complicated this recipe
has a lot of parts when a recipe has a
lot of ingredients it’s almost always
going to add a lot of time to the recipe
and it’s also going to add more places
where the recipe can go wrong because
you make a mistake also it’s not always
the number of ingredients that is the
problem it might also be things like
this fish sauce fish sauce is super
common in Thai recipes but not generally
in the food that I cook I needed fish
sauce in to try a recipe recently and I
saw that I had it in my fridge but one
of them had expired last year and
another one had expired in 2013 so this
is one of those ingredients that where
you it’s in a recipe you buy an entire
bottle of it you use like this much and
then you never use it again so I mostly
like cooking simple recipes and by
simple I mean recipes with few
ingredients but not only few but also as
did
Eric as possible non non specialized
ingredients that I can use over and over
again in many different courses but
combined in different ways the advantage
of this is that it becomes less costly
because you don’t it’s easiest less food
waste which in turn of course allows you
to buy more high-quality ingredients
with the same amount of money and when
you have fewer ingredients that means
that you generally have less steps which
means that you can spend more care on
every step so you improve your cooking
that way to Italian cooking is a lot
like that it’s a very few ingredients in
very non weird combination and it’s
heavily focused on good produce and and
good quality meat as a as a basis for
the cooking rather than interesting
taste combinations that’s a lot of
talking about me and cooking and how but
how does this fall back into programming
well one of the main jobs of a
programmer is to manage complexity
billing software means that you build
new features over time things get added
and added and added and the complexity
just basically just grows and it’s up to
you as a programmer to keep this
complexity beast going for as long as
possible basically and the way we do
this is to find ways to make it possible
to reason about our code in a somewhat
sane manner this is not my opinion this
is actually important for reals in order
to build software because when it comes
to complexity like we all have as human
beings and programmers we all have
different a different level of
capability when it comes to handling
complexity some programmers can’t really
keep much of it in their heads at the
same time and require quite a bit of
simplicity and some programmers are very
good at kind of like keep like five or
or or perhaps two ten
things in their mind at the same time so
they they handle complexity better but
it’s kind of like juggling there’s a
there is a person like most people can
juggle two balls easily and some some
people can that are professional
jugglers and have done it for many many
years can they can do that ten balls but
nobody can do a hundred balls
therefore it’s absolutely crucial that
everybody knows how to build systems
that makes it a lot easier to reason
about our code we can’t solve it by just
hiring smarter programmers if you like
thinking more about that there is this
amazing talk by a guy called rich Hickey
that I’ve talked about before called
simple made easy it’s definitely one of
the top five best talks ever on computer
science and programming I’ve linked to
it in the episode description there are
many ways to make it easier to reason
about your code it’s you divide and
conquer is one of the more common ones
breaking things into modules and just
making sure that you can see it you can
think about one problem at a time but
another way that I think is heavily
underrated is one out of making a case
for today
which is basically throwing out tools
use fewer language features use less
libraries try to find ways of
accomplishing the same thing but with
less moving parts involved a lot of
people misunderstand me when I talk
about this so I want to talk about
thrashing versus sacrifice so a lot of
people think that oh okay yeah we should
really clean up all the dead code in our
projects and but that’s not what I’m
talking about
like that’s that’s thrashing if I find
you know like just trash on my floor and
I throw that away into the bin then I’m
not simplifying my life in any way I’m
just cleaning it’s just thrashing
sacrifice on the other hand that means
actually throwing out things that have
value that you like a lot that that that
paints you to remove
and that will piss people off if you
remove them you mean stuff like selling
your TV because you don’t want to spend
more time watching TV in your life
because you find that data it has become
a waste for you so when I’m talking
about throwing out your tools I’m not
talking about throwing just trashing
things that you don’t use I’m talking
about actual sacrifice I’m talking about
removing things that you actually find
valuable but that you are willing to
sacrifice in order to create a simpler
cohesive whole I am going to give you a
great example of this being done in the
wild and it’s it was just recently by
create react app if you don’t know what
create react app is it’s a boilerplate
app basically an app skeleton that
allows you to get going well react
really really quickly without any fuss
create react app is zero configuration
it gets you going right away it’s well
tested on many platforms and if
something breaks down the cooperation is
the same for everyone else so you’re
very likely to get help on the internet
easier great but in order to get there
they had to sacrifice and one of the
most controversial things that they
sacrifice was source maps now source
maps are when they work they are amazing
you have your original JavaScript code
written in es6 or CoffeeScript or
typescript or whatever and it’s strength
spiral down to Acme script 5 run in the
browser and there’s some error but you
even though that code is transpiled you
will get the correct stack trace on the
correct lines corresponding to your
original code like magic that source
maps they are so good but create react
app does not have source maps because
call that well they break down a lot
there’s a lot of they did not feel like
if we want to create this this cohesive
experience that gives people a
predictable out-of-the-box experience
that you know just works and let’s say
people start getting work done source
Maps does not fit into that cohesive
picture I really love source maps but I
I really respect create react app for
making this decision because they and
they are able to do that because they
know exactly what they are building so
that you are able to do this this
sacrifice another problem with having
many ingredients in your software is
that more moving parts means that there
are more parts that can break and
therefore more things will break another
hidden cost with using third-party tools
is that you need to stay up to date new
versions or these components are
released all the time and you could
elect not to do the updates but then you
are partly exposing yourself to any
vulnerability that is known and out
there or your documentation will simply
go stale because the documentation
online will be for the news the new
version of the software while you’re on
the old one so it will be even harder to
manage if you have many moving parts and
many tools and stuff in your project
it’s going to affect how accessible your
project is to pick up for other
programmers might necessarily not make
it worse might be actually make it
better if it’s a very well-known
component that you’re using but often it
affects it negatively
for instance Redux Redux is an amazing
pattern but let’s be honest when you
start learning Redux
it’s like this rabbit hole of things
that you have to learn the documentation
is like okay we are now going to teach
you what action craters are then we go
down
the documentation here we’re using this
thing which is a new thing it’s a simple
plugin that you can just pull from here
you can read about it here and then you
start reading about nothing and then you
realize that that thing uses another
thing that’s like it’s just it takes a
lot of time it’s far from
straightforward to learn even especially
if you use meta frameworks like redux
OGG and stuff it really impacts the way
your application will be received by a
new programmer coming into the project
especially if that programmer is not a
JavaScript developer so for going back
to the original thing the property
accessors in c-sharp it could be argued
that using c-sharp accessors is
idiomatic to c-sharp like it’s what that
means is that it’s the way you do things
in c-sharp it’s a natural way of doing
things and that it’s true so maybe if
you do in c-sharp well when in Rome you
should code c-sharp the way Romans do
and the same could go for redux it’s
it’s functional it takes JavaScript in a
nice direction it’s definitely idea
Matic but it definitely does make it
harder for a program are not familiar
with that language or that platform to
move into it so we’re using tooling then
it’s very specialized for this language
this this domain so to speak
instead of using tools that have a
tendency to overlap with other parts of
the industry I’m not saying that we
shouldn’t be ing ematic it’s it’s nice
in many ways but I think that we also be
at least we need to be aware that there
is a back side to idiomatic these things
that kind of feed on themselves because
if you are very familiar whether with a
platform you’re the the amount of
cognitively load that you can handle as
a JavaScript developer you just I can
handle these functional things I can
have it like another redux plug-in sure
I can throw that on my JavaScript is all
I do so ha
I’m I can do this all day but if we want
developers to be able
to move between different platforms and
do a lot of things like iOS development
or Android or perhaps back in
development and and front-end
development in JavaScript like if we
want developers to be able to help out
in many parts of the organization then
it’s a very bad thing if people start
using a lot of specialized tooling for
their part of the tool chain that only
they know about because it creates these
tech apart Heights between us and people
will start to create tools like human
human human I understand that people use
human I really do and I understand that
a lot of people spend time making human
but IO staved human I really do
I find it insane like the person that
created human like I can’t fathom that
thinking process so they have so many
tools they have so much set up for their
project that is so complex that they had
to create a meta tool to manage their
overly complicated toolset it’s like a
person that has 2000 shoes at home it
does not occur to this person that they
might have a problem collecting shoes no
no they decide to build a shoe sorting
robot I think this is crazy it’s a
personal opinion don’t kill me
too much I’ve been running a lot I’m not
saying that you shouldn’t use tools of
course we need to use tools it would be
insane
I mean you can’t make food with just
flour it’s just oh we can but it’s not
very good we need some balance but I
think that it’s fair to say that you
should ask yourself twice before adding
a tool or ingredient to your your
software development process or your
project next time you’re about to add a
new library or start using a new feature
in your project the language feature
that was not previously used ask
yourself does
this add a lot of value to my project
that is because if you get into the
habit of adding things just because they
have some value you’re going to end up
with a lot of complexity over time but
that is just me what do you think did
this video make you think of an
ingredient in your software development
process that you could live without or
maybe one that you couldn’t live without
or maybe you think I’m just full of
please leave a comment down below you
have your watched an episode of fun fun
function I release these every Monday
morning
oh wait hundred GMT do not miss out on
the next one
I am mpj until next Monday morning stay curious