`
leeseon
  • 浏览: 103722 次
  • 性别: Icon_minigender_1
社区版块
存档分类
最新评论

"Why Would You Want to Do That?"

阅读更多

Introduction: "Why Would You Want to Do That?"
It was 1985, and I was in a chartered bus in New York City, heading for a press reception with a bunch
of other restless media egomaniacs. I was only beginning my media career (as technical editor for PC
Tech Journal) and my first book was still months in the future. I happened to be sitting next to an
established programming writer/guru, with whom I was impressed and to whom I was babbling about
one thing or another. I won't name him, as he's done a lot for the field, and will do a lot more before
he's through if he doesn't kill himself smoking first.
But I happened to let slip that I was a Turbo Pascal fanatic, and what I really wanted to do was learn
how to write Turbo Pascal programs that made use of the brand new Microsoft Windows user interface.
He wrinkled his nose and grimaced wryly, before speaking the Infamous Question:
"Why would you want to do that?"
I had never heard the question before (though I would hear it many times thereafter), and it took me
aback. Why? Because, well, because…I wanted to know how it worked.
"Heh. That's what C's for."
Further discussion got me nowhere in a Pascal direction. But some probing led me to understand that
you couldn't write Windows apps in Turbo Pascal. It was impossible. Or...the programming writer/guru
didn't know how. Maybe both. I never learned the truth. But I did learn the meaning of the Infamous
Question.
Note well: When somebody asks you, "Why would you want to do that?" what it really means is this:
"You've asked me how to do something that is either impossible using tools that I favor or completely
outside my experience, but I don't want to lose face by admitting it. So,...how 'bout those Blackhawks?"
I heard it again and again over the years:
Q: How can I set up a C string so that I can read its length without scanning it?
A: Why would you want to do that?
Q: How can I write an assembly language subroutine callable from Turbo Pascal?
A: Why would you want to do that?
Q: How can I write Windows apps in assembly language?
A: Why would you want to do that?
You get the idea. The answer to the Infamous Question is always the same, and if the weasels ever
ask it of you, snap back as quickly as possible: Because I want to know how it works.
That is a completely sufficient answer. It's the answer I've used every single time, except for one
occasion a considerable number of years ago, when I put forth that I wanted to write a book that taught
people how to program in assembly language as their first experience in programming.
Q: Good grief, why would you want to do that?
A: Because it's the best way there is to build the skills required to understand how all the rest of the
programming universe works.
Being a programmer is one thing above all else: It is understanding how things work. Learning to be a
programmer, furthermore, is almost entirely a process of learning how things work. This can be done at
various levels, depending on the tools you're working with. If you're programming in Visual Basic, you
have to understand how certain things work, but those things are by and large confined to Visual Basic
itself. A great deal of machinery is hidden by the layer that Visual Basic places between the
programmer and the computer. (The same is true of Delphi, Java, Perl, and many other very high-level
programming environments.) If you're using a C compiler, you're a lot closer to the machine, and you
see a lot more of that machinery-and must, therefore, understand how it works to be able to use it.
However, quite a bit remains hidden, even from the hardened C programmer. (Many C programmers
fool themselves into thinking they know way more than they actually do-and have the bad karma to be
pretty damned arrogant about it.)
If, on the other hand, you're working in assembly language, you're as close to the machine as you can
get. Assembly language hides nothing, and withholds no power. The flip side, of course, is that no
magical layer between you and the machine will absolve any ignorance and take care of things for you.
If you don't understand how something works, you're dead in the water-unless you know enough to be
able to figure it out on your own.
That's a key point: My goal in creating this book is not entirely to teach you assembly language per se.
If this book has a prime directive at all, it is to impart a certain disciplined curiosity about the machine,
along with some basic context from which you can begin to explore the machine at its lowest levels.
That, and the confidence to give it your best shot. This is difficult stuff, but it's nothing you can't master
given some concentration, patience, and the time it requires-which, I caution, may be considerable.
In truth, what I'm really teaching you is how to learn.

这是Jeff Duntemannd 在《Assembly Language Step-by-Step: Programming with DOS and Linux, Second Edition》中的一章的内容。

呵呵,我好象也常常问这样的问题,看来我也是真的不好意思承认自己的无知、、、

只有几次例外,如一个同事用了多个消息循环,另一个却喜欢在程序中create table与drop table、、、呵呵

分享到:
评论

相关推荐

    Assembly.Language.Step-by-Step.Programming.with.DOS.and.Linux.Second.Edition.Part1

    Introduction - "Why Would You Want to Do That?" Chapter 1 - Another Pleasant Valley Saturday Understanding What Computers Really Do Chapter 2 - Alien Bases Getting Your Arms around Binary and ...

    Assembly.Language.Step-by-Step.Programming.with.DOS.and.Linux.Second.Edition.part3

    Assembly Language Step-by-Step—Programming with DOS and Linux, Second Edition Foreword Introduction - "Why Would You Want to Do That?" Chapter 1 - Another Pleasant Valley Saturday ...

    Assembly.Language.Step-by-Step.Programming.with.DOS.and.Linux.Second.Edition.part2

    Assembly Language Step-by-Step—Programming with DOS and Linux, Second Edition Foreword Introduction - "Why Would You Want to Do That?" Chapter 1 - Another Pleasant Valley Saturday ...

    Android代码-RxAppFocus

    Why would you want to do that? Maybe you want to trigger a sync with a cloud service when your app is resumed. Maybe you want to stop receiving location updates when your app goes into the background....

    五年级Unit 5 Would you like to go with us知识点及练习题精选.doc

    较为随便,如:Do you want to swim with me? - 接受邀请:Yes, I’d love/like to. 或者 Yes, of course. - 拒绝邀请:I’d like to, but… 或者 Sorry, I can’t. I… 2. 建议句型:Shall we…? 如:Shall we ...

    Module 2 Unit 4 What would you like to be测试题2.doc

    这篇测试题主要涵盖了小学六年级Module 2 Unit 4 "What would you like to be" 的核心内容,涉及了与职业相关的词汇、短语翻译以及选择题,旨在帮助学生理解和掌握与未来职业愿望和不同职业特点相关的基本英语知识。...

    新加坡面试常见问题

    And why do you want to work here?"考察你对新加坡的经济、文化、工作环境的了解,以及你的职业规划和动机。 3. **自我介绍**:"Would you please introduce yourself?"是面试的常规问题,你需要简洁明了地介绍...

    初中英语最重要的100个基础句型含例句.docx

    `: 询问行为的含义,"What do you mean by doing that?"问对方做那件事的意图。 15. `like doing sth`: 表示习惯性的爱好,"Jim likes swimming"表明吉姆喜欢游泳。 16. `like to do sth`: 表示特定时刻的喜好,...

    外资企业面试HR提问大全.doc

    12. **离职原因**(如"Why do you want to leave your current position?"):判断他们是否因为不可控因素或个人发展需要而离职。 13. **其他工作机会**(如"Have you received any offers so far?"):评估应聘者...

    英文版程序员面试情景对话.pdf,这是一份不错的文件

    3. Why do you want to work for us?(为什么选择这家公司) 4. What would you do for us? What can you do for us that someone else can't?(有什么独特的贡献) 5. What do you look for in a job?(职业目标) ...

    中国石油大学(北京)英语(四)在线作业第二次.pdf

    第 5 题 – What kind of account do you want to open? 知识点:银行开户英语表达 在英语中,当被问及想要开设什么类型的银行账户时,我们可以回答“I want to open a savings account”或“I want to open a ...

    人力资源部招聘面试百宝箱87.doc

    - “Why do you want to leave your current position?”:理解应聘者的离职动机,避免招聘短期工作者。 - “Would your supervisor be surprised to learn that you are seeking new employment?”:评估其在当前...

    Expert Oracle Database Architecture 9i and 10g programming Techniques and Solutions

    different ways would you like to do that in Oracle?” I hope that this book will help you make the correct choice. This book is aimed at those people who appreciate the choice but would also like some...

    九年级英语全册Unit1Howcanwebecomegoodlearners知识点归纳及习题新版人教新目标版

    - "Would you like to do sth?"询问对方是否愿意做某事。 - "Would you mind (doing) sth?"询问对方是否介意做某事。 4. **回答建议或请求的表达** - 对于同意的建议,可以用"Good idea.", "That’s a good idea...

    英语-外企面试大全(1).doc

    **(Why do you want to leave your current position?) - 保持正面回答,强调寻求新机会、成长或与个人目标更匹配的职位。 13. **你收到过其他工作邀请吗?**(Have you received any offers so far?) - 如实...

    初中英语最常用100句型.doc

    `: 用于询问对方做某事的意图,如"What do you mean by doing that?"(你做那件事情是什么意思?)。 13. `like doing sth`: 描述一贯的喜好,如"Jim likes swimming"(吉姆喜欢游泳)。 14. `like to do sth`: ...

    护士英文.doc

    2. **Why do you want to work for us?** 求职者应研究招聘单位,了解其价值观、工作环境和声誉,然后解释为什么你认为自己与该机构匹配,以及你希望在那里工作的具体原因。 3. **What courses did you like best/...

    英语核心句型例实例读熟PPT课件.pptx

    **:询问某行为或言语的含义,"What do you mean by doing that?"(你那样做是什么意思?)。 11. **like doing sth.**:表示习惯性的爱好,"Jim likes swimming"(吉姆喜欢游泳)。 12. **like to do sth.**:...

    22级英语口试3一复习版.docx

    I do want to wish you all the best in your new career.** - **知识点**: 给予祝福和支持。 - **扩展**: 可以分享对对方未来的期望、鼓励的话语等(What do you think will be challenging in your new role? ...

    外企面试求职大全(详细)

    Why do you want to leave your current position?** - **考察点**:考察离职的真实原因。 - **应对策略**:客观描述,可以是寻求更好的发展机会、职业转型等。 **13. Have you received any offers so far?** - *...

Global site tag (gtag.js) - Google Analytics