[OT]代码行数

已查看 27 次
跳至第一个未读帖子

Moon

未读,
2014年12月9日 03:29:172014/12/9
收件人 sh...@googlegroups.com
一直听到一个说法,就是大牛写过多少行代码,或某个程序代码行数有多少。数字都挺吓人的。

可是初学编程,我现在感到做一个一般的程序,似乎不用写想象中的那么多代码,但一想到那个数字就有点沮丧,不知自己何时才能达到那个层次。

想问一下那是怎么算的?是不是比如我import一个包,里面的代码行数也都算在里面了?大家一般一个月写多少代码呢?

单栋

未读,
2014年12月9日 03:43:492014/12/9
收件人 sh...@googlegroups.com
当然是实际写了多少算多少啊……这个其实就是个经验的相对指标吧?感觉方式不一样,对经验积累也不太一样,不用太在意的吧?
--
-- You received this message because you are subscribed to the Google Groups Shanghai Linux User Group group. To post to this group, send email to sh...@googlegroups.com. To unsubscribe from this group, send email to shlug+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/shlug?hl=zh-CN
---
您收到此邮件是因为您订阅了Google网上论坛上的“Shanghai Linux User Group”群组。
要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到shlug+un...@googlegroups.com
要查看更多选项,请访问https://groups.google.com/d/optout

Shell Xu

未读,
2014年12月9日 04:03:052014/12/9
收件人 shlug
200

--
-- You received this message because you are subscribed to the Google Groups Shanghai Linux User Group group. To post to this group, send email to sh...@googlegroups.com. To unsubscribe from this group, send email to shlug+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/shlug?hl=zh-CN
---
您收到此邮件是因为您订阅了Google网上论坛上的“Shanghai Linux User Group”群组。
要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到shlug+un...@googlegroups.com
要查看更多选项,请访问https://groups.google.com/d/optout



--
彼節者有間,而刀刃者無厚;以無厚入有間,恢恢乎其於游刃必有餘地矣。
blog: http://shell909090.org/blog/

Moon

未读,
2014年12月9日 04:13:192014/12/9
收件人 sh...@googlegroups.com
刚才做了下估算,10万行代码要一年写完的话,每天300行也就够了。

Shell Xu

未读,
2014年12月9日 04:18:302014/12/9
收件人 shlug
呵呵
你能保证逻辑,测试和文档的情况下,保证边界情况和维护的情况下,一天写个100行代码就不错了。
而且行数跟语言有密切的关系。你试试写一个礼拜,一天100行的lisp。。。记得,逻辑,测试,文档。。。

包乾

未读,
2014年12月9日 07:57:042014/12/9
收件人 sh...@googlegroups.com
记得学生时代有过两个礼拜push出1000行+的计算代码。然后为了理顺这1000行里的bug,我花了大约一年,还没有搞定。。。

Xidorn Quan

未读,
2014年12月9日 08:02:402014/12/9
收件人 sh...@googlegroups.com
我最高效率的记录应该是有一天花了一整天时间写了1000+行 js 代码,然后第二天花了半天时间做代码覆盖测试,最后没看到什么问题了。不过当然是没有文档和单独的测试的,而且这个记录我后来从未能破过的样子(?)

Bo Chen

未读,
2014年12月9日 09:07:272014/12/9
收件人 sh...@googlegroups.com
10万代码是能用的代码, 还是堆出来的...

Liu Cheng

未读,
2014年12月9日 09:46:062014/12/9
收件人 sh...@googlegroups.com
原来在学校的时候写编译器,日均1000行- -
都是复制粘贴差不多的代码,比如定义AST,写完一个节点,别的就复制完改改,代码生成,写一个节点然后复制改改......

"宋为@凉拌茶叶"

未读,
2014年12月9日 21:05:522014/12/9
收件人 sh...@googlegroups.com
有些语言代码行数增长很快啊,比如C

在 2014年12月09日 17:17, Shell Xu 写道:
> 呵呵
> 你能保证逻辑,测试和文档的情况下,保证边界情况和维护的情况下,一天写个
> 100行代码就不错了。
> 而且行数跟语言有密切的关系。你试试写一个礼拜,一天100行的lisp。。。记
> 得,逻辑,测试,文档。。。
>
> 在 2014年12月9日 下午5:13,Moon <mappel...@gmail.com
> <mailto:mappel...@gmail.com>>写 道:
>
> 刚才做了下估算,10万行代码要一年写完的话,每天300行也就够了。
>
> 2014-12-09 16:43 GMT+08:00 单栋 <sd542...@gmail.com
> <mailto:sd542...@gmail.com>>:
>
> 当然是实际写了多少算多少啊……这个其实就是个经验的相对指标吧?感
> 觉方式不一样,对经验积累也不太一样,不用太在意的吧?
> 在 2014/12/9 16:29, Moon 写道:
>> 一直听到一个说法,就是大牛写过多少行代码,或某个程序代码行 数
>> 有多少。数字都挺吓人的。
>>
>> 可是初学编程,我现在感到做一个一般的程序,似乎不用写想象中的
>> 那么多代码,但 一想到那个数字就有点沮丧,不知自己何时才能达
>> 到那个层次。
>>
>> 想问一下那是怎么算的?是不是比如我import一个包,里面的代码行
>> 数也都算 在里面了?大家一般一个月写多少代码呢?
>> --
>> -- You received this message because you are subscribed to
>> the Google Groups Shanghai Linux User Group group. To post to
>> this group, send email to sh...@googlegroups.com
>> <mailto:sh...@googlegroups.com>. To unsubscribe from this
>> group, send email to shlug+un...@googlegroups.com
>> <mailto:shlug+un...@googlegroups.com>. For more
>> options, visit this group at
>> https://groups.google.com/d/forum/shlug?hl=zh-CN
>> ---
>> 您收到此邮件是因为您订阅了Google网上论坛上的“Shanghai Linux
>> User Group”群组。
>> 要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到
>> shlug+un...@googlegroups.com
>> <mailto:shlug+un...@googlegroups.com>。
>> 要查看更多选项,请访问https://groups.google.com/d/optout
>
> --
> -- You received this message because you are subscribed to the
> Google Groups Shanghai Linux User Group group. To post to this
> group, send email to sh...@googlegroups.com
> <mailto:sh...@googlegroups.com>. To unsubscribe from this
> group, send email to shlug+un...@googlegroups.com
> <mailto:shlug%2Bunsu...@googlegroups.com>. For more
> options, visit this group at
> https://groups.google.com/d/forum/shlug?hl=zh-CN
> ---
> 您收到此邮件是因为您订阅了Google网上论坛上的“Shanghai Linux
> User Group”群组。
> 要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到
> shlug+un...@googlegroups.com
> <mailto:shlug+un...@googlegroups.com>。
> 要查看更多选项,请访问https://groups.google.com/d/optout
>
>
> --
> -- You received this message because you are subscribed to the
> Google Groups Shanghai Linux User Group group. To post to this
> group, send email to sh...@googlegroups.com
> <mailto:sh...@googlegroups.com>. To unsubscribe from this group,
> send email to shlug+un...@googlegroups.com
> <mailto:shlug%2Bunsu...@googlegroups.com>. For more options,
> visit this group at https://groups.google.com/d/forum/shlug?hl=zh-CN
> ---
> 您收到此邮件是因为您订阅了Google网上论坛上的“Shanghai Linux User
> Group”群组。
> 要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到
> shlug+un...@googlegroups.com
> <mailto:shlug+un...@googlegroups.com>。
> 要查看更多选项,请访问https://groups.google.com/d/optout
>
>
>
>
> --
> 彼節者有間,而刀刃者無厚;以無厚入有間,恢恢乎其於游刃必有餘地矣。
> blog: http://shell909090.org/blog/
> twitter: @shell909090 <https://twitter.com/shell909090>
> about.me <http://about.me>: http://about.me/shell909090
> --
> -- You received this message because you are subscribed to the Google
> Groups Shanghai Linux User Group group. To post to this group, send
> email to sh...@googlegroups.com. To unsubscribe from this group, send
> email to shlug+un...@googlegroups.com. For more options, visit
> this group at https://groups.google.com/d/forum/shlug?hl=zh-CN
> ---
> 您收到此邮件是因为您订阅了Google网上论坛上的“Shanghai Linux User
> Group”群组。
> 要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到
> shlug+un...@googlegroups.com
> <mailto:shlug+un...@googlegroups.com>。
> 要查看更多选项,请访问https://groups.google.com/d/optout


liyaoshi

未读,
2014年12月9日 21:19:182014/12/9
收件人 sh...@googlegroups.com
我弱爆了,两个星期也就1000行的样子

不过删除了大概20000行

在 2014年12月10日 上午10:05,"宋为@凉拌茶叶" <leo_s...@126.com>写道:
有些语言代码行数增长很快啊,比如C

在 2014年12月09日 17:17, Shell Xu 写道:
呵呵
你能保证逻辑,测试和文档的情况下,保证边界情况和维护的情况下,一天写个 100行代码就不错了。
而且行数跟语言有密切的关系。你试试写一个礼拜,一天100行的lisp。。。记 得,逻辑,测试,文档。。。

在 2014年12月9日 下午5:13,Moon <mappel...@gmail.com <mailto:mappel...@gmail.com>>写 道:

    刚才做了下估算,10万行代码要一年写完的话,每天300行也就够了。

    2014-12-09 16:43 GMT+08:00 单栋 <sd542...@gmail.com
    <mailto:sd542...@gmail.com>>:

        当然是实际写了多少算多少啊……这个其实就是个经验的相对指标吧?感
        觉方式不一样,对经验积累也不太一样,不用太在意的吧?
        在 2014/12/9 16:29, Moon 写道:
        一直听到一个说法,就是大牛写过多少行代码,或某个程序代码行 数
        有多少。数字都挺吓人的。

        可是初学编程,我现在感到做一个一般的程序,似乎不用写想象中的
        那么多代码,但 一想到那个数字就有点沮丧,不知自己何时才能达
        到那个层次。

        想问一下那是怎么算的?是不是比如我import一个包,里面的代码行
        数也都算 在里面了?大家一般一个月写多少代码呢?
        --         -- You received this message because you are subscribed to
        the Google Groups Shanghai Linux User Group group. To post to
        this group, send email to sh...@googlegroups.com
        <mailto:sh...@googlegroups.com>. To unsubscribe from this

        group, send email to shlug+unsubscribe@googlegroups.com
        <mailto:shlug+unsubscribe@googlegroups.com>. For more

        options, visit this group at
        https://groups.google.com/d/forum/shlug?hl=zh-CN
        ---
        您收到此邮件是因为您订阅了Google网上论坛上的“Shanghai Linux
        User Group”群组。
        要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到
        shlug+unsubscribe@googlegroups.com
        <mailto:shlug+unsubscribe@googlegroups.com>。
        要查看更多选项,请访问https://groups.google.com/d/optout

        --         -- You received this message because you are subscribed to the
        Google Groups Shanghai Linux User Group group. To post to this
        group, send email to sh...@googlegroups.com
        <mailto:sh...@googlegroups.com>. To unsubscribe from this

        group, send email to shlug+unsubscribe@googlegroups.com
        <mailto:shlug%2Bunsubscribe@googlegroups.com>. For more

        options, visit this group at
        https://groups.google.com/d/forum/shlug?hl=zh-CN
        ---
        您收到此邮件是因为您订阅了Google网上论坛上的“Shanghai Linux
        User Group”群组。
        要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到

        要查看更多选项,请访问https://groups.google.com/d/optout


    --     -- You received this message because you are subscribed to the
    Google Groups Shanghai Linux User Group group. To post to this
    group, send email to sh...@googlegroups.com
    <mailto:sh...@googlegroups.com>. To unsubscribe from this group,
    send email to shlug+unsubscribe@googlegroups.com
    <mailto:shlug%2Bunsubscribe@googlegroups.com>. For more options,

    visit this group at https://groups.google.com/d/forum/shlug?hl=zh-CN
    ---
    您收到此邮件是因为您订阅了Google网上论坛上的“Shanghai Linux User
    Group”群组。
    要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到

    要查看更多选项,请访问https://groups.google.com/d/optout




--
彼節者有間,而刀刃者無厚;以無厚入有間,恢恢乎其於游刃必有餘地矣。
blog: http://shell909090.org/blog/
twitter: @shell909090 <https://twitter.com/shell909090>
about.me <http://about.me>: http://about.me/shell909090

--
-- You received this message because you are subscribed to the Google Groups Shanghai Linux User Group group. To post to this group, send email to sh...@googlegroups.com. To unsubscribe from this group, send email to shlug+unsubscribe@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/shlug?hl=zh-CN

---
您收到此邮件是因为您订阅了Google网上论坛上的“Shanghai Linux User Group”群组。
要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到 shlug+unsubscribe@googlegroups.com <mailto:shlug+unsubscribe@googlegroups.com>。
要查看更多选项,请访问https://groups.google.com/d/optout


--
-- You received this message because you are subscribed to the Google Groups Shanghai Linux User Group group. To post to this group, send email to sh...@googlegroups.com. To unsubscribe from this group, send email to shlug+unsubscribe@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/shlug?hl=zh-CN
--- 您收到此邮件是因为您订阅了 Google 网上论坛的“Shanghai Linux User Group”群组。

要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到shlug+unsubscribe@googlegroups.com
要查看更多选项,请访问 https://groups.google.com/d/optout

liyaoshi

未读,
2014年12月9日 21:21:032014/12/9
收件人 sh...@googlegroups.com
写C的不忿的表示
我基本是靠看pdf 和示波器干活的

benluo

未读,
2014年12月9日 21:22:112014/12/9
收件人 sh...@googlegroups.com
在示波器上看PDF?


On 2014/12/10 10:20, liyaoshi wrote:
写C的不忿的表示
我基本是靠看pdf 和示波器干活的

在 2014年12月10日 上午10:19,liyaoshi <liya...@gmail.com>写 道:
我弱爆了,两个星期也就1000行的样子

不过删除了大概20000行

在 2014年12月10日 上午10:05,"宋为@凉拌茶叶" <leo_s...@126.com>写 道:

有 些语言代码行数增长很快啊,比如C


在 2014年12月09日 17:17, Shell Xu 写道:
呵呵
你能保证逻辑,测试和文档的情况下,保证边界情况和维护的情况下,一天写个 100行代码就不错了。
而且行数跟语言有密切的关系。你试试写一个礼拜,一天100行的lisp。。。记 得,逻辑,测试,文档。。。

在 2014年12月9日 下午5:13,Moon <mappel...@gmail.com <mailto:mappel...@gmail.com>> 写 道:

    刚才做了下估算,10万行代码要一年写完的话,每天300行也就够了。

    2014-12-09 16:43 GMT+08:00 单栋 <sd542...@gmail.com
    <mailto:sd542...@gmail.com>>:

        当然是实际写了多少算多少啊……这个其实就是个经验的相对指标吧?感
        觉方式不一样,对经验积累也不太一样,不用太在意的吧?
        在 2014/12/9 16:29, Moon 写道:
        一直听到一个说法,就是大牛写过多少行代码,或某个程序代码行 数
        有多少。数字都挺吓人的。

        可是初学编程,我现在感到做一个一般的程序,似乎不用写想象中的
        那么多代码,但 一想到那个数字就有点沮丧,不知自己何时才能达
        到那个层次。

        想问一下那是怎么算的?是不是比如我import一个包,里面的代码行
        数也都算 在里面了?大家一般一个月写多少代码呢?
        --         -- You received this message because you are subscribed to
        the Google Groups Shanghai Linux User Group group. To post to
        this group, send email to sh...@googlegroups.com
        <mailto:sh...@googlegroups.com>. To unsubscribe from this

        group, send email to shlug+un...@googlegroups.com
        <mailto:shlug+un...@googlegroups.com>. For more

        options, visit this group at
        https://groups.google.com/d/forum/shlug?hl=zh-CN
        ---
        您收到此邮件是因为您订阅了Google网上论坛上的“Shanghai Linux
        User Group”群组。
        要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到
        shlug+un...@googlegroups.com
        <mailto:shlug+un...@googlegroups.com>。
        要查看更多选项,请访问https://groups.google.com/d/optout

        --         -- You received this message because you are subscribed to the
        Google Groups Shanghai Linux User Group group. To post to this
        group, send email to sh...@googlegroups.com
        <mailto:sh...@googlegroups.com>. To unsubscribe from this

        group, send email to shlug+un...@googlegroups.com
        <mailto:shlug%2Bunsu...@googlegroups.com>. For more

        options, visit this group at
        https://groups.google.com/d/forum/shlug?hl=zh-CN
        ---
        您收到此邮件是因为您订阅了Google网上论坛上的“Shanghai Linux
        User Group”群组。
        要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到
        shlug+un...@googlegroups.com
        <mailto:shlug+un...@googlegroups.com>。

        要查看更多选项,请访问https://groups.google.com/d/optout


    --     -- You received this message because you are subscribed to the
    Google Groups Shanghai Linux User Group group. To post to this
    group, send email to sh...@googlegroups.com
    <mailto:sh...@googlegroups.com>. To unsubscribe from this group,
    send email to shlug+un...@googlegroups.com
    <mailto:shlug%2Bunsu...@googlegroups.com>. For more options,

    visit this group at https://groups.google.com/d/forum/shlug?hl=zh-CN
    ---
    您收到此邮件是因为您订阅了Google网上论坛上的“Shanghai Linux User
    Group”群组。
    要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到

    要查看更多选项,请访问https://groups.google.com/d/optout




--
彼節者有間,而刀刃者無厚;以無厚入有間,恢恢乎其於游刃必有餘地矣。
blog: http://shell909090.org/blog/
twitter: @shell909090 <https://twitter.com/shell909090>
about.me <http://about.me>: http://about.me/shell909090

--
-- You received this message because you are subscribed to the Google Groups Shanghai Linux User Group group. To post to this group, send email to sh...@googlegroups.com. To unsubscribe from this group, send email to shlug+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/shlug?hl=zh-CN

---
您收到此邮件是因为您订阅了Google网上论坛上的“Shanghai Linux User Group”群组。
要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到 shlug+un...@googlegroups.com <mailto:shlug+un...@googlegroups.com>。
要查看更多选项,请访问https://groups.google.com/d/optout


--
-- You received this message because you are subscribed to the Google Groups Shanghai Linux User Group group. To post to this group, send email to sh...@googlegroups.com. To unsubscribe from this group, send email to shlug+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/shlug?hl=zh-CN
--- 您收到此邮件是因为您订阅了 Google 网上论坛的“Shanghai Linux User Group”群组。

要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到shlug+un...@googlegroups.com
要查看更多选项,请访问 https://groups.google.com/d/optout


--
-- You received this message because you are subscribed to the Google Groups Shanghai Linux User Group group. To post to this group, send email to sh...@googlegroups.com. To unsubscribe from this group, send email to shlug+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/shlug?hl=zh-CN

---
您收到此邮件是因为您订阅了Google网上论坛上的“Shanghai Linux User Group”群组。
要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到shlug+un...@googlegroups.com
要查看更多选项,请访问https://groups.google.com/d/optout

Bo Chen

未读,
2014年12月9日 21:23:182014/12/9
收件人 sh...@googlegroups.com
牛气!哈哈

liyaoshi

未读,
2014年12月9日 21:25:222014/12/9
收件人 sh...@googlegroups.com
现在的示波器上1G的话,大部分多是windows XP的吧

上家公司有个17寸的示波器。

liyaoshi

未读,
2014年12月9日 21:29:092014/12/9
收件人 sh...@googlegroups.com
安捷伦 稍微高级点的示波器多是可以模块安装(pian)软(qian)件

benluo

未读,
2014年12月9日 21:29:312014/12/9
收件人 sh...@googlegroups.com
17寸彩色示波器?大学里都是用9寸绿色显像管的。


On 2014/12/10 10:25, liyaoshi wrote:
现在的示波器上1G的话,大部分多是windows XP的吧

上家公司有个17寸的示波器。

在 2014年12月10日 上午10:21,benluo <ben...@gmail.com>写 道:
在示波器上看PDF?

On 2014/12/10 10:20, liyaoshi wrote:
写C的不忿的表示
我基本是靠看pdf 和示波器干活的

在 2014年12月10日 上午10:19,liyaoshi <liya...@gmail.com>写 道:
我弱爆了,两个星期也就1000行的样子

不过删除了大概20000行

在 2014年12月10日 上午10:05,"宋为@凉拌茶叶" <leo_s...@126.com>写 道:

有 些语言代码行数增长很快啊,比如C


在 2014年12月09日 17:17, Shell Xu 写道:
呵呵
你能保证逻辑,测试和文档的情况下,保证边界情况和维护的情况下,一天写 个 100行代码就不错了。
而且行数跟语言有密切的关系。你试试写一个礼拜,一天100行的 lisp。。。记 得,逻辑,测试,文档。。。

liyaoshi

未读,
2014年12月9日 21:31:422014/12/9
收件人 sh...@googlegroups.com
是的,而且是正屏
不过屏幕大小跟带宽无关

Chaos Eternal

未读,
2014年12月9日 23:55:012014/12/9
收件人 sh...@googlegroups.com
我的感觉是这样的:

本来你的 程序要做

fd = open("somefile",O_READ)

但是呢,你发现,你需要检查fd是否>0
所以你加上
if(fd <0)
{
error("xxx")
}

于是多了4行,
接着,你发现还要实现一个error, 如是又多了若干行

再接着,你发现只判断fd<0是不行的,你还要看errno

于是你又加上
switch(errno) {
case xxx:xxxxx
break;
...
}
这又是若干行。

所以行数就是酱紫堆起来了

Moon

未读,
2014年12月10日 03:09:102014/12/10
收件人 sh...@googlegroups.com
一天算专心工作5-6小时吧,测试,写文档都需要时间,我理解的是查文档,思考也需要一些时间?这样能写出高质量100行代码,算起来一个月能有2K的漂亮代码。

李意扬

未读,
2014年12月10日 11:17:232014/12/10
收件人 sh...@googlegroups.com

我这到有一台1G扫描,不过还是显像管的安捷伦老古董

李意扬

未读,
2014年12月10日 11:17:242014/12/10
收件人 sh...@googlegroups.com

应该是指嵌入式吧

Xiang Wang

未读,
2014年12月11日 00:14:032014/12/11
收件人 sh...@googlegroups.com
知道吗,一个资深的RD,平均每天的有效代码,不过几时行而已。
下次如果跟别人吹牛B的时候记得先算下草稿。

Best Regards~


Xiang Wang

CDC, TrendMicro

Moon

未读,
2014年12月11日 00:33:372014/12/11
收件人 sh...@googlegroups.com
何谓RD,D- developper?

看了这些回复,我现在心里是有数了。

Moon

未读,
2014年12月11日 00:55:022014/12/11
收件人 sh...@googlegroups.com
想到了另一问题:一天写有效代码,写测试,文档,查文档/学习/思考,还有写Chaos说的defensive programming代码占的时间比例大概是个什么情况呢?
回复全部
回复作者
转发
0 个新帖子