Wednesday, July 9, 2008

Now *that's* debugging

Occasionally, you only fix one bug a day. But, you have a good story to tell.

Several notes:
"One of the goals of the operating system's designers is to not allow programs running in user space to ever crash the entire machine."
Yep, yep.

Any misbehaving application can turn into the equivalent of a Fork bomb, exhausting some OS resource. (Fork bombs gobble up the number of processes that are available on a machine, but a bad application can gobble up pretty much anything - CPU time, memory, overload the disk with seek requests, etc.)

The more blocks and checks they put between us and the hardware, the slower our programs are going to run.
Yes, in theory. In practice, you are not going to notice if the OS takes a couple of clock cycles to check that your application is not doing something crazy. That's kinda the point of an OS - to abstract you away from the hardware, and to make your application play well with others.

This is like complaining that the side mirrors on your car are impacting the top speed. (True, if you are trying to set a land speed record. Not true if you are commuting.)

Imagine if the Apple said to programmers: "Ok, in order to not let you dominate the hardware, we will only let you use 50% of the CPU at any one time." Now imagine you're a user, running World of Warcraft on your brand-new $4,000 ultra-lux machine, and you're only getting half the framerate you
should be, and would be under, say, Windows.
The 50% figure is a bit silly. But yes, making a 'bulletproof' OS for consumers with a lot of protections against resource exhaustion is, in my opinion, generally not worth the effort - your average user does not run into this fork bomb issue all that much, and it is generally recoverable.

Avie Tevanian had been working on Mach as a PhD student at Carnegie Mellon, and Steve Jobs recognized he was a star and hired him straight away. (Microsoft countered by hiring Avie's old advisor to work on NT, which is kind of like Microsoft hiring my mom because I'm a good programmer.)
Ad hominem, for no good reason.

Knowing it was an immutable data, the CoreData object didn't make a copy of my data, it just retained the exact same NSData object. The one that had an open memory-map of the image file!
Excuse me for smirking, but this occasional does-the-OS-have-a-pointer-to-that-bit-of-memory head scratching is something you have to do in the Win32 world as well. The horrible, much maligned Win32 world. The more things change...

16 comments:

said...

Thanks for the link. It was a good read.

Stanley said...

Soma, please read this blog post that I ran across:

http://www.andrew-turnbull.net/tech/windows95.html

and take note of the points to why this user still uses the classic Windows 95 OSR2 as his default system while developing Windows "7".

I enjoyed reading his blog post, as it has many of the common sense things a user looks to: works like a charm stablility, and does what it needs to do (and perhaps sometimes more, as in the extra features).

Looking at using Windows 95 as a common user of XP, I would see no reason for running it (its pretty erratic and unpredictable in my opinion). But, reading this blog post, I realized: all I need is for the basic features to work and be unobtrusive AND I need the extras to NOT interfer that greatly with the basics.

For example, his point on the 98 integration with IE4/IE5 is correct: it is needlessly complicated and too embedded into the operating code. And the flashy "eye candy" future Windows OSes has become completely obtrusive. Sure looks nice and all, but the extra eye candy and features associated with it (like Aero) decreases performance by A LOT. Thank god you guys still include the Windows Classic theme!! Besides that, compatibility and stability is a must in an OS, so it lessens the problems the end user runs into and increases satisfaction.

Overall, I just wish the developers would please lessen the hardware requirements in the Windows "7" project (which, I think, is the main downfall for Vista, I mean, the extra features are pretty nice to have...). Vista has now become more stable and compatible with many things, and I hope "7" carries it on. However, I wish "7" to be more efficient and speedy in running programs, and especially with the themes and stuff. I want the "eye candy" to just be there and have no noticible performance losses (come on guys, my great XP PC would run Vista horribly because of how it eats up RAM). Besides that, the basic features should and must be there, working flawlessly, and the extras integrated in such a way that it doesn't intrude on any of that basics. I hope that means Paint and Notepad may finally get some necessary upgrades, while not completely changing the look and feel of the programs. ;)

Thanks for your time, Soma. Yeah, the blogger at http://www.andrew-turnbull.net/tech/windows95.html has great points. I truly wish for project "7" to carry on these points: stability, performance, and compatibility. I wish for the developers to optimize the 7/Vista code (which, to my understanding, is built upon for 7, correct?), make it more efficient, and continue doing so even after RTM release. Features must fit together nicely, and feel natural in a program and the OS itself. That applys to the default programs an OS is shipped with AND the "look and feel". (Also, can I ask for the developers to improve upon the Windows maintenance utilities, like the defragmenter and cleaner? Nothing significant to be called a competitive monopoly, but significant enough let the end user keep his/her system running smoothly.)

Thank you very much for listening. I highly appreciate it, and I love to read your blog posts. I hope you take the http://www.andrew-turnbull.net/tech/windows95.html blog post and my points into consideration while developing 7. Once again, thank you very much :) !!

Stanley said...

Check this out also: about UI designs (especially Office Assistant, which I personally didn't hate, but others did):

http://xenon.stanford.edu/~lswartz/paperclip/

--> Pretty long article, but well thought out. I found it interesting. Maybe the design team can take a quick peek?

lx said...

@Stanley:
"Sure looks nice and all, but the extra eye candy and features associated with it (like Aero) decreases performance by A LOT."

But, they increase usability by a lot.
And since Aero renders the graphics via your (otherwise "idling" (?)) graphics processor I wonder, just exactly how much performance impact the new UI has.
Anyway: I work much faster with Vista since it's much more convenient to use than older versions of Windows...

You can't really measure an UI just in terms of "oh noes, but windows 98 renders 100ms faster!".
Imho Vistas new UI features (let aside Flip3D.. a completely unnecessary feature..) are not only just eye candy, they boost work speed and usability by a lot.
For a every day use system that's (for me) much more important.. and.. new machines are fast enough that you don't notice any slow down while working with Vista ;)

< /rant >

Mahoney said...

I agree with lx. Vista is very fast for me. With every upgrade to Windows we've had a performance cut. It has gone up almost exponentially over the years. So, of course it will be a bigger jump than 2000 to XP, or 98 to 2000, and so on. But, we must remember Moore's law. Computers today can run Vista fabulously. So, you can't shoot down an OS because your XP machine doesn't run it well, because it's just that: an XP machine.

So, I understand not upgrading an older machine. It is slow on older computers. But, that's not a reason to drop it completely.

@lx
"oh noes, but windows 98 renders 100ms faster!"

Kudos on that. :)

scsi said...

There's no need for 43423792 checks to stop misbehaving applications. There's a program used to stop CPU monopolization. It's called a scheduler.

Daniel Calark A.D said...

The low phase that has set into the IT sector is no longer news. The fall in US economy was a major blow to the IT world all over the world. In countries like India where you can find a software development company on every nook and corner are rapidly closing down because of lack of work. What is to be seen is the strategy formulated by the big fishes such as Infosys and Tata. The current situation is of uncertainty and fear as companies are sacking employees, something that was unthought of a few years back! http://www.infysolutions.com

9999 said...

情趣用品,情趣用品,情趣用品,情趣用品,情趣,情趣,情趣,情趣,按摩棒,震動按摩棒,微調按摩棒,情趣按摩棒,逼真按摩棒,G點,跳蛋,跳蛋,跳蛋,性感內衣,飛機杯,充氣娃娃,情趣娃娃,角色扮演,性感睡衣,SM,潤滑液,威而柔,香水,精油,芳香精油,自慰套,自慰,性感吊帶襪,吊帶襪,情趣用品加盟AIO交友愛情館,情人歡愉用品,美女視訊,情色交友,視訊交友,辣妹視訊,美女交友,嘟嘟成人網,成人網站,A片,A片下載,免費A片,免費A片下載愛情公寓,情色,舊情人,情色貼圖,情色文學,情色交友,色情聊天室,色情小說,一葉情貼圖片區,情色小說,色情,色情遊戲,情色視訊,情色電影,aio交友愛情館,色情a片,一夜情,辣妹視訊,視訊聊天室,免費視訊聊天,免費視訊,視訊,視訊美女,美女視訊,視訊交友,視訊聊天,免費視訊聊天室,情人視訊網,影音視訊聊天室,視訊交友90739,成人影片,成人交友,美女交友,微風成人,嘟嘟成人網,成人貼圖,成人電影,A片,豆豆聊天室,聊天室,UT聊天室,尋夢園聊天室,男同志聊天室,UT男同志聊天室,聊天室尋夢園,080聊天室,080苗栗人聊天室,6K聊天室,女同志聊天室,小高聊天室,上班族聊天室,080中部人聊天室,同志聊天室,聊天室交友,中部人聊天室,成人聊天室,一夜情聊天室,情色聊天室,寄情築園小遊戲情境坊歡愉用品,情趣用品,成人網站,情人節禮物,情人節,AIO交友愛情館,情色,情色貼圖,情色文學,情色交友,色情聊天室,色情小說,七夕情人節,色情,情色電影,色情網站,辣妹視訊,視訊聊天室,情色視訊,免費視訊聊天,美女視訊,視訊美女,美女交友,美女,情色交友,成人交友,自拍,本土自拍,情人視訊網,視訊交友90739,生日禮物,情色論壇,正妹牆,免費A片下載,AV女優,成人影片,色情A片,成人論壇,情趣,免費成人影片,成人電影,成人影城,愛情公寓,成人影片,保險套,舊情人,微風成人,成人,成人遊戲,成人光碟,色情遊戲,跳蛋,按摩棒,一夜情,男同志聊天室,肛交,口交,性交,援交,免費視訊交友,視訊交友,一葉情貼圖片區,性愛,視訊,視訊聊天,A片,A片下載,免費A片,嘟嘟成人網,寄情築園小遊戲,女同志聊天室,免費視訊聊天室,一夜情聊天室,聊天室

Ashok yadav said...

MAG Studios is a leading software development & web development company offering ecommerce web site development, search
engine friendly web development, customized software development services india delhi.
Software Development | SEO Services India | Website Design India |
Content Management System (cms) | Customer Relationship Management (CRM) | BPO India
Intranet Portal

明男 said...

情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣用品,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,情趣,美國aneros,rudeboy,英國rudeboy,英國Rocksoff,德國Fun Factory,Fun Factory,英國甜筒造型按摩座,甜筒造型按摩座,英國Rock Chic ,瑞典 Lelo ,英國Emotional Bliss,英國 E.B,荷蘭 Natural Contours,荷蘭 N C,美國 OhMiBod,美國 OMB,Naughti Nano ,音樂按摩棒,ipod按摩棒,美國 The Screaming O,美國TSO,美國TOPCO,美國Doc Johnson,美國CA Exotic,美國CEN,美國Nasstoy,美國Tonguejoy,英國Je Joue,美國Pipe Dream,美國California Exotic,美國NassToys,美國Vibropod,美國Penthouse,仿真按摩棒,矽膠按摩棒,猛男倒模,真人倒模,仿真倒模,PJUR,Zestra,適趣液,穿戴套具,日本NPG,雙頭龍,FANCARNAL,日本NIPPORI,日本GEL,日本Aqua Style,美國WET,費洛蒙,費洛蒙香水,仿真名器,av女優,打炮,做愛,性愛,口交,吹喇叭,肛交,魔女訓練大師,無線跳蛋,有線跳蛋,震動棒,震動保險套,震動套,TOY-情趣用品,情趣用品網,情趣購物網,成人用品網,情趣用品討論,成人購物網,鎖精套,鎖精環,持久環,持久套,拉珠,逼真按摩棒,名器,超名器,逼真老二,電動自慰,自慰,打手槍,仿真女郎,SM道具,SM,性感內褲,仿真按摩棒,pornograph,hunter系列,h動畫,成人動畫,成人卡通,情色動畫,情色卡通,色情動畫,色情卡通,無修正,禁斷,人妻,極悪調教,姦淫,近親相姦,顏射,盜攝,偷拍,本土自拍,素人自拍,公園露出,街道露出,野外露出,誘姦,迷姦,輪姦,凌辱,痴漢,痴女,素人娘,中出,巨乳,調教,潮吹,av,a片,成人影片,成人影音,線上影片,成人光碟,成人無碼,成人dvd,情色影音,情色影片,情色dvd,情色光碟,航空版,薄碼,色情dvd,色情影音,色情光碟,線上A片,免費A片,A片下載,成人電影,色情電影,TOKYO HOT,SKY ANGEL,一本道,SOD,S1,ALICE JAPAN,皇冠系列,老虎系列,東京熱,亞熱,武士系列,新潮館,情趣用品,情趣,情趣商品,情趣網站,跳蛋,按摩棒,充氣娃娃,自慰套,G點,性感內衣,情趣內衣,角色扮演,生日禮物,生日精品,自慰,打手槍,潮吹,高潮,後庭,情色論譠,影片下載,遊戲下載,手機鈴聲,音樂下載,開獎號碼,統一發票號碼,夜市,統一發票對獎,保險套,做愛,減肥,美容,瘦身,當舖,軟體下載,汽車,機車,手機,來電答鈴,週年慶,美食,徵信社,網頁設計,網站設計,室內設計,靈異照片,同志,聊天室,運動彩券,大樂透,威力彩,搬家公司,除蟲,偷拍,自拍,無名破解,av女優,小說,民宿,大樂透開獎號碼,大樂透中獎號碼,威力彩開獎號碼,討論區,痴漢,懷孕,美女交友,交友,日本av,日本,機票,香水,股市,股市行情, 股市分析,租房子,成人影片,免費影片,醫學美容,免費算命,算命,姓名配對,姓名學,姓名學免費,遊戲,好玩遊戲,好玩遊戲區,線上遊戲,新遊戲,漫畫,線上漫畫,動畫,成人圖片,桌布,桌布下載,電視節目表,線上電視,線上a片,線上掃毒,線上翻譯,購物車,身分證製造機,身分證產生器,手機,二手車,中古車,法拍屋,歌詞,音樂,音樂網,火車,房屋,情趣用品,情趣,情趣商品,情趣網站,跳蛋,按摩棒,充氣娃娃,自慰套, G點,性感內衣,情趣內衣,角色扮演,生日禮物,精品,禮品,自慰,打手槍,潮吹,高潮,後庭,情色論譠,影片下載,遊戲下載,手機鈴聲,音樂下載,開獎號碼,統一發票,夜市,保險套,做愛,減肥,美容,瘦身,當舖,軟體下載,汽車,機車,手機,來電答鈴,週年慶,美食,徵信社,網頁設計,網站設計,室內設計,靈異照片,同志,聊天室,運動彩券,,大樂透,威力彩,搬家公司,除蟲,偷拍,自拍,無名破解, av女優,小說,民宿,大樂透開獎號碼,大樂透中獎號碼,威力彩開獎號碼,討論區,痴漢,懷孕,美女交友,交友,日本av ,日本,機票,香水,股市,股市行情,股市分析,租房子,成人影片,免費影片,醫學美容,免費算命,算命,姓名配對,姓名學,姓名學免費,遊戲,好玩遊戲,好玩遊戲區,線上遊戲,新遊戲,漫畫,線上漫畫,動畫,成人圖片,桌布,桌布下載,電視節目表,線上電視,線上a片,線上a片,線上翻譯,購物車,身分證製造機,身分證產生器,手機,二手車,中古車,法拍屋,歌詞,音樂,音樂網,借錢,房屋,街頭籃球,找工作,旅行社,六合彩,整型,水噹噹,貸款,貸款,信用貸款,宜蘭民宿,花蓮民宿,未婚聯誼,網路購物,珠海,下川島,常平,珠海,澳門機票,香港機票,婚友,婚友社,未婚聯誼,交友,婚友,婚友社,單身聯誼,未婚聯誼,未婚聯誼,婚友社,婚友,婚友社,單身聯誼,婚友,未婚聯誼,婚友社,未婚聯誼,單身聯誼,單身聯誼,婚友,單身聯誼,未婚聯誼,婚友,交友,交友,婚友社,婚友社,婚友社,大陸新娘,大陸新娘,大陸新娘,越南新娘,越南新娘,外籍新娘,外籍新娘,台中坐月子中心,搬家公司,搬家,搬家,搬家公司,線上客服,網頁設計,線上客服,網頁設計,網頁設計,土地貸款,免費資源,電腦教學,wordpress,人工植牙,關鍵字,關鍵字,seo,seo,網路排名,自然排序,網路排名軟體,

xiaonan said...

testbegin We always convince ourselves that life will be better after we get married, have a baby, than another. Then we are frustrated that the kids aren't old enough and we'll be more contet when they are. After that we're frustrated that we have teenagers to deal with. we will certainly be happy when they are out of that stage.

We always tell ourselves that our life will be complete when our spouse gets his or her act together. when we get a nice car, and are able to go on a nice vocation when we retire. The truth is, there's no better time than right now. If not now, when? our life will always be filled with challenges. It's best to admit this to ourselves and decide to be happy anyway.

One of my favorite quotes comes from Alfred Souza. He said."for a long time it had seemed to me that life was about to begin-real life. But there was always some obstacle in the way, someting to be gotten through firest, some unfinished business, time still to be served, a debt to be paid.

Then life would begin. At last it dawned on me that these obstacles were my life." This perspective has helped me to see that there is no way to happiness. Happiness is the way. So treasure every moment that you have.

And remember that time waits for no one. So stop waiting until you finish school, until you go back to school; until you get married, until you get divorced; until you have kids; until you retire; until you get a new car or home; until spring; until you are born again to decide that there is no better time than right now to be happy….

Happiness is a journey, not a destination.So, work like you don't need money, love like you've never been hurt, And dance like no one's watching. testend

xiaonan said...

testbegin We always convince ourselves that life will be better after we get married, have a baby, than another. Then we are frustrated that the kids aren't old enough and we'll be more contet when they are. After that we're frustrated that we have teenagers to deal with. we will certainly be happy when they are out of that stage.

We always tell ourselves that our life will be complete when our spouse gets his or her act together. when we get a nice car, and are able to go on a nice vocation when we retire. The truth is, there's no better time than right now. If not now, when? our life will always be filled with challenges. It's best to admit this to ourselves and decide to be happy anyway.

One of my favorite quotes comes from Alfred Souza. He said."for a long time it had seemed to me that life was about to begin-real life. But there was always some obstacle in the way, someting to be gotten through firest, some unfinished business, time still to be served, a debt to be paid.

Then life would begin. At last it dawned on me that these obstacles were my life." This perspective has helped me to see that there is no way to happiness. Happiness is the way. So treasure every moment that you have.

And remember that time waits for no one. So stop waiting until you finish school, until you go back to school; until you get married, until you get divorced; until you have kids; until you retire; until you get a new car or home; until spring; until you are born again to decide that there is no better time than right now to be happy….

Happiness is a journey, not a destination.So, work like you don't need money, love like you've never been hurt, And dance like no one's watching. testend

xiaonan said...

testbegin We always convince ourselves that life will be better after we get married, have a baby, than another. Then we are frustrated that the kids aren't old enough and we'll be more contet when they are. After that we're frustrated that we have teenagers to deal with. we will certainly be happy when they are out of that stage.

We always tell ourselves that our life will be complete when our spouse gets his or her act together. when we get a nice car, and are able to go on a nice vocation when we retire. The truth is, there's no better time than right now. If not now, when? our life will always be filled with challenges. It's best to admit this to ourselves and decide to be happy anyway.

One of my favorite quotes comes from Alfred Souza. He said."for a long time it had seemed to me that life was about to begin-real life. But there was always some obstacle in the way, someting to be gotten through firest, some unfinished business, time still to be served, a debt to be paid.

Then life would begin. At last it dawned on me that these obstacles were my life." This perspective has helped me to see that there is no way to happiness. Happiness is the way. So treasure every moment that you have.

And remember that time waits for no one. So stop waiting until you finish school, until you go back to school; until you get married, until you get divorced; until you have kids; until you retire; until you get a new car or home; until spring; until you are born again to decide that there is no better time than right now to be happy….

Happiness is a journey, not a destination.So, work like you don't need money, love like you've never been hurt, And dance like no one's watching. testend

xiaonan said...

testbegin We always convince ourselves that life will be better after we get married, have a baby, than another. Then we are frustrated that the kids aren't old enough and we'll be more contet when they are. After that we're frustrated that we have teenagers to deal with. we will certainly be happy when they are out of that stage.

We always tell ourselves that our life will be complete when our spouse gets his or her act together. when we get a nice car, and are able to go on a nice vocation when we retire. The truth is, there's no better time than right now. If not now, when? our life will always be filled with challenges. It's best to admit this to ourselves and decide to be happy anyway.

One of my favorite quotes comes from Alfred Souza. He said."for a long time it had seemed to me that life was about to begin-real life. But there was always some obstacle in the way, someting to be gotten through firest, some unfinished business, time still to be served, a debt to be paid.

Then life would begin. At last it dawned on me that these obstacles were my life." This perspective has helped me to see that there is no way to happiness. Happiness is the way. So treasure every moment that you have.

And remember that time waits for no one. So stop waiting until you finish school, until you go back to school; until you get married, until you get divorced; until you have kids; until you retire; until you get a new car or home; until spring; until you are born again to decide that there is no better time than right now to be happy….

Happiness is a journey, not a destination.So, work like you don't need money, love like you've never been hurt, And dance like no one's watching. testend

xiaonan said...

testbegin We always convince ourselves that life will be better after we get married, have a baby, than another. Then we are frustrated that the kids aren't old enough and we'll be more contet when they are. After that we're frustrated that we have teenagers to deal with. we will certainly be happy when they are out of that stage.

We always tell ourselves that our life will be complete when our spouse gets his or her act together. when we get a nice car, and are able to go on a nice vocation when we retire. The truth is, there's no better time than right now. If not now, when? our life will always be filled with challenges. It's best to admit this to ourselves and decide to be happy anyway.

One of my favorite quotes comes from Alfred Souza. He said."for a long time it had seemed to me that life was about to begin-real life. But there was always some obstacle in the way, someting to be gotten through firest, some unfinished business, time still to be served, a debt to be paid.

Then life would begin. At last it dawned on me that these obstacles were my life." This perspective has helped me to see that there is no way to happiness. Happiness is the way. So treasure every moment that you have.

And remember that time waits for no one. So stop waiting until you finish school, until you go back to school; until you get married, until you get divorced; until you have kids; until you retire; until you get a new car or home; until spring; until you are born again to decide that there is no better time than right now to be happy….

Happiness is a journey, not a destination.So, work like you don't need money, love like you've never been hurt, And dance like no one's watching. testend

cenghan said...

film izle

film izle

film izle

çizgi film izle

anime izle

erotik film izle