開源日報 每天推薦一個 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/