August 29th, 2010 / No Comments » / by Joshua
Group think
The first risk in decision making is group think.
Group think has the following symptoms:
* Little or no consideration of alternate plans
* Risk is not assessed
* No review is taken of rejected plans
* Advice from outsiders is not sought
* Facts that support the plan are acknowledged, facts that do not support the plan are ignored
* Contingency plans are not created
Surprisingly, synergy and loyalty to each other and to the team leader are a team’s greatest qualities, however, they are the same factors that lead to group think.
Abilene Paradox symptom
The second risk in decision making is the Abilene Paradox symptom.
The Abilene Paradox symptom has the following symptoms:
* Members, as individuals, privately agree on the correct decision to make. This is not shared with the group.
* Members, as individuals, privately agree on how the problem or situation being addressed can be resolved. This is not shared with the group.
* Instead of communicating their views, members keep their views and reservations to themselves, agreeing with views they are opposed to. As the individuals have not presented their views and reservations, a collective decision is made that is actually contrary to the views of all members.
* Members feel frustration, even anger, at this and find someone, or some people, to blame.
The Abilene Paradox is real. How often have you agreed to a suboptimal solution? What if every other team member felt the same way about this solution?
Decision hijacking
The third risk in decision making is decision hijacking. This happens when for example a developer implements features that are not needed right now. The developer hijacks the decision to implement these features.
Example during daily stand-up:
Developer: The customer databases will be used by several applications, so I have implemented support for dealing with various technologies, including Oracle. It took a lot of time. Scrum master: Did we not agree on postponing this? Developer: We need this later and now it is done.”
Decision hijacking is a big problem because the decision making itself is removed from the team as a whole. This behavior has a big impact on trust within the team.
Solutions
Conflict in Agile software development projects can be beneficial to both process and product.
The literature proposes some solutions to the problems with decision making described above. These solutions are based on the existence or stimulation of intra-group conflict:
* Separate groups should be formed, under different leaders, to propose solutions to the same problem (groupthink)
* A devil’s advocate should be appointed (groupthink, Abilene paradox)
For the decision hijacking risk, make sure that developers are on the same page. Working together as a team means taking decisions together.
Posted in: agile
Tags: agile
August 26th, 2010 / No Comments » / by Joshua
I never think of how to make a good conversion? Or how to make a conversion with a stranger, who will become your friends soon or later.
Yes a good conversion could take you a friend.
Yes, maybe you have already known.
1>. Open-minded;
2>. Confident;
3>. Be polite. Don’t look around when the others are talking;
4>. Don’t talk about sensitive topic;
5>. Listen carefully and give propel appropriate interaction with speakers;
6>. Contact with the ‘one-face’ friends with a message or an email.
Posted in: life
Tags: conversion
August 20th, 2010 / No Comments » / by Joshua
Finally, I move my blog to a new VPS(Ngin+PHP-FPM).
Posted in: Tutorial
Tags: fpm, host
July 28th, 2010 / No Comments » / by Joshua
1. turn off the logs;
2. turn off unique key check if the table has;
3. turn off foreign key check;
-
When importing data into InnoDB, make sure that MySQL does not have autocommit mode enabled because that requires a log flush to disk for every insert. To disable autocommit during your import operation, surround it with SET autocommit and COMMIT statements:
SET autocommit=0;
... SQL import statements ...
COMMIT;
If you use the mysqldump option –opt, you get dump files that are fast to import into an InnoDB table, even without wrapping them with the SET autocommit and COMMIT statements.
- If you have UNIQUE constraints on secondary keys, starting from MySQL 3.23.52 and 4.0.3, you can speed up table imports by temporarily turning off the uniqueness checks during the import session:
SET unique_checks=0;
... SQL import statements ...
SET unique_checks=1;
For big tables, this saves a lot of disk I/O because InnoDB can use its insert buffer to write secondary index records in a batch. Be certain that the data contains no duplicate keys.
- #
If you have FOREIGN KEY constraints in your tables, starting from MySQL 3.23.52 and 4.0.3, you can speed up table imports by turning the foreign key checks off for a while in the import session:
SET foreign_key_checks=0;
... SQL import statements ...
SET foreign_key_checks=1;
For big tables, this can save a lot of disk I/O.
If the above solution still can not quick your import process. Try mysqlimport. You can use mysqldump to dump a sql file and a text file. There is an example, look like this:
shell> mysql -e 'CREATE TABLE imptest(id INT, n VARCHAR(30))' test
shell> ed
a
100 Max Sydow
101 Count Dracula
.
w imptest.txt
32
q
shell> od -c imptest.txt
0000000 1 0 0 \t M a x S y d o w \n 1 0
0000020 1 \t C o u n t D r a c u l a \n
0000040
shell> mysqlimport --local test imptest.txt
test.imptest: Records: 2 Deleted: 0 Skipped: 0 Warnings: 0
shell> mysql -e 'SELECT * FROM imptest' test
+------+---------------+
| id | n |
+------+---------------+
| 100 | Max Sydow |
| 101 | Count Dracula |
+------+---------------+
Posted in: Tutorial, mysql
Tags: innodb, insert, mysql
July 3rd, 2010 / No Comments » / by Joshua
In sf1.3, we can use addJoin(array(’id_a’m ‘id_b’), array(’id_1′, ‘id_2′))
/**
* This is the way that you should add a straight (inner) join of two tables. For
* example:
*
*
* AND PROJECT.PROJECT_ID=FOO.PROJECT_ID
*
*
* left = PROJECT.PROJECT_ID
* right = FOO.PROJECT_ID
*
* @param mixed $left A String with the left side of the join.
* @param mixed $right A String with the right side of the join.
* @param mixed $operator A String with the join operator e.g. LEFT JOIN, ...
*
* @return Criteria A modified Criteria object.
*/
public function addJoin($left, $right, $operator = null)
{
$join = new Join();
if (!is_array($left)) {
// simple join
$join->addCondition($left, $right);
} else {
// join with multiple conditions
// deprecated: use addMultipleJoin() instead
foreach ($left as $key => $value)
{
$join->addCondition($value, $right[$key]);
}
}
$join->setJoinType($operator);
return $this->addJoinObject($join);
}
Sometimes we still work on symfony 1.0. So when we want to join on more keys, it seems impossible.
select * from books left join categories on book.category_id = categories.id where categories.name='biography'
If books has 1,000,000 items. There are 100,000 categories, but only 1000 categories with name ‘biography’ . The above sql will go through all the categories. But we propel can generated sql like this:
select * from books left join categories on book.category_id = categories.id and categories.name='biography'
This sql can limit the touched categories number to 1000.
So we can do following in symfony 1.0
$c->addJoin(BookPeer::CATEGORY_ID, CategoryPeer::ID.' AND '.CategoryPeer::NAME.'= "biography"', Criteria::LEFT_JOIN);
Posted in: Code
Tags: symfony1.0
June 28th, 2010 / No Comments » / by Joshua
I just want to post some suggestions about ‘trust’ from my experience. It might not be perfect, but I am sure some of them are mostly useful for you.
Trust (social sciences), reliance on another person or entity. Having faith in others and believing them.
- Be polite. Only when you respect the others, you can get the respect from the others. Only when you get respect, then it is possible for you to get the ‘trust’.
- Trust is not two-way. It doesn’t mean if you trust somebody, somebody should also trust on you. But for sure they will try to trust you firstly. And then if you break the trust from this guy, it will difficulty for you to get it back.
- Trust is hard to copy. If you didn’t know how to be honest man, you will break it at sometime.
- Think before you say. When somebody ask you something seriously, please think it for a while and then make the reply. If you don’t know, you can try to give some references or just say ‘no’. Don’t waste the others’ time and the time of yourself.
- Contribute to the others. Try to share something or give some help for the others. Don’t live in the world with yourself.
- Keep your promise. If you lost your promise for the others several times and everybody knows you didn’t try your best, you will lost the trust forever.
- Try to say ’sorry’. Don’t always say ’sorry’. When you lost your promise, try to say sorry and give a reasonable explanation, rather than ignore it. But..but don’t always say sorry for the same mistake.
- Undertake your mistake. If you make something wrong in your group, please undertake the mistake, rather than hide it. If you think the others might be stupid, you will be the stupid one.
Posted in: life
Tags: trust
June 3rd, 2010 / No Comments » / by Joshua
- You can avoid the filesort by making order by column appear in the where clause
- When using join, make sure the left side join table column is used in the ORDER BY clause or change the join type
Reference
Posted in: Tutorial, mysql
Tags: filesort, mysql
June 1st, 2010 / No Comments » / by Joshua
Problem: There is always a black border for every window in a cracked mac, including ‘Finder’, ‘Terminal’, even the icon on the desktop.
Solution: Delete ‘com.apple.universalaccess.plist’ in /Usr/$YOURNAME/Library/Preferences/. And then Logout and login.
It can fixed in my cracked mac machine.
And the main idea was back up your mac preferences
cp -R /Usr/$YOURNAME/Library/Preferences/ /Usr/$YOURNAME/backup/
And then when you login again, the preferences will be recreated again, like a new user.
For you, you just try to copy some plist from /Usr/$YOURNAME/backup/ to /Usr/$YOURNAME/Library/Preferences/. And then you can check which plist file was the fail reason
Posted in: mac
Tags: cracked, mac
May 31st, 2010 / 2 Comments » / by Joshua
Try
gem clean
reference
If you got
/usr/bin/gem:10: undefined method `manage_gems' for Gem:Module (NoMethodError)
Check if there are two gem under /usr/bin/ directory.
Posted in: ruby
Tags: gem
May 21st, 2010 / No Comments » / by Joshua
1. Important VS Urgent
In everyone’s life, there are urgent things and important things. You will feel pressure if there are a lot of urgent things. And you will pick urgent things before starting the important ones. But have you think about this logic? Sometimes the urgent things are caused by the important ones. Taking exercises is important thing for your healthy. But if you get sick, that will be the urgent thing. But if you pay more attention to the important things, may be you will not get sick. This is the logic!
So pay more attention to the important ones, which will save you a lot of time.
2.
The best architecture will not the one that can work best for your project.
3.
Rome was not built in a day!
Posted in: life
Tags: priority