Upgraded to 9.10 this morning but funny thing was - wireless networking wasn't working anymore - ath_pci module is gone from the release.
Fixed by loading the ath5k module, as suggested by the ThinkPad wiki. You can append it to /etc/modules for it to be automatically loaded.
Aflexi, FOSS, Java, Software Engineering, Politics, the Beings and Nothingness.
Saturday, November 7, 2009
Thursday, July 23, 2009
Measuring Your Engineers
To say that I am managing an Agile team is not entirely accurate, we are just trying to be agile. Anyway, skipping the story, the team's velocity increased more than 800% for the last 2 iterations, mainly due to management pressure. Put aside other reasons such as requirement gathering, design, headcount, etc.
1. Engineers are most probably working within their comfort zone.
For the past 3 months, I had passed/failed/extended the probation period of the engineers. During the session, they discussed with us their strength, weaknesses and areas for improvement.
2. Most engineers highlighted that they're lacking some knowledge to perform better.
So, last weekend, after having a discussion with the management, I was given a task - create KPIs to give engineers a direction as well as to provide management a way to measure their performance. So there are two things - KPIs and Performance Review. The first thing that got into my mind was - how did my ex-company do it?
In the support team that I worked in, we used a ladder-based system where there were 4 skill levels defined with skills to achieve. We would also set KPIs such as "resolving 30 support cases with customer satisfaction above 75%" or "to be SCJP certified". The progress, results and data would be presented to the management during our performance review. Trust me, people seldom stepped out the room wyith a happy face because the management loved to tell you where you did not do good enough.
I was thinking of the ladder since then.
I then looked into some blogs and Stack Overflow questions, such as this (Joel), this, this (Steve Yegge), this and this, which in general send the same message:
3. Management focuses too much on measuring the performance than improving the products and getting things done.
Something quite similar to this will be - timesheet and the reason I abolished it because it is irrelevant with the team velocity and business values. What does it mean then, shall we not measure the engineers at all? Your HR is certainly expecting some kind of metrics for her as a parameter to make salary adjustment.
What shall we look into then? Let's start from things that we shall never use to measure an engineer:
I had like a 10-minute talk with the engineers yesterday to find out how they want to be evaluated and paid. I think this is important instead of me making decision and guesses based on how other software houses do it. It turned out that they want to be reviewed by the peers, by stories delivered, by code quality, and by having salary within different range they expect to be put an expectation on the skill set they possess.
So here is my summary, the performance metrics will be generally based on the expectations, the results, and the feedbacks:
The last reminder is that, we shall not expect to have a perfect and fair formula that objectively measure and rate an engineer. Whether someone will be promoted or given a good salary shall be based on human judgments, as we are dealing with humans and humans make important decisions like you always do.
1. Engineers are most probably working within their comfort zone.
For the past 3 months, I had passed/failed/extended the probation period of the engineers. During the session, they discussed with us their strength, weaknesses and areas for improvement.
2. Most engineers highlighted that they're lacking some knowledge to perform better.
So, last weekend, after having a discussion with the management, I was given a task - create KPIs to give engineers a direction as well as to provide management a way to measure their performance. So there are two things - KPIs and Performance Review. The first thing that got into my mind was - how did my ex-company do it?
In the support team that I worked in, we used a ladder-based system where there were 4 skill levels defined with skills to achieve. We would also set KPIs such as "resolving 30 support cases with customer satisfaction above 75%" or "to be SCJP certified". The progress, results and data would be presented to the management during our performance review. Trust me, people seldom stepped out the room wyith a happy face because the management loved to tell you where you did not do good enough.
I was thinking of the ladder since then.
I then looked into some blogs and Stack Overflow questions, such as this (Joel), this, this (Steve Yegge), this and this, which in general send the same message:
3. Management focuses too much on measuring the performance than improving the products and getting things done.
Something quite similar to this will be - timesheet and the reason I abolished it because it is irrelevant with the team velocity and business values. What does it mean then, shall we not measure the engineers at all? Your HR is certainly expecting some kind of metrics for her as a parameter to make salary adjustment.
What shall we look into then? Let's start from things that we shall never use to measure an engineer:
- SLOC - Source Lines of Code, the dumbest ever metric. Good programmers write lesser lines.
- Number of bug fixes - No way! The engineers would have figured out how to compromise this by writing more buggy code. I strongly against this just like how I disagree with giving points to bug fixes.
- Hours logged - Timesheet is a waste of time.
I had like a 10-minute talk with the engineers yesterday to find out how they want to be evaluated and paid. I think this is important instead of me making decision and guesses based on how other software houses do it. It turned out that they want to be reviewed by the peers, by stories delivered, by code quality, and by having salary within different range they expect to be put an expectation on the skill set they possess.
So here is my summary, the performance metrics will be generally based on the expectations, the results, and the feedbacks:
- The rating from their team members.
- The rating from their direct supervisor, basically this person also knows the agility, code quality, velocity, etc. of this person.
- The total stories delivered.
- The skill set, which KPIs can be related with this, not entirely though.
The last reminder is that, we shall not expect to have a perfect and fair formula that objectively measure and rate an engineer. Whether someone will be promoted or given a good salary shall be based on human judgments, as we are dealing with humans and humans make important decisions like you always do.
Friday, July 10, 2009
Hibernate session issue during Spring tests
I reckon this is something good to share as it took me a few hours to get the problem resolved.
We are using SpringJUnit4ClassRunner for our DAO tests, the tests passed when they were run in Eclipse, but not in Maven. One of the test classes failed with HibernateSystemException:
Google search gave me some clue about the problem had something to do with cascading style, transaction, and duplication but they didn't lead me anywhere. I broke at AbstractPersistentCollection.setCurrentSession to find out that the session/session factory (DAOs are instances of HibernateDaoSupport) assigned to one of the DAOs was different.
A second look at the test class which had:
I found out that BillingInvoiceDao was not a proxy instance but the other DAOs are. The log may explain something:
That transaction propagation happened after autowiring of beans. The fix of my problem is to @Autowired all DAOs (so that they are consistent) or assign them via the DataAccessObjectHelper as shown in the snippet.
Hope this helps.
We are using SpringJUnit4ClassRunner for our DAO tests, the tests passed when they were run in Eclipse, but not in Maven. One of the test classes failed with HibernateSystemException:
org.springframework.orm.hibernate3.HibernateSystemException: Illegal attempt to associate a collection with two open sessions; nested exception is org.hibernate.HibernateException: Illegal attempt to associate a collection with two open sessions
Google search gave me some clue about the problem had something to do with cascading style, transaction, and duplication but they didn't lead me anywhere. I broke at AbstractPersistentCollection.setCurrentSession to find out that the session/session factory (DAOs are instances of HibernateDaoSupport) assigned to one of the DAOs was different.
A second look at the test class which had:
@Autowired
BillingInvoiceDao $;
BillingOrderDao orderDao;
BillingItemDao itemDao;
MembershipDao membershipDao;
@Override
protected void setUpDataAccessObjects() {
membershipDao = DataAccessObjectHelper.getDataAccessObject(MembershipDao.class);
itemDao = DataAccessObjectHelper.getDataAccessObject(BillingItemDao.class);
orderDao = DataAccessObjectHelper.getDataAccessObject(BillingOrderDao.class);
}
I found out that BillingInvoiceDao was not a proxy instance but the other DAOs are. The log may explain something:
[07-11 09:19:30] DEBUG AutowiredAnnotationBeanPostProcessor [main]: Autowiring by type from bean name 'itest.net.aflexi.cdn.billing.HibernateBillingInvoiceDaoTest' to bean named 'billingInvoiceDao'
[07-11 09:19:30] DEBUG DefaultListableBeanFactory [main]: Returning cached instance of singleton bean 'org.springframework.transaction.config.internalTransactionAdvisor'
[07-11 09:19:30] DEBUG DefaultListableBeanFactory [main]: Returning cached instance of singleton bean 'org.springframework.transaction.config.internalTransactionAdvisor'
[07-11 09:19:30] DEBUG AnnotationTransactionAttributeSource [main]: Adding transactional method [testCrud] with attribute [PROPAGATION_REQUIRED,ISOLATION_DEFAULT]
[07-11 09:19:30] DEBUG AnnotationAwareAspectJAutoProxyCreator [main]: Creating implicit proxy for bean 'itest.net.aflexi.cdn.billing.HibernateBillingInvoiceDaoTest' with 0 common interceptors and 1 specific interceptors
[07-11 09:19:30] DEBUG JdkDynamicAopProxy [main]: Creating JDK dynamic proxy: target source is SingletonTargetSource for target object [itest.net.aflexi.cdn.billing.HibernateBillingInvoiceDaoTest@17afcff]
[07-11 09:19:30] DEBUG AnnotationTransactionAttributeSource [main]: Adding transactional method [testCrud] with attribute [PROPAGATION_REQUIRED,ISOLATION_DEFAULT]
[07-11 09:19:30] DEBUG TransactionalTestExecutionListener [main]: Explicit transaction definition [PROPAGATION_REQUIRED,ISOLATION_DEFAULT] found for test context [[TestContext@134b58c testClass = HibernateBillingInvoiceDaoTest, locations = array['classpath:spring/dataAccessTestContext.xml', 'classpath:spring/dataAccessTestContext.billing.xml'], testInstance = itest.net.aflexi.cdn.billing.HibernateBillingInvoiceDaoTest@17afcff, testMethod = testCrud@HibernateBillingInvoiceDaoTest, testException = [null]]]
[07-11 09:19:30] DEBUG TransactionalTestExecutionListener [main]: Retrieved @TransactionConfiguration [@org.springframework.test.context.transaction.TransactionConfiguration(defaultRollback=true, transactionManager=mainTxManager)] for test class [class itest.net.aflexi.cdn.billing.HibernateBillingInvoiceDaoTest]
[07-11 09:19:30] DEBUG TransactionalTestExecutionListener [main]: Retrieved TransactionConfigurationAttributes [[TransactionConfigurationAttributes@ddc524 transactionManagerName = 'mainTxManager', defaultRollback = true]] for class [class itest.net.aflexi.cdn.billing.HibernateBillingInvoiceDaoTest]
[07-11 09:19:30] DEBUG DefaultListableBeanFactory [main]: Returning cached instance of singleton bean 'mainTxManager'
[07-11 09:19:30] DEBUG TransactionalTestExecutionListener [main]: Executing @BeforeTransaction method [public void net.aflexi.cdn.core.test.AbstractDaoTest.setUpBeforeTransaction() throws java.lang.Exception] for test context [[TestContext@134b58c testClass = HibernateBillingInvoiceDaoTest, locations = array['classpath:spring/dataAccessTestContext.xml', 'classpath:spring/dataAccessTestContext.billing.xml'], testInstance = itest.net.aflexi.cdn.billing.HibernateBillingInvoiceDaoTest@17afcff, testMethod = testCrud@HibernateBillingInvoiceDaoTest, testException = [null]]]
[07-11 09:19:30] DEBUG DefaultListableBeanFactory [main]: Returning cached instance of singleton bean 'membershipDao'
That transaction propagation happened after autowiring of beans. The fix of my problem is to @Autowired all DAOs (so that they are consistent) or assign them via the DataAccessObjectHelper as shown in the snippet.
Hope this helps.
Saturday, April 11, 2009
"Autoboxing" Array is Illegal
Wrote some array methods today then I had a question about auto-converting an int[] to Integer[] (auto-boxing) while I was driving back home.
For instance, this works,
But this is not compilable,
int.class will be auto-converted to Integer.class but int[] will not. I can't find the exact line in JLS describing this, do leave a comment if you could.
For instance, this works,
public staticV wrapper(V v, Class clazz){
return v;
}
int i = wrapper(1, Integer.class);
But this is not compilable,
public staticV[] wrapperArray(V[] v, Class clazz){
return v;
}
int[] i2 = wrapperArray(i2, int.class);
int.class will be auto-converted to Integer.class but int[] will not. I can't find the exact line in JLS describing this, do leave a comment if you could.
Friday, April 10, 2009
Strange Maven Plugin Metadata Problem
Not too sure when, my Maven Eclipse plugin has been upgraded to 2.6 and probably due to some metadata "corruption", its dependencies were not downloaded, running it caused ClassNotFoundException:
Tried running Maven with the -cpu argument but it didn't help. maven-metadata-central.xml showed the latest as 2.5.1 and others got 2.6. Fixed by deleting metadata files then re-run Maven.
Bah.
[INFO] ------------------------------------------------------------------------
[INFO] Building Whatever
[INFO] task-segment: [eclipse:eclipse]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing eclipse:eclipse
...
-----------------------------------------------------
this realm = app0.child-container[org.apache.maven.plugins:maven-eclipse-plugin:2.6]
urls[0] = file:/home/yclian/.m2/repository/org/apache/maven/plugins/maven-eclipse-plugin/2.6/maven-eclipse-plugin-2.6.jar
urls[1] = file:/home/yclian/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
Number of imports: 10
import: org.codehaus.classworlds.Entry@a6c57a42
import: org.codehaus.classworlds.Entry@12f43f3b
import: org.codehaus.classworlds.Entry@20025374
import: org.codehaus.classworlds.Entry@f8e44ca4
import: org.codehaus.classworlds.Entry@92758522
import: org.codehaus.classworlds.Entry@ebf2705b
import: org.codehaus.classworlds.Entry@bb25e54
import: org.codehaus.classworlds.Entry@bece5185
import: org.codehaus.classworlds.Entry@3fee8e37
import: org.codehaus.classworlds.Entry@3fee19d8
this realm = plexus.core
urls[0] = file:/opt/maven-2/lib/maven-2.1.0-uber.jar
Number of imports: 10
import: org.codehaus.classworlds.Entry@a6c57a42
import: org.codehaus.classworlds.Entry@12f43f3b
import: org.codehaus.classworlds.Entry@20025374
import: org.codehaus.classworlds.Entry@f8e44ca4
import: org.codehaus.classworlds.Entry@92758522
import: org.codehaus.classworlds.Entry@ebf2705b
import: org.codehaus.classworlds.Entry@bb25e54
import: org.codehaus.classworlds.Entry@bece5185
import: org.codehaus.classworlds.Entry@3fee8e37
import: org.codehaus.classworlds.Entry@3fee19d8
-----------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Internal error in the plugin manager executing goal 'org.apache.maven.plugins:maven-eclipse-plugin:2.6:eclipse': Unable to load the mojo 'org.apache.maven.plugins:maven-eclipse-plugin:2.6:eclipse' in the plugin 'org.apache.maven.plugins:maven-eclipse-plugin'. A required class is missing: org/codehaus/plexus/resource/loader/ResourceNotFoundException
org.codehaus.plexus.resource.loader.ResourceNotFoundException
Tried running Maven with the -cpu argument but it didn't help. maven-metadata-central.xml showed the latest as 2.5.1 and others got 2.6. Fixed by deleting metadata files then re-run Maven.
Bah.
Tuesday, March 31, 2009
RTFL - Read the Fucking Logs
Read the fucking logs? Yes, it happened so many times, on so many guys. Something that I always try to avoid.
Say, you hit into a problem, you looked into the log file, you could see a bunch of error messages and stacktrace, you read the first line, you didn't bother to read the second and further.
You tried to change the configurations or something that you thought would make sense but the same (or new) error came out. You spent quite some time on it like an hour or a day.
You asked me / your supervisor to look into it and they found clear error messages or indications somewhere down the error log. You felt sorry, you found yourself stupid to waste so much time, you wished to be in the hall of shame for that day.
If this is a recurring habit of your, can you make "reading logs carefully" as a troubleshooting principle?
Say, you hit into a problem, you looked into the log file, you could see a bunch of error messages and stacktrace, you read the first line, you didn't bother to read the second and further.
You tried to change the configurations or something that you thought would make sense but the same (or new) error came out. You spent quite some time on it like an hour or a day.
You asked me / your supervisor to look into it and they found clear error messages or indications somewhere down the error log. You felt sorry, you found yourself stupid to waste so much time, you wished to be in the hall of shame for that day.
If this is a recurring habit of your, can you make "reading logs carefully" as a troubleshooting principle?
Friday, March 20, 2009
Some Particulars like Room Names in Aflexi
This is truly a random post. During the lunch time at Full House (NZX), I talked about red-tape/bureaucracy in corporates that I can't stand, then exchanges of some Oz slangs.
When I got back to the office, I came across a blog titled "101 Guide to going to the Men's toilet in Sydney" in my ex-company's internal blog (we still maintain a good relationship basically).
Here're a number of things I raised and discussed over in a meeting an hour ago with the team:
How're rooms named in your office?
When I got back to the office, I came across a blog titled "101 Guide to going to the Men's toilet in Sydney" in my ex-company's internal blog (we still maintain a good relationship basically).
Here're a number of things I raised and discussed over in a meeting an hour ago with the team:
- The developer's roster, tasks and deadlines.
- The right ways to use the toilet.
- The ashtray pot and your ciggy.
- The cups and basin.
- The room names.
How're rooms named in your office?
Subscribe to:
Posts (Atom)