Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
What is Code Bloat? #2343
Technical details regarding my environment
Defining Code Bloat
In a nutshell:
Types of Code Bloat
Economics of Code Bloat
The goal of this thread (issue) is to talk with other developers about what is Code Bloat in YOURLS and how to both prevent it and remove it from the YOURLS code.
Before we look at the types of Code Bloat, let's take a look at a possible YOURLS future.
I find it a benefit to battle Code Bloat with possible near future plans and goals.
Read this carefully - as if we are now traveling to the future...
One Year From Now...
YOURLS now has Full-Fledged Installer #1254 It asks for only the DB information and the first username and password. With this, it builds a proper config file that only contains the DB info. It builds a $yourls static array that contains all settings, and stores it in the DB. It also stores the username and password in a user table.
YOURLS also has a Settings Page (in the admin area). All constants have been removed from the config file except for DB settings. Core settings are automatically loaded into the $yourls array and saved to the DB on the first admin settings edit. (one mouse click!)
All Settings may now be changed at will. This is because the default behavior is to check any keyword against the DB. If it is in the DB, it is valid.
What used to be
All YOURLS configuration settings are contained together in one array, $yourls.
Core Constants Removed
Constants have been removed from all core files except for DB configuration.
Trailing Slash Problem Eliminated
The $yourls array totally eliminates the need for YOURLS_SITE and eliminates the trailing slash problem.
Because of the $yourls array, it made it easy to add the following plugins:
With cooperation, I believe this can be finished by the end of December 2018, or even before!
Exciting things are coming!
Reducing the three different types of Code Bloat will help make the above future things happen.
Types of Code Bloat
Few people realize there are different types of Code Bloat.