GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — July:谁来一章一章的测试所有代码? · Issue #210 · julycoding/The-Art-Of-Programming-By-July-2nd

July:谁来一章一章的测试所有代码? #210

New issue
Copy link
New issue
Copy link
Closed
Closed
July:谁来一章一章的测试所有代码?#210
Copy link

Description

@julycoding
julycoding
opened on Mar 12, 2014
Issue body actions

编程艺术系列 + 博客内其它部分经典文章的目录已经重新调整更新完毕,见:https://github.com/julycoding/The-Art-Of-Programming-By-July/blob/master/ebook/zh/Readme.md ,整个目录分为11章。

衡量文章质量有几个指标:是否通俗易懂,篇幅是否精简,程序代码是否有bug、代码风格是否良好,命名是否规范,代码逻辑 & 可读性是否良好,代码是否优化等等。

而其中,程序代码中若存在bug,则是令人厌恶的,故烦请大家一一认领这10章,一人一章,或一人1/2章,打开编译器一一测试每一章的代码,找出bug,指正错误。

认领格式为:
“我认领第某某章,预计某月某日排除此章的bug”。

不要求你发现所有bug,尽你所能揪出你能揪出的bug即可,一章给一周到一个月的时间进行测试,如果发现bug,可以pull request,或在本issue 下指出,我来update 原文,thanks。

Activity

  1. Xuanwo commented on Mar 12, 2014

    @Xuanwo
    Xuanwo
    on Mar 12, 2014
    Contributor
    More actions

    这。。就交给大神了,表示代码理解起来都困难,更不必说找BUG了。。

    ------------------ 原始邮件 ------------------
    发件人: "July";[email protected];
    发送时间: 2014年3月12日(星期三) 下午4:02
    收件人: "julycoding/The-Art-Of-Programming-By-July"[email protected];

    主题: [The-Art-Of-Programming-By-July] 谁来一章一章的测试所有代码? (#210)

    很欣喜,8天前,尚有9篇文章未同步,到如今只剩最后两篇待同步,感谢大家的努力。

    与此同时,整个编程艺术系列 + 博客内其它部分经典文章的目录已经重新调整更新完毕,见:https://github.com/julycoding/The-Art-Of-Programming-By-July/blob/master/ebook/zh/Readme.md,整个目录分为10章。

    衡量文章质量有几个指标:篇幅是否精简,程序代码是否有bug、代码风格是否良好,命名是否规范,代码逻辑 & 可读性是否良好,代码是否优化,层层递进。

    而其中,程序代码中若存在bug,则是令人厌恶的,故烦请大家一一认领这10章,一人一章,或一人1/2章,打开编译器一一测试每一章的代码,找出bug,指正错误,thanks。

    认领格式为:
    “我认领第莫某章,预计某月某日排除此章的bug”。

    —
    Reply to this email directly or view it on GitHub.

  2. julycoding commented on Mar 12, 2014

    @julycoding
    julycoding
    on Mar 12, 2014
    OwnerAuthor
    More actions

    @Xuanwo 能否找出bug 主要是看是否细心,写一些测试用例反复把程序跑几遍,确保无误即可。

  3. Xuanwo commented on Mar 12, 2014

    @Xuanwo
    Xuanwo
    on Mar 12, 2014
    Contributor
    More actions

    我正好是ACM校队的=。=,看看有没有我能胜任的吧。。

    ------------------ 原始邮件 ------------------
    发件人: "July";[email protected];
    发送时间: 2014年3月12日(星期三) 下午4:28
    收件人: "julycoding/The-Art-Of-Programming-By-July"[email protected];
    抄送: "漩涡"[email protected];
    主题: Re: [The-Art-Of-Programming-By-July] July:谁来一章一章的测试所有代码? (#210)

    @Xuanwo 能否找出bug 主要是看是否细心,写一些测试用例反复把程序跑几遍,确保无误即可。

    —
    Reply to this email directly or view it on GitHub.

  4. julycoding commented on Mar 12, 2014

    @julycoding
    julycoding
    on Mar 12, 2014
    OwnerAuthor
    More actions

    @Xuanwo 共十章,可以认领一章,1周 - 1个月之间完成一章的测试,即可。

  5. julycoding commented on Mar 17, 2014

    @julycoding
    julycoding
    on Mar 17, 2014
    OwnerAuthor
    More actions

    @sg90
    可以先只测试文章中C 和 C++ 的代码。

  6. julycoding commented on Mar 17, 2014

    @julycoding
    julycoding
    on Mar 17, 2014
    OwnerAuthor
    More actions

    @sg90
    好的,赞。

  7. sg90 commented on Mar 21, 2014

    @sg90
    sg90
    on Mar 21, 2014
    More actions

    第1章代码测试完成,未发现bug。

  8. sg90 commented on Apr 16, 2014

    @sg90
    sg90
    on Apr 16, 2014
    More actions

    2.1解法四的代码示例bug较多,重新编写如下:
    int q_select( int a[], int k, int left, int right )
    {
    int i, j;
    int pivot;

    if( left + CUTOFF < right )
    {
        pivot = a[left];
    
        i=left; j=right;
        while(i < j)
        {
            while( i < j && a[j] >= pivot ) j--;
            a[i] = a[j];
            while( i < j && a[i] <= pivot ) i++;
            a[j] = a[i];
        }
        a[i] = pivot;
        if( k < i + 1 )
            return q_select( a, k, left, i-1 );
        else if( k > i + 1 )
            return q_select( a, k, i + 1, right );
        else
            return a[i];
    }
    else {
        insert_sort(a, left, right );
    }
    

    }

  9. julycoding commented on Apr 16, 2014

    @julycoding
    julycoding
    on Apr 16, 2014
    OwnerAuthor
    More actions

    赞@sg90
    把代码转换成C 代码吧 :-)

    目前目录已经进行了很大调整,不知看到了更新没
    此外,暂时只排出C 代码的bug,其它语言的代码放在下一步排除。

  10. woiazbl commented on Apr 17, 2014

    @woiazbl
    woiazbl
    on Apr 17, 2014
    More actions

    在第一章的最后一节中,寻找最长回文子串中,例程会返回比实际最长多两位的结果
    for (j = 0; (i-j >= 0) && (i+j < n); ++j) // if the lengthof the palindrome is odd
    if (s[i-j] != s[i+j])
    break;
    if (j_2+1 > max)
    max = j * 2 + 1;
    for (j = 0; (i-j >= 0) && (i+j+1 < n); ++j) // for theeven case
    if (s[i-j] != s[i+j+1])
    break;
    if (j_2+2 > max)
    max = j * 2 + 2;

    break的时候,j已经加一了,所以要修改下max的赋值表达式。

  11. huatangzhi commented on Apr 20, 2014

    @huatangzhi
    huatangzhi
    on Apr 20, 2014
    More actions

    怎么认领

  12. julycoding commented on Apr 21, 2014

    @julycoding
    julycoding
    on Apr 21, 2014
    OwnerAuthor
    More actions

    @huatangzhi
    目前先排除第一部分第1-7章的bug,目录见:https://github.com/julycoding/The-Art-Of-Programming-By-July/blob/master/ebook/zh/Readme.md

    故认领格式为:
    “我认领第某某章,预计某月某日排除此章的bug”。

  13. huatangzhi commented on Apr 24, 2014

    @huatangzhi
    huatangzhi
    on Apr 24, 2014
    More actions

    我认领第2章,预计5月24日排除此章的bug”

  14. hduffddybz commented on Aug 25, 2014

    @hduffddybz
    hduffddybz
    on Aug 25, 2014
    More actions

    现在还有认领计划吗

  15. julycoding commented on Oct 10, 2014

    @julycoding
    julycoding
    on Oct 10, 2014
    OwnerAuthor
    More actions

    @hduffddybz
    刚看到,一直都可以测试github上的代码的哈。

  16. julycoding commented on Aug 28, 2015

    @julycoding
    julycoding
    on Aug 28, 2015
    OwnerAuthor
    More actions

    新书即将在今年2015年9月底上市。
    感谢大家的共同努力。

  17. julycoding
    closed this as completedon Aug 28, 2015
  18. zhaosoap commented on Sep 2, 2015

    @zhaosoap
    zhaosoap
    on Sep 2, 2015
    More actions

    @julycoding 你好,看了1.2 字符串包含 简单的一个题,给了四种解法。。
    为什么不 直接开26个字符统计表 int['A'...'Z'], 对于每个子串字符 查表就行。
    求解答

  19. sg90 commented on Sep 6, 2015

    @sg90
    sg90
    on Sep 6, 2015
    More actions

    解法四 就是这个思路

    发自 Windows 邮件

    发件人: zhaosoap
    发送时间: ‎2015‎年‎9‎月‎2‎日, ‎星期三 ‎11‎:‎16
    收件人: julycoding/The-Art-Of-Programming-By-July
    抄送: sg90

    @julycoding 你好,看了1.2 字符串包含 简单的一个题,给了四种解法。。
    为什么不 直接开26个字符统计表 int['A'...'Z'], 对于每个字串字符 查表就行。
    求解答

    —
    Reply to this email directly or view it on GitHub.

  20. FuckFly commented on Jun 12, 2017

    @FuckFly
    FuckFly
    on Jun 12, 2017
    More actions

    呵呵呵

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402792 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.