Any modern operating system consists of layers upon layers of systems, services, and libraries. Increasingly, no one can possibly have full understanding of all the layers of the cake. Here’s RedHat developer Peter Hutterer’s description of what it takes to move the cursor on your screen. Interesting to get back to the basics, and a good reminder of how complicated this stuff really is.
I used to write mouse cursor APIs back in the pre-Windows95 days. I was developing a homebrew GUI for DOS in Pascal (with a sprinkling for assembly for core drivers – but other people contributed the assembly).
Things were a lot simpler back than.
Back then, it was safe to assume everyone just had one monitor (in fact, as I wrote the GUI, I could dictate how many screens people could use hehe). Back then, absolute pointing devices didn’t really exist – or at least it was a long way off being general consumer tech. Back then, the only thing I needed to be concerned about was the resolution of the screen, and that added a simple modifier to the pointer acceleration.
As much as I don’t begrudge the fantastic choice of toolkits we have available, things sure were a lot more fun back then. It felt more an art, these days software development feels more a matter of reconstructing existing blocks of code like Lego bricks.
But of course, things were a lot easier back then as well. These days -and with our world full of complicated and fragmented hardware combinations- it is completely impractical to expect any developer to build any project completely from scratch. However I do still think that there something quite romantic about the notion of having created something entirely by yourself (maybe that’s half the reason we have so many competing APIs?)
That all said, my sentiment could also be down to the fact that back then I coded for fun, where as these days I code for a living.
Laurence,
“As much as I don’t begrudge the fantastic choice of toolkits we have available, things sure were a lot more fun back then. It felt more an art, these days software development feels more a matter of reconstructing existing blocks of code like Lego bricks.”
I know, I wrote a few GUIs myself in dos, and though they weren’t powerful by any stretch, they were certainly much more expressive and creative than what you’d find in a standardised toolkit today. When you have full control over the whole stack, you can come up with some interesting ways of doing things. And though nothing is necessarily stopping you from designing creative interfaces today, it’s a foregone conclusion to most modern programmers to use components that already exist and not even contemplate how one might do it from scratch.
I had worked on a battletanks like game, the entire interface was “skinned”, where each button was actually a bitmap, and in it portions of the screens had a mouse cursor. There was a horizontal photo inventory of things to buy, which was larger than the screen. The mouse position was tracked relative to the inventory, but the inventory was auto-scrolled with momentum to keep the mouse cursor in the middle of the screen. The net effect was that small movements of the mouse would work normally but large swoops would give the inventory momentum in the opposite direction.
I miss those creative programming days. Those were the days everyone was free to implement whatever they could code up without worrying about any exclusive software patent BS. I despise the direction our profession has taken.
“That all said, my sentiment could also be down to the fact that back then I coded for fun, where as these days I code for a living.”
I relate strongly to this as well. The projects I’ve done personally have pushed my abilities much harder than any of the work I’ve taken professionally. I’m kind of disappointed in the CS carrier at this point. I still love computer science, but the jobs that are available to most us are frankly not worthy of our degrees. I guess those who enjoy CS deeply should stick to academia and avoid business since 90% of what gets done in business isn’t CS work at all.
Anyone on Long Island doing real CS work? I’d love to chat
Plus – users probably were less happy with one-off UIs everywhere :p
I sort of expected him to go into how the cursor on screen is actually updated, with hardware-accelerated vs. software mode, surfaces, overlays, compositor, OpenGL, KMS etc. He got stuck on the (complicated, but rather boring) coordinates mapping.
Yeah, also “The driver submits two relative coordinates to the server” skips over the interesting bit about how said driver acquires those coordinates. If you have something like a Bluetooth mouse, this part is much more complex than some simple coordinate transformations.