公司有人这样写代码,该怎么办呢?

silent.wong 2007-12-20
每次看到公司里有些人写的代码都很无聊,说了一次应该这样写,下次又出现另外一种错误的写法,有什么办法呢?不理会?心里又过不去...每次都命令自己不要看别人的代码,但一不小心点了进去,心情又遭透了,想骂人,想离开................
private boolean compareApprovedDate(Date statusDate){
        boolean expiry = false;
        
        Calendar   c=Calendar.getInstance();
        SimpleDateFormat sy=new SimpleDateFormat("yyyy");
        SimpleDateFormat sm=new SimpleDateFormat("MM");
        SimpleDateFormat sd=new SimpleDateFormat("dd");
        
        int intYear = Integer.parseInt(sy.format(statusDate));
        int intmon  = Integer.parseInt(sm.format(statusDate));
        int intDday = Integer.parseInt(sd.format(statusDate));
        c.set(intYear,(intmon-1),intDday);  
        c.add(Calendar.DAY_OF_YEAR, expiryDays); 
        Date expiryDate = c.getTime();
        Date toDay = getCurrentDate();
        int result = toDay.compareTo(expiryDate);
        if(result==1){
            expiry = true; 
        }else{
            expiry = false;
        }
        return expiry;
    } 
auauau 2007-12-20
呵呵
是不是以代码行数计算工资的。
allenBen 2007-12-27
auauau 写道
呵呵
是不是以代码行数计算工资的。

若不是,就是这个人在练习打字速度~~~~
sclsch 2008-06-26
谁都是从新手过来的,楼主还是宽容一些。
lims 2008-06-26
写得挺好呀