Lập trình tinh giản

Embed Size (px)

Text of Lập trình tinh giản

1. T P C H L P T R N H https://tapchilaptrinh.wordpress.com2Vol.04/2013 2. tr chuyn v Tinh gnTinh gn hay ting Anh l Lean khng thc s l mt khi nim mi m trn th gii, nhng Vit Nam ngi bit khng nhiu, ngi hiu cng t, ngi thc hnh li cng him. Khng r Lean vo Vit Nam chnh xc t thi im no, nhng chng ti phng on cng phi c hn hai thp k. Toyota vo Vit Nam nm 1995, v t nht th h cng mang n hi th Lean t y. Lean bt ngun t Nht Bn, gip cc cng ty Nht v ngy nay l cc cng ty trn ton cu trong vic tng li nhun, cht lng, nng sut, tc ng thi gim thiu n lc, thi gian v chi ph. Thy r nhng gi tr m Lean c th mang li cho pht trin phn mm ni ring v cuc sng ni chung, chng ti chn Lean lm ch ca s 2 ln ny. Tp Ch Lp Trnh hy vng s mang n cho bn nhng hiu bit v gi nht nh thc hnh Lean. Chc cc bn c nhng pht giy th v cng cc bi vit ca Tp Ch Lp Trnh! H Ni, thng 4 nm 2013 Ban bin tp Tp Ch Lp Trnh2 3. trong s nyS kinVo l . 2 Thng 4 2 0 1 34.ScrumDay Vit Nam 20125.Kha hc Lean Mindset6.Summer Coderetreat 2013Tinh gin 7. Bn v s n gin10. 7 nguyn l ca Pht trin phn mm Tinh gn14. 10 nguyn tc ca Lp trnh Tinh gn21. Ti cu trc n gin hn23. Hy tinh gn trong hc tp v cuc sng25. Thit k khng cht28. Kanban cho mi ngi31. Kim th n v vi PHPUnit trn NetbeansChia s 36. 37.3Th tnh bn Computer Bn c vi Tp ch Lp trnh 4. ScrumDay Vit Nam 2012 Ngy 09/12/2012, i hc FPT v Hanoi Scrum t chc hi tho v Phng php Pht trin Phn mm Linh hot (Agile Software Development) - ScrumDay Vit Nam 2012. y l ln u tin mt hi tho ln v Agile c t chc ti H Ni. Hi tho tp trung vo cc ni dung pht trin phn mm t qun l pht trin sn phm, k thut, cng c, quy trnh, cho n chin lc pht trin sn phm da trn trit l Agile. Chnh thc xut hin t nm 2001, n nay Agile tr thnh trit l ph bin nht th gii trong vic pht trin cc phn mm t n gin n phc tp. Tuy vy, Vit Nam, Agile mi ch xut hin trong mt cng ng CNTT hp v cn l mt n s vi i a s gii CNTT. ScrumDay Vit Nam 2012, c s tham gia ca cc din gi hng u trong nc lnh vc pht trin phn mm v Agile. Ch ca hi tho tp trung vo cc lnh vc pht trin phn mm t qun l pht trin sn phm, k thut, cng c, quy trnh, cho n chin lc pht trin sn phm da trn trit l Agile. V vy, ngi tham d c c hi tm hiu v phng php pht trin phn mm tin tin ang lm thay i trit l pht trin ca ngnh cng nghip phn mm, cng nh giao lu, chia s kinh nghim trong pht trin v ng dng AgileScrum vi cc chuyn gia v ng nghip khc. Mong rng, ScrumDay Vit Nam cng vi AgileTour (s kin thng nin c t chc ti Si Gn t nm 2011) s gp phn thc y vic ng dng AgileScrum trong cng ng CNTT Vit Nam, a ngnh cng nghip phn mm Vit Nam ngy cng pht trin.4 5. Kha hc Lean Mindset Ngy 07/03/2013, i hc FPT t chc kha hc Lean Mindset. Hc vin ca kha hc c lm vic vi Tom Poppendieck v Marry Poppendieck, hai tc gi ca Pht trin Phn mm Tinh gn (Lean Software Development). y l mt phng php sn xut phn mm theo trit l Agile, s dng T duy Tinh gn v cc nguyn l c trng ca Tinh gn (vn xut pht t ngnh sn xut t Lean Manufacturing) c p dng cho lnh vc pht trin phn mm. Trong chuyn ving thm Vit Nam theo li mi ca AgileVietnam.org hai ng b mang n cho cng ng CNTT hai kha hc Lean Mindset ti hai thnh ph ln l Si Gn v H Ni. Kha hc ch din ra trong duy nht mt ngy. Nhng ni dung c cp ti trong kha hc xoay quanh cc vn nh: ti sao cc cng ty li c kh nng bin nhng mi nguy him thnh thnh cng? Cch khm ph ra nhng g khch hng thc s mun? Lm th no cung cp sn phm ng tin cy hn bng cch qun l cng vic? v.v..Theo nh gi ca nhiu hc vin sau kha hc, k thut Value Stream Mapping (nh x Dng Gi tr) l iu th v nht m h hc c t kha hc ny. y l k thut c trin khai nhiu trong Sn xut Tinh gn, n gip tm ra cch thc gia tng hiu qu cho dng sn xut. Kha hc tuy ngn song n cung cp cho hc vin nhiu tng mi, trit l mi TINH GN hn trong cng vic cng nh cuc sng hng ngy. Mong rng s c thm nhng kha hc b ch nh vy dnh cho cng ng CNTT ti Vit Nam.5 6. SummerCoderetreat 2013 Coderetreat l g? Coderetreat l mt hot ng c khi xng vo khong 4 nm trc ti hi tho v m ngun Sandusky Ohio. C rt nhiu nhng cuc tho lun xoay quanh vic chng ta thc hnh khng . Trong nhng lnh vc c yu t sng to, ngi ta c rn luyn thng xuyn. Nhng hu ht cc lp trnh vin li c rn luyn ch yu t thc t cng vic. V vy h khng hc tp tt theo cch thng thy vi kh nng vn c nh khi h ri xa nhng p lc t thc t. Coderetreat ln u tin c t chc ti Ann Arbor, Michigan. Sau nhiu n lc, gi y Coderetreat c nh dng nh chng ta thy hm nay: n gin, hiu qu v c tnh lan ta.y cng l ln u tin Vit Nam tham gia s kin ny vi hai u cu l H Ni v Si Gn (do HanoiScrum v AgileVietnam ng ra phi hp t chc), kt ni trc tip vi cc im t chc khc ti cc quc gia Singapore, Trung Quc, Nht Bn.Gi y hot ng ny tr thnh thng l vi nhiu ngi vo mi dp cui tun.Sau s kin u tin ny, ban t chc nhn c nhiu phn hi tch cc t pha ngi tham d. V vy, vo ma h ny, Coderetreat s tip tc ph sng ti Vit Nam vi s kin Summer Coderetreat 2013. Pha H Ni, HanoiScrum v nhng thnh vin CocoDojo s phi hp cng cc im cu khc trong c nc cng t chc mt ngy hi dnh cho cc lp trnh vin v nhng ngi v ang rn luyn cc k nng lp trnh chuyn su.Hnh dung v Coderetreat Coderetreat l mt s kin thc hnh chuyn su, tp trung vo cc nguyn tc c bn ca pht trin phn mm v thit k. Bng cch cung cp cho cc nh pht trin c hi tham gia vo thc hnh c ch , trnh xa nhng p lc ca vic hon thnh nhim v. Coderetreat chng t l mt hot ng c hiu qu cao gip ci thin k nng vit m nhm gim thiu cc chi ph thay i theo thi gian.Hy vng vi sc nng ca ma h, mt ngy trn vn vi Coderetreat s mang n cho cc lp trnh vin nhng tri nghim ng nh.S kin Coderetreat din ra trong thi gian mt ngy vi cc c im c bn nh sau: Chia phin lm vic. Mi phin 45 pht. Gii bi ton Game of life ca Conway. Lp trnh theo cp (pair programming). Sau mi phin th o cp. Xa ht m ngun sau mi phin. Thc hin ci tin sau mi phin.a im v thi gian chi tit s c ban t chc thng bo n cc bn ti a ch: hanoiscrum.net facebook.com/groups/cocodojo Hn gp ti Summer Coderetreat Vit Nam 2013!Hot ng Coderetreat ti Vit Nam S kin Global Day of Coderetreat 2012 thu ht hn 3000 lp trnh vin trn ton th gii tri di trn 24 mi gi v c truyn trc tip thng qua cng c Hangout trn Google+.6 7. Bn v s n ginM Kim DungNu bn th nhn vo s pht trin logo qua cc thi k ca Nike, Mercedes, hay l Microsoft Windows, bn s thy c mt im chung: s n gin. Cc logo cng ngy cng n gin. Xu hng n gin ha hin khng ch trong thit k ha, m cn nh hng rt nhiu ti th gii cng ngh ngy naym khm ph, cn li i a s ngi s dng bnh thng thch mt sn phm ng n l bit cch dng. Ngi ta k rng Steve Jobs yu cu i ng k s thit k iPod lm th no ngi nghe c th chn c bi ht a thch trong vng 3 thao tc. Hoc nh Google, ngoi cht lng tm kim, mt phn cng quan trng cho s thnh cng ca h l thit k n gin, n gin n mc hu nh bt k ai cng c th s dng c m khng phi hc hi g nhiu. Kt qu l 70% s ngi dng my MP3 nghe nhc bng iPod v trn 80% lng tm kim Internet dng Google.Xu hng n gin ha Trc khi iPhone nh m ca Apple xut hin, nhng chic in thoi trng nh th no? Hnh vung, hnh bu dc, gp, trt, bt, nhiu nt, bn phm y , loi ng nt gc cnh, v.v.. Sau khi iPhone ra i vi ng mt nt bm, hnh dng gn nh phng l, ton ng nt c bn, th in thoi by gi trng nh Hnh 2.Khng ch d dng, vic n gin ha sn phm gip cho cc nh pht trin c tp trung vo cht lng. Nhng ngi theo ch ngha n gin c cu t hn tc l nhiu hn (Less is More). Cng mt cng sc b ra, phn mm n gin hn, t chc nng hn ng ngha vi cht lng mi chc nng s nhiu hn. Hy nghe li Steve Jobs khuyn Larry Page, CEO ca Google: Xc nh 5 sn phm chnh ca anh l g, ri qung ht nhng th cn li i. Nhng th ch c km hm anh li thi. Chng ta khng thc s bit c phi Larry Page nghe li Jobs hay khng, nhng danh sch nhng sn phm, dch v m Google khai t di thi Larry Page cng kh di: Bookmarks Lists, Friend Connect, Google Gears,Cc hng in thoi ua nhau tm kim nhng thit k n gin nht c th, nhiu ng thng, mt phng, t nt. C my tnh, phn mm, hay giao din website (hnh 3, 4, 5), tt c u ngy mt n gin hn.u im ca n gin n gin th d dng. Sn phm cng n gin cng d dng. Ch tr mt s ngi chuyn su hay my7 8. Trang ch Yahoo phc tp pha sau.Google Search Timeline, Google Wave, Knol, CalDAV API, Google Building Maker, Google Cloud Connect, v.v.. Thay vo , Google Search, sn phm ch lc ca Google, mi ngy li mt thm ci tin, tin li hn cho ngi dng v doanh thu ca Google tng u trong my nm qua.Chng ta th nhn vo logo ca Apple, mt qu to cn d trng rt va mt c to nn bi vi ng trn n gin, th nhng n sau vi ci ng trn n gin y l c mt cng trnh phc tp, tnh ton k cng p dng t l vng, t l hi ha nht trong t nhin, nh hnh di.Du n ca n gin in m nt trong tt c cc sn phm c sc nhiu lnh vc khc nhau trong cuc sng, khng ch ring cng ngh. Nhng chic siu xe khng bao gi nhiu mu, thm ch a s ch mt mu rt c bn l en hoc trng. Nhng b trang phc sang trng khng bao gi tua rua. Nhng vn bn chuyn nghip khng c qu hai phng ch.Vy n gin y phi hiu l n gin pha ngi dng, khng phi n gin cho ngi lm sn phm. Thc t, cng n gin cho ngi dng bao nhiu, cng phc tp cho ngi pht trin by nhiu. Hi ti cn hc trong trng i hc, lm bi tp lp trnh, chng trnh chy ra c kt qu th nhanh, nhng lp trnh cho thy gio kim tra bi mt cch thun tin nht, t thao tc nht, trnh by ra mn hnh mt cch p nht c th th tn rt nhiu thi gian v cng sc. T l cng sc i khi n mc 20-80, vi ch 20% dnh cho vic chng trnh chy ra kt qu.Vy ti sao ngi ta khng lm mi th u n gin? Bi v lm n gin rt kh.S phc tp ca n gin Jonathan Ive, thit k trng Apple, tc gi nhng chic my Mac n gin m snh iu, ni: lm ra mt th n gin, ngi ta phi lm rt nhiu iuThit k Logo ca Apple8 9. Giao din Microsoft Office Ti gin giao din. B tt c nhng chi tit rm r. Giu i nhng thanh cng c, nhng phm bm t khi dng. Ti a ha khng gian lm vic cho ngi s dng. Lm nh Google khi thit k Chrome: Chng ti mun dnh cho ngi dng khng gian lt web rng nht c th. Chrome b ht cc trnh n truyn thng, gp thanh tm kim v a ch vo thnh mt, tn dng vin ca s (window border) t cc tab, thanh trng thi ch hin ln khi cn. Hy nhn s thay i giao din ca Firefox, i th sng s trong trn chin trnh duyt, trang trc thy s thnh cng ca giao din ti gin nh th no.Vic n gin ha sn phm l mt vic rt kh m nhiu khi nhng hng khng l cng khng lm ni. Hy th xem mt ngi dng bnh thng mun xem thng s DNS trong Windows 7 bng giao din ha mt bao lu: 10 ci nhp chut. Trong khi Mac OS ch mt 4, cha n mt na. l l do ti sao ngi ta c cu