Python: Multithreading, Multiprocessing, and the GIL Explained

One of the many things that make Python such a popular and powerful language is that you can easily divide your code into multiple concurrent threads rather easily, take this for example:

from threading import Thread

def thread_func(n):
    print(f"I'm thread number {n}!")

for t in range(4):
    t = Thread(target=thread_func, args=[t])
    t.start()

4 threads! Easy, right?

Well, not exactly.

Continue reading

Programming Isn't a Skill, It's a Mindset

Spoiler Or as those darn scientists insist on calling it, ABSTRACT: A programmer isn’t someone who can write code, a programmer is someone who can think. When most people speak of, are told of, or think about, a “programmer” as an abstract being, they either picture one of two things: Either someone in their favorite all black gear, sunglasses, and a lime green-on-black terminal window open with lines flying by (see also: hacker), if they’ve watched too many movies, or someone sitting at their computer with a text editor / IDE / pick your favorite app, typing code into. Continue reading

Minor Rant: Linux, Scripts, and SetUID

You know the feeling when a system that you’ve used for years, and trusted, suddenly throws a curveball at you with a fun “Yeah you know this simple and concrete rule that’s never broken? Well in this one exception, it is, and nobody ever points it out. Have fun!”

Continue reading
Newer posts