General Programming Discussion

8968 readers
2 users here now

A general programming discussion community.

Rules:

  1. Be civil.
  2. Please start discussions that spark conversation

Other communities

Systems

Functional Programming

Also related

founded 6 years ago
MODERATORS
1
2
3
4
5
 
 

Result presentation (first 25 mins) and discussion of an accessibility study that Thunderbird ran. They explain various accessibility technologies (like screen readers, eye tracking etc.) and problems they encountered in their design when users relied on these technologies.

Nothing really groundbreaking in here, but still good for challenging one's assumptions.

6
7
8
 
 

Hello everyone!

I decided to learn ncurses a few days ago so I can do a project I've been thinking about lately, and in the process I figured since I'll go to the trouble of solving a bunch of the problems with writing relatively complicated TUIs with ncurses, I might as well generalise the solutions into a library or two for future me and anyone else who will find them useful.

Anyway, enough introduction, heres what I want to do with the library:

I want it to dynamically manage size and position of ncurses windows. This means windows should be able to be added, and removed (just those for now, I don't know if I'll implement resizing windows from the perspective of someone using the library to have that functionality), and have the size and position of the windows update automatically.

Initially I thought a binary space partitioning tree situation might be a good way to tackle this, but I want it to be a bit more flexible. For example, the dev using the library should be able to set certain windows to behave differently than leaves in a bsp (think persistent status bar at the bottom of the application, taking up the entire width but only a couple lines in height for example, or toggle-able file explorer on the left/right of the application like neovim's NERDTree).

How would you guys go about designing something like this, while still keeping the code relatively simple and efficient?

Here is a badly drawn diagram of what I mean:

Steps here refer to how someone using the library might go about creating each element (window) of their UI in their own project.

Until step 4 a bsp tree makes sense, but after that when I want to add a window which doesnt conform to the rules of a bsp tree, it gets a bit difficult.

Also, Im thinking there should be some way for windows to have some idea of their neighbours so that when a change occurs, they can adapt to it.

Anyways, essentially I'm looking for your thoughts on how you would go about implementing something like this.

Much appreciated!

9
10
11
12
13
14
15
16
17
18
19
20
21
 
 

I have a ton of books in my to read pile, and I always have analysis paralysis trying to pick a new book to read. Getting recommendations based on stuff I already enjoyed reading helps make the decision quicker.

22
23
24
 
 

“Compile-time hierarchy of encapsulation that matches the domain model was a mistake.”

https://en.wikipedia.org/wiki/Casey_Muratori

25
view more: next ›