??xml version="1.0" encoding="utf-8" standalone="yes"?>久久久久亚洲av毛片大,香蕉久久夜色精品国产2020,亚洲国产小视频精品久久久三级 http://www.shnenglu.com/ztwaker/category/7256.html<font color=#FF0000>/* 掌握未来最大的势Q信息化、自动化、一体化、h性化 */ </font><font color=#00FF00>[l需有日龙穿?唔日日裤穿H]</font>zh-cnThu, 14 Aug 2008 15:11:40 GMTThu, 14 Aug 2008 15:11:40 GMT60The Usability of Open Source Software (ZT)http://www.shnenglu.com/ztwaker/archive/2008/08/14/58838.html子弹子弹Thu, 14 Aug 2008 05:50:00 GMThttp://www.shnenglu.com/ztwaker/archive/2008/08/14/58838.htmlhttp://www.shnenglu.com/ztwaker/comments/58838.htmlhttp://www.shnenglu.com/ztwaker/archive/2008/08/14/58838.html#Feedback0http://www.shnenglu.com/ztwaker/comments/commentRss/58838.htmlhttp://www.shnenglu.com/ztwaker/services/trackbacks/58838.html阅读全文

子弹 2008-08-14 13:50 发表评论
]]>
Usability 101: Introduction to Usability(ZT)http://www.shnenglu.com/ztwaker/archive/2008/08/14/58837.html子弹子弹Thu, 14 Aug 2008 05:44:00 GMThttp://www.shnenglu.com/ztwaker/archive/2008/08/14/58837.htmlhttp://www.shnenglu.com/ztwaker/comments/58837.htmlhttp://www.shnenglu.com/ztwaker/archive/2008/08/14/58837.html#Feedback0http://www.shnenglu.com/ztwaker/comments/commentRss/58837.htmlhttp://www.shnenglu.com/ztwaker/services/trackbacks/58837.html

Jakob Nielsen's Alertbox, August 25, 2003:

Usability 101: Introduction to Usability

Summary:
How to define usability? How, when, and where can you improve it? Why should you care? This overview answers these basic questions.

This is the article to give to your boss or anyone else who doesn't have much time, but needs to know the basic usability facts.

What (Definition of Usability)

Usability is a quality attribute that assesses how easy user interfaces are to use. The word "usability" also refers to methods for improving ease-of-use during the design process.

Usability is defined by five quality components:

  • Learnability: How easy is it for users to accomplish basic tasks the first time they encounter the design?
  • Efficiency: Once users have learned the design, how quickly can they perform tasks?
  • Memorability: When users return to the design after a period of not using it, how easily can they reestablish proficiency?
  • Errors: How many errors do users make, how severe are these errors, and how easily can they recover from the errors?
  • Satisfaction: How pleasant is it to use the design?
There are many other important quality attributes. A key one is utility, which refers to the design's functionality: Does it do what users need? Usability and utility are equally important: It matters little that something is easy if it's not what you want. It's also no good if the system can hypothetically do what you want, but you can't make it happen because the user interface is too difficult. To study a design's utility, you can use the same user research methods that improve usability.

Why Usability is Important

On the Web, usability is a necessary condition for survival. If a website is difficult to use, people leave. If the homepage fails to clearly state what a company offers and what users can do on the site, people leave. If users get lost on a website, they leave. If a website's information is hard to read or doesn't answer users' key questions, they leave. Note a pattern here? There's no such thing as a user reading a website manual or otherwise spending much time trying to figure out an interface. There are plenty of other websites available; leaving is the first line of defense when users encounter a difficulty.

The first law of e-commerce is that if users cannot find the product, they cannot buy it either.

For intranets, usability is a matter of employee productivity. Time users waste being lost on your intranet or pondering difficult instructions is money you waste by paying them to be at work without getting work done.

Current best practices call for spending about 10% of a design project's budget on usability. On average, this will more than double a website's desired quality metrics and slightly less than double an intranet's quality metrics. For software and physical products, the improvements are typically smaller ?but still substantial ?when you emphasize usability in the design process.

For internal design projects, think of doubling usability as cutting training budgets in half and doubling the number of transactions employees perform per hour. For external designs, think of doubling sales, doubling the number of registered users or customer leads, or doubling whatever other desired goal motivated your design project.

How to Improve Usability

There are many methods for studying usability, but the most basic and useful is user testing, which has three components:
  • Get hold of some representative users, such as customers for an e-commerce site or employees for an intranet (in the latter case, they should work outside your department).
  • Ask the users to perform representative tasks with the design.
  • Observe what the users do, where they succeed, and where they have difficulties with the user interface. Shut up and let the users do the talking.
It's important to test users individually and let them solve any problems on their own. If you help them or direct their attention to any particular part of the screen, you have contaminated the test results.

To identify a design's most important usability problems, testing five users is typically enough. Rather than run a big, expensive study, it's a better use of resources to run many small tests and revise the design between each one so you can fix the usability flaws as you identify them. Iterative design is the best way to increase the quality of user experience. The more versions and interface ideas you test with users, the better.

User testing is different from focus groups, which are a poor way of evaluating design usability. Focus groups have a place in market research, but to evaluate interaction designs you must closely observe individual users as they perform tasks with the user interface. Listening to what people say is misleading: you have to watch what they actually do.

When to Work on Usability

Usability plays a role in each stage of the design process. The resulting need for multiple studies is one reason I recommend making individual studies fast and cheap. Here are the main steps:
  1. Before starting the new design, test the old design to identify the good parts that you should keep or emphasize, and the bad parts that give users trouble.
  2. Unless you're working on an intranet, test your competitors' designs to get cheap data on a range of alternative interfaces that have similar features to your own. (If you work on an intranet, read the intranet design annuals to learn from other designs.)
  3. Conduct a field study to see how users behave in their natural habitat.
  4. Make paper prototypes of one or more new design ideas and test them. The less time you invest in these design ideas the better, because you'll need to change them all based on the test results.
  5. Refine the design ideas that test best through multiple iterations, gradually moving from low-fidelity prototyping to high-fidelity representations that run on the computer. Test each iteration.
  6. Inspect the design relative to established usability guidelines, whether from your own earlier studies or published research.
  7. Once you decide on and implement the final design, test it again. Subtle usability problems always creep in during implementation.
Don't defer user testing until you have a fully implemented design. If you do, it will be impossible to fix the vast majority of the critical usability problems that the test uncovers. Many of these problems are likely to be structural, and fixing them would require major rearchitecting.

The only way to a high-quality user experience is to start user testing early in the design process and to keep testing every step of the way.

Where to Test

If you run at least one user study per week, it's worth building a dedicated usability laboratory. For most companies, however, it's fine to conduct tests in a conference room or an office ?as long as you can close the door to keep out distractions. What matters is that you get hold of real users and sit with them while they use the design. A notepad is the only equipment you need.

Learn More

My next column will address the main usability misconceptions.

Three-day camp teaching Usability in Practice at the Usability Week 2008 conference in San Francisco (June) and Melbourne (July).



子弹 2008-08-14 13:44 发表评论
]]>
Why Free Software has poor usability, and how to improve it(ZT)http://www.shnenglu.com/ztwaker/archive/2008/08/14/58836.html子弹子弹Thu, 14 Aug 2008 05:40:00 GMThttp://www.shnenglu.com/ztwaker/archive/2008/08/14/58836.htmlhttp://www.shnenglu.com/ztwaker/comments/58836.htmlhttp://www.shnenglu.com/ztwaker/archive/2008/08/14/58836.html#Feedback0http://www.shnenglu.com/ztwaker/comments/commentRss/58836.htmlhttp://www.shnenglu.com/ztwaker/services/trackbacks/58836.html

Why Free Software has poor usability, and how to improve it

When I wrote the first version of this article six years ago, I called it “Why Free Software usability tends to suck”. The best open source applications and operating systems are more usable now than they were then. But this is largely from slow incremental improvements, and low-level competition between projects and distributors. Major problems with the design process itself remain largely unfixed.

Many of these problems are with volunteer software in general, not Free Software in particular. Hobbyist proprietary programs are often hard to use for many of the same reasons. But the easiest way of getting volunteers to contribute to a program is to make it open source. And while thousands of people are now employed in developing Free Software, most of its developers are volunteers. So it’s in Free Software that we see volunteer software’s usability problems most often.

That gives us a clue to our first two problems.

  1. Weak incentives for usability. Proprietary software vendors typically make money by producing software that people want to use. This is a strong incentive to make it more usable. (It doesn’t always work: for example, Microsoft, Apple, and Adobe software sometimes becomes worse but remains dominant through network effects. But it works most of the time.)

    With volunteer projects, though, any incentive is much weaker. The number of users rarely makes any financial difference to developers, and with freely redistributable software, it’s near-impossible to count users anyway. There are other incentives ?impressing future employers, or getting your software included in a popular OS ?but they’re rather oblique.

    Solutions: Establish more and stronger incentives. For example, annual Free Software design awards could publicize and reward developers for good design. Software distributors could publish statistics on how many of their users use which programs, and how that number is changing over time. A bounty system could let people pay money in escrow for whoever implements a particular usability improvement. And distributed version control could foster quicker competition: distributors could choose not just which application to ship, but also which variant branch of an application, with usability as a factor in their choice.

  2. Few good designers. Some musicians are also great composers, but most aren’t. Some programmers are also great designers, but most aren’t. Programming and human interface design are separate skills, and people good at both are rare. So it’s important for software to have dedicated designers, but few Free Software projects do. Some usability specialists are employed by Free Software vendors such as Mozilla, Sun, Red Hat, and Canonical. But there aren’t many, and skilled volunteer designers are even harder to find.

    Solutions: Provide highly accessible training materials for programmers, and volunteer designers, to improve the overall level of design competence. Foster communities that let programmers collaborate with usability specialists. And encourage Free Software projects to have a lead programmer, a lead human interface designer, a help editor, and a QA engineer, these being separate people.

But why is there a shortage of volunteer designers in the first place? That brings us to the third problem.

  1. Design suggestions often aren’t invited or welcomed. Free Software has a long and healthy tradition of “show me the code”. But when someone points out a usability issue, this tradition turns into “patches welcome”, which is unhelpful since most designers aren’t programmers. And it’s not obvious how else usability specialists should help out.

    Solution: Establish a process for usability specialists to contribute to a project. For example, the lead designer could publish design specifications on the project’s Web site, and invite feedback on a Weblog, wiki, or mailing list. The designer could respond courteously to design suggestions (even the misguided ones). And the project maintainer could set up an editable issue tracker, instead of an append-only bug tracker ?making it easy to refine, approve or decline, and prioritize implementation of design suggestions in the same way as bug reports.

So why do programmers respond differently to usability suggestions than to more technical bug reports?

  1. Usability is hard to measure. Some qualities of software are easily and precisely measured: whether it runs at all, how fast it starts, how fast it runs, and whether it is technically correct.

    But these are only partial substitutes for more important qualities that are harder to measure: whether the software is useful, how responsive it feels, whether it behaves as people expect, what proportion of people succeed in using it, how quickly they can use it, and how satisfied they are when they’re finished.

    These human-related qualities can often be measured in user tests. But doing that takes hours or days that volunteers are unwilling to spend. User tests are usually low-resolution, picking up the big problems, but leaving designers without hard evidence to persuade programmers of the small problems. And even once a problem is identified, a solution needs to be designed, and that may need testing too.

    Without frequent user testing, volunteer projects rely on subjective feedback from the sort of people devoted enough to be subscribed to a project mailing list. But what these people say may not be representative of even their own actual behavior, let alone the behavior of users in general.

    Solutions: Promote small-scale user testing techniques that are practical for volunteers. Develop and promote screen capture, video recording, and other software that makes tests easier to run. Encourage developers to trust user test results more than user opinions. And write design guidelines that give advice on the common small problems that user tests won’t catch.

The lack of dedicated designers, in turn, contributes to three cultural problems in Free Software projects.

  1. Coding before design. Software tends to be much more usable if it is, at least roughly, designed before the code is written. The desired human interface for a program or feature may affect the data model, the choice of algorithms, the order in which operations are performed, the need for threading, the format for storing data on disk, and even the feature set of the program as a whole. But doing all that wireframing and prototyping seems boring, so a programmer often just starts coding ?they’ll worry about the interface later.

    But the more code has been written, the harder it is to fix a design problem ?so programmers are more likely not to bother, or to convince themselves it isn’t really a problem. And if they finally fix the interface after version 1.0, existing users will have to relearn it, frustrating them and encouraging them to consider competing programs.

    Solution: Pair up designers with those programmers wanting to develop a new project or a new feature. Establish a culture in Free Software of design first, code second.

  2. Too many cooks. In the absence of dedicated designers, many contributors to a project try to contribute to human interface design, regardless of how much they know about the subject. And multiple designers leads to inconsistency, both in vision and in detail. The quality of an interface design is inversely proportional to the number of designers.

    Solution: Projects could have a lead human interface designer, who fields everyone else’s suggestions, and works with the programmers in deciding what is implementable. And more detailed design specifications and guidelines could help prevent programmer-specific foibles.

  3. Chasing tail-lights. In the absence of a definite design of their own, many developers assume that whatever Microsoft or Apple have done is good design. Sometimes it is, but sometimes it isn’t. In imitating their designs, Free Software developers repeat their mistakes, and ensure that they can never have a better design than the proprietary alternatives.

    Solution: Encourage innovative design through awards and other publicity. Update design guidelines, where appropriate, to reflect the results of successful design experiments.

Other reasons for poor usability exist regardless of the presence of dedicated designers. These problems are more difficult to solve.

  1. Scratching their own itch. Volunteer developers work on projects and features they are interested in, which usually means software that they are going to use themselves. Being software developers, they’re also power users. So software that’s supposed to be for general use ends up overly geeky and complicated. And features needed more by new or non-technical users ?such as parental controls, a setup assistant, or the ability to import settings from competing software ?may be neglected or not implemented at all.

    Solutions: Establish a culture of simplicity, by praising restrained design and ridiculing complex design. And encourage volunteer programmers to watch their friends and families using the software, inspiring them to fix problems that other people have.

  2. Leaving little things broken. Many of the small details that improve a program’s interface are not exciting or satisfying to work on. Details like setting a window’s most appropriate size and position the first time it opens, focusing the appropriate control by default when a window opens, fine-tuning error messages and other text to be more helpful, or making a progress bar more accurately reflect overall progress. Because these things aren’t exciting or satisfying, often years go by before they get fixed. This gives users a general impression of poor design, and that may in turn discourage usability specialists from contributing.

    Solution: When scheduling bug fixes, take into account how long they will take, possibly scheduling minor interface fixes earlier if they can be done quickly. Involve interface designers in this scheduling, to guard against usability flaws being downplayed because “it’s just a UI issue”.

  3. Placating people with options. In any software project with multiple contributors, sometimes they will disagree on a design issue. Where the contributors are employees, usually they’ll continue work even if they disagree with the design. But with volunteers, it’s much more likely that the project maintainer will agree to placate a contributor by adding a configuration setting for the behavior in question. The number, obscurity, and triviality of such preferences ends up confusing ordinary users, while everyone is penalized by the resulting bloat and reduced thoroughness of testing.

    Solution: Strong project maintainers and a culture of simplicity. Distributed version control may help relieve the pressure, too, by making it easier for someone to maintain their own variant of the software with the behavior they want.

  4. Fifteen pixels of fame. When a volunteer adds a new feature to a popular application, it is understandable for them to want recognition for that change ?to be able to point to something in the interface and say “I did that”. Sometimes this results in new options or menu items for things that should really have no extra interface. Conversely, removing confusing or unhelpful features may draw the ire of the programmers who first developed them.

    Solutions: Provide alternative publicity, such as a Weblog, for crediting contributors. Establish design review of code changes that affect the human interface. Regularly review the entire interface, asking “Do we really need this bit”.

  5. Design is high-bandwidth, the Net is low-bandwidth. Volunteer software projects are usually highly distributed, with contributors in different cities or even different continents. So project communications are mostly plain text, in e-mail, instant messaging, IRC, or a bug tracking system. But interaction design is multi-dimensional, involving the layout and behavior of elements over time, and the organization of those elements in an overall interface.

    When developers are in the same room, they can discuss interaction design using whiteboards, paper prototypes, spoken words, and gestures. But on the Internet, these often aren’t available, making discussions much slower and prone to misunderstandings.

    Solutions: Develop and promote VoIP, video chat, virtual whiteboard, sketching, and animation software that allows easier communication of design ideas over the Internet. And whenever possible, hold physical meetings for developers to collaborate in person.

Finally, a few problems are specific to Free Software development.

  1. Release early, release often, get stuck. The common practice of “release early, release often” can cause poor design to accumulate. When a pre-release version behaves a particular way, and testers get used to it behaving that way, they will naturally complain when a later pre-release version behaves differently ?even if the new behavior is better overall. This can discourage programmers from improving the interface, and can contribute to the increase in weird configuration settings.

    Solution: Publish design specifications as early as possible in the development process, so testers know what to expect eventually.

  2. Mediocrity through modularity. Free software hackers prize code reuse. Often they talk of writing code to perform a function, so that other programmers can write a “front end” (or multiple alternative “front ends”) to let humans actually use it. They consider it important to be able to swap out any layer of the system in favor of alternative implementations.

    This is good for the long-term health of a system, because it avoids relying on any single component. But it also leads to a lack of integration which lessens usability, especially if the interfaces between the layers weren’t designed with usability in mind.

    For example, most terminal commands do not provide information on how complete a process is, or estimate how much time is remaining. This is traditional behavior in a terminal, but in graphical software, progress feedback is crucial. If a graphical utility is developed merely as a “front end” to the terminal command, it can’t easily provide that feedback.

    Solution: Design an example graphical interface first, so that interface requirements for the lower levels are known before they are written.

  3. Gated development communities. When you do anything on a computer system you are relying on software from several different development teams. For example, if you print this Web page to show someone else, that task will involve not just the Web browser, but also a layout engine, a window manager, an interface toolkit, a variety of other libraries, a graphical subsystem, a printing subsystem, a printer driver, a filesystem, and a kernel, almost all of these implemented by separate teams.

     

    Oten these teams don’t communicate with each other frequently. And unlike their proprietary competitors, they nearly all have different release cycles. This makes usability improvements difficult and slow to implement, if those improvements involve coordinating changes across multiple parts of the system.

    Solutions: Free Software system vendors can coordinate cross-component features like this, if they have employees working on all relevant levels of the software stack. And volunteer contributors to different software layers can meet at conferences arranged for that purpose.

That’s a long list of problems, but I think they’re all solvable. In the coming months I’ll discuss examples of each of the solutions, and what I’m doing personally to help make Free Software a success.

Further reading



子弹 2008-08-14 13:40 发表评论
]]>
Email相关协议-SMTPhttp://www.shnenglu.com/ztwaker/archive/2008/08/11/58486.html子弹子弹Mon, 11 Aug 2008 01:48:00 GMThttp://www.shnenglu.com/ztwaker/archive/2008/08/11/58486.htmlhttp://www.shnenglu.com/ztwaker/comments/58486.htmlhttp://www.shnenglu.com/ztwaker/archive/2008/08/11/58486.html#Feedback0http://www.shnenglu.com/ztwaker/comments/commentRss/58486.htmlhttp://www.shnenglu.com/ztwaker/services/trackbacks/58486.html来自Q?/font>http://www.cnpaf.net/Class/SMTP/

SMTP协议?/strong>

SMTP被用来在因特|上传递电子邮件。文件RFC821规定了该协议的所有细节。但是你只须C下面的内容-Q该协议的基本命令和Ҏp了?br>
  协议的原理很单。无非是一个客L计算机向服务器发送命令,然后服务器向客户端计机q回一些信息。客房端发送的命o以及服务器的回应都是字符Ԍ你ƈ不需要特别的软gpd它们。如果你仔细看过WinsockTerminalCZE序的源代码Q你׃发现q一炏V现在让我们用这个示例程序来向自己发一电子邮件吧?br>
  q行CZE序Q单?Connect"按钮Q在"Connectto..."对话框中输入你的电子邮g服务器的地址Q选择SMTP选项。最后按"Connect"按钮。如果连接成功,Winsock控g会生Connected事gQ在状态栏中也可看到连接成功的信息。在L本窗口中你将看到从服务器q回的文本。该文本包含一个三位数的代码及描述Q例如:

  220-ns.cinfo.ruSendmail8.6.12/8.6.9readyatWed,22Apr199822:54:41+0300
  220ESMTPspokenhere

  不必太过留意q些描述。因些描q可能会因服务器而异。你只须要知道代码所代表的意思就行了。代?20表示成功建立q接Q服务器{待你的W一个命令?br>
  向服务器传递的W一个命令是HELO.该命令包含一个参敎ͼ即你的邮名?br>
  HELOoleg

  注意:在RFC821中,HELO是一个可选择性命令,如果服务器不要求该命令的话,你可以把它忽略掉?br>
  如果命o成功Q服务器会返回一个代码ؓ250的回应。下一步用MAILFROM命o告诉服务器你惛_一邮件。该命o以发信h的邮件地址为参数?br>
  MAILFROM:oleg@vbip.com

  发完命o后,如果服务器返回一个代码ؓ250回应Q你可以向服务器发送RCPTTO命o了。该命o以收信h地址为参敎ͼ一看便知是告诉服务器你惛_邮g发到收信人地址处?br>
  RCPTTO:somebody@domain.com

  如果你想邮件发l多个收件h的话。你需要多ơ用RCPTTO命oQ对每个命oQ服务器都会q回代码?50的回应?br>
  现在你可以向服务器发送邮件正文了。用DATA命o告诉服务器以下的内容为邮件正文。在你从服务器收C码ؓ354的回应后Q你可以发送邮件正文了。邮件按行发送,每行邮g以一个无回R的换行符l束Q在VB中就是vbLfQ示例程序知道何时用换行符Q何时用回车加换行W。所以你只须按回车键p了。下面是一个例子:

  Subject:Myfirste-mailmessage.

   Firstlineofamessage.
   Secondline.
   .

  注意上面最后一行的最后一个字W是一个小数点。这是正文结束的标志。用VB代码表示是vbLf&"."&vbCrLf.服务器收到这个标志后Q就会立卛_你返回一个代码ؓ250的回应以及该邮g的唯一ID受?br>
  250WAA10568Messageacceptedfordelivery

  d完成了,你可以l发送下邮Ӟ也可以断开同服务器的连接。如果要断开同服务器的连接就用QUIT命o。在q种情况下,服务器会q回一个代码ؓ221的回应ƈ断开q接?br>
  QUIT

  221ns.cinfo.ruclosingconnection

Q-Q-Q-Q-Q-Q?br>SMTP协议是TCP/IP协议族中的一员,主要对如何将电子邮g从发送方地址传送到接收方地址Q也x对传输的规则做了规定。SMTP协议的通信模型q不复杂Q主要工作集中在发送SMTP和接收SMTP上:首先针对用户发出的邮件请求,由发送SMTP建立一条连接到接收SMTP的双工通讯链\Q这里的接收SMTP是相对于发送SMTP而言的,实际上它既可以是最l的接收者也可以是中间传送者。发送SMTP负责向接收SMTP发送SMTP命oQ而接收SMTP则负责接收ƈ反馈应答。可大致用下面的通讯模型C意图来表示Q?br>


Q-Q-Q-Q?br>SMTP协议原始命o码和工作原理
1.SMTP是工作在两种情况下:一是电子邮件从客户Z输到服务器;二是从某一个服务器传输到另一?br>服务?br>2.SMTP是个h/响应协议Q命令和响应都是ZASCII文本Qƈ以CR和LFW结束。响应包括一个表C
回状态的三位数字代码
3.SMTP在TCP协议25L口监听连接请?br>4.q接和发送过E:

a.建立TCPq接
b.客户端发送HELO命o以标识发件h自己的n份,然后客户端发送MAIL命o
服务器端正希望以OK作ؓ响应Q表明准备接?br>c.客户端发送RCPT命oQ以标识该电子邮件的计划接收人,可以有多个RCPT?br>服务器端则表C是否愿意ؓ收g人接受邮?br>d.协商l束Q发送邮Ӟ用命令DATA发?br>e.?表示l束输入内容一起发送出?br>f.l束此次发送,用QUIT命o退出?br>

5.另外两个命oQ?br>VRFY---用于验证l定的用户邮是否存在,以及接收关于该用L详细信息?br>EXPN---用于扩充邮g列表?br>
6.邮g路由q程Q?br>SMTP服务器基?#8216;域名服务DNS中计划收件h的域名来路由电子邮g。SMTP服务器基于DNS中的MX记录
来\q子邮ӞMX记录注册了域名和相关的SMTP中LQ属于该域的电子邮g都应向该L发送?br>
若SMTP服务器mail.abc.com收到一信要发到shuser@sh.abc.com:

a.SendmailhDNSl出Lsh.abc.com的CNAME记录Q如有,假若CNAME到shmail.abc.comQ则再次
hshmail.abc.com的CNAME记录Q直到没有ؓ?br>b.假定被CNAME到shmail.abc.com,然后sendmailh@abc.com域的DNSl出shmail.abc.com的MX记录Q?br>shmailMX5shmail.abc.com
10shmail2.abc.com
c.Sendmail最后请求DNSl出shmail.abc.com的A记录Q即IP地址Q若q回gؓ1.2.3.4
d.Sendmail?.2.3.4q接Q传送这给shuser@sh.abc.com的信?.2.3.4q台服务器的SMTP后台E序

7.SMTP基本命o集:

命o描述
------------------------------
HELO向服务器标识用户w䆾
发送者能ƺ骗Q说谎,但一般情况下服务器都能检到?br>
MAIL初始化邮件传?br>mailfrom:
RCPT标识单个的邮件接收hQ常在MAIL命o后面
可有多个rcptto:
DATA在单个或多个RCPT命o后,表示所有的邮g接收人已标识Qƈ初始化数据传输,?l束?br>VRFY用于验证指定的用?邮箱是否存在Q由于安全方面的原因Q服务器常禁止此命o
EXPN验证l定的邮列表是否存在,扩充邮箱列表Q也常被用
HELP查询服务器支持什么命?br>NOOP无操作,服务器应响应OK
QUITl束会话
RSET重置会话Q当前传输被取消
--------------------------------

8.MAILFROM命o中指定的地址是称作envelopefrom地址Q不需要和发送者自q地址是一致的?br>RCPTTO与之{同Q指明的接收者地址UCؓenvelopeto地址Q而与实际的toQ行是什么无兟?br>9.Z么没有RCPTCC和RCPTBCC
所有的接收者协商都通过RCPTTO命o来实玎ͼ如果是BCCQ则协商发送后在对Ҏ收时被删掉信接收?br>10.邮g被分Z部分,信头部分和信体部?br>envelopefrom,envelopeto与messagefrom:,messageto:完全不相qӀ?br>evnelope是由服务器主机间SMTP后台提供的,而messagefrom/to是由用户提供的。有无冒号也是区别?br>
11.怎样׃部分检查是否一信是否是伪造的Q?br>a.received行的兌性?br>现在的SMTP邮g传输pȝQ在信封部分除了两端的内部主机处理的之个Q考虑两个公司防火墙之?br>的部分,若两台防火墙机器分别为A和Q但接收者检查信receivedQ行时发现经q了C.则是伪造的?br>b.receivedQ行中的L和IP地址Ҏ否对应如Q?br>Receibed:fromgalangal.org(turmeric.com[104.128.23.115]bymail.bieberdorf.edu....
c.被h手动d在最后面的received行:
Received:fromgalangal.org([104.128.23.115])bymail.bieberdorf.edu(8.8.5)
Received:fromlemongrass.orgbygalangal.org(8.7.3)
Received:fromgraprao.combylemongrass.org(8.6.4)
Q-Q-Q-Q-
SMTP协议的命令和应答
从前面的通讯模型可以看出SMTP协议在发送SMTP和接收SMTP之间的会话是靠发送SMTP的SMTP命o和接收SMTP反馈的应{来完成的。在通讯链\建立后,发送SMTP发送MAIL命o指o邮g发送者,若接收SMTP此时可以接收邮g则作出OK的应{,然后发送SMTPl箋发出RCPT命o以确认邮件是否收刎ͼ如果接收到就作出OK的应{,否则发出拒l接收应{,但这q不会对整个邮g操作造成影响。双方如此反复多ơ,直至邮g处理完毕。SMTP协议共包?0个SMTP命oQ列表如下:

SMTP命o命o说明
HELLOQdomainQ<CRLFQ识别发送方到接收SMTP的一个HELLO命o
MAILFROM:Qreverse-pathQ<CRLFQ<reverse-pathQؓ发送者地址。此命o告诉接收方一个新邮g发送的开始,q对所有的状态和~冲行初始化。此命o开始一个邮件传输处理,最l完成将邮g数据传送到一个或多个邮箱中?br>RCPTTO:Qforward-pathQ<CRLFQ<forward-pathQ标识各个邮件接收者的地址
DATAQCRLFQ?br>接收SMTP把其后的行为看作邮件数据去处理Q以QCRLFQ?QCRLFQ标识数据的l尾?br>RESTQCRLFQ退?复位当前的邮件传?br>NOOPQCRLFQ要求接收SMTP仅做OK应答。(用于试Q?br>QUITQCRLFQ要求接收SMTPq回一个OK应答q关闭传输?br>VRFYQstringQ<CRLFQ验证指定的邮箱是否存在Q由于安全因素,服务器多止此命令?br>EXPNQstringQ<CRLFQ验证给定的邮箱列表是否存在Q扩充邮列表,也常止使用?br>HELPQCRLFQ查询服务器支持什么命?br>
注:QCRLFQؓ回R、换行,ASCII码分别ؓ13?0Q十q制Q?br>
  SMTP协议的每一个命令都会返回一个应{码Q应{码的每一个数字都是有特定含义的,如第一位数字ؓ2时表C命令成功;?表失败;3表没有完成。一些较复杂的邮件程序利用该特点Q首先检查应{码的首数字QƈҎ其值来军_下一步的动作。下面将SMTP的应{码列表如下Q?br>
应答码说?br>501参数格式错误
502命o不可实现
503错误的命令序?br>504命o参数不可实现
211pȝ状态或pȝ帮助响应
214帮助信息
220QdomainQ服务就l?br>221QdomainQ服务关?br>421QdomainQ服务未qAQ关闭传输信?br>250要求的邮件操作完?br>251用户非本圎ͼ{发向Qforward-pathQ?br>450要求的邮件操作未完成Q邮׃可用
550要求的邮件操作未完成Q邮׃可用
451攑ּ要求的操作;处理q程中出?br>551用户非本圎ͼ请尝试<forward-pathQ?br>452pȝ存储不Q要求的操作未执?br>552q量的存储分配,要求的操作未执行
553邮箱名不可用Q要求的操作未执?br>354开始邮件输入,?."l束
554操作p|
Q-Q-Q-Q-










子弹 2008-08-11 09:48 发表评论
]]>
Open Source Licenses by Categoryhttp://www.shnenglu.com/ztwaker/archive/2008/08/04/57945.html子弹子弹Mon, 04 Aug 2008 03:57:00 GMThttp://www.shnenglu.com/ztwaker/archive/2008/08/04/57945.htmlhttp://www.shnenglu.com/ztwaker/comments/57945.htmlhttp://www.shnenglu.com/ztwaker/archive/2008/08/04/57945.html#Feedback0http://www.shnenglu.com/ztwaker/comments/commentRss/57945.htmlhttp://www.shnenglu.com/ztwaker/services/trackbacks/57945.htmlOpen Source Licenses by Category

from: http://www.opensource.org/licenses/category

 .:: License Index ::.
License Approval Process
License Information
Origins and definitions of categories from the License Proliferation Committee report
 .:: Licenses that are popular and widely used or with strong communities ::.
*Apache License, 2.0
*New and Simplified BSD licenses
*GNU General Public License (GPL)
*GNU Library or "Lesser" General Public License (LGPL)
*MIT license
*Mozilla Public License 1.1 (MPL)
*Common Development and Distribution License
*Common Public License 1.0
*Eclipse Public License
 .:: Special purpose licenses ::.
*Educational Community License
*NASA Open Source Agreement 1.3
*Open Group Test Suite License
 .:: Other/Miscellaneous licenses ::.
*Adaptive Public License
*Artistic license 2.0
*Open Software License
*Qt Public License (QPL)
*zlib/libpng license
 .:: Licenses that are redundant with more popular licenses ::.
*Academic Free License
*Attribution Assurance Licenses
*Eiffel Forum License V2.0
*Fair License
*Historical Permission Notice and Disclaimer
*Lucent Public License Version 1.02
*University of Illinois/NCSA Open Source License
*X.Net License
 .:: Non-reusable licenses ::.
*Apple Public Source License
*Computer Associates Trusted Open Source License 1.1
*CUA Office Public License Version 1.0
*EU DataGrid Software License
*Entessa Public License
*Frameworx License
*IBM Public License
*Motosoto License
*Multics License
*Naumen Public License
*Nethack General Public License
*Nokia Open Source License
* OCLC Research Public License 2.0
*PHP License
*Python license (CNRI Python License)
*Python Software Foundation License
*RealNetworks Public Source License V1.0
*Reciprocal Public License
*Ricoh Source Code Public License
*Sleepycat License
*Sun Public License
*Sybase Open Watcom Public License 1.0
*Vovida Software License v. 1.0
*W3C License
*wxWindows Library License
*Zope Public License
 .:: Superseded licenses ::.
*Apache Software License 1.1
*Artistic license 1.0
*Eiffel Forum License V1.0
*Lucent Public License (Plan9)
*Mozilla Public License 1.0 (MPL)
 .:: Licenses that have been voluntarily retired ::.
*Intel Open Source License
*Jabber Open Source License
*MITRE Collaborative Virtual Workspace License (CVW License)
*Sun Industry Standards Source License (SISSL)
 .:: Uncategorized Licenses ::.
*Affero GNU Public License
*Boost Software License (BSL1.0)
*Common Public Attribution License 1.0 (CPAL)
*GNU General Public License version 3.0 (GPLv3)
*GNU Library or "Lesser" General Public License version 3.0 (LGPLv3)
*ISC License
*Microsoft Public License (Ms-PL)
*Microsoft Reciprocal License (Ms-RL)
*Non-Profit Open Software License 3.0
*NTP License
*Reciprocal Public License 1.5 (RPL1.5)
*Simple Public License 2.0


子弹 2008-08-04 11:57 发表评论
]]>
Agile Development [ZT]http://www.shnenglu.com/ztwaker/archive/2008/08/04/57926.html子弹子弹Mon, 04 Aug 2008 01:18:00 GMThttp://www.shnenglu.com/ztwaker/archive/2008/08/04/57926.htmlhttp://www.shnenglu.com/ztwaker/comments/57926.htmlhttp://www.shnenglu.com/ztwaker/archive/2008/08/04/57926.html#Feedback0http://www.shnenglu.com/ztwaker/comments/commentRss/57926.htmlhttp://www.shnenglu.com/ztwaker/services/trackbacks/57926.html

Agile Development

By John Graham-Cumming

Five Steps to Continuous Integration

Introduction

In this whitepaper I argue that the person most affected by the introduction of agile or extreme programming techniques is not the software or quality assurance engineer, but the build manager. And the build manager can no longer make do with home grown tools; software production automation tools are required to make agile development a build reality.

The reality is that agile techniques are a throwback to the age when developers were able to work on small projects in small teams. Each developer (or sometimes pair of developers) concentrates on small building blocks of code (with associated unit tests), and integrates regularly with other developers to ensure that the overall software project is progressing. For developers, agile techniques are a natural fit because they reflect how developers like to work best: on small, manageable pieces of code with regular feedback.

Even though developers are working on small sections of code, the overall projects they are part of are now very large. So there's no going back to a small build on a single machine for build managers. While developers may have broken their work down into small units that they can code and test, the overall size of most enterprise software projects is constantly growing. And it's the large body of code that the build manager is expected to work with, not the manageable chunks that developers deal with.

In fact, the build manager is expected to cope with ever larger software, on ever more platforms, while at the same time dealing with developers' requests for fast integration builds. Those integration builds enable agile development at the software engineer's desktop because they are able to integrate their local changes into a large build, but cause build managers to be required to produce one or two orders of magnitude more builds per day.

Continuous Integration

To the build manager, the words "multiple integrations per day" and "each integration is verified by an automated build" mean a radical change from once-nightly builds. All these changes are brought about by one central tenet of agile development: continuous integration.

The seminal paper on Continuous Integration (and an excellent, and readable introduction to the topic) is Martin Fowler's article entitled, simply, "Continuous Integration" and is available here.

Its abstract states:

Continuous Integration is a software development practice where members of a team integrate their work frequently; usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible.

To the build manager, the words "multiple integrations per day" and "each integration is verified by an automated build" mean a radical change from once-nightly builds.

Fowler goes on to list a number of "Practices of Continuous Integration." The first build-related practice is "Automate the Build." He argues that the set of tasks required to go from source code to the final shipping binary is so complex that it should be automated so that it is repeatable. If the build is not automated, he argues, the build process will be error prone.

He also argues that the build includes much more than just compiling the software and building a binary. He sets the goal of, "anyone should be able to bring a virgin machine, check the sources out of the repository, issue a single command, and have a running system on their machine."

It's worth stopping and thinking about the implications of that statement for your build organization. It's very likely that getting to such an automated stage seems impossible, when starting from what is often a creaky build system held together by a collection of Makefiles, Perl scripts and other programs whose exact function or operation is often unclear.

Clearly, the goal of going from a virgin machine to fully running code is a stretch, but I think it's a good overall goal. Once you reach that stage, you will have put together a build system that is very reliable and should, if written and documented well, be easy to modify and adapt as software changes.

Such a fully automated build has advantages outside the direct realm of agile development. How many times has your build team been asked to rebuild an old version of your software and been unable to do so? Important customers can sometimes demand that old versions of code be patched or updated, or a security problem can mean that all versions of a company's currently supported code need to be fixed and released.

In general, only very well prepared teams are capable of building an arbitrary version of their code. Even if a good archive of the sources was made at the time of release, other components of software are likely to have decomposed: you may not have the right build scripts, or the right compiler, or the right version of some third-party component any more.

Fowler's goal, which I refer to as a "pickled build" (the entire build is pickled in a jar ready for use whenever demanded), done right, means that old versions of software can be rebuilt at will, and helps support developers in their move to agile development.

Fowler's second practice for builds is: "Make Your Build Self- Testing." This implies that the automatic build also includes an automatic test. He asks that any body of code have a set of automatic tests that can check a large part of the code base for bugs. Many developers are, in fact, already writing such test suites through the Extreme Programming focus on unit testing, or by performing Test Driven Development (where developers write the tests before the code).

With this test suite in place, Fowler asks that the automated build test itself by running the test suite and reporting the results. Results would typically be reported on screen or by email if the build and test was run remotely.

Fowler's next two practices have a profound effect on build management: "Everyone Commits Every Day" and "Every Commit Should Build the Mainline on an Integration Machine." The implication is that every developer will be committing code once per day (at least) and that every commit will cause a build and test on some build resource (the "integration machine") managed by the build manager. To put that in perspective, for a team of 20 engineers committing once per day during an 8 hour work day, that's a build and test every 24 minutes. For large teams that number increases, and the time between builds is greatly shorted.

The reason agile developers want these per-commit builds is to ensure that integration between developers is working and that the software being built works, and is testable, at all times. The idea that the software should run at all times is central to agile development, and the health of the per-commit build and test becomes an important sign of health for the entire project. If per-commit builds are done quickly and frequently enough, the build will reflect changes made by a single check-in by a single developer offering unparalleled opportunity to narrow down the cause of a breakage.

In fact, this build is so important that I refer to it as the Agile Heartbeat. Agile teams will install monitoring devices (such as red and green lava lamps) that make the status of the heartbeat build visible to all. Fowler states that no developer should "go home until the mainline build has passed with any commits" they've added. This means that all of engineering looks every day to the heartbeat to measure their own progress (Fowler refers to this in the practice "Everyone can see what's happening").

Another important practice mentioned in Fowler's paper is 'Keep the Build Fast'. This seems like an obvious corollary to the previous practices, since a team that requires a build every few minutes and every time the code changes will necessarily need very fast builds. In fact, Extreme Programming outlines the goal of "ten minute" builds, and I've written previously about what I call espresso builds (builds that only take as long as a coffee break).

Fast builds are also important because developers are looking to the status of the build as a measure of their progress. Every minute that is shaved off the build is a minute saved for all developers who have committed code to that build. With many developers, and many builds, that time saved adds up quickly and fast builds improve the productivity of the entire team.

Fowler suggests that this entire process be either managed by hand (if the team is very small), or through the use of a "continuous integration server." This whitepaper will later describe tools that can be used to implement continuous integration, but first, the very idea of getting to continuous integration may seem daunting. Luckily, it can be broken down into stepping stones that are of a manageable size.

Stepping Stones to Continuous Integration

Although pickling your entire build system (getting the build under ten minutes, building every time a developer checks in and giving automatic feedback) is an enormous task, a stepping stone approach can get you to continuous integration without a single, painful push to change everything in the organization.

And, typically, build managers simply do not have the time or resources to spend on a major change to everything they do. This is especially true when build managers are, naturally, expected to keep churning out the builds that they currently create while improving their processes to meet the needs of agile development.

However, a five-stage approach can help ease the way to continuous integration. Those five stages are: fully automated builds, fast builds, lava lamps, build and test and pre-flight builds. At each stage, the build manager should carefully consider the tool available for automation of the software production process as continuous integration requires a very large effort.

1. Fully Automate

Although some builds are already fully automated, most require integration and agile builds is some manual intervention on the part of the build manager (for the ability to build your example, during the installation of the software when a dialog box software automatically needs clicking). But the core of continuous integration and agile builds is the ability to build your software automatically.

So the first stepping stone is to make the build runnable from a single command invocation (the build manager should simply be able to type build followed by some arguments specifying a particular branch or version of the software to build). Once that build script is in place, the build system should be set to run automatically.

This is mostly a matter of detecting when the source code in the source code management system has changed. One way to do that is to have a simple periodic job that checks for changes. Once changes are detected, the job then waits for the repository to stabilize (to give developers time to commit all their code). The job could then wait for a period of quiet for fifteen minutes following a commit. Once the quiet period has ended, the build system starts a full build and test using the build script to build from the main line of code.

This is probably the only stepping stone that can be performed without resorting to new software production management software. The build script can be written using existing tools (such as GNU Make or Perl), but it's worth looking at available automation tools (open source or commercial) since the detection of source code changes and kicking off of an automated build is a common feature. Getting started with a new tool in a limited way (just for the change detection and build kick off) is a good way to learn the tool without having committed to each of the five steps to continuous integration.

2. Fast Builds

Having automated the build, the next step is to speed up the builds themselves. Although Extreme Programming preaches a ten minute automated build and test, I think that a realistic goal for an existing project is to get the automated build and test under one hour.

With multi-core processors and multi-processor machines becoming commonplace, exploiting parallelism available in builds is a relatively simple way to achieve significant build speed-ups. However, missing or incomplete dependency information makes implementing a homegrown parallel build error-prone…

Getting to fast builds can be hard.

For some projects, it's simply a matter of upgrading from outmoded build hardware to newer machines (and often newer, faster disks since builds require a lot of disk access getting sources and writing objects), but for others the build will either require restructuring (so that it can be broken down into parts runnable on separate machines), or a purpose-built parallel build system will be needed. Parallel build systems are available as both open source and commercial products (including from Electric Cloud). With multi-core processors and multi-processor machines becoming commonplace, exploiting parallelism available in builds is a relatively simple way to achieve significant build speed-ups. However, missing or incomplete dependency information makes implementing a homegrown parallel build error-prone, and requires specialized tools to overcome the inherently serial nature of almost all large build systems.

3. Lava Lamps

Lava lamps (those bubbling colored liquid lamps popular in the 1970s) may seem like a silly way to monitor build progress, and in a physically large team (or with remote teams or a complex project) they may not actually be suitable, but introducing some sort of build monitoring is the third stepping stone. Lava lamps are just a fun, easy-to-implement example of a monitoring system.

A build monitor could be red and green lava lamps, or an internal web page showing live build status, or a flat screen monitor mounted high on the wall giving build status. Introduce a mechanism for build feedback that is clear (red and green for bad and good, for example), easily visible (perhaps those lava lamps are right by the water cooler) and continuously updated.

The build monitor will get its input (good or bad) from the fully automated builds set up in the first stepping stone. Everyone will look to the build monitor first thing in the morning and throughout the day as new builds are run.

Although the build may only run and give feedback a small number of times per day (perhaps as little as four times), the build monitor will start to represent the pulse of the engineering team, illustrating the health of the build and hence the software for all to see. This is another important step towards the goal of every commit initiating a build with results for all to see.

Even with just four builds a day with feedback, developers will be able to identify integration problems much quicker than with a nightly build. And with the automation effort expended in the first stepping stone, these automatic builds will be reliable and repeatable and a good indication of the software's health.

4. Build and Test

If developers are following agile methods, they'll be developing automated test suites using tools like jUnit or cppunit. The third stepping stone is to integrate these tests (and other "smoke tests" that may already exist) into the build system now in place.

This is probably a relatively simple task given that the tests themselves are already automatic. This step is also important because it will raise the visibility and importance of the builds, and becomes the start of the agile heartbeat.

5. Pre-Flight Builds

The primary need of developers practicing agile development is the ability to see that their code integrates with the changes made by other developers. Although they could do this on their local machine (by getting all the relevant sources and running a tool like Make), the integration build may take too long, or need special build resources to be able to construct every part of the software. Typically, that means that developers are forced to limit their builds to small parts of an overall project. Even if developers could run full builds on their machines, the production build environment is often different from the environments on developers’ machines, so a build that works on a developer’s machine may not work in the production environment. Because of these issues, developers frequently introduce errors when they ultimately integrate with the complete system by checking in their code.

A good first step is to put full builds in the hands of developers. The build manager needs to assign a machine (or perhaps more than one if multiple platforms are involved) and set up an internal web page where a developer can request a build.

The developer's request should include their email address, the location of the software they want built (this could be the name of a branch to build, or a directory on a shared server where the developer has placed a personal copy of the source), and the opportunity to determine the extent of the build (for example, the developer could request a build on all platforms, or limit the build to just a single operating system).

The system should maintain a queue (visible through another internal web page) of pending build requests and should handle the builds in first-come, first-served order. When a developer's build has completed running (perhaps a couple of hours after their request), the developer receives an email giving the status of the build and any error output generated by the build system.

In addition, the build system takes the entire output of the build and stores it on a shared disk for the developer to examine. After some fixed period (perhaps a week), the output of the build is automatically deleted by the build system to free up space.

The advantages to the agile developer are immediate: they no longer have to wait for a nightly build (with the inherent 24-hour delay) to determine whether their changes broke anything, and by isolating the build to their sources, or their branch, they are able to much more quickly fix a problem even if their pre-flight build took many hours to complete, because they can narrow down the changed parts of the code more quickly. Furthermore, they can be confident that their check-in will not introduce environment-related build breakages, since the pre-flight build was run in the production environment.

At this point, the entire team can decide to introduce a new rule: no one commits to the mainline of source code control until they've run a successful pre-flight build. Here you've introduced another part of agile development which will greatly reduce the number of errors in the nightly builds. With developers checking their own code against a full build run through the pre-flight system before committing, they ensure that most integration errors are removed before affecting the entire team.

For the team, the great advantage of pre-flight builds is that the nightly or automated builds suddenly become more reliable. If developers are checking their code for breakages against a pre-flight build before checking in, the nightly build's reliability will increase greatly. For the build manager, there are two significant challenges to implementing pre-flight builds: automation and build resource availability.

The first prerequisite of an pre-flight build system is an automatic build, so tackling the first stepping stone is critical. It is, in fact, Fowler's first build-related practice and the cornerstone of continuous integration. The price of getting to a fully automated build (without automated tests at this stage) has to be paid up-front and will be the most expensive (in terms of time) part of the move to continuous integration.

Secondly, the internal web page needs to be written. This is relatively easy with free web servers (such as Apache), and free tools (such as PHP and Perl) being widely available and well documented.

Lastly, as developers start to use the system (and they will if they are trying to be agile), the number of available build machines will become a problem. As many developers begin to ask for preflight builds the build queue may become long (especially if the build time is also long).

At this point, the build manager has achieved agile builds. Developers can build whenever they need to; when code is checked in, it gets built automatically (and quickly) and everyone sees the state of that build. If the build breaks, developers can stop work to get the code integrating quickly.

The build manager may also choose to stop doing nightly builds altogether. With pre-flight and per check-in builds, the nightly build may be a thing of the past.

Tools That Can Help

A good starting point when searching for continuous integration tools is the Wikipedia page entitled "Continuous Integration." There you'll find a long list of commercial and open source tools for building continuous integration servers.

To preserve the team’s sanity and reduce downtime for developers and the build team when looking at tools or considering a build- versus-buy decision, you should aim to change as little as possible about your existing build environment. The goal should be to automate the build completely (so that it can be fired off from a single command) without changing the entire system. All that's needed to get continuous integration off the ground is a single command capable of running an entire build: the command needs to extract the sources from source code management and perform the build.

Once that script is in place, the choice of appropriate tool really comes down to a few key questions:

  1. Does the tool support scheduled builds? If the tool can't support "cron" style builds then it's not worth considering. These are the most basic sort of builds and, even when you've introduced agile development methods, they'll still be important.
  2. Is the tool scalable? One of the characteristics of agile development is that enormous loads will quickly be placed on build resources as engineers start running their own builds. And those resources will be even more stressed when every commit starts a build. Scalability needs to be considered from the start to avoid having to change servers in the middle of the stepping stones to continuous integration. Any tool must scale as resources (such as servers) are added, and be able to make use of pools of resources simultaneously as demand fluctuates throughout the work day. Business demands should be considered as well, as requirements for additional target platforms or integration of new teams will place additional demands upon the system over time.
  3. Does the tool provide reporting or analytical tools? With hundreds of builds per day, managing the output or even just the status of every build is a headache. What was simple with a single nightly build becomes very hard with builds every ten minutes, and it's vital to be able to understand the performance of build systems and how the load and use of the build servers are changing over time.
  4. Is the tool easy to adopt? Avoid any tool that requires rewriting existing Makefiles or build scripts: it's hard enough to adopt a new methodology without being required to start everything from scratch. The tool should work with existing tools and integrate with the existing source code management system.
  5. Will the tool enable pre-flight and per-commit builds? Since these two styles of build are fundamental to continuous integration, the tool must make it easy to integrate with source code management to detect changes to the source base and automatically start builds, and to allow any user to start a build at will.
  6. Does the tool support access control? Since the build servers will now be shared with all of development (and not with the small build team alone), access control is vital to ensure that developers have access to the appropriate resources from any location whether local or remote, and that the build team is able to override running builds to perform high-priority builds at will.
  7. Will the tool support multiple teams or will each group or division require its own investment in a tool (plus configuration and maintenance)? Once automated, many build procedures (such as the job that monitors the source code management system for changes) will likely be generic in nature and easily shared across the organization. To maximize investment in a tool and reduce duplicate work, can common procedures or company standards be rolled out across teams?

In many, if not all cases, a homegrown approach will fall short in one or more of these areas. Or, if the homegrown system is adequate at the outset of the stepping stones to continuous integration, it may fall short over time as the load increases, the number of target platforms increases or as the number of users increases. Commercial tools will also pay off in terms of the reduced administration and maintenance required of a manual setup.

Conclusion

Extreme Programming and Agile Development are being adopted by many software engineering organizations. Achieving agility is not easy, but teams can realize some of the benefits of agile development with a step-by-step approach. Careful planning is required by all parts of the engineering team with a special focus on the build resources. The build team will come under enormous pressure once agile methods are implemented and a step-by-step approach to implementing agile builds is recommended.

Careful selection of appropriate build tools is essential from the start of the roll-out of any agile method. Those tools must be able to cope with the varied demands on the build resources and with the likely growth in the number and size of builds.

Enabling Agile Builds with ElectricCommander

Faster Builds, Automated Tests

To maintain aggressive product release schedules, the LSI Logic Consumer Products engineering team wanted to move toward a daily integration model, integrating, building and testing 25 to 50 unique software builds every 24 hours.

The company first chose Electric Cloud’s ElectricAccelerator to address the build speed issues within the integration model, succeeding in reducing build times by 7-8x (from 150 minutes down to 20-30 minutes).

Seeing success with ElectricAccelerator, LSI decided to convert its test environment to ElectricCommander, Electric Cloud’s production automation solution. Where their previous environment became overloaded handling just 250 concurrent steps, ElectricCommander was able to schedule and execute more than 1,000 concurrent steps with the same hardware setup, dramatically streamlining and speeding the smoke test process.

ElectricCommander is a tool to consider for implementing an agile production process within an enterprise environment. It is a Web-based solution for automating software builds and other production tasks to enable agile, iterative development. Only ElectricCommander is simple enough to use on a small build, yet scalable enough to support the most complex software production environments. It requires minimal process changes to get started or to deploy across teams. It provides the reporting and visibility organizations need for compliance efforts and release planning, plus an unprecedented level of flexibility and customizability to suit the agile organization. For agile teams ElectricCommander enables:

  • Fast builds: Run multiple procedures in parallel on the same resource, or distribute procedures or individual steps across any number of machines for faster turnaround and more efficient production. For additional speed improvements to the build step, ElectricAccelerator provides a fine-grained parallelism to speed builds by as much as 20x (see below).
  • Automated and scheduled builds: Schedule production procedures to run at a specified day or time, on an hourly or daily basis, or whenever someone checks in code to a specified repository or branch.
  • Pre-flight and per-commit builds: The underlying information architecture allows build and release teams to organize production assets into virtual, access-controlled projects, while access to production machines can also be limited or controlled. In this way, a release team can provide developers with dedicated or specified resources for pre-flight builds, as needed. Further, ElectricCommander supports integrations with leading SCM tools to facilitate per-commit builds.
  • Visibility and reporting: ElectricCommander’s unique analytics provide valuable insight into the details of the build, not just success or failure. The analytics engine extracts information and stores it as persistent properties of the job step, providing easy access to pinpoint statistics and trend reporting.

About Electric Cloud

Electric Cloud is the leading provider of Software Production Management solutions that accelerate, automate and analyze the software development tasks that follow the check-in of new code. These include the software build, package, test and deploy processes.

The reality is that homegrown systems are expensive to maintain and difficult to standardize across an enterprise, and are typically not able to support the frequent iterations at the core of Agile Development. Electric Cloud makes it simple to achieve a scalable, agile software production environment across the organization. Electric Cloud's product suite – ElectricAccelerator, ElectricCommander and ElectricInsight – improves development productivity and product quality by accelerating, automating and analyzing the entire software production management lifecycle. In addition to the ElectricCommander production automation tool, Electric Cloud offers:

ElectricAccelerator

ElectricAccelerator™ accurately executes parallel builds across a cluster of inexpensive servers to reduce build times by as much as 20x. ElectricAccelerator plugs seamlessly into existing build infrastructures, without modifying existing scripts. Faster, more accurate builds dramatically reduce the time developers spend waiting for builds to complete, and enable them to do complete builds before checking in their changes.

ElectricInsight

ElectricInsight™ is a software build visualization tool that, when used in conjunction with ElectricAccelerator, provides job-level detail into parallel builds and provides unprecedented visibility into build results for simplified troubleshooting and performance tuning. Leading companies such as Qualcomm, Intuit, Motorola, and Expedia have trusted Electric Cloud’s Software Production Management solutions to change software builds and the entire production process from a liability to a competitive advantage.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

John Graham-Cumming


John Graham-Cumming is Founder and Chief Scientist at Electric Cloud. Prior to Electric Cloud, John was a Venture Consultant with Accel Partners, VP of Internet Technology at Interwoven, VP of Engineering at Scriptics, and Chief Architect at Optimal Networks. John holds BA and MA degrees in Mathematics and Computation and a Doctorate in Computer Security from Oxford University. John is the creator of GNU Make Standard Library and has six pending patents in the build space.

Electric Cloud, ElectricInsight, ElectricAccelerator, ElectricCommander and Electric Make are trademarks of Electric Cloud. Other company and product names may be trademarks of their respective owners.
Location: United States United States


子弹 2008-08-04 09:18 发表评论
]]>
数独|址http://www.shnenglu.com/ztwaker/archive/2008/07/25/57161.html子弹子弹Fri, 25 Jul 2008 09:33:00 GMThttp://www.shnenglu.com/ztwaker/archive/2008/07/25/57161.htmlhttp://www.shnenglu.com/ztwaker/comments/57161.htmlhttp://www.shnenglu.com/ztwaker/archive/2008/07/25/57161.html#Feedback0http://www.shnenglu.com/ztwaker/comments/commentRss/57161.htmlhttp://www.shnenglu.com/ztwaker/services/trackbacks/57161.html

国内外数独网站推?/h2>
说明Q在此仅列出个h觉得好的|站的地址及介l,基本以能够在U做题ؓ主,包括提供技巧讲解等
q里介绍的网站只?span class=t_tag onclick=tagshow(event) href="tag.php?name=%CA%FD%B6%C0">数独的,不包括其他nikoli的逻辑题,虽然下面有些|站会涉及到
如果有错误或~失Ƣ迎回帖指正


国内体中?Ƨ泊颗oubk |址http://sudoku.oubk.com
                          在线做题主要有各隑ֺ各规gl数独,锯数独QGTQ数比)Qkiller数独QGT&killerQ对角线数独Q对角线&GTQ对角线&killer
                          有一些新手教E包括几个Wing的讲解,初学者比较适用
                          题目可以打印
                          开设有论坛提供讨论Q论坛地址http://bbs.oubk.com

                          独数之道|数独爱好?|址http://www.sudokufans.org.cn
                          在线做题主要?7格数独,17g刀数独,51I数独,三阶3D数独Q四?D数独Q锯齿数独,6×6LED数?br>                               6×6GTQ?×6骰子数独Q六角数独(也就是WSC中的starQ,四空数独Q牡Ҏ独,不连l数独,17D体数?br>                               八卦数独Q无~数独,killer数独
                          有在UPKpȝQ支持多人PK
                          有数独技巧,数独例题Q原创数独,变型数独的文章,技巧篇有一定难度,适合已经掌握初技巧的独友
                               例题主要采自qx和网友讨论的题目Q有一定难度或味性,变型题来自国内外攉Q可以看看新式花?br>                          提供可打华ͼ可导入谜题库Q供|友下蝲Q这里感谢kiwy提供数独大会馆的题库
                          有传l题导入pȝQ可以把你在别处看到的题导入后在U作{,pȝ会帮助你查正?br>
国内J体中文 怪之?|址http://oddest.nc.hcc.edu.tw/
                          有數獨挑戰館 數獨大會?4x4數獨 6x6數獨 角數獨 離散數獨
                              無P數獨 拒馬數獨 字母數獨 中央數獨 同位數獨 城堡數獨 愛心數獨 三國數獨 增區數獨
                              奇數數獨 偶數數獨 兩儂數獨 奇偶數獨 同類數獨 奇和數獨 五十數獨 五倍數?
                          E式Q数独大?br>                          提供初技巧的讲解Q包括wing{的高技?br>                          怪论坛出了些问题Q暂时无法链接,E后d

国外英文|站 killersudokuonline |址http://www.killersudokuonline.com
                          每日每周有killer数独QGT数独QGT&killer数独Q和oubk的规则有些不同)

                          英国数独|站 |址http://www.sudoku.org.uk/
                          每日killer数独Q传l数独,锯数独

                          捷克数独|站 |址http://www.sudoku-league.com/
                          提供每日一题(传统数独Q?br>                          有PKpȝQ支持两人PKQ可选择easy,middle,hard,brainkiller四种隑ֺ的传l数独题

                          x数独|站 |址http://sudoku.com.au/
                          提供每日一题(传统数独Q?br>                          提供技巧讲解,隑ֺ较高

                          多h一题PK?|址http://www.multiplaysudoku.com
                          那里的玩家水qx较高Q不q不用担心你会得零分Q因Z们会很有l士风度的留下几个数让你?br>
                          一个数独程式的作者的数独|?|址http://www.djape.net
                          有传l数独,killer数独Q锯齿数独,GT数独Q武士数独(即五联体数独Q?br>                          |站提供PDF或TXT源码可以导入他的软g中游?br>
                          又一个数独程式的数独|?|址http://www.sudocue.net/
                          提供锯数独Qkiller数独Q传l数独ؓ主,提供TXT源码可以导入他的游戏软g?br>                          如果你对你的killer数独水^有信心,那可要尝试一下这里的killer题了

                          sudoku9981 |址http://www.sudoku9981.com
                          你一定用q他E序sudoku9981Q也是中文那个数独博士Q不q个人支持原装正版,|络上可以找到注册码
                          提供了PDF格式的数独题打印
                          有各cL巧的讲解Q还是比较详l的Q不论是初学q是有基的都可以学习

                          Andrew的数独网?|址http://www.scanraid.com/
                          传统数独Q对角线数独Q锯齿数独的解答
                          各类数独技巧的讲解Q适合新手Q也适合有一定基的独?br>
                          压u推荐 数独教父的网?|址http://www.sudoku.com
                          论坛中有丰富的解题技巧讲解,你可以遇到很多数独高手或数独E式高手
                              如果你有一定英文水q的话,l对能让你的数独水^上升很多     

                          最后一?|址http://www.sudokuhints.com/
                          每天有五道传l数独题QŞ状一P但是隑ֺ却不一P适合不同阶段的玩?/font>

[ 本帖最后由 叶卡林娜 ?2008-7-4 10:50 ~辑 ]


子弹 2008-07-25 17:33 发表评论
]]>UML序列?/title><link>http://www.shnenglu.com/ztwaker/archive/2008/07/25/57129.html</link><dc:creator>子弹</dc:creator><author>子弹</author><pubDate>Fri, 25 Jul 2008 04:24:00 GMT</pubDate><guid>http://www.shnenglu.com/ztwaker/archive/2008/07/25/57129.html</guid><wfw:comment>http://www.shnenglu.com/ztwaker/comments/57129.html</wfw:comment><comments>http://www.shnenglu.com/ztwaker/archive/2008/07/25/57129.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.shnenglu.com/ztwaker/comments/commentRss/57129.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/ztwaker/services/trackbacks/57129.html</trackback:ping><description><![CDATA[<div id="17vhhzl" class=postTitle><a class=postTitle2 id=AjaxHolder_ctl01_TitleUrl href="http://www.cnblogs.com/WCFGROUP/archive/2008/07/04/1235980.html"><font color=#78afd3>UML 序列?/font></a> </div> 来自: IBM Rational Edge<!-- #EndEditable --> <table height=65 cellSpacing=0 cellPadding=0 width=760 align=center border=0> <tbody> <tr> <td class=content height=65><!-- #BeginEditable "3" --> <table class=content width="85%" align=center border=0> <tbody> <tr> <td class=content vAlign=top>  <table width="100%"> <tbody> <tr> <td width="30%"></td> </tr> </tbody> </table> <p><img height=261 alt=Illustration hspace=5 src="http://www.uml.org.cn/oobject/images/ill_3101.gif" width=261 border=0 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></p> <p>现在是二月,而且到如今你或许已经d、或听到Z谈论UML 2.0 —?包括若干q步?UML 的新规范Q所做的变化。考虑到新规范的重要性,我们也正在修改这个文章系列的基础Q把我们的注意力?OMG ?UML 1.4 规范Q{Ud OMG 的已采纳 UML 2.0草案规范Q又?UML 2Q。我不喜Ƣ在一pd文章的中_把重点从 1.4 变ؓ 2.0 Q但?UML 2.0 草案规范是前q的重要一步,我感觉需要扩充文字?/em></p> <p>׃一些理由,OMG 改良?UML 。主要的理由是,他们希望 UML 模型能够表达模型驱动架构QMDAQ,q意味着 UML 必须支持更多的模型驱动的W号。同Ӟ UML 1.x W号集合有时难以适用于较大的应用E序。此?Z要囑֏成更Ҏ阅读Q需要改良符号元件。(举例来说QUML 1.x 的模型逻辑程太复杂,有时不可能完成。对UML 2 中的序列囄W号集合的改变,已经在序列化逻辑建模斚w取得巨大的进??/em></p> <p>注意我上面所q的文字Q?#8220;已采UUML2.0草案规范?#8221;实Q规范仍然处于草案状态,但是关键是草案规范已l被 OMG 采用QOMG是一个直到新标准相当可靠Q才会采用它们的l织??UML 2 完全地被采用之前Q规范将会有一些修改,但是q些改变应该是极的。主要的改变会是在 UML 的内?—?包括通常被实?UML 工具的Y件公怋用的功能?/em></p> <p>本文的主要目的是l箋把我们的重点攑֜基础UML图上Q这个月Q我们进一步了解序列图。再ơ请注意Q下面提供的例子正是以新?UML 2 规范为基?/em></p> <p><a name=IDARCMUB><span id="7xhh7n3" class=atitle2>囄目的</span></a><br>序列图主要用于按照交互发生的一pd序Q显C对象之间的q些交互。很象类图,开发者一般认为序列图只对他们有意义。然而,一个组l的业务人员会发玎ͼ序列图显CZ同的业务对象如何交互Q对于交当前业务如何进行很有用。除记录l织的当前事件外Q一个业务的序列图能被当作一个需求文件用,为实C个未来系l传递需求。在目的需求阶D,分析师能通过提供一个更加正式层ơ的表达Q把用例带入下一层次。那U情况下Q用例常常被l化Z个或者更多的序列图?/p> <p>l织的技术h员能发现Q序列图在记录一个未来系l的行ؓ应该如何表现中,非常有用。在设计阶段Q架构师和开发者能使用图,挖掘出系l对象间的交互,q样充实整个pȝ设计?/p> <p>序列囄主要用途之一Q是把用例表辄需求,转化一步、更加正式层ơ的_表达。用例常常被l化Z个或者更多的序列图。序列图除了在设计新pȝ斚w的用途外Q它们还能用来记录一个存在系l(U它?#8220;遗”Q的对象现在如何交互。当把这个系l移交给另一个h或组l时Q这个文档很有用?/p> <p><a name=IDA1CMUB><span id="llvnphp" class=atitle2>W号</span></a><br>既然q是我基?UML 2?UML 囄列文章的W一,我们需要首先讨论对 UML 2 囄L一个补充,即一个叫做框架的W号元g。在 UML 2中,框架元g用于作ؓ许多其他的图元g的一个基Q但是大多数人第一ơ接触框架元件的情况Q是作ؓ囄囑Ş化边界。当为图提供囑Ş化边界时Q一个框架元件ؓ囄标签提供一致的位置。在 UML 图中框架元g是可选择的;如你能在图 1 ?2 中见到的Q图的标{被攑֜左上角,在我调用框架的“namebox”中,一U卷角长方ŞQ而且实际?UML 囑֜较大的封闭长方Ş内部定义?/p> <img height=222 alt="?1: I的 UML 2 框架元g" src="http://www.uml.org.cn/oobject/images/3101_figure1.jpg" width=385 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <p><a name=IDAIDMUB><span id="bxzj7vn" class=atitle3>?1: I的 UML 2 框架元g</span></a><br></p> <p>除了提供一个图形化Ҏ之外Q用于图中的框架元g也有描述交互的重要的功能, 例如序列图。在序列图上一个序列接收和发送消息(又称交互Q,能通过q接消息和框架元件边界,建立模型Q如?2 所见到Q。这会在后?#8220;越基础”的段落中被更详细Cl?/p> <p><img height=383 alt="?2: 一个接收和发送消息的序列? src="http://www.uml.org.cn/oobject/images/3101_figure2.jpg" width=650 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></p> <p><a name=IDAVDMUB><span id="dbbbddv" class=atitle3>?2: 一个接收和发送消息的序列?/span></a><br></p> <p>注意在图 2 中,对于序列图,囄标签由文?#8220;sd”开始。当使用一个框架元件封闭一个图Ӟ囄标签需要按照以下的格式:</p> <blockquote xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <table cellSpacing=0 cellPadding=5 width="100%" bgColor=#cccccc border=1> <tbody> <tr> <td> <pre><code>囄?囑֐U?/code></pre> </td> </tr> </tbody> </table> </blockquote> <p>UML 规范l图cd提供特定的文本倹{(举例来说Qsd代表序列图,activity代表zd图,use case代表用例图)?/p> <p><a name=IDADEMUB><span id="jzztj7d" class=atitle2>基础</span></a><br>序列囄主要目的是定义事件序列,产生一些希望的输出。重点不是消息本w,而是消息产生的顺序;不过Q大多数序列图会表示一个系l的对象之间传递的什么消息,以及它们发生的顺序。图按照水^和垂直的l度传递信息:垂直l度从上而下表示消息/调用发生的时间序列,而且水^l度从左到右表示消息发送到的对象实例?/p> <p><a name=IDALEMUB><span id="tprjbj3" class=atitle3>生命U?/span></a><br>当画一个序列图的时候,攄生命U符号元Ӟ横跨囄剙。生命线表示序列中,建模的角色或对象实例?a href="http://www.uml.org.cn/oobject/200503082.htm#notes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></a><sup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 1 </sup>生命U画作一个方|一条虚U从上而下Q通过底部边界的中心(?3Q。生命线名字攄在方格里?/p> <p><img height=209 alt="?3: 用于一个实体名为freshman的生命线的Studentcȝ一个例? src="http://www.uml.org.cn/oobject/images/3101_figure3.jpg" width=141 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></p> <p><a name=IDA4EMUB><span id="n3fhjhl" class=atitle3>?3: 用于一个实体名为freshman的生命线的Studentcȝ一个例?/span></a><br></p> <p>UML 的生命线命名标准按照如下格式:</p> <blockquote xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <table cellSpacing=0 cellPadding=5 width="100%" bgColor=#cccccc border=1> <tbody> <tr> <td> <pre><code>实体?: cd</code></pre> </td> </tr> </tbody> </table> </blockquote> <p>在如?所C的例子中,生命U表C类Student的实体,它的实体名称是freshman。这里注意一点,生命U名U带下划Uѝ当使用下划U时Q意味着序列图中的生命线代表一个类的特定实体,不是特定U类的实体(例如Q角Ԍ。在来的一文章中Q我们将会了解结构化建模。现在,仅仅评述序列图,可能包含角色Q例?em xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">买方</em>?em xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">卖方</em>Q,而不需要叙q谁扮演那些角色Q例?strong xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Bill</strong>?strong xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Fred</strong>Q。这准许不同语境的图重复使用。简单拖放,序列囄实例名称有下划线Q而角色名U没有?/p> <p>?3 中我们生命线例子是一个命名的对象Q但是不是所有的生命UK代表命名的对象。相反的Q一个生命线能用来表C个匿名的或未命名的实体。当在一个序列图上,Z个未命名的实例徏模时Q生命线的名字采用和一个命名实例相同的模式Q但是生命线名字的位|留下空白,而不是提供一个例囑֐字。再ơ参考图 3Q如果生命线正在表现Studentcȝ一个匿名例图,生命U会? “Student”。同? 因ؓ序列囑֜目设计阶段中用,有一个未指定的对象是完全合法: 举例来说Q?#8220;freshman”?/p> <p><a name=IDAWFMUB><span id="xdxpz93" class=atitle3>消息</span></a><br>Z可读性,序列囄W一个消息L从顶端开始,q且一般位于图的左辏V然后发的消息加入图中Q稍微比前面的消息低些?/p> <p>Z昄一个对象(例如Q生命线Q传递一个消息给另外一个对象,你画一条线指向接收对象Q包括一个实心箭_如果是一个同步调用操作)或一个棍形箭_如果是一个异步讯P。消?Ҏ名字攄在带头的线上面。正在被传递给接收对象的消息,表示接收对象的类实现的一个操?Ҏ。在?4 的例子中Qanalyst对象调用ReportingSystem cȝ一个实例的pȝ对象。analyst对象在调用系l对象的 getAvailableReports Ҏ。系l对象然后调用secSystem 对象上的、包括参数userId的getSecurityClearance ҎQsecSystem的类的类型是 SecuritySystem?a href="http://www.uml.org.cn/oobject/200503082.htm#notes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></a><sup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 2</sup></p> <p><img height=210 alt="?4: 一个在对象之间传递消息的实例" src="http://www.uml.org.cn/oobject/images/3101_figure4.jpg" width=650 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></p> <p><a name=IDAHGMUB><span id="pv71fhp" class=atitle3>?4: 一个在对象之间传递消息的实例</span></a><br></p> <p>除了仅仅昄序列图上的消息调用外Q图 4 中的图还包括q回消息。这些返回消息是可选择的;一个返回消息画作一个带开攄头的虚线Q向后指向来源的生命U,在这条虚U上面,你放|操作的q回倹{在?4 中,?getSecurityClearance Ҏ被调用时QsecSystem 对象q回 userClearance l系l对象。当 getAvailableReports Ҏ被调用时Q系l对象返?availableReports?/p> <p>此外Q返回消息是序列囄一个可选择部分。返回消息的使用依赖建模的具?抽象E度。如果需要较好的具体化,q回消息是有用的Q否则,d消息p够了。我个h喜欢Q无Z么时候返回一个|都包括一个返回消息,因ؓ我发现额外的l节使一个序列图变得更容易阅诅R?/p> <p>当序列图建模Ӟ有时候,一个对象将会需要传递一个消息给它本w。一个对象何时称它本w?一个纯化论者会争辩一个对象应该永不传递一个消息给它本w。然而,Z递一个消息给它本w的对象建模Q在一些情境中可能是有用的。D例来_?5 是图 4 的一个改良版本??5 版本昄调用它的 determineAvailableReports Ҏ的系l对象。通过表示pȝ传递消?#8220;determineAvailableReports”l它本nQ模型把注意力集中到q程的事实上Q而不是系l对象?/p> <p>Z要画一个调用本w的对象Q如你^时所作的Q画一条消息,但是不是q接它到另外的一个对象,而是你把消息q接回对象本w?/p> <p><img height=301 alt="?5: pȝ对象调用它的 determineAvailableReports Ҏ" src="http://www.uml.org.cn/oobject/images/3101_figure5.jpg" width=650 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></p> <p><a name=IDAXGMUB><span id="fdlnxfz" class=atitle3>?5: pȝ对象调用它的 determineAvailableReports Ҏ</span></a><br></p> <p>?5 中的消息实例昄同步消息Q然而,在序列图中,你也能ؓ异步消息建模。一个异步消息和一个同步的LcMQ但是消息画的线带一个棍形矛_如图 6 所C?/p> <p><img height=208 alt="?6: 表示传递到实体2的异步消息的序列囄D? src="http://www.uml.org.cn/oobject/images/3101_figure6.jpg" width=364 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></p> <p><a name=IDAGHMUB><span id="vzlnphh" class=atitle3>?6: 表示传递到实体2的异步消息的序列囄D?/span></a><br></p> <p><a name=IDAOHMUB><span id="bhzj7jl" class=atitle3>U束</span></a><br>当ؓ对象的交互徏模时Q有时候,必须满一个条Ӟ消息才会传递给对象。约束在 UML 囑֐处中Q用于控制流。在q里Q我会讨论UML 1.x 及UML 2.0两者的U束。在 UML 1.x 中,一个约束只可能被分配到一个单一消息。UML 1.x中,Z在一个序列图上画一个约束,你把U束元g攑֜U束的消息线上,消息名字之前。图 7 昄序列囄一个片D,消息addStudent Ҏ上有一个约束?/p> <p><img height=252 alt="?7:UML 1.x 序列囄一个片D,其中addStudent 消息有一个约? src="http://www.uml.org.cn/oobject/images/3101_figure7.jpg" width=614 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></p> <p><a name=IDA2HMUB><span id="3fprtj9" class=atitle3>?7:UML 1.x 序列囄一个片D,其中addStudent 消息有一个约?/span></a><br></p> <p>在图 7 中,U束是文?#8220;[ pastDueBalance=0]”。通过q个消息上的U束Q如果应收帐pȝq回一个零点的逾期qQaddStudent 消息才将会被传递。约束的W号很简单;格式?</p> <blockquote xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <table cellSpacing=0 cellPadding=5 width="100%" bgColor=#cccccc border=1> <tbody> <tr> <td> <pre><code>[Boolean Test]</code></pre> </td> </tr> </tbody> </table> </blockquote> <p>举例来说Q?/p> <blockquote xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <table cellSpacing=0 cellPadding=5 width="100%" bgColor=#cccccc border=1> <tbody> <tr> <td> <pre><code>[pastDueBalance = 0]</code></pre> </td> </tr> </tbody> </table> </blockquote> <p><a name=IDARYRUB><span id="rxfxprj" class=atitle3>l合片(变体ҎQ选择,和@?</span></a><br>然而,在大多数的序列图中,UML 1.x“in-line”U束不以处理一个徏模序列的必需逻辑。这个功能缺失是 UML 1.x 的一个问题。UML 2 已经通过L“in-line”U束Q增加一个叫做组合碎片的W号元gQ解决了q一个问题。一个组合碎片用来把一套消息组合在一P在一个序列图中显C条件分支。UML 2 规范指明了组合碎片的 11 U交互类型。十一U中的三U将会在“基础”D落中介l,另外两种cd会?#8220;越基础”中介l,而那剩余的六U我会留在另一文章中介绍。(嗨,q是一文章而不是一本书。我希望你在一天中看完q部分!Q?/p> <p><a name=IDAZYRUB><span id="hjd9l3t" class=atitle3>变体</span></a><br>变体用来指明在两个或更多的消息序列之间的、互斥的选择?a href="http://www.uml.org.cn/oobject/200503082.htm#notes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></a><sup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 3 </sup>变体支持l典?#8220;if then else”逻辑的徏模(举例来说Q?strong xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">如果</strong> 我买三个Q?strong xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">然后</strong> 我得?我购买的20% 折扣Q?strong xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">否则</strong> 我得到我购买?10% 折扣Q?/p> <p>如你将会在?8 中注意到的,一个变体的l合片元g使用框架来画。单?#8220;alt”攄在框架的namebox里。然后较大的长方形分?UML 2 所U的操作元?a href="http://www.uml.org.cn/oobject/200503082.htm#notes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></a><sup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 4 </sup>操作元被虚线分开。每个操作元有一个约束进行测试,而这个约束被攄在生命线端的操作元的左上部?a href="http://www.uml.org.cn/oobject/200503082.htm#notes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></a><sup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 5 </sup>如果操作元的U束{于“true”Q然后那个操作元是要执行的操作元?/p> <p><img height=766 alt="?8Q包含变体组合碎片的一个序列图片段" src="http://www.uml.org.cn/oobject/images/3101_figure8.jpg" width=507 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></p> <p><a name=IDA2ZRUB><span id="xxf3f3z" class=atitle3>?8Q包含变体组合碎片的一个序列图片段</span></a><br></p> <p>?8作ؓ一个变体的l合片如何阅读的例子,昄序列从顶部开始,即bank对象获取支票金额和帐L余。此Ӟ序列图中的变体组合碎片接。因为约?#8220;[balance >= amount]”Q如果余额超q或{于金额Q然后顺序进行bank对象传?addDebitTransaction ?storePhotoOfCheck 消息laccount对象。然而,如果余额不是过或等于金额,然后序的过E就是bank传递addInsuffientFundFee ?noteReturnedCheck 消息laccount对象QreturnCheck 消息l它自n。因?#8220;else”U束Q当余额不大于或者等于金额时Q第二个序列被调用。在变体的组合碎片中Q不需?#8220;else”U束Q而如果一个操作元Q在它上面没有一个明的U束Q那么将假定“else”U束?/p> 变体的组合碎片没被限制在单的“if then else”验证。可能需要大量的变体路径?如果需要较多的变体ҎQ你一定要做的全部工作是把一个操作元加入有序列约束和消息的长方Ş中? <p><a name=IDAG0RUB><span id="znpxpzh" class=atitle3>选择?/span></a><br>选择组合碎片用来ؓ序列建模Q这些序列给予一个特定条Ӟ会发生的;或者,序列不发生。一个选择用来ؓ单的“if then”表达式徏模。(例如Q如果架上的圈饼于五个Q那么另外做两打圈饼Q?/p> <p>选择组合碎片符号与变体l合片cMQ除了它只有一个操作元q且怸能有“else”U束以外Q它是如此Q没有理由)。要画选择组合,你画一个框架。文?#8220;opt”是被攄在框架的 namebox 里的文本Q在框架的内容区Q选择的U束被放|在生命UK端上的左上角?然后选择的消息序列被放在框架的内容区的其余位置内。这些元件如?9 所C?/p> <p><img height=527 alt="?9Q包括选择组合碎片的一个序列图片段" src="http://www.uml.org.cn/oobject/images/3101_figure9.jpg" width=626 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></p> <p><a name=IDAV0RUB><span id="ntvnppf" class=atitle3>?9Q包括选择组合碎片的一个序列图片段</span></a><br></p> <p>阅读选择组合碎片很Ҏ。图 9 是图 7 的序列图片段的再加工Q但是这ơ它使用一个选择组合碎片,因ؓ如果Student的逾期q{于0Q需要传递更多的消息。按照图 9 的序列图Q如果Student的逾期q{于Ӟ然后传递addStudentQgetCostOfClass和chargeForClass消息。如果Student的逾期q不等于零Q那么在选择组合碎片中Q序列不传递Q何一个消息?/p> <p>例子?9的序列图片段包括一个选择约束;然而,U束不是一个必需的元件。在高层ơ、抽象的序列图中Q你可能不想叙述选择的条g。你可能只是惌指出片段是可选择的?/p> <p><a name=IDA50RUB><span id="zp9nhhh" class=atitle3>循环</span></a><br>有时候你会需要ؓ一个重复的序列建模。在 UML 2 中,Z个重复的序列建模已经改良Q附加了循环l合片?/p> <p>循环l合片表面非常cM选择组合碎片。你M个框Ӟ在框架的 namebox 中放|文?#8220;loop”。在框架的内容区中,一个生命线的顶部,循环U束<a href="http://www.uml.org.cn/oobject/200503082.htm#notes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></a><sup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 6 </sup>被放|在左上角。然后@环的消息序列被放在框架内容区的其余部分中。在一个@环中Q除了标准的布尔试外,一个约束能试二个特定的条件式。特定的U束条g式是写作“minint = [the number]”Q例如,“minint = 1”Q的最@环次敎ͼ和写?#8220;maxint = [the number]”Q例如,“maxint = 5”Q的最大@环次数。通过最@环检验,循环必须q行臛_指定ơ数Q而@环执行次C能达到约束指定的最大@环次数?/p> <p><img height=452 alt="?10Q@环组合碎片的一个序列图例子" src="http://www.uml.org.cn/oobject/images/3101_figure10_small.jpg" width=650 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></p> <p><a name=IDAR1RUB><span id="hjdvxh3" class=atitle3>?10Q@环组合碎片的一个序列图例子 Q单L大)</span></a><br></p> <p>在图 10 中显C的循环q行Q直?reportsEnu 对象?hasAnotherReport 消息q回false。如果@环序列应该运行,q个序列囄循环使用一个布测试确认。ؓ了阅读这个图Q你和^怸P从顶部开始。当你到辑@环组合碎片,做一个测试,看看?hasAnotherReport 是否{于true。如?hasAnotherReport 值等于trueQ于是序列进入@环片断。然后你能和正常情况一P在序列图中跟t@环的消息?/p> <p><a name=IDAA2RUB><span id="pfv3vff" class=atitle2>越基础</span></a><br></p> 我已l介l了序列囄基础Q应该你可以ؓ会在系l中通常发生的大部䆾交互建模。下面段落将会介l用于序列图的比较高阶的W号元g? <p><a name=IDAI2RUB><span id="vtbdbvt" class=atitle3>引用另外一个序列图</span></a><br>当做序列囄时候,开发者爱在他们的序列图中Q重用存在的序列图?a href="http://www.uml.org.cn/oobject/200503082.htm#notes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></a><sup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 7 </sup>?UML 2 中开始,引进“交互q行”元g。追加交互进行的可以说是 UML 2 交互建模中的最重要的创新。交互进行增加了功能Q把原始的序列图l织成ؓ复杂的序列图。由于这些,你能l合Q重用)较简单的序列Q生成比较复杂的序列。这意味你能把完整的、可能比较复杂的序列Q抽象ؓ一个单一的概念单位?/p> <p>一个交互进行元件用一个框架绘制。文?#8220;ref”攄在框架的 namebox 中,引用的序列图名字攄在框架的内容区里Q连同序列图的Q何参C赗引用序列图的名字符号如下模?</p> <blockquote xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <table cellSpacing=0 cellPadding=5 width="100%" bgColor=#cccccc border=1> <tbody> <tr> <td> <pre><code>序列囑֐[(参数)] [: q回值]</code></pre> </td> </tr> </tbody> </table> </blockquote> <p>两个例子:</p> <blockquote xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">1. <code>Retrieve Borrower Credit Report(ssn) : borrowerCreditReport</code> </blockquote> <p>或?/p> <blockquote xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">2. <code>Process Credit Card(name, number, expirationDate, amount : 100)</code> </blockquote> <p>在例?1 中,语法调用叫做Retrieve Borrower Credit Report的序列图Q传递给它参?ssn。序列Retreive Borrower Credit Reportq回变量 borrowerCreditReport ?/p> <p>在实?2 中,语法调用叫做Process Credit Card的序列图Q传递给它参数nameQnumberQexpiration dateQ和 amount。然而,在例?2 中,amount参数会是?00。因Z?没有q回值标{,序列不返回|假设Q徏模的序列不需要返回|?/p> <p><img height=458 alt="?11: 一个引用两个不同序列图的序列图" src="http://www.uml.org.cn/oobject/images/3101_figure11.jpg" width=650 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></p> <p><a name=IDAM3RUB><span id="xvnztjt" class=atitle3>?11: 一个引用两个不同序列图的序列图</span></a><br></p> <p>?11 昄一个序列图Q它引用了序列图“Balance Lookup”?#8220;Debit Account”。序列从左上角开始,客户传递一个消息给teller对象。teller对象传递一个消息给 theirBank 对象。那Ӟ调用Balance Lookup序列图,?accountNumber作ؓ一个参C递。Balance Lookup序列图返回balance变量。然后检验选择组合碎片的U束条gQ确认余额大于金额变量。在余额比金额更大的情况下,调用Debit Account序列图,l它传递参数accountNumber 和amount。在那个序列完成后,withdrawCash 消息为客戯回cash?/p> <p>重要的是Q注意在?11 中,theirBank 的生命线被交互进行Balance Lookup隐藏了。因Z互进行隐藏生命线Q意味着theirBank 生命U在“Balance Lookup”序列图中被引用。除了隐藏交互进行的生命U之外,UML 2 也指明,生命U在它自q“Balance Lookup”序列中,一定有相同?theirBank ?/p> <p>有时候,你ؓ一个序列图建模Q其中交互进行会重叠<em xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">没有</em> 在交互进行中引用的生命线。在那种情况下,生命U和正常的生命线一hC,不会被重叠的交互q行隐藏?/p> <p>在图 11 中,序列引用“Balance Lookup”序列图?#8220;Balance Lookup”序列囑֜?12 中显C。因Z子序列有参数和一个返回|它的标签 —?位于囄 namebox ?—?按照一个特定模?</p> <blockquote xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <table cellSpacing=0 cellPadding=5 width="100%" bgColor=#cccccc border=1> <tbody> <tr> <td> <pre><code>囄?囑֐ [参数cd:参数名]</code></pre> </td> </tr> </tbody> </table> </blockquote> <blockquote xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <table cellSpacing=0 cellPadding=5 width="100%" bgColor=#cccccc border=1> <tbody> <tr> <td> <pre><code>[: q回值类型]</code></pre> </td> </tr> </tbody> </table> </blockquote> <p>两个例子:</p> <blockquote xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">1. <code>SD Balance Lookup(Integer : accountNumber) : Real</code> </blockquote> <p>?/p> <blockquote xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">2. <code>SD Available Reports(Financial Analyst : analyst) : Reports</code> </blockquote> <p>?12 举例说明例子 1Q在里面QBalance Lookup序列把参?accountNumber 作ؓ序列中的变量使用Q序列图昄q回的Real对象。在cMq种情况下,q回的对象采用序列图实体名?/p> <p><img height=325 alt="?12: 一个?accountNumber 参数q返回一个Real对象的序列图" src="http://www.uml.org.cn/oobject/images/3101_figure12.jpg" width=650 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></p> <p><a name=IDAU4RUB><span id="r735zrh" class=atitle3>?12: 一个?accountNumber 参数q返回一个Real对象的序列图</span></a><br></p> <p>?13 举例说明例子 2Q在里面Q一个序列图获取一个参敎ͼq回一个对象。然而,在图 13 中参数在序列的交互中使用?/p> <p><img height=543 alt="?13: 一个在它的交互中用参数、返回一个Reports对象的序列图" src="http://www.uml.org.cn/oobject/images/3101_figure13.jpg" width=650 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></p> <p><a name=IDAB5RUB><span id="jnphjbb" class=atitle3>?13: 一个在它的交互中用参数、返回一个Reports对象的序列图</span></a><br></p> <p><a name=IDAJ5RUB><span id="l7ddddf" class=atitle3>?/span></a><br>前面的段落展C如何通过参数和返回g递信息,引用另一个序列图。然而,有另一个方法在序列图之间传递消息。门可能是一个容易的ҎQؓ在序列图和它的上下文之间的传递消息徏模。一个门只是一个消息,囑Ş表示Z端连接序列图的框架边~,另一端连接到生命Uѝ用门的图 11 ?12 Q在?14 ?15 中可以被看到重构。图 15 的例图有一个叫做getBalance的入口门Q获取参?accountNumber。因为是头的线q接到图的框Ӟ而箭头连接到生命U,所?getBalance 消息是一个入口门。序列图也有一个出囗门Q返回balance变量。出口门同理可知Q因为它是一个返回消息,q接从一个生命线到图的框Ӟ头q接框架?/p> <p><img height=296 alt="?14: ?11 的重构,q次使用? src="http://www.uml.org.cn/oobject/images/3101_figure14.jpg" width=650 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></p> <p><a name=IDAV5RUB><span id="3fzh9fv" class=atitle3>?14: ?11 的重构,q次使用?/span></a><br></p> <p><img height=391 alt="?15: ?12 的重构,q次使用? src="http://www.uml.org.cn/oobject/images/3101_figure15.jpg" width=650 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></p> <p><a name=IDAEASUB><span id="nt3xzhp" class=atitle3>?15: ?12 的重构,q次使用?/span></a><br></p> <p><a name=IDAMASUB><span id="vdn7nb7" class=atitle3>l合片Q蟩转和q行Q?/span></a><br>在本文前?#8220;基础”的段落中呈现的,我介l了“变体”Q?#8220;选择?#8221;Q和“循环”的组合碎片。这些三个组合碎片是大多Ch会使用最多的。然而,有二个其他的l合片Q大量共享的人将会发现有用——蟩转和q行?/p> <p><a name=IDAUASUB><span id="3jztddl" class=atitle3>跌{</span></a><br>跌{l合片几乎在每个方面都和选择组合碎片一_除了两个例外。首先,跌{的框架namebox的文?#8220;break”代替?#8220;option”。其? 当一个蟩转组合碎片的消息q行Ӟ闭的交互作用的其他消息不会执行,因ؓ序列打破了封闭的交互。这P跌{l合片非常?C++ ?Java 的编E语a中的break关键字?/p> <p><img height=750 alt="?16: 来自?8 的序列图片段的重构,片段使用跌{代替变体" src="http://www.uml.org.cn/oobject/images/3101_figure16.jpg" width=650 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></p> <p><a name=IDAABSUB><span id="zpzrdld" class=atitle3>?16: 来自?8 的序列图片段的重构,片段使用跌{代替变体</span></a><br></p> <p>跌{最常用来做模型异常处理。图 16 是图 8 的重构,但是q次?6使用跌{l合片Q因为它把balance < amount的情况作Z个异常对待,而不是一个变体流。要阅读?16Q你从序列的左上角开始,向下诅R当序列到达q回?#8220;balance”的时候,它检查看看是否余额比金额更少。如果余额不于金额Q被传递的下一个消息是 addDebitTransaction 消息Q而且序列正常l箋。然而,在余额比金额更少的情况下Q然后序列进入蟩转组合碎片,它的消息被传递。一旦蟩转组合的消息的已l被传递,序列不发送Q何其它消息就退出(举例来说QaddDebitTransactionQ?/p> <p>注意有关跌{的一仉要的事是Q它们只引v一个封闭交互的序列退出,不必完成图中描述的序列。在q种情况下,跌{l合是变体或者@环的一部分Q然后只是变体或循环被退出?/p> <p><a name=IDAKBSUB><span id="ln3ddln" class=atitle3>q行</span></a><br>今天的现代计机pȝ在复杂性和有时执行q发d斚w不断q步。当完成一个复杂Q务需要的处理旉比希望的长的时候,一些系l采用ƈ行处理进E的各部分。当创造一个序列图Q显Cƈ行处理活动的时候,需要用ƈ行组合碎片元件?/p> <p>q行l合片使用一个框架来画,你把文本“par”攑֜框架?namebox 中。然后你把框架的内容D는虚线分ؓ水^操作元。框架的每个操作元表CZ个在q行q行的线E?/p> <p><img height=446 alt="?17: oven 是ƈ行做两个d的对象实? src="http://www.uml.org.cn/oobject/images/3101_figure17.jpg" width=613 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></p> <p><a name=IDAXBSUB><span id="vvfn9nn" class=atitle3>?17: oven 是ƈ行做两个d的对象实?/span></a><br></p> <p>?17 可能没有举例说明做ƈ行活动的对象的最好的计算机系l实例,不过提供了一个容易理解的q行zd序列的例子。序列如q样q行QhungryPerson 传?cookFood 消息loven 对象。当oven 对象接收那个消息Ӟ它同时发送两个消息(nukeFood ?rotateFoodQ给它本w。这些消息都处理后,hungryPerson 对象从oven 对象q回 yummyFood ?/p> <p><a name=IDAACSUB><span id="fhzj9rz" class=atitle2>ȝ</span></a><br>序列图是一个用来记录系l需求,和整理系l设计的好图。序列图是如此好用的理由是,因ؓ它按照交互发生的旉序Q显CZpȝ中对象间的交互逻辑?/p> <p><a name=IDAICSUB><span id="ff3x79f" class=atitle2>参?/span></a><br></p> <ul xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <li>UML 2.0 Superstructure Final Adopted Specification (W?章部? http://www.omg.org/cgi-bin/doc?ptc/2003-08-02 <li>UML 2 Sequence Diagram Overview http://www.agilemodeling.com/artifacts/sequenceDiagram.htm <li>UML 2 Tutorial http://www.omg.org/news/meetings/workshops/UML%202003%20Manual/Tutorial7-Hogg.pdf </li> </ul> <a name=notes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></a> <p><a name=IDAEDSUB><span id="pnphhjj" class=atitle2>脚注</span></a><br>1 在完全徏模系l中Q对象(cȝ实例Q也会在系l的cd中徏模?/p> <p>2 当阅读这个序列图Ӟ假定分析师登录进入系l之内?/p> <p>3 h意,附着在不同的变体操作元上的、两个或更多的约束条件式的确可能同时是真Q但是实际最多只有一个操作元会在运行时发生Q那U情况下变体?#8220;wins”没有按照 UML 标准定义)?/p> <p>4 虽然操作元看h非常象公路上的小路,但是我特别不叫它们小路。泳道是在活动图上用的 UML W号。请参?em xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">The Rational Edge</em> 早期关于 zd囄文章?/p> <p>5 通常Q附上约束的生命U是拥有包含在约束表辑ּ中的变量的生命线?/p> <p>6 关于选择组合碎片,循环l合片不需要在它上攄一个约束条件?/p> <p>7 可能重用Mcd的序列图QD例来_E序或业务)。我只是发现开发者更喜欢按功能分解他们的图?/p> <p><a name=resources><span id="rp3txxh" class=atitle2>参考资?/span></a> <ul> <li>您可以参阅本文在 developerWorks 全球站点上的 <a href="http://www.ibm.com/developerworks/rational/library/3101.html" target=_blank xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><u><font color=#78afd3>英文原文</font></u></a>?br></li> </ul> <p> </p> <table cellSpacing=0 cellPadding=0 width="100%" border=0> <tbody> <tr> <td><a name=author1></a><span id="d3bbdjd" class=content>关于作?br><img height=80 alt="Donald Bell" src="http://www.uml.org.cn/oobject/images/donaldBell.jpg" width=64 align=left border=0 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Donald Bell是IBM全球服务的一个IT专家Q在那儿他和IBM的客户一赯力于设计和开发基于Y件解x案的J2EE?/span></td> </tr> </tbody> </table> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <img src ="http://www.shnenglu.com/ztwaker/aggbug/57129.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/ztwaker/" target="_blank">子弹</a> 2008-07-25 12:24 <a href="http://www.shnenglu.com/ztwaker/archive/2008/07/25/57129.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>好书列表[ZT]http://www.shnenglu.com/ztwaker/archive/2008/07/21/56761.html子弹子弹Mon, 21 Jul 2008 06:56:00 GMThttp://www.shnenglu.com/ztwaker/archive/2008/07/21/56761.htmlhttp://www.shnenglu.com/ztwaker/comments/56761.htmlhttp://www.shnenglu.com/ztwaker/archive/2008/07/21/56761.html#Feedback0http://www.shnenglu.com/ztwaker/comments/commentRss/56761.htmlhttp://www.shnenglu.com/ztwaker/services/trackbacks/56761.html以下内容来自Q?a href="http://www.umlchina.com/book/book.htm">http://www.umlchina.com/book/book.htm

*以下是现在这个时候首选阅ȝ国内出版书籍Q这些书已经qUMLChina专家购买阅读之后才会郑重推荐Q选择仅代表UMLChina观点?br>*本列表会不定时更斎ͼ每次更新都会向列表里增加一些新书,也删M些老书Q被删去的原因可能是随时间的淘汰Q也可能是我们对q些书有了新的认识?/p>

《修改代码的艺术?/a>QMichael Feathers 著, 刘未?译,人民邮电出版C,2007?/font>
《UML嵌入式设计?/a>Q高焕堂 著, UMLChina改编Q清华大学出版社Q?008?/font>
《Head First 设计模式?/a>QEric Freeman, Elisabeth Freeman, Kathy Ierra, Bert Bates 著, O'Reilly台湾 译,UMLChina改编Q中国电力出版社Q?007?br> 《掌握需求过E?W???/a>QSuzanne Robertson/James Robertson 著, 王v?译,人民邮电出版C,2007?/font>
《Y件工E实践者的研究Ҏ原书W?版?/a>QRoger S. Pressman 著,郑h?马素?白晓?译,机械工业出版C,2006?br> 《重构与模式?/a>QJOSHUA KEREVSKY 著,杨光/刘基?译,人民邮电出版C,2006?br> 《设计模式初学者指南?/a>QAllen Holub 著,徐迎?译,机械工业出版C,2006?br> 《程序开发原?-抽象、规g面向对象设计?/a>QBarbara Liskov, John Guttag 著,裘健 译,电子工业出版C,2006?br> 《设计模式解析(W?版)?/a>QAlan Shalloway, James R.Trott 著,徐言?译,人民邮电出版C,2006?br> 《Visual Basic设计模式?/a>QMark Grand, Brad Merrill 著,杨环英、周锐博 译,人民邮电出版C,2006?br> 《UML用户指南Q第2版)?/a>QGrady Booch,James Rumbaugh,Ivar Jacobson 著,늻?d?马浩?刘辉 译,人民邮电出版C,2006?br> 《UML2.0和统一q程Q原书第2版) ?/a>QJim Arlow,Ila Neustadt 著,方贵?胡辉?译,机械工业出版C,2006?br> 《MDA与可执行UML?/a>QChris Raistrick,Paul Francis,John Wright 著,机械工业出版C,2006?br> 《对象设计?/a>QRebecca Wirfs-Brock, Alan McKean 著,人民邮电出版C,2006?br> 《面向对象分析与设计QUML 2.0版)?/a>QMike O'Docherty 著,俞志?译,清华大学出版C,2006?/font>
《程序设计的模式语言-??/a>QJohn M.Vlissides, James O.Coplien, Norman L.Kerth 著,Ҏ?周毅 译,清华大学出版C,2006?br> 《领域驱动设计?/a>QEric Evans 著,陈大峰、张泽鑫 译,清华大学出版C,2006?br> 《UML面向对象建模与设计(W?版)?/strong>QMichael Blaha, James Rumbaugh 著,人民邮电出版C,2006?br> 《统一q程最佛_늧交和产品化阶Dc?/strong>QScott W.Ambler 著,机械工业出版C,2005?br> 《敏h据?/strong>QScott W.Ambler 著,机械工业出版C,2005?br> 《过E模式(上册Q?/strong>QScott W.Ambler 著,人民邮电出版C,2005?br> 《面向模式的软g体系l构Q卷3?/strong>QMichael Kircher, Prashant Jain 著,机械工业出版C,2005?br> 《Enterprise Java with UML 中文版?/strong>QC.T.Arrington、Syed H.Rayhan 著,机械工业出版C,2005?br> 《^衡敏捷与规范?/strong>QBarry Boehm、Richard Turner 著,清华大学出版C,2005?br> 《UML参考手?Q第2版)?/strong>QJames Rumbaugh、Ivar Jacobson、Grady Booch 著,机械工业出版C,2005?br> 《The Object Primer中文版?/strong>QScott W.Ambler 著,机械工业出版C,2005?br> 《C#设计模式?/strong>QSteve John Metsker 著,中国电力出版C,2005?br> 《重构极限编E—XP的实践与反思?/strong>QMatt Stephens、Doug Rosenberg 著,清华大学出版C,2005?br> 《Clouds to Code 中文版?/strong>QJesse Liberty 著,徐峰 译,电子工业出版C,2005?br> 《对象模型:{略、模式与应用》(W?版)QPeter Coad 著,U学出版C,2005?br> 《用例驱动UML对象建模应用——范例分析?/strong>QDoug Rosenberg、Kendall Scott 著,人民邮电出版C,2005?br> 《DSDM业务中心框架开发方法(W二版)?/strong>QDSDM Consortium、Jennifer Stapleton 著,人民邮电出版C,2005?br> 《UML_a——标准对象徏模语a明指南》(W?版)QMartin Fowler 著,徐家?译,清华大学出版C,2005?br> 《Y件开发问题框Ӟ现实世界问题的结构化分析?/strong>QMichael Jackson 著,机械工业出版C,2005?br> 《UML对象、组件和框架——CatalysisҎ?/strong>QDesmond Francis D’Souza、Alan Cameron Wills 著,清华大学出版C,2004?br> 《UML 2工具?/strong>QHans-Erik Eriksson 著,电子工业出版C,2004?br> 《Y仉求》(W?版)QKarl E.Wiegers 著,清华大学出版C,2004?br> 《程序设计的模式语言-??/strong>QNeil Harrison、Brian Foote、Hans Rohnert 著,清华大学出版C,2004?br> 《程序设计的模式语言-??/strong>QRobert Martin、Dirk Riehle、Frank Buschmann 著,清华大学出版C,2005?br> 《超传l的软g开发——极限编E的q象与真实?/strong>Q雷剑文 陈振?李明?著,电子工业出版C,2005?/font>
《Contributing to Eclipse中文?/strong>》,Erich Gamma、Kent Beck 著,中国电力出版C,2005?br> 《数据模型资源手册(?Q》(修订版)QLen Silverston 著,机械工业出版C,2004?/font>
《OOD启思录?/strong>QArthur J.Riel 著,人民邮电出版C,2004?br> 《探索需求——设计前的质量?/strong>QDonald C. Gause, Gerald M. Weinberg 著,清华大学出版C,2004?br> 《OMT应用?/strong>QKurt W.Derr 著,清华大学出版C,2004?br> 《企业应用架构模式?/strong>QMartin Fowler 著,机械工业出版C,2004?br> 《数据徏模:分析与设计的工具和技术?/strong>QSteve Hoberman 著,机械工业出版C,2004?br> 《UML基础、案例和应用》(W?版)QJoseph Schmuller 著,李虎 译,人民邮电出版C,2004?br> 《用UML设计q发、分布式、实时应用?/strong>QHassan Gomaa 著,北京航空航天大学出版C,2004?br> 《面向模式分析和设计——通过模式合成来进行Y件系l的设计》(影印版)QSherif Yacoub, Hany Ammar 著,中国电力出版C,2004?br> 《UML风格?/strong>QScott W. Ambler 著,王少?译,清华大学出版C,2004?br> 《Y仉求管理:用例Ҏ》(W?版)QDean Leffingwell, Don Widrig 著,蒋慧 译,中国电力出版C,2004?/font>
《UML业务建模?/strong>QHans-Erik Eriksson, Magnus Penker 著,夏昕、何克清 译,机械工业出版C,2004?br> 《解析MDA?/strong>QAnneke Kleppe,Jos Warmer,Wim Bast 著,鲍志?译,人民邮电出版C,2004?br> 《生式~程——方法、工具与应用?/strong>QKrzysztof Czarnecki,Ulrich W.Eisenecker 著,梁v?译,中国电力出版C,2004?br> 《C++|络~程 ?Q运用ACE和模式消除复杂性?/strong>QDouglas C.Schmidt,Stephen D.Huston 著,於春?译,华中U技大学出版C,2003?br> 《分析模式:可复用的对象模型?/strong>QMartin Fowler 著,樊东q?张\ 译,机械工业出版C,2004?br> 《敏捯Y件开发?/strong>QAlistair Cockburn 著,俞涓 译,人民邮电出版C,2003?br> 《实时UML——开发嵌入式pȝ高效对象?/strong>QBruce Powel Douglass 著,Ҏ?译,中国电力出版C,2003?br> 《用UML构徏Web应用》(W?版)QJim Conallen 著,陈v 译,中国电力出版C,2003?br> 《应用MDA?/strong>QDavid S.Frankel 著,鲍志?译,人民邮电出版C,2003?/font>
《h本界面:交互式系l设计?/strong>QJef Raskin 著,史元?译,机械工业出版C,2003?br> 《面向模式的软g体系l构 ?Q用于ƈ发和|络化对象的模式?/strong>QDouglas Schmidt 著,张志?译,机械工业出版C,2003?br> 《面向对象分析与设计Q原书第2版)?/strong>QGrady Booch 著,冯博?译,机械工业出版C,2003?br> 《敏捯Y件开发:原则、模式与实践?/strong>QRobert C. Martin 著,邓辉 译,清华大学出版C,2003?br> 《VS.NET UML建模高~程——应用Visio for Enterprise Architects?/strong>QAndrew Filev 著,冯丽 译,清华大学出版C,2003?br> 《面向对象Y件设计经典?/strong>QRebecca Wirfs-Brock 著,张金?译,电子工业出版C,2003?br> 《有效用例模式?/strong>QSteve Adolph, Paul Bramble 著,车立U?译,清华大学出版C,2003。UMLChina训练教材?br> 《用例徏模?/strong>QKurt Bittner 著,姜昊 译,清华大学出版C,2003?br> 《面向对象方法原理与实践》(W?版)QIan Graham 著,袁兆?译,机械工业出版C,2003。对象技术知识大全?br> 《统一软g开发过E之路?/strong>QIvar Jacobson 著,E宾 朱鹏 张嘉?译,机械工业出版C,2003。其实是Ivar Jacobson?0q代的文集?/font>
《面向对象Y件构造(W?版)》(影印版)QBertrand MeyerQ机械工业出版社Q?003?/font>
《Y件复用:l构、过E和l织?/strong>QIvar Jacobson 著,韩柯 译,机械工业出版C,2003?/font>
《面向模式的软g体系l构 ?Q模式系l?/strong>QFrank Buschmann {?著,贲可?译,机械工业出版C,2003?br> 《编写有效用例?/strong>QAlistair Cockburn 著,王雷、张?译,机械工业出版C,2002?/font>
《面向对象的软g试?/strong>QJohn D.McGregor David A.sykes 著,杨文?译,机械工业出版C,2002?/font>
《UML with Rational Rose 2002 从入门到_N?/strong>Q电子工业出版社Q?002。用来学习工h作,书中Ҏ不可学?

《统一软g开发过E?/strong>QIvar JacobsonQJames RumbaughQGrady Booch 著,周伯?译,机械工业出版C,2002q?月?br> 《UML面向对象设计基础?/strong>QMeilir Page-Jones著,包晓露等译,人民邮电出版C,2001q?月第1版?
《Oracle 8 UML对象建模设计?/strong>Q机械工业出版社Q?000q?月。很实用?br> 《设计模?可复用面向对象Y件的基础?/strong>QErich Gamma{?著,李英?译,机械工业出版C,2000
《面向对象的分析?/strong>Q?#8220;面向对象的设?#8221;Q两本小册子QPeter CoadQEdward Yourdon著,늻忠等译,北大出版C,原书1991q写。国内第一本关于面向对象分析和设计的书?
《实用面向对象Y件工E教E?/strong>QEdward Yourdon, Carl Argila著,电子工业出版C,原书1995q?2月写?
《面向对象的pȝ分析?/strong>Q邵l忠Q杨芙清Q清华大学,q西U技出版Q?998q?2月第一版?

以下是UMLChina 参与制作的一些书c?
 

软g工程

2002q《h月神话》创下销售记?br>2003q《最后期限》、《h件》、《h月神话》分别排在china-pubq度总销售榜????/p>

 

 

需?/font>

 

 

设计



子弹 2008-07-21 14:56 发表评论
]]>
C++ Tips[ZT]http://www.shnenglu.com/ztwaker/archive/2008/07/18/56479.html子弹子弹Fri, 18 Jul 2008 01:17:00 GMThttp://www.shnenglu.com/ztwaker/archive/2008/07/18/56479.htmlhttp://www.shnenglu.com/ztwaker/comments/56479.htmlhttp://www.shnenglu.com/ztwaker/archive/2008/07/18/56479.html#Feedback0http://www.shnenglu.com/ztwaker/comments/commentRss/56479.htmlhttp://www.shnenglu.com/ztwaker/services/trackbacks/56479.html C++ Tips
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
      <noscript id="pjuwb"></noscript>
            <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
              <dd id="pjuwb"></dd>
              <abbr id="pjuwb"></abbr>
                                C++ Tips
                                Sections
                          Intro
                          I.   ABCs and Inheritance
                          II.  Scope
                          III. CLASSES
                          IV.  MISC
                          V.   OVERLOADING
                          VI.  PARAMETERS
                          VII. Constructors (more on classes)
                          VIII.EXCEPTIONS
                          IX.  TEMPLATES (more on classes)
              
              Intro
              This is not a code guideline document. See the C++ Style Guide for guidelines.
              This is more of a document to fuel questions while you design and code
              with C++. In some cases the point is simply stated and probably comes
              off as a rule. In reality, they are simply meant as rules of thumb.
              One of the main problems in C++ (more so than C) is that C++ provides
              many mechanisms in the language by which the same task can be achieved
              through different policies.  For example, C++ has the Polymorphism mechanism.
              Some of the policies are templates, macros, inheritance, overloading,
              (those are the static, compile-time ones), and virtual functions (the
              run-time polymorphic policy).  Hopefully the following will provide 
              enough fuel for questions to arrive at the best policy to use for a 
              particular design.
              
              I. ABCs and Inheritance
              -----------------------
              1. Abstract Base Class (ABC) : Make ABC class constructor protected when
                    possible. Derived classes can have public constructor to override
                    this.  The same is true for non-ABC classes as well.
              2. Class Inheritance : Use protected keyword where ever possible, never use
                    public to expose data members so the inheriting classes have access
                    to them.
              3. Multiple Inheritance and VBC's :The only drawback is the most derived
                    class must initialize the lowest base classes. This breaks
                    encapsulation.  Most people view multiple inheritance as a bad
                    thing, but when used sparingly for parts of a design, there is
                    no problem with it.
              4. Data in classes should be keep private as much as possible.  Use a
                    member function if a client needs to access the data.  If a member
                    function does not need to be seen by a client, make it private.
                    If the class might be inherited, then protected may be a good choice.
              5. Private inheritance: Don't use it.  Too many ambiguities when used with
                    run-time type identification.  Use a private data member instead
                    or use public inheritance.
                    Example:      class Foo: private Bar { ... }      dont do
              
              6. Inheritance & virtual overrides: Care must be taken in overriding
                    inherited functions. Sometimes functions are grouped together,
                    and all need to be overridden. The base class designer must make
                    this clear, if overriding one function requires multiple 
                    functions to be overridden.
              7. Inheritance & Get/Set functions: Typically functions that perform
                    Get/Set shouldn't be overridden unless they are used by
                    the derived class. Otherwise if the base class does direct
                    field manipulation, you usually can't override it correctly,
                    or it could be a maintenance nightmare.
                    Note: Get/Set functions as referred to above are merely meant as
                    abstractions. As a rule of thumb (thumb must be getting pretty
                    big by now), one should not create functions called Get or Set,
                    or flavors thereof. They tend to break the spirit of encapsulation.
                    Of course, there will be times to use them.
              
              II. SCOPE
              ---------
              1. Law of Demeter : Do not make references to classes in a class that are
                    not variables of the class, inherited by the class, or global.
                    This also applies to including header files.
                    Example:
                          class Foo{public: Go(){} };
                          class Bar{ Foo aFoo;  public:       Foo GetFoo(){return aFoo;} };
                          class Fubar{ public:
                                      void Bad(){  Bar aBar;  aBar.GetFoo().Go(); }
                          };
                    The method Bad() breaks encapsulation. It calls a method of a class
                    it probably does not need to know about.  This will also affect 
                    maintainability. If the Foo class changes, the changes may also 
                    need to be done in the Fubar class.  
                    The other side of the coin that must be looked at is do you
                    want a pass-through method in the Bar class that simply
                    calls the Go() method of the Foo class.  Lots of silly simple
                    1 line member functions may not be desirable in all the classes.
                    What probably needs to be looked at to decide what road to take
                    is speed, or perhaps redesign the classes.
                    Beyond the Law of Demeter is Doug's rule of thumb: Don't
                    play hide and seek with data.
              2. Scope: Another way to say the previous point is to keep scope
                    small. This will increase the lifetime of the code and keep it
                    maintainable and safe.
              III. CLASSES
              ------------
              1. Be explicit about the keywords, public, protected, and private in a class
                    interface. Try not to have multiple sections. In other words, 
                    multiple private sections in the class interface.  It is generally
                    a good idea to place the public section first because this is 
                    what most people are looking for when they go to use a class.
              2. Make classes as atomic as possible. Give them a clear purpose. Break
                    them into smaller classes if they become too complex. This may
                    also eliminate duplicate code.
              3. Don't let the compiler generate the default constructor,destructor,
                    operator= and copy constructor.  If the class is entirely value
                    based, this is probably fine, if not, for example, if the class
                    has a data member that is a pointer, the above will probably not
                    work.  Note, the default copy constructor only does a memcpy
                    of the class, so all you copy is the pointer data. This may not
                    be sufficient for copying a class.  Regardless, if you do want the
                    default ones, place them in the code, and leave them commented.
                    For example:
                          // Fubar(const Fubar&)   use default copy constructor
              4. If your class contains pointers, you should create the default constructor
                    destructor, operator=, and copy constructor.
              5. Class Copy: If the class should never be copied, then place the copy
                    constructor in the private section and don't implement it.
                    The linker will catch this, and the program will fail to build.
                    This, although not graceful, is better than a malformed program.
              6. Initialization: Perform all data member initialization in the constructor.
                    It's best not to leave uninitialized objects running around in 
                    the system.  Note, it is often more efficient using the
                    constructor initializer list, otherwise, the default constructor
                    would be called, and then you probably call member functions of
                    the object later in the constructor.  For example:
                    class Foo{ Bar mung;  Foo(int iCount) : mung(iCount) {}  ... };
                    The variable mung is initialized once. But in the following:
                    class Foo{ Bar mung;  Foo(int iCount){ mung = iCount; }  ... };
                    mung's default constructor is called before the body of the
                    class Foo's constructor is entered. Then mung is set again -
                    this assumes that mung has an assignment operator. The net
                    effect is that mung is initialized twice.
              7. Class Naming:  There exists several ways to name classes that seem to
                    work well for certain groups or people.  There is Hungarian notation
                    and the "Taligent's Guide to Designing Programs" that document some
                    of the more typical methods.
              
              IV. MISC
              --------
              1. Implicit int:  The 'implicit int' rule will go away in the next 
                    C++ standard. So for a proto like:  'main()'  you will have to 
                    say 'int main()' in the future. Same for variables.
              2. Preprocessor: Avoid it.  Use const values in the class, or inline
                    functions instead of macros.  This is not to say, never use any
                    #defines.
                    Main reason:      #define MIN(a,b)      ( (aSomeFunction(); }
              
              V. OVERLOADING
              --------------
              1. operator overloading:  It's syntactic sugar. Don't add them if they
                    are not needed.  This does NOT refer to the typical ones like
                    '=', '==', but ones like '()', '[]', '+'.  It does not always 
                    make sense to add two objects together.
              
              2. Overloading:  If a member function is conditionally executing code, 
                    it may be a candidate for operator overloading, or just overloading.
              3. Operator overloading and chaining: When designing an overloaded
                    operator, think about whether it needs to be chained. For example:
                          String cstr = "a" + "b" + "c";
                    The String class's operator returns a reference to the String class.
                    A partial implementation might be:
                    
                    class String{ public:
                    String& operator+(const char *pcBuf){ 
                                // code to add the char* to the string
                                return *this;
                    }
                          ...
                    };
              
              VI. PARAMETERS
              --------------
              1. Argument Passing:  The first choice is typically a const ref.  The 
                    const ref is basically an alias, and is easier to use than a 
                    pointer.  It creates the same amount of instruction code as passing
                    a pointer (for most cases). It's typically better than passing
                    by value, where an object constructor will be called (if its an
                    object).  As a rule of thumb, you might want too give the following
                    a whirl:
                          IN      const &
                          OUT      &            If the object has the support functs
                          INOUT      *&            Acts like a **.
                    So for an IN parameter, what the 'const &' says, is here is a 
                    reference to it, but you cannot modify the object. But you can
                    call member functions that do not change the object ( member
                    functions defined as const).  The OUT parameter is a parameter
                    that is passed to a function that will modify it.  If the parameter
                    needs to be created, then the INOUT parameter of *& may be a
                    good choice.
              2. Returning Ref:  In functions that return a reference, remember not to
                    reference a temporary object and return it.  For example:
                          String &Zippo(void){ ....  return String();
                    What happens, is that the String() is a temporary object that
                    upon return goes out of scope and is destroyed.  Thus, you
                    return a reference to a destroyed object. Unfortunately, the
                    program will probably work in most cases till it's shipped.
                    The ol' Heisenbug!
              3. Ref vs Pointer: Here's another way to look at when to use references,
                    and when should to use pointers.
                    C programmers sometimes don't like references since the
                    reference semantics they provide isn't *explicit* in the caller's
                    code. After a bit of C++ experience, however, one quickly realizes
                    this "information hiding" is an asset rather than a liability. In
                    particular, reuse-centered OOP tends to migrate the level of
                    abstraction away from the language of the machine toward the
                    language of the problem.  References are usually preferred over
                    ptrs whenever you don't need "re-seating". This usually means that
                    references are most useful in a class' public interface. References
                    then typically appear on the skin of an object, and pointers on the
                    inside. The exception to the above is where a function's parameter
                    or return value needs a "sentinel" reference. This is usually best
                    done by returning/taking a pointer, and giving the nil ptr (0) this
                    special significance (references should always alias *objects*, not
                    a dereferenced nil ptr).
              
              VII. Constructors (more on classes)
              -----------------------------------
              1. Creating Constructors: These creatures should be simple. Try not to
                    do anything in them that may generate errors.  Remember they
                    don't have return values. If it's necessary to allocate
                    memory or other complex things in the constructor, throw an exception
                    if possible as the first recourse. Else, the class will have to be
                    protected everywhere that may use something that may be in error.
                    It's generally not a pretty sight to see an error returned in the
                    constructor's signature.
              2. Constructors: Another reason to keep them simple is in the case
                    of inheritance.
              3. Destructors:  It's responsibility is to release resources allocated 
                    during the class's lifetime, not just from construction.
              4. Member Initialization List: The constructor can have a comma separated
                    member initialization list. If a class contains value based classes
                    as data members, they can be initialized in the constructor. For
                    example:
                    class Foo{
                          String cstr1;      // value based class called String
                          String cstr2;      // value based class called String
                    public:
                          Foo(const char* pcStr1, const char*pcStr2):
                                cstr1(pcStr1), cstr2(pcStr2){}
                    };
                    With the variables cstr1, and cstr2 initialized in the constructor,
                    they are initialized only once. Else, if they were initialized in 
                    the body of the constructor, they would first be initialized with
                    a default constructor, then again in the body.
                    
              VIII. EXCEPTIONS
              ----------------
              1. Exceptions: Use exception hierarchies, possibly even derived from the
                    Standard C++ ones.
              2. Exceptions: Throw exceptions by value and catch them by reference.
                    This way the exception handling mechanism cleans up anything
                    created on the heap. If you throw exceptions by pointer, the
                    catcher must know how to destroy them.  This is probably not
                    a good coupling.  Even so, any up casting may slice and dice the
                    object.
              
              IX. TEMPLATES (more on classes)
              -------------------------------
              1. Templates:  Before creating new ones, see if they are in RogueWave,
                    or part of the C++ Standard.
              2. Templates:  When creating them, try to filter out any code that
                    does not depend on the type, and place that into a base class.
                    Thus, the template class itself is only the necessary information
                    that depends on type. Good examples can be found in RogueWave.
              


              Douglas J. Waters
              (best reached on the internet)
              Internet: waters@openmarket.com
              Phone: (781) 359-7220 ҹӰþ| ݺɫþ| aѹۿþav | ŷպþAV| þþƷվ| Ʒպþ| ۺϾþþþۺ| 97þþþƷۺ88þ| ˾ƷۺϾþþ| ˾þô߽ۺվ| 99ƷۺϾþþþ| 99þ99þþƷѿ | ޺ݺݾþۺһ77777| þþƷ7777| ݺɫۺվþþþþþø| þþþƷsmվ| þþþֻоƷ | þù¶ƷӰ| 99þóĻ| ޹˾Ʒ91þþ| þþƵ| þùֱ| þþþ޾ƷĻ| þþþ99ƷƬֱ| Ļ˾þ| 91ƷۺϾþþƷ| þҹɫƷa | þþþAVƬ | ɫþþþþþС˵ | þþþAV| ҹƷþþþþ| ޹Ʒþþþ | 91޹˾þþƷ| һɫþ99һۺ| þۺϺݺۺϾþ97ɫ| 99þó18վ| 99þ99þþþƷ| þAvԴվ | þþƷԴվ| 77777ҹþö| AV˾þԭ|

              子弹 2008-07-18 09:17 发表评论
              ]]>[轉]C++E序设计最佛_?/title><link>http://www.shnenglu.com/ztwaker/archive/2008/07/16/56317.html</link><dc:creator>子弹</dc:creator><author>子弹</author><pubDate>Wed, 16 Jul 2008 09:12:00 GMT</pubDate><guid>http://www.shnenglu.com/ztwaker/archive/2008/07/16/56317.html</guid><wfw:comment>http://www.shnenglu.com/ztwaker/comments/56317.html</wfw:comment><comments>http://www.shnenglu.com/ztwaker/archive/2008/07/16/56317.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/ztwaker/comments/commentRss/56317.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/ztwaker/services/trackbacks/56317.html</trackback:ping><description><![CDATA[<div id="tzrzttd" class=tit>[轉]C++E序设计最佛_?/div> <div id="xbv7fzh" class=date>2007q?4?3?星期一 00:57</div> <table style="TABLE-LAYOUT: fixed"> <tbody> <tr> <td> <div id="zpblllf" class=cnt id=blog_text> <p><span id="hh3ppzh" class=large><font color=#000000>  随着计算a的发展,我们现在~写一个程序越来越Ҏ了。利用一些Y件开发工P往往只要通过鼠标的拖拖点点,计算机就会自动帮你生成许多代码。但在很多时候,计算机的q种能力被滥用了Q我们往往只考虑把这个程序搭hQ而不去考虑E序的性能如何Q程序是否够的健壮。而此节课的目的主要是介绍一些编码的l验Q让大家~写的程序更加健壮和高性能?br><br>  1、Prefer const and inline to #define <br><br>  在C++~程中应该尽量用const和inline来代?defineQ尽量做到能不用#define׃用?define常见的用途有“定义帔R”以及“定义?#8221;Q但其中存在诸多的弊病?<br><br>  W一Q查错不直观Q不利于调试。Define的定义是由预处理E序处理的,作的是完全的文本替换Q不做Q何的cd查。在~译器处理阶D,define定义的东西已l被完全替换了,q样在debug的时候就看不CQ何的相关信息Q即跟踪时不能step into宏。例如,把ASPECT_RATIO用define定义?.653Q编译器q不到ASPECT_RATIOq个名字了。如果编译器?.653错,那么无从知道此1.653来自于何处。在真正~码的时候应该用如下的语句来定义:<br><br><br>static const double ASPECT_RATIO = 1.653;<br><br>  W二Q没有Q何类型信息,不是type safe。因为它是文本别的替换Q这样不利于E序的维护?br><br>  W三Qdefine的用很Ҏ造成污染。比如,如果有两个头文g都定义了ASPECT_RATIO, 而一个CPP文g又同时包含了q两个头文gQ那么就会造成冲突。更难查的是另外一U错误,比如有如下的代码Q?br>  // in header file def.h<br>  #define Apple 1<br>  #define Orange 2<br>    #define Pineapple 3 <br>   …<br>  // in some cpp file that includes the def.h<br>  enum Colors {White, Black, Purple, Orange};<br><br>  ?h文g中Orange被定义成水果的一U,而在.cpp文g中Orange又成Z一U颜Ԍ那么~译器就会把此处的Orange替换?Q编译可能仍然可以通过Q程序也能够q行Q但是这成了一个bugQ表现出古怪的错误Q且很难查错。再比如定义了一个求a与b哪个数大的宏Q?define max(a,b) ((a) > (b) ? (a) : (b))<br>  int a = 5, b = 0; <br>  max(++ a, b); <br>  max(++ a, b + 10);<br><br>  在上面的操作中,max(++ a, b); 语句中a?+了两ơ,而max(++ a, b + 10); 语句中a只加了一ơ,q样在程序处理中很有可能成Z个bugQ且此bug也非常的难找。在实际~码时可以用如下的语句来做Q?br>  template<class></class> <br>  inline const T& <br>  max(const T& a, const T& b) { return a > b ? a : b; }<br><br>  2、Prefer C++-style casts <br><br>  在程序中l常会需要把一U类型{换成另外一U类型,在C++中应该用static_cast、const_cast、dynamic_cast、reinterpret_cast关键字来做类型{换。因有以下好处,一是其本n是一U注释,在代码中看到上面q些关键字就可马上知道此处是q行cd转换。二是C语言中类型{换通常是很难进行搜索的Q而通过关键字cast则可以很Ҏ的找到程序中出现cd转换的地方了?br><br>  3、Distinguish between prefix and postfix forms of increment and decrement operators <br><br>  通常对于操作pȝ或编译器自n支持的类型,prefixQ前~Q如++iQ与postfixQ后~Q如i++Q的效果是一L。因为现在的~译器都很聪明,它会自动做优化,q两者的汇编代码是一LQ性能不会有差别。但有时候也会有不同的,如一些重载了操作W的cd。下面是模拟prefix与postfix的操作过E,可以发现在postfix操作中会生成一个时变量,而这一临时变量是会占用额外的时间和开销的?br>  // prefix form: increment and fetch<br>  UPInt& UPInt::operator++() <br>   { <br>    *this += 1; // increment <br>   return *this; // fetch <br>   } <br>  // postfix form: fetch and increment <br>   const UPInt UPInt::operator++(int) <br>   {<br>    UPInt oldValue = *this; // fetch<br>   ++(*this); // increment <br>    return oldValue; // return what was fetched<br>   }<br><br>  一般情况下不需要区分是?+Q还是后++Q但是我们在~写E序的时候最好能习惯性的其写成++i的Ş式,如在使用STL中的iteratorӞprefix与postfix会有相当大的性能差异。请不要看q些l节Q实际在~写E序的时候,若不注意具体l节Q你会发现程序的性能会非常的低。但要注意,虽然在大多数情况下可以用prefix来代替postfixQ但有一U情况例外,那就是有[]操作W时Q比如gzArray [++index] 是不{于 gzArray[index++]的?/font></span></p> <p><span id="nppjttn" class=large>4、Minimizing Compile-time Dependencies <br><br>  有些人在~写E序Ӟ往往喜欢一?h文g包含到另一?h文gQ而实践证明在做大型Y件时q是一个非怸好的习惯Q因q样会造成很多依赖的问题,包含较多?h文gQ别人又使用了这个classQ而在他的那个工程中可能ƈ不存在这?h文gQ这样很可能q译不能通过。而且q样做,q可能造成很难LC个模块的情况。因Z?h文g被很多模块包含的话,如果修改了此.h文gQ在~译pȝ的时候,~译器会d扑֓些模块依赖于某个被修改过?h文gQ那么就D了所有包含入?h文g的模块全都要q行重新~译。在目比较的时候,大家可能q感觉不到差别,但是如果说是在大型的软gpȝ里,你可能编译一遍源码需要七、八个小时。如果你q个.h文g被很多模块包含的话,q?h文g中加了一行注释,在编译时~译器检查哪些文件被改动Q那么所有包含入?h文g的模块都会被重新~译Q造成巨大的时间和_֊负担。对于此问题Q解决的Ҏ是?h文g自包含,也就是说让它包含量的东西。所谓尽量少是指如删掉Q何一个它包含q来?h文gQ都无法正常进行工作。其实在很多情况下,q不需要一?h文gd含另一?h文gQ完全可以通过class声明来解决依赖关pȝq种问题。再来看下面q个例子Q?br>  #include "a.h" // class A<br>  #include "b.h" // class B<br>  #include "c.h" // class C<br>  #include "d.h" // class D<br>  #include "e.h" // class E<br>  class X : public A, private B<br>  {<br>   public:<br>  E SomeFunctionCall(E someParameter); <br>   private:<br>   D m_dInstance;<br>  };<br><br>  当类X从类A和类B中派生时Q需要知道X在内存中都有哪些dataQ通常在内存中前面是基cȝdataQ后面紧跟的是此zc自w定义的dataQ因此就必须知道cA与类B的内部细节,要不然编译器无法来安排内存了。但是在处理参数以及参数q回值的时候,实际上ƈ不需要知道这些信息,在此处定义的SomeFunctionCall()只需知道E是个classp够了Qƈ不需要知道类E中的data如长度等的具体细节。上面的代码应该改写成如下的形式Q以减少依赖关系Q?br>  #include "a.h" // class A<br>  #include "b.h" // class B<br>  #include "c.h" // class C<br>  #include "d.h" // class D<br>  class E;<br>  class X : public A, private B<br>  {<br>   public:<br>  E SomeFunctionCall(E someParameter); <br>   private:<br>  D m_dInstance;<br>  }; <br><br>  5、Never treat arrays polymorphically <br><br>  不要把数l和多态一起用,L下面的例子?br>  class BST { ... }; <br>  class BalancedBST: public BST { ... }; <br>  void printBSTArray(ostream& s, const BST array[], int numElements) <br>  { <br>  for (int i = 0; i < numElements; ++i) <br>  { <br>   s << array[i]; <br>  // this assumes an operator<< is defined for BST<br>  } <br>  }<br><br>  BalancedBST bBSTArray[10]; <br>  printBSTArray(cout, bBSTArray, 10); <br><br>  数组在内存中是一个连l的内存I间Q而在数组中应该如何来定位一个元素呢Q过E是q样的,~译器可以知道每个数据类型的长度大小Q如果数l的index?Q则会自动去取第一个元素;如果是指定了某个indexQ编译器则会Ҏ此index与该数据cd的长度自动去出该元素的位置?br><br>  在printBSTArray()函数中,管传入的参数是BalancedBSTcdQ但׃其本来定义的cd是BSTQ那么它依然会根据BST来计类型的长度。而通常zcd例所占的内存要比基类实例所占的内存大一些,因此该程序在~译时会报错。请CQ永q不要把数组和C++的多态性放在一起用?br><br>  6、Prevent exceptions from leaving destructors <br><br>  析构函数中一定不要抛出异常。通常有两U情况会D析构函数的调用,一U是当该cȝ对象d了它的域Q或delete表达式中一个该cd象的指针Q另一U是׃异常而引h构函数的调用?br><br>  如果析构函数被调用是׃exception引vQ而此时在析构函数中又抛出了异常,E序会立卌pȝl止Q甚至都来不及进行内存释放。因此如果在析构函数中抛出异常的话,很Ҏh引v异常的原因,且这L软g也会让用户非常恼火。由于析构函C很可能会调用其它的一些函敎ͼ所以在写析构函数的时候一定要注意Q对q些函数是否会抛出异常要非常清楚Q如果会的话Q就一定要心了。比如下面这D代码:<br>  Session::~Session() <br>  { <br>  logDestruction(this);<br>  } <br><br>  比如logDestruction()函数可能会抛出异常,那么我们应该采用下面这U代码的形式Q?<br>  Session::~Session() <br>  { <br>   try <br>  {<br>   logDestruction(this); <br>   }<br>   catch (...) <br>  { <br>   } <br> } <br><br>  q样E序出错的时候不会被立即xQ可以给用户一些其它的选择Q至先让他把目前在做的工作保存下来?br><br>  7、Optimization:Remember the 80-20 rule <br><br>  在Y件界有一?0-80法则Q其实这是一个很有趣的现象,比如一个程序中20%的代码用了该程序所占资源的80%Q一个程序中20%的代码占用了总运行时间的80%Q一个程序中20%的代码用了该程序所占内存的80%Q在20%的代码上面需要花?0%的维护力量,{等。这个规律还可以被l推q下去,不过q个规律无法被证明,它是Z在实践中观察得出的结果。从q个规律出发Q我们在做程序优化的时候,有了针Ҏ。比如想提高代码的运行速度Q根据这个规律可以知道其?0%的代码占用了80%的运行时_因此我们只要扑ֈq?0%的代码,q进行相应的优化Q那么我们程序的q行速度可以有较大的提高。再如有一个函敎ͼ占用了程?0%的运行时_如果把这个函数的执行速度提高10倍,那么对程序整体性能的提高,影响是非常巨大的。如果有一个函数运行时间只占L间的1%Q那q把这个函数的q行速度提高1000倍,对程序整体性能的提高也是媄响不大的。所以我们的基本思想是扑ֈ占用q行旉最大的那个函数Q然后去优化它,哪怕只是改q了一点点Q程序的整体性能也可以被提高很多?br><br>  要想扑և?0%的代码,我们的方法就是用ProfilerQ它实际上是一些公司所开发的工具Q可以检查程序中各个模块所分配内存的用情况,以及每个函数所q行的时间等。常见的Profiler有Intel公司开发的VTuneQ微软公司开发的Visual Studio profilerQDevPartner from Compuware{?</span></p> </div> </td> </tr> </tbody> </table> <img src ="http://www.shnenglu.com/ztwaker/aggbug/56317.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/ztwaker/" target="_blank">子弹</a> 2008-07-16 17:12 <a href="http://www.shnenglu.com/ztwaker/archive/2008/07/16/56317.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>德鲁克的著作列表http://www.shnenglu.com/ztwaker/archive/2008/07/14/56087.html子弹子弹Mon, 14 Jul 2008 04:44:00 GMThttp://www.shnenglu.com/ztwaker/archive/2008/07/14/56087.htmlhttp://www.shnenglu.com/ztwaker/comments/56087.htmlhttp://www.shnenglu.com/ztwaker/archive/2008/07/14/56087.html#Feedback0http://www.shnenglu.com/ztwaker/comments/commentRss/56087.htmlhttp://www.shnenglu.com/ztwaker/services/trackbacks/56087.html1.  《经h的末日》(The End of Economic Man Q? 1939
              2.  《工业h的未来》(The Future of Industrial ManQ?- 1942
              3.  《公司的概念》(Concept of the CorporationQ?- 1946
              4.  《新C会》(The New SocietyQ?- 1950
              5.  《个人推荐首扚w诅R《管理实c(The Practice of ManagementQ?- 1954
              6.  《美国的下一?0q》(America's Next Twenty YearsQ?- 1957
              7.  《明日的里程》(Landmarks of TomorrowQ?- 1957
              8.  《成果管理》(Managing for Results Q? 1964
              9.  《个人推荐首扚w诅R《卓有成效的理者》(The Effective ExecutiveQ?- 1966
              10. 《断层时代》(The Age of DiscontinuityQ?- 1968
              11. 《技术、管理与C会》(TechnologyQ?Management and SocietyQ?- 1970
              12. 《h、思想与社会》(MenQ?Ideas and PoliticsQ?- 1971
              13. 《个人推荐首扚w诅R《管理:d、责仅R实c(Management: TasksQ?ResponsibilitiesQ?PracticesQ?- 1973
              14. 《看不见的革命》(The Unseen RevolutionQ?- 1976 (1996q以《退休基金革命》(The Pension Fund RevolutionQ重?
              15. 《h与W效:德鲁克论理_֍》(People and Performance: The Best of Peter Drucker on Management Q? 1977
              16. 《管理导论》(An Introductory View of ManagementQ?- 1977
              17. 《旁观者》(Adventures of a BystanderQ?- 1978
              18. 《毛W之歌:日本l画》(Song of the Brush: Japanese Painting from the Sanso CollectionQ?- 1979
              19. 《动荡时代中的管理》(Managing in Turbulent TimesQ?- 1980
              20. 《迈向经新U元及其他论文》(Toward the Next Economics and Other EssaysQ?- 1981
              21. 《变动中的管理界》(The Changing World of the ExecutiveQ?- 1982
              22. 《最后可能出现的世界》(说QThe Last of All Possible WorldsQ?- 1982
              23. 《行善的诱惑》(说QThe Temptation to Do Good Q? 1984
              24. 《创C企业家精》(Innovation and EntrepreneurshipQ?- 1985
              25. 《管理的前沿》(Frontiers of Management: Where Tomorrow's Decisions are Being Shaped TodayQ?- 1986
              26. 《新现实Q政府与政治、经与企业、社会与世界》(The New Realities: in Government and PoliticsQ?in Economics and BusinessQ?in Society and World ViewQ?- 1989
              27. 《非营利l织的管理:原理与实c(Managing the Nonprofit Organization: Principles and PracticesQ?- 1990
              28. 《ؓ了未来-20世纪90q代及其以后的年代-而管理?“Mananing for the Future:The 1990's and Beyond” - 1992
              29. 《生态远景》(The Ecological VisionQ?- 1993
              30. 《后资本MC会》(Post-Capitalist SocietyQ?- 1993
              31. 《巨变时代的理》(Managing in a Time of Great ChangeQ?- 1995
              32. 《d鲁克看亚zԌ德鲁克与中内的对话》(Drucker on Asia: A Dialogue between Peter Drucker and Isao NakauchiQ?-1997
              33. 《d鲁克论管理》(Peter Drucker on the Profession of ManagementQ?- 1998
              34. ?1世纪的管理挑战》(Management Challenges for the 21st Century Q? 1999
              35. 《d鲁克_֍》(The Essential DruckerQ?- 2001
              36. 《下一个社会的理》(Managing in the Next SocietyQ?- 2002
              37. 《功能社会》(A Functioning Society Q? 2002
              38. 《个人推荐首扚w诅R《d鲁克日志》(The Daily DruckerQ?- 2004
              39. 《卓有成效管理者的实践?QThe Effective Executive in ActionQ?2006


              子弹 2008-07-14 12:44 发表评论
              ]]>
              Software qualityhttp://www.shnenglu.com/ztwaker/archive/2008/06/17/53703.html子弹子弹Tue, 17 Jun 2008 07:06:00 GMThttp://www.shnenglu.com/ztwaker/archive/2008/06/17/53703.htmlhttp://www.shnenglu.com/ztwaker/comments/53703.htmlhttp://www.shnenglu.com/ztwaker/archive/2008/06/17/53703.html#Feedback0http://www.shnenglu.com/ztwaker/comments/commentRss/53703.htmlhttp://www.shnenglu.com/ztwaker/services/trackbacks/53703.html阅读全文

              子弹 2008-06-17 15:06 发表评论
              ]]>
              杰拉d·温伯|Gerald M. WeinbergQ?/title><link>http://www.shnenglu.com/ztwaker/archive/2008/06/17/53698.html</link><dc:creator>子弹</dc:creator><author>子弹</author><pubDate>Tue, 17 Jun 2008 06:08:00 GMT</pubDate><guid>http://www.shnenglu.com/ztwaker/archive/2008/06/17/53698.html</guid><wfw:comment>http://www.shnenglu.com/ztwaker/comments/53698.html</wfw:comment><comments>http://www.shnenglu.com/ztwaker/archive/2008/06/17/53698.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/ztwaker/comments/commentRss/53698.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/ztwaker/services/trackbacks/53698.html</trackback:ping><description><![CDATA[<center> <table cellSpacing=0 cellPadding=0 width=770 border=0> <tbody> <tr> <td width=200 height=71><img height=71 src="http://www.weinbergcn.com/images/book101.jpg" width=200></td> <td width=200><img height=71 src="http://www.weinbergcn.com/images/book102.jpg" width=200></td> <td width=200><img height=71 src="http://www.weinbergcn.com/images/book103.jpg" width=200></td> <td width=170><img height=71 src="http://www.weinbergcn.com/images/book104.jpg" width=170></td> </tr> <tr> <td colSpan=2 height=36><img height=36 src="http://www.weinbergcn.com/images/book201.jpg" width=400></td> <td vAlign=bottom background=images/book202.jpg colSpan=2> <table cellSpacing=0 cellPadding=0 border=0> <tbody> <tr> <td width=199 height=18><br></td> <td width=79><a ><img height=13 src="http://www.weinbergcn.com/images/book203.gif" width=26 border=0></a></td> <td width=94><a ><img height=13 src="http://www.weinbergcn.com/images/book204.gif" width=26 border=0></a></td> <td width=60><a target=_blank><img height=13 src="http://www.weinbergcn.com/images/book207.gif" width=39 border=0></a></td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=770 border=0> <tbody> <tr> <td bgColor=#a7dff7 height=18></td> </tr> </tbody> </table> <!----------------> <table cellSpacing=0 cellPadding=0 width=770 border=0> <tbody> <tr> <td align=middle bgColor=#a7dff7><!----------建立你自q温伯格图书馆------------> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td vAlign=top width=14 background=images/book602.gif height=24><img height=3 src="http://www.weinbergcn.com/images/book601.gif" width=3 border=0></td> <td style="FONT-WEIGHT: bold; COLOR: #ffffff" width=200 background=images/book602.gif><strong>建立你自q温伯格图书馆</strong></td> <td width=8><img height=24 src="http://www.weinbergcn.com/images/book603.gif" width=8 border=0></td> <td width=409 background=images/book604.gif><br></td> </tr> </tbody> </table> <!----------------------> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td height=10></td> </tr> </tbody> </table> <table cellSpacing=1 cellPadding=5 width=631 bgColor=#000000 border=0> <tbody> <tr> <td style="LINE-HEIGHT: 18px" bgColor=#a7dff7><br>    9月,清华大学出版CN重推Z《Y件与pȝ思想家温伯格_a译丛》首批共6U。该丛书?4U,均出自美国计机界的泰斗人物杰拉d·温伯|Gerald M. WeinbergQ?<br><br>    温伯格首要的贡献集中于Y仉域,他是从个体心理、组l行为和企业文化角度研究软g理和Y件工E的权威和代表h物。在过40q的软g职业生中,温伯g事过软g开发,软g目理、Y件管理教学和咨询Q他更是一位杰出的软g专业作者和思想家?997q_温伯格因其在软g领域的杰A献,被美国计机博物馆的计算机名人堂选ؓ首批5位成员之一。这个名人堂至今只有20名成员。ؓ中国读者所熟悉的比?#183;盖茨和迈克尔·戴尔也是在温伯格之后Ҏ获得q一计算机界至高无上的殊荣?<br><br>    温伯格精力旺盛、思想z跃Q从20世纪70q代开始,他d撰写?0多本书籍和数以百计的论文。这些著作主要集中在两个主题Qh与技术的l合Qh的思维模式、思维习惯以及解决问题的方法。温伯格的大部分作品已经被翻译成10多种语言发行到法国、d国、西班牙、葡萄牙、荷兰、俄|斯、日本等多个国家Q?0余年畅销不衰。在西方国家乃至全世界,温伯格拥有大量忠实的读者群Q这?q星?阅读了温伯格的每本重要著作,他们甚至有专门的l织和网站,讨论和交大师的重要思想。可以说Q温伯格q年来的每本C都是在万众瞩目中推出的?<br><br>    成熟的Y件业是理实践和信息技术结合的产业。而Y件管理思想的引q,比技术和资金更ؓ紧迫和重要。在西方国家图书市场上,软g理图书非常多。浪里淘沙之中,温伯格的著作正是西方软g理思想发展和集大成的中砥柱?<br><br>            --国计算机名人堂代表人物温伯格的思想_֍ <br>            --微Y亚洲研究院院长兼首席U学家张亚勤强力推荐 <br>            --12U语a的版本发行全世界Q?0余年畅销不衰 <br>            --提倡h与技术相l合、引导系l化思维模式 <br></td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td height=10></td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td vAlign=top width=168><a target=_blank><img class=img height=150 src="http://www.weinbergcn.com/cover/xinli.gif" width=100 border=0></a></td> <td vAlign=top width=463> <table cellSpacing=0 cellPadding=0 width=400 border=0> <tbody> <tr> <td class=title onmouseover='isdiv("div0",1)' onmouseout='isdiv("div0",0)' height=20>E序开发心理学Q银q纪늉Q?/td> </tr> <tr> <td> <div class="f39hpnp" id=div0 style="VISIBILITY: hidden; POSITION: absolute"> <table cellSpacing=1 cellPadding=5 width=600 bgColor=#000000 border=0> <tbody> <tr> <td style="LINE-HEIGHT: 18px" bgColor=#fbfde6>√ "q是有史以来计算机编E领域的最l典的一部著作?--Datamation <br>√ "一本杰作的新生Q?#8230;…1971q_当《程序开发心理学》首ơ面世时Q我们都如雷轰?-从未有h提出软g开发可以被看作是一Uhcȝzd。经历多q_该书成ؓ全球畅销?#8230;…不管你是属于上世U?0q代?0q代那一代,q是属于80q代?0q代的新一代,你要感谢你自己去拿vq样一本奇妙的书。一旦你M它,你应该接着q读Weinberg所有其他的书,每一本都是一颗宝矟?--Ed Yourdon, Cutter IT Journal <br>√ "《程序开发心理学?#8230;…是第一本强调计机~程是个人和团队共同努力q程的图书,q且成ؓ了这个领域的l典图书……管本书写作旉用的?971q的视角Q但?0多年后的今天Q这本书q是所有Y件开发经理们的必ȝ典?--J.J.HirschfelderQComputing Reviews <br>√ "Gerald M. Weinberg是我的良师益友,我的同行Q也是我们这个职业(软g开发)造就的最好的思想家和作?#8230;…《程序开发心理学》一书写成于1969q_1971q出版,自此被不断重华ͼ光印记录是M其他计算图书都未能比及的。大多数书中?关于人的内容'比其中的技术更l得住时间的考验?--Sue Petersen在Visual Developer MagazineQMarch/April, 1999Q的评论 <br>√ "Gerald M. Weinberg的《程序开发心理学?是我最喜爱的一本关于Y件开发的书?#8230;…书中的有?无私软g开?的观?#8230;…带动了开放源码思想崛v。好的Y件工E思想要比具体的技术更l久不衰。就q一点而言Q没有一本书提供的思想可以与《程序开发心理学》中的思想相比?--Steve McConnelQIEEEȝQIEEE Software (Jan/Feb, 1999) <br>√ "Gerald M. Weinberg的经怹作《程序开发心理学》媄响了我的一?#8230;…因ؓ他认识到了一个随着旉推移变得越来越重要的问题:x和培育程序员和程序员队伍?#8230;…和Fredrick Brooks的《h月神话》一PWeinberg的《程序开发心理学》同h一本经久不衰的l典之作?--Michael SchrageQMIT Media LabQ?No More Teams!"一书的作者,摘自Computerworld <br>√ "《程序开发心理学》(银年U念版)?971q该书第一ơ出版后的修订本。这本书如何q能适合今天Z的口呛_Q答案很单:人ƈ没有真正改变?#8230;…Weinberg在全书提供了无数强有力的l历旉考验的见识,q些见识q去是正的Q现在也仍然正确的?#8230;…如果你在q本书中看不C些你自己Q你׃是一名计机专业人员。买一本,读读它,然后把它留在你的l理的椅子上。相信你们俩都将受益匪浅?--B. Scott AndersenQSilver anniversary edition hits gold, Amazon.com (Feb 27, 2001) <br>√ "Weinberg在银q纪늉的每一章结֤都做了评注,q恪守了他在前言里的承诺Q?我决不会L盖自q错误--因ؓ也许正是通过q些错误Q我的读者才会获得更大的收获?……有时侯,老书是最好的Q尤其是在对其做了修订、对当初的大胆预a和贤明徏议做了评仗?--Johanna Rothman </td> </tr> </tbody> </table> </div> </td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=463 border=0> <tbody> <tr> <td class=title1 height=20><strong>QThe Psychology of Computer Programming : Silver Anniversary EditionQ?/strong></td> </tr> <tr> <td class=title2 height=30>9月出版,敬请xQ?nbsp;        ISBN: 7-302-07026-1</td> </tr> <tr> <td class=title3>    在计机界,q没有Q何一本计机斚w的书Q在初次出版之后Q能够在长达25q的岁月中一直保持活力——而且q种zdC天仍在l。《程序开发心理学》是开?#8220;以h为本”研究Ҏ的先驱,它以其对E序员们在智力、技巧、团队和问题求解能力{方面独特的视角和敏锐的观察l受住了旉的考验?</td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td height=10></td> </tr> <tr> <td background=images/book605.gif height=1></td> </tr> <tr> <td height=10></td> </tr> </tbody> </table> <!----------------------> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td height=10></td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td vAlign=top width=168><a target=_blank><img class=img height=150 src="http://www.weinbergcn.com/cover/leader.gif" width=100 border=0></a></td> <td vAlign=top width=463> <table cellSpacing=0 cellPadding=0 width=400 border=0> <tbody> <tr> <td class=title onmouseover='isdiv("div1",1)' onmouseout='isdiv("div1",0)' height=20>成ؓ技术领D——解决问题的有机Ҏ</td> </tr> <tr> <td> <div class="7rxxhjz" id=div1 style="VISIBILITY: hidden; POSITION: absolute"> <table cellSpacing=1 cellPadding=5 width=600 bgColor=#000000 border=0> <tbody> <tr> <td style="LINE-HEIGHT: 18px" bgColor=#fbfde6>√ "?4章的内容Q逻辑清晰、引发思考,帮助你如何完成从技术h员到问题解决型领D的转变……一本实用的、实实在在的指南……热情、友好、诙谐的语言Q不时地I插着一些奇闻轶事,非常适合阅读?--Cause/Effect <br>√ "本书可是看作是一本有兛_展个人领D力的指南Q但是,本书的hg只这?#8230;…本书包含很多有关个h职业成长非常实用和颇有h值的观点……是这位作者写的最好的一本书之一?--Journal of Systems Management <br>√ "《成为技术领D》可以指导所有领Dƈ使几乎Q何一个领域的领导者受到鼓舞?--Data Processing Digest <br>√ "温伯格在书中阐述了不同类型的领导行ؓQ分析了那些L我们q行有效领导或排斥他人领导的不利因素Qƈ提出了能让我们把事情做得更好的行为。所有这些内定w是通过他幽默和坦率的语a表达出来?#8230;…L那么引h入胜……Ȁ发我们去思考如何技术h员在工作中进行有效的合作……温伯g仅在引导大家如何成ؓ一名领D,他自己本w就是一名出色的领导者?--IEEE Computer <br>√ "无论你是在管理单机、网l、还是多用户pȝQ你都将会发现这是一本条理清晰和内容_的好书?--Computer Book Review </td> </tr> </tbody> </table> </div> </td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=463 border=0> <tbody> <tr> <td class=title1 height=20><strong>QBecoming a Technical Leader: An Organic Problem-Solving ApproachQ?/strong></td> </tr> <tr> <td class=title2 height=30>9月出版,敬请xQ?nbsp;        ISBN: 7-302-06889-5</td> </tr> <tr> <td class=title3>    本书阐述了作Z名成功领D所必须掌握的领导方法与技巧——创新、激励和l织。本书提Z一些方法,供读者分析自己在q三个方面的领导技巧,q提供了开发这些技巧所需的实跉|骤。本书探讨的范畴不仅仅局限于技术层面,而且q拓展到了如何与他h更好地协作。作者在讲解基本原理的过E中所丄途R事、类比与比喻令h印象深刻Q因此有助于读者领会其中精要?</td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td height=10></td> </tr> <tr> <td background=images/book605.gif height=1></td> </tr> <tr> <td height=10></td> </tr> </tbody> </table> <!----------------------> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td height=10></td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td vAlign=top width=168><a target=_blank><img class=img height=150 src="http://www.weinbergcn.com/cover/st.gif" width=100 border=0></a></td> <td vAlign=top width=463> <table cellSpacing=0 cellPadding=0 width=400 border=0> <tbody> <tr> <td class=title onmouseover='isdiv("div2",1)' onmouseout='isdiv("div2",0)' height=20>pȝ化思维DQ银q纪늉Q?/td> </tr> <tr> <td> <div class="tzx7fvx" id=div2 style="VISIBILITY: hidden; POSITION: absolute"> <table cellSpacing=1 cellPadding=5 width=400 bgColor=#000000 border=0> <tbody> <tr> <td style="LINE-HEIGHT: 18px" bgColor=#fbfde6>√ 有关《系l化思维D》(银年U念版)的赞?<br>√ 整理?.. </td> </tr> </tbody> </table> </div> </td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=463 border=0> <tbody> <tr> <td class=title1 height=20><strong>QAn Introduction to General System ThinkingQ?/strong></td> </tr> <tr> <td class=title2 height=30>9月出版,敬请xQ?nbsp;        ISBN: ISBN: 7-302-06804-6</td> </tr> <tr> <td class=title3>    25q以来,《系l化思维D》在介绍pȝ理论斚w被一致认为是一本创新性的著作Q在计算Z及其他各个领域获得了普遍的应用。在世界各地Q在译֠上和研讨班,本书开启心c磨砺思维的威力得C断地证明?</td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td height=10></td> </tr> <tr> <td background=images/book605.gif height=1></td> </tr> <tr> <td height=10></td> </tr> </tbody> </table> <!----------------------> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td height=10></td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td vAlign=top width=168><a target=_blank><img class=img height=150 src="http://www.weinbergcn.com/cover/sd.jpg" width=100 border=0></a></td> <td vAlign=top width=463> <table cellSpacing=0 cellPadding=0 width=400 border=0> <tbody> <tr> <td class=title onmouseover='isdiv("div3",1)' onmouseout='isdiv("div3",0)' height=20>pȝ设计的一般原?/td> </tr> <tr> <td> <div class="jt3zj7n" id=div3 style="VISIBILITY: hidden; POSITION: absolute"> <table cellSpacing=1 cellPadding=5 width=400 bgColor=#000000 border=0> <tbody> <tr> <td style="LINE-HEIGHT: 18px" bgColor=#fbfde6>√ 有关《系l设计的一般原理》的赞誉 <br>√ 整理?.. </td> </tr> </tbody> </table> </div> </td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=463 border=0> <tbody> <tr> <td class=title1 height=20><strong>QGeneral Principles of Systems DesignQ?/strong></td> </tr> <tr> <td class=title2 height=30>10月出版,敬请xQ?/td> </tr> <tr> <td class=title3>    本书一位计机专家与一位hcd家思想的碰撞结Ӟ针对那些无法通过传统Ҏ加以解决的系l问题,本书为我们介l了分析与理解这c问题的新观点与Ҏ。本书是一本一般性系l思想著作Q对各个学科领域Q具有很q泛的适应性,不仅仅是关于计算机系l,q包括各U系l——hcR自然、科技。它提供了许多关于诸如设计信息处理系l、培训程序、商业组l、停车场、或都市人日常工作的应用实例?</td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td height=10></td> </tr> <tr> <td background=images/book605.gif height=1></td> </tr> <tr> <td height=10></td> </tr> </tbody> </table> <!----------------------> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td height=10></td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td vAlign=top width=168><a target=_blank><img class=img height=150 src="http://www.weinbergcn.com/cover/review.jpg" width=100 border=0></a></td> <td vAlign=top width=463> <table cellSpacing=0 cellPadding=0 width=460 border=0> <tbody> <tr> <td class=title onmouseover='isdiv("div4",1)' onmouseout='isdiv("div4",0)' height=20>走查、审查与技术复审手册——对E序、项目和产品q行评估</td> </tr> <tr> <td> <div class="37prjbd" id=div4 style="VISIBILITY: hidden; POSITION: absolute"> <table cellSpacing=1 cellPadding=5 width=400 bgColor=#000000 border=0> <tbody> <tr> <td style="LINE-HEIGHT: 18px" bgColor=#fbfde6>√ 有关《走查、审查与技术复审手册》的赞誉 <br>√ 整理?.. </td> </tr> </tbody> </table> </div> </td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=463 border=0> <tbody> <tr> <td class=title1 height=20><strong>QHandbook of Walkthroughs, Inspections, and Technical Reviews : Evaluating Programs, Projects, and ProductsQ?/strong></td> </tr> <tr> <td class=title2 height=30>9月出版,敬请xQ?ISBN: 7-302-06987-5</td> </tr> <tr> <td class=title3>    q本备受赞誉和推崇的佳作Q可以让你学会如何将技术复核的Ҏ应用于各U品与软g的开发过E。本书详l地解释了开展走查(或者同U团体复审)、审查和技术复审的程Q同时还为每一U接受复审的材料Q包括规根{设计和代码复审Q配备了详实的检查表?</td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td height=10></td> </tr> <tr> <td background=images/book605.gif height=1></td> </tr> <tr> <td height=10></td> </tr> </tbody> </table> <!----------------------> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td height=10></td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td vAlign=top width=168><a target=_blank><img class=img height=150 src="http://www.weinbergcn.com/cover/light.jpg" width=100 border=0></a></td> <td vAlign=top width=463> <table cellSpacing=0 cellPadding=0 width=400 border=0> <tbody> <tr> <td class=title onmouseover='isdiv("div5",1)' onmouseout='isdiv("div5",0)' height=20>你的灯亮着吗?——发现问题的真正所?/td> </tr> <tr> <td> <div class="dbzrr7z" id=div5 style="VISIBILITY: hidden; POSITION: absolute"> <table cellSpacing=1 cellPadding=5 width=600 bgColor=#000000 border=0> <tbody> <tr> <td style="LINE-HEIGHT: 18px" bgColor=#fbfde6>√ "一本有兛_何解决问题的最好的一本书?#8230;…我强烈推荐这本书?--John S. Rhodes, WebWord.com <br>√ "Weinberg和Gause之手W的又一本神奇的力作?--Barry Kornfeld, Sound Bytes <br>√ "作者用通俗易懂的故事,提出了他寚w题定义的深刻见解以及实用的解决问题的ҎQ这些见解和Ҏ对管理者的作用之大无法估量。尽这一话题是非怸肃的Q但是行文却q默风趣Q完全不是一本讨论技术的书?--Jim Van Speybroeck, Data Processing Digest <br>√ "q是q今为止q一领域最有趣、最有帮助的一本书。作者在分析和处理问题的Ҏ斚w提出了很多颇有帮助和价值的?--Charles Ashbacher, Amazon.com <br>√ "我管理着一个程序员团队。我希望他们头脑反映敏捷Q能够知道通向E序开发的捷径Q把握住E序开发真正问题之所在,然后利解决q些问题。这是Z么我l公叔R的每一名程序员Cq本书?--Garry Bor, 来自新加坡的一名Y件工E师 <br>√ "如果说这是一册教U书Q那一定是我太偏爱了故事;如果说这是一束小品文Q那一定是我太沉迷于思考;如果说这是程序员解决问题的指南,那一定是我忽略了问题的普遍性;如果说这改变你的生z,那一定是你洞察了其中的奥U?--Citizen <br>√ "本书包含很多h深刻哲理的警句,诸如'不管看上d何,Z很少知道他们惌什么,直到你给了他们想要的东西?Q?鱼L最后一个看到水的?但是本书q不是简单的警句的罗列,它真的是一本有关问题解决的有趣的和有用的书?#8230;…我已l读了两遍,我还会很快再M遍?--Tim Ottinger, Object Mentor Inc. </td> </tr> </tbody> </table> </div> </td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=463 border=0> <tbody> <tr> <td class=title1 height=20><strong>QAre Your Lights On? : How to Figure Out What the Problem Really IsQ?/strong></td> </tr> <tr> <td class=title2 height=30>9月出版,敬请xQ?ISBN: 7-302-06888-7</td> </tr> <tr> <td class=title3>    q是一本关于问题解决的书,在美?0q畅销不衰。主要探讨了?#8220;问题出现”?#8220;军_采用什么方式解册问题”之间我们需要考虑的方斚w面,从而教会你一U分析问题的全新思\Q让你轻L松解决问题!20则幽默的C寓言故事Q?0副精的全彩卡通插图,您将看到大师温伯格如何改变我们的思考方式! </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td height=10></td> </tr> <tr> <td background=images/book605.gif height=1></td> </tr> <tr> <td height=10></td> </tr> </tbody> </table> <!----------------------> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td height=10></td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td vAlign=top width=168><img class=img height=150 src="http://www.weinbergcn.com/cover/blank.jpg" width=100 border=0></td> <td vAlign=top width=463> <table cellSpacing=0 cellPadding=0 width=463 border=0> <tbody> <tr> <td class=title height=20>探烦需?/td> </tr> <tr> <td class=title1 height=20><strong>QExploring RequirementQ?/strong></td> </tr> <tr> <td class=title2 height=30>2004q?月出版。UMLChina隆重推荐Q?/td> </tr> <tr> <td class=title3>    本书着gpȝ设计之前的需求分析。通过对一些需求分析中的常见误区和问题的分析和讨论Q从和客h通开始,深入研究一些可能的需求,澄清用户和开发者期望|最l给Z能够大幅度提高项目成功几率的一些徏议方法。全书语a通畅Q词汇量,通俗易懂Q层ơ分明,是需求分析h员的入门和提高指南?</td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td height=10></td> </tr> <tr> <td background=images/book605.gif height=1></td> </tr> <tr> <td height=10></td> </tr> </tbody> </table> <!----------------------> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td height=10></td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td vAlign=top width=168><img class=img height=150 src="http://www.weinbergcn.com/cover/blank.jpg" width=100 border=0></td> <td vAlign=top width=463> <table cellSpacing=0 cellPadding=0 width=463 border=0> <tbody> <tr> <td class=title height=20>理解专业E序?/td> </tr> <tr> <td class=title1 height=20><strong>QUnderstanding the Professional ProgrammerQ?/strong></td> </tr> <tr> <td class=title2 height=30>2004q年初出版,敬请xQ?/td> </tr> <tr> <td class=title3>    本书是一本关于h和思想斚w的书。主要介l了对于E序员这个职业来说什么问题是重要的,怎样在官僚机构中保持生存Q成业程序员的方法,怎么h效的思考,以及E序员这个职业的前途。本书的特点是各个短文简l易读,文中借用故事或轶事来阐明作者的观点Q非常具有启发性?</td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td height=10></td> </tr> <tr> <td background=images/book605.gif height=1></td> </tr> <tr> <td height=10></td> </tr> </tbody> </table> <!----------------------> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td height=10></td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td vAlign=top width=168><img class=img height=150 src="http://www.weinbergcn.com/cover/blank.jpg" width=100 border=0></td> <td vAlign=top width=463> <table cellSpacing=0 cellPadding=0 width=463 border=0> <tbody> <tr> <td class=title2 height=30>12月出版,敬请xQ?/td> </tr> <tr> <td class=title height=20>咨询的奥U——成功提出和获得的指?/td> </tr> <tr> <td class=title1 height=20><strong>QSecrets of Consulting: A Guide to Giving and Getting Advice SuccessfullyQ?/strong></td> </tr> <tr> <td class=title3>    本书内容是关于如何更好的为别人给出徏议或接受别h的。作者凭借对自己25q专业经验ȝ和提|_辟地归U_了各U规则、定律和原理Q包括如何在竞争Ȁ烈的咨询市场中脱颖而出Q如何ؓ咨询服务定h和拓展市场,如何衡量咨询服务的有效性以及如何处理咨询h员与客户的关pȝ{。本书深受咨询专业h士推崇和Ƣ迎Q是一本畅销多年的经典著作?</td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td height=10></td> </tr> <tr> <td background=images/book605.gif height=1></td> </tr> <tr> <td height=10></td> </tr> </tbody> </table> <!----------------------> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td height=10></td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td vAlign=top width=168><img class=img height=150 src="http://www.weinbergcn.com/cover/blank.jpg" width=100 border=0></td> <td vAlign=top width=463> <table cellSpacing=0 cellPadding=0 width=463 border=0> <tbody> <tr> <td class=title height=20>咨询的奥U——咨询师的百宝箱</td> </tr> <tr> <td class=title1 height=20><strong>QMore Secrets of Consulting: The Consultant's Tool KitQ?/strong></td> </tr> <tr> <td class=title3>    本书是Gerald M. Weinberg的畅销书The Secrets of Consulting的姊妹篇Q在前一本书l出的众多定律、法则的基础上,本书l出了作为咨询h员应该具有的更多的专业和个h素质。作者通过生动的比喻,l合实例的简单精辟的说理Q列举了咨询人员应该注重培养的能力,Ҏ和生zL度?</td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td height=10></td> </tr> <tr> <td background=images/book605.gif height=1></td> </tr> <tr> <td height=10></td> </tr> </tbody> </table> <!----------------------> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td height=10></td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td vAlign=top width=168><img class=img height=150 src="http://www.weinbergcn.com/cover/blank.jpg" width=100 border=0></td> <td vAlign=top width=463> <table cellSpacing=0 cellPadding=0 width=463 border=0> <tbody> <tr> <td class=title2 height=30>2004q年初出版,敬请xQ?/td> </tr> <tr> <td class=title height=20>质量软g理——系l思维</td> </tr> <tr> <td class=title1 height=20><strong>QQuality Software Management : Systems ThinkingQ?/strong></td> </tr> <tr> <td class=title3>    在本卷中QGerald M. Weinberg剖析了开发质量Y件的W一个必要条Ӟ掌握Q对问题、解{以及质量本w的Q正的思维Ҏ。其中所介绍的在理q程中应该遵循的斚wQ可以促使我们进行这cd要的思考?</td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td height=10></td> </tr> <tr> <td background=images/book605.gif height=1></td> </tr> <tr> <td height=10></td> </tr> </tbody> </table> <!----------------------> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td height=10></td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td vAlign=top width=168><img class=img height=150 src="http://www.weinbergcn.com/cover/blank.jpg" width=100 border=0></td> <td vAlign=top width=463> <table cellSpacing=0 cellPadding=0 width=463 border=0> <tbody> <tr> <td class=title height=20>质量软g理——测试优?/td> </tr> <tr> <td class=title1 height=20><strong>QQuality Software Management : First-Order MeasurementQ?/strong></td> </tr> <tr> <td class=title3>    该卷循序渐进Cؓ你提供计划指|使你学会通过l致的观察与量来收集可靠的信息。详l介l了具体的技术方法,同时q提供了一个模型,复杂的量q程划分为四个步骤:入口、含义、重要性和反馈。每一步都说明了在软g开发过E中Q应该如何更为精地q行观察与测量?</td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td height=10></td> </tr> <tr> <td background=images/book605.gif height=1></td> </tr> <tr> <td height=10></td> </tr> </tbody> </table> <!----------------------> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td height=10></td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td vAlign=top width=168><img class=img height=150 src="http://www.weinbergcn.com/cover/blank.jpg" width=100 border=0></td> <td vAlign=top width=463> <table cellSpacing=0 cellPadding=0 width=463 border=0> <tbody> <tr> <td class=title height=20>质量软g理——协调行?/td> </tr> <tr> <td class=title1 height=20><strong>QQuality Software Management : Congruent ActionQ?/strong></td> </tr> <tr> <td class=title3>    Z生出高质量的YӞ我们首先需要高质量的、得力的l理。Weinberg深受推崇的该pd丛书中独立的W三h讨论的,是如何成长样一名经理。ؓ了领导得力,l理们必行动一致。换而言之,q些l理不仅需要对优秀软g工作的概忉|所理解Q而且q必n体力行这些原理,在实践中q一Ҏ为重要?</td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td height=10></td> </tr> <tr> <td background=images/book605.gif height=1></td> </tr> <tr> <td height=10></td> </tr> </tbody> </table> <!----------------------> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td height=10></td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td vAlign=top width=168><img class=img height=150 src="http://www.weinbergcn.com/cover/blank.jpg" width=100 border=0></td> <td vAlign=top width=463> <table cellSpacing=0 cellPadding=0 width=463 border=0> <tbody> <tr> <td class=title height=20>质量软g理——预期变?/td> </tr> <tr> <td class=title1 height=20><strong>QQuality Software Management : Anticipating ChangeQ?/strong></td> </tr> <tr> <td class=title3>    软g企业q行变革的尝试往往以失败告l,其原因就在于对变革过E中的各U动力理解不够充?-q也是企业之所以出现危机的首当其冲的一个原因。Jerry Weinberg的这本书为其包含四本独立分卷的系列丛书进行了ȝQ该卷ؓ我们在变革过E中的管理工作提供了注重实效、内容翔实的最后交待?</td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td height=10></td> </tr> <tr> <td background=images/book605.gif height=1></td> </tr> <tr> <td height=10></td> </tr> </tbody> </table> <!------------------> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td width=35 height=25><img height=26 src="http://www.weinbergcn.com/images/book606.gif" width=30 border=0></td> <td class=title4 width=359 background=images/book504.gif>相关链接</td> <td width=237><br></td> </tr> </tbody> </table> <table cellSpacing=0 cellPadding=0 width=631 border=0> <tbody> <tr> <td class=setline vAlign=top align=right width=30 height=18>·</td> <td width=601><a target=_blank><font color=#000000>透明Ҏ伯格的专访(《程序员》第9期)</font></a> <font color=#ff0000>NEW!</font></td> </tr> <tr> <td class=setline align=right height=18>·</td> <td><a ><font color=#000000>名h堂温伯格专栏Q《程序员》第8期)</font></a> <font color=#ff0000>NEW!</font></td> </tr> <tr> <td class=setline align=right height=18>·</td> <td><a ><font color=#000000>微Y亚洲研究院院长兼首席U学家张亚勤专文推荐</font></a></td> </tr> <tr> <td class=setline align=right height=18>·</td> <td><a ><font color=#000000>剑、气和o狐冲</font></a></td> </tr> <tr> <td class=setline align=right height=18>·</td> <td><a ><font color=#000000>七宝楼台今安?/font></a></td> </tr> <tr> <td class=setline align=right height=18>·</td> <td><a ><font color=#000000>个体性最后的堡垒</font></a></td> </tr> <tr> <td class=setline align=right height=18>·</td> <td><a ><font color=#000000>走出问题的乌托邦</font></a></td> </tr> <tr> <td class=setline align=right height=18>·</td> <td><a ><font color=#000000>从今天开始,做你自己的上?/font></a></td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <!----------------> <table cellSpacing=0 cellPadding=0 width=770 background=images/book404.gif border=0> <tbody> <tr> <td vAlign=top width=90 height=74><img height=64 src="http://www.weinbergcn.com/images/book405.gif" width=79 border=0></td> <td vAlign=top width=680> <table cellSpacing=0 cellPadding=0 border=0> <tbody> <tr> <td height=32></td> </tr> <tr> <td class=setwhite>Copyright by shinebook, who publishes best books for IT people.<br>Edited by Shiningxyy,and designed by Orrin.</td> </tr> </tbody> </table> </td> </tr> </tbody> </table> </center> <img src ="http://www.shnenglu.com/ztwaker/aggbug/53698.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/ztwaker/" target="_blank">子弹</a> 2008-06-17 14:08 <a href="http://www.shnenglu.com/ztwaker/archive/2008/06/17/53698.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Project managementhttp://www.shnenglu.com/ztwaker/archive/2008/06/13/53110.html子弹子弹Fri, 13 Jun 2008 03:23:00 GMThttp://www.shnenglu.com/ztwaker/archive/2008/06/13/53110.htmlhttp://www.shnenglu.com/ztwaker/comments/53110.htmlhttp://www.shnenglu.com/ztwaker/archive/2008/06/13/53110.html#Feedback0http://www.shnenglu.com/ztwaker/comments/commentRss/53110.htmlhttp://www.shnenglu.com/ztwaker/services/trackbacks/53110.html阅读全文

              子弹 2008-06-13 11:23 发表评论
              ]]>
              Macadamian's Code Review Checklisthttp://www.shnenglu.com/ztwaker/archive/2008/06/10/52752.html子弹子弹Tue, 10 Jun 2008 06:38:00 GMThttp://www.shnenglu.com/ztwaker/archive/2008/06/10/52752.htmlhttp://www.shnenglu.com/ztwaker/comments/52752.htmlhttp://www.shnenglu.com/ztwaker/archive/2008/06/10/52752.html#Feedback0http://www.shnenglu.com/ztwaker/comments/commentRss/52752.htmlhttp://www.shnenglu.com/ztwaker/services/trackbacks/52752.htmlFrom: http://www.macadamian.com/index.php?option=com_content&task=view&id=27&Itemid=31

              Macadamian's Code Review Checklist 

              At Macadamian, we practice what we preach with peer code reviews. Before we commit any code to source control, we check it for compliance with this list.

              We’ve made the checklist public for the use of software development teams implementing code review as part of their process. For more information about code review processes and software development best practices, read check out the Critical Path newsletter – it’s free, too!

              General Code Smoke Test
              Comments and Coding Conventions
              Error Handling
              Resource Leaks
              Control Structures
              Performance
              Functions
              Bug Fixes
              Math



               

              General Code Smoke Test

              Does the code build correctly?
              No errors should occur when building the source code. No warnings should be introduced by changes made to the code.

              Does the code execute as expected?
              When executed, the code does what it is supposed to.

              Do you understand the code you are reviewing?
              As a reviewer, you should understand the code. If you don't, the review may not be complete, or the code may not be well commented.

              Has the developer tested the code?
              Insure the developer has unit tested the code before sending it for review. All the limit cases should have been tested.

              Comments and Coding Conventions

              Does the code respect the project coding conventions?
              Check that the coding conventions have been followed. Variable naming, indentation, and bracket style should be used.

              Does the source file start with an appropriate header and copyright information?
              Each source file should start with an appropriate header and copyright information. All source files should have a comment block describing the functionality provided by the file.

              Are variable declarations properly commented?
              Comments are required for aspects of variables that the name doesn't describe. Each global variable should indicate its purpose and why it needs to be global.

              Are units of numeric data clearly stated?
              Comment the units of numeric data. For example, if a number represents length, indicate if it is in feet or meters.

              Are all functions, methods and classes documented?
              Describe each routine, method, and class in one or two sentences at the top of its definition. If you can't describe it in a short sentence or two, you may need to reassess its purpose. It might be a sign that the design needs to be improved.

              Are function parameters used for input or output clearly identified as such?
              Make it clear which parameters are used for input and output.

              Are complex algorithms and code optimizations adequately commented?
              Complex areas, algorithms, and code optimizations should be sufficiently commented, so other developers can understand the code and walk through it.

              Does code that has been commented out have an explanation?
              There should be an explanation for any code that is commented out. "Dead Code" should be removed. If it is a temporary hack, it should be identified as such.

              Are comments used to identify missing functionality or unresolved issues in the code?
              A comment is required for all code not completely implemented. The comment should describe what's left to do or is missing. You should also use a distinctive marker that you can search for later (For example: "TODO:francis").

              Error Handling

              Are assertions used everywhere data is expected to have a valid value or range?
              Assertions make it easier to identify potential problems. For example, test if pointers or references are valid.

              Are errors properly handled each time a function returns?
              An error should be detected and handled if it affects the execution of the rest of a routine. For example, if a resource allocation fails, this affects the rest of the routine if it uses that resource. This should be detected and proper action taken. In some cases, the "proper action" may simply be to log the error.

              Are resources and memory released in all error paths?
              Make sure all resources and memory allocated are released in the error paths.

              Are all thrown exceptions handled properly?
              If the source code uses a routine that throws an exception, there should be a function in the call stack that catches it and handles it properly.

              Is the function caller notified when an error is detected?
              Consider notifying your caller when an error is detected. If the error might affect your caller, the caller should be notified. For example, the "Open" methods of a file class should return error conditions. Even if the class stays in a valid state and other calls to the class will be handled properly, the caller might be interested in doing some error handling of its own.

              Has error handling code been tested?
              Don't forget that error handling code that can be defective. It is important to write test cases that exercise it.

              Resource Leaks

              Is allocated memory (non-garbage collected) freed?
              All allocated memory needs to be freed when no longer needed. Make sure memory is released in all code paths, especially in error code paths.

              Are all objects (Database connections, Sockets, Files, etc.) freed even when an error occurs?
              File, Sockets, Database connections, etc. (basically all objects where a creation and a deletion method exist) should be freed even when an error occurs. For example, whenever you use "new" in C++, there should be a delete somewhere that disposes of the object. Resources that are opened must be closed. For example, when opening a file in most development environments, you need to call a method to close the file when you're done.

              Is the same object released more than once?
              Make sure there's no code path where the same object is released more than once. Check error code paths.

              Does the code accurately keep track of reference counting?
              Frequently a reference counter is used to keep the reference count on objects (For example, COM objects). The object uses the reference counter to determine when to destroy itself. In most cases, the developer uses methods to increment or decrement the reference count. Make sure the reference count reflects the number of times an object is referred.

              Thread Safeness

              Are all global variables thread-safe?
              If global variables can be accessed by more than one thread, code altering the global variable should be enclosed using a synchronization mechanism such as a mutex. Code accessing the variable should be enclosed with the same mechanism.

              Are objects accessed by multiple threads thread-safe?
              If some objects can be accessed by more than one thread, make sure member variables are protected by synchronization mechanisms.

              Are locks released in the same order they are obtained?
              It is important to release the locks in the same order they were acquired to avoid deadlock situations. Check error code paths.

              Is there any possible deadlock or lock contention?
              Make sure there's no possibility for acquiring a set of locks (mutex, semaphores, etc.) in different orders. For example, if Thread A acquires Lock #1 and then Lock #2, then Thread B shouldn't acquire Lock #2 and then Lock #1.

              Control Structures

              Are loop ending conditions accurate?
              Check all loops to make sure they iterate the right number of times. Check the condition that ends the loop; insure it will end out doing the expected number of iterations.

              Is the code free of unintended infinite loops?
              Check for code paths that can cause infinite loops. Make sure end loop conditions will be met unless otherwise documented.

              Performance

              Do recursive functions run within a reasonable amount of stack space?
              Recursive functions should run with a reasonable amount of stack space. Generally, it is better to code iterative functions.

              Are whole objects duplicated when only references are needed?
              This happens when objects are passed by value when only references are required. This also applies to algorithms that copy a lot of memory. Consider using algorithm that minimizes the number of object duplications, reducing the data that needs to be transferred in memory.

              Does the code have an impact on size, speed, or memory use?
              Can it be optimized? For instance, if you use data structures with a large number of occurrences, you might want to reduce the size of the structure.

              Are you using blocking system calls when performance is involved?
              Consider using a different thread for code making a function call that blocks.

              Is the code doing busy waits instead of using synchronization mechanisms or timer events?
              Doing busy waits takes up CPU time. It is a better practice to use synchronization mechanisms.

              Was this optimization really needed?
              Optimizations often make code harder to read and more likely to contain bugs. Such optimizations should be avoided unless a need has been identified. Has the code been profiled?

              Functions

              Are function parameters explicitly verified in the code?
              This check is encouraged for functions where you don't control the whole range of values that are sent to the function. This isn't the case for helper functions, for instance. Each function should check its parameter for minimum and maximum possible values. Each pointer or reference should be checked to see if it is null. An error or an exception should occur if a parameter is invalid.

              Are arrays explicitly checked for out-of-bound indexes?
              Make sure an error message is displayed if an index is out-of-bound.

              Are functions returning references to objects declared on the stack?
              Don't return references to objects declared on the stack, return references to objects created on the heap.

              Are variables initialized before they are used?
              Make sure there are no code paths where variables are used prior to being initialized. If an object is used by more than one thread, make sure the object is not in use by another thread when you destroy it. If an object is created by doing a function call, make sure the object was created before using it.

              Does the code re-write functionality that could be achieved by using an existing API?
              Don't reinvent the wheel. New code should use existing functionality as much as possible. Don't rewrite source code that already exists in the project. Code that is replicated in more than one function should be put in a helper function for easier maintenance.

              Bug Fixes

              Does a fix made to a function change the behavior of caller functions?
              Sometimes code expects a function to behave incorrectly. Fixing the function can, in some cases, break the caller. If this happens, either fix the code that depends on the function, or add a comment explaining why the code can't be changed.

              Does the bug fix correct all the occurrences of the bug?
              If the code you're reviewing is fixing a bug, make sure it fixes all the occurrences of the bug.

              Math

              Is the code doing signed/unsigned conversions?
              Check all signed to unsigned conversions: Can sign completion cause problems? Check all unsigned to signed conversions: Can overflow occur? Test with Minimum and Maximum possible values.



              子弹 2008-06-10 14:38 发表评论
              ]]>