Tuesday, May 30, 2006

Nice factory method implementation

I have been working with a colleague of mine Nelutzu to refactor some code in a project. We have installed some metrics plugin in Eclipse and we started to purify he code (as we had some problems that the metrics spotted out)

One of the problems was the large number of branches in a factory method so Nelutzu has refactored it in a very nice way:
class FooFactory {
    private static HashMap items = new HashMap();
    static {
        items.put("foo1", new Foo1());
        items.put("foo2", new Foo2());
        items.put("foo3", new Foo3());
    }
    public static Foo getFooProduct(String fooName) {
        return items.get(fooName).getClass().newInstance();  
    }
}
Voila, no if or switch while creating the objects. Nice work, Nelutzu!

Sunday, May 28, 2006

C oddity....

Found something similar while debugging a memory leak:
int main() {
    int x, y;
    switch(x) {
        case 0:
            break;
        case 1:
            if(y==5) {
        default:          // wtf. default inside if? 
            break;        // it seems to work for every
                          // compiler I used
        }
        case 2:
            break;
    }
    return 0;
}

Saturday, May 13, 2006

Hourray!!!

Hourray!!!

I have made a small VXML interpreter in Python.
I have used the PyTTS (a python wrapper over MS SAPI) and xml.dom.minidom for handling the tags.
It works quite well... I just have to add some DTMF processing and I think it will be quite okay.

Friday, May 5, 2006

Following the last post

More than I have said before....

I discovered that a person that works for over 7 years in an IT company doesn't know:
1. To use Microsoft Word (Spellchecker is a big problem)
2. English or any foreign language (Mother tongue rules)
3. How to program (Although is a SW engineer...)

Yeah, a little bit contradictory with what I said in the last post, but I think that now everything is possible.

But in 7 years not to be able to speak a basic English or use Word...

Simple computations

1. Software engineer
Responsibilities: design, develop, test, write documentation, be ready in time...
Skills needed: Programming languages(Advanced), OOAD, Databases, Various technologies, Foreign languages
Studies: BSc or MSc. Preferably in CS, EE, Telecommunications, Math...
Risks assumed: High - projects depend un the quality and speed of their work
Satisfaction: Low to medium

Monthly salary ~= 500 EUR
Bonuses ~= 0 EUR
Daily allowance = 0 EUR

2. Operation guy
Responsibilities: go onsite, install or update systems
Skills needed: Reading - to be able to read procedures, Computer skills (Medium) - Installation + Office...,
Studies: BSc on whatever
Risks assumed: Low. High only in underdeveloped belligerent countries...
satisfaction: High. Can see foreign countries for free

Monthly salary ~= 450EUR
Bonuses ~= depending on project
Daily allowance = 120 EUR when on mission


All the data is for two years experienced guys.
A simple math will say that:

In an year a SW Engineer will earn about 6000 EUR
In an year an Operation guy will earn 5400 EUR + 12000 EUR = 16400 EUR
30 Days - mean month value * 200 EUR/day * 6 Months average mission time = 21600 EUR
Costs in mission for food and lodging ~= 10000 EUR

What do you think?

I was puzzled myself when someone has shown me the figures. I understood why some of the good developers I have in my team want to leave for operations. They are ready to do a work that does not involve much risks and offers them some possibilities to visit the world while earning more money than the hardworking guys that remained home. Moreover they have the opportunity to meet the client face to face and learn more about some opportunities.

I will certainly not encourage anyone to become a SW Engineer from now on. They should be fools to do it...

Thursday, May 4, 2006

Groupware!

In each corporation groupware is needed. But nobody really seems to understand it and use it correctly. No integration between tools, no standards... A totally mess.
There should be some public protocol that could be used to share information between all clients.

In my opinion GW should integrate:

1. PIM
Zimbra
Chandler
HulaEGroupware

2. Project planning
PhpCollab
Netoffice
Microsoft Project
Gantt Project
http://www.openworkbench.org/

Links for these tools

3. Presence & Messaging
http://www.jabber.org

4. Data Sharing
FTP, HTTP, RSYNC, WebDAV

All above should be under the same interface or with different interface but using the same background engine.
There are some web projects and some applications that are trying to accomplish this task but they are really not understanding each other well enough.

Zimbra
Chandler
Hula