烦恼岁月

付出总是有回报的 take action follow your heart , or follow your head
posts - 40, comments - 5, trackbacks - 0, articles - 4

2009年11月2日

自动地可视化表示数据库也可以让您受益匪浅。实体关系图(ERD)是实现数据库可视化的最流行的图示类型。大多数创建 ERD 的工具(例如,ERWinfor)都需要手动生成 ERD。虽然我将要示范的工具 SchemaSpy 无法与现存的一些更复杂的工具媲美,但是它能够提供数据库的高级 ERD 视图 — 以及约束、关系等。而且,通过自动构建来运行它,您就可以轻松地从您的版本控制库中检查数据定义语言(Data Definition Language,DDL)的最新显示。

Ant 脚本使用 SchemaSpy 工具来创建 Javadoc 格式的文件:

结合使用 SchemaSpy、Ant 和 Javadoc

<property name="reports.dir" value="${basedir}"/>
<java jar="schemaSpy_3.1.1.jar"
  output="${reports.dir}/output.log"
  error="${reports.dir}/error.log"
  fork="true">
  <arg line="-t mysql"/>
  <arg line="-host localhost"/>
  <arg line="-port 3306"/>
  <arg line="-db brewery"/>
  <arg line="-u root"/>
  <arg line="-p sa"/>
  <arg line="-cp mysql-connector-java-5.0.5-bin.jar"/>
  <arg line="-o ${reports.dir}"/>
</java>

 

使用 java Ant 任务调用 SchemaSpy,传递了很多属性:

  • -t 为数据库类型(有效值为 mysqloradb2,等等。)
  • -host 为托管数据库的计算机名。
  • -port 为数据库 URL 的端口数。
  • -u 为数据库用户名。
  • -p 为数据库密码。
  • -cp 为类路径(用于指示数据库驱动程序 JAR 文件的位置)。
  • -o 为输出目录的位置。

这些 SchemaSpy 的命令行属性用于生成显示 ERD 的 HTML 文件

通过结合使用多种工具、作为构建的一部分针对数据库执行 ERD 生成脚本,并调度 ERD 生成,您就可以在开发过程中轻松、快速地做出很多数据库决策。

另外,对于喜欢maven的同学,SchemaSpy  也提供了plugin

http://maven.wakaleo.com/mojo/maven-schemaspy-plugin/faq.html

posted @ 2010-05-16 16:16 不需要解释 阅读(511) | 评论 (0)编辑 收藏

     参加工作也已经5年多了,一直想回头回想一下自己,然后动笔写下来,一来是自己目前还可以记忆起一些事情,等自己将来老了,可以看看这些东西回忆回忆。二来也是想做一个总结。本来这个题目也可以叫做我的bmi5年,不过大家知道bmi的实在是少,而且现在这个公司已经名义上不存在了。

     我是在2001年去沈阳读书的,一直也是很喜欢沈阳的气候和东北人的豪爽,东北爷们是真正可以拿心和你交朋友的,不过我实在不喜欢东北的饮食,觉得不细腻,另外南方还有我的女人在等我回去,要女人来东北,难度不是一般的大,所以在找工作的时候,我就下定决心一定要找南方的公司,最好广州,深圳的,或者老家南昌的也是可以的。但是南方公司去东北招生的实在是少,除了华为,中兴之外真的是少的可怜,尽管我们学校在沈阳也是数一数二的学校。

     在04年在10月份,我面试的第一家公司是东软,没有办法,谁让我们学校是东软的最大股东尼(不知道现在是不是),面试的过程也还不错,考试题也做的很顺,东软还提出我们下学期直接找一些外教来教我们日文,不过当时东软给出的薪水实在是低的可怜,只有1800元,而且还要自己负责住宿,自己当时也老大不小了,还有女人在读书,是不是也是需要买些礼物的,而且沈阳和大连都不是我想去的地方,结果就直接没有去报道。

     接下来的日子也就整天在校内的招聘网站(白山黑水)上看帖子,看到了上海bmi的招聘广告,一看是上海的公司,而且做的是辽宁网通的项目,感觉项目很大,可以学到不少东西,关键是上海的公司,项目做完了就可以去上海发展呢,而且当时女朋友也还在读研究生,仔细的想想觉得这个公司还是比较适合自己,于是也开始做准备,接下来的事情都很顺利,笔试,面试,当时有资格参加面试的,整个我们学校也就2个人,一个本科生,一个研究生,不过最后那个研究生也没有过去。

     在辽宁项目的前期这段时间,估计也会我成长最快,也是最艰苦的时间,我后续的会详细介绍到。我第一天上班就是去做release,也就是做发布和部署,在当时的项目中,我们并没有像一些公司还有项目配置员这个角色,就是直接拉一个开发人员来负责做release,这个角色当时是在项目中最辛苦的一个,经常是下午6点开始,然后编译3-4个小时,到10点才可以编译完成(比较顺利的情况下),如果遇到编译不过去的时候,还需要联系开发人员进行修改,编译之后在对照check list进行增量部署。

    在第一天上班,我就从上午10点过去,第2天凌晨3点半才下班,到4点才到学校宿舍睡觉,后续的1个月都是如此,现在回想起来,感觉当时真的是很辛苦,不过那段时间也开始熟习了不少东西,知道了基于模块开发,对ant,weblogic,oracle,plsql,linux,aix等的使用也开始非常熟习了。在这段时间里也开始熟习了公司的项目情况,开发人员,测试人员。

posted @ 2010-05-04 00:06 不需要解释 阅读(285) | 评论 (0)编辑 收藏

    最近在看一些项目的代码,总是发现很少项目提供出uml图,或者就是提供uml图的也有可能并没有和代码对应上,如果有正确的uml图,可以非常方便的为大家更好的理解代码层次逻辑。其实我们可以使用使用UMLGraph来生成uml图,直接使用java代码来生成UMLGraph。对于大部分项目来说,我们一般使用maven和ant(还在使用ant,你out了)来作为项目的编译工具。

    在maven中,我们可以在pom.xml增加:

    <reporting>
        <plugins>
        <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.6.1</version>
        <configuration>
          <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
          <!-- <docletPath>/path/to/UmlGraph.jar</docletPath> -->
          <docletArtifact>
            <groupId>org.umlgraph</groupId>
            <artifactId>doclet</artifactId>
            <version>5.1</version>
          </docletArtifact>
          <additionalparam>-views</additionalparam>
          <useStandardDocletOptions>true</useStandardDocletOptions>
        </configuration>
        </plugin>
        </plugins>
    </reporting>

使用javadoc:aggregate 就可以生成出整个项目按照package的uml图了。

如果是使用ant,在build.xml中增加target

   <target name="genuml">
        <property name="uml.dir" value="${basedir}/uml"/>
        <property name="src.uml.dir" value="${src.dir}/uml"/>
        <mkdir dir="${uml.dir}"/>
        <path id="uml.source.path">
           <pathelement path="${src.uml.dir}/"/>
           <pathelement path="${src.java.dir}"/>
        </path>
        <javadoc sourcepathref="uml.source.path" packagenames="*" package="true">
           <doclet name="org.umlgraph.doclet.UmlGraph" path="${basedir}/lib/UmlGraph.jar">
               <param name="-d" value="${uml.dir}"/>
           </doclet>
        </javadoc>
        <apply executable="dot" dest="${uml.dir}" parallel="false">
            <arg value="-Tpng"/>
            <arg value="-o"/>
            <targetfile/>
            <srcfile/>
            <fileset dir="${uml.dir}" includes="*.dot"/>
            <mapper type="glob" from="*.dot" to="*.png"/>
        </apply>
    </target>

注意:要正常使用 UMLGraph,您必须先安装 Graphviz 工具,请自己google相关信息。

posted @ 2010-04-19 23:59 不需要解释 阅读(1857) | 评论 (0)编辑 收藏

       尽管工作了5年多了,现在能想起来的培训真的是少之又少,但是我想以后,我一定不会这样说了,因为我参加了百支了!

       百支对于我来说是一次清洗,洗掉以前的恶习,洗掉以前的老思维,重新培养我丢掉已久的价值观,重新找回往日的激情。来阿里之后,也一直在想一个问题,阿里和我以前公司有什么不同?或者说有什么特别的之处?其实这个问题有很简单,就是阿里是一家有梦想的公司,一家有价值观的公司,一家有亲情,友情的公司,一家工作生活一体的公司,从中国来看,阿里是唯一一家大的公司,而且价值体系贯彻的这么好的公司,only one in china。

      百支培训了很多业务知识,传统线,虚拟线,兄弟线,安全线,资金线,…学到了很多东西。

      百支的培训,让我开始结识了新的同学,新的家人,新的伙伴,让我们happly every day! 认真工作,快乐生活!

posted @ 2010-04-16 21:48 不需要解释 阅读(398) | 评论 (0)编辑 收藏

   随着网络技术的发展,很多恶意程序往往按照常规方法无法彻底删除。有没有什么方法能够在不安装任何第三方工具的情况下,删除它们呢?笔者经过多年实践,告诉大家一个秘密武器--关闭Explorer进程法。

  在服务器系统出现问题时,例如某个文件无法删除,某个程序假死或者是系统没有响应都可以按CTRL+SHIFT+ESC,调出Windows任务管理器。接下来找到“进程”标签,将“explorer.exe”进程关闭。接下来整个桌面就会消失,只剩下桌布了。然后通过Windows任务管理器的“文件”菜单下的“新建任务(运行)”打开“创建新任务”窗口,通过“浏览”按钮找到要删除文件所在目录,在浏览窗口里直接删除即可。99%都可以将这个顽固的文件删除,删除后继续选择“文件”菜单下的“新建任务(运行)”打开“创建新任务”窗口,在打开处输入命令--explorer后回车,我们将返回到正常的桌面界面下。显然,对付顽固文件,这个方法尤为简单。

posted @ 2009-11-10 16:19 不需要解释 阅读(216) | 评论 (0)编辑 收藏

    1、专注于构建一个强有力的团队,这一团队能够解决困难的问题,并为客户创造真正的价值。
  2、领导者鼓舞;管理者授权。要同时成为优秀的领导者和管理者,你需要就愿景进行沟通并理解其细节。
  3、对可能出现的障碍有所准备,防微杜渐,在这些障碍尚未壮大时就清除它们。
  4、花时间来仔细倾听别人的意见,但不要过于担心其他人的想法。
  5、专注于事实。
  6、充当一个衰减器,而不是放大器,为团队提供稳定性。
  7、永远不要将不能解释的事情归咎为蓄意破坏。
  8、培养幽默意识来作为严肃认真的一种平衡:对工作一丝不苟,对自己轻松自如。
  9、除了工作,还应该懂得享受生活,而且每年要读25本书。
  10、相信你的直觉:如果你感觉不妙,那么很可能预感就会成真。

posted @ 2009-11-08 03:10 不需要解释 阅读(212) | 评论 (0)编辑 收藏

Productize software

When talking about the productized software, people often think of Microsoft Office and Microsoft XP. Of course the Microsoft product series is very successful. They can provide excellent GUI, and good user experience.

In China, there is a different picture for software products. Let me take Chinese software development companies for example. Most of the companies in China work on some projects, instead of specific products, When a company starts a new project, they need to invest lots of developers and money into the project. Sometimes, they also need to send a number of technicians to the customer site to do the development. In my opinion, there are two reasons.

(1) The software is not very satisfactory enough to be a perfect product.

(2) Chinese customers have lots of special requirements.

Customer is GOD. We can not change the ideas of customer most of time. So, we need to improve our product. Then how to evaluate a software product's success? Because of various concerns, different users hold different opinions and will arrive at different conclusions.

As for redevelopment and customization, the following should be more concerned:

(1) Software scaffolding

If the product provides scaffolding, the redevelopment people will quickly generate code (from database, UML, etc….). As we know, the Spring, Hibernate also provide some scaffolding.

(2) Easy installation package

Most of time, the installation gives the first impression to the customer. So it is very important.

A simple installation must ensure everyone, even someone not very familiar with the application, can install the software.

The installation log file also plays significant role. Sometimes, it’s possible for the customer’s environment to have some problem so that the installation runs unsuccessfully. In this situation, the customer can send the log file to the technicians for analysis.

People who do not know about your product also can install easily according to wizard.

(3) Lots of Examples

The examples are the best teacher. Why most of java developer favor apache ant? The reason is that apache ant can provide lots of examples; you can find any task example in apache ant web site.

Example not only provides assistance to the development but also the product redevelopment If your product provides lost of examples, the questions from customers will be reduced substantially.

(4) Online documentation

If the developer can find some on-line document, he will not worry about that the document in his hands is an old version. And of course, the product developer also can work more effectively. For example, if the document has some error, or need to be modified, he can fix it quickly.

(5) Very good support

If the customer has some problem when he use or customize, he can get easily the support.

As for end-users, the following is very important.

(1) Friendly GUI, operator easily

(2) Collection client information online active, when some error happen.

(3) Auto-update to new version.

For customer, he does not need install some patch.

(4) In a conspicuous place clearly marked version of the software, and contact method

As for a kernel developer, he might think we need to provide:

(1) OSGI framework or plug-in framework to facilitate the expansion

(2) Standard software delivery process

(3) Software quality control

(4) A very good suite of documents.

posted @ 2009-11-02 11:26 不需要解释 阅读(287) | 评论 (0)编辑 收藏

Repositories are remote collections of projects from which Maven uses to populate the local repository of the build system. It is from this local repository that Maven calls it plugins and dependencies. Different remote repositories may contain different projects, and under the active profile they may be searched for a matching release or snapshot artifact.

Example A.8. Repository Configuration in settings.xml

<settings xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
                      http://maven.apache.org/xsd/settings-1.0.0.xsd">
  ...
  <profiles>
    <profile>
      ...
      <repositories>
        <repository>
          <id>codehausSnapshots</id>
          <name>Codehaus Snapshots</name>
          <releases>
            <enabled>false</enabled>
            <updatePolicy>always</updatePolicy>
            <checksumPolicy>warn</checksumPolicy>
          </releases>
          <snapshots>
            <enabled>true</enabled>
            <updatePolicy>never</updatePolicy>
            <checksumPolicy>fail</checksumPolicy>
          </snapshots>
          <url>http://snapshots.maven.codehaus.org/maven2</url>
          <layout>default</layout>
        </repository>
      </repositories>
      <pluginRepositories>
        ...
      </pluginRepositories>
      ...
    </profile>
  </profiles>
  ...
</settings>
releases, snapshots

These are the policies for each type of artifact, Release or snapshot. With these two sets, a POM has the power to alter the policies for each type independent of the other within a single repository. For example, one may decide to enable only snapshot downloads, possibly for development purposes.

enabled

true or false for whether this repository is enabled for the respective type (releases or snapshots).

updatePolicy

This element specifies how often updates should attempt to occur. Maven will compare the local POMs timestamp to the remote. The choices are: always, daily (default), interval:X (where X is an integer in minutes) or never.

checksumPolicy

When Maven deploys files to the repository, it also deploys corresponding checksum files. Your options are to ignore, fail, or warn on missing or incorrect checksums.

layout

In the above description of repositories, it was mentioned that they all follow a common layout. This is mostly correct. Maven 2 has a default layout for its repositories; however, Maven 1.x had a different layout. Use this element to specify which if it is default or legacy. If you are upgrading from Maven 1 to Maven 2, and you want to use the same repository which was used in your Maven 1 build, list the layout as legacy

posted @ 2009-11-02 11:25 不需要解释 阅读(1978) | 评论 (0)编辑 收藏

我实话告诉你们,我可是身经百战了.bbs我见的多了,哪个版我没灌过?你们要知道, 一塌糊 涂的triangle,PIC,SEX版,那比你们不知道厉害到哪里去了,我在那谈笑风声.你 们有一好就是无论在哪个版,什么话题都灌,但是灌来灌去的问题,都too simple, sometimes naive!你 们懂不懂呀?啊?所以说灌水啊,关键是要提高自己的知识水平.你 们啊,不要总想着弄个大坑,然后灌上十大,再把我羞辱一番……你们啊,naive!你们这 样灌是不行地!~那你問我支持 不支持灌水,我說支持,我常來這裡灌,你說支持不支持?