Coding lesson by Billy Joel the songwriter
May 19, 2024 0:24:14 GMT -8
Post by Uncle Buddy on May 19, 2024 0:24:14 GMT -8
I don't want clever... I never want to work that hard.
--Billy Joel
--Billy Joel
The nuclear families table has been written two or three times. The first time was horrendously difficult for me. There are parents, three types of alt parents, partners, children, families defined by events, families defined by children, families defined by the genealogist, etc. You have to be able to add new people on the fly, add and edit birth and death dates to children, add partners, delete and unlink anything, etc.
The second (and third?) creation of the same table--not so bad. I chopped out a few non-essential features but the code I ended up with is terrible. There are lists and dictionaries all over the place, the code is disjointed, unlike things are combined for no good reason.
I already removed the overlay edit widget so you once again type directly into the table cell. That was the easy part. All that's left is to fix that one little problem.
This is how it always goes: a major feature works till the last detail refuses to slide into place. That's not a sign to work harder. It's the sign to start over from scratch on the feature or some part of the feature. By "from scratch" I mean don't look at the sick part of the old code, it can only do harm to even see the old way of doing things, it might give you ideas.
This time I plan on ending up with a simple constructor for the families table that can be easily understood. I envision modular parts that don't interact with each other and don't have to know anything about each other.
By the way, massive (huge, ostentatious, amazing) improvements have already been completed. For one thing, the UNIGEDS database has been completely separated from the Treebard database. That is a big step towards my goal of offering a universal genealogy data structure that all new genieware creators will want to use so that the genieware of the last 3/4 of the 21st century will not need GEDCOM at all.