Which would you perfer? "easy and fast and works well" or "hard and time consuming and error prone"
2012-11-29 00:18
405 查看
The usernames used to establish connections to servers are often specified in configuration files.
In most project, the configuration items works in this way:
1. Connection string for each server is configured respectively. (Take only username here for an instance)
2. Each environment has different connection string.
Which turnout to be a matrix for just a username setting:
As you may found, there are n*m username settings but actually only having two different values.
Come on, that’s only for a username configuration. There could be about half hundreds of .properties file contains half thousands configuration items. But actually, most of them are duplicated.
While, in theory, all those values might be different and as a result, it sounds good to be configured separately.
Bull shit! Fucking your FUTURE potential possibilities. Those messy configuration items already bring a lot of big troubles for NOW. No one could figure out the usage of every items, no one willing to, and a small change may breaks everything. When you feel horrible with those messy files, it is already too late to make changes.
Why the configuration items grows duplicates ?
Mostly because of those lazybones always adding a new configure item whenever they need something configurable. That’s easy and fast and works well.
They don’t bother to go through all the existing configure items first to find out if what they need already added by someone else for a similar reason, they don’t bother to refactor the existing source code even if he find a proper configuration item but badly named. That’s hard and time consuming and error prone.
As a developer, which way will you prefer to?
As a manager, will you lead developers to the right way and given them enough buffer for that way? Or just push the poor developers harder and harder without noticing the consequences might come.
In fact, any change facing those kinds of choices.
In most project, the configuration items works in this way:
1. Connection string for each server is configured respectively. (Take only username here for an instance)
2. Each environment has different connection string.
Which turnout to be a matrix for just a username setting:
Server 1 | Server 2 | Server 3 | |
DEV | qauser | qauser | qauser |
QA | qauser | qauser | qauser |
UAT | qauser | qauser | qauser |
PROD | produser | produser | produser |
Come on, that’s only for a username configuration. There could be about half hundreds of .properties file contains half thousands configuration items. But actually, most of them are duplicated.
While, in theory, all those values might be different and as a result, it sounds good to be configured separately.
Bull shit! Fucking your FUTURE potential possibilities. Those messy configuration items already bring a lot of big troubles for NOW. No one could figure out the usage of every items, no one willing to, and a small change may breaks everything. When you feel horrible with those messy files, it is already too late to make changes.
Why the configuration items grows duplicates ?
Mostly because of those lazybones always adding a new configure item whenever they need something configurable. That’s easy and fast and works well.
They don’t bother to go through all the existing configure items first to find out if what they need already added by someone else for a similar reason, they don’t bother to refactor the existing source code even if he find a proper configuration item but badly named. That’s hard and time consuming and error prone.
As a developer, which way will you prefer to?
As a manager, will you lead developers to the right way and given them enough buffer for that way? Or just push the poor developers harder and harder without noticing the consequences might come.
In fact, any change facing those kinds of choices.
相关文章推荐
- Sharepoint Service Error: A deployment or retraction is already under way for the solution "xxx.wsp" , and only one deployment or retraction at a time
- Error message when you try to modify or to delete an alternate access mapping in Windows SharePoint Services 3.0: "An update conflict has occurred, and you must re-try this action"
- The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
- You want to configure and schedule offline database backups to run automatically. Which tool or util
- You receive a "Setup Library wbemupgd.dll could not be loaded" error message when you use Add or Remove Programs in Windows Server 2003
- QAN API error: "qh.Profile: No query classes for selected instance and time range. Please check whet
- which job would you like , high salary or more?
- ADB not responding. You can wait more,or kill"abd.exe" process manually and click 'Restart'
- Git出现error: Your local changes to the following files would be overwritten by merge: ... Please, commit your changes or stash them before you can merge.的问题解决(Git代码冲突)
- 85.You want to configure and schedule offline database backups to run automatically. Which tool or u
- Git出现error: Your local changes to the following files would be overwritten by merge: ... Please, commit your changes or stash them before you can merge.的问题解决(Git代码冲突)
- You may receive an "Access Denied" or a "Permission Denied" scripting error message when you browse a secure Web site that contains multiple frames
- Error: "Database 'XXX' is already open and can only have one user at a time"
- 110 Which options would you consider while configuring a flash recovery area (fast recovery area in
- Error: "Database 'XXX' is already open and can only have one user at a time"
- ADB not responding. You can wait more,or kill"abd.exe" process manually and click 'Restart'
- 110.Which task would you perform before you run Oracle Universal Installer (OUI) in silent or suppre
- FIX: Error message when you try to install a large Windows Installer package or a large Windows Installer patch package in Windows Server 2003 or in Windows XP: "Error 1718. File was rejected by digital signature policy"
- The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact
- Debug error:"One or more breakpoints cannot be set and have been disabled.Execution will stop at the beginning of the program."