laladrik
Joined 6 years ago
Joined 6 years ago
1. Indexes instead of pointers. This allows you to avoid alignment of 8 bytes in your structure for x86_64.
2. Storing booleans out-of-band. Booleans cause padding all the time.
3. Struct of Arrays. Based on your question I assume you're familiar with it.
4. Store sparse data in hash maps. I remember one time when it allowed to eliminate inheritance.
5. Encoding the data instead of OOP/polymorphism. I haven't got an occasion to use it. The idea is to add extra tags to avoid boolean properties.
Unfortunately, I had the expectation that it should be as simple as making an HTML page. My failure to find a library or a framework to make GUI application made me learn a lot about how GUI works. I realized that making GUI for browser and for desktop are quite different problems. Browser makes easy what's difficult having a desktop oriented GUI framework - text rendering. However, the situation is fair the other around. GUI framework makes easy what's difficult in a browser - drawing arbitrary shapes. As a result, a web-frontend programmer struggles to figure out how to write some text having something like Qt, a GUI programmer tries to find the API to the bitmap in a browser.
It's fair noticed in the previous comments that a GUI framework brings a lot. That's because the problem is complex:
1. Create a window
2. Communicate with the window compositor (you do in WinAPI too btw). How to access the system tray and the child window.
3. Communicate with the operating system.
4. Handle the user input. Callback vs event streams. The user has 4 keyboards for some reason.
5. Rendering. Subpixels, shapes, different DPI. The user has 6 monitors.
6. Text rendering.
7. Widgets. Where probably the most difficult part is to make a textbox, because it involves the solutions of all previous steps.
The steps above touch only the visual part. There's also audio, accessibility, somebody wants the GUI framework to solve the networking.
After all of this research, I picked simply SDL for my project.
1. It's easy to compile.
2. It's small.
3. It relies on the subjectively common dependencies.
4. It's fairly straightforward to upgrade. Given that, you have to create a lot from scratch the part with updating is smaller comparing to a Qt-based solution.
5. It has batteries. My favorite is SDL_ttf which allowed me recently to implement selection of the text which is quite a bit through towards a textbox.
Having a project on SDL requires a lot of knowledge, but not a lot of code.
I have my own blog, but I'm unhappy with its design as well; therefore I'm not sharing it. Nevertheless, I find particularly challenging two things: 1. Make tables readable from a smartphone. There are a few tricks which allow you to make a responsive table. However, those tricks implies that you use <ul> or <div> instead of <table> which defeats the point of having a table. 2. I had an article where I needed to put a tiny mind map. Eventually I put it as a picture, because the solutions to draw a mind map with JavaScript made the page as twice as heavy.
Location: Ireland
Remote: Yes
Willing to relocate: No
Technologies: Rust, Go, C/C++, Postgres, RabbitMQ, Redis, GNU/Linux, Docker, Python.
Résumé/CV: https://alexmarkov.xyz/resume-long.html
Email: [email protected]
Senior Software Engineer with 15+ years of experience with strong system design skill. Deep knowledge of GNU/Linux to build high-load web systems serving millions of requests.