有哪些事情是程序员都知道,但大多数人不知道的
1.
Trytellingthistoanormalperson:Aparentmaykillitschildrenifthetaskassignedtothemisnolongerneeded.
试着把这句话告诉一个正常人:“分配给孩子的任务已不再需要时,父母会杀了他们的孩子。(分配给子进程的任务已不再需要时,父进程会终止其子进程。)”
2.
Programmingisthinking,nottyping.Mostofprogrammingisspentsleeping,walkingaround,staringoutthewindow,ordoinganythingelsethathelpsyourelaxandthink.
“编程”在于思考,而不是敲键盘,编程过程中的大部分时间会用于睡觉,散步,凝望窗外,或者任何有助于放松和思考的事情上。
3.
Mostofthehackingscenesinmoviesarecompletebullshit.
电影中大部分的黑客场景完全就是胡扯。
4.
Thatabout25%ofthehoursspentwritinganapplicationarespentfiguringoutwaystheenduserwilldosomethingwrong.
编写应用程序时,大概有四分之一的时间会用于思考最终用户会怎么瞎搞。
5.
Countingstartsfromzero,notone.
计数从0开始,而不是1。
6.
Underthehood,mostcriticalsoftwareyouuseeveryday(likeMacOSX,orFacebook)containsaterrifyingnumberofhacksandshortcutsthathappentobarelyfittogetherintoaworkingwhole.Itwouldbeliketakingapartabrand-new747anddiscoveringthatthefuellineisheldinplacebyacoat-hangerandthelandinggearisattachedwithducttape.
大部分你每天接触的重要软件,比如苹果操作系统(MacOSX)或者Facebook,内部代码都包含超多不规范的奇技淫巧,整个系统拼在一起还恰好能用。这就像是拆开一架崭新的747客机,然后发现燃料管线是由衣架固定住的,而起落架是用布基胶带加固的一样。
7.
ThatWindowsdesktop'sRefreshbuttonisnotsomemagicaltoolwhichkeepsyourcomputerhealthy.
Windows桌面的“刷新”按钮,不是什么能让你电脑保持良好运行状态的神奇工具。
Whatdoesadesktoprefreshactuallydo?Refreshingthedesktopsimplyredrawstheiconsonthedesktop.That'sit!Itdoesn'trefreshtheRAM.Itdoesn'tcleanyourPC.Itdoesn'trefreshyourcomputerthewayitrefreshesyouwhenyouwakeupfromanap.Refreshingthedesktophasabsolutelynoeffectontheperformanceofthecomputer.
那么刷新桌面到底是干什么的呢?刷新桌面就是刷新一下桌面上的图标。然后就没有然后了!它不会刷新RAM,不会清理你的电脑,也不会像小睡令你神清气爽一样,让你的电脑焕然一新。刷新桌面对电脑性能一点影响都没有。
8.
Computerscan'tactuallygenerateatrulyrandomnumber.
电脑其实无法生成一个真正的随机数。
9.
Digitalcontentcanneverbemoved,onlycopied.
Youcanneverwatchorlistentoanythingontheinternetwithouthavingitcopiedtoyourcomputerfirst.Youcannotpasswordprotectacomputerfromsomeonewhohasphysicalaccesstoit,onlyencryptionworks.
数字内容不能被移动,只能被复制。
虽然你觉得自己在网上看电影听音乐,实际上这些内容都会先从网上下载到你的电脑上。
对那些可以实际接触到你的电脑而言的人来说设置密码其实无法保护电脑内的内容,一定要对文件加密才行。
Whenyouemptythetrashcan,thefilesarenotdeleted.
Whenyouformatyourharddrive,thefilesarenotdeleted.
Murphywasright.
清空回收站并不会删除文件。
格式化硬盘也不会删除文件。
墨菲是对的(译注:墨菲定律——如果一件糟糕的事情有可能发生,就一定会发生。)
Yourdesktopcomputercanrunadvancedprogramsforfreethatusedtobeavailableonlytobigcompaniesfor$100,000.LikeUnix,virtualmachinesandSQLservers.
TheCloudsimplymeanssomeoneelse'scomputer.
ThatOfficedocumentsareactuallyZIPfiles.
以前大公司花上十万美元才能使用的高级程序,比如Unix操作系统,虚拟机和SQL服务器,你的台式机现在都可以免费运行。
简单来说云端就是别人的电脑。
Office文档实际上都是ZIP文件。
10.
ProgrammerisnotaPCRepairMan.
Programmerisonewhodealswithalgorithmsanddesignprinciples,nottheonewhorepairscomputer.
程序员不是电脑修理工。
程序员是处理算法、设计原理的,不是修电脑的。
免责声明:本站发布的教育资讯(图片、视频和文字)以本站原创、转载和分享为主,文章观点不代表本网站立场。
如果本文侵犯了您的权益,请联系底部站长邮箱进行举报反馈,一经查实,我们将在第一时间处理,感谢您对本站的关注!
新励学网教育平台
海量全面 · 详细解读 · 快捷可靠
累积科普文章数:18,862,126篇