100 days of python
When I finally able to grasp basic coding with Python, I want to continue my learning journey to master WebGIS and data science (my ultimate goal is learning 'Big Spatial Data'). After a quick research, I found that Python has a web framework named Django, and it contains GeoDjango application for developing a GIS web.

Furthermore, I noticed that Django is a powerful web framework and well known for rapid deployment. That made me want to switch the gear a bit, I want to dive into web development world, before continue learning WebGIS and data science.

The very first thing I did to get a good Django learning materials was searching for a free book about Django. This led me to the Packtpub, a book publication company that sell their books online.

Interestingly, Packtpub has a program called Free Learning. Everyday, they give a free access to a programming book, and today I have more than 50 book collections primarily related to Python. One of that book is Django By Example (Antonio Mele). This book teaches us to build a blog, social media website, online shop and Django API.

The new edition of the book (Django 2 By Example) is now available. If you love to learn from a book, I can say that this book is worth to have.

Start learning Python from UNLIMITED Books, Videos and Tutorials!


However, learning a programming language from a book is not my cup of tea. Just as I finished the first part (building a blog app), I get bored and couldn't maintain my pace. Sometime I skip learning Django for a couple of days and that didn't make me comfortable.

I need to find a way that force me to code Django regularly and I need it badly. YouTube is definitely the place to search a wide array of free coding tutorials. When I typed 'Django Tutorial' I found Thenewboston channel and I started following it immediately.

I mentioned that I want to maintain my pace of learning Django, and I really mean it. Unbelievably, I came across a challenge on Twitter named #100DaysOfCode. This challenge was initiated by Alexander Kallaway in which basically encourage any programming language learner to make coding their new habit.

Anyone committed to this challenge, must set up at least an hour of code for 100 days. I jumped into this challenge on 28 June 2017 and manage to finished it on 8 October 2017. I followed about five different Django tutorials on YouTube during this challenge. In my opinion, Try Django Tutorial by CodingEntrepreneurs (Justin Mitchel) is the best. It explores Django deeper than other tutorials and the tutorial leads us to build a real life web application. My favorite part of this tutorial is his in-depth explanation about Class Based View in Django that I didn't get from any other videos.

Before I started my journey learning Django framework, I was informed that Django is a large, powerful and scalable web framework that required steeper learning curve. I experienced this steep learning curve during my first 60 days of coding Django.

Even though I was able to follow the video tutorials, but nothing seem to stuck in my mind. When we start a new Django project, suddenly we have folder and files in our project folder. These files and folders will be doubled when we create an app. All tutorials appeared to jumble up urls.py, views.py, models.py, forms.py and html templates.

And to make thing worse, I found some template files were stored in a folder below a project folder while other were stored inside an app folder. A similar situation occurred with static files folder, a video tutorial suggested that we create two folders to accommodate the static files and than we must run collectstatic command. My brain was overwhelmed by all of those facts.

Eventually, I can see the silver lining when I started following Try Django tutorial. Everything started to make sense for me when I followed the function based views lesson. A function in views.py receives a URL request and returns the URL requested by a web visitor and a template to be rendered.

This simple mechanism occured when the web page is a static page. However, when the page is dynamic, Django views will render the URL, template and context. This is where the interesting part begin, because context can be loaded with forms, objects from models or other data.

Beginning Django
Discover the Django web application framework
and get started building Python-based web applications

Gradually, I began to grasp how models, forms, templates, static files, admin and settings work. As my #100DaysOfCode challenge drew to an end, my apprehension of the Django structure was getting stronger. Nonetheless, I haven't been able to build any website from scratch because there are so many coding detail that I haven't fully understand yet.

Actually I really want to continue the challenge by doing #100DaysOfCode round 2. Unfortunately, I have a baby and he started to crawl and then walk. He needed more attention from me particularly on the weekend. This made me so difficult to spare some time on the weekend to commit with the challenge.

I can only continue learning to code on the weekday between work time for one to two hours. I decided to repeat two YouTube tutorials and learn from a Django tutorial on Udemy because I got a really good discounted price. The tutorial from Udemy provides far more detail lessons than any tutorials on YouTube.

Enroll Nanodegree in Programming with Python Now!

I finished the Udemy tutorial in more than 100 days. The tutorial guide me deeper into Django 'magics'. The most common confussion faced by a new Django learner is that we always type 'from django.abc.xyz import Something' on the top of a py file. And suddently this 'Something' do magical things in our code.

By practicing Django from Try Django and eCommerse from Udemy, I gradually discern where do they come from and what do they do. Another lesson that I found difficult to understand is Django model. It was quite straightforward when we created fields, put the model to the admin page and added new records. But it was quite confusing for me when we wanted to show the database to a list view and detail view.

I had to deal with queryset, objects, template tags and all short of things that I must configure in urls, views, forms and templates files. Luckily, Justin's videos explain those things comprehensively. He explain this process more detail by using Django shell to access the database by using command line.

Learning Python and Django Framework has been very amazing experience for me. For the first time in my life, I learn a new skill and knowledge on my own. My favorite part building website using Django is that Django models take care all kind of stuff related to database connection. I don't have to worry to much about SQL syntax. I know that there are so many things that I need to master quickly such as REST API, docker, celery, Selenium, AWS and so on. However, this journey made me so optimistic to reach my ultimate goal, switch career as a programmer.



0 Comments