the grub-brained developer a Layman's
guide to thinking like a self-aware
small brain that's me this is me okay uh
this collection of thoughts on software
development gathered by grub brain
developer grub brain developer not so
smart but drug brain developer program
many long year and learned some things
although mostly still confused drug
brain developer try to collect learns
into small easily digestible and funny
page not only for you the young grug but
also for him because as a drug brain
developer getting get older he forget
important things like what he had for
breakfast or if he put pants on Big
Brain developers are so many or are many
and some not expected to like this make
sour face think they are big brain
developers many many more and more even
definitely probably maybe not like this
many sour face such as Internet
no Greg ones think big brain but learned
the hard way
this is me okay it's not me actually uh
but I do know who wrote this and they
are from Montana I'm also from Montana
and they don't follow me on Twitter You
Know Who You Are
and you know the worst part about this
you will make a meme of you not
following me on Twitter
after I make this video which is very
upsetting okay very very upsetting
um anyways
it's fine is free country sort of an end
of day not really mattered too much but
grug hope you fun reading and maybe
learn from many many mistakes Greg
makeover long time programming life okay
here we go so we're gonna start with
part one
the Eternal enemy
complexity uh apex predator of grug is
complexity complexity bad say it again
complexity very bad you say now
complexity very very bad say it twitch
thank you thank you
I was pretty upset no pin joyer what the
hell is that man's name what did P joyer
say to me not p and joyer that's not pin
joyer but you could imagine if it was
his name would work out with
the drug report okay anyways
uh let's see given choice between
complexity or no one won against T-Rex
all right hold on whoa given choice
between complexity or one-on-one against
T-Rex grugtech T-Rex at least grug's CT
Rex complexity is a spirit demon that
enter code base through well-meeting but
ultimately very clubbable non-grug brain
developers and project managers who not
fear complexity Spirit demon or even
know about sometime
hahaha
yes oh my goodness oh my goodness oh no
oh no
the the complexity Spirit even real one
day code base understandable and Drug
get worked on everything good next day
impossible complexity demon Spirit has
entered code base in very dangerous
situation grugno able to see complexity
demon but grug's sense presence in code
base demon complexity Spirit mocking him
make a change here break unrelated thing
there what mock mock mock haha so funny
drug love programming and not becoming
Shiny Rock Speculator like grug senior
advise
Club not work on demon Spirit complexity
and bad idea actually hit developer who
led spirit in with Club sometime Greg
himself sadly often grug himself
say drug say again and say often
complexity very very bad
all right so let me kind of expound upon
this one and so as I see what grug is
trying to say let me translate okay from
one small brain to another small brain
um
how I see this and this is something
I've been really trying to do for the
last couple years is I call it one
dimensional programming I literally try
not to abstract
ever
I only abstract once I find myself using
the thing enough times
right like I don't
proactively
abstract I react reactively react
reactively abstract
and what I mean by that is that
especially with typescript typescript is
by far one of the worst languages for
this
uh typescript what you're going to do is
you're going to create a function and
you're going to want some fancy
autocomplete right you're going to want
your keys and everything to be like
specific strings and you're gonna kind
of go into it and you're going to build
all the right stuff
and then what happens well when you need
the refactor which because you
inevitably got it wrong the amount of
typescript type programming you have to
go back through and re like
retroactively change is enormous and
then you have to change the code itself
like typescript is by far the worst
candidate for this
um and I I find myself doing this all
the time I have built so many typescript
projects at this point my current one is
just growing still it's growing wildly
out of control and
for the for like the last two months in
this one I've done no form of
abstracting and it's been one of the
most maintainable things ever because by
the time I need to abstract I create in
my mono repo
a new section
and that new section contains my new
like piece and then it's very easy to
abstract
right
I don't know it's just it's just nuts
it's just nuts because when I was
younger I always did like the clean code
approach right oh what's this thing oh I
better make it an enum I better do these
kind of things I better make these
accessing methods I better create this
thing like good job good job good job
right and it's just like one line of
code in the end if I would have just
made it stupid but instead I didn't make
it stupid and I threw in generics
everywhere like if you're finding
yourself using generics before you even
know you need to actually for real use
generics you're doing it wrong and
typescript just really lets you do it
easily because you don't even have to
like Define the bounds on generics or
anything you could just you just go just
go just go all after it it's crazy it's
wild
reject five head returning to grunk yes
let's go you don't understand anything
I'm talking about oh man just build a
couple projects and just go for the
power of the old uh percent s old new
statement in code maintenance should
never be underestimated this is so true
if you make your code stupid enough it's
easy
right our teacher gives us a B plus
because he thought it was too simple
oh your teacher okay so again this is
why Academia sucks right so the one
problem about school
in the larger sense is that what happens
in the real world and what happens in
school are two very different things
okay teachers sit around get out of
whiteboard and produce whiteboard
masturbation for six months on end and
then when the grant starts running out
they then go and get a second Grant and
everyone's happy then they hire some
stupid naive The World Is Still amazing
Junior and being like we're gonna do
this incredible project they circle jerk
that person around for another six
months and creating
uml and sequence diagrams and by the
time they're done with all of that at
the end you have to get another Grant
everyone's clapping that man this
project is incredible look at them
circle jerk and whiteboard masturbate
next thing you know they're gonna have
clipboards and and science lab coats
going on and guess what
still haven't actually made anything
because the measurement is not based in
real world impact it's based in Grants
which means the more pedantic and the
more unrealistic you can make it the
more successful it is
by the way I in no way at all I'm
talking about the years I spent writing
uml diagrams and
uml masturbating
for months on end without actually
writing any code I did definitely not me
that's not about me okay that's not
about me the name is the PTSD agent