Tuesday, October 11, 2016

Michał Taszycki: Programming Workout


out this program work out
now let's not start like that
basically every one of you knows that yesterday there was a party and probably
a lot of you was there and there is a high probability that this part is to
going on
so before i start i need to tell you that I'm very very impressed by every
single one of you at this old audience
well and i tell you i basically
well you're partying last night
you should be tired right now you didn't get at this this matter of sleep last
night and probably some of you might have still a bit of hangover right
ok so to make it to make the start better and to help you feel more happy
and like this solve this gloomy atmosphere
I would like to make a tiny experiment so I need your help
but just a little bit so could you please stand up for me right now
seriously ok
just look out not to spill your coffee and let's make two small things for all
those impressive people around you
so look around
do you see those faces of those people yeah
so first let's smile at them
yeah and then let's give them a small applause all right seriously you're
awesome
ok so now you can sit back relax and enjoy the talk
alright so i want to share with you an idea of programming work out
and what I mean by programming work out well it's basically a set of routines
for developers to follow to become deaf better developers and if you follow them
consistently and regularly
you should become a better developer so yeah I know it might be a bit cryptic
right now and it doesn't make much sense but please bear with me for the moment
and i'll explain that any in about 15 minutes
ok so Who am I my name is me how to ski you can find me on Twitter and get get
hurt by me healthy and first of all I would like to tell you a bit about my
journey as a software developer
so it also it all started when I was in primary school and I saw the screen like
that
the do you recognize that
ok so plus commodore 64 and my i still remember my first programming first
program written it was 10 print hello 20 go to 10 so it was pretty complicated
for that stuff
well then I as i usually type programs that i found in magazines so that was
not really a creative work but since then everything went pretty quickly so i
finished
yeah I finished as study if I got my master's degree in crack of i studied
for a year in Scotland and then I worked in a couple of corporations like in a BB
I've been doing there as automated test of Java Web Services then in sabre i was
working with a legacy go to written in c++ but in 10 year old in 10 your time .
by different sets of developers so it was pretty funny to say the list
yeah so then I managed to realize one of my childhood dreams i became a game
developer so i was working in Scotland in cohort studios and in city
practically in or so and i made it i was working on those games this is the motor
storm
it was the one of the first games on PlayStation free and the second one was
the saints row which I was responsible for reporting from xbox - to the pc and
after becoming game developer i decided to do something different so i joined
the applique cake
I'm with them with a for about three years
i'm a senior raise developer and sometimes the project leader and yeah
it's cool i like their I like being there and a part of that I'm also a
member of a software craftsmanship grouping crack of and we managed to
organize the first color treating crack of last year we invited Corey kinds the
Creator all of the coda to workshops and we also have been a part of the global
day of code to treat and I was honored to to be leading the code the code to
treat the green during the global day in were so so it was a pretty nice event it
was happening in 90 different cities all around the world and more than 2,200
developers took part in that and it was happening pretty much simultaneously
like it all started after 9pm so every hour in different times of color to it
started so it lasted one day and it was pretty fun we were skyping with each
other and connecting with many developers
so why I'm telling you that all basically during my journey as a
software developer
I met a lot of programmers and as you know there are perfectly normal people
yeah so I I've met a lot of good developers
I've met also some bed programmers but I met also a few exceptional ones
so I haven't met this guy in person do you know that
do you know him karmic yeah so this is the guy responsible for were for a lot
of games that you might play door you might have heard of like quake doom
wolfenstein and so on so on so basically he he made a lot of a large part of the
engines of those games is really really exceptional programmer so the one you
more of you might know is this one
do nothing yeah its government
bernhardt as I've met him in person as in Amsterdam but I didn't know how much
of a bad as this guy is
have you seen any of destroy us off to software screencasts yeah so basically
if you haven't seen them
it's just paid this guy
nine dollars a month and see all of them like if you can't afford that council
your Spotify subscription and bite
you'll thank me later like this guy is a magician
so and also by working with other people I've met some exceptional programmers
and they were not so different from the outside but when you see the when you
sell them working they were really really good
they were constantly finding good solutions for the problems they were
working Lee really fast
they were working really hard and they were masters in different areas of being
a developer so they've mastered their tools their master the language and some
of them were exceptional good fast
first touch diapers so basically when you see one you look like that
so what you can say about them that they are tell talented right
yeah you can say that okay but that's that's not all that's first of all
that's not constructed because talent is something that you are born with or your
predisposition predisposed to do as to to be talented in some case and more of
that everyone has some talent
so let's go back in time and imagine yourself in primary school
the did you have some some subject that you felt you were talented
I did ok you did as well
probably most of you did was it the map for for example
it was not easy for you yeah
ok so and did it change when you went to high school
it's definitely changed for me for in high school everyone everything was like
much harder and I needed to work to put some effort into like to expand
something that i previously assumed was my talent
so what are other things that those developers could share and and that
could define that them to be exceptional
so i found that there are four things that let's let's call them exceptional
qualities and it's clear vision with which means the clear idea of what do
you want to be in the future what
who do you want to become what do you want to do and how do you want to do
that
so basically you have to know what you're going to be doing and who you are
going to be in couple of years they usually can extract smart goals from the
revision
so they know exactly what they need to do to move towards their vision and also
they know how to achieve their goals and if they don't they at least are
searching for the solution so they can find a way how to achieve them and move
forward and last but not least they are really exceptional hard workers and in
my opinion
hard work is underrated so we always say that all programmers are lazy
well stop that lazy is not something that you're you should be proud of
basically we we are programmed to be lazy we have new tools like our IDs out
to complete all that's all those stuff so we work we forget how to touch type
well we forget that we need to
and well we we don't need to remember the names of the variables we donate me
to remember the the methods of the frameworks that we're working on because
we have out of completes we have we have google that we we can finding
information in a second we have stuck overflow so we can ask for pretty much
any any solution for any problem and we it's really close to us so we don't
remember things
we just know where to look that look for them and in my opinion well it's pretty
good
it's it's like I'm not saying that that's a bad thing but I think that we
lose the ability to work hard and that this is the ability that we don't want
to lose because it's it is helpful in all different areas of our life so yeah
just one more thing do you remember I got a lightning talk from yesterday
okay so she was talking about rails girls and she mentioned one of our
colleagues batcher and she told a told you about that that pretty much every
one of our clients since compliments of her work and she also said that she
didn't know why is that so
well I know why and I be happy to so that secret
basically but she's really hard-working person she she's able to do a lot of
mundane tasks really quickly and really good and well she and doesn't get fed up
with that so it's a it's not a talent
it's really hard work so it makes me think that hard work in all in our lives
in our work is a pretty much a real deal
ok so now that we know what are the qualities of exceptional developers
let's think how to become one is it easy
yeah maybe but how to do that well it's we don't have a clear path to follow
to extend our abilities when we are looking at the developers we don't know
what would what they do they usually don't know what they what they did to
accomplish this so let's think about another group of people that we think of
as exceptional and they might have a bit better structure of a way of getting
better
so let's think about exceptional athletes
name your hero think about somebody that you like for for example good soccer
player or a good boxer or for example good good tennis player or the runner or
good gymnast like think about think about them and give them in in mind for
a second
so I'd like to focus on one exceptional athlete
do you know this guy as governor of california that you might know him
better from this picture or this one
but let's get back to this one
so basically this guy is really accomplished man really successful one
he's the most known body builder in the world
he's not doing that anymore well he's in politics but he accomplished
pretty much everything you wanted to well from what i read about this guy
he wanted to be a president of the United States
so he's not yet but well being a governor of california is pretty close
in my book right
so basically he's like an example of the person who fits perfectly the the four
qualities that i mentioned before so he's that he has a clear vision he knew
exactly who he wanted to be he knew exactly he could extract the goals from
there from his vision
so he became like the
famous bodybuilder then he became a famous actor then he became an governor
of california how cool is that
yeah so and first of all he is a really hard working person
so from what I've read about this guy as what was that people who went to the gym
with with him has seen his exceptional hard work
so yeah and i think this work ethic that he exposing the gym had the tremendous
carry over to his life
so we have those exceptional athletes and think about those that you that you
are thinking about so think about your heroes
so what we can learn from them so we know that they probably have those same
qualities as exceptional developers but they also have a way to become better
and they do it regularly and consistently so what do they do
well basically they work out they go to the gym
they train their muscle they train their skills and they become better and they
know how to do that so why don't we try that
so how to work out well it's pretty simple
you pick some exercises you group them you do them and then you rest and then
you just do it all work
all right again so when to work out whenever you're comfortable if your
morning person
wake up do some work out or do do some work out after work like big some big
some part of the day that works for you how often to work out well couple of
times a week and and that's enough
how long from half to one and a half hour
like it's 123 pomodoros if you know what i mean and how
now this is interesting so when it comes to physical work out there is a lot of
theory that defining how the workout should look like so how which exercises
should you pick first then what should we do
and it's really complicated things and you could read a lot of books but we can
also choose some simple ones and and start start with that so how could we
how could we work out our programming skills
so let's start by defining the programming skills that we want to train
so i would like to divide them into two categories primary skills and secondary
ones so primary skills are those skills that help directly achieve your goal
so it depends on your goal but if you want to become in general
good developer I think those are pretty good pics
so it's debugging test driven development refactoring different
paradigms
so object-oriented programming functional programming or procedural
programming techniques of dealing with the legacy code language must carry
proficiency with framework for example if you want to be good with rails
I tried if you don't want to forget how to generate a new rails intellect
installation practice that just do a couple of times
delete your ability or newly created application do it again
deleted do it again and that's part of your workout so secondary skills
secondary skills are something that also help us to become better developers or
help us achieve our goals and depending of what they are but they don't help it
directly so but they if they are used in a good way they can accelerate the
process of gaining this programming skills that we want
so in my opinion those are pretty important
so that's typing ID mastery
so do you know all those shortcuts keyboard shortcuts that help you use
your ID faster
do you know your shell commands do you know how to grab do you know how to walk
how to say said do you know how to play dubstep using the same comment in in mac
OS source control
so do you know how to reach log a git repository
you know how to cherubic you can you do that without the manual and mouse left
navigation
so can you resize all the windows by using only keyboard and so on so on so
in general it's
- proficiency and quick reading skimming is is important but I think like
everyone on the Internet can do that pretty much efficiently
alright so how would the sample workout look like
so let's say we have a weekly workout and this is the template of the one so
on monday
let's say we start in the morning so that we for example touch type for 15
minutes and our goal is accuracy
so we try to make as much as little as mistakes as possible then we switch to
do refactoring and we for example
we pick a small part of the source code and we practice extract method and we do
that by hand so we don't use ID we do it like all the steps required for extract
method and then we revert are changes and do it again and again so if we do
that like the athletes do that for example as you do pushups you could do
like in five sets of three repetitions so do it four times then rest and do it
three times and rest and so on so on so there
the numbers are only just to show you did different ways of how how you can
group your skills and how you can group your exercises and how you can train
them so yeah after refactoring we rest for some time and we go to our vent
practice so we also do 5 sets of three repetitions and we for example peak of
them golf challenge and we do it for a couple of times and we can focus on
different things for example do it in the least keystrokes possible on or do
it as fast as possible
so what it gives us and just ingrained in our muscle memory
the techniques that that we want to use for example for example if you want to
reorder two methods in him
you can do it in a lot of ways like train one or of of those methods and and
see what happens in in couple of weeks if you train them
you should be pretty pretty fast with that and this think you should be
happening pretty automatically so you can be spending a little
well quite a lot of less time in your editor so you can spend much more time
thinking which is a good thing
ok so we go to when Wednesday and we do touch typing for 15 minutes but now we
focus on speed
so
we don't focus on and mistakes we were just trying to improve our stomping
ability then we go to legacy code practice and we pick some technique of
dealing with a great legacy code for example sprout class if you don't know
what that means it
you can pick a book of Martin not marking father Michael feathers and
dealing effectively with legacy code and you have all techniques explain their
yeah so you take some pic a technique and you practice it for a repetitions
and for example you
mmm then you might go to to the firt exercise which is programing kappa or so
you want to practice to write a small program in a way that's a that it is
perfect
so every step of of your programming is really thought thought thought true and
we end the practice a lot so you can do it you can do it life
ok on and on Friday you you could have like touch typing but right now focusing
on some hard characters for example brackets
can you touch the brackets quickly as quickly as other letters
if not why not you could try that
yeah and and the other things you could for example practice some tail don't ask
principle by taking part of the source code and trying to make it a compliant
with this principle so and you do it for four as well for repetitions or you
focus on speed or focus on something else it depends on your goals and
language mastery
you can pick a latest Ruby game challenge or you can pick the puzzle
from
ha k okay for example and do that for repetitions or you can pick one from
project euler and try to do that in in a language that you want to master
yeah so this is simple workout so it doesn't need to look like that it can be
for example only touch typing if you want to focus on that so well to to find
an analogy would be too
for example if you go running for a half an hour that is a workout
so if you touch type for a half an hour that is also a workout
ok so we want to know when we accomplished a goal
so we need to measure somehow
sorry for school we need to measure what
ok we need to measure somehow our our progress during execution of the
exercise
so you can measure at time you can measure repetitions you can measure
diamond repetitions so how many times can you do refactoring sin five minutes
or how fast can you touch type the five pages or of the text or something like
that and for some things that are not really measurable you can record
yourself
for example if you record screen cast and you want to present your ideas
perfectly
so you're programming flow is pretty good and you can convey the meaning of
what you want to say that you can record it
look at your flow think of what you can improve and do it again and again
so this is how this is how you measure those things that are really hard to
measuring otherwise ok
all workouts need to be scaled to your needs
so for example if you if you are able to touch types only small case letters
that and with you can do it
we've pretty good speed you should not assume that you will jump to this speed
if you like if you start typing uppercase letters or numbers or
punctuation marks
so find your level we can exercise that it's slightly above your level do that
exercise for repetitions and then progress when this exercise stops giving
you do
results you want ok so when where can we find ideas for workouts
we're in a lot of places for example if you have can if you want to master him
you can you can go to engulf page you can watch them casts
I heard there was a quite good workshop two days ago
have you been there a couple of guys have been there
so did you find it good yeah great
so pick those things that you learned there and do them for repetitions so you
don't need to think how to do them that just your fingers would do it for you
and for mastering language you can use site like Ruby cones which is something
like
something like you need test for your brain
so you solve a sink a simple problem and you think about this problem so you can
also do it for repetitions the Ruby game
you can pick challenges from there project euler Ruby Cui's katas
this is fantastic resource for to see other programmers working on a small
programs and be amazed how quickly how can they do some things and how
beautiful their solutions are you can also buy a peacoat screencast and play
by play especially because then you could see some exceptional programmers
at work like Gary bernhardt on Potter son
for example is not very fast type is but it's a pleasure to look at him
ok so there is a one more thing one more thing to model after Jim community which
is a community
so it is it is really good to have a to have a community in your gym well when
you go to the gym and you see other people working out
you look at them anything for example wow these guys bench-pressing 100
kilograms
I should be doing that as well so the community is provide you a , some kind
of competition
it provides some kind of support for example you see large guide and talking
you all do one more repetition
so we do one more repetition and you also can have a gym body to body is a
person who you with whom you go to the gym so his help he is helpful in times
that when you don't want to work out when there is a rain or your body aches
or I don't know
your you don't want to go to the gym so he calls you and tells you hey bro let's
go to the gym so we go to the gym and also there is acknowledged sharing so
you can you can share some exercises sure away
sure workout templates and share the ways to improve yourself
so why not build the community
so if you like the ideas if you if you want to become a better developer and if
if you think this this is that the the good idea
help me build one so I started the project called programming work out and
if you go to the page programming work out . com
you can leave your email and i'll let you know when it's ready
well i would like to start with a providing a sample workout templates
like for a for free days a week
so like monday wednesday friday so if somebody doesn't want to create his own
workout
he can follow the the one provided on the website so it it will always be free
that's my and that's something that i would like to become my hobby and in the
future it could become a place to share workouts
it could become a place to share ideas or discuss the whole thing and if we
could manage to gather a large community we could measure our progress and do it
scientifically so we can pick those exercises that work
throw out those Kegel exercises that don't and make a really really good
workout really good way to become developers so if you like the idea
contact me on Twitter find this website leave your email and if you want to
discuss something ask something
just do that so that's basically all i wanted to share with you today so thank
you for coming here thank you for your attention and if you have any questions
I'll be happy to answer them now
quick question
spaced repetition last part yeah I just started using a couple days ago
the official my name and so another really useful
yeah i'm just curious yeah thats i haven't mentioned that because of the
limited time but as it's one of the perfect perfect systems to learn the
knowledge to learn like simple facts of the knowledge so spaced repetition
system if you haven't heard about that is the system to manage flashcards for
example if you learn a language like like japanese in english or something
like that
use flashcards and if if you have like 1000 of them it becomes really hard to
manage how often should you practice them for example if you know how to how
to speak out to say a word for example good in English which is
twenty
in polish and and you practice it and it's pretty easy word
so you learn it pretty quickly and you don't need to see this flash card as
often as you would so spaced repetition system manages this for you and if you
answer correctly a flash card you will see it's like for during the future
so it's a perfect perfect thing for practicing things like like what you
said like him then comments or some shell comments or some some knowledge
that can be put on the flash card and exercise
constantly so that's a that's a really good pic so yeah I'm glad that you
brought that up
nothing will top the rest all of you
yeah how do you how do you rest
I think that program like watching movies and also like four other people
because you're funny
so I don't know maybe
ok and then I think yeah
ok so that's a that's a very good point well that the question was how to how to
rest
so basically our workout is not physical
so if we we work out our brains so we we cannot to rest with our brains being
active like by watching 9gag or playing games or something like that
so basically what and what works for me is the physical exercises so go out and
do some real work out and that would be that would be the rest for your brain so
and then you can rest for from your real workout by watching 9gag so it's a
win-win situation
okay thank