March 2006 - Posts

Programmers motivation, a psychological view

Applying psychology in observing programmers -- the list below is purely based on my observation -- to the programmers in the workplaces I have been to. 

I purposely didn't included programmers with direct and small motivations, because I want this list to appear as generalization (i.e., those programmers who are motivated by the salary, or company benefits)

1. Task oriented – these are the people who are motivated by the work they do. These are the programmers who are motivated by the intellectual challenges of software development. They are the best programmers, and usually the one who is promoted as team leader. Although, task oriented people usually declines promotion offered to them -- just to stay being a programmer.

2. Self oriented – these are the people who are motivated by personal success and recognition. They are the programmers who are interested in programming to achieve their own goals, whether personal or career.

3. Interaction oriented – these are the people who are motivated by the presence and actions of co-workers. They are the programmers who work with specific instructions. They are good team members, but works only with the presence of the team, practically not interested in doing anything without co-workers or specific instructions.

4. Skills oriented – these are the people who are motivated by the skills they gain. They are the programmers who value challenges and learning more than anything else. They are the programmers who can finish his task fast or able to make his task wait for time. He/she is often found in a discussion with co-workers regarding issues that involves his/her skills.

5. Family oriented – these are the people who are motivated by their family. They are the programmers who often change their mood in the workplace. They are interested in doing their work, with open communication with his/her family. They are the hardest to work with, as they changes mood depending on what's happening in his/her family.

6. Change oriented – these are the rarely found people who are motivated by changes in their life. They are the programmers who might not be a programmer before, or might have some bad track record in their career history, in which they are coping with those changes. They are the best and/or the worst people to work in a team, as they usually look to what went before and constantly comparing it to the current situation. Depending on the result of their comparison, their motivation will arise.

7. Socially oriented – these are the people who are usually found in groups, and motivated by their group, regardless of the task on hand. They are the programmers who usually came from the same school, brotherhood, or any social groups. Sometimes, they are the programmers who can make bond with his/her co-worker, but unable to break the bonding. Socially oriented people are also interaction oriented people, but they motivation comes from the presence of their social group rather than their co-worker.

8. Mastery oriented – these are the people who are motivated by mastery goals. They are rare, and the hardest to deal with. They are the programmers who already mastered almost everything in the system, and motivated only by the things they haven't mastered yet. Simple tasks bore them. They are self oriented too. Sometimes they lack the ability to stay up to date, and labeled as `old dogs'.


Document Version: Draft

Posted by cvega with 1 comment(s)

New WinFX communities

Are you into WinFX? just curious or want to be serious?

If you haven't visited these new community sites for WinFX, please do so:

WinFX - Windows Workflow Foundation
http://www.windowsworkflow.net

WinFX - Windows Communication Foundation
http://windowscommunication.net

WinFX - Windows Presentation Foundation (coming soon)
http://www.windowspresentation.net


Also, there are number of publications you can read for introduction in WinFX in WinForms community: http://www.windowsforms.net

For technical questions about WinFX, please visit the MSDN community:
Software Development for Windows Vista

Happy coding!
Posted by cvega with 2 comment(s)
Filed under:

Evil Solution

Last week, I received an email from a guy asking for help with optimization for his company’s projects. He opened the conversation claiming that he saw one of my posts in msforums.ph regarding optimization (thinking about it, I never really made any post about optimization in msforums.ph, probably he meant DevPinoy forum?). To make the story short, his company and I made a deal, that I am going to help them solve the "slow" problem of their projects (two projects to be exact).

One of their projects involves processing large amount of string data from different sources (dictionary, articles and other reference materials). The processing was really simple (but heavy), it is a conversion to lowercase, filtering "bad words" by changing instance of each "bad words" to ****, and other string manipulation that are commonly done in processing written documents, and finally store them for indexing on a later part of the project or later execution thereof. It is the main purpose of the project to perform this conversion, but with literally millions of string data to convert, their project becomes unstable (crashing) and very slow.

For almost a week, I tried many approach, including usage of background process, background threads, and I even tried to manipulate memory allocations (keeping it to the minimum). None of which worked. Last night, out of curiosity, I decided to break the "immutable string" rule as applied by .NET to strings, and take the route of “pointers” to perform in-place string manipulation, hence performing conversion directly. And guess what, it made dramatic improvement in their project. Honestly, I never expected this though.

I showed the result this morning, and they (the boss) were happy about the improvement, eventhough obviously, none of their programmers could understand my solution.

Anyway, here’s a simple snippet I used in boosting their conversion, I purposely modified this as a function, and removed many parts purposely to protect their intellectual rights:

private unsafe void ProcessDocument(string document)
{
  // Convert to lowercase
  fixed(char *ps=document) 
    for(char *p=ps; *p!=0; p++) 
    {
      if (!char.IsLower(*p)) *p=char.ToLower(*p);
    }

  // Other conversion purposely removed
}

You may be thinking why I put the subject “evil solution”, it’s simple, pointers are considered “evil” in .NET development, however useful they are.

Posted by cvega with 11 comment(s)
Filed under: