I still remember how naive I was just after I finished my studies. I was convinced that I was ready to join any software company and start shining as a top class developer. Obviously, no long after I started working, I realized how many things I didn’t know.
As I have been acquiring experience, I have been learning things the hard way, stuff which I was never taught, and which its understanding, is basic to become a good developer. This is my list of the 10 things I wish I had been taught.
1.- We’re always wrong.
Developers, among other non technical defects, have quite big egos, that´s why is very hard for us to recognize that we were wrong about something. I’ve seen many endless design discussions where developers will go on and on with their own ideas… well, guess what.. We are all wrong, the only difference between our positions is the degree of wrongness.
Is very important to understand and embrace this fact, only once that we do so we will be open to listen to others and use their own ideas to build a better solution.
2.- If something can break, it will break.
Aka “hope driven development“, if you are not sure about something, if you find yourself using the word “should”, then you are in trouble.
There is only one solution for this, do whatever is necessary to make sure that it doesn’t break, this could mean that you will have to write a test, debug, clarify the requirements…
3.- All code is crap.
After 10 years complaining about all the code that surrounds me, I have come to a brilliant conclusion,all code (including mine), is crap. Of course there are many degrees of crappy code, but even the best code I’ve ever seen is not easy to read.
This doesn’t mean that is not worthy trying to make your code better, all the opposite, there’s a huge difference between the best kind of code and the worst kind of code.
4.- There is always a bug.
ALWAYS! Is just a matter of how hard you look for it.
5.- The most important thing is the client.
Among many things the client doesn’t care are: the technologies you use in the project, how many more things that required the application does… or in general, if you use good practices.
And since I can imagine how much hate comments I will get if I only leave the previous paragraph, let me clarify what I want to say… We should never forget the client perspective, sometimes developers use technologies or insist in over engineering just for the sake of using best practices, but remember, if it doesn’t add any value for the client, drop it.
6.- Design on paper doesn’t work.
I used to believe that I could put my whole design in a paper upfront, and then just fill in the gaps, but it simply doesn’t work.
Software development is complex, is hard to see all the entities and their relationships until you don’t get the hands dirty. So keep planning and designing upfront, it is very helpful, just don’t try too hard, and don’t take the diagrams as contracts.
7.- Less is more.
Or as you probably know it better: “Keep it simple, stupid!” (KISS). So if is not necessary drop it, because remember: “If something can break, will break”.
8.- Coding is only 20% of what we do.
Be ready to spent 80% of your time thinking, debugging, testing, in meetings, conversations… And all of the other activities are very important, so you have to develop a wide range of skills, not only technical, to become a good software developer.
9.- The customer doesn’t know what he/she wants NEVER!.
Customers have a necessity, or an idea, but they don’t know the details… Software development is all about discovering the details and removing all the uncertainty and converting them into an application.
10.- Someone has done it before.
So don’t reinvent the wheel, use Google, or better yet, ask your colleagues, many times they may have done already the same or something very similar.
Bonus: Hey! Our job is cool!
On the bright side, programming is still cool!
笔者依然记得当年完成学业时,深信自己已经准备好进入任何一家软件公司,并开始成为一个顶级的开发人员。显然,开始工作后没多久,笔者就意识到,还有很多事是我所不了解的。
在不断吸取经验的同时,笔者一直在努力学习那些我从来没有学过的,但却是成为优秀的开发人员所应了解的基本知识。以下是笔者希望自己能在学校就学到的十件事。
1. 我们总是错的
开发人员有着相当大的自我意识,包含了一些其他的非技术性缺陷,这也正是为什么我们很难发现我们做错了什么。我看到过很多无休止的设计讨论,开发人员不断地发表自己的想法……呵呵!猜猜怎样……我们都错了,唯一的区别就是我们犯错的离谱程度不同。
理解并接受这个事实非常重要,我们只有这样做了,才能敞开心胸去听听别人的意见,采用他们的想法,来得出一个更好的解决办法。
2. 事情若有可能出错,就一定会出错
也就是说“希望驱动开发(hope driven development)”,如果你对于某些事并不确定,如果你发现自己使用了“应该”这个词,那你就麻烦了。
而这只有一个解决方案,尽己所能去保证它不会出错,这可能意味着你需要编写一个测试、调试并验证需求……
3. 所有的代码都烂
在我抱怨那些我碰到过的代码十年之久后,我得出了一个精辟的结论,所有的(包括我自己写的)代码,都烂。当然,烂还是有等级之分的,但即便是我见过写得最好的代码,也是难以读懂的。
这并不意味着把你的代码写得更好是没有意义的,恰恰相反,最好和最坏的代码还是有天壤之别的。
4. 错误(Bug)总会存在
永远存在!问题只在于要发现它困难与否。
5. 客户最大
许多客户并不在乎你在方案中使用了哪些技术,应用程序需不需要做更多的事……或通俗上说,你是否使用了好的实践方案。
也因为我可以想象,要是我只说了前面那一段,我会收到多少恶评,让我说得更清楚些……我想说的是,我们永远不应该忘记客户的立场,有时候,开发人员为了最佳实践而在项目工程中过度坚持采用(某些)技术,但要记住,若这些技术无法给客户带来价值,那就放弃吧!
6. 纸上谈兵是行不通的
我曾认为,我可以在前期就把我的整个设计置于纸上,然后只要将缺漏处填上就好,但这样根本行不通。
软件开发是复杂的,若不亲手去碰碰看,很难看到所有的实际层面以及它们之间的关系。因此,在前期保持规划与设计是很有用的,但不要过度坚持,也不要把设计图表当作合约固守。
7. 少即是多
或者,你可能知道更好的说法是:“Keep it simple, stupid!”(保持简单,KISS设计原则)。所以,如果没有必要的就舍弃吧!因为要记住:“事情若有可能出错,就一定会出错。”
8. 编写代码只是我们所做工作的20%而已
请准备好,花80%的时间用于思考、调试、测试、开会、谈话……而所有的其他活动都是非常重要的,所以若要成为一个优秀的软件开发人员,你必须培养广泛而全面的技巧(Skill),而不仅仅是技术(Technical)。
9. 客户永远不知道他/她想要的是什么
客户若有需求,或是想法,但是他们不知道详细情况……软件开发要做的工作就是,发现细节并去除所有的不确定性,将这些需求转换成客户想要一个应用程序。
10. 已经有人做过了
所以不要再重新发明轮子,用谷歌找找看,或者更好的方法是,请教你的同事,很多时候他们可能都已经做了相同、或非常类似的事情。