??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲AV无码一区二区乱孑伦AS,亚洲一区二区三区在线播放,亚洲一区二区久久http://m.tkk7.com/vcycyv/category/47726.htmlzh-cnSun, 06 Jul 2014 18:13:14 GMTSun, 06 Jul 2014 18:13:14 GMT60Zspringside4新徏project 错误Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin的解军_?/title><link>http://m.tkk7.com/vcycyv/archive/2014/07/05/415476.html</link><dc:creator>人在江湖</dc:creator><author>人在江湖</author><pubDate>Sat, 05 Jul 2014 02:42:00 GMT</pubDate><guid>http://m.tkk7.com/vcycyv/archive/2014/07/05/415476.html</guid><wfw:comment>http://m.tkk7.com/vcycyv/comments/415476.html</wfw:comment><comments>http://m.tkk7.com/vcycyv/archive/2014/07/05/415476.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/vcycyv/comments/commentRss/415476.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/vcycyv/services/trackbacks/415476.html</trackback:ping><description><![CDATA[<div>Zspringside4新徏project:<br /><span style="color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif, 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 15px; line-height: 25.5px; background-color: #ffffff;">使用Maven的Archetype插gQ可以基于Quickstart目Q创q目?/span><br style="box-sizing: border-box; color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif, 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 15px; line-height: 25.5px; background-color: #ffffff;" /><span style="color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif, 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 15px; line-height: 25.5px; background-color: #ffffff;">q行support/maven-archetype\install.bat后,双击根目录中的generate-project.bat <br /></span>遇到错误Q?br />[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2</div><div>.2:generate (default-cli) on project standalone-pom: The desired archetype does</div><div>not exist (org.springside.examples:quickstart-archetype:4.1.1-SNAPSHOT) -> [Help</div><div> 1]<br /><br />q是Z么呢Q?br />打开generate-project.bat<br /><div>-DarchetypeVersion=4.1.1-SNAPSHOT</div>Ҏ<br /><div>-DarchetypeVersion=4.2.3-SNAPSHOT<br />好了,正确的版本号?span style="background-color: #ffffff; color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif, 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 15px; line-height: 25.5px;">support/maven-archetype\install.batq行q程中能看到</span></div></div><img src ="http://m.tkk7.com/vcycyv/aggbug/415476.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/vcycyv/" target="_blank">人在江湖</a> 2014-07-05 10:42 <a href="http://m.tkk7.com/vcycyv/archive/2014/07/05/415476.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>最q复习sql, 分n整理?2条sql语句q同数据http://m.tkk7.com/vcycyv/archive/2012/06/26/381478.html人在江湖人在江湖Tue, 26 Jun 2012 01:29:00 GMThttp://m.tkk7.com/vcycyv/archive/2012/06/26/381478.htmlhttp://m.tkk7.com/vcycyv/comments/381478.htmlhttp://m.tkk7.com/vcycyv/archive/2012/06/26/381478.html#Feedback0http://m.tkk7.com/vcycyv/comments/commentRss/381478.htmlhttp://m.tkk7.com/vcycyv/services/trackbacks/381478.html原本sql写得也不好,q几q数据库用得,sql更是荒废了,最q复习sql,|上?子很多,但都只是提供sql例子Q没有配套的数据用来自己l习和调试。俺觉得?p着写写sql,调试调试q是有帮助的Q读人家sql例子好像L了,自己写就?必思\正确Q调试得通,写得z?/p>

 
跟着|上行的学生选课表的例子复习了一下: http://www.cnblogs.com/buzaixian/archive/2009/09/21/1571365.html
q篇文字在网上被转蝲烂了Q里面有些sql适合用在应用pȝ里,有些“报表”的?觉更重些Q主要是惛_习前者。前20条大体还挺好Q后30条明昑ց报表风格了,?且后面选例良莠不齐Q选了12个例子做l习Q(其实很多语法Qcase, any/all, union之类的都没包括)Q用mysql数据库,q共享自己造出来的数据。关于这12?sql, 修正了原文中有纰漏的地方?
sql是基本技能,若能写得好也挺精彩的Q还在l练习。绝不提倡努力写复杂sql 解决业务问题。应用系l里如果存在很复杂的sqlQ往往揭示了业务逻辑向下泄露 到sql层的问题Q不利于l护和扩展,虽然q样实常能提高q行效率。具体情?自行取舍?
下面的例子都是比较通用的sql, 其实针对特定的数据库Q需要学的也挺多Q比?oracle db的decode函数, rowid, rownum, connect by 虽然不通用Q但是很实用?


数据可以在这里下载,只是用作l习Q没做Q何外键关联:http://115.com/file/an2svxbe#sql-study.sql


整理的sql在下面:
Student(S#,Sname,Sage,Ssex) 学生?
Course(C#,Cname,T#) 评?
SC(S#,C#,score) 成W?
Teacher(T#,Tname) 教师?
1. 选出每门功课都及格的学号
select distinct `s#` from sc where `s#` not in (select `s#` from sc where score <60)
2. 查询?”课E比?”课E成l高的所有学生的学号Q?
SELECT c01.`s#` from (select `s#`, `score` from sc where `c#`=1) c01,
                          (select `s#`, `score` from sc where `c#`=2) c02
                     where c01.`s#` = c02.`s#` and c01.score > c02.score
3.  查询q_成W大于60分的同学的学号和q_成WQ?
select `s#`, avg(score) from sc group by `s#` having avg(score) > 60
4. 查询所有同学的学号、姓名、选课数、Ll;
select student.`s#`, student.`Sname`, count(`c#`), sum(score) from student left outer join sc on student.`s#` = sc.`s#` group by student.`s#`, sc.`s#`
5.查询没学q“叶q”老师评同学的学受姓名;
select student.`s#`, student.`Sname` from student where student.`s#` not in (select distinct(sc.`s#`) from teacher, course, sc where Tname='叶^' and teacher.`t#` = course.`t#` and sc.`c#`= course.`c#` )
6. 查询学过?01”ƈ且也学过~号?02”课E的同学的学受姓?
select student.`s#`, student.sname from student, sc where student.`s#` = sc.`s#` and sc.`c#` = 1 and exists (select * from sc sc_2 where sc_2.`c#`=2 and sc.`s#`=sc_2.`s#`)
7. 查询学过“叶q”老师所教的所有课的同学的学号、姓?(巧妙)
select `s#`, sname from student where `s#` in
       (select `s#` from sc, teacher, course where tname='叶^' and teacher.`t#`=course.`t#` and course.`c#`= sc.`c#` group by `s#` having count(sc.`c#`)=
               (select count(`c#`) from teacher, course where tname='?q? and teacher.`t#`=course.`t#`) )
8. 查询评~号?02”的成W比课E编号?01”课E低的所有同学的学号、姓?(有代表?
select `s#`, sname from (select student.`s#`, student.sname, score, (select score from sc sc_2 where student.`s#`=sc_2.`s#` and sc_2.`c#`=2) score2 from student , sc where
       sc.`s#`=student.`s#` and sc.`c#`=1) s_2 where score2 < score
9.查询没有学全所有课的同学的学号、姓?
select student.`S#`, Sname from student, sc where student.`s#` = sc.`s#` group by `s#`, sname having count(`c#`) < (select count(`c#`) from course)
10. 查询臛_有一门课与学号ؓ?02”的同学所学相同的同学的学号和姓名Q?
select distinct(sc.`s#`), sname from student, sc where student.`s#`=sc.`s#` and `c#` in (select `c#` from sc where `s#`=002)
11. 把“SC”表中“叶q”老师教的评成W都更改ؓ此课E的q_成WQ?
update sc inner join
       (select sc2.`c#`, avg(sc2.score) score from sc sc2, teacher, course where
              sc2.`c#`=course.`c#` and tname='叶^' and teacher.`t#` = course.`t#` and course.`c#`=sc2.`c#` group by course.`c#`) sc3 on sc.`c#`=sc3.`c#` set sc.score=sc3.score
12. 查询2L同学学习的课E他都学了的同学的学PQ注意理解:where语句?W一个条件过滤掉不满c#的记录,再group byQ就比较清晰Q?
select `S#` from SC where `C#` in (select `C#` from SC where `S#`=2)
    group by `S#` having count(*)=(select count(*) from SC where `S#`=2);



人在江湖 2012-06-26 09:29 发表评论
]]>
企招JavaQ发个招聘脓Q版ȝ?/title><link>http://m.tkk7.com/vcycyv/archive/2011/10/10/360411.html</link><dc:creator>人在江湖</dc:creator><author>人在江湖</author><pubDate>Mon, 10 Oct 2011 09:47:00 GMT</pubDate><guid>http://m.tkk7.com/vcycyv/archive/2011/10/10/360411.html</guid><wfw:comment>http://m.tkk7.com/vcycyv/comments/360411.html</wfw:comment><comments>http://m.tkk7.com/vcycyv/archive/2011/10/10/360411.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/vcycyv/comments/commentRss/360411.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/vcycyv/services/trackbacks/360411.html</trackback:ping><description><![CDATA[<p>Software Developer - SAS Financial Management Mid-Tier<br>As a Software Developer, you will assist with the design, development and support of software for SAS Financial Management.  You will work on a developing the business logic for SAS Financial Management in a high performance Java based mid tier.  Your primary responsibilities will include designing and writing new or revised application code; performing development level testing, assisting in documentation and training; and performing other duties as assigned.<br>Essential<br>?nbsp;   Bachelor’s degree in Computer Science or related quantitative field<br>?nbsp;   5 years of development experience<br>?nbsp;   3 years of Java experience<br>?nbsp;   Professional experience with algorithm analysis and performance<br>?nbsp;   Professional experience developing server side objects which are used as part of a highly scalable distributed application<br>?nbsp;   Professional experience with JDBC and SQL<br>?nbsp;   Professional experience designing and developing distributed applications<br>?nbsp;   Fluent English<br>Additional<br>?nbsp;   Excellent development skills with a thorough understanding of Object Oriented programming<br>?nbsp;   Ability to work independently as well as part of a team<br>?nbsp;   Superior analytical and problem-solving skills<br>Preferences<br>?nbsp;   Professional experience developing with the following technologies:<br>o    JUnit<br>o    OLAP<br>o    HTML<br>o    HTTP(S)<br>o    LDAP<br>o    SOAP<br>o    Web Services<br>?nbsp;   Financial application development experience or experience with Oracle Financials, Great Plains, PeopleSoft, Hyperion, or similar financial software <p>Software Developer - SAS Financial Management Web Application<br>As a Software Developer, you will assist with the design, development and support of software for SAS Financial Management.  You will work on a developing the web application for SAS Financial Management.  Your primary responsibilities will include designing and writing new or revised application code; performing development level testing, assisting in documentation and training; and performing other duties as assigned.<br>Essential<br>?nbsp;   Bachelor’s degree in Computer Science or related quantitative field<br>?nbsp;   5 years of development experience<br>?nbsp;   2 years of Java experience<br>?nbsp;   2 years of web development experience<br>?nbsp;   Professional experience developing web applications which are part of a highly scalable distributed application<br>?nbsp;   Professional experience designing and developing distributed applications<br>?nbsp;   Fluent English<br>Additional<br>?nbsp;   Excellent development skills with a thorough understanding of Object Oriented programming<br>?nbsp;   Ability to work independently as well as part of a team<br>?nbsp;   Superior analytical and problem-solving skills<br>Preferences<br>?nbsp;   Professional experience developing with the following technologies:<br>o    Adobe Flash<br>o    JUnit<br>o    OLAP<br>o    HTML<br>o    SOAP<br>o    Web Services<br>?nbsp;   Financial application development experience or experience with Oracle Financials, Great Plains, PeopleSoft, Hyperion, or similar financial software <p>======================================= <p>历可以发C们老板的邮:yan.gao@sas.com</p><img src ="http://m.tkk7.com/vcycyv/aggbug/360411.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/vcycyv/" target="_blank">人在江湖</a> 2011-10-10 17:47 <a href="http://m.tkk7.com/vcycyv/archive/2011/10/10/360411.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>hsqldb的用方?/title><link>http://m.tkk7.com/vcycyv/archive/2011/03/26/347071.html</link><dc:creator>人在江湖</dc:creator><author>人在江湖</author><pubDate>Sat, 26 Mar 2011 14:39:00 GMT</pubDate><guid>http://m.tkk7.com/vcycyv/archive/2011/03/26/347071.html</guid><wfw:comment>http://m.tkk7.com/vcycyv/comments/347071.html</wfw:comment><comments>http://m.tkk7.com/vcycyv/archive/2011/03/26/347071.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/vcycyv/comments/commentRss/347071.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/vcycyv/services/trackbacks/347071.html</trackback:ping><description><![CDATA[<p>现在很多开源项目用hsqldb作ؓ数据库。了解hsqldb的基本用方法还是很必要的。这不是全面介lhsqldb的文字,但我认ؓ用这个笔记的内容调试E序够用了?/p> <p>一、下载数据库Q地址?a title="http://sourceforge.net/projects/hsqldb/files/hsqldb/" >http://sourceforge.net/projects/hsqldb/files/hsqldb/</a> 我用的?.8.0版本。假定下载解压后的目录是D:\hsqldb\, 那么hsqldb.jar在D:\hsqldb\lib目录下。这个jar文g是hsqldb的核心包</p> <p> </p> <p>二、启动数据库Q比如数据库名称为test(不需要提前徏test数据?: java -classpath D:\hsqldb\lib\hsqldb.jar org.hsqldb.Server -database test</p> <p> </p> <p>三、在hsqldb的demo目录下有runManagerSwing.batQ运行它Q注意Type选择Engine ServerQ同时注意URL的写法。你E序中配|的jdbc property中的url也应该是q样的:jdbc.url=jdbc:hsqldb:hsql://localhost</p> <p> </p> <p><a href="http://m.tkk7.com/images/blogjava_net/vcycyv/WindowsLiveWriter/hsqldb_13EB7/image_2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://m.tkk7.com/images/blogjava_net/vcycyv/WindowsLiveWriter/hsqldb_13EB7/image_thumb.png" width="516" height="446"></a> </p> <p>接着p入图形界面可以看到表Qƈ且执行sql了?/p><img src ="http://m.tkk7.com/vcycyv/aggbug/347071.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/vcycyv/" target="_blank">人在江湖</a> 2011-03-26 22:39 <a href="http://m.tkk7.com/vcycyv/archive/2011/03/26/347071.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>工作中用到的一些免费Y?/title><link>http://m.tkk7.com/vcycyv/archive/2011/03/18/346513.html</link><dc:creator>人在江湖</dc:creator><author>人在江湖</author><pubDate>Fri, 18 Mar 2011 01:10:00 GMT</pubDate><guid>http://m.tkk7.com/vcycyv/archive/2011/03/18/346513.html</guid><wfw:comment>http://m.tkk7.com/vcycyv/comments/346513.html</wfw:comment><comments>http://m.tkk7.com/vcycyv/archive/2011/03/18/346513.html#Feedback</comments><slash:comments>8</slash:comments><wfw:commentRss>http://m.tkk7.com/vcycyv/comments/commentRss/346513.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/vcycyv/services/trackbacks/346513.html</trackback:ping><description><![CDATA[<p>上学的时候都装盗版YӞ工作了做E序员开始抵触盗版了Q毕竟咱也是靠写代码混饭吃的Q何况工作环境也不允许装盗版。把qx用的一些免费Y件列出来Q抛砖引玉。大家有什么好的Y件也推荐一下?/p> <p> </p> <p>d软gQEDraw free mind <a title="http://www.edrawsoft.com/cn/freemind.php" >http://www.edrawsoft.com/cn/freemind.php</a></p> <p>评论Q这个Y件名义上是画思维导图的,其实功能挺强大的。能d来比较复杂的图。^时咱工作写个文档Q要配个囑֕的,qq个画,挺好?/p> <p> </p> <p>思维导图软gQXMind <a title="http://www.xmind.net/" >http://www.xmind.net/</a></p> <p>评论Q更出名的同cY件是freemind. 但是不如XMind好用。思维导图本n是一U?自上而下"的思维方式Q就跟咱写代码的思维方式cM. 思维导图q能用来记笔记。把自己的hibernateW记截图发上来,有个直观印象Q?/p> <p><a href="http://m.tkk7.com/images/blogjava_net/vcycyv/WindowsLiveWriter/be846bbc4334_8102/image_2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://m.tkk7.com/images/blogjava_net/vcycyv/WindowsLiveWriter/be846bbc4334_8102/image_thumb.png" width="916" height="498"></a> </p> <p>q个W记可以从这里下载:<a title="http://cid-d8b11f9bf86fecfa.office.live.com/self.aspx/.Public/Hibernate.xmind" >http://cid-d8b11f9bf86fecfa.office.live.com/self.aspx/.Public/Hibernate.xmind</a></p> <p> </p> <p>ȝ面prototype的: Pencil <a title="http://pencil.evolus.vn/en-US/Home.aspx" >http://pencil.evolus.vn/en-US/Home.aspx</a></p> <p>评论Q它本n是firefox的一个插Ӟy好用。我们和国同事合作开发,交流界面l构qq个Q哈哈,我推荐的?/p> <p> </p> <p>|络盘工具Q?SDExplorer: <a title="http://www.cloudstorageexplorer.com/" >http://www.cloudstorageexplorer.com/</a></p> <p>评论Q重要的东西攑֜|络盘上,得选个靠谱的网l硬盘。微软够靠谱儿吧Q?5G sky drive免费I间。但是sky drive太慢了。可以用q个工具把sky drive|络盘映射C自己的机器上Q就像本地的盘一P方便。我上面׃n的hibernateW记是攑֜sky drive上的?之前׃n?<a href="http://m.tkk7.com/vcycyv/archive/2011/02/14/344298.html"><font color="#0000ff">分n十二本经典电子书Q涉及java, OO design, spring, hibernate,struts2, agile</font></a> 也放在那上面?/p> <p> </p> <p>文g解锁工具Qlock hunter: <a title="http://lockhunter.com/" >http://lockhunter.com/</a></p> <p>评论Q?有时候文件删不掉Q提C锁了。天知道什么程序在使用q个文g…lock hunter知道Q而且q能解锁?/p> <p> </p> <p>抛砖引玉。大家有什么好的Y件也推荐一下?/p><img src ="http://m.tkk7.com/vcycyv/aggbug/346513.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/vcycyv/" target="_blank">人在江湖</a> 2011-03-18 09:10 <a href="http://m.tkk7.com/vcycyv/archive/2011/03/18/346513.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>发个招hq告http://m.tkk7.com/vcycyv/archive/2011/02/25/345147.html人在江湖人在江湖Fri, 25 Feb 2011 13:56:00 GMThttp://m.tkk7.com/vcycyv/archive/2011/02/25/345147.htmlhttp://m.tkk7.com/vcycyv/comments/345147.htmlhttp://m.tkk7.com/vcycyv/archive/2011/02/25/345147.html#Feedback0http://m.tkk7.com/vcycyv/comments/commentRss/345147.htmlhttp://m.tkk7.com/vcycyv/services/trackbacks/345147.html我们公司的一个QA团队招h。是个挺不错的团队,很多其他team的h都想往那儿transfer呢。他们招人很急,我这么善良,在blog里脓出来Q看看能不能帮忙收到好简历?/p>

 

招聘的原链接Q?http://jobs.zhaopin.com/P2/CC0003/1191/J902/509/CC000311917J90250983000.htm?f=ss

 

软g分析师A

Job Responsibilities:

The mission of this role is to improve the customer competence of SAS. You are expected and will be cultivated to be an expert who understands SAS technology/solution, globalization and the domain knowledge. In more details, duties will include:Conducts customer experience testing and best practice testing for SAS technologies and solutions;

  • Provides counseling on localized SAS software;
  • Provides internal SAS practice training and implementation guidance, especially for new product and solutions;
  • Collects the feedback from customers.

Qualifications:

  • Hands on experience in business intelligence;
  • Passion on programming, hands on Java programming or C/C++ experiences and skills;
  • Better skills on communication, customer-facing and problem-resolving;
  • The ability to work as member of a team, virtual team and individual;
  • Good written and spoken English;
  • Master’s or Bachelor's degree.

Preferences:

  • SAS products and technology knowledge;
  • Domain Knowledge in retail industry, financial management, risk management, CRM, etc.;
  • Experience in internationalization and localization.

 

发送简历至:bjrnd@sas.com



人在江湖 2011-02-25 21:56 发表评论
]]>
也谈代码质量http://m.tkk7.com/vcycyv/archive/2011/02/19/344664.html人在江湖人在江湖Sat, 19 Feb 2011 09:52:00 GMThttp://m.tkk7.com/vcycyv/archive/2011/02/19/344664.htmlhttp://m.tkk7.com/vcycyv/comments/344664.htmlhttp://m.tkk7.com/vcycyv/archive/2011/02/19/344664.html#Feedback5http://m.tkk7.com/vcycyv/comments/commentRss/344664.htmlhttp://m.tkk7.com/vcycyv/services/trackbacks/344664.htmlq篇是 一堂如何提高代码质量的培训?/a> 的读后感。作者网名fangang. q系列文章涵盖很多内容,包括设计模式QDDDQ代码审核等{。这些话题大于“代码质量”。更像是“提高Y件质量的培训䏀。培训课本n是高质量的Q赞Q网上有不少转蝲Q比?a title="http://www.tech-q.cn/thread-3831-1-1.html" >http://www.tech-q.cn/thread-3831-1-1.html。赞同作者的很多观点Q也收益不少。ȝ一下:

 

[fangang]我们评h高质量代码有三要素:可读性、可l护性、可变更性?/p>

[vcycyv]同意q三个方面。我总这hQY件的核心是可l护性。可l护性主要就体现在可L和扩展性?/p>

 

[fangang]Q可L)不要~写大段的代?/p>

[vcycyv]Martin Fowler?从大D代码抽取独立的Ҏ"叫做"extract method"Q这是常见而重要的重构手段。在他的refactor书里从技术层面做了详l的阐述。分解的q程中,比较Ҏ形成技术障的local variable. 引一D书里的话,专门讨论q个话题的:

?nbsp;    Copy the extracted code from the source method into the new target method.
?nbsp;    Scan the extracted code for references to any variables that are local in scope to the
source method. These are local variables and parameters to the method.
?nbsp;    See whether any temporary variables are used only within this extracted code. If so,
declare them in the target method as temporary variables.
?nbsp;    Look to see whether any of these local-scope variables are modified by the extracted
code. If one variable is modified, see whether you can treat the extracted code as a query
and assign the result to the variable concerned. If this is awkward, or if there is more than
one such variable, you can't extract the method as it stands. You may need to use Split
Temporary Variable and try again. You can eliminate temporary variables with
Replace Temp with Query (see the discussion in the examples).
?nbsp;    Pass into the target method as parameters local-scope variables that are read from the
extracted code.
?nbsp;    Compile when you have dealt with all the locally-scoped variables.
?nbsp;    Replace the extracted code in the source method with a call to the target method.

?nbsp;    Compile and test.

 

前两q看C个讨论的很火的话题,说Q意复杂的产品Q都能break into一pd的小ҎQ每个方法行C过5行。当然没必要q么狠,但如果你真这么狠Q我倒觉得没啥明昄坏处?/p>

 

"而一些更有经验的E序员会采用另外一U从上往下的~写方式。当他们在编写程序的时候,每个被分出去的程序,可以暂时只写一个空E序而不d体实现功能。当ȝ序完成以后,再一个个实现它的所有子E序。采用这L~写方式Q可以复杂E序有更好的规划Q避免只见树木不见森林的弊病?q也是一个好的实c?

 

提到q种自上而下的编E方法,Z推荐 《斯坦福大学开放课E:~程Ҏ》。这是一pd视频教程。google一下有很多地方可以下蝲或在U观看,比如优酷http://v.youku.com/v_show/id_XMjE4NzQ0NDI0.html 在视频教E里教授也演CZ自上而下的编E方法?q是入门U的教程Q本来想通过它练l听力,后来发现q课E根本就是喜剧片Q看的过E一直狂W,教授牚w?

 

跟可L相关的一个话题就是注释。近q来一个广泛被接受的做法是Q尽量通过 避免大段代码 以及良好的变量命名达到可L。注释在q个q程中被淡化了。我基本同意q种做法Q程序结构清晎ͼ自解释的变量名都是重要的实践。变量名量不要写羃写,如果写羃写的话,一定要?strong>~写字典有据可查。看spring的代码,可以发现很多cd或方法名?0个字W以上。大D|释往往暗示E序l构的不合理。不鼓励写过多注释的l果是Q剩下的注释都是重要不可或缺的,注释是程序的一部分Q需要和E序保持一_也需要被l护。另一个基本而重要的原则是,要把public package protected privateҎ按照序写。更重要的、可讉K性更高的Ҏ攑։面,管eclipse里可以方便地在视图过滤非publicҎ?

 

[fangang](可维护?但是Q事实却不一PҎ关ơ计的代码遍布整个目Q甚x些还写入C那些复杂的SQL语句中?

[vcycyv] Domain Driven DisignQdomain的逻辑要圈在一定边界中。往上不能爬到service, 甚至UI层。往下不能渗透到repository以下Q比如sql语句里?Domain Driven Design的书?a >q里下蝲。更多电子书可以看之前写的博?分n十二本经典电子书

 

[fangang]专用代码提升ؓ通用代码

[vcycyv] q个q程大家都会遇到。什么代码算通用代码q不Ҏ界定。过多的通用代码Ҏ了真正有通用意义的方法,不的通用代码Ҏ造成代码重复。这个过E有q么几个斚w需要注意?

一Q避免重复造轮子?要对JDK常用的API以及l典W三方的软g包有一定了?/strong>。D两个例子Q古典的singleton在JDK1.5之后可以用单一元素的enum表示Q而且不用考虑serializable的readresolve问题Q?apache commons里的io, lang{包提供了很多常用的API。我在我们的产品里,用到io的FileNameUtils和ExceptionUtils的一些方法。包括取文g后缀名,获取exception的root cause以及excepiton stack的字W串?要尽量重用可靠的W三方代码, 原因是你自己写的代码多半不如Sun和apache的h好。更重要的是Q你自己写的每一行code都要自己l护。代码行数本w就是代码维护量的一个因素。最q一两年疯狂地喜Ƣ删除代码,估计再发展下Lp被删除了?

二, q是domain为先?strong>当你犹U一D|较“通用”的代码应该攑֜module里还是拿出来的时候,量q是保留在module里吧。因为如果你犹U来,犹UM后,军_它是global的通用代码Q下一个h非常可能在module里找不到Q就认ؓ没有q种code,自己又写一遍。太Ȁq的写一堆通用代码Q一旦组l不好,没人爱M通用代码里寻宝了。关于这一点,martin大叔有近似的阐述Q??a >Patterns of Enterprise Application Architecture?

A common concern with domain logic is bloated domain objects. As you build a screen to manipulate orders you'll notice that some of the order behavior is only needed only for it. If you put these responsibilities on the order, the risk is that the Order class will become too big because it's full of responsibilities that are only used in a single use case. This concern leads people to consider whether some responsibility is general, in which case it should sit in the order class, or specific, in which case it should sit in some usage-specific class, which might be a Transaction Script (110) or perhaps the presentation itself.

The problem with separating usage-specific behavior is that it can lead to duplication. Behavior that's separated from the order is harder to find, so people tend to not see it and duplicate it instead. Duplication can quickly lead to more complexity and inconsistency, but I've found that bloating occurs much less frequently than predicted. If it does occur, it's relatively easy to see and not difficult to fix. My advice is not to separate usage-specific behavior. Put it all in the object that's the natural fit. Fix the bloating when, and if, it becomes a problem.

三、通用代码一定要有整体设计。如果调用通用代码的那些invoker不完全在你控制的范围Q比如你写的E序有其他项目组在调用,那么你修改API的签名一定会被骂ȝ。所以通用代码要思前惛_design清楚了才release.l构清楚的通用代码也比较方便以后查找?strong>好的E序L分层的,通用代码要尽量往底层?/strong>?

 

[fangang]一个快速提高Y件质量的捷径是利用设计模式?

[vcycyv]设计模式除了是一U工具以外,学习、思考设计模式能扩展coding的思维方式。自׃ȝ了一博?串讲23U设计模?/a> ?

 

[fangang]拿一个员工工资系l来说吧。当人力资源在发放一个月工资的时候,以及职的员工肯定不能再发放工资了。在pȝ设计的期初,开发h员商量好Q在员工信息中设定一个“离职标志”字Dc编写工资发攄开发h员通过查询Q将“离职标志”ؓfalse的员工查询出来,qؓ他们计算和发攑ַ资。但是,随着q个pȝ的不断用,~写员工理的开发h员发玎ͼ“离职标志”字D已l不能满_L需求,因而将“离职标志”字D废弃,q增加了一个“离职时间”字D|理职的员工。然而,~写工资发放的开发h员ƈ不知道这L变更Q依然用着“离职标志”字Dc显Ӟq样的结果就是,软gpȝ开始对职员工发放工资了。仔l分析这个问题的原因Q我们不隑֏玎ͼ认员工是否职Qƈ不是“发攑ַ资”Y件类应当完成的工作,而应当是“员工管理”Y件类应当完成的。如果将“获取非职员工”的d交给“员工管理”Y件类Q而“发攑ַ资”Y件类仅仅只是去调用,那么职功能由“离职标志”字D|Z“离职时间”字D,其实׃“发攑ַ资”Y件类毫无关系。而作为“员工管理”的开发h员,一旦发生这L变更Q他当然知道M改自q应的“获取非职员工”函敎ͼq样׃会发生以上问题?

[vcycyv]哈哈Q我喜欢q个例子。DDD的核心思想是q个。当然DDD的理有一些具体的实践。Eric Evan在他的DDD书里讲了一个cargo的例子,当时我还找了一下代码,没找刎ͼ从fangang的博客评论里居然发现哪里能找C码了Q?a title="http://dddsample.sourceforge.net/" >http://dddsample.sourceforge.net/, q没来得及具体看。以后有Z深入了解一下?

 

[fangang]Q代码审查) 被审查后的代码如果还出现~陷Q审查者应当负有责?

[vcycyv] q个pd的最后一文章主题是代码审查。作者所说的最佛_践很有道理,但不是在M环境下可操作性都强的。我不知道最佛_跉|什么,但我觉得有一些问题是值得注意的?

一?strong>代码审查的范围要,最好是one-one?/strong>Q跟l效没有关系Q范围小可以保证审查不会太伤“面子”,否则会媄响团l氛围?

二?strong>审查者在指出错误的同Ӟ一定要说如何修正问?/strong>。我非常非常反感那种善于用大道理指出别h错误Q自己却把错误犯得更夸张的那Uh。如果你自己没有更好的解x案,别说那是问题?

三、代码审查制度的推行以良好的团队氛围为前提。大安是ؓ了品着惻Iq样代码审查才不至于扯皮?

四、关于审查者的责Q。我同意fangang说的"被审查后的代码如果还出现~陷Q审查者应当负有责?, 但是谁来q究责QQ如何界定责任,怎么q究责Q呢?呵呵Q这个恐怕不好操作。代码审查显然不能杜ldefect, 但是明显的设计,~码错误是应该看到的Q但怎么又算"明显"呢。Y件本w不像数学那样严|Ҏ界定问题。纪律在软g行业作用有限Q团队氛围比U律重要。但怎么营造好的团队氛围又是一个太宽泛的问题?

人在江湖 2011-02-19 17:52 发表评论
]]>
咱数据库使用外键么?http://m.tkk7.com/vcycyv/archive/2011/02/17/344481.html人在江湖人在江湖Wed, 16 Feb 2011 16:58:00 GMThttp://m.tkk7.com/vcycyv/archive/2011/02/17/344481.htmlhttp://m.tkk7.com/vcycyv/comments/344481.htmlhttp://m.tkk7.com/vcycyv/archive/2011/02/17/344481.html#Feedback12http://m.tkk7.com/vcycyv/comments/commentRss/344481.htmlhttp://m.tkk7.com/vcycyv/services/trackbacks/344481.html今天看天乙社区的E序Q发C个外键都没有啊,太狠了。上|看了一些资料,E微整理了一下?/p>

q个帖子很牛Q?/p>

http://www.itpub.net/viewthread.php?tid=1313696&extra=&page=1

 

我的观点是,外键在初始阶D能加的都加上,只有q不得已的时候才disable或drop掉。遇到性能瓉的时候,量采用其它方式调优Q而不要轻易牺牲掉外键。有外键U束的时候,写程序的会有约束,但从直觉上说q种U束一定程度上揭示了设计或实现上不合理的地斏V带着外键写出来的应用更們֐于严谨。品上U之前如果确实需要通过牺牲外键辑ֈ性能上的优化Q再捡相对不重要的外键废弃掉Q同时要把这个document下来Q下ơ遇到数据不一致问题的时候,是个U烦。两点说明:1. 我们在做的一个项目确实是项目?nbsp; 2. 我得承认我最q三q开发都不用关系型数据库Q貌?no sql那么nb的key-value pair存数据,其实q三q在持久层上很多U结。如果我说的不对Q请指正Q?/u>

 

下面引用一些有见地的想法:

× 支持外键的:

1. 你的E序再严谨也有可能出现BUG;你自己判断不如交l数据库判断Q它做得又快又好?br>    大多Ch的程序没有考虑q发问题。一旦考虑了就得手工加锁,效率很低?br>    数据可能l过你的应用E序q入数据库?br>2. 性能问题Q难道你自己做就没有开销Q?br>    一个外键判断分摊到事务U别Q开销可以忽略Q用户完全没有察觉?br>    如果是批量导入数据,可以先暂时屏蔽外键,事后用NOVALIDATE选项快速恢复,前提是你的数据是q净的?

 

也有人提C如果100张表可能需要徏?00个约束,D性能太差?br>我要说的仍然是,是否q?00个外键约束都是业务必ȝQ如果是Q没有办法这是必须要加的,如果不是Q那么大可不必在所有的地方都增加外键?br>如果在程序中仅对其中??张表?0来个外键U束q行判断Q然后和数据库中?00个外键去比较Qƈ评hOracle的外键性能太差Q恐怕是有失公允的?

 

× 反对外键的:

的确外键在大pȝ中用的很,在开发初U,设计数据库的时候一般会加入外键Q以保证pȝ设计的完整性和业务需求的完整性,也便于开发h员了解业务规则,在程序中加以控制Q很多大pȝ在系l稳定后Q会逐步外键去掉,以保证性能Q将太多的功能强加于数据库,虽然说数据库很强大,但是毕竟很多Z信Q数据库的能强大到什么都能干的地步。所以在一个大pȝ中外键见的少也不ؓ奇,系l就无所谓了Q用不用外键取决于设计h员,q样的系l也随处可见?

 

 

另引用一:

引自http://blog.csdn.net/neusoft_lkz/archive/2009/07/21/4366668.aspx

数据库设计是否需要外键。这里有两个问题Q一个是如何保证数据库数据的完整性和一致性;二是W一条对性能的媄响?br>正方观点Q?br>1Q由数据库自w保证数据一致性,完整性,更可靠,因ؓE序很难100Q保证数据的完整性,而用外键即在数据库服务器当机或者出现其他问题的时候,也能够最大限度的保证数据的一致性和完整性?br>egQ数据库和应用是一对多的关p,Q应用会l护他那部分数据的完整性,pȝ一变大Ӟ增加了应用QA和两个应用也许是不同的开发团队来做的。他们如何协调保证数据的完整性,而且一q以后如果又增加了C应用呢?
2Q有d键的数据库设计可以增加ER囄可读性,q点在数据库设计旉帔R要?br>3Q外键在一定程度上说明的业务逻辑Q会使设计周到具体全面?br>反方观点Q?br>1Q可以用触发器或应用E序保证数据的完整?br>2Q过分强调或者说使用主键Q外键会qx开发难度,D表过多等问题
3Q不用外键时数据理单,操作方便Q性能高(导入导出{操作,在insert,   update,   delete   数据的时候更快)
eg:在v量的数据库中想都不要L外键Q试惻I一个程序每天要insert数百万条记录Q当存在外键U束的时候,每次要去扫描此记录是否合|一般还不止一个字D|外键Q这h描的数量是成U数的增长!我的一个程序入库在3个小时做完,如果加上外键Q需?8个小Ӟ 

l论Q?br>1Q在大型pȝ中(性能要求不高Q安全要求高Q,使用外键Q在大型pȝ中(性能要求高,安全自己控制Q,不用外键Q小pȝ随便Q最好用外键?br>2Q用外键要适当Q不能过分追?br>3Q不用外键而用E序控制数据一致性和完整性时Q应该写一层来保证Q然后个个应用通过q个层来讉K数据库?

人在江湖 2011-02-17 00:58 发表评论
]]>
分n十二本经典电子书Q涉及java, OO design, spring, hibernate,struts2, agilehttp://m.tkk7.com/vcycyv/archive/2011/02/14/344298.html人在江湖人在江湖Mon, 14 Feb 2011 13:45:00 GMThttp://m.tkk7.com/vcycyv/archive/2011/02/14/344298.htmlhttp://m.tkk7.com/vcycyv/comments/344298.htmlhttp://m.tkk7.com/vcycyv/archive/2011/02/14/344298.html#Feedback12http://m.tkk7.com/vcycyv/comments/commentRss/344298.htmlhttp://m.tkk7.com/vcycyv/services/trackbacks/344298.html怿你们都读q其中的一些书Q太l典了,值得反复玩味。每本都能从我的sky drive|络盘下蝲

1. thinking in java

java developer常见案头?/p>

 

2. effective java, 2nd Edition

会写代码和写好代码的差距Q可以靠q本书羃短。包含JDK1.5的feature. 太出名了Q不多评论?/p>

 

3. refactoring – improve the design of existing code

Martin Fowler的经典著作之一。初看的时候一头冷汗,他指出的很多错误我也犯过?/p>

 

4. J2EE Development Without EJB

Rod Johnson单挑EJB的思想基本都反映在q里

 

5. J2EE Design & Development

作者仍然是Rod Johnson, 和上一本书是一个系列的好书Q同L典?/p>

 

6. Domain Driven Design – Tackling Complexity In The Heart Of Software

q两q来对自己媄响最大的一本书。俺到处推广之?/p>

 

7. Extreme programming explained – embrace change 2nd edition

W一版就备受推崇Q?得了Jolt大奖Q这是Kent Beck又经锤炼的第二版

 

8. Patterns of Enterprise Application Architecture

很多人都是通过q本书认识Martin大叔的吧Q?哈哈Q去q?0月我亲眼见到了Martin FowlerQ还问了问关于这本书的问题?/p>

 

9. Spring in Action

自己是靠q本书入门Spring?/p>

 

10. Pro Spring

说实话,q本书只是简单翻q,讲了一些上一本书没cover到的东西。Amazon上评L当高

 

11. Java Persistence with Hibernate

学hibernate的不二之?/p>

 

12. Struts 2 in Action

Struts2q种技术不太适合看书学,应该直接看例?google, q本可以捡重点看看,然后当工具书ѝ?/p>

人在江湖 2011-02-14 21:45 发表评论
]]>
svnq移Qdump &amp; loadQ?&amp; 删除已保存的用户?/title><link>http://m.tkk7.com/vcycyv/archive/2011/02/13/344177.html</link><dc:creator>人在江湖</dc:creator><author>人在江湖</author><pubDate>Sun, 13 Feb 2011 03:53:00 GMT</pubDate><guid>http://m.tkk7.com/vcycyv/archive/2011/02/13/344177.html</guid><wfw:comment>http://m.tkk7.com/vcycyv/comments/344177.html</wfw:comment><comments>http://m.tkk7.com/vcycyv/archive/2011/02/13/344177.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/vcycyv/comments/commentRss/344177.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/vcycyv/services/trackbacks/344177.html</trackback:ping><description><![CDATA[<p><strong><font size="4">q移</font></strong></p> <p>我用visual svn作ؓ服务器。用方法参见我的另一博客: <a href="http://m.tkk7.com/vcycyv/archive/2011/01/30/343785.html">visualsvn</a></p> <p>1. 创徏待备份的repositoryӞ选中create default structure(trunk, branches, tags). check in 一些代?/p> <p>2. dump: q行 svnadmin dump c:\svnRepo\forum > forum.dump</p> <p>3. 在另一台机器上创徏forum repository. q次不要选create default structure</p> <p>4.  load: q行 svnadmin load D:\svnRepo\forum < d:\tmp\forum.dump</p> <p> </p> <p><strong><font size="4">删除已保存的用户?/font></strong></p> <p><font size="2">win7下清I此目录下的文g C:\Users\【user】\AppData\Roaming\Subversion\auth\svn.simple</font></p><img src ="http://m.tkk7.com/vcycyv/aggbug/344177.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/vcycyv/" target="_blank">人在江湖</a> 2011-02-13 11:53 <a href="http://m.tkk7.com/vcycyv/archive/2011/02/13/344177.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>备䆾mysql的bat脚本http://m.tkk7.com/vcycyv/archive/2011/01/30/343788.html人在江湖人在江湖Sun, 30 Jan 2011 10:21:00 GMThttp://m.tkk7.com/vcycyv/archive/2011/01/30/343788.htmlhttp://m.tkk7.com/vcycyv/comments/343788.htmlhttp://m.tkk7.com/vcycyv/archive/2011/01/30/343788.html#Feedback0http://m.tkk7.com/vcycyv/comments/commentRss/343788.htmlhttp://m.tkk7.com/vcycyv/services/trackbacks/343788.htmlq抄带改了一个,记录下来

@echo off
set errorlevel=0
set dump_command="C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqldump"

set db_bbs=bbscs8
set db_bug=jtrac
set db_wiki=wiki

set backup_dir=U:\bak\mysql\
set timestamp=%date:~,4%%date:~5,2%%date:~8,2%_%time:~0,2%-%time:~3,2%-%time:~6,2%

set backup_bbs_file=%backup_dir%%db_bbs%_backup_%timestamp%.sql
set backup_bug_file=%backup_dir%%db_bug%_backup_%timestamp%.sql
set backup_wiki_file=%backup_dir%%db_wiki%_backup_%timestamp%.sql

set user_mysql=root
set password_mysql=virtual

echo backup mysql database:%db_bbs%
%dump_command% -u%user_mysql% -p%password_mysql% %db_bbs% &gt; %backup_bbs_file%

echo backup mysql database:%db_bug%
%dump_command% -u%user_mysql% -p%password_mysql% %db_bug% &gt; %backup_bug_file%

echo backup mysql database:%db_wiki%
%dump_command% -u%user_mysql% -p%password_mysql% %db_wiki% &gt; %backup_wiki_file%

echo end backup



人在江湖 2011-01-30 18:21 发表评论
]]>
visualsvn(?http://m.tkk7.com/vcycyv/archive/2011/01/30/343785.html人在江湖人在江湖Sun, 30 Jan 2011 10:16:00 GMThttp://m.tkk7.com/vcycyv/archive/2011/01/30/343785.htmlhttp://m.tkk7.com/vcycyv/comments/343785.htmlhttp://m.tkk7.com/vcycyv/archive/2011/01/30/343785.html#Feedback0http://m.tkk7.com/vcycyv/comments/commentRss/343785.htmlhttp://m.tkk7.com/vcycyv/services/trackbacks/343785.html今天试用了一下,很好Q{贴自Q?a >http://blog.csdn.net/mini_snow/archive/2008/11/01/3197017.aspx

VisualSVN Server----更方便用的SVN服务?收藏
  前发C一个好用的服务器端软gVisualSVN Server。下面就其安装及配置Ҏ作一略介l:

1Q?安装
q里我们下蝲Windowsq_下的VisualSVN ServerQ地址在这里,下蝲后,双击安装Q弹Z面的对话框,可以更改Respositories仓库路径Q?

2Q用VisualSVN Server Managerq行配置
安装完毕Q默认会弹出VisualSVN Server Manager理器,在管理器中的Repositories目录下可以创建我们将要上传源码的目录l构Q如图所C,U框内是该目录在服务器上的http地址Q?

注意Q在Resposiories下目录创Z前,首先要在Users目录创徏拥有上传下蝲权限的用户及其密码(如:用户Qmike, 密码Q?23Q?

3Q上传源?
q里我们使用Eclipse的svn插g来上传源码,选中所要上传的工程Q右键Team->Share ProjectQ弹出对话框Q选中SVN,l箋C一,如下囄Q?

   URL栏填入目录服务器的http地址QUser及Password栏填入mike?23,q入下一步,如有warning对话框弹出,选择"Trust Always"卛_Qsvn代码提交Ҏ不在q里赘述。提交完毕,卛_看到Eclipse工程源码出现svn服务器地址或版本号?



人在江湖 2011-01-30 18:16 发表评论
]]>
վ֩ģ壺 avר߹ۿ| ѨƬ߹ۿ| ŷ޹Ʒ㽶| aëƬƵۿ| ѹԺ߹ۿ| ɫַȫ| Ůۺһ| caopornƷ| ղһ| 99þþƷëƬѲ| þþƷAVվ| պƷϵר | 벻AV鶹| wwwƵ| ޸XXXXɫ| ѨƬ߹ۿͬѧ| ޳aƬ߹ۿ| þùƷѿ| С˵ͼƬƵ| վѹۿ| պƬӰ| AVһ| ҵijdzӪѿ| 911Ʒձ| 99þþþƷѹۿ| Ļһ| www.ɫͼ| 99ƷƵѹۿ| ߹ۿAVÿո| ѹۿСˮ| ȫƵ߹ۿѸ| ˾޾ƷӰԺ| ɫWWWƷƵ| ѴƬ߹ۿcom| ޶Ƶ˵ӰԺ| ҹ߹ۿ| ƷһƵ߹ۿ| ձҺ| ѹۿƵ| þùƷר| AVһַ |