RSSAmplifier

Blog

Home on Glyphack

Recent content in Home on Glyphack

glyphack.comRSS feed ↗50 posts

Latest posts

It's getting harder to focus every day

I’m feeling it right now. I had to set a timer for 15 minute on my computer and block all distractions to write this. If I didn’t force myself to focus I would easily get distracted by something after few minutes. Even when I’m doing things that I’ve been waiting to do it, I still feel the urge to do something else. I don’t know how and when this happened. During the…

This plant is two years old

I planted my first plant in this apartment nearly three years ago. It was the result of a walk through a supermarket with my friend, where I suddenly saw the stuff needed for gardening and tried planting some herbs. I had some moderately happy plants from the seeds that I bought. One day I was wondering to myself if I can get a capsicum plan from the seeds of bell peppers in the home. I took about…

Devlog 8: Fuzzing ty and dotfile improvements

It’s been a while since I wrote a dev log. I was working on some networking project and I didn’t really think about other stuff for a few weeks. Now I’m slowly getting back to writing more blogs. My plan is to share more notes on my blog like my current bookshelf . I’ll probably start with sharing my travels. Fuzzing Ty # Fuzzing is a cool technique. With fuzzing you can…

Application as a Database

When I started programming professionally, I got recommended some programming books that teach you how to write good code and use well known patterns. Years after that I feel it was just preference of the author for how to write code. There’s only one important note about coding style and that’s consistency . So after a while of programming I have formed my preference: Make data…

Devlog 7: I made a code review tool

Last month I created a new project. It’s called Towelie . Towelie is a tool for reviewing code locally, similar to the GitHub pull request review tool. But why? Like most people, I also don’t like the AI slop produced by AI agents. But I found that with some guidance, I can get what I want for certain tasks. I have a loop that looks like this when I’m writing code with an agent:…

Reverse Engineering Philips Hue light strip to control from PC

I was looking for a way to control my Philips Hue light strip without their terrible app 1 . All my searches led to this conclusion: you need to buy a Hue Bridge to control the lamp from a PC. But I don’t want to have another device just to do what my PC is capable of doing right now. I want my light to turn on and off automatically every day without paying for another device. I also want to…

Talk: type checking Python in Rust

ty is one of the great examples of a challenging project that is simple to contribute to. During last year I contributed to it and I learned a lot. About type checking, structuring a complex project and taming complexity. View embedded content ![](fosdem3.jpg) ![](fosdem2.jpg) ![](fosdem1.jpg) Slides # ty: Adventures of type-checking Python in Rust Links # ty codebase ty code lives in the Ruff…

NMRD

Disclaimer: This is an imaginary conversation happening in a world where AI is not as capable as good programmer. Of course it’s wrong and incorrect in the current world we live in. So don’t take it seriously. The content is copied from this timeless video. T: I see you’re working on a new look. My guess is that the I ❤️ Java t-shirt is meant to be ironic. P: Doctor, I’m…

Devlog 6: I Can Make a CPU with My Logic Gate Simulator

I can finally start making a CPU using my logic gate simulator . Try it yourself here ! It supports basic things you expect from a logic gate simulator. Drag gates onto the canvas. Attach them together using wires. Wires stick to pins like magnets. You can detach a wire by selecting it and then move it. simu-1.mp4 You can create a connection between two gates by dragging a pin to another. When a…

Ty Test Suite

Ty tests use markdown. It looked strange, but I’m sold to the idea now. When I started programming all I found online on testing was about unit tests, end-to-end, black-box, white-box. So why don’t more tests look like this? Unit Tests Are Verbose # Say you’re writing a parser and want to add a unit test. It usually ends up looking like this example from Writing An Interpreter In Go : //…

Simple Expertise

If you think about how we judge skills you’d see we do it by questioning the advanced stuff. Some think this is right. If a person has experience in something they must know the advanced topics that beginners haven’t heard of. This is what schools do: after every level, the questions get harder. I’ve sat through more physics than Galileo and Newton combined. Am I a good physicist?…

Devlog 5: Simu, Ty, Book Reader

Chat with New People # Met Amir . Turns out it was a good decision to live stream writing Redis in C from scratch. You find new friends by doing it. Met Matt from Blinkinlabs . Simu # About a month ago I started building a logic gate simulator software. My goal is to run it in web browser and have enough features to make a CPU with it. I think this will be useful for teaching people about CPUs.…

Adding Support for Self to Ty

I am reading No Ordinary Genius and the book is saying how nice it is when some technical writing includes everything you need to understand a subject. In its own words: I find it very discomforting now that there are many books that claim to explain a subject, in which there’s some concept or other which is very poorly explained, and therefore it’s not there—no matter how hard you…

The best lasagna I've ever had

I went to Italy in March with my friends from first grade. There are a lot of different places to see in Rome, Vatican Palace, Pantheon, and Colosseum. But for me there was something else I missed and wanted to see again. It was Borghiciana Pastificio where I had the most delicious lasagna of my life 1 . The restaurant is small compared to others. Only about 16 people can sit inside so…

I Made ReadsThis to Share and Find Good Blogs

I created a site to share your favorite RSS Feeds in a page. The idea comes from one of my favorite sites usesthis.com . Try it out and send me your links. I love to know interesting blogs around the internet. Here is mine . I spend great time reading stuff on the internet. I started this in high school. I think it’s getting harder everyday to find good content. For me a good writing is the…

Devlog 4: I made a chrome extension

I’m not sure if some time comes that I finally can say I know vim. But I don’t think that would happen before I read the whole manual . This week I learned these new commands: I’ve always used ctrl-o to move to last place I was editing in vim. Turns out there’s a keybinding to move to the previous file that was open it’s Ctrl-^ (or Ctrl-6 ) . This command switches to…

Blogging with Obsidian

My blog is a bunch of files that are given to a program that converts them to HTML and CSS files, which is what you see here. Also, Obsidian uses files to store my notes. This means it gives the most freedom than any other tool out there. Since I’ve been writing both on my blog and in Obsidian there were times that I wanted to share stuff outside my Obsidian and link it in my website. One…

After Interview

Biggest companies put candidates through lengthy interview process, yet still fire a lot of bad hires. What if the problem is not the interview, but what happens after? Smarter onboarding is the key to identify if a new hire is a great fit. In my experience and what I’ve heard from others, the onboarding is slow. First few weeks filled with trivial work and going through a lot of documents.…

Devlog 3: Coding a redis clone in C and things I learned

About two months ago I started the build your own Redis challenge from https://codecrafters.io . I decided to do this in C. Initially I was just curious to do it in C. Doing it in C thought me a lot of stuff that otherwise I would have not learned. Another bonus point was that I could tweak the performance to be on par with Redis server. C always seemed like an impossible language to me. Working…

Can Data Fool You?

Recently, A personal experience showed me how something widely accepted might be wrong. I didn’t want to lose this opportunity to write about it. If you haven’t been living under a cave, you know data-driven decision making is a must these days. So, if you cannot make a decision just run both under some experiment and decide based on the result. If you have a problem that is hard to…

On Tracking Time

One week I suddenly realized I did so much during the week but there’s nothing to show for it. You know that feeling that you don’t have anything to tell your friend that you did that week. I gave time tracking a shot to see what will I find. Rescue time looked like a simple tool that gets the job done. I used Activity Watch before and the main lacking feature was syncing and the…

Dev Tools at Work

I was reading this old post from Brad Fitzpatrick, talking about why he thought open source contributors suddenly disappear after joining Google: They’re busy. Google seems to suck everybody’s free time, and then some. It’s not that Google is forcing them to work all the time, but they are anyway because there are so many cool things that can be done. I often joke that I have…

Devlog 2

Random notes from past month. New Projects I spent about a year building my own tool-chain for building a python type checker. It inspired by what ruff was doing for Python linting and wanted to do the same for type checker. A few months ago I found out that astral team are building a type checker. So I decided to redirect my energy toward that. Building a type checker for a language that is not…

Writing a DNS server From Scratch

I decided to build another system from scratch just to explore a new topic and learn things. This time I chose the Code Crafters’s DNS challenge This is not a tutorial on how to do it but some notes to motivate you to do it. There’s already excellent material on how to do it with code examples here. If you are already curious, then start building your own. I really enjoyed the way…

How to Discover Interests

I was talking with my girlfriend recently about how to find something you are passionate about. Having something you’re truly passionate about gives you a reason to get up in the morning and makes life more enjoyable. It’s more than just a hobby, it’s one of the key ingredients to doing great work. But how can you find it? One way is to notice what is drawing your attention. Although this is a…

A better go test

My job now involves doing some Golang work and this post is about how go test command can be improved. Until now, I never actually thought about improving the test command for a language. But with Golang I have serious problems with reporting test results on command line. Test output is not readable, The usual test flags you expect are not there. Fail fast option does not work You cannot see the…

Pytest Dev Sprint 2024

It was about 3 Months ago that a interesting message showed upon my GitHub feed. It was from The-Compiler arranging a 5 day Pytest development sprint in Austria. I was following him for his open source work. I finally got access to something interesting from following people whom work I like. I did not know much about the event, my guess was that there is going to be some coding and meeting other…

Camping at Vresselse Bos

I had some time in between switching jobs and decided to go for a camping trip. My first time in the Netherlands. After looking up some places I chose to go to Vresselse Bos I rented a tent from Airbnb. The tent was close to a village called Nijnsel. The way to get there was train to Eindhoven and then a bus to Nijnsel, then a 40-minute walk from there. After about an hour walk to the east side…

Why Is It Hard to Do Real Work

When I first read good and bad procrastination by Paul Graham, I was amazed how much my perspective changed about working. There are three variants of procrastination, depending on what you do instead of working on something: you could work on (a) nothing, (b) something less important, or (c) something more important. That last type, I’d argue, is good procrastination. The most dangerous…

Expertise Beyond Validation

I was walking in Rome a few weeks ago. This idea that less educated people with less resources and money built such beautiful buildings was so fascinating to me. Even the most ordinary-looking buildings are constructed with care. They have fantastic arches, curved ceilings. They are a work of art. We see this pattern everywhere. My favorite writers like Derek Sivers , Paul Graham , and Scott…

Best Place to Work at as a Programmer

Despite the title this isn’t meant to name a specific company. I’m trying to figure out for people like myself who enjoy programming what the best place to work would be like. I think there’s fundamental problem at most companies right now. Everything is fake. Of course, we have goals, but they are artificial. They are there because companies need goals, to show to investors. But…

How to infer type for Generic types in Python?

I implemented Generic classes and functions this week in Enderpy. I’m happy that now my code can now read and infer types of this conformance test . I chose to skip implementing generics with syntax def f[T](): T because of the scoping behavior . They are also tested extensively in this test case . Another strange thing I found in the typeshed repo is that in the sys/__init__.py file there…

Don't be afraid to Rewrite

I recently started to notice this pattern that some teams create products and move on. Maybe some maintenance until no one sends more bug reports. They just literally move on from that product, to the next one. Now this is not new, when I was a consultant this was exactly what companies expect. Work on something and make it to the finish line and leave. It makes sense, you don’t want to keep…

Devlog 1: Contributing to Ruff, Profiling, Python Types Conformance Tests

Last week I wanted to start contributing to rust. I was working on Adding uninitialized attribute access check to Ruff. I did it and learned a lot about how to track attributes in Python code. A gist of it would be, you need to go over the class, in each function when something is assigned to a name you need to check if that name is self or cls. And you do this by checking if it matches the first…

Five Thousands Lines of Kotlin

This post is about my impression of Kotlin as a language after, well you guessed it, writing about five thousand lines of it. I will go through what I don’t like about it and whether I would use this language on my own(spoiler: I won’t unless I have to.) I started using Kotlin only because of the new job. In my job I worked on server applications only, with the added spice of…

A Better Keyboard

Imagine you want to make a better keyboard. Seems like a hard challenge for every company. What if ‘better’ meant compressing multiple key presses into one? Or have shortcut for your frequent actions. If you minimize the effort to use it then you are making it better for yourself. Challenge lies in the keyboard’s limited keys, and hard to press combinations like ctrl + alt + any…

TIL Secret to Open Source Contribution & Contributing to Python Docs

I think I learned something about contributing to open source that, if I knew a couple of years back, I could have done much more open source contributions. A while back, I started creating a hand-written parser for Python . I ended up also contributing some fixes to Python docs. This was particularly interesting to me because it did not require really advanced knowledge, and the stuff there that…

Compilers Resources

This post is a compilation of great resources I found while building a type checker for Python. These resources are free and highly focused on specific topics, making them ideal for learning by doing rather than going through extensive materials. Parser # There are different ways to approach parsing. You can either write one by hand or use a parser generator. For compilers or interpreters, you can…

Trying Out Learning In Public

A while back I read about learning in public from swyx: At some point people will start asking you for help because of all the stuff you put out. 80% of developers are “dark”, they dont write or speak or participate in public tech discourse. The idea is promising people who learns in public get more reputaiton. This extra reputation makes it easier to find friends, get jobs and so on. Starting to…

Building a Web Crawler in Golang

Introduction But Why Building Another Crawler? High Level Design URL Frontier Selector Workers Fetcher Content Processor Link Extractor Implementation Let’s talk about channels Storage Parser Processor Distribute and Collect Result from Workers Worker Extracting Links Saving Content Running Processors Failed URLs HTML parser Putting it All Together Conclusion Introduction # Web crawler is a…

Rate Limiter From Scratch in Python Part 2

Introduction New Rate Limiting Algorithms Fixed Window Test Sliding Window Log Testing Sliding Window Count Tests Conclusion Introduction # In the last post I started writing a rate limiter. The project right now supports only 1 rate limiting algorithm(Token Bucket). In this part we’re going to implement the following algorithms: Fixed window Sliding window log Sliding window count…

Personalize Macos Environment for Your Productivity

MacOS is already a polished environment and unlike some other OSes it works out of the box. Still, spending investing time to personalize your tools and environment is a smart move. In the past years using MacOS I found simple tools that helps to make MacOS more ergonomic and fun. Most of the content here is in my dotfiles . Why? # If you’re already sold to this idea go ahead and start,…

Rate Limiter From Scratch in Python Part 1

Introduction # After reading ByteByteGo course motivated me to write a rate limiter. So I decided to do it in 500lines theme. We will focus on how to create the interfaces and components, to allow extensibility in the predicted ways. You can find the complete source code here . What is a Rate Limiter? # Well, there are a lot of great explanations on what is a rate limiter, but I’ll give a…

Everything you need to know about splitting CDK stacks

AWS CDK is a tool that lets you define your cloud resources in a languages such as python. And like any other project as the codebase grows, it needs to be split into components. CDK projects can be split into multiple stacks. Stack is a single deployable unit in CDK. when you deploy it all the resources inside it will get deployed. Knowing a few points in the beginning can help to create a good…

Planning My Day

A while back I started planning my day before starting my day. I did this because I wanted to have a morning routine for myself, but most of the time I found myself starting to pickup something to read or already replying to emails or slack. So by setting this rule for myself to write down everything I want to do for the day first, helped to overcome this habit. Since then I found some…

Stateful Stream Processing

A pattern that I have recently seen in a project is data replication through real-time stream processing. This pattern happens when a company has all of it’s data stored on centralized databases and applications access this data, this means that two example services like “search” and “product catalog” are depending on the same data. In this situation some services…

How to Setup 2 Factor Authentication Code Generator on PC

I use 2 factor authentication with almost all of my accounts, the only downside of this is that when I need to access something frequently or automate some task I have to manually enter this code from my phone. So I searched a bit and found these tools to make this process easier, I imported 2fa keys to my laptop and can generate keys with a command so I can copy the code and also the command can…

Fixing One Bug Leads to Another

One thing that frequently frustrates me when I’m working is sloppy work. I’m using the word “work” here because it can refer to anything, but here I’ll talk about sloppy code. Recently, someone from my previous team asked me to help them fix an issue on a system while the maintainer was not available. At first, I discussed this with my team lead and didn’t get…

How Write and Organize Software Documentation

Software documents play an important role in software development, everyone pays attention to writing documentation but just like writing code, writing the text is not enough but it has to be readable and understandable for other people, after all the purpose of documenting is to communicate. Recently I was reading documentation of a system and noticed that there’s something strange about…

How I Stay Focused and Manage Time

A few weeks ago, I experienced one of these busy weeks with lots of meetings, Slack messages, working on different tasks. Although I did many things, I didn’t feel like getting anything done. So I decided to see how can I improve this. First of all, the cost of getting interrupted while developing is high. You need time to get back on what you were doing, and if this happens a lot, you…