Blog Posts

Thoughts, tutorials, and insights on software engineering

Article

Most Useful Git Commands

A practical reference for the git commands I use the most. From stash tricks and interactive rebase to worktrees, bisect, and recovery with reflog.

GitTerminal
· 1 min read
Bash
git log --oneline --graph --all
git stash
git rebase -i HEAD~3
git bisect start
Article

WSGI vs ASGI Protocols

Comprehensive guide comparing WSGI and ASGI protocols in Python web development. Learn key differences, implementation examples, and when to use each protocol for optimal web application performance.

WSGIASGIPython web developmentWeb protocolsFastAPIFlaskWeb serversAsync programmingWeb socketsHTTP/2
· 1 min read
Python
def app(environ, start_response):
 start_response('200 OK', [('Content-Type', 'text/plain')])
 return [b'Hello, World!'] 
Article

Réflexions 2024

Un résumé des livres que j'ai lus et des choses que j'ai apprises en 2024.

ReadingLearning
· 1 min read
Markdown
> La simplicité est la sophistication ultime. - Leonardo da Vinci
Article

Concurrency and Multithreading

Understanding concurrency, parallelism, and multithreading. How threads share memory, why concurrency matters for performance, and practical patterns with async Python.

Programming
· 1 min read
Python
async def fetch(url: str) -> str:
 async with aiohttp.ClientSession() as session:
 async with session.get(url) as response:
 return await response.text()
Article

Python Virtual Environments

How to isolate project dependencies with virtual environments. Creating, activating, freezing requirements, and packaging Python projects with Docker.

Python
· 1 min read
Docker
 FROM python:3.7
 WORKDIR ['/app']
 COPY ['requirements.txt', '/app']
 RUN ['pip', 'install', '--no-cache-dir', 'upgrade', '-r', 'requirements.txt']
 COPY ['/app', '/app']
 CMD ['uvicorn', 'app:app', '--host', '0.0.0.0', '--port', '80' 
Article

Terminal Basics

A beginner-friendly guide to the command line. What shells, terminals, and commands are, plus essential operations for navigating and managing files.

Terminal
· 1 min read
Bash
 mkdir dir_name
 cd dir_name
 touch file_name
 echo 'foo' > file_name
 ls
 cat file_name
 rm file_name
 
Article

Python Basics

Python is a great language for beginners and experts alike. Let's explore the basics of Python. From modules, packages, scope, and more. Let's dive in!

Python
· 1 min read
Python
def outer():
 x = 'local'
 def inner():
 nonlocal x
 x = 'nonlocal'
 inner()

 if __name__ == '__main__':
 outer()