开源日报 每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,坚持阅读《开源日报》,保持每日学习的好习惯。
今日推荐开源项目:《复制粘贴 awesome-copy-rules》
今日推荐英文原文:《How I Explain to My Grandma That I Am a Front-End Developer》

今日推荐开源项目:《复制粘贴 awesome-copy-rules》传送门:GitHub链接
推荐理由:一个关于代码复制的注意事项。从别的地方复制一段代码到自己这里来实在不能算是罕见之事,实际上,这也是一个学习方法——你有了积木说明书上的理论,以及一个已经搭好任你摆弄的积木堆,自然就有足够的时间弄清楚所有积木的用处。而当你通过不断的找来新的积木堆弄清了每块积木的用处之后,自然就能随心所欲的将这些积木组合成你喜欢的样子了。
今日推荐英文原文:《How I Explain to My Grandma That I Am a Front-End Developer》作者:Maks
原文链接:https://medium.com/better-programming/how-i-explain-to-my-grandma-that-i-am-a-frontend-developer-8c7eb6cebcf9
推荐理由:如何向七大爷八大婶解释你的前端开发者职业

How I Explain to My Grandma That I Am a Front-End Developer

Helping you explain what front-end developers are and what they do

I’ve been a front-end developer for over two years. At times, I’ve found myself in situations where I had to explain what I do to people who know nothing about programming.

So, now, I’m giving it my best to clarify how lines of code typed on my keyboard are transformed into something you can see, click on, and even use in your day-to-day life.

Starting With the Basics: Programming

We all speak a language. We use it for a lot of things but, generally, we use it for communication. The same works with computers.

We want to make them do something for us, we communicate with them. Unfortunately, computers don’t speak English yet. However, they do use something called machine code. Simply put, the language of computers.

So, skipping some details, we may say that programming is when you can tell the computer what to do by speaking their language. That is clearer now, isn’t it?

Which Language Do You Speak?

We figured out that we need to speak a language that computers can understand, but what is that language?

There is more than one language we can use. All of them serve the same purpose — to turn our thoughts into something a computer can understand.

Why more than one, you might ask. Here is the answer: each of them serves a different purpose. They are just tools and we usually choose different ones depending on the goal we want to achieve.

Let’s take, for instance, a car and a bicycle. They both have wheels, take us to the desired destination — but evidently, we use them for different purposes.

You’d probably decide to use a car instead of a bicycle if you want to go to another country unless you want to burn thousands of calories.

In programming, it’s the same, but burned calories are equal to hours you spend on your work. You don’t want to spend thousands of them, right?

In general, one language is better for analyzing data and forecasting, another one for calculations and statistics, yet another one for building websites, applications, and so on.

Getting Closer

Alright, I guess everything is still quite clear for you, so let’s get to something more specific that I do, personally. We’ll talk about creating websites and application interfaces.

They are, simply, parts that you see when using any website. This is called front-end development. We finally get to the part where I explain in simple words what I do every day.

HTML, CSS, and JavaScript

Have you ever wondered how the browser works? How we can watch movies, listen to music, read the news on a portal, play games, and perform many activities, just by typing anything in a search bar?

Behind the scenes, three core things make it happen — HTML, CSS, and JavaScript. I know, things are getting complicated, so let’s take a look at this simple example.

Imagine a play button on your music player. The button itself — that’s an HTML element.

HTML is used for adding content onto the page, such as text, images, links, and even videos. For example, HTML would allow you to put a play button in a certain position on your webpage.

Following on from the example above, CSS would allow you to change the size, color, and style of the button you added with HTML.

However, when you want to interact with said button and perform actions, for instance, music to start playing, a message to be sent, or log in somewhere — this is the work of JavaScript. It can be used along with HTML and CSS.

Also, JavaScript is often used separately, when it comes to creating in-browser games, programs, and even mobile applications, which makes knowledge of this language a very powerful skill.

Front-End Developer

To put things simply, JavaScript is designed to make front-end development easier and more attractive.

In most cases, JavaScript is used to create responsive, interactive elements for web pages that improve the user’s experience. Things like menus, animations, video players, and interactive maps can be created quickly and easily with JavaScript.

Everything you’ve read above, that’s what we, as front-end developers do. We are responsible for creating those elements, putting them all together, and making them interact with each other.

We are the builders of the part of the web that you can see with your own eyes. We are the guys who know how to speak with computers.

Another great thing about programming: many people think that it is about logic and mathematics only. However, it is also about creativity, problem-solving, and thinking two steps ahead.

It requires us to be constant learners, to teach ourselves to think ahead, and to be able to focus on something. We need to be patient, especially when it comes to solving complex problems, and to be ready to learn new things every day.

Conclusion

I hope that it is now clearer to you what front-end developers are and what they do.

Moreover, if you’re a front-end dev, it will be easier for you to explain to your grandma what exactly it is that you do on computers the whole day.
下载开源日报APP:https://openingsource.org/2579/
加入我们:https://openingsource.org/about/join/
关注我们:https://openingsource.org/about/love/