[翻译] 学习iOS开发的建议:如何从菜鸟到专家
[文章原地址]
http://mobile.tutsplus.com/tutorials/iphone/ios-quick-tip-from-novice-to-expert/
翻譯有誤之處請勿見笑,本人將在文章的部分地方添加注釋,并根據需求增減文章內容,在此對原作者辛勤勞作表示感謝?
iOS Quick Tip: From Novice to Expert
Bart Jacobs?on Jul 29th 2013 with?5 comments
Even though it’s possible to learn the essentials of iOS Development in a weekend, it will take much longer to master the craft. The question then is how do you transition from a novice to an expert? In this quick tip, I will provide you with a breadcrumb trail that may help you on your way to becoming a great iOS developer.
雖然,在一個愜意的周末學習IOS開發是可行的,但是呢,想完全熟練的掌握它可要花費n長時間.問題是,你怎樣才能夠從一個菜鳥變成老鳥?在以下簡短的描述中,我會給你來點建議,幫助你盡快上路,成為IOS開發者的高手.
?
1.?Practice, Practice, Practice
There are no shortcuts.?This is something that I’d like to emphasize before continuing, because it is important to get rid of any illusions that might be stuck in your head. You don’t become a skilled developer if you only program on Sunday afternoons between 4PM and 5PM…if the sun isn’t shining and there’s nothing on television. Don’t get me wrong, it may be fun to do so, but it won’t bring you much closer to your goal of becoming an expert developer. Apart from a few exceptions, most people need practice -and lots of it. If you aren’t prepared to put in the hours, then it’s better to revisit your goals and ambitions. Become great at something you love and the time spent practicing will be its own reward.
沒有捷徑啊少年!繼續講下去之前我得提前說一下,因為,摒除任何能夠速成的想法而去面對殘酷的現實是相當重要的.如果你僅僅想在星期天下午的4點到5點之間來搞一下,你是不可能成為一個高手的...僅僅是因為不能出去玩或者是看不了<生活大爆炸>了.別耍我了,也許你覺得你已經花了一個小時的時間來做了,但是呢,那絕不會讓你接近你想成為高手目標的一步.拋開一些例外,大部分人都需要練習.練習再練習,如果你不想花時間去做,那你就別想成為高手而繼續當苦逼碼農.花費時間以及精力去做你喜歡做得一些事情是成為高手的必經之路.
2.?Learn From Others
One of the best strategies to improve your skills and to adopt best practices is to learn from other people’s code. This not only means browsingStack Overflow, but also, and more importantly, libraries or code snippets that are open sourced by fellow developers.
一個提高你能力的最好的策略以及最有效率做練習的方式就是去學習別人的代碼.這里不僅僅是說你去 Stack Overflow (棧溢出網站可是相當不錯的網站哦)網站上去取經就夠了,去學習少數大神的開源庫以及它們的一些代碼片段也是非常重要的.
Whenever you dive into a library, such as?AFNetworking?or?Magical Record, it is key to not be overwhelmed by the code you read. Chances are that you don’t understand every line of code in these libraries, but that’s not really the point. The point is to look at the source code from a higher level and learn as much as possible, such as naming conventions, best practices, design patterns, etc.
一旦你深入到了一個庫,例如 AFNetworking 或者 Magical Record,不要被那些晦澀難懂的巨量的代碼所嚇尿了,你不可能懂得這些庫里面的每一行代碼每一處私密的地方,但是呢,那不是學習的要點所在哦,真正需要學到的是,從一個更高的角度來盡可能的學習它們,例如一些常用的使用方法,設計優秀的地方,設計模式等等諸如此類.
In addition to learning from other people’s code, it is a good learning experience to create your own libraries. Some time ago, I was developing an application that uses Core Data as the data layer. Instead of using?Magical Record, I decided to create my own library by exploring Magical Record and recreating the pieces of functionality that I needed. Not only did this result in a lean, agile library, it also taught me a lot about the inner workings of Magical Record.
除了去學習別人的代碼之外,另一種好的學習經驗就是創建你自己的庫.long long ago, 我在開發一個應用程序時,那個...用到了Core Data作為應用程序的data層,而不是用Magical Record,我決定創建我自己的庫,從Magical Record中尋求靈感以及提取出我自己想要的功能,最后呢,我不僅創建出了一個瘦小的靈活的庫,而且,我還學習到了Magical Record中很多的核心設計方法.
3.?Don’t Copy and Paste
This brings me to another key aspect of learning the right way: don’t mindlessly copy and paste code. We all use code snippets that we find on places like?Stack Overflow?or?Apple’s Developer Forums, but it’s important to not mindlessly copy and paste the code that you find on the web. By copying code that you find, you don’t learn a thing. The greater danger is that you don’t know what you’ve just added to your code base. This might result in unexpected behavior and it will make it very difficult to debug your code later.
我的另外一個好的學習經驗是:不要腦殘的復制和粘貼別人的代碼.或許我們都會從 Stack Overflow 或者 Apple's Developer Forums 中找到些代碼片段來使用,但請不要隨意的從網上下載代碼然后無腦的進行復制粘貼.你用了你的不經過前額思考過的代碼,你啥也不懂,而且,一個很大的風險是,你根本就不知道到底加了什么鬼東西到你的工程中,這個也許會出現各種奇葩的問題,而且,接下來,你得面對痛苦的debug過程,估計也搞不定的^_^.
It may be tempting from time to time to quickly use a code snippet that seemingly solves the problem that you are working on, but I strongly urge against this practice. Read the code, understand what you are adding into the code base, and, possibly, customize the solution to your needs.
一次又一次的快速的無腦的使用了別人的代碼片段且貌似解決了你當前的難題,這是如此的吸引人啊.但我強烈的反對這種方式,研究那些代碼吧,至少你得知道把什么東西加進了你的工程中,最好的就是修改別人的代碼以及定制出你自己需要的解決方法.
It goes without saying that this doesn’t apply to libraries or frameworks that are actively maintained. If you had to go through Magical Record before you’d be able to use it in your project… I’m sure you understand the difference. Use your common sense.
這可不是說叫你拋棄那些正在更新和維護的(第一方提供的)庫和框架.[一句話翻譯不了了,英語水平菜,理不清語法結構了-_-!!!]...我能確定,你將會體驗到不同點,平時怎么整的就怎么整吧.
4.?Patterns
Cocoa and Objective-C are in many ways very different from other programming languages and environments. This means that they have their own patterns and best practices. I’m sure that you’re already familiar with a few common patterns, such as delegation and notifications. However, there are many more patterns that can help you during your development, such as the singleton, observer, and command patterns. The?Cocoa Fundamentals Guide?gives you a nice overview of the most common patterns in Cocoa.
Cocoa 和 Objective-C 在某些地方,與其他的編程語言有著很大的差異哦,這意味著,它們都有著它們自己的一種模式和一種最適合自己的編程方式.我相信,你已經對一些常用的設計模式如代理和通知模式有所了解.然而,還有著其他的一些(設計)模式能夠幫助你開發,諸如單例.觀察者.和指揮者模式.這本書 Cocoa Fundamentals Guide 能給你一個較為全面的關于Cocoa中使用到的一些設計模式的指導.
5.?Know Your Tools
Becoming a great developer isn’t only about understanding the language and the frameworks. It is just as much about working efficiently with the tools that you use day in and day out. For iOS development, this means Xcode and possibly other tools, such as?PonyDebugger?andCharles.
了解了語言特性以及各種框架就能成為高手嗎?想得美呢.你還得每天琢磨著怎么超高效的運用各種工具.對于開發IOS來說,這意味著要用好Xcode,還有其他的一些工具,比如PonyDebugger和Charles.
If you’d like to learn a few extra tricks, you may be interested in a?previous quick tip?that I wrote about this topic.
你不想學一些額外的編程技巧嗎?這樣的話,也許,你會對我之前寫過的一些快速提示感點興趣.
6.?Stay Up To Date
Even if you can’t attend Apple’s yearly developer conference, WWDC, it is a good idea to browse the numerous session videos and watch the ones that spark your interest. The presentations are usually given by the engineers that work on the technologies covered in the session, which gives you detailed information and instructions about how to use them. It is also a great way to quickly get up to speed with those technologies.
你不能參加蘋果每年一度的開發者大會?別急,那就去看大量的會議視頻吧,那也是能夠拓寬你的視野的.你能得到很多的益處,那些都是各種領域內牛逼的工程師所免費贈送的^_^,你能從里面得到很多的最新的信息,以及幫助你怎么去用他們.這可是一種讓你趕上日新月異的科技的一種技巧哦.
There are many excellent developers that regularly write about their craft, such as?Matt Gemmell,?Aaron Hillegass, and?Mike Ash. You can find a more extensive list in a?previous post?I’ve written for Mobiletuts+.
一些巨牛逼的開發者,經常會寫寫關于他們牛叉的工作的,如Matt Gemmel.Aaron Hillegass 和 Mike Ash,最近我已經把那份詳細的變態人物列表分享在了Mobiletuts+網站上,來捧捧場吧.
Bonus:?Learn Other Languages
I have noticed that my overall understanding of software development has improved significantly by learning new languages or working with new frameworks. The advantage of this approach is that you don’t limit your view of what is possible to the language that you are most familiar with.
我注意到了哦,我對于軟件開發的綜合能力,隨著我去學習新的語言和使用新的框架而得到了顯著的提升.也沒想的那么容易,關鍵就是你不能夠限制了自己的視野,不要把自己限定死在一種你最熟悉的開發語言中.
I recently dipped my toes in?Ember.js?and learned that the creators,?Yehuda Katz?and?Tom Dale?took inspiration from Cocoa. The implementation of the MVC (Model-View-Controller) pattern of Ember.js is a bit unconventional for a JavaScript framework, but it is not that surprising if you are familiar with Cocoa.
最近我染指了Ember.js,他的創建者 Yehuda Katz 和 Tom Dale 可是從Cocoa開發中得到的靈感喲.這個MVC設計的實現對于JaveScript 框架來說可是很奇葩的(非傳統的),但是呢,如果你熟悉Cocoa,那也沒啥了不起的.
There is no “best” language to write software in as they all have their pros and cons. The nice thing, however, is that they are all a little (or a lot) different and it’s those differences that makes learning new languages interesting and eye opening. Ruby, for example, was a real eye opener for me in terms of writing DRY (Don’t Repeat Yourself), readable, and clean code.
編寫軟件可沒有什么最好的語言,每種語言都有其擅長的方面.好語言呢,就是那種它們只有一點點不同,然而就是這點點不同,讓它學起來超級帶感以及開闊視野.例如,Ruby,在編寫DRY(別重復你自己),可讀性和清新的代碼方面令我大開眼界.
Conclusion
If you don’t want to put in the hours to become a better programmer, then you may want to reconsider why you wanted to become a programmer in the first place. However, if you get excited about a new library or tool that can help you in your development, then you probably won’t have a problem improving your skills over time. You really have to love what you do to become good at it and I think this is especially true for programming. No matter what people tell you, you won’t become an expert developer overnight, but I promise you that your skills will improve if you keep learning and beating on your craft.
如果你不想花費時間用在刀刃上一天到晚就知道dota.DNF.英雄聯盟啊,你就得重新想想你能成為牛逼的開發者么?如果,一個新的庫或者工具能夠幫助你開發,你還樂于去使用它學習它,提升能力就指日可待.你真的需要喜歡上自己要做的事情,只有這樣你才能真正的提高自己.不管別人怎么告訴你,你都不可能靠一個晚上就變成老手,但是,我知道,只要你能夠堅持下去,你的能力一定能夠得到提升!
轉載于:https://www.cnblogs.com/YouXianMing/p/3631577.html
總結
以上是生活随笔為你收集整理的[翻译] 学习iOS开发的建议:如何从菜鸟到专家的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python爬虫英文单词_Python_
- 下一篇: 【PYTHON】基于tkinter的九型