農民約翰是一個驚人的會計_我的朋友約翰在CSS Grid中犯了一個錯誤。 不要像約翰-這樣做。

農民約翰是一個驚人的會計

It had been two years and John had no job.

已經兩年了,約翰沒有工作。

John was a smart 20-something guy. Okay, he had a job — but it wasn’t one he liked. It was too monotonous and was not nearly creative enough. His day job only bored the hell out of him.

約翰是個聰明的20多歲的家伙。 好的,他有一份工作-但這不是他喜歡的工作。 這太單調了,還不夠有創意。 他的日常工作只會使他無聊。

For John, it felt as though it wasn’t difficult to learn to code. He taught himself to code, and started looking for the opportunity to leave his boring job — finally.

對于John來說,感覺好像并不難學習編碼。 他自學了編碼,并開始尋找機會離開無聊的工作-終于。

After a month of futile job searching, he got a call from Sharon.

經過一個月的徒勞尋找工作,他接到了沙龍的電話。

Sharon was the recruiter for youknowho Inc, an AI startup in the valley.

沙龍曾是位于山谷的AI初創公司youknowho Inc的招聘人員。

With a lot of enthusiasm, John blazed through all the hiring process. Guess what the interesting part was?

約翰滿懷熱情地完成了整個招聘過程。 猜猜有趣的部分是什么?

That call from Sharon.

沙龍的那個電話。

She asked a couple questions on his background, and John couldn’t wait to share his boring, monotonous typical work day with her.

她問了幾個有關他的背景的問題,約翰迫不及待地想與她分享他無聊,單調的典型工作日。

He tried to tell himself that it didn’t matter if he got the Job. At least, those were the words he muttered as the call ended.I just had to share how I really felt about my current Job, he said.

他試圖告訴自己,是否得到這份工作并不重要。 至少這些是通話結束時他喃喃自語的話。 我只是分享如何我真的覺得對我現在的工作,”他說。

Weeks went by, and it felt like a dream when got himself a job as a junior frontend developer.

幾周過去了,當自己擔任初級前端開發人員的工作時,這就像一個夢。

And that’s where the story begins.

這就是故事的開始。

John遇到Khalid和CSS網格 (John meets Khalid and the CSS Grid)

Khalid wasn't a DJ.

哈立德不是DJ。

If he were, then all he mixed was clean code, and not songs.

如果他是,那么他所混合的只是干凈的代碼,而不是歌曲。

If you wanted to ruin a nice afterparty, then have Khalid be your DJ. You’d get nothing short of a complete mess.

如果您想破壞一場美好的派對,那么請讓哈立德(Khalid)做您的DJ。 您將一團糟。

Khalid wasn't a big fan of songs anyway, but who needs to love music when you’re tech lead at a thriving Startup in the Valley?

無論如何,哈立德(Khalid)都不是歌迷,但是當你在硅谷蓬勃發展的創業公司擔任技術主管時,誰會喜歡音樂?

As tech lead, Khalid was responsible for the entire development team. This meant more than just dealing with technical issues — it also meant he had to deal with people from different backgrounds.

作為技術主管,Khalid負責整個開發團隊。 這不僅意味著要處理技術問題,還意味著他必須與來自不同背景的人打交道。

And that’s a darn hard thing to suceed at. But Khalid excelled not just at being a great technical leader. He had an impeccable relationship with the development team.

這是一件很難的事情。 但是Khalid不僅擅長成為一名出色的技術領導者。 他與開發團隊有著無可挑剔的關系。

It wasn't a surprise that the two got talking almost immediately. Who wouldn't love John?

這兩個人幾乎立即開始交談并不奇怪。 誰會不愛約翰?

His broad smiles were enough to light up a tunnel. He just smiled always. Who does that!

他燦爛的笑容足以照亮隧道。 他只是一直微笑。 誰做的!

回到辦公室 (Back at the office)

Everyone was ready for work.

每個人都準備工作。

John entered with a cup of coffee. It was morning, and the office had just started to buzz.

約翰帶著一杯咖啡進來了。 那天早上,辦公室剛開始嗡嗡作響。

Good Monday morning, eh?

星期一早上好,是嗎?

“So, John it is nice to have you join the development team. Was wondering if you were ready to take on a new task today?” asked Khalid

“所以,約翰,很高興您加入開發團隊。 想知道您今天是否準備好承擔一項新任務?” 哈立德問

“Hey, boss. I was born ready! ”

“嘿,老板。 我天生就準備好了! ”

That’s John for you. He was born ready — indeed. Happy dude.

那是約翰給你的。 他天生就準備好了-的確如此。 老兄

“Umm, I need you to set up a new landing page for our new product. And we want it written with the CSS Grid. Ever heard of it?”

“嗯,我需要您為我們的新產品設置一個新的登錄頁面。 我們希望它使用CSS Grid編寫。 聽說過嗎?”

“Oh yes I have,” John said quickly.

“哦,是的,”約翰Swift說道。

學習CSS網格 (Learning the CSS Grid)

John had no idea what the CSS Grid was.

John不知道CSS網格是什么。

The only reason he said yes was that he didn't want to look stupid in front of Khalid.

他唯一同意的理由是,他不想在哈立德面前顯得愚蠢。

He searched on Medium and found great CSS Grid articles. He read to his heart’s content, and started working on the layout.

他在Medium上搜索,找到了很棒CSS Grid文章。 他認真閱讀了內容,并開始進行版式設計。

約翰建立的布局 (The layout John built)

John had a lot of experience with Bootstrap.

約翰在Bootstrap上有很多經驗。

He was quite familiar with the concept of a 12-column grid. So, with the CSS Grid, the first thing he did was set up a 12 column grid like so:

他對12列網格的概念非常熟悉。 因此,對于CSS網格,他所做的第一件事是建立一個12列網格,如下所示:

grid-template-columns: repeat(12, 1fr)

“Haha, that was easy,” he thought to himself.

“哈哈,那很容易,”他自言自語。

In fact, John did this for every side project he worked on while learning the CSS Grid.

實際上,John在學習CSS網格時為他從事的每個副項目都做了此工作。

John enjoyed working with the CSS Grid, and he thought it was fun.

John喜歡使用CSS Grid,他認為這很有趣。

He made a few mistakes, and some stuff didn't work as he expected, but he was able to quickly fix the issues.

他犯了一些錯誤,有些東西沒有達到他的預期,但是他能夠Swift解決問題。

He knew how to Google things. In this day and age, everyone should.

他知道如何Google的東西。 在這個時代,每個人都應該。

與哈立德的會面 (The meeting with Khalid)

“I’ve got it working now, Boss.”

“我現在已經開始工作了,老板。”

Khalid was excited to see John. They chatted about his experience building the layout, and Khalid went on to take a look at the code.

哈立德很高興見到約翰。 他們聊起了他構建布局的經驗,然后Khalid繼續看了一下代碼。

Well, every layout built with the CSS Grid pretty much begins with the grid definition. So, that was where Khalid looked first.

嗯,使用CSS Grid構建的每個布局幾乎都始于網格定義。 因此,這就是Khalid的第一眼。

“Oh, man. There’s something not right here.”

“天啊。 這里有些不對勁。”

為什么創建12列? (Why did you create 12 columns?)

And Khalid began his lecture …

哈立德開始他的演講……

12 column grids are popular in web design today. But the idea behind the CSS Grid is to create the number of columns you need without bloating the layout with columns you don’t really need.

12個列網格在當今的網頁設計中很流行。 但是CSS網格背后的想法是創建所需的列數,而不會用不需要的列來使布局膨脹。

The CSS Grid layout forces you to think about layouts in CSS a little differently than we’ve done for over 20 years.

CSS網格布局迫使您對CSS布局的思考與我們20多年來所做的稍有不同。

It is a game changer, one that includes a lot of unlearning.

它是一個改變游戲規則的人,其中包括很多未學習的知識。

“A neater approach would have been to create the 2 or 3 columns you needed and just get on with the design,” said Khalid.

Khalid說:“更巧妙的方法是創建所需的2或3列,然后繼續進行設計。”

“There’s no harm in redefining the number of columns within the media query too. Makes it perfect for responsive design.”

“重新定義媒體查詢中的列數也沒有害處。 使其非常適合響應式設計。”

課程 (The lesson)

With the CSS Grid layout, you aren’t bound to a set number of rows or columns.

使用CSS Grid布局,您不必綁定到一定數量的行或列。

You also don’t have to create 12 columns every time. If you don’t need 12 columns, don’t create them. The CSS Grid isn’t another grid based CSS framework.

您也不必每次都創建12列。 如果不需要12列,則不要創建它們。 CSS網格不是另一個基于網格CSS框架。

You’re free.

你自由了。

As pointed out by Per Harald Borgen, you may create 12 columns if you want to experiment with white spaces between columns.

正如Per Harald Borgen指出的那樣,如果您要嘗試在列之間使用空白,則可以創建12列。

Other than that, create the number of columns you really need, and get on with the design.

除此之外,創建您真正需要的列數,然后繼續進行設計。

使用CSS網格布局可以使網絡向前發展 (Using the CSS Grid layout moves the web forward)

I read an answer to why Apple keeps getting rid of things, instead of adding them.

我讀了一個答案 ,解釋了為什么Apple不斷擺脫事物而不是添加事物。

There, I learned this:

在那里,我學到了這一點:

“Supporting legacy is not always the best answer. Dropping things helps the industry move forward to adopt newer, better, formats.”
“支持傳統并不總是最好的答案。 放下東西可以幫助行業向前邁進,采用更新,更好的格式。”

In the same way, choosing to learn and use the CSS Grid advances the web. It helps the industry embrace newer and better formats. It helps us grow as a community. A community we so love, and want to grow.

以同樣的方式,選擇學習和使用CSS Grid可以使網絡發展。 它可以幫助行業采用更新更好的格式。 它幫助我們成長為一個社區。 我們熱愛并希望成長的社區。

Be like Khalid. Start using the CSS Grid if you can.

像哈立德一樣。 如果可以,請開始使用CSS網格。

Where possible, invest in a decent CSS Grid education. You’ll be helping to move the web forward.

在可能的情況下,投資進行體面CSS Grid教育。 您將幫助推動網絡向前發展。

想成為專業人士嗎? (Want to become a Pro?)

Download my free CSS Grid cheat sheet, and also get two quality interactive Flexbox courses for free!

下載我的免費CSS Grid備忘單,并免費獲得兩本優質的交互式Flexbox課程!

Get them now ?

立即獲取 ?

翻譯自: https://www.freecodecamp.org/news/my-friend-john-made-a-mistake-in-css-grid-dont-be-like-john-do-this-instead-91649f480da1/

農民約翰是一個驚人的會計

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/395103.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/395103.shtml
英文地址,請注明出處:http://en.pswp.cn/news/395103.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

zip直鏈生成網站_手把手教你如何用飛槳自動生成二次元人物頭像

【飛槳開發者說】李思佑,昆明理工大學信息與計算科學大四本科生;2018年和2019年兩次獲得全國大學生數學建模比賽國家二等獎;2020年美國數學建模比賽獲M獎。指導老師:昆明理工大學理學院朱志寧想畫出獨一無二的動漫頭像嗎&#xff…

Gradle入門到實戰(一) — 全面了解Gradle

聲明:本文來自汪磊的博客,轉載請注明出處 可關注個人公眾號,那里更新更及時,閱讀體驗更好: 友情提示由于文章是從個人公眾號拷貝過來整理的,發現圖片沒有正常顯示,沒關注公眾號的同學可通過如下…

java 0-9所有排列_java實現:鍵盤輸入從0~9中任意5個數,排列組合出所有不重復的組合,打印出來...

必有追加大分!!!比如1.2.3.4.5共有120個組合12345,12354,12435,12453,12534,12543;13245,13254,13425,13452,13524&#x…

智能家居物聯網化將成為AWE大會最大看點

AWE大會已經在今日9點半開幕,AWE在今年將擴張至8個展館,其整體展示規模達到11萬平米,這是以往都無法匹敵的。海爾、美的、格力、海信、創維、TCL、康佳、格蘭仕、澳柯瑪、新飛、美菱、奧馬、方太、老板、萬和、萬家樂、華帝、帥康、櫻花、格美…

PHP 命名空間(namespace)

PHP 命名空間(namespace) PHP 命名空間(namespace)是在PHP 5.3中加入的,如果你學過C#和Java,那命名空間就不算什么新事物。 不過在PHP當中還是有著相當重要的意義。 PHP 命名空間可以解決以下兩類問題: 用戶編寫的代碼與PHP內部的類/函數/常量…

給matrix重新列名_如何認真升級Mac終端(甚至給它一個Matrix主題)

給matrix重新列名by Marcus Gardiner通過馬庫斯加德納(Marcus Gardiner) 如何認真升級Mac終端(甚至給它一個Matrix主題) (How to seriously upgrade your Mac terminal (and even give it a Matrix theme)) 藍色藥丸,紅色藥丸和通往極樂世界的3個步驟 (A Blue Pill…

javaweb 圖書管理系統完整代碼_看一名Java開發人員以紅隊思維五分鐘審計一套代碼(續)...

前言上篇文章的發布引起了很多讀者的瀏覽,有很多讀者也催更希望讀到續集,作者也收獲到讀者的鼓勵,說明這條路線對大家有幫助,是有意義的。所以,今天作者將繼續闡述在審計Java代碼時的思路。概述上篇文章所講的SQL注入和…

愛立信數據分析解決方案抓住物聯網發展機遇

愛立信在2016年1月6日至9日于美國拉斯維加斯舉辦的國際消費電子展(CES)上推出“用戶和物聯網數據分析”解決方案。該解決方案將能幫助運營商提高對用戶和物聯網終端的內部管理效率,同時探索跨越多個垂直領域的新型物聯網應用。 用戶和物聯網數…

Lua初學習 9-12 基礎

1:string 轉 number :tonumber(string) 2: number 轉 string :tostring(number) 3:string API: Lua中的字符串是不可變值,a "cocotang" string.gsub(a,"c","z") print(a) ----> cocotang 1獲得字符串長度:string.le…

iview下拉選

問題描述:創建場景,連續創建場景時,第一個場景創建成功后,第二次進入創建窗口,點擊測試任務下拉編輯只有上次創建成功的那一個任務候選,選中該任務中,關聯腳本也只有上次成功創建的唯一個候選下…

JAVA實現在面板中添加圖表_Java 創建PowerPoint圖表并為其添加趨勢線

圖表,是指將既得數據用圖形的方式表示出來。在前文中我們介紹過如何使用Java程序來為Excel文檔創建圖表的方法。本文將通過使用Java程序來演示如何創建PowerPoint圖表及為圖表添加趨勢線。趨勢線的運用能夠顯示數據的變化趨勢,同時能夠幫助預測數據的未來…

code warri_我參加了有史以來的第一屆Warri Tech宣傳活動。 這是我學到的。

code warriIn the city of Warri, Delta state of Nigeria, there is a saying that goes “Warri nor dey carry last, if e hard well well na draw”. This translates to “Warri is never behind in the scheme of things (events)”.在尼日利亞三角洲州的沃里市&#xff…

Socket編程小結

目錄: 什么是 socket?... 1 Internet 套接字的兩種類型... 1 網絡理論... 2 結構體... 2 本機轉換... 3 IP 地址和如何處理它們... 4 socket()函數... 4 bind()函數... 4 connect()程序... 5 listen()函數... 6 accept()函數... 6 send() and recv() 7 …

idea設置中文界面_《英雄聯盟手游》設置界面中文翻譯圖分享 外服漢化界面一覽...

導讀 英雄聯盟手游目前以及正式上線了,不過現在的話是沒有中文版的,只有外服,所有很多地方是看不懂的,也不明白的,這樣的話就需要翻譯了,具體要怎么設置會比較,相關的步驟是什么呢?下…

windows 2008 r2 系統默認80端口被系統占用的處理

--windows 2008 r2 系統默認80端口被系統占用的處理 --使用netstat 命令查看指定端口netstat -ano | findstr :80----如下所示:本地的80端口被進程為4的占用 TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 4 TCP 192.168.1.207:60652 …

java實現封裝的三部_Java 封裝

Java 封裝在面向對象程式設計方法中,封裝(英語:Encapsulation)是指,一種將抽象性函式接口的實作細節部份包裝、隱藏起來的方法。封裝可以被認為是一個保護屏障,防止該類的代碼和數據被外部類定義的代碼隨機訪問。要訪問該類的代碼…

小豬短租超棒新房_freeCodeCamp講座簡介:您可以免費觀看的超棒技術講座

小豬短租超棒新房by Quincy Larson昆西拉爾森(Quincy Larson) freeCodeCamp講座簡介:您可以免費觀看的超棒技術講座 (Introducing freeCodeCamp Talks: awesome tech talks you can watch for free) Developers give thousands of tech talks every year at confer…

安卓10不支持qmc解碼_官宣:安卓10已發布!21款手機已適配,小米華為率先支持...

隨著今天凌晨谷歌 I/O 大會的召開,Android Q 也就是安卓10正式官宣,新版的安卓10加入了諸多新手勢,從 Home 鍵設計上看,安卓10 的新版手勢很大程度上有疑似借鑒 iOS 的手勢,底部一個長條,作為 Home 用來返回…

linux系統編程之進程(七):system()函數使用【轉】

本文轉載自:http://www.cnblogs.com/mickole/p/3187974.html 一,system()理解 功能:system()函數調用“/bin/sh -c command”執行特定的命令,阻塞當前進程直到command命令執行完畢 原型: int system(const char *comma…

安裝了最新版本的java 用友nc打不開_NC無法安裝客戶端插件,不能進入用友NC系統登陸界面...

NC無法安裝客戶端插件,不能進入用友NC系統登陸界面問題現象現象1:可以打開web界面,但無法進入登陸界面,一直停留在右圖所示界面。現象2:系統提示安全警告問題原因在使用IE首次登錄NC系統時,系統會自動下載N…