TopCoder Component Competition研究

来源:互联网 发布:js实现base64编码 编辑:程序博客网 时间:2024/05/22 23:51

以前只参加过TopCoderAlgorithm Competion,但是问过很多参加了工作的朋友,他们都告诉我实际工作中算法的使 用不是特别地多,而且项目的完成最重要的也不是算法,大部分的项目都有成熟的算法基础。软件项目的完成过程中的struct design,  cooperation, communication, test 都是很重要的。所以一直想尝试一下TopCoderComponent方面的比赛,以此体会真实项目的感觉。
    
不过似乎以前的大部分精力都放在参加ACM上了,对于java研究地太少(Component大部分的project都是java.net)。所以在这里把需要学习的知识列出来,等我把这些都熟悉了,就可以参加Component的比赛了。
    
整理出来的学习资料主要从TopCoder memberYanbo Wu PPT讲稿中获得。希望想参加component design的朋友可以从中得到帮助。
    
前期准备:
    knowledge Requirements
        Java or .net knowledge (required)
        UML knowledge (designer)
        Unit tests (developer)
    Recommended books to read
        Effective Java
        Thinking in …
        Design Patterns
    Read the documents
        How to compete  ( http://www.topcoder.com/tc?module=Static&d1=dev&d2=support&d3=devGettingStarted )
        Tutorials       ( http://www.topcoder.com/tc?module=Static&d1=dev&d2=support&d3=devDocumentation )
        Member Guide    ( http://www.topcoder.com/tc?module=Static&d1=dev&d2=support&d3=devMemberGuide )
    Prepare the softwares
        UML      (Poseidon)
        IDE       (eclipse/vs.net)
        Building (ant/nant)
        UnitTest (junit/nunit)

    比赛时:
    
下载相关资料
        Go to Component Forum to 
            Download the dev_dist
            Ask any question about this component
            Discuss with designer and other competitors
    
分析资料
        Understand Dev_dist
            docs/       
设计文档
            src/        
源代码
            conf/       
配置文件,不可修改!
            test_files/ 
测试文件
            build.xml   
编译用的xml文件
    
阅读项目文档 Read Documents
        Specifications
            Requirement Specification (RS)
需求文档
            Component Specification   (CS)
组件文档
        Design Diagrams 
            Zuml
            Use case Diagram
            Class Diagrams
            Sequence Diagrams
    
编写代码
        
遇到任何问题即时到forum询问
        Stick to the design 
坚持设计文档的说明,除非设计明显有错,或者你有更好的算法来替代原设计(但需要去论坛询问并得到pm or designer的支持)
        
不要修改任何定义好的APIDON’T Change any API
    
完成文档的书写 Update the documents
        Class Documents 
类说明文档
            Usage
            Thread-safe
        Method Documents 
函数说明文档
            Usage
            Input/Output definition
            Exception
                
    
写单元测试
        (
注意测试时的说明文档书写一样很重要!)
        Failure Tests 
异常测试
            Bad input
            Expected exception
        Accuracy Tests 
正确性测试
            Valid input
            Expected result
        Stress Tests 
压力测试
            High load
            Multi-thread

    展示你的Component
        
写一个demo来展示(最好把每一个API都演示,并且有详细的demo document)
    
    
上传你最后的成果
        
上传Component Specification
        
将代码打包
            ant compile
            ant compile_tests
            ant test            
            If all pass…
            ant dev_submission
        
checkstyle检查你的代码风格是不是合格 ( http://checkstyle.sourceforge.net/ )
        
确认所有东西都已完成
    
    
一周后
        
去查看成绩Check the scorecard
        
当发现你的所有项目得分都少于3分时,不要奇怪。因为你是第一次,而且Reviewers很严格。
    
    
申诉
        
Reviewer明显判错了
        
Reviewer乎视了你对代码的改进
        
当设计文档作了修改,但Reviewer忘了看
        
Reviewertest cases有问题
        
Reviewer的给分和他的评价不对应
    
    
如果你胜利了
        Congratulations!
        1. Fix any bug marked as “required”   
修改代码中的bug
        2. Submit your final-fix.               
提交你的最终版本
        3. If pass final-review                 
如果通过了评审,那么就等钱到账吧:-)
        Wait for your cash!
            else
        Go to 1.                                
否则,返回重新修改,直到通过评审为止
        4. Go to next competition.
    
    
总结(比赛取胜的关键)
        
深入理解组件    Understand the component
        
坚持按设计文档来实现    Implement sticking to the design
        
做充分地测试    Fully test your submission
        
上传你的文档    Update documents
        
作适当的申诉    Do good appeals 

原创粉丝点击