V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Sai
V2EX  ›  程序员

今年你写了多少行代码?

  •  
  •   Sai · 2010-12-31 10:41:00 +08:00 · 9288 次点击
    这是一个创建于 4858 天前的主题,其中的信息可能已经有所发展或是发生改变。
    到了年底,就会有各种总结,作为一个程序员,代码行数大概是衡量这一年充实与否的一个参考。
    不过……要怎么统计呢?
    25 条回复    1970-01-01 08:00:00 +08:00
    Livid
        1
    Livid  
    MOD
       2010-12-31 10:45:14 +08:00
    port install sloccount
    napoleonu
        2
    napoleonu  
       2010-12-31 12:05:57 +08:00
    #wc -l somefile | awk '{print $1}'
    napoleonu
        3
    napoleonu  
       2010-12-31 12:42:19 +08:00
    wc连文件夹下面所有文件的行都可以统计啊,统计三层目录的:

    #wc -l /home/* /home/*/* /home/*/*/*

    看到一个:

    find /home/ -type f -exec wc -l {} \; | awk '{total += $1} END{print total}'
    bcxx
        4
    bcxx  
       2010-12-31 12:56:25 +08:00
    虽说不算是一个程序员,但为了准备NOIp,也写了快5K行代码了……
    chone
        5
    chone  
       2010-12-31 13:04:15 +08:00
    可以直接用源代码大小来衡量,这个更简单也更具参考性
    shellex
        6
    shellex  
       2010-12-31 17:24:09 +08:00
    很难判定...哪些是今年写的...
    sophon
        7
    sophon  
       2011-01-01 08:06:29 +08:00 via Android
    哈哈,直接按照M算吧。
    timshi
        8
    timshi  
       2011-01-01 09:55:40 +08:00
    The person with the least amount wins!
    yanyanlong
        9
    yanyanlong  
       2011-01-01 11:55:58 +08:00
    在公司qa有统计,大约2w行的plsql..
    napoleonu
        10
    napoleonu  
       2011-01-01 13:27:21 +08:00
    @timshi 我0行
    jjgod
        11
    jjgod  
       2011-01-01 17:22:27 +08:00
    可能是负数。
    bluef
        12
    bluef  
       2011-01-01 18:52:11 +08:00
    大概五千行actionscript + 八行php
    Los
        13
    Los  
       2011-01-01 19:10:28 +08:00
    5W C&C++ 有效代码
    6K ruby 有效代码
    500 python

    汗,发觉C&C++跟ruby对比强烈
    gonghao
        14
    gonghao  
       2011-01-01 20:08:31 +08:00
    @bluef PHP需求这么大?!
    timshi
        15
    timshi  
       2011-01-02 00:12:42 +08:00
    @napoleonu good for you

    @jjgod well done!
    mayokaze
        16
    mayokaze  
       2011-01-07 12:46:14 +08:00
    偏执one liner情何以堪
    avril
        17
    avril  
       2011-01-07 14:32:32 +08:00
    00000……
    cruiserdou
        18
    cruiserdou  
       2011-01-08 11:39:21 +08:00
    好多好多,写了一年代码!
    WarWithinMe
        19
    WarWithinMe  
       2011-01-15 22:45:40 +08:00
    4个月,2W-3W行C++左右。。。
    Len
        20
    Len  
       2011-01-15 23:31:13 +08:00 via iPhone
    由于noip很多……
    silver0511
        21
    silver0511  
       2011-01-19 17:04:39 +08:00
    好少好少
    freefcw
        22
    freefcw  
       2011-01-19 17:37:41 +08:00
    不能用代码行数来判断一个人的工作,和能力- -
    chinese_zmm
        23
    chinese_zmm  
       2011-01-19 18:02:11 +08:00
    写了很多,又删了很多。。
    thicket
        24
    thicket  
       2011-01-31 23:06:25 +08:00
    几十M吧~~
    qingyulive
        25
    qingyulive  
       2011-02-01 13:09:34 +08:00
    做IOS配置的算不算程序员?
    去年几万行总有的。
    不过主要是copy and paste...
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5625 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 02:49 · PVG 10:49 · LAX 19:49 · JFK 22:49
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.