要建立網頁,你需要先學會寫 HTML 和想像寫出來的程式在瀏覽器裡會長什麼樣子。在開始寫 HTML 之前你需要兩個工具來解決下面兩個問題:
- 你寫的程式要存在哪裡
- 要有一個瀏覽器(web browser) 確認程式跑出來的結果(rendered result)
你寫的程式要存在哪裡
為了解決編輯與儲存程式的問題,下面我們提供三個程式編輯器(code editors) 的網站供你選擇,最推薦的是 Atom 這個編輯器。
Atom (recommended)
Build your First HTML and Viewing the Web Page
- 打開一個空白檔然後存成 `.html`
- selecting File → Save As…, and giving the file a name like `my-first-code.html`
Viewing the Rendered Web Page
從 Browser 去看你的檔案,有兩個方法
- 連點檔案兩下,用 default 的 browser 開啟;或是右鍵選擇你要的 browser
- 你也可以先開 browser 然後從 File → Open File…,記得更改檔案要存檔,然後再 refresh 瀏覽器。
Think like a Programmer
In this Nanodegree we will focus on five specific ways of thinking that all programmers have to use all the time. We will come back to these ideas repeatedly throughout the Nanodegree.
這門課一個很大的目標是 to give you practice thinking like a computer programmer,然而什麼是 thinking like a computer programmer 呢?下面我們用五個面向來看:
1. Procedural Thinking
Procedural thinking involves creating perfectly clear and unambiguous instructions for a computer to follow.
It may be easy to tell a person how to sort a deck of cards, but getting a computer to do that requires more thought. But once you've learned to think this way you'll find that computers can do itmuchfaster.
2. Abstract Thinking
Abstract thinking means finding similarity, or as programmers would say,generalityamongst seemingly different things.
In this Nanodegree you will visit hundreds of Udacity web pages. It would be impractical for a programmer to specifically program each of these pages individually. The Udacity programmers used the power of what's calledabstractionto avoid unnecessary repetition of work.
3. Systems Thinking
Systems thinking happens when you break a big problem down into smaller pieces. Programmers do this when they create a plan (often on paper) for how a program will work. It involves big-picture thinking and decision-making about a problem and how different pieces of a program can work together to solve it. If this is unclear now, don't worry! You'll understand what this means much more clearly by the end of the Nanodegree.
4. Technological Empathy
"Technological empathy" comes in many forms. For example, computer empathy is the ability to understand what a computer is, how it works, and what it's good and bad at doing.
A computer is a tool, as are the programs we use and the programming languages used to write them. It's almost impossible to program anything substantial without a basic understanding of how these tools work.
5. Debugging
Debugging is a systematic process of relentlessly identifying the cause of a computer program that doesn't work.
When a program doesn't work, it's because there is a mistake (also known as a "bug") somewhere in the computer code. Since these mistakes are an unavoidable part of programming, every good programmer has a system for fixing them and that system usually looks something like this:
Collect evidence (what makes this program fail?)
Generate theories (what may have caused this problem?)
Test those theories (if my theory is correct, how could I find out?)
Fix the problem
Learning how to learn
- 把學習的內容分成三種類型,真正的學習在這三種狀態中震盪