您的位置:首页 > Web前端

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:

Server 1

Server 2

Server 3

DEV

qauser

qauser

qauser

QA

qauser

qauser

qauser

UAT

qauser

qauser

qauser

PROD

produser

produser

produser

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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐