进入编程世界的第一步

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.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 197,597评论 5 462
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 83,053评论 2 375
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 144,583评论 0 326
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 52,888评论 1 267
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 61,772评论 5 358
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 46,536评论 1 275
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 36,922评论 3 388
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 35,554评论 0 254
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 39,838评论 1 293
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 34,861评论 2 314
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 36,677评论 1 328
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 32,483评论 3 316
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 37,928评论 3 300
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,104评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 30,403评论 1 255
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 41,945评论 2 343
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 41,156评论 2 339

推荐阅读更多精彩内容