Total Pageviews

2012/12/21

Top 6 Success Factors to Inspire a Team of Software Engineers


"You need a real vision, the trust of team members, the accountability for execution and a lot of passionHigh emotional intelligence will be important to give advice and support in an appropriate way.  Don't forget to have strong luck and fortune."


http://www.sw-engineering-candies.com/blog-1/top-6-success-factors-to-inspire-a-team-of-software-engineers

2012/12/20

3 Recommendation on Software Management

Contractor is not an employee
In software management, is normally best practice, well used, to use contractors for development, to train new employees or to make innovation analysis on new technologies. You should not use contractors for maintenance jobs.

Never buy from the same Vendor. Competition is the key to keep control
Market and Competition are the key. Buy from different vendor and make them compete to deliver better quality. If you successfully make it, you will gain control and you will simplify the replacement of people, if needed. 
A good manager is going to give to any company the same possibility and opportunities to get visibility and to struggle to delivery in time and with quality. 

Don’t ask or impose people to decommission themselves
If you have the mandate to rebuild or replace some legacy project or application, you should never ask to do that to people that have worked there for more than 2 years. The obvious consequence is a lot of resistance and contrast on your way to get your mission.
I personally would create a team (not bigger than 5 people, but depends) with basically three different roles: 1 business expert (or Product Owner), 1 technical lead and developers (50 % of them can be an offshore team after the first 4/6 months). The legacy team would be in charge of the legacy documentation, and to support the new team on the implementation. They  would communicate only with the business expert.

http://blog.foppiano.org/2012/12/17/3-recommendation-on-software-management/

2012/12/19

How to extract unique distinct values from a column


Requirement
Unique distinct values are all cell values but duplicate values are removed.

Example sheet - How to remove duplicate values
Column A contains names, some cells have duplicate values. 

Step 1. Select column which have duplicate values



Step 2. Click REMOVE DUPLICATE button

Step 3. Click OK button

Step 4.  Click OK button

Step 5. Get distinct value

2012/12/14

高股息ETF(0056)

昨日在「上班這檔事」,看到來賓提到高股息ETF(Exchange Traded Funds,指數股票型基金)此股票,感覺是風險較低的投資方式,比把錢放在銀行好多了


找到了一些資料

2012/12/13

Tips on how to write a clean and meaningful code


Tip: Names for variables and methods/functions
Tip: Comments may be misleading
Tip: Separate method/function for each task
Tip: Separate classes if possible
Tip: Don't repeat yourself
Tip: Handle the exceptions
Tip: As few arguments for functions as possible
Tip: Leave SOME whitespace

http://compiledk.blogspot.tw/2012/12/writing-clean-and-understandable-code.html

2012/11/09

20 Kick-ass programming quotes


1. “There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.”
- C.A.R. Hoare (British computer scientist, winner of the 1980 Turing Award)

2. “If debugging is the process of removing software bugs, then programming must be the process of putting them in.”
- Edsger Dijkstra (Dutch computer scientist, winner of the 1972 Turing Award)

3. “Measuring programming progress by lines of code is like measuring aircraft building progress by weight.”
- Bill Gates (co-founder of Microsoft)

4. “Nine people can’t make a baby in a month.” (regarding the addition of more programmers to get a project completed faster)
- Fred Brooks (American computer scientist, winner of the 1999 Turing Award)

5. “Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.”
- Brian W. Kernighan (Canadian computer scientist, co-author of “C programming language”)

6. “Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.”
- Martin Golding

7. “C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg.”
- Bjarne Stroustrup (Danish computer scientist, developer of the C++ programming language)

8. “When debugging, novices insert corrective code; experts remove defective code.”
- Richard Pattis

9. “Computer science education cannot make anybody an expert programmer any more than studying brushes and pigment can make somebody an expert painter.”
- Eric S. Raymond (American programmer, open source software advocate, author of “The Cathedral and the Bazaar”)

10. “Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program.”
- Linus Torvalds (Finnish American, software engineer and hacker, principal force behind the development of the Linux kernel)

11. “Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.”
- Rich Cook

12. “Any fool can write code that a computer can understand. Good programmers write code that humans can understand.”
- Martin Fowler (author and speaker on software development)

13. “Good code is its own best documentation. As you’re about to add a comment, ask yourself, ‘How can I improve the code so that this comment isn’t needed?’”
- Steve McConnell (author of many software engineering books including “Code Complete”)

14. “The problem with using C++ … is that there’s already a strong tendency in the language to require you to know everything before you can do anything.”
- Larry Wall (developer of the Perl language)

15. “People think that computer science is the art of geniuses but the actual reality is the opposite, just many people doing things that build on each other, like a wall of mini stones.”
- Donald Knuth (computer scientist)

16. “One of my most productive days was throwing away 1000 lines of code.”
- Ken Thompson (computer scientist, early developer of UNIX OS)

17. “Most software today is very much like an Egyptian pyramid with millions of bricks piled on top of each other, with no structural integrity, but just done by brute force and thousands of slaves.”
- Alan Kay (American computer scientist)

18. “Before software can be reusable it first has to be usable.”
- Ralph Johnson (computer scientist)

19. “Programming is like sex. One mistake and you have to support it for the rest of your life.”
- Michael Sinz

20) “If builders built buildings the way programmers wrote programs, then the first woodpecker that came along wound destroy civilization.”
- Gerald Weinberg (American computer scientist)

http://www.javacodegeeks.com/2012/11/20-kick-ass-programming-quotes.html

2012/10/07

Coding Guidelines for the Developer During Development


1)Do use the Transactions in long running queries and many small-small queries

2)DON’T Use SELECT *

3)Avoid explicit or implicit functions in WHERE clauses

4) Avoid long actions in triggers if using

5) Use temporary tables and table variables appropriately

6)As a good rule of thumb try to replace all sub queries with joins

7)Order of Tables in Join Conditions.

8)Loop optimization

9)Parameter sniffing

10)Can use Fixed Index Hint while using the conditions

11)Size the data type wisely in the SP during declaration.

12)Efficient use of MAXDOP setting within query.

13)GROUPING SETS in SQL 2008

14)Always use the With rowlock, with no lock where occurring deadlocks.

15)Use Update From Rather than simply Update

16) UNION ALL instead of UNION

17) Avoid expensive operators such as NOT LIKE


http://phpflow.com/misc/coding-guidelines-for-the-developer-during-development/

2012/09/26

如果你的薪水是別人給你的,你就是可以被取代的


理財專家給薪水族的忠告:如果你需要拿錢回家養家,那麼一定要遵守。如果有人養你,則另當別論。

記得以前有位同事離職前多拉了幾個人走,以為會對公司的業務造成影響,經我觀察的結果做了結論:完全沒有影響,缺人找人,頂多資深員工辛苦點,對公司來說,「所有員工在職時都很重要,離職後都不重要」,沒有一個員工是非留不可的,這似乎就是職場常態。

近20年以來,我長時間在美台兩地以理財專家的立埸談理財,幫助客戶及社會大眾做好理財。我常強調做好理財的目的是錢盡其用,讓錢發揮最大的效用,一個相關的重要原則就是凡事講究划算。

我覺得以這樣的現實觀點來看工作,和我倡議的『回到蠻荒』觀點倒是有相通的地方,那就是不做徒勞無功的事,或沒有成果的事。蠻荒的動物都能秉持這樣的原則工作。所以依現實的原則看工作,現代人工作的目的應該只是為了能賺錢,除此以外無他。

以下是探討這類觀點的專家所提供的一些工作原則,不妨做為參考:

原則1:工作真的只是一份工作

不要期待工作與生活能兼顧,事實上也沒幾個人能將工作與生活成功的整合起來,工作並不是生活,我們工作是為了要過生活,或保有自己所喜歡的生活。想想看,你一天或一個禮拜能有多少時間和家人相處,或和親朋好友去做一些你喜歡做的事,就可以知道要兼顧工作與生活是不可能的。

工作只是工作,目的是為了賺錢。錢只是一個工具,讓您換得食物、衣服、車子、房子、休閒育樂…換得「成就」…而「成就感」必須從個人所做的學習與事物中得到價值和肯定..


原則2:不要害怕換工作

工作既是為了賺錢,只要可能賺更多錢,或做起來更愉快、更有滿足感,何妨就換工作?而且,以這樣的原則換工作,收入當然會越換越多,跳槽可能也會變得稀鬆平常。要每次工作時都全力以赴,有稱職的表現,對雇主和業界都能交代,應該隨時可以找到下一個工作機會。但站在生涯規劃的觀點,要思考的不只是下一份工作,而是下下一份工作在哪裡。其如果已經三十歲以上,更應該將目標放在提早規劃四十歲以後的人生,就會知道自己該做好什麼準備。


原則3:一鳥在手勝過十鳥在林 

很多公司都聲稱他們有優渥的福利制度,包括退休金計劃。可是不斷有事實告訴我們,越來越多的人在屆滿退休之前就失去工作了。所以爭取眼前的福利可能更實際,比較值得期待,例如包括健康醫療保障在內的團體保險、托嬰照顧、親職休假、績效獎金的分發,增加加班費或年終獎金等等。

更值得思考的是---這份工作你能做多少,或是說---老闆會讓你做多久?然後呢?


原則4:謀生本事不厭其多

新世紀的工作與收入可能會變得不穩定,產業的興衰或輪替也會變得快速無比,在同一家企業內辛苦一輩子可能會以失業收場。所以橫向拓展各方面的技能,會比縱向的在企業的組織內向上攀爬追求位高權重還要實際。

其實現在已有不少企業也『學會』了一些聰明的技巧,對授予好聽的高階職位並不吝惜,可以讓你擁有耀眼的頭銜,但對薪資增加並沒有多大幫助。與其追求這種虛名,不如讓自己能具備十八般武藝可以多方面賺錢,隨時跳槽。
充實自己的技能讓自己無可替代,或者在風險控管下,掌握機會自己創業,才是M型社會生存王道!


原則5:做好份內工作就回家去

再提醒你,工作只是工作,公司少了你一個人的工作,照樣可以運轉下去。踏實的學習你的工作所該具備的技能,努力做好你的工作,但不要奢望你可以憑一己之力多為公司創造多少業績或產能。

不要因此耗掉你大量的私人時間,讓自己從盲目工作中抽離出來。記住,做好自己份內的工作,然後回家去。說真的,在老闆的眼中,你真的沒有那麼重要!面對現實吧!


原則6:遠離辦公室政治

你工作的目的是為賺取合理的收入,而不是追求虛名與權位,所以不用在心思在辦公室政治上。當紅炸子雞可能因改朝換代而去職走路,被冰凍的失志衰老也可能鹹魚翻身。與其耗費時間介入這些無意義的辦公室鬥爭,不如多花時間在自己的家庭。好好為自己的人生規劃準備才是最重要的。

2012/09/20

10種不跟也罷的老闆

  1. 別跟那些沒有個人生活的老闆
  2. 別跟那些總是遷怒於你的老闆
  3. 別跟那些總是扮演搞笑角色的老闆
  4. 別跟總是掙扎求生的老闆
  5. 別跟那些總是誇誇其談的老闆
  6. 別跟那些總是和你爭的老闆
  7. 避免那些總是說個不停的老闆
  8. 別跟那些總是忙忙碌碌的老闆
  9. 別跟那些沉迷於聲色犬馬的老闆
  10. 別跟那些能活吃了你的老闆

http://www.life.com.tw/index.php?act=view&news_no=7322&t=1348128394

Failed to Apply Thousand Seperator / Text Pattern

Problem
I had set the text pattern to "#,##0", but it is not working.

Here is the setting in iReport


But it does not work as expected.

Solution
The root cause result from the expression class of this text field is java.lang.String. As I change to java.math.BigDecimal. It works now.



2012/09/17

8 Common Code Violations in Java



  1. Format source code and Organize imports in Eclipse
  2. Avoid multiple returns (exit points) in methods
  3. Simplify if-else methods
  4. Do not create new instances of Boolean, Integer or String
  5. Name public static final fields in UPPERCASE
  6. Combine multiple if statements into one
  7. switch should have default
  8. Avoid duplicate string literals, instead create a constant

http://www.dzone.com/links/r/8_common_code_violations_in_java.html

2012/08/23

Best Practices to Make Life Easier for the Programmer


Constants
Should you ever need a variable that is not changing over time (or in many cases just one time), you should use constants. Constants are quick-to-find variables and they help you minimize memory usage.

Configurations
The term ‘configuration’ means variables that are used a lot and rarely change but can be changed in the middle of execution, if needed. Constants can be made as configurations if it can be changed in the middle of execution. Otherwise, leave it as a constant.

Access Control
So many programmers don’t care about access-level modifiers. If you need broader access, use protected and, as a last resort, public access. This way you can protect your specific method or member from the ‘outside world’.

Comments
Comments let you remember code snippets, algorithms, sort methods, even randomized numbers you’ve created before. This is a big advantage if you’re working on a team. Because of comments, other people will understand your intentions.


http://architects.dzone.com/articles/do-not-delete-common

2012/08/13

2012/08 神戶京都之旅


風見雞館

北野異人館街一隅

北野異人館街的星巴克

Kobe Tower

神戶港夜景

Kyoto Tower

琵琶湖煙火

伏見稻荷神社

藝妓回憶錄拍攝場景

奈良公園

宇治川煙火



2012/07/27

Clear IE Cache Through Command Line

Scenario
Owing to Microsoft IE will cache JavaScript, CSS files, so it may not recognize when we update JavaScript or CSS files. 
We need to clear browser cache every time, when we update JavaScript or CSS files.

Solution
Windows provides command line to clear IE cache
  • All : RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255 
  • History : RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1
  • Cookies : RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2
  • Temp Internet Files : RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8
  • Form Data : RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16
  • Passwords : RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32
We need to clear cookies and temp internet files, so we copy the two commands into text file, and save as a bat file. Then move to C:\

And create a shortcut on your desktop.

As you need to clear browser cache, just click the batch file. It will clear cookies and temp internet files automatically.



青年拒絕窮忙!主管最浪費員工的7大症狀


1. 在不同專案間調動人力,或不斷換人處理專案。
2. 缺乏適當規劃所造成的浪費。
3. 每次救火都會產生浪費。
4. 超時加班導致浪費。
5. 當專案變調或取消,就會產生浪費。
6. 士氣低落所導致的浪費。
7. 多工也會造成浪費。


http://topic.cw.com.tw/500/magic-1.aspx

2012/05/29

What's difference between an empty string and a null value

Question: What is the difference between an "empty" value and a "null" value? 
Answer: An empty string is treated as a null value in Oracle.

Demo
NIGT013.COLL_B_DATE is null, and apply NVL2 to  substitute a value (i.e. empty string) when a null value is encountered.

But it showed null value in report. It results from an empty string is treated as a null value in Oracle

Therefore, in order to show non-null value in my report. Substitute two spaces when a null value is encountered.

Then it won't show null value in report anymore.

2012/05/22

7 Application Deployment Best Practices


  1. Keep the installation structure SIMPLE. 
  2. Always get rid of old files. 
  3. Automate it 
  4. Don’t over do it with the symlinks
  5. Delete everything first. 
  6. Have a roll back strategy.
  7. Don’t make changes to your deploy mechanism or deploy scripts between deploying to different environments. 

2012/05/15

Top 7 programmers bad habits


1. The all code is crap, except mine, attitude.
2. The “I fix that in a second” catastrophe.
3. The “That will only take a second” misconception.
4. The ego spiral.
5. “It wasn’t me!”
6. The demotivated genius.
7. The premature programmer.