2010年6月8日

今天废了老劲了,终于找到为何deploy/lib目录下一个包从哪里来的了。在项目的dependency里没有发现这个包,但是deploy目录下总可以找到。

查了半天,终于发现了,在项目dependency里依赖到的第三方的一个包里它依赖到了我需要查找的包,导致这个包被貌似莫名其妙的进入到了deploy/lib下面。
posted @ 2011-10-30 18:56 simplelove 阅读(213) | 评论 (0)编辑 收藏

Attended Scrum training theses two days.

Some highlights from the training:

  1. Scrum master is a facilitator, does not assign task. Team owns tasks itself.
  2. Each feature has a unique rank, decided by product owner and scrum master and the team. Always finish rank high feature first, before continue rank low feature.
  3. Scrum always encourage communication and collaboration.
  4. Scrum is not a project management, but a framework for all the teams to do the things in same way. Project management methodology is still needed in Scrum.
  5. Scrum deliver value sooner than waterfall method.
  6. Scrum fits the product/project that requirements are not so fixed.
  7. Each team/person has its own customer.
  8. Successful software development projects are mainly based on people interactions.
  9. Advocate zero defect in iterations, ready to release after each iteration.
  10. XP is next level of Agile after Scrum.
posted @ 2010-08-18 10:48 simplelove 阅读(263) | 评论 (0)编辑 收藏

I upgraded to IntelliJ IDEA 7.0 the day it came out and was, at first, let down by how poorly it performed on my machine. Since then, I tweaked a bunch of settings, and now have it performing just as fast as IDEA 5 ever did on the same box. Enjoy, and happy coding!
1. Change your Look and Feel
Change your look and feel to something other than native. On Windows, the “IDEA (4.5 Default)” look and feel performs much better than the native one. On Mac, just pick something other than the native. The new graphics will bother you for about 30 minutes and then you’ll forget all about them. This setting is in the Settings (Ctrl+Alt+S) -> Appearance (B) dialog. (Tip courtesy of Howard Lewis Ship)
2. Use Structure View Instead of Project View
In IDEA 7.0.2 on Windows, I seem to pay a heavy performance price for the Project View (Alt+1), especially with autoscrolling to and from source enabled. My alternative is to use the Structure View (Alt+2) as my default sidebar and rely on the Navigation Bar (View->Navigation Bar) for project navigation. I find I actually prefer this setup and 7.0.2 performs noticeably faster.
3. Turn off Synchronize Files
When you activate the IDEA frame, IDEA will scan the disk for file changes, giving you a nice progress bar to wait for. If you’re not editing files outside of IDEA then turn this feature off in Settings (Ctrl+Alt+S) -> General (A). Uncheck “Synchronize Files on Frame Activation”. Now you’ll have to manually synchronize the files using Ctrl+Alt+Y (File->Synchronize on the menu). (Tip courtesy of Tyler)
4. Disable Spring Model Validation on Build
I used to get a progress bar every time I ran or debugged my project, with the message “Validating Spring Model”. I don’t need this feature except when I’m working on the Spring files, so I turned it off. Settings (Ctrl+Alt+S) -> Project Settings (1) -> Modules… then click Spring, then click the Options Tab. Deselect the checkbox for “Enable Spring model validation on build”.
5. Disable Unused Plugins
Disable all of the plugins you are not currently using. For example, if you’re not using Geronimo, Commander or Jabber, then turn them off. Settings (Ctrl+Alt+S) -> Plugins (T). Uncheck anything you have installed that is unused (Tip courtesy of Carl)
6. Use Scopes to Speed Up Searches
I rarely really want to search my entire project for a string or reference. Any search dialog allows you to pick a custom scope, such as production files or test files. But “Changed Files” is a helpful option too. On large, monolithic projects you may want to define your own to only search certain packages. A little time creating new scopes will save you a lot of time in waiting for searches to complete. Define scopes in Settings (Ctrl+Alt+S) -> Scopes (5).
7. Increase Your Heap Size
Several sources include directions on increasing your heap size in IDEA. This is changed in your idea.exe.vmoptions file.
8. Always Get the Latest Version
I’ve already suggested this, so I’ll be brief. Each minor release seems to have good performance improvements.
9. Reduce Size of Local History
Another blog recommended that you turn off or reduce Local History. I love this feature so I’ll never turn it off, but the default is to save 3 days worth of work. I typically check in to version control more often than that, so I trimmed it up to 1 day of history. Do this in Settings (Ctrl+Alt+S) -> Local History (J).
10. Optimize Your Disk?
I haven’t tried this myself, but the tip came directly from JetBrains. Beyond just defragmenting, you can also optimize the MFT tables, disk folder structure, and the paging file. Direction appear on their site. Simply upgrading to a newer hard drive is find at home, but I don’t have that much control of my work machine. It’s Friday, so I’ll try this today. If things go horribly wrong I’ll redact the entry!
————————————————————————————————————————————————————————————————————————————
IntelliJ IDEA Performance
There're some concerns about IntelliJ IDEA Performance. And here is the tips that I used to make mine run fast. Some of them come from my own experience, some of them come from the know-everything internet.
    * Make sure you have all your libraries on your local harddrive (as opposed to mounted network drive). After I moved all my libraries from a network drive to local harddrive, the time for a 'make' on the project is reduced from around 60 seconds to just 5-7 seconds!
    * Defragment your Disk and reboot your computer. IDEA creates lots of small files and too much fragmentation is a nightmare.
    * Turn off Anti Virus completely. Yes I mean completely. It affects the performance dramatically.
    * Turning off Local History or even reducing the number of history days improved the performance significantly.
    * Adjust VM settings. Here is my idea.exe.vmoptions file (on windows):
-Xms512m
-Xmx512m
-XX:MaxPermSize=99m
-ea
Change it as you see fit per your hardware configuration.
More information is available at http://blogs.jetbrains.com/idea/2006/04/configuring-intellij-idea-vm-options/.
    * The Debugger in IDEA may work slowly if the Force classic VM option is not selected in the File Project Properties Debugger dialog. Using Method Breakpoints may also slow down the debugging process. I had two breakpoints on the method name instead of the first line of the method. It was taking a half hour to get to the breakpoint Changing these to line breakpoints gave me two orders of magniture
    * You may notice IDEA hang for several seconds when you switch to it from other applicationDisable Settings General Synchronize files on frame activation.
    * Disable windows paging file if you have enough memory. Get more memory if you don't have enough. Swapping is a performance nightmare.
    * Turn off windows indexing services, either set it to Disabled or Manual unless you do lots of file system search (even you do, I recommend Google Desktop Search). IDEA use lots of small files so background indexing can have a big negative effect on it's performance.
    * Control Panel/System/Properties/Advanced/Visual Effcts, Adjust for best performance. Unless you're willing to sacrify performance for visual effects like windows animation, fading/sliding etc.

posted @ 2010-07-30 01:40 simplelove 阅读(1405) | 评论 (0)编辑 收藏

一般而言,兔子在出生两个月后,就有繁殖能力,一对兔子每个月能生出一对小兔子来。如果所有兔都不死,那么一年以后可以繁殖多少对兔子?

  我们不妨拿新出生的一对小兔子分析一下:

  第一个月小兔子没有繁殖能力,所以还是一对;

  两个月后,生下一对小兔民数共有两对;

  三个月以后,老兔子又生下一对,因为小兔子还没有繁殖能力,所以一共是三对;

  ------

  依次类推可以列出下表:

  所经过月数:0、1、2、3、4、5、6、7、8、9、10、11、12

  兔子对数:1、1、2、3、5、8、13、21、34、55、89、144、233

  表中数字1,1,2,3,5,8---构成了一个序列。这个数列有关十分明显的特点,那是:前面相邻两项之和,构成了后一项。

  这个数列是意大利中世纪数学家斐波那契在<算盘全书>中提出的,这个级数的通项公式,除了具有a(n+2)=an+a(n+1)/的性质外,还可以证明通项公式为:an=1/√5[(1/2+√5/2)^ n-(1/2-√5/2)^ n](n=1,2,3.....)(√5表示根号5)

  这个通项公式中虽然所有的an都是正整数,可是它们却是由一些无理数表示出来的

posted @ 2010-06-30 09:17 simplelove 阅读(292) | 评论 (0)编辑 收藏

If you want the entry to be garbage collected, use WeakHashMap. Once the key is not strongly referenced, the entry will be automatically reclaimed.

 

Here is a good article to understand this:

http://www.codeinstructions.com/2008/09/weakhashmap-is-not-cache-understanding.html

posted @ 2010-06-08 20:40 simplelove 阅读(290) | 评论 (0)编辑 收藏

导航

<2010年6月>
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

统计

常用链接

留言簿

随笔档案

搜索

最新评论

阅读排行榜

评论排行榜