good Monday morning I am MP J and this
is fun fun function this weekend I was a
lot of fun for me I was out of town
attending the wedding of a couple of
friends of mine but it also means I
haven’t had time to do a full episode
and I’m also tremendously hungover but I
want to do some video so let’s do some
questions questions and answers first
out what are your thoughts on static
typing and JavaScript slack off I come
from a c-sharp background before a
JavaScript and I do not miss the types I
think that’s for two reasons one is
because of my personality type and two
is because I unit-tests a lot so first
my mind my personality type I am I’m
very easily distracted by tooling
whenever I try you know a new to-do app
or something like that I get so caught
up in that tool I start spending time on
how to do work rather than actually
doing work I cannot personally cope with
systems like the GTD system that a lot
of people uses because I get caught up
in them I am kind of like a sober
alcoholic when it comes to that I can’t
I can’t handle that and for me I kind of
find types to be like that for me
I’m started doing some Android
development lately where you do Java and
I find myself falling back into this
track where I oh I could this is the
same and oh wow these things these
things form an inheritance hierarchy and
oh I can pull this this up into an
abstract base class and after a couple
of hours I realize such I’m not really
adding any value here I’m not making any
progress on this software I am I’m not
adding any tests I’m not solving any
bugs I am not removed
any unnecessary code you could maybe
claim that I’m making the project more
maintainable but looking at the code and
making these these abstractions and
making things more generic it’s not
clear if it’s actually making things
easier to maintain or or better in any
way but it feels really productive
because you’re generating lots of code
and you’re making something that seems
cool and it’s so fun types they are
alluring to me in a way that is not
healthy the second reason that I don’t
miss types a lot is that I really really
like to write unit tests I write unit
tests for everything and static typing
can help you catch a lot of errors but
it’s very seldom that I find myself or I
find that this static type system
catches a bug that my test suite does
not and don’t get me wrong I’m not
writing any tests for specifically
checking the types in JavaScript I I
just find that if I write a test for the
happy path of the application and the
execution paths for a couple of
different edge cases that tends to catch
all of those things anyway because you
just you run through the code and yes
the type system I don’t think it adds
all that much if you have just a basic
test suite oh I just thought of a third
reason why I don’t miss types I have a
really hard time keeping many things in
my head at once so I really like
breaking my process into very small
problems and solving one problem at a
time and the problem with almost all
static languages typescript is not like
this actually so this does not apply to
type script but types is not something
that you can add later and that’s a
problem for me because that means that I
I have to figure out the algorithm and
and figure out my problem
and also do the the whole typing thing
at the same time and that like that
makes me slower and more distracted and
and that just messes things up in my
brain that is also why I really don’t
like having a linter running in my
editor because I want to defer like
cleaning making that final cleanup until
I’m finished it’s sort of I I also don’t
like cleaning up my kitchen as I cook I
want to focus on cooking and then when
the thing is in the oven
I get the cleaning I don’t dislike
static typing I think that it’s a it’s a
great tool for Manny it’s not as great
tool for me and I also really think hate
when people try to give the idea that a
language is bad if it doesn’t have
static typing – next question how long
does it take to record a video this one
is it’s probably gonna take one hour to
record it and two hours and it may be
and then one more hour for doing preview
images and uploading and stuff a normal
video sort of like for instance a monad
video that takes a lot longer time
because I have to do the script which
can take like 4 to 6 hours and recording
it takes about the same time but the
editing is longer so perhaps 3 hours
since I know between 7 and 12 hours I
would say is normal what is a common
mistake that even fairly experienced
jeaious developers tend to make well I
think that it like my favorite favorite
mistake that experienced developers in
general not just JavaScript developers
to do is to make things more complicated
than they need to be as a programmer
it’s fun to do complicated solutions and
it also makes you feel smart it’s
awesome but the more code you add to
your project the more bugs you will add
to your project
always keep your code as simple as you
can the most common example of this that
I see is caches people see that oh I’m
calling this
from here and here here I I should just
store this in a variable here and now
you have introduced some state and that
means that you have introduced
possibility of a bug which might be okay
if that is actually hot code that is run
hundreds of times per second but if it’s
not you are just wasting your time and
you’re making your application
unnecessarily complex for no good reason
at all what are your thoughts on the Elm
language / architecture and its
viability in production I’m gonna bundle
this in with this question state of
meteor in 2016 what do you think will
happen I’m a great fan of both Elm and
meteor they are amazing technologies and
if you haven’t checked them out I
suggest you do because they are very
inspiring but they have an adopts
ability problem Elm for instance
inspired to a large degree reactant flux
and Redux but I think that Elm really
needs to take a long hard look at itself
and see like why are people duplicating
these concepts in other stacks and and
their stuff instead of just using Elm
directly what I think that a lot of
programmers that design languages and
frameworks tend to not think about is
its adoptability and how it fits into
the ecosystem that people are already
using if you’re just writing a library
for an existing language in an existing
package manager then that’s pretty easy
to get people to try out but if you’re
writing a complete language where the
new platform and a new package manager
you have just created yourself a massive
marketing undertaking that requires
quite a bit of financing and marketing
to be able to pull off and let’s face it
I’ve Elm does not have that it lacks the
backing that frameworks that react
for instance has and it took years for
react to get to the position where it is
now and it’s a same thing with meteor
you see a lot of a lot of the things
that were unique to meteor when it
launched are no longer no longer that
unique because people draw drew drew
inspirations from it them and adopted it
into their own solutions but again why
didn’t they just use meteor and the
answer is it which was hard because you
needed to replace everything at the same
time
you couldn’t just pick one thing they
had no way to sneak themselves into
these stacks of existing companies an
existing software you had to take like
meteor or you had to take like Elm
you couldn’t just start adding this
little part of Elm and then grew Elmer
meteor doesn’t really work like that I
really think that’s uh that’s a
challenge for their adaptability what
the hell is this I have something in
mind yeah this is some cake
weddings dude ah I’ve cake in my hair
what are the biggest mistakes devs make
during unit tests in your opinion not
writing unit tests how do you write a
good unit tests well you write our
horrible unit tests for several years
and you learn from everyone and
eventually you start writing good unit
tests write bad unit tests and learn
from them you will get good eventually
what frameworks and libraries do you
usually use I don’t I
I’m a problem first kind of guy I I have
a long elaboration on this in the too
many tools and frameworks video you
should just check the app well that is
all we have time for today
I am mpj this is fun fun function come till next Monday morning