官术网_书友最值得收藏!

Chapter 8. Complexity is a Prison

Sometimes, I think, people are worried that if they make their code too simple, then either:

  1. Somehow they're not demonstrating how intelligent they are, or how valuable they are, to their managers, or
  2. The project will become so simple to work on that anybody can just steal their job!

It's almost as though if they actually did their job right, then they'd lose it. Now, stated that way, that's obviously a nonsensical viewpoint. But, if you've ever worried about it, here's something to think about:

What if your code is so complex that you'll never be able to leave your job?

What if you made something so complicated that nobody else could understand it? Well, then you personally would be tied to that project forever and ever. If you wanted to work on some other project at your organization, your managers would protest, "But who else will maintain this code?" Whoever was assigned after you to work on your code would constantly be walking into your new office, saying, "Hey, how does this part work?"

Maybe you have no conscience, and you'll just leave the code to some hopeless replacement and ditch the company. However, I'm guessing that most people would feel tied to a project if they were sure that nobody else could ever take it over successfully. And really, even if you just take off and leave, somebody's going to be calling you up and saying, "Um, hey, you know that one piece of code where…" You'll get emails from "the new guy": "Hey, I hear you wrote this code, and I have this problem…" If you can't make somebody else understand your code and have them truly take it over, then you're going to be stuck with a piece of that job forever.

In the Bugzilla Project, I did the best I could to work myself out of a job. I loved working on Bugzilla, but I don't want to be tied to it every moment of my life. I wanted to go on vacation sometimes. I wanted to write music!

You can still hear my music and songs here by the way: http://youtube.com/user/imagineeighty and http://soundcloud.com/mkanat.

I wanted to be able to leave my computer for a month, and not have the whole world collapse. So I worked to make Bugzilla simple enough and well-designed enough that somebody else could take over the parts I worked on, some day. Maybe then I would go on and work on other things in Bugzilla, I thought to myself, or some other programming project that I had, or maybe I would go make an album! Who knew!

I knew I didn't want to be imprisoned by my own code.

If job security is so important to you that you'd tie yourself to a single job forever just to get it, then maybe you should re-evaluate your priorities in life! Otherwise, when you're making decisions about your project, one thing to remember is this:

Complexity is a prison; simplicity is freedom.

-Max

主站蜘蛛池模板: 汽车| 桐城市| 卢氏县| 潜江市| 漳浦县| 绥德县| 出国| 池州市| 赞皇县| 隆昌县| 沙田区| 离岛区| 徐闻县| 蒙阴县| 彰化县| 普兰店市| 岳西县| 阿尔山市| 云林县| 绥芬河市| 三台县| 孟州市| 江西省| 盐城市| 鄂州市| 府谷县| 凤山县| 乌兰浩特市| 新绛县| 三门县| 永兴县| 新田县| 邢台市| 确山县| 锦屏县| 定边县| 洛隆县| 农安县| 宜昌市| 老河口市| 宜宾县|