Programmers 'Misconceptions txog lub npe

Ob lub lis piam dhau los, kev txhais lus ntawm "Programmers 'misconceptions txog lub sij hawm", uas yog raws li cov qauv thiab cov qauv ntawm cov ntawv classic no los ntawm Patrick Mackenzie, luam tawm ob xyoos dhau los. Txij li thaum daim ntawv hais txog lub sijhawm tau txais txiaj ntsig zoo heev los ntawm cov neeg tuaj saib, nws pom tseeb ua rau kev txiav txim siab los txhais cov lus qub txog cov npe thiab cov npe.

John Graham-Cumming hnub no yws ntawm nws qhov blog uas lub khoos phis tawj uas nws tau ua haujlwm nrog tsis lees txais nws lub xeem vim yog cov cim tsis raug. Tau kawg, tsis muaj cov cim tsis raug, vim tias txhua txoj kev uas tus neeg sawv cev rau nws tus kheej yog - los ntawm kev txhais - tus cim tsim nyog. John nthuav tawm kev ntxhov siab heev txog qhov xwm txheej, thiab nws muaj txhua txoj cai, vim lub npe yog qhov tseem ceeb ntawm peb tus kheej, yuav luag los ntawm txhais.

Kuv nyob hauv Nyij Pooj tau ntau xyoo, ua haujlwm tshaj lij, thiab rhuav tshem ntau lub tshuab tsuas yog hu rau kuv tus kheej. (Cov neeg feem coob hu kuv Patrick McKenzie, tab sis kuv lees txais ib qho ntawm XNUMX lub npe "tag nrho" raws li qhov tseeb, txawm tias ntau lub khoos phis tawj tsis lees txais ib qho ntawm lawv.) Ib yam li ntawd, kuv tau ua haujlwm rau Cov Tuam Txhab Loj uas ua lag luam thoob ntiaj teb thiab, hauv txoj kev xav, tau tsim lawv lub tshuab rau txhua lub npe ua tau. Yog li ntawd, Kuv tsis tau pom ib lub tshuab computer uas tswj cov npe kom raug, thiab kuv tsis ntseeg tias cov kab ke no txawm muaj nyob qhov twg.

Yog li, rau txhua tus neeg lub hom phiaj, kuv tau sau cov npe ntawm kev xav tias koj lub kaw lus yuav ua rau tib neeg lub npe. Tag nrho cov kev xav no tsis yog lawm. Sim tsawg kawg txo cov npe tom ntej koj tsim ib qho system.

1. Txhua tus neeg muaj ib lub npe tag nrho canonical.
2. Txhua tus neeg muaj ib lub npe puv uas lawv siv.
3. Thaum lub sij hawm, txhua tus neeg muaj ib lub npe tag nrho canonical.
4. Thaum lub sij hawm, txhua tus neeg muaj ib lub npe tag nrho uas nws siv.
5. Txhua tus neeg muaj npe raws nraim N, tsis hais tus nqi ntawm N.
6. Cov npe haum rau qee tus cim.
7. Cov npe tsis hloov.
8. Cov npe hloov, tab sis tsuas yog qee qhov txwv.
9. Cov npe sau rau hauv ASCII.
10. Cov npe sau rau hauv ib qho encoding.
11. Txhua lub npe sib raug rau cov cim Unicode.
12. Cov npe yog qhov tseem ceeb.
13. Cov npe tsis yog qhov tseem ceeb.
14. Qee lub sij hawm muaj cov npe ua ntej lossis cov lus tom qab, tab sis koj tuaj yeem tsis quav ntsej lawv yam xyuam xim.
15. Cov npe tsis muaj tus lej.
16. Cov npe tsis tuaj yeem sau rau hauv tag nrho cov ntawv CAPITAL.
17. Cov npe tsis tuaj yeem sau tag nrho hauv tsab ntawv me.
18. Muaj kev txiav txim hauv cov npe. Xaiv ib qho ntawm cov txheej txheem kev txiav txim yuav cia li ua rau muaj kev txiav txim zoo ib yam ntawm txhua lub tshuab yog tias lawv txhua tus siv tib txoj kev txiav txim.
19. Thawj thiab lub xeem yuav tsum sib txawv.
20. Tib neeg muaj lub xeem lub npe lossis ib yam dab tsi zoo sib xws uas yog cov txheeb ze.
21. Ib tug neeg lub npe txawv.
22. Tus neeg lub npe yuav luag tshwj xeeb.
23. Okay, ok, tab sis cov npe tsis tshua muaj txaus uas tsis muaj ib lab tus tib neeg lub npe thiab lub xeem.
24. Kuv qhov system yuav tsis cuam tshuam nrog cov npe los ntawm Tuam Tshoj.
25. Los yog Nyiv.
26. Los yog Kaus Lim Kauslim.
27. Los yog Ireland, Great Britain, USA, Spain, Mexico, Brazil, Peru, Sweden, Botswana, South Africa, Trinidad, Haiti, Fabkis, Klingon Empire - tag nrho cov uas siv "weird" naming schemes.
28. Lub teb chaws Klingon yog ib qho kev tso dag, puas yog?
29. Damn kab lis kev cai relativism! Cov txiv neej hauv kuv haiv neeg, yam tsawg kawg muaj tib lub tswv yim ntawm ib qho kev lees paub feem ntau rau cov npe.
30. Muaj ib qho algorithm uas hloov cov npe ib txoj kev los sis lwm yam tsis poob. (Yog lawm, yog, koj tuaj yeem ua qhov no, yog tias cov zis ntawm lub algorithm yog tib yam li cov tswv yim, coj koj tus kheej ib qho khoom plig).
31. Kuv tuaj yeem ntseeg tau tias phau ntawv txhais lus ntawm cov lus phem no tsis muaj npe.
32. Cov neeg raug muab npe thaum yug los.
33. OK, tej zaum tsis yog thaum yug, tab sis zoo nkauj tom qab.
34. Okay, ok, nyob rau hauv ib xyoos los yog li ntawd.
35. Tsib xyoos?
36. Koj dag, puas yog?
37. Ob lub tshuab sib txawv uas sau tib tus neeg lub npe yuav siv tib lub npe rau tus neeg ntawd.
38. Ob tug neeg khiav dej num sib txawv, yog tias muab ib tus neeg lub npe, yuav nkag mus rau tib lub cim yog tias lub kaw lus tsim tau zoo.
39 Cov neeg uas nws lub npe rhuav tshem kuv lub cev yog cov neeg txawv txawv. Lawv yuav tsum muaj cov npe ib txwm siv, zoo li η”°δΈ­ε€ͺιƒŽ.
40. Cov neeg muaj npe.

Daim ntawv teev npe tsis yog tag nrho. Yog tias koj xav tau cov piv txwv ntawm cov npe tiag tiag uas tsis lees paub cov ntsiab lus no, kuv yuav zoo siab muab rau lawv. Xav tias dawb ntxiv cov ntsiab lus tseem ceeb ntxiv rau cov npe ntawm cov lus tsis raug hauv cov lus, thiab xa tib neeg txuas rau daim ntawv teev npe no lub sijhawm tom ntej lawv tuaj nrog lub tswv yim ci ntsa iab los ua cov ntaub ntawv nrog thawj_name thiab xeem_name kab.

Tau qhov twg los: www.hab.com

Ntxiv ib saib