惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Security @ Cisco Blogs
罗磊的独立博客
宝玉的分享
宝玉的分享
Last Week in AI
Last Week in AI
T
The Blog of Author Tim Ferriss
美团技术团队
T
Tailwind CSS Blog
博客园 - 三生石上(FineUI控件)
博客园 - Franky
G
Google Developers Blog
Jina AI
Jina AI
Stack Overflow Blog
Stack Overflow Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
V
Visual Studio Blog
腾讯CDC
S
SegmentFault 最新的问题
Recent Announcements
Recent Announcements
博客园 - 叶小钗
Microsoft Security Blog
Microsoft Security Blog
雷峰网
雷峰网
L
LangChain Blog
Vercel News
Vercel News
Forbes - Security
Forbes - Security
PCI Perspectives
PCI Perspectives
N
News | PayPal Newsroom
S
Security Affairs
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - 司徒正美
J
Java Code Geeks
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Hacker News: Ask HN
Hacker News: Ask HN
Schneier on Security
Schneier on Security
A
About on SuperTechFans
Attack and Defense Labs
Attack and Defense Labs
Google Online Security Blog
Google Online Security Blog
aimingoo的专栏
aimingoo的专栏
MongoDB | Blog
MongoDB | Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
酷 壳 – CoolShell
酷 壳 – CoolShell
Cloudbric
Cloudbric
B
Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
P
Proofpoint News Feed
D
DataBreaches.Net
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
B
Blog RSS Feed
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
N
News and Events Feed by Topic

博客园 - 南柯之石

用户中心 - 博客园 自引用泛型模式分析 一定间隔时间下重复执行一个函数的几个方法 为什么.NET Framework就没有个专门的P/Invoke Library? 在ListView的GroupItem头中显示每列的Summary 小例子背后的大道理——用户需求+设计原则+正确应用 =设计方案 GET和POST有什么区别?及为什么网上的多数答案都是错的。 小例子背后的大道理——Adapter模式详解 小例子背后的大道理——从DIP中“倒置”的含义说接口的正确使用 XmlSerializer, DataContractSerializer 和 BinaryFormatter区别与用法分析 使用WPF开发的扫雷游戏,双系统主题复刻版 技术误用带来的技术偏见及所谓的“经验” 从一个UI交互设计师的讲座说开去 NoSQL和MemeryCache的出现意味着传统数据库使用方式的变革吗? 不使用反射进行C#属性的运行时动态访问 一次模块划分的争论及其结局 电子书籍质量保证事件分析 在SQL Server中调用.NET程序集 T-SQL 操作XML示例
Which would you perfer? "easy and fast and works well" or "hard and time consuming and error prone"
南柯之石 · 2012-11-29 · via 博客园 - 南柯之石

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.