发布新日志

  • Agile Project Management with Scrum

    2008-10-25 13:16:58

    公司流程的改变,这周主要对敏捷的Scrum培训和Daptiv工具 的培训,因为是英语培训,许多东西自己要整理一下。

    首先是和开发传统模型(Waterfall)的对比,传统模型随着系统因素(内部和外部因素)的复杂度增加,项目成功的可能性就迅速降低。而scrum模型非常灵活,是一个增量迭代的开发过程。在这个框架整个开发周期由若干个小的迭代周期(Iteration Cycle),每个小的迭代周期称为一个Sprint,每个sprint的周期是1430天。每个sprint inspection process 组成,各个team的成员每天碰一次头review项目进行的活动并做适当的修改。推进迭代过程的需求来自Product Backlogscrum的开发团队拿到一个排列好优先级的需求列表,因此开发的是对客户就有较高价值的需求。每个迭代结束后,都会完成可交付的产品。

     

    这里先解释两个术语:

    Product Backlog:在项目开始的时候,product owner要准备一个根据商业价值排好序的客户需求列表,这个列表就是product backlog,一个最终会交付给客户的产品特性列表,它们根据商业价值来排列优先级别。Scrum team会根据这个来做工作量的估计。

    Product Backlog应该涵盖所有用来构建满足客户需求的产品特性,包括技术上的需求。高优先级的一些产品特性需要足够的细化以便我们做工作量估计和做测试。对于那些可以在下个Sprint中完成的Product Backlog功能点,大约10人天的工作量的粒度就不错了。对于那些以后将要实现的特性可以不够详细。

    Sprint  BacklogSprint BacklogSprint规划会上产出的一个法宝。当Scrum team选择并承诺了Product Backlog 中要递交的一些高优先级的产品功能后,这些功能点就会被细化成为Sprint Backlog:一个完成Product Backlog功能点的必需的任务列表。这些点会被细化为更小的任务,工作量小于两天。Sprint Backlog完成后,scrum team会根据它重新估计工作量,如果这些工作量和原始设计的工作量有较大差异,scrum team会根据它重新估计工作量,如果这些工作量和原始估计的工作量有较大差异,scrum teamproduct owner协商,调整合理的工作量到sprint中,以确保sprint的成功实施。

    Burndown Chart现实了sprint中累积剩余的工作量,它是一个反应工作量完成状况的趋势图。在sprint开始的时候,develop team会表示和估计在这个sprint需要完成的详细的任务。所有这个sprint需要完成,但没有完成的任务的工作量是累积工作量,scrum master会根据进展情况每天更新和积累工作量,如果在sprint结束时,累计工作量降低到0sprint就成功结束。

     

    Sprint的会议形式:

    Daily Scrum 会议:Scrum组织成员每天要开Daily Scrum会议,用15分钟的时间让大家review项目的进度情况。在会上,每个团队成员需要问3个问题:(What have you done on the project since the last daily Scrum meeting?

    What do you plan on doing on this project between now and the next daily Scrum meeting?

    What impediments stand in the way of you meeting your commitments to this Sprint and to this project?)就是我昨天做了什么,今天做了什么,遇到哪些障碍。这个会议的目标是监测项目的全局,定位项目成员的要求,实时的调整当天开发计划。Note:不允许非项目内的人发言。

     

    Sprint Planning Meetingsprint规划会):参加者有product ownerdevelop teamscrummaster。需要要鸡的角色的人参与,第三方提供数据后就可以解散。第一个四个小时的会议来对product backlog进行选择,肯能否在sprint内完成。Product owner在会议之前准备好product backlogproduct owner决定哪些要在sprintdevelop team可以提出建议。然后team再从product owner选好的product backlog中决定哪些在在sprint。第二个四个小时,develop team列出所有的任务,进行时间的评估和分配。

     

    Sprint Review meetingsprint 评审会):一个小时准备时间,四个小时的review时间。参加会议的developteam表明已经完成功能,没有完成的team不能参见。会议的开始是develop team演示完成的product backlogsprint backlogdevelop team的成员会讨论在这个sprint中哪些做得好需要保持,哪些需要改进。会议的大部分时间是产品的演示,以及回答stake-holder的问题。功能演示完之后,stakeholders会对此评价,并提出想要改变的东西以及优先级。接下来product owner会和develop teamstakeholdersproductbacklog的反馈进行重现安排和规划。Stakeholders也许会发表自己对演示的想法,或是提出新要增加的product backlog。在会议的最后,会宣布下一次评审会议的时间和地点。

    Sprint Retrospective Meeting:设定三个小时,参加者有,develop teamscrummaster product owner可选。所有的develop team需要回答两个问题:上一个sprint哪里做得好,哪里需要改进。Scrummaster会记录所有的回答,并和team一起排列优先顺序。需要改进的项目添加到下一个sprint中作为高优先级非功能性product backlog

     

     

    Scrum定义了许多角色,根据Pigchicken的笑话分为两组,pigchicken

    猪是全身投入项目和scrum过程的人:Product ownerscrummaster,和Develop Team

    Product Owner的职责:

    确定产品的功能;

    决定发布日期和发布内容;

    为产品的ROI负责;

    根据市场价值确定功能优先级;

    接受或拒绝接受开发团队的工作成果。

    Develop Team

    具有不同特长的团队成员,人数控制在7个左右;

    确定sprint目标和具体说明工作成果;

    在项目向导范围内有权利做任何事情已确保到sprint的目标。

    高度的自我管理能力;

    product owner演示产品功能。

     

    ScrumMaster

    保证团队资源完全可被利用并且全部是高产出的。

    保证各个角色及职责的良好协作。

    解决团队开发中的障碍。

    做为团队和外部的接口,屏蔽外界对团队成员的干扰。

    保证开发过程按照计划进行,组织daily scrumsprint reviewsprint planning meetings

    NoteScrumMaster is not a project manager the team is self-managing.

  • SMS配置(二)

    2008-10-09 16:43:03

    SMS的配置:

    1) 配置DHCP

    2) 安装Active Directory。(Startruntypedcpromo”,click OK to launch AD installation wizard

    SMS主站点的安装步骤:

    3) 安装和配置site database:安装SQL Server

    4) 安装SMS Primary site

    a) 展开AD Schemarun adsiedit.msc,建立system container

    b) Primary Site Installation

     

    c) 验证安装是否成功

    5) SMS 2003 Primary Site配置

    A)   配置site propertiesrun dssite.msc,打开Active Directory sites and service window

    B)   配置site system

    安装IIS

    安装BITS server extension

    6) 配置site system(主要是配置system roles

     

    Resource Discovery SMS client的安装

    1) 一共有六种discovery method,我们选择active directory system discovery

    2) Client 的安装

    配置Client 连接帐户(run dsa.msc

    SMS client的安装方法:

    Client push Installation\Manual\Windows Group Policy\Software Distribution\Logon scrīpt Initiated\Imaging.(我使用Client push Installation的方法)

  • SMS配置

    2008-10-09 16:39:06

                                                        SMS配置

    公司要做的一个项目要用到SMS,今天对SMS的一些知识进行一些记录和总结。

     

    SMSsystems Management server),是微软用于在服务器上管理客户端的综合集成软件,通过标准的internet 技术,解决永和的更改和配置需求。常用的功能有:

    1) 安装软件/补丁。SMS能够向任何用户,用户组,网段和计算机的组合发布各类软件,补丁;

    2) 资产管理。服务器会按照需求定期的收集客户端的软硬件信息以及网络状况,管理员可以监控软硬件变化。

    3) 远程桌面监控和问题的解决。

     

    SMS相关的术语和概念:

    1) 站点类型

    Primary siteSecondary sitePrimary site是拥有独立的SQL Server数据库站点,而secondary site没有自己的数据库,它的数据保存在其母站点的数据库中;

    母站点(Parent Site),子站点(Child Site)和中心站点(Central Site
    parent site
    接受child site的数据,它的数据库中存储所有更低级别站点的信息,child将软件、硬件收集等信息传递给它的parent siteparent site只能是primary site,而child site既可以是primary site,也可以是secondary sitecentral siteSMS站点结构中位于最顶端的站点,它不是其他任何站点的child site,可以在central site上查看并管理所有的站点

    2) Site boundaries

    SMS的边界分为两种,一种是站点边界,一种是漫游边界。某些SMS高级客户端是可以移动的,可以从一个物理网段移动到另一个网段,我们把这个成为漫游(roaming)。配置为自动分配(auto-assignment)的高级客户端根据站点的roaming boundary配置来选择被分配的SMS站点。也可以不考虑漫游区域而手动地分配一个站点。通过使用漫游区域,一个高级客户端可以从一个区域迁移到另一个区域,并仍能被SMS管理,接收SMS发来的软件包。站点边界只支持标准客户。

    3)                Roaming Boundary

    Regional roaming:在没有AD或者没有扩展Schema的情况下,高级客户端只能漫游到低级别的站点,这叫作regional roaming
    global roaming
    global roaming允许高级客户端漫游到高级别的站点,它需要扩展Schema
    local roaming boundary
    :通常为本地区域,共享高速连接的区域配置local roaming boundary
    remote roaming boundary
    :通常为远程区域,共享低速连接的区域配置remote roaming boundary

    4) 安全模式

    高级安全模式(Advanced Security: 使用Local System账号启动SMS服务,无需维护SMS服务账号,推荐使用。
    标准安全模式(Standard Security: SMS服务需要一个SMS服务账号来启动。这个帐号需拥有Domain admin 权限。(如果SMS服务器不是在域控制器上,同时需要扩展AD,需要有AD的更改权限。

    5) SMS客户端类型

    SMS 2003客户端有两种类型: 标准客户端(Legacy Client)和高级客户端(Advanced Client)。
    标准客户端适用于Windows 98Windows NT SP6 Windows 2000 Windows XPWindows 2003
    高级客户端适用于Windows 2000 Windows XPWindows 2003

    6)                Site system Role

    Site Server: SMS的核心服务. 用于处理SMS的数据并反映在SMS管理界面或报表中;
    Site Boundary:
    用于确定SMS Site Server的管理范围;
    SMS Provider:
    用于给site server提供SQL服务;
    Management Point (MP):
    介于SMS Site Server SMS高级客户端之间的中间节点.,高级客户端通过他与SMS联系;
    Client Access Point (CAP):
    介于SMS Site Server SMS标准客户端之间的中间节点.,标准客户端通过他与SMS联系;
    Distribution Point (DP):
    存放软件包的服务器。SMS Site Server将软件包保存到DP,然后通过MPCAP通知客户端到DP来执行软件包的安装,可以理解成文件仓库
    Server Location Point (SLP):
    用于替SMS客户端查找到合适的CAPMP
    Reporting Point (RP):
    用于提供基于WEB的报表服务;
    Data Discovery Record
    DDR: 数据发现记录;
    Client Configuration Request(CCR):
    客户配置请求。

    7) ADActive Directory

    存储关于网络上对象的信息并使这些信息可以用于用户和网络管理员的目录服务。Active Directory 允许网络用户通过单个登录过程访问网络上任意位置允许访问的资源。它给网络管理员提供了直观的网络层次结构视图和对所有网络对象的单点管理。

    8) DHCPDynamic Host Configuration protocol server

    动态、限时地分配地址库中的 IP 地址。DHCP 用于自动集中地配置 TCP/IP 网络中的计算机。这种配置具有标准化优势,不需要任何手工干预。网络管理员决定如何分配 IP 地址。管理员也决定分配的有效时间。从原则上讲,此过程的作用是为每位网络用户分配不同的 IP 地址。由于网络组件(例如 COM 服务器和打印服务器)始终通过固定的 IP 地址寻址,因此必须将这些组件排除在通过 DHCP 分配 IP 地址之外。

    9) IIS

    IISInternet Information Server的缩写,它是微软公司主推的服务器, IISWindow Server完全集成在一起,因而用户能够利用Windows NT ServerNTFSNT File SystemNT的文件系统)内置的安全特性,建立强大,灵活而安全的InternetIntranet站点

     

     

  • Be Smart

    2008-10-07 19:20:19

    今天看了Ivar Be Smart讲座,最近头一直说有smart work,对smart比较敏感。在此记录一笔。

     

    他讲到Software Development被流行和时尚所驱赶,15年前是OO,十年前是ComponentsUMLUnified Process5年前是RUPCMMI,两年前是XP,现今是Scrum。(我们公司已经在推展Scrum一段时间了,呵呵)He said all good but none is your need, we should work smarter.

     

    smart 到底是什么意思?

    Things should be done as simple as possible-but no simpler.

    Smartintelligent不是同一件事情;

    要想smart必须具备common sense(常识?);

    如果smart了也就agile(敏捷)了,但是smart包含更多的内容:

    Agile意思是灵活并且能适应不同的环境;

    Being Smart=Being Agile+在特定的环境做正确的事情;

    做正确的事情源于规则(培训和经验)。

     

    什么是smart?什么是unsmart

    People

    认为流程和工具比人重要。(unsmart)(强烈同意)

    切记软件是由人开发出来的。(smart

    Projects

    瀑布方法(unsmart)

    先构建个简洁的系统(skinny),然后增加能力,不断丰满这个系统。(smart

    Requirements

    需求之前就定义并细化不再改变(unsmart

    基于轻量级的需求决议,如果需要再细化。切记需求是可商议,优先级可以修改的。(smart)(看来我以后我不能抱怨需求老是变来变去)

    Architecture

    没有architecture,只有代码。(unsmart

    之前所有的事情都设计好,架构庞大复杂。(unsmart

    切记:决定软件质量的一个重要因素是architecture的质量。

    基于skinny system构建architecture,必须有可执行的代码,否则是空想。(smart

    Modeling

    没有modeling或处处modeling。(unsmart

    如果建模语言是不可执行的,基于skinny system。(smart

    Test:

    定义两类人:思考者和清洁问题的人,测试员就是软件的清洁工。(unsmart

    人人都是测试人员。(smart

    Documents

    过多的强调文档。(unsmart

    强调essentials(本质)(smart)(我之强经常抱怨文档做得不够,不好?)

    Process

    采用很多流程方法。(unsmart

    要基于本质,采用基于实践的方法。(smart

     

    如何变得更smart

    不断的获取只是和经验,不断的改进;

    不同领域的实践-软件工程,过程管理等;

    还有不要扔掉自己已有的……

     

     

     

     

  • 阶段式与连续式表述

    2008-10-06 18:24:58

    连续式表述

    当使用CMMI模型进行流程改善时,连续式表述可以提供最大的弹性,一个组织可以选择改善单一流程相关的问题点的绩效,或是可以使用多个领域以密切配合组织的经营目标。连续式表述也允许一个组织将不同的流程改善到不同的等级。但组织在选择上仍有一些限制,因为有一些流程领域是彼此相依赖的。

    假如你知道在你的组织中有需要改善的流程,以及了解CMMI中流程领域间的依赖性,对你的组织而言,连续式表述是一个好的选择。

    阶段式表述

    阶段式表述提供系统化结构化的方式,一次一个阶段达到以模型为基础的流程改善。达到每一个阶段可确保有足够的流程基础建设,可作为下一个阶段流程改善的基础。

    流程领域是以成熟度等级组织,并且对流程改善做一些推测工作。阶段式表述根据成熟度等级规定执行流程改善的书序,它定义一个组织有初始级到最佳化级的改善路径。达到每一个成熟度等级可确保有足够的流程基础建设,可作为下一个成熟度等级的基础,并且允许持续与渐进的改善。

    假如你不知道要选择哪一个流程开始进行改善,阶段式表述对你而言是一个好的选择。它给你一组特定的流程,针对每一个阶段进行改善,这组流程的决定,是来自十多年流程改善的研究和经验。

    阶段式与连续式表述的比较

    1.1比较每一个表述的优势,能够帮助你决定哪一个表述适合你的组织。

    连续式表述

    阶段式表述

    授予明确的自由度来选择最符合组织经营的目标与减少组织经营目标与减少组织风险范围的改善顺序。

    使组织有一个已定义且被证实的改善路径。

    增加每一个流程领域能力度透视度。

    专注一组流程领域,此组流程领域为每一成熟度等级的特征,提供组织特定的能力。

    允许对不同的流程执行不同等级的改善。

    以简单的形式总结流程改善结果-单一成熟度等级数目。

    一种新方法仍未有数据证明其与投资报酬率有关连。

    建立在一个相对长期的使用历史,包含个案研究与数据以证明投资报酬率。

     

    你的决策因素

    有三种类型的因素决定你选择的表述类型,他们是经营,文化与历史累计状况。

    经营因素

    当组织在经营目标上有成熟的知识,很可能有一个强大的流程映射到其经营的目标。这样的组织可能发现连续式表述有利于评估其流程,以及决定组织流程支援以及符合经营目标的程度。

    如果组织产品线专注于决定要改善跨组织的流程,它最好使用阶段式表述。阶段式表述将帮助组织在改善上选择要专注改善的重要流程。

    同一个组织也可能利用产品线来改善流程。那样的话,它可能选择连续式表述-每一个产品线有不同的能力度评审等级。这两种表述都是有效的。最重要的是考虑那些经营目标是你希望你的流程改善过程要支持的这些经营目标如何用两种表述调校。

    文化因素

    当选择表述与组织推展流程改善计划的能力有关时,要考虑文化因素。例如,如果企业文化是以流程为基础且流程改善有经验,或是有特定流程需要快速的改善,组织就可能选择连续式表述。若组织缺乏流程改善经验,可能选择阶段式表述,阶段式表述提供要发生的变更及顺序的额外指引。

    历史累积状况

    如果一个组织对其它模型有阶段式表述的经验,当使用CMMI时,希望继续使用阶段式表述,尤其是组织已经跨组织投入资源和推展流程,这与阶段式表述相关。会继续使用连续式表述亦是如此。

    为什么不是两种表述?

    不管是使用流程改善或评估,这两个表述是设计来提供相同的结果。这两种表述的CMMI模型内容几乎相同。因此,组织只要选择一个表述即可。

    事实上,组织可能发现此二种表述是通用的。组织很少完全的实行前述的某一种表述。在流程改善上成功的组织经常定义一个改善计划,此改善计划专注在组织的唯一需求,然后使用阶段式与连续式表述的原则。

    例如,选择阶段式表述并在成熟度第1级的组织,常常会在实行成熟度第2级的流程领域时,执行位于组织成熟度第3级下的组织流程专注流程领域。另一个例子,组织选择连续式表述,指引其内部流程改善工作,然后选择阶段式表述进行评审。

  • Participating in a meeting

    2008-10-06 09:26:06

    Participating in a meeting

     

    Getting the Chairperson's Attention

    (Mister/Madam) chairman.
    May I have a word?
    If I may, I think...
    Excuse me for interrupting.
    May I come in here?

    Giving Opinions

    I'm positive that...
    I (really) feel that...
    In my opinion...
    The way I see things...
    If you ask me,... I tend to think that...

    Asking for Opinions

    Are you positive that...
    Do you (really) think that...
    (name of participant) can we get your input?
    How do you feel about...?

    Commenting

    That's interesting.
    I never thought about it that way before.
    Good point!
    I get your point.
    I see what you mean.

    Agreeing

    I totally agree with you.
    Exactly!
    That's (exactly) the way I feel.
    I have to agree with (name of participant).

    Disagreeing

    Unfortunately, I see it differently.
    Up to a point I agree with you, but...
    (I'm afraid) I can't agree

    Advising and Suggesting

    Let's...
    We should...Vb  Obj
    Why don't you.... Vb  Obj
    How/What about...(Noun/gerund/noun phrase)
    I suggest/recommend that..SVO.

    Clarifying

    Let me spell out...
    Have I made that clear?
    Do you see what I'm getting at?
    Let me put this another way...
    I'd just like to repeat that...

    Requesting Information

    Please, could you...(tell/notify/inform) me/us…….
    I'd like you to... .(tell/notify/inform) me/us…….
    Would you mind... (/gerund/noun phrase)
    I wonder if you could...

    Asking for Repetition

    I'm afraid I didn't understand that. Could you repeat what you just said?
    I didn't catch that. Could you repeat that, please?
    I missed that. Could you say it again, please?
    Could you run that by me one more time?

    Asking for Clarification/more detail

    I don't quite follow you. What exactly do you mean?
    I'm afraid I don't quite understand what you’re getting at.
    Could you explain to me how that is going to work?
    I don't see what you mean. Could we have some more details, please?

    Asking for Verification/Confirmation

    You did say next week, didn't you? ('did' is stressed)
    Do you mean that...?
    Is it true that...?

    Asking for Spelling

    Could you spell that, please?
    Would you mind spelling that for me, please?

    Asking for Contributions

    We haven't heard from you yet, (name of participant).
    What do you think about this proposal?
    Would you like to add anything, (name of participant)?
    Has anyone else got anything to contribute?
    Are there any more comments?

    Correcting Information

    Sorry, I think you misunderstood what I said.
    Sorry, that's not quite right.
    That's not quite what I had in mind.
    That's not (really/quite) what I meant.

    Keeping the Meeting On Target (time, relevance, decisions)

    We're running short of time.
    Well, that seems to be all the time we have today.
    Please be brief.
    I'm afraid we've run out of time.
    I'm afraid that's outside the scope of this meeting.
    Let's get back on track, why don't we?
    That's not really why we're here today.
    Why don't we return to the main focus of today's meeting.
    We'll have to leave that to another time.
    We're beginning to lose sight of the main point.
    Keep to the point, please.(direct)
    I think we'd better leave that for another meeting.
    Are we ready to make a decision?

    Shall we take a vote?

  • Running a meeting

    2008-10-01 22:36:48

     

    Opening

    Good morning/afternoon, everyone.
    If we are all here, let's get started / start the meeting / start.

    Welcoming and Introducing

    Please join me in welcoming (name of participant)
    We're pleased to welcome (name of participant)
    I'd like to extend a warm welcome to (name of participant)
    It's a pleasure to welcome (name of participant)
    I'd like to introduce (name of participant)

    Stating the Principal Objectives

    We're here today to ...
    I'd like to make sure that we ...
    Our main aim today is to ...
    I've called this meeting in order to ...

    Giving Apologies for Someone Who is Absent

    I'm afraid.., (name of participant) can't be with us today. She is in...
    Unfortunately, (name of participant) ... will not be with us today because he ...
    I have received apologies for absence from (name of participant), who is in (place).

    Reading the Minutes (notes) of the Last Meeting

    To begin with I'd like to quickly go through the minutes of our last meeting.
    First, let's go over the report from the last meeting, which was held on (date)
    Here are the minutes from our last meeting, which was on (date)

    Dealing with Recent Developments

    Jack, can you tell us how the XYZ project is progressing?
    Jack, how is the XYZ project coming along?
    John, have you completed the report on the new accounting package?
    Has everyone received a copy of the Tate Foundation report on current marketing trends?

     Moving Forward

    So, if there is nothing else we need to discuss, let's move on to today's agenda.
    Shall we get down to business?
    Is there Any Other Business?
    If there are no further developments, I'd like to move on to today's topic.

    Introducing the Agenda

    Have you all received a copy of the agenda?
    There are X items on the agenda. First, ... second, ... third, ... lastly, ...
    Shall we take the points in this order?
    If you don't mind, I'd like to go in order today.
    skip item 1 and move on to item 3
    I suggest we take item 2 last.

    Allocating Roles (secretary, participants)

    (name of participant) has agreed to take the minutes.
    (name of participant), would you mind taking the minutes?
    (name of participant) has kindly agreed to give us a report on ...
    (name of participant) will lead point 1, (name of participant) point 2, and (name of participant) point 3.
    (name of participant), would you mind taking notes today?

    Agreeing on the Ground Rules for the Meeting (contributions, timing, decision-making, etc.)

    We will first hear a short report on each point first; followed by a discussion of ...
    I suggest we go round the table first.
    Let's make sure we finish by ...
    I'd suggest we ...
    There will be five minutes for each item.
    We'll have to keep each item to 15 minutes. Otherwise we'll never get through.

    Introducing the First Item on the Agenda

    So, let's start with ...
    I'd suggest we start with...
    Why don't we start with...
    So, the first item on the agenda is
    Pete, would you like to kick off?
    Shall we start with ...
    (name of participant), would you like to introduce this item?

    Closing an Item

    I think that takes care of the first item.
    Shall we leave that item?
    Why don't we move on to...
    If nobody has anything else to add, lets ...

    Next Item

    Let's move onto the next item
    Now that we've discussed X, let's now ...
    The next item on today's agenda is...
    Now we come to the question of.

    Giving Control to the Next Participant

    I'd like to hand over to (name of participant), who is going to lead the next point.
    Next, (name of participant) is going to take us through ...
    Now, I'd like to introduce (name of participant) who is going to ...

    Summarizing

    Before we close today's meeting, let me just summarize the main points.
    Let me quickly go over today's main points.
    To sum up, ...,.
    OK, why don't we quickly summarize what we've done today.
    In brief, ...
    Shall I go over the main points?

    Finishing Up

    Right, it looks as though we've covered the main items.
    If there are no other comments, I'd like to wrap this meeting up.
    Let's bring this to a close for today.
    Is there Any Other Business?

    Suggesting and Agreeing on Time, Date and Place for the Next Meeting

    Can we set the date for the next meeting, please?
    So, the next meeting will be on ... (day), the . . . (date) of.. . (month) at ...
    Let's next meet on ... (day), the . . . (date) of.. . (month) at ... What about the following Wednesday? How is that?

    Thanking Participants for Attending

    I'd like to thank Marianne and Jeremy for coming over from London.
    Thank you all for attending.
    Thanks for your participation.

    Closing the Meeting

    The meeting is finished, we'll see each other next ...
    The meeting is closed.
    I declare the meeting closed.

  • 看完了Reasearch-Based Design & Usability Guildlines

    2008-09-27 16:41:55

    标记一下!
  • Language for Meetings

    2008-09-27 09:44:34

    I - Introductions

    Opening the Meeting
    Welcoming and Introducing Participants
    Stating the Principal Objectives of a Meeting
    Giving Apologies for Someone Who is Absent

    II - Reviewing Past Business

    Reading the Minutes (notes) of the Last Meeting
    Dealing with Recent Developments

    III - Beginning the Meeting

    Introducing the Agenda
    Allocating Roles (secretary, participants)
    Agreeing on the Ground Rules for the Meeting (contributions, timing, decision-making, etc.)

    IV - Discussing Items

    Introducing the First Item on the Agenda
    Closing an Item
    Next Item
    Giving Control to the Next Participant

    V - Finishing the Meeting

    Summarizing
    Finishing Up
    Suggesting and Agreeing on Time, Date and Place for the Next Meeting
    Thanking Participants for Attending
    Closing the Meeting

  • Phone English

    2008-09-27 09:09:40

    Checking for Understanding

    Is that clear?

    Do you know what I mean?

    Do you follow?

    Are you following?

    Request clarification or Repetition

    sorry,I didn‘t quite catch that.

    sorry,could you repeat that please?

    sorry,I am not really following you.

    could you clarify that for me?

    Confirm understanding/Double checking

    OK(repetition)

    All right(repetition)

    Understood(repetition)

    Got it(repetition)

    Roger that(repetition)

    Copy that(repetition)

    DO you mean....

    So your point is...

    SO if I understood correctly....

    Language Problems

    I am not sure I understood you, could you please simplify/rephrase it?

    what was that word?

    could you spell that for me?

     

     

     

  • Live Style

    2008-09-27 08:51:17

    Simple

    Stressful

    colorful(interesting)

    leisurely

    lonely

    healthy

    economical-extravagant

    frugal-luxurious

    thrifty

    busy-idle

    tiring

    traditional

     

  • How to write better Test Cases(二)

    2008-09-09 15:32:57

    Handling challenges to good test cases

    Challenge: Requirements changes

    Response:

    1.     最好的降低的风险的方法是能够得到通知,在写case之前,或是每个项目状态会议,找出改变的需求引起风险最大的地方,找出那些case受到影响,哪些不会,险些不受变更影响的case

    2.     制定variables or "to be decided"case目录,以后继续填写。

    3.     让制定预算的人知道修订case的成本。

    4.     项目管理制定case修订的优先级。

    5.     发布不太正确的没有修订的case。让测试人员标出那些需要修改的case,制定计划的时候要考虑测试加维护的时间。

    Challenge: Schedule changes

    Response:

    1.     如果测试日期提前,让项目管理人员讨论出那些case受到影响,如同需求改变一样,让他们选择哪些方面可以冒险。

    2.     如果时间允许有12个星期培训新人并能进入项目中,可以添加人手,最好有导师可以指导他们工作。

    3.     改变写case的次序,优先写最先要测试的case

    4.     case简化成被测的需求和配置。制定多一些的时间测试这样的case

    5.     让一些人先测试,然后记录测试的过程。

    Challenge: Staff turnover

    Response:

    1.     新员工需要了解有文字记录的项目架构,进度,目标等,口头上的一些信息就丢失了。

    2.     新员工更多是关注软件的业务使用,然后才是需求和原型,写出的case较少。

    3.     要对新员工进行实用的培训,组好有实践的例子,并在早期对他们的工作进行检查。

    4.     让新员工参与需要较高技术的case

     

    Test case assets

    Protecting test case assets

    维护有价值case的标准:

    命名和编号的惯例;

    格式和文件类型;

    版本;

    Case的测试对象,如数据库;

    只读存储;

    受限访问;

    隔离备份。

    Test Case Checklist

    Quality Attributes

    o Accurate - tests what the descrīption says it will test.

    o Economical - has only the steps needed for its purpose

    o Repeatable, self standing - same results no matter who tests it.

    o Appropriate - for both immediate and future testers

    o Traceable - to a requirement

    o Self cleaning - returns the test environment to clean state

    Structure and testability

    o Has a name and number

    o Has a stated purpose that includes what requirement is being tested

    o Has a descrīption of the method of testing

    o Specifies setup information - environment, data, prerequisite tests, security access

    o Has actions and expected results

    o States if any proofs, such as reports or screen grabs, need to be saved

    o Leaves the testing environment clean

    o Uses active case language

    o Does not exceed 15 steps

    o Matrix does not take longer than 20 minutes to test

    o Automated scrīpt is commented with purpose, inputs, expected results

    o Setup offers alternative to prerequisite tests, if possible

    o Is in correct business scenario order with other tests

    Configuration management

    o Employs naming and numbering conventions

    o Saved in specified formats, file types

    o Is versioned to match software under test

    o Includes test objects needed by the case, such as databases

    o Stored as read

    o Stored with controlled access

    o Stored where network backup operates

    o Archived off-site

     

  • How to write better Test Cases

    2008-09-08 13:38:04

    How to write better Test Cases

    by Dianne L. Runnels

    Investing in test cases

    好的case包括三项:

     1. Productivity - less time to write and maintain cases

    2. Testability - less time to execute them

    3. Scheduling reliability- better reliability in estimates

    1. Productivity-书写和维护需要较少的时间

    2. Testability-执行test cases需要较少的时间

    3. Scheduling reliability-评估时可靠性更高。

    Looking inside test cases

    Cases包括的元素:

    1.     测试的目的或是描述出哪个需求被测试到;

    2.     测试方法;

    3.     测试步骤:应用程序的版本号,硬件,软件,操作系统,数据文件,安全接入,时间,逻辑或物理数据,及其他测试的前提提条件和设备相关的建立信息;

    4.     期望结果,输入或暑促;

    5.     附件(可选).

     

    Quality of test cases:

    case的质量是客观并可测量的。建立客观的checklist很简单。Cases必须要满足的质量标准:

    Accurate:根据case的描述测试。

     

    Economical:只是描述测试目的相关的步骤,不给出软件使用的向导。

     

    Repeatable, self standing:测试的每一条case,无论测试时间和测试者的结果都是一样的。如果一条case不同的测试人员得出不同的测试结果,就需要在case的建立和步骤上多做些工作,看case是否写得准确。

     

    Appropriate:考虑case执行的测试者和测试环境的可实施性。如果理论上要求的技术测试者不具备,case就需要搁置。

     

    Self cleaning: 能够回到测试之前的测试环境。

     

    Using test types

    Best uses for each type of case

    Step-by-step

    一步的用例,每步都不同;

    业务场景变化频繁;

    许多处理的规则;

    GUI接口;

    输入和输出很难表现在matrix上。

     

    Matrix

    有许多变量去填表格,相同的域,不同的值,输入文件;

    相同的输入,不同的平台,浏览器,配置;

    Character based screens;

    输入和输出能够很好的表现在matrix上。

    Choosing a test type

     

    错误观念一:Step-by-step test cases需要花费很多时间,承担不起。

    Reality:也不全需要很多时间写cases 细的颗粒度让cases更强健,维护更简单,如需要充分详尽测试某些功能,就要采用step-by-step test cases

     

    错误观念二:Matrix是最好的选择。

    RealityMatrix上必须有配置的信息,经常这些信息被遗漏,如果是不同的配置和种类,很难放到matrix上。

     

    错误观念三:高技术就是最好的,如果能实用自动化,就用。

    Reality:使用自动测试由好多因素决定。

     

    错误观念四:没有时间写手动的test cases,就采用自动测试。

    Reality:自动测试的用例要比两外两种的用例花费更长的时间。

    Improving test cases

    Improving testability of test cases

    Testability的定义就是准确的容易测试,容易的程度可以用执行测试的时间长短来度量,准确是指按照测试步骤执行,测试通过和不过的结果是正确的。

    Improving testability with language

    写测试用例要实用主动语态,告诉测试人员要做什么;

    An easy habit to fall into if we know a subject inside and out is to refer to the same thing in different ways.

    Testing can be accelerated if you build in structured fields for the tester to note inputs that will be verified later.

    Improving testability by controlling length

    Step-by-step 的用例的最佳长度是10-15个步,用例简短有以下几个好处:

    测试每步花较短的时间;

    测试人员不易犯错,或不知道如果执行而需要帮助;

    测试精力能准确估计测试需要的时间;

    测试结果更容易追踪。

    Matrix的最贱长度是执行差不多20分钟的时间。

    自动测试脚本的问题不是长度的问题,而是内容,维护和缺陷追踪的管理问题,业务场景或用例是否充分,是否可以载入不同数据可变量组合执行多次。

    Pros and cons of cumulative cases

    Cumulative cases 是指那些依赖于以前casecase。我们的目标是尽量保证每条测试用例的独立性,这个对时间安排测试很灵活,并且能减少维护时间,但是,弊端局势和其它的一些标准违背,比如保持case的简短,并且不重复。

    Improving productivity with templates

    Improving productivity with clones

    Improving productivity with clones

    Mistakes and challenges

    The seven most common test case mistakes

    1. Making cases too long

    2. Incomplete, incorrect, or incoherent setup

    3. Leaving out a step

    4. Naming fields that changed or no longer exist

    5. Unclear whether tester or system does action

    6. Unclear what is a pass or fail result

    7. Failure to clean up

    1.Case太长;

    2.Setup信息不完整,不正确;

    3.遗留了某个测试步骤;

    4.对改变的或是不存在的域命名;

    5.不清楚测试者或系统是否可以执行测试步骤;

    6.不清楚通过与否的结果是什么;

    7.不能回复到测试之前。

     

  • Software Project Management-Microsoft(二)

    2008-02-25 16:24:13

    Project Management phases

    Step1:Initiating

    Step2:Planning

    Executing

    Step 5:Closing

    Publish project charter

    Publish project plan

    Goal:Deliver the new product or service

    Goal:Ensure the project plan is working and on-track. Revise as necessary.

    Goal:Close out.Documentation.

    Step4:Monitoring &Controlling

    .What’s project management?

    1.Project Management

    Application of knowledge, skills, tools and techniques to project activities to meet project requirements.

    2. Project Manager

    The people who does project management.

    3.Project

    Temporary endeavor.

    Unique product, service or result.

    Require resources.

    Should have a project sponsor.

    4.Program

    Group of related projects.

    5.Program manager

    Translates business to technical requirements, and manages one, usually more projects.

    .Triple constraints

    1.It is critical that a PM balance the triple constraints. (Time-schedule,cost-resources,scope-features).

    2.You always have at least 3 options.

    .Microsoft Solution Framework

    1.Microsoft Team Mode

     

     

    Program Management

    Product Management

    Development

    User Experience

    Test

    Realease Management

    Delivering the solution within project constraints.

    Satisfied customers

    Building to specification

    Enhanced user effectiveness

    Approval for release only after all quality issues are identified and addressed

    Smooth deployment and ongoing operations

    2. Multi-versioning delivery

    1)Force closure on project issues.

    2)Set clear and motivational goals with all team members.

    3)Manage the uncertainty and change in project scope

    4)Encourage continuous and incremental feature delivery

    5)Enable shorter time to market

    3.MSF project

     

    4. Standard MSF Deliverables

    I Envisioning:”Vision Approved” Milestone

    1)Vision document

    2)Risk assessement

    3)Project strcture document

    ii Planning:”Scope(调查) complete” Milestone

    1)     Functional specification

    2)     Risk assessment

    3)     Project schedule

    4)     Operation and support information systems

    Procedures and processes

    Knowledge base,reports,logbooks

    iii Developing:”Code complete” Milestone

    1)     Frozen functional specification

    2)     Risk management Plan

    3)     Source code and executables

    4)     Performance support elements

    5)     Test specification and test cases

    6)     Master project plan and master project schedule

    iv Stabilizing:”Release” Milestone

    1)     Golden release

    2)     Release notes

    3)     Performance support elements

    4)     Test results and testing tools

    5)     Source code and executables

    6)     Project documents

    7)     Milestone review

    V Deploying:”Deployment comlete” Milestone

    1)Documentation repository for all versions of documents, load sets, and code developed during the project.

    2)Project close-out(抛售,停止) report

    3)Final versions of all project documents

    4)Customer/user satisfaction data

    5)Definition of next steps

    5. PMI vs. MSF(Phase 1)

    .Initiating(PMI)

    ---Business case

    ---Project Charter

    ---Preliminary(初步的) scope statement

    ---Project charter review and approval

    .Envision(MSF)

    ---Value Prop./Vision doc.

    ---Project startup checklist.

    ---Solution assessment

    ---Risk strategy plan

    ---Role segmentation for Date or Transaction Processing Access.

    6.PMI vs. MSF(phase 2)

    Planning(PMI)

    ---Scope definition

    ---Work breakdown (细节分类)structure

    ---“Knowledge area” plans

    ---Overall project plan

    ---Review and approval of Project plan(baseline)

    .Design(MSF)

    ---Functional spec

    ---Solution ROI(Return on investment)

    ---Communication plan

    ---Technical specs

    ---UAT(user accept testing) plan

    ---Training plan

    ---Change control plan

    ---Test plan Review & Sign-off

    ---Baseline Approval & Sign-off

    7.PMI vs. MSF(phase 3)

    .Executing(PMI)

    ---Acquire and develop the project team using WBS(Work Breakdown Structure) as a guide

    ---Request seller responses and select sellers to support external vendor needs

    ---Distribute information and communicate as noted in communications plan

    ---Direct and manage project execution

    ---Perform quality assurance

    ---Solution delivered

    Notes: WBS is also known as work breakdown system. it is a map of the project that identifies the products and work elements involved in a project.WBS is an outline of the project with differernt levels of details,it defines the relationship of the final deliverable to its subdeliverables,and in return, their work packages.
    WBS helps to assume project managers that all the work are identified and established.

    .Development(MSF)

    ---Executable code

    ---Test spec cases & scrīpts

    ---Complete data inventory(目录) web form

    ---Deployment plan

    ---Privacy statement

    ---Operations support guide

    ---UAT test cases & review

    ---Training Validation

    ---Code complete

    8.PMI vs. MSF (Phase 4)

    ---Monitor and control all project work

    ---Manage integrated change control as defined in the project plan

    ---Manage the project team

    ---Manage project stakeholders

    ---Report performance

    ---Monitor and control risk

    ---Administrate external seller contracts

    .Stabilize(MSF)

    ---User acceptance approval

    ---Deployment plan

    ---Contingency (紧急事件,偶然性)plan

    ---Operations support guide

    ---Data validation & conversion

    ---Solution assessment Documentation

    ---Security & Privacy Comprehensive assessments

    ---Go/No-Go meeting

    9.PMI vs. MSF(Phase 5)

    .Closing (PMI)

    ---Accept deliverables

    ---Document final lessons learned

    ---Facilitate closure, including contracts

    ---Customer Acceptance

    .Deploy(MSF)

    ---Update the Business continuity(连贯性,连续性) & Disaster Recovery Plan

    ---Post Mortem

    ---Follow-up with the showcase team

    ---Go live

    ---Project closeout

    9.Phase 6(MSF only)

    .Production(MSF)

    ---Based on the Microsoft Operations Framework for service management, activities focus on change and release management, system and security administration, support management, and operations optimization.

     

     

  • Software Project Management-Microsoft(一)

    2008-02-25 16:17:49

    ..Project management by PMI

    1.PMI-definded process

    PMI=Project Management Institute

    A process is a series of actions directed toward a particular result.

    Project management can be viewed as a number of interlinked(衔接的) processes.

    PMI defines 5 project management process groups:

    ---Initiating

    ---Planning

    ---Executing

    ---Monitoring and controlling

    ---Closing

    2.PMI-defined project Life-cycle

     

    Project Management phases

    Step1:Initiating

    Step2:Planning

    Executing

    Step 5:Closing

    Publish project charter

    Publish project plan

    Goal:Deliver the new product or service

    Goal:Ensure the project plan is working and on-track. Revise as necessary.

    Goal:Close out.Documentation.

    Step4:Monitoring &Controlling

    .What’s project management?

    1.Project Management

    Application of knowledge, skills, tools and techniques to project activities to meet project requirements.

    2. Project Manager

    The people who does project management.

    3.Project

    Temporary endeavor.

    Unique product, service or result.

    Require resources.

    Should have a project sponsor.

    4.Program

    Group of related projects.

    5.Program manager

    Translates business to technical requirements, and manages one, usually more projects.

     

    Project Management phases

    Step1:Initiating

    Step2:Planning

    Executing

    Step 5:Closing

    Publish project charter

    Publish project plan

    Goal:Deliver the new product or service

    Goal:Ensure the project plan is working and on-track. Revise as necessary.

    Goal:Close out.Documentation.

    Step4:Monitoring &Controlling

  • Python学习笔记(五)

    2008-01-21 18:20:45

    模块

    1.     简介

    模块基本上就是一个包含了所有定义的函数和变量的文件,为了在其他程序中重用模块,模块的文件名必须以.py为扩展名.

    例子:

    import sys

    print 'The command line arguments are:'

    for i in sys.argv:

        print i

    print '\n\nThe PYTHONPATH is',sys.path,'\n'

    2.     字节编译的.pyc文件

    通常认为,Python是一种解释性的语言,但是这种说法是不正确的,实际上,Python在执行时,首先会将.py文件中的源代码编译成Pythonbyte code(字节码),然后再由Python Virtual Machine来执行这些编译好的byte code。这种机制的基本思想跟Java.NET是一致的。然而,Python Virtual MachineJava.NETVirtual Machine不同的是,PythonVirtual Machine是一种更高级的Virtual Machine。这里的高级并不是通常意义上的高级,不是说PythonVirtual MachineJava.NET的功能更强大,更拽,而是说和Java.NET相比,PythonVirtual Machine距离真实机器的距离更远。或者可以这么说,PythonVirtual Machine是一种抽象层次更高的Virtual Machine

    Python在执行CodeObject.py时,首先需要进行的动作就是对其进行编译, 编译的结果当然有字节码, 然而除了字节码之外,还包含其它一些结果,其中包含了一些字符串,一些常量值,还有一些操作。实际上,这些在Python源代码中包含的静态的信息都会被Python收集起来,编译的结果中包含了字符串,常量值,字节码等等在源代码中出现的一切有用的静态信息。而这些信息最终会被存储在Python运行期的一个对象中,当Python运行结束后,这些信息甚至还会被存储在一种文件中: PyCodeObject对象和Pyc文件。.

    每一个PyCodeObject对象中都包含了每一个代码块经过编译后得到的byte code。但是不幸的是,Python在执行完这些byte code后,会销毁PyCodeObject,所以下次再次执行这个.py文件时,Python需要重新编译源代码,Python应该提供一种机制,保存编译的中间结果,即byte code,或者更准确地说,保存PyCodeObject。事实上,Python确实提供了这样一种机制——Pyc文件。在执行一个.py文件中的源代码之后,Python并不会自动生成与该.py文件对应的.pyc文件。我们需要自己触发Python来创建pyc文件。在Python运行的过程中,如果碰到import abc,这样的语句,那么Python将到设定好的path中寻找abc.pycabc.dll文件,如果没有这些文件,而只是发现了abc.py,那么Python会首先将abc.py编译成相应的PyCodeObject的中间结果,然后创建abc.pyc文件,并将中间结果写入该文件。接下来,Python才会对abc.pyc文件进行一个import的动作,实际上也就是将abc.pyc文件中的PyCodeObject重新在内存中复制出来.

    3.     from..import语句

    如果你想要直接输入argv变量到你的程序中(避免在每次使用它时打sys.),那么你可以使用from sys import argv语句。如果你想要输入所有sys模块使用的名字,那么你可以使用from sys import *语句。这对于所有模块都适用。一般说来,应该避免使用from..import而使用import语句,因为这样可以使你的程序更加易读,也可以避免名称的冲突。

    4.from…import语句

    如果你想要直接输入argv变量到你的程序中(避免在每次使用它时打sys.),那么你可以使用from sys import argv语句。如果你想要输入所有sys模块使用的名字,那么你可以使用from sys import *语句。这对于所有模块都适用。一般说来,应该避免使用from..import而使用import语句,因为这样可以使你的程序更加易读,也可以避免名称的冲突。

    4.     模块的_name_

    每个模块都有一个名称,在模块中可以通过语句来找出模块的名称。这在一个场合特别有用——就如前面所提到的,当一个模块被第一次输入的时候,这个模块的主块将被运行。假如我们只想在程序本身被使用的时候运行主块,而在它被别的模块输入的时候不运行主块,我们该怎么做呢?这可以通过模块的__name__属性完成。

    使用模块的_name_的例子:

    if __name__=='__main__':

        print 'this program is being run by itselt.'

    else:

    print 'i am being imported from another module.'

    模块是对象,并且所有的模块都有一个内置属性__name__.如果import模块,那么__name__的徝通常为模块的文件名,不带路径或者文件扩展名.也可以象一个标准程序一样直接运行模块,这种情况下__name__的徝将是一个特别的缺省徝,__main__.

    5.     制造你自己的模块

    例子:
    def sayhi():

        print 'hi,this is mymodule speaking.'

    version='0.1'

    import mymodule

    mymodule.sayhi()

    print 'version',mymodule.version

    使用from…import的语法版本

    from mymodule import sayhi,version

     

    sayhi()

    print 'version',version

    6.     dir()函数

    使用内建的dir函数来列出模块定义的标识符。标识符有函数、类和变量。

    当你为dir()提供一个模块名的时候,它返回模块定义的名称列表。如果不提供参数,它返回当前模块中定义的名称列表。

    Del用来删除一个变量名称.

  • Python学习笔记(四)

    2008-01-21 18:16:53

    函数

    1.     简介

    函数通过def关键字定义,def关键字后跟一个函数的标识符名称,然后跟一对圆括号.圆括号中可以包括一些便两名,该行以冒号结尾.接下来是一块语句,它们是函数体.

    定义函数的例子:

    def function():

        print 'how to define a function.'

     

    function()

    2.     函数的形参

    函数中的参数名称称为形参,提供给函数调用的值称为实参.

    使用函数形参的例子:

    def printmax(a,b):

        if a>b:

            print a,"is maximum."

        else:

            print b,"is maximum."

    printmax(3,4)

    x=5

    y=7

    printmax(x,y)

    3.     局部变量

    当在函数内声明变量的时候,它们与函数外具有相同名称的其他变量没有任何关系,即变量名称对于函数来说是局部的,这称为变量的作用域.所有变量的作用域是它们被定义的块,从它们的名称被定义的那点开始.

    使用局部变量的例子:

    def func(x):

        print 'x is',x

        x=2

        print 'changed local x to',x

    x=50

    func(x)

    print 'x is still',x

    4.     默认参数值

    对于一些函数,参数是可选的,如果用户不想为这些参数供值的话,参数就使用默认值.可以在函数定义的形参名后加上赋值运算符(=)和默认值,从而给形参指定默认参数值.

    注意:只有在形参表末尾的那些参数可以有默认参数值.

    例子:

    def say(message,times=1):

        print message*times

    say('hello')

    say('world',5)

    5.     关键参数

    如果某个函数有许多参数,只想指定其中的一部分,可以通过命名来为这些参数赋值-这些被称作关键参数,使用名字(关键字)而不是位置来给函数指定实参.

    6.     Return语句

    Retrun语句用来从一个函数返回即跳出函数.

    例子:

    def maximum(x,y):

        if x>y:

            return x

        else:

            return y

    print maximum(6,7)

    7.     Docstrings

    文档字符串,是一个重要工具,帮助程序更加简单易懂.

    在函数的第一个逻辑行的字符串是这个函数的文档字符串,文档字符串的惯例是一个多行字符串,首行以大写字母开始,句号结尾,第二行是空行,的三行开始是详细的描述.

    例子:

    def printMax(x,y):

        '''Prints the maximum of two numbers.

     

         The two values must be ingegers.'''

        x=int(x)

        y=int(y)

        if x>y:

            print x,'is maximum'

        else:

            print y,'is maximum'

    printMax(3,5)

    help (printMax)

    备注:

    python中,有多种方式可以用来查询相关的帮助信息,各种方式可以提供详略不同的内容。
    首先,可以看程序文件中的注释。这是一个程序最基本的帮助信息。对于一个程序并不是每个人都可以看到原文件,此外这个注释信息一般比较散乱,因此,这并不是一种好方法。不过不用担心,python提供了足够多的选择。
    第二,在交互模式中可以使用内置dir()函数列出一个对象有哪些属性和方法。dir()只列出相关的属性和方法的名字,并不提供具体的解释。
    第三,查看对象的__doc__属性。在一个模块被import时,其文件中的某些特殊的字符串会被python解释器保存在相应对象的__doc__属性中。比如,一个模块有模块的__doc__,一个classfunction也有其对应的__doc__属性。在python中,一个模块其实就是一个.py文件。在文件中特殊的地方书写的字符串就是所谓的docstrings,就是将被放到__doc__的内容。这个特殊的地方包括:

    1.  一个文件任何一条可执行的代码之前  #模块的__doc__

    2.  一个类,在类定义语句后,任何可执行代码前 #类的__doc__

    3.  一个函数,在函数定义语句后,任何可执行代码前 #函数的__doc__

    docstrings对于放在什么地方是有要求的,但是什么内容则没有硬必珠规定。因此,完成可以在这些地方放上HTMl代码,方便用别的式具产生html的帮助文件。
    第四,pydoc工具。这个工具可以提供类似于unixman页的帮助信息。使用这个工具有两种方式。在交互模式中,可以使用内置函数help(object)来调用pydoc的功能。此外,pydoc也可以单独使用。

    ·  pydoc <name>  #用于显示与name相关的内容

    ·  pydoc -k <keyword> #在概要行及模块中搜索keyword

    ·  pydoc -p <port>
    #
    pydoc作为一个httpd运行,提供网页访问服务,地址为http://localhost:<port>

    ·  pydoc -g #使用图形界面提供帮助信息

    ·  pydoc -w <name>
    #
    生成html格式的帮助文件,name可以是一个python模块名,方法名,如果包含‘/’表示这是个文件名。name还可以是一个目录名,这样会产生这个目录下所有.py文件的相关帮助信息

  • Python学习笔记(三)

    2008-01-11 17:10:03

    2.运算符优先级

    运算符

    描述

    lambda

    Lambda表达式

    or

    布尔

    and

    布尔

    not x

    布尔

    innot in

    成员测试

    isis not

    同一性测试

    <<=>>=!===

    比较

    |

    按位或

    ^

    按位异或

    &

    按位与

    <<>>

    移位

    +-

    加法与减法

    */%

    乘法、除法与取余

    +x-x

    正负号

    ~x

    按位翻转

    **

    指数

    x.attribute

    属性参考

    x[index]

    下标

    x[index:index]

    寻址段

    f(arguments...)

    函数调用

    (experession,...)

    绑定或元组显示

    [expression,...]

    列表显示

    {key:datum,...}

    字典显示

    'expression,...'

    字符串转换

    lambda比较迷惑

    3.表达式

    控制流

    1.     if语句

    if语句用来检验一个条件, 如果 条件为真,我们运行一块语句(称为 if- ), 否则 我们处理另外一块语句(称为 else- )。 else 从句是可选的。

    例子:

    number=23

    guess=int(raw_input('enter an integer:'))

    if guess==number:

        print 'right.'

        print "(but you do not win any prizes!)"

    elif guess<number:

        print 'no,it is a little higher than that.'

    else:

        print 'no,it is a little lower than that.'

    print 'done.'

    2.     while语句

    只要在一个条件为真的情况下,while语句允许重复执行一块语句,while语句是所谓循环语句的一个例子,while语句有一个可选的else从句.

    True false被称作布尔类型,可以等效的理解为值10.

    例子:

    number=23

    running=True

    while running:

        guess=int(raw_input('enter an integer:'))

        if guess==number:

            print 'right.'

            running=False

        elif guess<number:

            print 'no,it is a little higher than that.'

        else:

            print 'no,it is a little lower than that.'

    else:

        print 'the while loop is over.'

    print 'done.'

    3.      for循环

    For…in在一序列对象上递归即逐一使用队列中的每个项目.

    内建的range函数生成数的序列,默认的,range步长是1,如果为range提供第三个数,那么它就是步长,range向上延伸到第二个数,即它不包含第二个数.

    例子:

    for i in range(1,89,2):

        print i

    else:

    print 'the for loop is over.'

    4.     break 语句

    break语句用来终止循环语句的,即哪怕循环条件没有称为false或序列还没有完全递归,也停止执行循环语句.

     例子:

    while True:

        s=raw_input('enter something:')

        if s=='quit':

            break

        print 'Length of the string is',len(s)

    print 'done.'

    5.     continue语句

    continue语句被用来告诉Python跳过当前循环块中的剩余语句,然后,继续进行下一轮循环.

    例子:

    while True:

        s=raw_input('enter something:')

        if s=='quit':

            break

        if len(s)<3:

            continue

        print 'input is of sufficient length.'

  • Python学习笔记(二)

    2008-01-11 17:06:14

    运算符与表达式

    1.运算符

    运算符与它们的用法

    运算符

    名称

    说明

    例子

    +

    两个对象相加

    3 + 5得到8'a' + 'b'得到'ab'

    -

    得到负数或是一个数减去另一个数

    -5.2得到一个负数。50 - 24得到26

    *

    两个数相乘或是返回一个被重复若干次的字符串

    2 * 3得到6'la' * 3得到'lalala'

    **

    返回xy次幂

    3 ** 4得到81(即3 * 3 * 3 * 3

    /

    x除以y

    4/3得到1(整数的除法得到整数结果)。4.0/34/3.0得到1.3333333333333333

    //

    取整除

    返回商的整数部分

    4 // 3.0得到1.0

    %

    取模

    返回除法的余数

    8%3得到2-25.5%2.25得到1.5

    << 

    左移

    把一个数的比特向左移一定数目(每个数在内存中都表示为比特或二进制数字,即01

    2 << 2得到8——2按比特表示为10

    >> 

    右移

    把一个数的比特向右移一定数目

    11 >> 1得到5——11按比特表示为1011,向右移动1比特后得到101,即十进制的5

    &

    按位与

    数的按位与

    5 & 3得到1

    |

    按位或

    数的按位或

    5 | 3得到7

    ^

    按位异或

    数的按位异或

    5 ^ 3得到6

    ~

    按位翻转

    x的按位翻转是-(x+1)

    ~5得到6

    < 

    小于

    返回x是否小于y。所有比较运算符返回1表示真,返回0表示假。这分别与特殊的变量TrueFalse等价。注意,这些变量名的大写。

    5 < 3返回0(即False)而3 < 5返回1(即True)。比较可以被任意连接:3 < 5 < 7返回True

    > 

    大于

    返回x是否大于y

    5 > 3返回True。如果两个操作数都是数字,它们首先被转换为一个共同的类型。否则,它总是返回False

    <=

    小于等于

    返回x是否小于等于y

    x = 3; y = 6; x <= y返回True

    >=

    大于等于

    返回x是否大于等于y

    x = 4; y = 3; x >= y返回True

    ==

    等于

    比较对象是否相等

    x = 2; y = 2; x == y返回Truex = 'str'; y = 'stR'; x == y返回Falsex = 'str'; y = 'str'; x == y返回True

    !=

    不等于

    比较两个对象是否不相等

    x = 2; y = 3; x != y返回True

    not

    布尔

    如果xTrue,返回False。如果xFalse,它返回True

    x = True; not y返回False

    and

    布尔

    如果xFalsex and y返回False,否则它返回y的计算值。

    x = False; y = True; x and y,由于xFalse,返回False。在这里,Python不会计算y,因为它知道这个表达式的值肯定是False(因为xFalse)。这个现象称为短路计算。

    or

    布尔

    如果xTrue,它返回True,否则它返回y的计算值。

    x = True; y = False; x or y返回True。短路计算在这里也适用。

  • Python学习笔记(一)

    2008-01-09 17:00:46

    摘要

    Python是一种容易学习的强大语言,包括了高效的数据结构,提供了一个简单但很有效的的方式便于进行面向对象编程.Python的解释器很容易通过CC++实现功能和数据结构的扩展.因此Python很适于做为定制应用的一种扩展语言.

              程序员长寿指南

              Google使用的三大主要语言之一

              国外多家大学的计算机编程教学语言,包括多伦多大学等

              MIT在今年初用Python课程替代了LISP

    1.特性

              简单,革命性的语法设计

              通用语言,面向对象

              基于虚拟机,跨平台

              DuckType

              最初使用C语言实现,支持扩展,开源

              现在在DotNetJava平台实现

    2.应用

              WEB开发

              胶水语言

              游戏(嵌入式脚本)

              多媒体应用

              应用程序开发

    Windows用户安装Python

    Windows用户可以访问Python.org/download,从网站下载最新版本安装.安装过程与其它windows软件类似.

     

    初识python

    1.       Python运行程序的方式-使用交互式的带提示符的解释器或使用源文件.

    2.       使用带提示符的解释器

    对于windows 用户,可以选择使用IDLE程序,IDLE是集成开发环境的缩写,点击开始->程序->Python.

    >>>是键入Python语句的提示符.

    3.       挑选一个编辑器

    对于编辑器的要求之一是语法加亮功能,如果使用windows,建议使用IDLE,IDLE具备语法加亮功能.不要使用Notepad,它没有语法加亮功能,也不支持缩进.

    4.       获取帮助

    使用内建的help功能,比如运行help(str)-就会显示str类的帮助.

    基本概念

    1.字面意义上的常量: 如同51.239.25e-3这样的数,或者如同'This is a string'"It's a string!"这样的字符串。

    2.:

    Python中有4种类型的数——整数、长整数、浮点数和复数。

    • 2是一个整数的例子。
    • 长整数不过是大一些的整数。
    • 3.2352.3E-4是浮点数的例子。E标记表示10的幂。在这里,52.3E-4表示52.3 * 10-4
    • (-5+4j)(2.3-4.6j)是复数的例子。

    3.字符串

    1)使用单引号(’)

    可以使用单引号指示字符串,所有的空白,即空格和制表符都原样保留.

    2)使用双引号(“)

    双引号的字符串与单引号中的字符串完全相同.

    3)使用三引号(’’’”””)

    利用三引号,可以指示一个多行的字符串.可以在三引号中自由的使用单引号和双引号.

    5.     转义符

    可以用转义符\\来指示反斜杠本身.

    在一个字符串中,行末的一个单独的反斜杠表示字符串在下一行继续,而不是开始新的一行.

    6.     自然字符串

    如果想要指示某些不需要如转义符那样的特别处理的字符串,需要定义一个自然字符串.自然字符串通过给字符串上前缀rR来指定.

    7.     Unicode字符串

    需要一个支持Unicode的编辑器,如果Python允许处理Unicode文本-你只需要在字符串前加上前缀uU.

    Python输出中文的解决方案:

    (1.   \python20\Lib\   中的   site.py   217    
      encoding   =   "ascii"    
     
    改为    
      encoding   =   "mbcs"    
       
      2.
      \python20\tcl   中的资料    
      \python20\tcl\tcl8.3    
      \python20\tcl\tk8.3    
     
    复制到Lib中成为    
      \python20\Lib\tcl8.3    
      \python20\Lib\tk8.3    )

    8.字符串是不可变的

    创造的字符串就不可能改变.

    9.安字面意义级连字符串

    如果两个字符串按字面意义相邻放着,会被Python自动级联.

    10.变量

    变量只是在计算机存储信息的一部分内存,可以使用变量存储任何东西.
    11.
    标识符的命名

    1)     标识符的第一个字符必须是字母表中的字母(大写或小写)或者一个下划线(‘_’)

    2)     标识符名称的其它部分可以由字母(大写或小写),下划线(‘_’)或数字(0-9)组成.

    3)     标识符名称对大小写敏感

    11.数据类型

    变量可以处理不同类型的值,称为数据类型,基本的类型是数和字符串.

    12.对象

    Python把在程序中用到的任何东西都称为对象.

    13.逻辑行与物理行

    物理行是编写程序所看见的,逻辑行是python看见的单个语句.Python假定每个物理行对应一个逻辑行.如果想要在一个物理行中使用多于一个逻辑行,那么需要使用分号(;)标明.

    14.缩进

    行首的空白很重要,称为缩进,在逻辑行首的空白(空格和制表符)用来决定逻辑行的缩进层次,从而决定语句的分组.

    如何缩进:

    不要混合使用制表符和空格来缩进,因为是跨越不同的平台,无法正常工作,监视缩进层次使用单个制表符或两个或四个空格,选择这三种风格之一,选择一种风格,要一贯的使用它.

     

391/212>
Open Toolbar