Friday, August 29, 2008

Productivity and being watched

A thing I noticed is that I am way more productive when I'm working directly with someone. If I'm sitting side to side I don't take all the long way to get somewhere. This person wants results, and wants them now. It amazes me how fast and productive I can be then. Results also motive me a great deal, encourage me to carry on.

I guess I tend to wander off sometimes while working. I discover a problem or something that can be improve. I dive into that. Soon I find something else interesting. It's a recursive process. In the end overall progress is slow.

It's just me being like this though. It's all within myself so I should be able to force myself to work faster and more goal oriented to achieve great results.

It's not also good to take the shortest route though. This usually means using things I already know instead of learning something new. And I tend to make shortcuts and make unclean solutions. That's great for quickly having something tangible but not so great so long lasting quality results. The ideal way would be in the middle somewhere.

Wednesday, August 27, 2008

Joining on a subquery

Pretty awesome SQL trick I just learned from Wouter. In SQL you can join on a subquery and then you can even select columns from it! The cool thing is that you can do transformations such as Group By in this subquery. This enables things I could not do before such as multiple count columns in one query.

For example:
SELECT account.IDENTIFIER, subscriptionCount.subscriptions, promotionCount.promotions
FROM tomtomtbaccount account
JOIN (SELECT account_fk, COUNT(*) AS subscriptions FROM tomtomtbsubscription GROUP BY account_fk) subscriptionCount ON account.account_id = subscriptionCount.account_fk
JOIN (SELECT account_fk, COUNT(*) AS promotions FROM tomtomtbpromotion GROUP BY account_fk) promotionCount ON account.account_id = promotionCount.account_fk
ORDER BY subscriptionCount.subscriptions
LIMIT 100;


(this query is a bit heavy though...)

Also a nice memonic Wouter provided:
if you want results side by side: JOIN
if you want results in a list: UNION

Go see people

When small problems or misunderstandings occur, just go see the people in person instead of sending mail. The mail communication can cause even more confusion. People in person are generally kinder and have more attention.

Today I was helping a colleague with setting up my application on a test environment. He was complaining so i sat with him and we quickly solved the problem. We found another problem and solved it on the spot too. Within half an hour it was all running. It would have taken a lot of more time and frustration for him to solve all the problems. Now I was giving him attention and thereby promotion myself.

Friday, August 22, 2008

Controlling your boss for fun and profit

Very good article on influencing without power:
http://blogs.msdn.com/eric_brechner/archive/2005/08/01/august-1-2005-controlling-your-boss-for-fun-and-profit.aspx

Basically: don't whine about your manager not listening. You're telling it the wrong way and do something about it if you want to make a change.

Thursday, August 21, 2008

Don't be afraid to ask

Don't spend hours staring at the screen. Ask advice. People like being asked for advice, it makes them feel knowledge-able. I can learn a lot from their experience. Other people often have a different view that can bring more ideas. Even explaining the problem is a way of ordering and thinking about it. Not rarely I explain a problem and come up with a solution myself on the spot. Just because I took some distance and thought about it.

Wednesday, August 20, 2008

Create action lists

Write everything todo down so I don't have to think about it. Spend my braintime on actually doing something.

Testing

A good presentation on unit testing. I should really set up tests from the start. It saves a lot of work in maintenance.

http://www.masukomi.org/talks/unit_testing_talk_2/index.xul?data=slide_data.txt#page1

Humblesness

"Everyone writes bad code from time to time, but having code reviews eliminates a lot of it. Always try to be nice to your colleagues, and never think that you know better. Be humble since it's actually easy to be wrong about stuff. :-)"

http://beta.stackoverflow.com/questions/12745/how-do-you-handle-poor-quality-code-from-team-members#12761

I sometimes tend to get arrogant or think I know it all. I should be careful with this. It's easy to be wrong and not very helpful or constructive being a 'know it all'. I don't like people who act like this so shouldn't do it myself.