update on 2017-3-5
stage 0, html
Computers are stupid because they interpret instructions literally
- HTTP: protocol
- www=World wide web
- HTML=Hypertext Markup Language
atom-html-preview
package. This gives you instant feebback locally.Thinking like a programmer
- procedural thinking: create perfectly clear and unambiguous instructions for a computer to follow. It requires more thought than telling a person. But once it is created, computers do it much faster.
- abstract thinking: finding similarity and generality, avoid unnecessary repetition of work.
- systems thinking: involves big-picture thinking and decision-making about a problem and how differnt pieces of a program can work together to solve it.
- technological empathy: understand how computer works and what it’s good and bad at doing
Tag and Elements
class, href, src, alt
which greatly enrich the representation.<b> bold font </b>
<em> emphasize</em>
<a href="www.yuchao.us"> anchor tag for website </a>
<img src="url" alt="imag tag"'>
<br> line break
<p> paragraph tag </p>
<span> inline container</span>
<div> box container </div>
html structure
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title> real title </title>
<head>
<body> content
</body>
<html>
stage 1
How Learning anything works
stage | Mind state | feel | transition time |
---|---|---|---|
0 | Ignorance | don’t know it exist. WTF | minutes |
1 | Awareness | that’s a thing | days |
2 | Ability | this is hard, I can do it | years |
3 | Fluency | it comes nature |
CSS
shapes.html/css
- css seems to be a collection of dictionaries ( but different key-value pairs are separated by semicolon), the name of the dictionaries are called CSS selectors. There are 3 major types of selectors: tag(the same name), class(dot+ name), ID attribute (# + name). Other attributes can be used as selector as well, e.g. [data-modal=”open”]{}
- the page of html is constructed by stacking rectangles. It’s very convenient to use “Developer tools” in Chrome to see how html (Elements), JavaScript(console) and css(Styles) work collaboratively to display the object.
- the styles window in Chrome not only shows the corresponding code in css files, but also shows the default stylesheet for the pre-define tags such as h1, head, body.
how does CSS relate to html?
<link rel="stylesheet" href="xx.css">
<script src="xx.js"></script>
type
attribute.<style>
tag or <div style="">
for experimenting. But it is not recommended for general use. Because css is all about don’t repeat yourself.tricks
<!-- here -->
CSS:
/* here */
the first website of the world
Tim Berners-Lee is the inventor of html. By wiki, I learned that he believes Unitarian Universalism. After a few days, I went to First Unitarian Church of Oklahoma City, which is an interesting place.
Stage 2
command line introduction. Actually I have organize mine in a previous post. some missing:
- mkdir: make directory (file folder)
- touch: create file with a extension name.
- rm: remove file
- rmdir: remove file folderstage 2 has 50~70% overlap with CS 101: intro to computer programming :build a search engine. Beside, they recommend some udacity courses I am interested:
- Introduction to Algorithms
- Intro to Theoretical Computer Science
my notes in CS 101
def name(a,b):
str(number)
a.find(b, number)
len(a)
if statement:
while statement:
for a in list:
** is power
list.index(a)
a in list
a not in <list or str>
list.append (a)
<string>.split()
<string>.split(‘symbol’)
' '.join(string)
try: except
chr(ord(<str>))
range(star,end)
range(star,step,end)
max(a,b)
pow(a,b)
resources
https://developers.google.com/edu/python/introduction?hl=zh-CN&csw=1#prelude
http://www.tutorialspoint.com/python/
金旭亮http://www.jinxuliang.com/
http://wiki.python.org/moin/IntroductoryBooks