Serhat Teker

Serhat Teker is the software engineer who wrote these articles.

I created this Tech Blog to help me remember the things I’ve learned in the past, so my future-self doesn’t have to re-learn them in the future.

               

How to Set Permanently $PATH on Linux/Unix

2020-01-09 — One minute read
#bash  #zsh  #linux  #unix 
You’re trying to add a directory to your $PATH so it will always be in your linux $PATH and accessible anywhere. You can add your ‘path’ to $PATH with below command: $ export PATH=$PATH:/path/to/dir However each time you exit the terminal or start a new terminal instance, or reboot the system this path is lost and you need to run the export command again. To set it permanently follow one of the two below:

How to Use UUID as a Primary ID in Django Models

2020-01-02 (Edited: 2022-04-26) — 3 minutes read
#python  #django  #uuid 
Intro In Django whenever we create any new model, there is an ID-or PK, model field attached to it. The ID field’s data type is integer by default. To make this integer id field UUID, we can use UUIDField model field, which was added in Django 1.8. UUID A universally unique identifier (UUID) is a 128-bit number used to identify information in computer systems. They are commonly represented as 32 hexadecimal characters separated by four hyphens.

How to Install Python 3.8 on Ubuntu

2019-12-25 — 2 minutes read
#python  #linux  #ubuntu 
This brief tutorial shows how to install and configure Python 3.8 on Ubuntu. There are 2 methods to install python on Ubuntu. I prefer first method and strongly recommend that but it depends on developer’s taste. Method 1: Install It From Source Code I prefer this method since I’d rather always go to source, whether it is documentation for an API or installing something. Out of the box default python version for Ubuntu 18.

What does if __name__ == “main” do in Python?

2019-12-16 (Edited: 2021-05-02) — 3 minutes read
#python  #foundation  #fundamental 
An introduction to the name variable You probably seen the name variable if you’ve gone through some python open source code. For instance below: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 #!

How to Upgrade to Python 3.8 on Ubuntu

2019-12-09 (Edited: 2022-04-26) — 2 minutes read
#python  #linux  #ubuntu 
In this article, we upgrade to python 3.8 from python 3.6 and configure it as the default version of python.