GridRoyale - A life simulation for exploring social dynamics Another day, another project :) This is a project that I wanted to do for years. I finally had the opportunity to do it. Check out the GridRoyale readme on GitHub for more details and a live demo. GridRoyale is a life simulation. It’s a tool for machine learning researchers to explore social dynamics. It’s similar to Game of…
Live-coding a music synthesizer After so much work and waiting, the video of my EuroPython talk is finally released! This is a fun live-coding session using NumPy and SoundDevice. The goal of this talk is to make the computer produce realistic-sounding instrument sounds, using nothing but math. The talk starts with creating a simple sound using a sine wave. We gradually make it sound more like a…
Quick project: Guitar tuning peg turner Here’s a cute 3D printing I did on a whim a couple of days ago. I wanted to change the strings on my acoustic bass guitar, so I’ll have crisp sound on my upcoming talk Live-coding a music synthesizer on EuroPython 2020. Do watch it, or watch the YouTube video after it’s released. To change my strings, I need to unwind the old ones all the…
Improving Python exception chaining with raise-from This is going to be a story about an esoteric feature of Python 3, and how I spent the last few months reviving it and bringing it into the limelight. Back in the yee-haw days of 2003, Raymond Hettinger wrote an email to the python-dev mailing list, sharing an idea for improving the way that Python handles exceptions that are caught and replaced…
Symlinks and hardlinks, move over, make room for reflinks! If you’ve been around Linux for a while, you know about symlinks and hardlinks. You’ve used them and you know the differences between how each of them behaves. Besides being a useful filesystem tool, they’re also a favorite interview question, used to gauge a candidate’s familiarity with filesystems. What you might…
Make your 3D prints stronger with titanium rods I’ve been doing 3D printing for a few years, and there’s a technique I’ve been using that I thought I should share with the world. This was also a good opportunity to make my first YouTube video. Enjoy :) Affiliate links to equipment I used in the video: • Pin vise • Heavy-duty, keyed pin vise • Jeweller’s vise • Medium-sized…
Mike Driscoll interviewed me on his blog I recently had the pleasure of being interviewed by Mike Driscoll on his blog, The Mouse vs. The Python . Mike is well-known in the Python world and especially in the wxPython user group. He often posts tutorials for beginners on his blog, and it’s happened serveral times that I googled a technical question and found the answer in one of his…
PythonTurtle makes it into Saudi Arabia’s official state curriculum I just heard some very exciting news. Six years ago, when I was just starting out my development career, I made a little program called PythonTurtle . It’s a program that helps children learn how to program in the Python programming language , which is the programming language that I use it my day-to-day work as a web developer. I…
Christoph Gohlke’s awesome collection of Windows binaries for Python packages Today I needed to upgrade the psycopg2 package on a Django app of one of my clients. Without giving it a second thought, I fired up my browser and started typing goh in the omnibar. I quickly got Christoph Gohlke’s page, which is on my favorites: http://www.lfd.uci.edu/~gohlke/pythonlibs/ What is this? It’s a page…
Startup lesson learned: Work vertically before you work horizontally In this blog post I’m going to share with you an important lesson that I’ve learned about startups. I’m happy to have learned this lesson in the beginning of my career as an entrepreneur, about a decade ago, because I got to apply it in all the projects that came afterwards, both my personal projects and my client projects. The…
Code comments that I find helpful I’m a huge believer in code quality. When I write code, I put in a lot of effort to make it be as easy to read and understand as possible. Because code is read much more often than it’s written, by writing your code in a way that’s easy to understand you’re saving lots of time for the developers who are going to read your code in the future (one of them being…
My new open-source project: Combi, the Pythonic package for combinatorics I’m proud to announce the first release of my new open-source project: Combi! Combi is a combinatorics package for Python. Combi on GitHub . Combi on PyPI . Combi documentation. Combi is awesome. It’s like a marshmallow that was slowly and carefully roasted at just the right temperature to make it melt inside, but not too…
Another silly Python riddle Do you think of yourself as an experienced Python developer? Do you think you know Python’s quirks inside and out? Here’s a silly riddle to test your skills. Observe the following Python code: def f(x): return x == not x f(None) The question is: What will the call f(None) return? Think carefully and try to come up with an answer without running the code. Then check…
Observational comedy and tickling I had a nice thought today. I was thinking about comedy; about what makes people laugh. It’s something I think about a lot, especially that what makes people laugh the most is when you’re being your genuine self, and not apologizing about it. I was thinking about what is called observational comedy . It’s the kind of comedy Seinfeld became famous for; it’s candid…
Fun with etymology In Hebrew, we have an expression "radiophonic voice". If someone has a radiophonic voice, it means they have a pleasant voice and good diction, much like a radio announcer would. This expression makes sense to me, and I was kinda surprised when I learned that it didn’t exist in English. But then I thought about the origin of the word radio/radius in "radiophonic voice", and…
Ridiculous I needed to buy coconut milk. I went into the nature store that’s on the ground floor of the apartment building that I live in. Since it’s in the same building I live in, and I like buying natural foods, I tend to buy a lot in this store; I always say hi to the cashiers who work there, and they usually give me a discount. As I was picking the can of coconut milk and getting ready to…
Introducing git cascade and git forward-merge Hi ho! I just released as open-source two Git scripts that I’ve been using for a while. They were born out of my frustrations with Git over the years. They are awesome and I love them. Check them out on GitHub: https://github.com/cool-RR/git-cascade The project contains two scripts: git cascade - Cascade changes from each branch to its dependents. git…
SmartGit: My favorite GUI interface for Git I wanted to give a shoutout to one of my favorite tools that I’ve been using for the last few years: SmartGit . SmartGit is a GUI interface to the Git version control system. (I assume that Git itself needs no introduction, but if you’re not familiar with it: It’s one of the best version control systems used in software development.) Actually, the full…