Better HN
topnewbestaskshowjobs
Log inSign up

jlervin

18 karma · joined Jun 23, 2019 (7y ago) · 4 submissions

Submissions

comment 4y ago · link · parent

this is my project, so I can speak to this :)

I wrote this as a sophomore in college after finishing the intro computer science sequence (which goes into basic data structures/algs topics like binary trees, recursion, etc). This was my first real project outside of school, and to be honest didn't require a ton of pre-requisite knowledge. Mainly it just required a familiarity with event-based architecture and linked lists (all the window stacking is represented as linked lists). The difficult part with writing a window manager, imo, is getting familiar with the necessary specs and APIs. This is built using XLib, which relies on the X11 protocol. I also had to learn about ICCCM and EWMH, since many program rely on them as well. It was good practice learning and implementing specs.

I also added features throughout college as I took more classes. The smart window placement feature, for example, is implemented using a dynamic programming algorithm I thought up after taking a formal algorithms class. You can read about it on my blog if you're curious: https://www.josherv.in/2019/06/27/dp/.

comment 4y ago · link · parent

Its also referring to the relatively small codebase (2300 lines of C). Something like i3, for instance (although that is certainly more feature complete) is around 25,000

comment 4y ago · link · parent

https://unsplash.com/photos/dxZfq6Xuz5c

4.

An application of dynamic programming in window management(jlervin.github.io ↗)

4 points · by jlervin · 7y ago · discuss