什麼是 User Story?
User Story 是一段簡單的功能敘述,以 客戶或使用者的觀點 撰寫下有價值的功能(functionality/feature)。與其說它是規格文件(documentation),不如說它代表(represent)客戶的一個需求而已,因為實做細節將延後至開發時才會確定。幾個 User Stories 的範例如下:
- 使用者可以在網站上張貼履歷
- 使用者可以搜尋有哪些工作
- 公司可以張貼新工作
- 使用者可以限制誰可以看到他的履歷
滿有趣的一點是:Node 團隊在前年左右放棄繼續遵守 CommonJS 的規範。Isaac 指出 "Ryan basically always gave zero fucks about CommonJS anyway" ,並轉述了 Ryan 的一句重話 : "Forget CommonJS. It's dead. We are server side JavaScript."
有興趣可以看看這個Github的討論串:https://github.com/joyent/node/issues/5132#issuecomment-15432598
( Issac 是 NPM 的作者, Ryan 是 Node 之父 )
Just the UI
Lots of people use React as the V in MVC. Since React makes no assumptions about the rest of your technology stack, it's easy to try it out on a small feature in an existing project.
<meta name=”viewport” content=”width=device-width, initial-scale=1, maximum-scale=1″>
def get_price(product_id):
...
return price
def christmas_discount(func):
discount = get_discount()
def get_christmas_price(product_id):
return func(product_id) * discount
return get_christmas_price
get_price(21) // ==> 200 get_price = christmas_discount(get_price) get_price(21) // ==> '160'
@christmas_discount
def get_price(product_id):
...
return price
get_price(21) // ==> '160'
註:如需從origin拉下一個branch,需在本地創一個branch,checkout 後再拉 "origin/branchname"。eg. "git pull origin test"
SELECT model FROM (
SELECT * FROM pc
UNION
SELECT * FROM laptop
UNION
SELECT * FROM printer
)
WHERE price=(
SELECT MAX(price) FROM (
SELECT * FROM pc
UNION
SELECT * FROM laptop
UNION
SELECT * FROM printer
)
)
WITH product AS ( SELECT * FROM pc UNION SELECT * FROM laptop UNION SELECT * FROM printer ) SELECT model FROM product WHERE price=( SELECT MAX(price) FROM product )