NO DEPENDENCIES: the only dependency worth having
May 7, 2023 4:14:07 GMT -8
Post by Uncle Buddy on May 7, 2023 4:14:07 GMT -8
Treebard GPS is based on the notion that an ordinary genealogist with no coding experience--and no plans to become a professional programmer--can write his own genealogy software.
I won't claim it can be done in a reasonable amount of time as a part-time hobby. But given the ability to focus on it, it can be done, as a hobby.
There are at least two things that would doom such a project: dependencies and secondary features. I've discussed secondary features in other posts. For a solitary hobbyist to write a genieware app, he would have to focus on primary features: tracking persons, places, dates, sources; and avoiding secondary features like the plague: writing books and websites with software, syncing with this, that and the other thing, scraping data off of websites... this nerdy stuff is for teams, not a lone ranger burning the midnight oil to prove he can do it. Secondary software features are like the length of a Facebook page: the longer you keep scrolling down, the longer the page gets. If you can't limit yourself to primary features--the genealogy part of genealogy--then you can't write genieware by yourself.
Dependencies is a topic that crops up frequently for me because I often go shopping online for something to replace Tkinter as a widget toolkit. Tkinter works fine and does everything except to look like this year's model, but genealogy is not about modern anything. Jumping hurdles in order to use the prettiest widget set in existence is another way to not get to the finish line as a lone hobbyist.
Here's the situation: for Windows users like me, Python has SQLite and Tkinter functionality built right into it with very little to do. Install Python, install the SQLite software so you can access your databases in a command prompt, pip install Pillow so you can use .png and .jpg as well as the .gif functionality built into Tkinter. And you're done. For what you get out of it, that is the shortest list of dependencies you are gonna find in the programming world of 2023.
What you get out of it is pretty darn amazing when you compare what you have to go through to use the world's most complete and best-supported widget toolkit (HTML & CSS). Python + SQLite is a serverless combination for technical reasons that are beyond me. Even though SQLite is a serverless database program, if you want to use it with JavaScript, you still need a server such as localhost on your own computer. This is not an extra step, it is many extra steps. Even though JavaScript and Python are both interpreted languages, where the user is unaware of the compilation process, Python can run serverless SQLite without a server and JavaScript cannot. I can't imagine why this should be true.
I often am tempted to take those many extra steps in order to move to HTML/CSS instead of dragging Tkinter around in its doddering wheelchair, but to be perfectly honest, Tkinter ain't dead yet and it ain't gonne be dead for a long time to come.
What I have to keep reminding myself is that we are in the early stages of the computer age. In a remarkably short time (we will see in retrospect someday), it will no longer be necessary to circumnavigate the globe and swim across two oceans to get from England to France, for example. With Python, you just cross the channel in a boat that is not very pretty, but it gets you there and you get to achieve your goal. Learning how to force JavaScript to communicate with a database so you can write your GUI in HTML and CSS is a simple matter of going around the world the long way to get from Minneapolis to St. Paul. I can say that because the Python/SQLite/Tkinter combo almost effortlessly floats you across the river or whatever it is that actually separates Minneapolis from St. Paul. Why should we be in such a hurry to not use Tkinter that we try to force JavaScript to do what it doesn't want to do?
I hear tell that using Node.js to get JavaScript to run the back end of an app is "easier than writing a web page". Well if that's true, then why are there no simple guides or tutorials on how to do it without dependencies and frameworks? You can find a few guides on how to do it without front-end dependencies, but to do it without back-end dependencies such as Express and Handlebars... those tutorials are few and far between, if they exist at all.
Compare that to Python, where you just write Python to handle the GUI and you just write Python to handle the database. The process is so free of hurdles as to seem effortless.
I'll always be shopping for a better combo than Tkinter & Friends, but here's what's really gonna happen: Python is getting faster, DearPyGUI or something even better is gonna mature and replace Tkinter in the Python standard installation, and SQLite is not only not going away, it's always gonna be serverless, Python is always gonna be able to use it that way, and there are new serverless database programs popping up all the time.
So the right thing to do is wait for the world to realize that programming should be easy if it can be easy, not the whole world but just enough of it so that a modern widget toolkit finally comes with Python and we can concentrate on just writing the app logic and GUI logic instead of trying to build a vessel like Node.js & Friends that can enable us to sail around the world the long way in a silly attempt to force JavaScript to do what it doesn't want to do so that we don't have to use Tkinter.
Just use Tkinter and get the job done.
I won't claim it can be done in a reasonable amount of time as a part-time hobby. But given the ability to focus on it, it can be done, as a hobby.
There are at least two things that would doom such a project: dependencies and secondary features. I've discussed secondary features in other posts. For a solitary hobbyist to write a genieware app, he would have to focus on primary features: tracking persons, places, dates, sources; and avoiding secondary features like the plague: writing books and websites with software, syncing with this, that and the other thing, scraping data off of websites... this nerdy stuff is for teams, not a lone ranger burning the midnight oil to prove he can do it. Secondary software features are like the length of a Facebook page: the longer you keep scrolling down, the longer the page gets. If you can't limit yourself to primary features--the genealogy part of genealogy--then you can't write genieware by yourself.
Dependencies is a topic that crops up frequently for me because I often go shopping online for something to replace Tkinter as a widget toolkit. Tkinter works fine and does everything except to look like this year's model, but genealogy is not about modern anything. Jumping hurdles in order to use the prettiest widget set in existence is another way to not get to the finish line as a lone hobbyist.
Here's the situation: for Windows users like me, Python has SQLite and Tkinter functionality built right into it with very little to do. Install Python, install the SQLite software so you can access your databases in a command prompt, pip install Pillow so you can use .png and .jpg as well as the .gif functionality built into Tkinter. And you're done. For what you get out of it, that is the shortest list of dependencies you are gonna find in the programming world of 2023.
What you get out of it is pretty darn amazing when you compare what you have to go through to use the world's most complete and best-supported widget toolkit (HTML & CSS). Python + SQLite is a serverless combination for technical reasons that are beyond me. Even though SQLite is a serverless database program, if you want to use it with JavaScript, you still need a server such as localhost on your own computer. This is not an extra step, it is many extra steps. Even though JavaScript and Python are both interpreted languages, where the user is unaware of the compilation process, Python can run serverless SQLite without a server and JavaScript cannot. I can't imagine why this should be true.
I often am tempted to take those many extra steps in order to move to HTML/CSS instead of dragging Tkinter around in its doddering wheelchair, but to be perfectly honest, Tkinter ain't dead yet and it ain't gonne be dead for a long time to come.
What I have to keep reminding myself is that we are in the early stages of the computer age. In a remarkably short time (we will see in retrospect someday), it will no longer be necessary to circumnavigate the globe and swim across two oceans to get from England to France, for example. With Python, you just cross the channel in a boat that is not very pretty, but it gets you there and you get to achieve your goal. Learning how to force JavaScript to communicate with a database so you can write your GUI in HTML and CSS is a simple matter of going around the world the long way to get from Minneapolis to St. Paul. I can say that because the Python/SQLite/Tkinter combo almost effortlessly floats you across the river or whatever it is that actually separates Minneapolis from St. Paul. Why should we be in such a hurry to not use Tkinter that we try to force JavaScript to do what it doesn't want to do?
I hear tell that using Node.js to get JavaScript to run the back end of an app is "easier than writing a web page". Well if that's true, then why are there no simple guides or tutorials on how to do it without dependencies and frameworks? You can find a few guides on how to do it without front-end dependencies, but to do it without back-end dependencies such as Express and Handlebars... those tutorials are few and far between, if they exist at all.
Compare that to Python, where you just write Python to handle the GUI and you just write Python to handle the database. The process is so free of hurdles as to seem effortless.
I'll always be shopping for a better combo than Tkinter & Friends, but here's what's really gonna happen: Python is getting faster, DearPyGUI or something even better is gonna mature and replace Tkinter in the Python standard installation, and SQLite is not only not going away, it's always gonna be serverless, Python is always gonna be able to use it that way, and there are new serverless database programs popping up all the time.
So the right thing to do is wait for the world to realize that programming should be easy if it can be easy, not the whole world but just enough of it so that a modern widget toolkit finally comes with Python and we can concentrate on just writing the app logic and GUI logic instead of trying to build a vessel like Node.js & Friends that can enable us to sail around the world the long way in a silly attempt to force JavaScript to do what it doesn't want to do so that we don't have to use Tkinter.
Just use Tkinter and get the job done.