News for hackers. Stuff that matters.
Re:Cognitive loads in programming by smitty1e on Wednesday August 31, 2022 @09:57PM (#32670918)
My grief is seeing YAML/JSON browbeaten past being static textual files, and into being interpreted files with nasty embedded functions (looking at YOU, CloudFormation).

My latest project is gaffing all that off and using .xlsx to hold configuration, openpyxl to load the .xlsx, and then transforming the content into a target format (terraform) in the python.

Let each piece in the system do what it's good at.

Re:Cognitive loads in programming by Octabrain on Thursday September 01, 2022 @10:26AM (#32676702)
> Let each piece in the system do what it's good at.

Althought I strongly dislike the idea of introducing Excel in any equation, I wholehearthly agree with that quoted statement of yours. However, if I were you, I would use csv format. It can be easily read/edit from Excel if that's a strict requirement, and in that way, you can keep a grepable plain text versioned in the repository (the csv itself). The best of two worlds I guess. Also, from the top of my head, the Python standard library has a module for reading CSV, so less dependencies too.

Re:Cognitive loads in programming by chii on Wednesday August 31, 2022 @10:52PM (#32671331)
> using .xlsx to hold configuration

what the?! I would imagine that .xlsx is even worse than a plain text file for holding configuration. You have to open it with a spreadsheet editor, and how would you diff a binary format when committing into source repository?

Re:Cognitive loads in programming by smitty1e on Wednesday August 31, 2022 @11:50PM (#32671727)
Git does binaries.

Excel is on the desktop, and ot has diffing tools.

This is a work project, not something for regular GitHub release.