My first step into the world of Software Development — and what you can learn from it
转载自:medium 原文链接Link
As a budding student of computer science, there’s a disconnect between what you learn in class and what you see in the real world. You learn all there is to know about loops of every variety—for, while, do while. You can write a command line based tic-tac-toe game like it’s nobody’s business. And you write so much fill-in-the-blank x86 assembly that it makes your head spin.
作为一名计算机科学的新生,你在课堂上学到的东西和你在现实世界中看到的东西之间存在着脱节。你能写 for, while, do while 循环,可以用命令行写个小游戏,会写令你头疼的 x86 汇编,但这些和业务一毛钱关系都没有。
But you haven’t the slightest clue how something like Facebook works. Or Reddit. Or YouTube. You don’t even have an inkling of where to begin. When you Google “companies that use python,” since Python is the only language you know, you find people saying things like “Reddit…uses python for their backend.” Backend? What does that even mean?
但你丝毫不知道 Facebook 、 Reddit 或 YouTube 是怎么工作的,你甚至都不知道从哪里开始。当你使用 Google 搜索“使用 Python 的公司”时(因为 Python 是你知道的唯一一种编程语言),你发现人们说诸如“ Reddit....使用 python 作为他们的后端”。 什么是特么的后端?
There’s this giant gap in your knowledge between writing tic-tac-toe for the command line and building a “real” application, and nobody is telling you how to fill it in. Even though you’ve learned all about how to think logically, you have no idea how to apply what you’ve learned in order to build the things you want to build.
你在使用命令行写小游戏和构建一个真实的应用之间存在着巨大的鸿沟,没人告诉你如何跨过它。即使你已经学会了如何进行逻辑思维,你仍然不知道如何运用你学到的知识来构建你想要构建的。
Here’s the thing: it takes initiative to get to where you want to be. You won’t always have professors giving you templates and boilerplate for all your projects, leaving you to fill in the blanks. You won’t always have a lesson plan telling you “This is what you need to learn next.”
事情是这样的:到达你想要到的地方需要你自己的主动。你所有的项目不可能总有一个教授可以给你提供模板或者样板,让你来填补空白。你不会总有一个课程计划来告诉你“这个是接下来要学习的。”
Takeaway #1:
Nobody has more influence over your personal development than you. It’s up to you to decide what you want to learn, without someone spoon-feeding you the next step every step of the way. This self-directed learning, what Dan Luu might describe as a meta-skill, is one of the most important skills you’ll pick up in your journey towards becoming a software developer.
没有人比你更能影响你的个人发展。 这取决于你自己想要学习的东西,而不需要别人为你提供接下来的每一步。这种自我导向的学习,Dan Luu 描述为一种元技能,是你在成为软件开工人员的重要技能之一。
Luckily, these days we have Google to help out. “How to build a website using python,” you search. You stumble across this nifty little web framework and decide to give it a shot—not that you actually know what a framework is. You try reading the documentation from the beginning, don’t understand any of it (“database abstraction layer?”), and skip ahead to the installation step.
幸运的是,现在我们有谷歌来帮忙。你搜索“如何使用python构建一个网站,”。偶然发现这个漂亮的小框架并决定尝试一下——其实你并不知道什么是框架。您尝试从头开始阅读文档,但毫无头绪(“数据库抽象层?”是什么鬼),然后直接跳到安装步骤。
Finally, some actionable steps to follow! You copy the commands into your terminal. There’s something about something called pip, and virtualenv, whatever those are. You take a minute to look those up, just so you have an idea of what you’re doing to your machine.
最后,你跟着操作步骤,pip 、 virtualenv,不管这些是什么东西,你将命令复制到你的终端。你短暂的看一眼这些信息,你似乎知道它们在你电脑上做了什么。
Takeaway #2:
We learn by understanding, not by mindlessly following instructions. Get used to learning instead of giving up when you don’t understand something, and you’ll see that seemingly impossible tasks are really just greater opportunities to grow—it’s only a question of how long it takes.
我们通过理解来学习,而不是盲目的遵循指令。 当你遇到不明白的东西的时候要习惯学习而不是就此放弃,你会发现,看似不可能完成的任务其实是一个更大的成长机会,问题仅仅是它需要花费多久的时间。
Okay, looks like pip is a utility to install packages so you can import them, just like we import the built-in math package. Virtualenv seems like a way to isolate package installations to a specific project. You still don’t fully understand any of the commands besides mkdir and cd, but you‘re not totally clueless either. Time to move on to the quick start guide.
看起来 pip 是一个用来安装包的工具,所以你可以导入它们,就像我们导入内置的数学包一样。Virtualenv 似乎是将包安装隔离到特定项目的一种方法。除了 mkdir 和 cd 之外,你仍然不能完全理解其他命令,但是你也不是完全没有头绪。是时候转向快速入门指南了。
You follow the initial instructions, and there’s a burst of elation when you run your program and see “Hello, world” in your browser for the first time. You think to yourself, now this is what I’m talking about! No more boring old command line programs for me! It’s a small step, to be sure, but that’s your code in the browser, and that’s significant.
你按照说明进行操作,当你运行程序并在浏览器中第一次看到 “Hello, world” 的时候,你会兴奋不已。你默默的对自己说,这才是我想要的,而不是那些无聊的命令行小程序。这是迈出的很小的一步,但重要的是它是在浏览器里运行的代码。
You continue, but start running into a lot of concepts that you don’t fully understand. Routes? HTTP? GET? POST? And what are rendering templates? Some of these terms seem vaguely familiar, but you don’t actually know what they mean, so you stop along the way to look them up. Just like you learned about pip and virtualenv, you start to assemble a fuzzy picture of how this application is working.
你继续学习,但是开始遇到很多你不完全理解的概念。Routes? HTTP? GET? POST?还有什么是 rendering 模板? 这些术语有些似曾相识,但你并不真正了解它们的意思,所以你就停下来去查它们。就像你了解了 pip 和 virtualenv,你开始对这个应用程序的工作方式有了模糊的认识。
Takeaway #3:
Learning takes practice. Just like any other skill, it needs to be honed. And just like any other practiced skill, it can become a habit. Seize every opportunity you have to learn. Remember: success begets success. Make learning a habit, and not only will your personal growth skyrocket, but your desire to learn will grow as well.
学习需要练习。就像其他技能需要磨练一样。就像任何其他的练习技巧一样,它可以成为一种习惯。抓住每一个你必须学习的机会。记住:成功产生成功。让学习成为一种习惯,不仅会让你的个人成长飞速发展,而且你对学习的渴望也会增长。
You can use templates to display content like you would with any other HTML/CSS page, but the content is dynamic. You can control what content is displayed at different URLs by defining routes. You can even fetch content from other websites to use in your own application!
你可以像使用其他 HTML / CSS 页面一样通过使用模板来显示内容,只不过现在内容是动态的。通过定义路由,你可以控制不同 url 中显示的内容。你甚至可以从其他网站获取内容用到自己的应用中!
As you get more and more comfortable, you start to feel a degree of control and pride in your independent learning that you’ve never felt while working on any of your class projects. You feel empowered. Who even needs school, anyway?
随着你越来越舒适,你开始感受到一定程度的控制能力,并为自己的独立学习感到自豪,这是你在任何课堂从未感受过的。 你感到有控制力。 谁还需要上学呢?
As you gain confidence, the guide starts to feel a little…basic. It is, after all, a quick start guide. I could do something cooler than this, you think.
当你获得信心时,开始感觉入门指南有点基本,毕竟这是一个快速入门指南。你会想我可以做一些比这更酷炫的事情。
So you strike out on your own. You set up your project the same way you did before, with pip and virtualenv, because that’s the only way you know how to set up a project. You know how to set up the templates. You know how to set up the routes, the HTTP requests, the GETs and the POSTs. You might even dare to use a third party API and practice reading some more documentation. You still don’t understand everything, but you’re learning, bit by bit.
所以你自己动手。你用 pip 和 virtualenv 来建立你的项目,因为这是你知道如何建立一个项目的唯一方法。您知道如何设置模板。您知道如何设置路由、HTTP 请求、get和 post。您甚至可以使用第三方 API,并练习阅读更多的文档。你仍然不能理解所有的事情,但是你正在一点点地学习。
And finally, you build your very first independent side project. Not the result of a tutorial that hundreds of budding developers before you have followed. Not a class assignment that thousands of students before you have done. A real, tangible, honest-to-goodness application that would not exist had you not built it. And that’s an amazing feeling.
最终,你建立了第一个独立的项目。它不是跟随成百上千新手使用过的入门教程得到的结果,它也不是一个成百上千学生的课堂作业。它是一个真实的,有形的,以前不曾存在过的应用。这是一种奇妙的感觉。
So what’s next? Now that you’ve built an application, how do you put it online so everyone can use it? What really is a “back end?” A front end?
那么接下来要干什么呢? 既然你已经构建了一个应用,那么你何不把它放到网上以便每个人都可以使用它?什么才是“后端”?什么是”前端”?
Here’s the great thing about fostering a desire to learn: there’s always more. It’s like an amazing television series that you can never get enough of—and it never ends. There’s no such thing as learning too much. Every discipline in software development is an entire new world to dive into, and the more you learn, the more worlds are opened up to you.
培养学习欲望的事情总是会有很多。 这就像一部精彩的电视连续剧,只要不到剧终你是不会觉得满足的。 软件开发的每一门学科都是一个全新的世界,你学的越多,向你开放的世界就越多。
At some point, you realize that there is no single canonical path to being a “real” software developer. There’s not enough time to master every single thing. Everyone’s path to success is totally unique. It’s entirely up to you to forge a path to the destination you want to reach.
在某种程度上,你会意识到成为一个“真正”的软件开发者没有统一的规范路径。 你也没有足够的时间去掌握所有的知识点。 每个人通往成功的道路都是独一无二的。这完全取决于你如何去打造一条通往想要到达的目的地的道路。
This was the story of my own first step into the world of software development. If you want to see the very first side project that I ever built, you can check it out here.
And if you feel like sharing your own, feel free to post a link in a response! I’m always curious to see what kind of code people start out writing.