Transcript: Google Summer of Code - Sage Abdullah
Hi, welcome to another episode of Django Chats, weekly podcast on the Django web framework.
I'm Carlton Gibson, joined as ever by Will Vincent.
Hello, Will, how are you?
I'm good.
Hi, Carlton.
Hello.
And this week we have Sage Abdullah with us from Jakarta in Indonesia.
And Sage was a Google Summer of Code student in 2019, and he's been responsible for the
cross DB JSON field that we're hoping to land into 3.1, Django 3.1.
um hi sage how are you great how about you you're marvelous thank you for joining us so
we just wanted to have a chat with you and find out about yourself and um about what um how you
got into programming and about the work you did for google summer of code on django and your
experience there and all the rest so one thing we quite often start with is just how about you tell
us about your background and how you got into programming and perhaps how you found django
I'm from Jakarta, Indonesia. I'm in my third year as a computer science student at Universitas Indonesia.
And as Carlton said, I was a participant in Google Summer of Code 2019 with Django, during which I implemented a cross-DB JSON field.
um how i got into programming um i think i first started coding uh sorry i think i first started
coding uh in the seventh grade um i believe it was java but i didn't get past basic input output
um though that's my experience with java as well yeah it's about to say that's that's everyone's
experience with Java now? Yeah, I remember the book jumped straight to GUI after the Hello World
console, I think. I don't know what book that was. I don't remember. But I didn't continue after that.
And in my ninth grade, I learned HTML and CSS, as everyone. And I was already familiar with XML
Well, in my sixth grade, I used to mod my Sony Ericsson phone back in the day.
Oh, wow.
Just hacking some stuff, the layouts and stuff.
And then I continued to the JavaScript course, but it hurt my brain at the time.
I think it still does, actually, with the modern JavaScript stuff.
It's not Python for sure.
Yeah, it's not Python for sure.
And then in high school, in the 10th grade and 11th grade, I learned Pascal to prepare for the National Science Olympiad in informatics.
Problem sets used Pascal mostly. I know it's quite ancient, but that's what we use.
You know, that's kind of cool because I know, you know, I know people who know Pascal, but they're all quite a lot older.
Yeah, so I learned Pascal for the National Olympiad in Informatics.
It's basically discrete maths and competitive programming.
So I learned a bit of C and C++, though I have forgotten a lot about that.
And I only got through the provincial level.
While the national winners, they will be delegates for IOI.
the International Olympiad in Informatics,
but I didn't get past that.
I only got through the provincial level.
So for Python, it's quite a long story,
but it's quite relevant to my GSOC experience.
So if you don't mind.
Yeah, we've got time. We want to hear.
Yeah. Okay. So in my 12th grade,
the final year of high school,
There was this competition by Wikimedia Indonesia called Besut Kode. Kode is Indonesian for code.
It's an open source software development competition for high school and university students
to help prepare them for Google Code and Google Summer of Code. So it's basically a
mini-fight. It's like a mini version of GCI and GSOC for students. It's divided into
for high school and university students. During the competition, we were mentored by
John Vandenberg. I don't know if you've heard that name. He's from Wikimedia Australia. He's
currently a maintainer at koala the uh code for matter okay okay so there's a lot we haven't
heard of though so yeah there's so many somebody somebody uh somebody suggested using koala instead
of black uh in the mailing list i think i remember reading that oh i missed that i missed that there
so many suggestions okay okay yeah anyway um so for the competition um we used github classroom
and and so how the competition worked uh basically we forked uh public repos into our private ones
and then we fixed some bugs and code style issues there and once our mentor approved our fixes
we could send the rs to the real repository okay that's kind of that's fantastic that's
kind of nice that's like a sort of sandbox where you can yeah um i i think uh our mentor uh was
kind of afraid of you know letting the kids out there uh we were basically under the we were
minors so yeah he didn't want us to communicate uh directly unless we actually have some real work
yeah yeah fair enough okay um so during the competition i learned how to use linters and
ci services to integrate them and one of the repos i worked on was the media wiki parser from hell
it's it's the name you can look it up on github and it's built on python uh but during that time
i didn't know python at all and i mean i could make sense of things i could read the code but
fixing the code style was quite tricky because i didn't know if what i'm fixing does not break
anything yeah right okay so yeah that was my first experience with python but uh ever since then i
well can i ask can i ask you can i ask at that point like so could you say you've you've mentioned
java you've mentioned pascal you've mentioned c you've mentioned c plus plus right and then so
you come to python and one of the things you know people sometimes use it in textbooks and they say
the reason we're using python in this textbook it's not because you have to do this in python
but because if you know any other programming language you can read python you might you know
you may not know every details but it will make sense to you and yeah like from those those kind
of much harder languages like they're much more pernickety i think like was it not like how was
that first learning experience that first like oh okay i see you know okay so uh reading python
code uh was actually pretty easy but uh i didn't have time to actually learn python at that time so
uh it wasn't until my first semester at university uh in which uh we actually use python and
coming from pascal and java python is uh it's it's a breeze really it's so much easier to learn i
could i don't know it was such a relief i mean um so before i got into university i was actually
not really sure if i want to go into the computer science path because of my experience with pascal
and java and i was like no it's it's not very it's not a very good experience i mean uh it's
not very easy you know yeah but when i actually learned python i was like oh i didn't know things
could be so much easier i mean like sorting and stuff you know but you got through it i mean
because i came at i learned how to code when i was quite a bit older than you are now and python was
my first true programming languages and then later i i filled in a bit of java and c um and c and you
know in comparison i was just like what am i doing like why would i ever you know as hard as it is to
learn python you know there to go the other way i'm just like no i'm not gonna learn ancient greek
you know it's like what carlton spends his time on so i'm always impressed that people can get
through the and in the united states as well there's still quite a bit that at the high school
level if they have anything which most don't it's in java i believe is what the ap exam that's like
the um advanced placement so yeah but it's i'm impressed anyone can get through those other
languages they're just they don't make any sense to me yeah and um the thing i love about python is
that with the things I learned in the first semester I could actually build
some pretty cool stuff that that's actually useful in real life you know in
a in a short time I built a chat bot on line it's a I am apt we use it's by
never if you've heard about it but I think it's not widely used outside Asia
but uh anyway uh i basically built something like an irc chatbot using python and it was
really cool because um i was only in my first semester and uh seeing that i can actually build
some stuff that is actually useful is is really good yeah yeah i think that's what it's all about
like you i mean that in in my books and tutorials i generally try to get people to build something
and then kind of backfill all the information
rather than making him do it the hard way because...
most people aren't programming for the sake of programming, you're programming because you want
to build stuff. Yeah, exactly. So did you, so what, how did you learn how to build like an IRC?
I mean, how much mentoring did you have? Because that's something that it's easy to say, but like
where did, was there a person or a class that taught you how to do that? Did you Google around?
What was that process like as a beginner? Oh, okay. So what I built was a chatbot. I mean,
can use like slash something i mean i can connect my code with apis like a weather api and then i
can just slash weather jakarta and then i would get the output i mean uh if we are i mean in
university we are only uh thought about like string processing and using uh conditionals
and loops but i take it a step further by utilizing packages on pipey um i've uh with
my experience during the competition in high school uh the visit code competition um i learned
how to use pip and stuff so uh from there it's basically just uh pip install something yeah i can
just uh i can connect to some uh web apis using requests and just uh get some data and then
once i've got the string that that i want to send to users i just hook it up with the line api um
basically it's uh if you've heard about telegram just just imagine a telegram but yeah just like
like that I mean it's a it's not very hard if you have uh experience I mean actually it's not
about experience it's more about uh the fact that you want to read that you're not lazy to read the
docs I think yeah and just google around well I'm impressed that you've you know you came into
university at that point where you you knew that you didn't have to write everything yourself that
there are these packages that it's the superpower of any language, but especially Python. Because
I think that is when people are, because I deal with beginners, when they're just starting out,
they think they have to write everything themselves. And there's no sense of, it's
almost like I make the analogy of shopping at a grocery store. Like you can just pull things off
the shelf that way smarter people have built like Django, and you can just use it and you don't have
to understand all of it yourself. You just need a teeny bit of understanding. But getting to that
point that's what i'm as a teacher always interested in because i think on some level
you just have to build a bunch of stuff to understand that requests exist that you know
again you don't have to do everything from scratch and then so you know when because
beginners will hear oh i prototyped something in a weekend and they think well how is that possible
but you know you pull down three packages from pi pi and the actual code you had to write isn't
that much but um it's it's a leap for people to get there so that's great that you were at that
point yeah that's that's actually what i what makes me love python because um back in high
school i was using pascal and even to implement a sourcing um method uh i didn't know that
there are also libraries i think i believe there should be a library for pascal but for as well
But since I was learning programming for competition, it was more like more about implementing the algorithm that is actually already built in most programming languages by now.
yes yeah um programming felt hard um in high school for me because uh it wasn't about building
stuff but it's more like uh designing the algorithm and that's way harder yeah i think
they teach programming completely backwards i mean everyone does but they make you do all that
hard foundational stuff first with no context and then in practice you rarely use it and the times
it which you would need to use it is when you're at google or something and you're well into your
career and you have huge challenges and so people think that programming is discrete math and
memorizing and and it's it's really more playing and sandboxing i think i don't know carlton what
would you say i do believe that it's important though um i mean to learn yes at some point it's
still important but um if you're learning uh if you're starting to learn programming uh it's
it can be intimidating i guess i mean and in your so you're doing computer science and so they they
you have to do all that right you have to go through the algorithms course yeah in my third
semester yeah you implement all these things but in python now uh so um in my second and third
semester uh we use java for the object-oriented programming stuff and the data structures and
algorithms we use java but um in the third semester uh we learned web design and programming
we use python and that's actually how i got into django as we use django okay that's fantastic
because many i'd say i'm i would say most universities in the united states don't teach
web development as part of the core curriculum so they just don't teach it if they do it's an
elective, um, where there's really no resources. And, um, so that's fine, but I think it's, you
know, the web is pretty important. I think it should be part of the curriculum, but it really
isn't in most American programs as that I'm aware of. So that's good. So did you, did they do flask
or did they just jump right to Django for your course? Oh, okay. They just jumped right into
Django. But, um, since 2019, I think since last year, um, flask is being taught in the first
semester uh near the end of the semester um as a final project yeah there the students are asked
to write a simple web app using flask so i have so many questions about google summer of code
because i don't know much about it and i suspect most listeners don't either though you just went
through it carlton you've been mentoring it for quite a while well no so what is like last year
was my first year like so yeah so oh i thought you've been doing it for a while no no no like
last uh like february before last tim graham put an email on going well are we going to do google
summer of code now you know and lots of people prospective students said oh yeah come on we want
to apply we want to do it so okay i put in the application it was my first year going through it
um it was a bit it was a bit like this year i've had a bit more warning so i was sort of mentally
ready for it to come up um but yeah it was it was like oh okay let's let's put the application
let's review the review the applications it's you know let's get it going from the from the
mentor side how many like how many applications come in what's that process and then sage i want
to ask you because you wrote a fantastic proposal but you know what it was like on your end because
the the deadline's coming up for this year i think it's march 31st yeah yeah so it's the end of this
week really um but so we we had like about i know 50 or 60 people putting applications of which we
had mentoring capacity for two um and you know because that's our biggest issue is like is mentors
because the code base is quite mature and there aren't that many people that know it super well
and those people need to be available and have time and so you know we could we could take on
more applicants but it's it we just can't so you know who was it was you marius adam johnson and
there was a fourth yeah um oh rafael rafael um yeah so and yeah we just um helped out with but
yeah so that's our issue and so this year i'm going to put an email on the the list this week
saying come on we've got some good projects we've got some good proposals coming in have we got the
mentors to be able to and you know depending on the developers list you're gonna put that on um
and depending on how many responses we get for that and how many you know because
you know i can help um you know guide a student but you know the depths of the migration framework
for instance you know i need marcus or i need simon to to have the time and the capacity to do
it and if they can't then we can't take on that project it's just that's just the reality of it
so where was there and again i apologize i'm so ignorant but was there were there two students
last year or is it just saved yeah so path path as well path patel did one on the form um form
sets cell phone forms okay we'll we'll link to that um so sage what was your what was the process
like on your end we've linked to your proposal um but what was the and i know you i think you
you mentioned this in the proposal but why why cross um database json field why what what made
you think of that for django oh okay so it wasn't actually my idea i think carton did you write it
I mean, I believe it was in the mailing list.
I read about it, the discussion with Tim and some other folks.
But so in Google Summer of Code, the organizations also provide a list of ideas that students can,
they can either pick one of those ideas or they can create their own idea and submit a proposal for that.
But in Django's list of ideas for GSOC 2019,
the top of that list was the CrashDB JSON field.
I'm not sure if that was actually sorted by priority or something.
Right, what the sorting was.
So personally, in my experience,
um so during my web design and programming course in the third semester um i came across the need of
a json field to store some small data for the user to be fetched by javascript and it's just
it wasn't worth it to store it into the model and i just want something quick that can be loaded by
JavaScript. And I thought that something like a JSON code would do the job. And I looked it up.
It turns out that Django has it, but it's only for Postgres.
Right. And this is the case for a number of features like
search and a whole bunch of other ones. Postgres has more support than the other databases.
module yeah yeah um so uh i was actually using postgres uh but okay so let me just explain a bit
um in the course we were required to deploy our apps to heroku um i think it didn't have to be
heroku but it was recommended because it was easy just to set up a small app and so that the
teachers and the grading team can you know can assess the web app and we use GitLab and deploy
our web app from there to Heroku. On Heroku we use Postgres because it's not possible to use
sqlite as heroku has this ephemeral storage that basically gets rewritten if you deployed your app
and so the only not the only but the recommended option was to use heroku postcards so it was
technically possible for me to use the json field on heroku but i use sqlite on my local laptop and
I hadn't learned about databases at that point, and I only know that you can store data in it, but
I haven't installed Postgres on my machine, so I just wanted something that can work on both
SQLite and Postgres. So seeing that there's no such option unless I use something from third-party
packages. There are tons of, well, not tons, but there are some JSON-filled packages out there.
But I think it didn't worth the effort because I just wanted something quick.
So what I did was I used a text field and then basically just JSON dumps and JSON loads to it
using the built-in Python library to serialize Python dictionaries into JSON strings.
that's what I did. But, so that was in my third semester. It was until December. And then I have
been thinking about joining Google Summer of Code since the, actually, I have heard about Google
Summer of Code since in high school during the competition with Wikimedia. So I was already aiming
to participate in Google Summer of Code because okay so I also participated in
Google Code and it's basically the high school version of Google Summer of Code
and I was in my final year as a high school student and it was there was a
lot of exams and tryouts so I didn't have time to fully commit into Google
code in and I didn't win the grand prize and so I was like well there's still
Google Summer of Code I have to join it when I got into university so in my
first year I actually signed up on the Google Summer of Code website but I
didn't write a proposal because I didn't know what organization and what project
I could work on because I was only in my second semester. I only learned about, I just learned
about object-oriented programming during that time. It was the first time for me and I don't
think I have the knowledge to participate in GSOC during my first year. So I didn't submit
a proposal, I just wait for the next year. And then the next year, after finishing my third
semester and entering my fourth, I read about the Jason Field idea on the mailing list of Django.
Okay, so I think I actually read about it in the... I think Carlton has put up the
gsoc list of ideas way before that and uh i read that page when it was still under development it
was uh i think some of the what does the uh django wiki uses uh is it markdown yeah it's
no it's not what markdown it's i i don't know there's probably some technical name for it but
it's this weird wiki high syntax thing which i'm terrible at it always takes me like like like 10
minutes to type it up and then like three hours getting the formatting exactly correct not because
it's particularly hard just because i don't know it yeah i saw that uh there were still uh syntax
errors so that the formatting didn't uh show up properly and i was like well you must have been
the first one there though probably because uh because i was uh i wanted to participate in google
summer of code so bad but i didn't know what project i should work on and after taking the
web design and programming and use django i loved it and i feel like maybe i can contribute so
um i've been reading a lot of the past uh google summer of code uh for django there wasn't much
information about that i think django didn't accept student the previous year yeah there'd
been a one or two years without any students like i mean but you know there's been a long history
where you know a few students each year and then a couple of years off and then you know i think
that's more to do with people power than anything else yeah so i wanted to see if any projects were
selected during the in the previous year but it turned out that there was an any in the past two
years i think and uh so i was skeptical at first but uh when i saw that wiki page wiki page that
you uh wrote um i read about the json field idea and i was like this is what i needed last semester
and yeah no yeah your story is so good as well because like to to use a text field and just
serialize the json into it like that's what the third-party packages out there have done for years
and years like django json field and what it's just a text field and it uses json dump and json
load and that's fine and that was discussed years ago yeah yeah on the on the issue tracker and it
was closed there's no we don't want to feel that that's not that's not good enough you know that
can just be in a third-party package that's not going into court but then in between that post
cross postgres got json field and then like mysql got it and oracle got it and sqlite got it so
all the supported databases had it and so it was like right now this is time and
so it was perfect for sage to come along yeah it was it was uh i don't know probably i mean
in my blog i wrote it it's probably destiny or something yeah i mean it was just so conveniently
happened and i don't know it's just it's like a miracle almost so in your proposal you'd
And I'm sure this is was part of why you were chosen beyond picking a good project is you'd already submitted some patches to Django itself. I'm curious if you could just talk about because I mean, Carlton and I spent a lot of time trying to make that easier for people, you were able to figure it out. What was that process like for you figuring out how to submit? I think it was at least two patches that were merged in. How did you? What was that process like?
Okay, so I may be a bit biased because I have previously contributed to open source projects previously, but however, I think that the most important part that if you want to contribute to open source is basically don't be lazy to read, seriously.
I mean, there's a lot of things to read, but it's actually, some of them are actually pretty laid out that if you actually read it, you can actually contribute.
But I think one of the things that may be off-putting to some people is that, yeah, it's pretty long. There's a lot of links.
i mean um let's say you are reading the uh contributing guide and then uh it says that
if you want to learn more about this you can go here and then you read along and then there's
another link and it's it may be a bit overwhelming because uh some people may have not be
uh very familiar with all of the things that's put out in the guide but yeah it's like five or
6,000 words in the contributing card, which is...
I've almost thought, Carlton, I haven't mentioned this to you,
that if you froze Django 3.0 and you had a dummy version
that people could fix a documentation ticket or something,
thing where they could you know feel like they merged something even though they didn't just to
get over that hump of this is a longer term project for me but i you know to get some sort
of quick win instead of it's a lot of words and will django even take it i don't know i mean as
you said sage so if you know because that if someone hasn't contributed to open source before
It is intimidating, for sure.
Last month, there was this event by one of the Pandas maintainers,
Pandas, the data science library.
So Pandas has this thing called Documentation Sprint,
in which you can contribute to their documentation.
even small contributions like fixing a missing period in their documentation
but the thing is I think it's easier for pandas because the documentation is
actually built into the code itself using the doc strings and then there was
Because they use a lot of tools that can analyze which parts of the documentation need fixing,
like what rules are broken in the documentation for each functions.
And for pandas, the documentation is mostly just descriptions of functions that are available.
But for Django, we have the guide type of documentation, like tutorial types, and we
also have the... I mean, it's more... it needs more explanation. I mean, more examples of using...
I mean, you can just call a function and expect what it returns like what's in pandas.
For Django, it's a bit different. So the same approach for the document for... I mean, if you're...
if you want to do documentation sprints for Django, it may have to use a slightly
different format because of the way the Django documentation is designed.
And also probably not a lot of people is familiar with RST.
Yeah, Restructured Text. It can be tricky. I've recently, like, you know, a couple of years into
of fellowing i'm just coming around to it because you can do the cross-linking between
attributes and things like that whereas markdown doesn't have that and i kind of like it
but yeah it's there's a learning curve again it's like another one of these markup formats
you have to learn yeah but that's just for documentation though i mean if you're talking
about more about code document code contributions I think okay so before
that for the contributing guide I think what can be improved is from I saw that
there is a another page that is specifically for new contributors
So that's a good start, but I think if we can have something like a step-by-step guide that is more, I don't know, more, what's the word, more simple and just maybe we can have some screenshots like describing the process of, for example, forking Django and then cloning it, installing it into your virtual environment.
and then creating a comment.
And then until you have this screenshot of a pull request,
probably it's a bit more easy to understand
because, you know, people can imagine it more easily
by looking at the screenshots and seeing what is happening
when you are contributing, probably.
I mean, I don't know about that.
No, I think that's fair. I mean, a couple of DjangoCon sprints I've been at where trying to get people up and running and, you know, just working through that first tutorial is difficult.
Yeah, also for track, the tickets, I think you can improve it by adding more labels for the difficulty.
So it's not just easy pickings or not, but maybe easy, medium, and hard.
So, I mean, right now it's basically just either it's easy or it's not.
and the not easy part is like it can range from like really hard or not far off from easy picking
actually so yeah yeah no there's lots of tickets which are not rocket science but then there's some
which really aren't exactly yeah well i was telling uh sage that's i mean like as we discussed with
mikey ariel about a docs fellow or someone who can come in with fresh eyes and have that perspective
on all the stuff yeah i mean yeah no i mean there's a big tar i mean for instance the advice
to new contributors i point people to that but but that's in a way that should be front and center
and isn't and that's a kind of information architecture problem that's it's not that
the content isn't there there's a tutorial on creating your first patch where you know
you go through and you do a fake ticket and you kind of you fix a bug and it's like okay that's
That would be how it worked.
But that needs to be brought out so it's easy to find.
There's also another program called Season of Ducks.
Did Django participate?
We applied, but it was the first season,
and they said they had, like, you know, 300 applicants in 14 places or something.
So we didn't get in last year.
But if it comes up again, I will apply again because I think it's a good –
it's something that – like, so, you know, if you look at the track,
the big things on the tickets are, like, the ORM, the admin,
and then documentation.
there's lots of documentation tickets that we could fix and there's lots of issues that perhaps
we could resolve also some of my friends uh have asked me like how to start because uh they were
also uh interested in contributing and some of them actually uh are looking to apply for google
Summer of Code with Django this year and they were having troubles with finding
tickets that they can work on because yeah it's it's like I said between the
easy things and not we cannot really know which tickets are actually doable
just by reading the description sometimes we have to actually know the context um yeah yeah yeah no
it is tough it is tough like i always say to people look so i try at the django cons i've
tried to run a sprint and a workshop where we um get people contributing and i say look it's okay
so here's how you can filter and show people filtering the track but then i say look find a
ticket that kind of grabs your attention and then spend some time with it and that's the difficulty
is that you do actually have to spend the time digging into the ticket and finding out what it's
all about in order to work out if you can address it well we're we're coming up on time is are there
any um projects or other things you want to talk about sage uh okay um can i have uh something more
to say uh i'm just it's it's just an advice for um students looking to participate in google summer
of code, or basically not just Google Summer of Code, but more into open source in general.
If you think that you cannot do it, well, the truth is you probably, you, I think most
likely you actually can, because when I wrote my proposal for JSON field, I haven't actually
learn about databases and I had never executed an SQL statement into a DBMS terminal before and
yeah it was actually I was just reading the docs and just imagine how it would work but
I didn't actually know what I was doing but thankfully it in the end it worked so
If you feel like you're not, you feel like you don't have the capacity or you feel like your experience is not enough or something like that, it's basically just put those thoughts away and just, I don't know, believe in yourself, I guess.
I hope this podcast and your experience helps even more people apply, you know, this year and going forward, because if there are mentors like Carlton and the others who are generous with their time, it, you know, makes a big impact on Django.
And it's a good experience for people to get into the Django contributing world who maybe wouldn't have otherwise.
Yeah, no, entirely.
I mean, Google, I think Google Summer of Code has been a big boom for Django over the years.
big thanks to sage for well a coming on but b your efforts um putting together the um cross
tb tb jason field because that should be going to django 3.1 and it's going to be a great tool for
everybody like this exact example is the one that i have in mind of using sqlite locally just quick
development oh i can just i don't have to spin up postgres just to prototype something and then
yeah okay i'm going to move on to postgres at a later date so it's just super and yeah and you
know oracle and mysql as well yeah great well sage thank you so much for taking the time to come on
and and your work yeah thanks sage yeah you're welcome thank you so much for having me right
that was django chat join us next time