Transcript: How Django Experts Think
Hello, and welcome to another episode of Django Chat, a weekly podcast on the Django Web Framework.
I'm Will Vincent, joined as always by Carlton Gibson. Hello, Carlton.
Hello, Will. How are you?
I'm good. And this week, we're going to try something different. I thought we could talk
about how it feels to be a Django expert, or at least to be perceived as a Django expert,
because you and I both, with our various hats, are looked to by some folks as knowing what
Django is all about and I thought we could talk about the reality of what that feels like to give
beginners a sense of where this all leads and maybe fellow experts who don't feel like experts
maybe they'll agree with some of the points yeah because that that's the that's the biggest bit
right is fellow experts who don't feel like experts it's like there's two sides of it one
is when you talk about beginners I remember being a Django beginner and looking up to people who
were like you know maintaining the framework and they were superheroes and then yeah and you know
years later i suddenly find myself in the role of jango fellow and i maintain the framework and i'm
but i don't feel like a superhero at all i feel like i don't know what i'm doing 90 percent of
the time right well and it's and i think it's so there's two things i think one is programming is
just not a field where you ever feel like you have mastery it's not and there are a lot of fields that
are where you're doing you know i don't know jiro making sushi right after five years of making the
same rice every day. He can have a high degree of confidence. He knows what's going on. But
programming is just not a field like that. It's infinitely complex. And the more you know, the
more you realize what you don't know. So the imposter syndrome is you don't spend time on
what you know because you can just automate it. Or even a surgeon. I'm in Boston. A number of my
friends are surgeons. Surgery does change quite a bit, but you're doing the same procedure eight
times a day for 20 years you know you get a high I mean surgeons are confident and you could say
cocky because they're doing the same thing again and again and again there's that joke what's the
difference between God and a surgeon God never thought he was a surgeon yeah yeah well lots of
things about the medical profession but yeah uh but so program is just not one of those fields
um I would say the and I this comes to mind because I'm increasingly asked questions by
people who in some cases, I think know more about Django than I do. And yet they're looking to me
as an expert on Django. And I do know some stuff, but I'm highly aware of all the things I don't
know in part because I'm, I get a lot of great questions. And so I thought we could talk about
maybe let's like, what is, how did that journey from beginner to where we are now? And then we
can talk about how it feels now, because I think it's, it's more that I, I know what I, I know what
I don't know, but I also have the confidence and the scar tissue to be like, I could figure
basically anything out that's web related i mean this isn't quantum computing so no and i kind of
enjoy the hard challenges now because i've seen a lot of the stuff at least once so i kind of like
the super tricky things yeah i think there's something in that is the a couple of points
that you made that will come back but this idea that um you could take whatever problem came up
you'd be able to resolve it i think that's where the the after you you've got the years of experience
it's like oh no well you know i can i haven't seen this exact problem before but i've seen
problems like it and i could you know you gave me long enough you gave me the budget i could take
you don't have that total fear of i don't know anything people are going to find me out and i'll
never solve it because you've gone through that loop so many times that it's like well i'll get
there it may take a day it may take a week it may take a month but you know almost everything we're
dealing with is a solved problem i just don't know where it's been solved yeah and i don't know
there comes i remember being at a talk at some um ios development conference and and one of the
people giving the talk was very experienced developer and they were like look ultimately
there is no problem that i cannot solve because you know they get down to there'd be some work
they get right down to the debugger and they'd be patching a function in c yeah you know and it
doesn't get any lower level than that and now in the web you're not really doing that very you know
you don't get down that low you very rarely do you even find a bug in python that you have to work
around um though you found one yes my first so so okay so 15 years or something i've got my first
ever bug filed in um python so the you know i've been using django for all this time and finally
found a bug in for windows 3.8 python 3.8.0 there's a bug with async io blah blah which will
be fixed in 3.8.1 because i reported it was fixed the same day it was amazing but yeah you know in
in all that time i found what you know i found one bug in python actual bug yeah you found a few
jango bugs though over the years well yeah yeah but jango's like no i know built upon python yeah
built upon so like the higher things up so your your code is the most likely place where there's
some bugs but not your code but one's code is um the most likely place where there's some bugs
because it's built on top of everything else and it's not as tested and it's not as used and then
below that django and then below that python but normally the you look in your own code for the
bug right right well and that is the case that it's i guess it's the confidence to know that
you can solve anything um and you just sort of go i mean basically you kind of go fu computer i
i'll figure this out yeah there's no throwing the hands up you know you're i'm more we're more used
to well like yesterday um was it yesterday i was dealing you and i there's something an api
permissions thing and you know a reader flagged it i looked at it for an hour i couldn't figure
it out i asked you you know on a quick look you couldn't figure it out either at some point it
will be solved it's probably something silly but i don't know the answer right now but i'm also not
myself up about it because i'll you know i'll go take a walk i'll sleep on it it's solvable right
but when i was a beginner you know i i think the difference is how and how you get stuck so for me
now i don't get like stuck stuck for a week on something because i have more i can fix things
faster but also i know where to ask and how to ask when i'm truly stuck so i remember being stuck on
just like installation things with django or i don't know solar you know all these things that
don't even seem like what i'm actually trying to do that just are path variables when i was
really starting out yeah so you know which still i hope you know i just oh my god path variables
kind of freak me out environment variables and all the rest of this stuff well you're like bash
you have to be a bash expert before you can even get going we see we're back this is back to episode
one right what is django and how hard it is to learn but i think part of it is knowing when i've
knowing what a good faith effort is on my part before I, you know, put up the white flag and
ask for help. So like, for example, on this specific thing, I'm going to give it a couple
days, I'm going to look at it. And then I'm going to ask people because I know someone will
be able to quickly spot it. But I think it's, it's having the reps to kind of know when I've
done what I can, and I need to ask for help versus, you know,
because no one wants to ask for help all the time. If someone's asking me for stuff,
I don't want someone to ask me something because they haven't made an effort. It's clear to me
when someone hasn't made an effort. And I'm better at Googling than they are, probably.
But it's sort of like, where is that line between I've made an effort and I can explain,
I think this is the problem. It's something like this. That kind of tees up. If I'm going to ask
someone else, that's better than just being like, this code doesn't work, which I get that from
people and that's fine if i sometimes don't respond but you know so anyway so asking for
help is a skill that comes along with phrasing your question as well knowing where to look so
you know you're trying to run let's say you're trying to run a web sockets um app on top of
channels using redis with you know some grocery bag of front end cdn in front of you you know a
load balancer and a web server and you know and then you put up on the channels repo oh this is
isn't working you know yeah i see this in the content and it's like and it's like uh this isn't
addressable this isn't a this isn't a bug i can help you with so it's knowing how to ask the
questions as well and really trying to pin it down and that's something that beginners can
can focus on is have i have i explained this so that somebody can reproduce it so that somebody's
got a chance of helping me right and putting you know putting putting the logs putting the error
messages saying this is my thesis this is kind of you know my logic to get to this point yeah
because nobody wants to just be tossed a whole bunch of code and have to you know that's i mean
that's work work that's that's not fun for anyone um so that's that's a big part of it uh i mean
what else it's i think it's also like how do you get to this point i mean i'm you know over my
career as an educator i want to eventually be able to show people how to build probably like
10 different apps with django drf and other things because i do think it you just need the reps to
see the patterns to see that everything is crud and then you reach this point where it becomes a
little it's not to becomes a little bit boring but i think it's like any job after every five six
years you have to reinvent why it's interesting yeah for you and coding is especially like that
because it's you know we've talked about this in other episodes i feel like i could you and i could
build a prototype of almost any site quite quickly but we know what it takes to make it in production
and you know that's a big step function leap and so that makes it maybe less exciting to just
build stuff because you go oh god i'm gonna have to maintain it and there's bugs and
you know and a lot of it's the ui it's not the list view or the detailed view that you've built
and then you get oh i get a bit bored building a django detail view well you know okay is there
a different level of abstraction you can work at can you the why is it repetitive like in that case
can you create a class which you know encapsulates that what's repeated and then gives you a higher
level pattern right and that's what i think it's these subtle things when i see that give me
pleasure in meaning in code now right where i see a problem and if there's an elegant solution to it
even if it's especially in some ways if it's just a tiny little thing i go oh that's that's clever i
like that i you know even if it's some iteration of you know a detail view and a permission or
something or list view because and this is a talk maybe next year i'll give i mean everything is
crud and then you have list view detail view and sprinkle an auth and that's like big big picture
that's that's it yeah i mean we can i'm happy to dive deeper but i think maybe a couple years in
you go okay it is all crud with a foreign key and list view detail view you know and then it's
just sort of waterfalls from there but i mean at the end of the day you know so part of that too
is when people ask me sometimes they're stuck on a work thing or they want to work on or they have
an idea for an app and they're they're getting all these complicated layers of permissions and
this and that and i'm like but could you just use you know could you just use a detail view
right or someone was asking me something about a hospital app with all these different permissions
and logins and that and i was like well could you just use login and if the login doesn't work they
go to sign up like i think that would work yeah so it's like so you know you come full circle on
the simplicity yeah i mean okay yeah so what what's what's the episode about the episode's
about being an expert yeah and it's learning where the patterns are right so oh it is just
a detail view here and oh if i just use this permission you know if i just use the stuff
that django provides for like user passes test or something to to control the access here that
will work that will do well is there that saying that you know like a truly expert programmer or
there's some like graphic of you know given a problem like a beginner will just like dive in
intermediate person will i don't start stack overflowing and like a true programmer will sit
back go for a walk think about it and be like i've seen this before and just you know kind of
nail it yeah without getting so busy in the weeds but it is that pattern recognition and i think i
mean that's what's that's what's fun i mean i guess that that is sort of what is what does it
feel like to be an expert assuming either us is an expert it's seeing the patterns and going
yeah I've seen this before I see this as a flavor of something common because again it's if it seems
brand new to you it's not it's just you don't have the content this is why algorithms are so
fun actually I'm I'm probably going to write it I've sort of half written an algorithms book
because I find algorithms fascinating in that they're taught when you have no context like
your second undergraduate course and you're kind of like just memorize them and repeat it
but then as a professional you go oh my god like these are so useful if you know that they're there
and can reach for it because, you know, whatever performance thing you're trying to do, it's
probably an algorithm question, but you need to kind of know the algorithms, but you need
that mix of seeing the problems and then knowing there's a whole dictionary of answers out
there to use.
Yeah, I mean, okay, so I am constantly reading computer science books, have been for a decade,
but when I started, it was all like the Bash cookbook and classic shell scripting and all
these things.
And these days it's, you know, mathematics books or algorithms books or data structures books or, you know, these kind of things.
Why? Because they're dry.
They're really dry.
And, you know, but they help me get to sleep.
So anyway, but the point is that those things are...
I thought that's what Aristotle and the original Greeks were.
Well, exactly.
That kind of thing as well.
But those kind of texts are the ones that have the really transferable value.
But it's only, you know, 10, 15 years in that it's like, yeah, okay, you know, I really like reading those sorts of things.
When I started, you know, pick up an algorithm book, it's like this is totally meaningless to me because I was never – I was too busy trying to just wire some stuff together to ever think about the structure or, you know, is there a simpler implementation or, you know, the more interesting stuff.
Yeah.
Well, I strongly feel it—I mean, I am going to publish this book at some point.
I think it can—I think it doesn't have to be that way, because I think you don't have to make it a pure applied math book, which is—
what, you know, they are and make sense 15 years in. What you really want is you want sort of a
quick guide and a sense of understanding, oh, this would be served by a greedy algorithm. This would
be dynamic. This is, you know, to sort of be able to look at a problem and understand what bucket
it falls into. And then you can dive in and find the right one. I think that's the biggest takeaway
beyond knowing that there's a ton of algorithms. I mean, for example, like when I explain algorithms
and non-programmers i usually put it in the context of so there's searching and sorting
algorithms but at the end of the day you almost always want to get to a binary search so it's
really all about sorting algorithms i would say which i don't know which i've never heard anyone
say it like that but okay my take is that it's basically all about sorting and then what's really
cool is you have comparison sorts and you have non-comparison sorts so you say well if i don't
have to be 100 correct i can be you know a multiple faster in my uh sorting so it's like
well do i you know so you can ask sort of the architecture questions of like well is speed more
important or is accuracy more important what are the trade-offs and that's kind of what i would
like to be able to get beginners thinking like that even if they don't have all the math and
everything memorized because that's how that's how you and i would think about something right
it is all trade-offs, right? We say it all depends. It all depends, yeah. But how do you get to that
point where you can make a good decision? Right, but I think, yeah, okay, but I think this is where
you do need just an amount of exposure. So, you know, for instance, I don't know, the design
patterns books, OOP has sort of fallen out of fashion from when I started, but, you know, it
was always worth as a junior sort of slogging through the design patterns book or slogging
through the refactoring book in order to give yourself a vocabulary to talk with and then you
come up to a problem you'd be like oh this is a bit like the composite pattern and then it would
give you something to go and look up and it would give you a solution you'd be like okay i can model
it like that and it may not have been the best software in the world but it gave you a an answer
and the same with some algorithms if you know some algorithms or you know you know you know
if you're a beginner the algorithms aren't the place to look the place to go and read is the
that is the standard library um yeah manual and just go through each of the modules and sort of
have a look and see what functions are available and then and there is a great um book um what's
it called the python standard library by example it was um python module of the week was the blog
that was originally based on this became a book python standard standard library by example it's
a great book and it it's a really good way of learning some python and to see what's available
and all of a sudden say, oh, you know, I need to do this. Oh, well, look, there's a pretty print
module and you know, you can use it to, or there's a diff module and you, you know, which you didn't
know about. You'd never, you'd never even know to reach for it. How do you, how do you know to
reach for it? Like, let me give you an example. So I come from a liberal arts family and my family,
people read the dictionary for fun, you know? So what you're describing of going through the
Python, like standard library, that's like reading the dictionary for fun. I mean, I,
I read the dictionary for fun. Honestly, I don't read the Python standard library for fun
as much, but it is a similar thing. I think the question is more, you know, okay, if you're not
already wired for that, usually it's in the context of there's some problem that comes up,
maybe it's around time. And then how do you, how do you get to the right resource? You know,
this is where, you know, you know, cause time, time is complicated. Python has some nice packages
for it, but probably what you're going to do if you're a beginner is you're just going to go on
google you're going to find a medium post or something else or stack overflow that gives you
some code that sort of kind of works and you're not going to understand it and it may not be the
right solution but it's like a band-aid and then you move on and i think that's fine as a learning
tool but i guess we would encourage people to like go a little bit deeper like see how python
see if there's a built-in thing in the language see how it's created yeah at some point you got
to fill in the gaps right at some okay you know you can google you can find a thing you can paste
copy it off stack overflow paste it in and you can do that 50 100 times and you begin you're
getting there you're learning stuff but at some point you've got to fill in the gaps so this is
where things like um you know if you're talking about python there's a book fluent python which
yeah super you know amazing and it's it's massive it's like a thousand pages and i i read it on my
mobile phone in um on you know i never really i just knew it was taking a long time you know but
i was long i was i have it i have it yeah it's a but i was taking long bus journeys and i was
reading it took me months you know okay fine but i was learning loads of really cool stuff like
ah interesting interesting interesting and then i saw it in the physical copy and it's like wow
that's a doorstop but it's such a good book because it kind of fills in the background of
everything you need to know and then right when you come out of it you're there's another couple
i mean fluent python was one there was another one that well there's effective python i mean i
have actually a blog post on what i think are the best python books we'll link to uh there's well
there's python cookbook yeah which is learning learning python that's the um mark lutz i mean
i would say for well so for beginning python to me the top ones are the python crash course and
automate the boring stuff there's other ones those are the two kind of top ones and then if the next
step up i would say it's fluent python and the effective python um by uh brett slatkin is very
concise but just kind of mind-blowing in its quality okay but you know the thing is there's
only so many non-applied books that you can read you kind of need to balance you know okay here's
the theory and then here's let's build an instagram clone in python and django and sort of apply and
pick things up i mean this is what i think about as an educator i think about getting someone there
fast and then getting someone there you know i almost want to write a book that's like i could
do a whole book on a blog app where it's just like chapter one basic version chapter two like
they have 10 chapters and each time do it differently from scratch with more complexity
you know sanitize inputs was bleached do this do that but i think you kind of need it needs to feel
familiar before because if i just gave a complicated solution it wouldn't have any context for someone
yeah no that's exactly you've got it you've got to like not aristotle's got this line knowledge
has to be worked into the living structure of the mind and that's exactly it programming you can't
just pick up the you know the advanced solution and understand it that's the trouble with like
the the django cookie cutter type um project starter projects unless you are already there
they're too big they're too too all-encompassing you can't grasp what's going on and even if you
do grasp it's probably got nine lots of things that you don't want that you're not entirely
sure how to cut out and yeah well and this is you know coming coming to you know first principles
and simplicity as you advance in your career. I mean, I see more and more, yeah, just a basic
authentication flow. I could teach it five different ways. And it might be the most
beneficial thing to do that. Like, let's just keep doing it a little bit more complex or a
you know, at the end of the day, I mean, this is the mindset that you and I have, you know,
CRUD app, it's like, okay, what's the very first thing I think about? It's like, okay,
what are the, what's the schema? Get the models right. And then, okay, where's my list view?
Where's my detail view? Is there anything kind of tricky I need to do to get context data,
save, you know, maybe, maybe not. And then, you know, toss in the templates, the URLs and
good to go. But I can say that because I've, I don't worry about, well, how do I set up Postgres?
How do I configure my app structure?
You know, all these little details.
I guess it's the details that I view as just very downstream from, you know, the schema and the architecture side.
But you can't really get there until you've done it a bunch of times.
Yeah, and all that stuff, that's where the difficulty is.
It's like, you know, a beginner can start off, they can create a model, they can, you know, they might go a bit slower, but they'll get all that.
and then it there comes a point where the accumulate the accumulated knowledge that you
have to have to get this thing actually production worthy yeah yeah it's just too much and that just
takes time and that's just time on the coalface right and it's i mean it's i said it's frustrating
that it's not there aren't more resources on it and i kind of understand why because i mean i
wrote an entire book on this jingo for professionals but it could be 10 times as long uh as it is it's
almost 400 pages.
You know, there's a lot of sections
where I sort of take you as far as I can go
and then say, well, and here's where to go further.
But I guess it's that 80-20.
I mean, in that book anyways,
I tried to give you the 80 and show you where the 20 is.
I don't know, it's deciding
how much you want to polish the rock
that is your app.
Yeah, and also for something like a book,
there's no point going all the way
to the complete finished thing
because that stuff changes.
Whereas if you stick to the core stuff,
relatively stable it's like okay this is going to be more or less the same in you know a year
two years time whereas if you go right to the thing it's like oh but that's not the same that's
not the same that's not the same right well and this is why the you know foundational stuff becomes
more and more appealing you know all the way to like just pure applied math i mean things that
don't change that are i don't know eternal have more and more appeal yeah exactly so which so
which am i going to learn am i going to spend time learning the latest framework or am i going to
turn um spend time learning computer science fundamentals or you know programming language
fundamentals it's always going to be programming from the language fundamentals because that new
for you framework will have disappeared by the time yeah you know and but was those fundamentals
they haven't changed ever right but i think the problem uh the way it's taught in my opinion is
that they give you all the what you and i are excited about they give that to you in your first
like three or four courses and you have no context for it and it's a little bit in one year out the
other whereas i think there should be some sort of mix or well and actually what happens is that
you have a lot of people who in computer science programs half the you know an undergraduate level
half the folks have spent a number of years building crud apps and whatever and they have
a little bit of context so they can see how valuable it is they have that repetition and
then half are true beginners and it's just like what is this um so as a teacher you know you have
to balance both those which is hard but i i'm a big favor a big fan of context and theory together
um well i just wanted i wanted to raise one more thing right because you you um talked to the
beginning and this just ties back with what you were saying you talked at the beginning about um
how how it feels um and how beginners feel and how and how experts are more yeah it feels the same
um well no but how experts perhaps um are more real realistic about what they know maybe and
there's this there's this thing that i was just looking at it's the dreyfus model of skill
acquisition where you start as a novice you move to an advanced beginner and then you become
competent and proficient and finally an expert and one thing that there is at the beginning of that
of you know the novice advanced beginner stage is you perhaps think that you're
more advanced than you really are yeah yeah yeah and i think you know once you get to a certain
point you start to realize how little you do know and at that point you you're going to be more
successful just because you're you don't plow through blindly you're more kind of aware right
i mean i've seen that you know you'll see tweets and stuff that's you know a year or two in it's
like i don't know anything five years in i know everything and then 10 years plus the rest of
your career it's like i don't know anything yeah so it's yeah but i i so i guess i just want to
for beginners i want to say that it's it's a constant beginner mindset profession it's just
the challenges change a bit and the things that excite you you know things that excite me it's not
building a prototype of something because i know i can do that it's these more foundational things
are much more interesting but they certainly wouldn't have been when i was starting out
and it's ultimately this knowledge as you said of that you know expert almost anything we're
dealing with can be solved right and especially the older i get you know life is not like that
so it's sort of nice that code is like that there is some sort of solution but like yeah
but to keep this um there's this great book that i recommend to everyone called zen zen mind
beginner's mind and it's about keeping the the the mind of the beginner keeping open keeping
um you know aware of your that you're not don't or not being self-satisfied that you're there
and for me coding at its best is you know a very zen experience in that way because it's like
yeah i'm i'm really pushing my limits constantly and it's a lot it's an ongoing challenge and it's
an ongoing practice you know like tai chi or like tea pouring or like calligraphy or like any of
these other arts that they practice in the eastern tradition so you know it's kind of programming as
meditation you know yeah like let go of it all you don't know anything i guess last point i would say
is i find that you know what so what is it like being i'm almost 40 now i mean you're you're 40
what 40 41 42 next month 42 well you're 41 i you know again i'll use a doctor example right so
doctors are highly educated but they're kind of used to knowing what they're talking about
and it's interesting to see how i feel like programming keeps my mind pretty plastic and
that i'm constantly being humbled i constantly have a beginner mindset i just don't have any
laurels to rest on i don't i feel like i'm only as good as my next code and maybe not doctors but
But that's unusual as far as professions.
But I think it's, you know, I appreciate the challenge because it does, it keeps me kind of childlike, right?
It keeps me constantly frustrated, but also engaged and interested in a way that other careers, at least for me, I would be bored and, I don't know, calcify a little bit, I think.
Yeah, no, exactly.
For me, that's the, you know, that's the appeal.
Yeah.
All right.
Well, I hope that's helpful for people.
little bit of a different episode but i think i wish i had heard something like that when i was
starting out so if it resonates uh let us know at uh chat chat django on twitter we're at django
chat.com and we'll see you all next week bye