It actually takes from one agile expert chenyong's blog.But it is in Chinese.
http://blog.csdn.net/cheny_com/article/details/7717787
Just write down some of his options.
For Eclectic: Some body claims he can use 7 or 8 computer languages, involving in 76 projects.You will doubt whether he knows the project well enough.
For Expert: Someone maybe focus on one document translator for ten years but beyond that, he knows nothing.
Which one is better? Actually, none of them is good.
How to become a good programmer?
Good programmer likes to communicate with others and learn from others.
If one programmer needs to touch with fresh man, he need to write the code clearly and let the new guy easy to read.
If he needs to work with senior programmers, he needs to make the code elegant enough.
For the knowledge growing, First, he may need to communicate in technical point of view, then need to understand the domain services, after that knowledge transfer. Day by day, he will become a Eclectic.
Some one worries if he knows too much, then he will lost his specialty.
Two gaps in software engineering:
1. GUI and backend Server;
Actually it is very difficult to separate them out completely. If you can design a product both GUI and backend in a big picture, you will achieve a good quality of product.
2. Development and QA.
Developer writes auto test code for QA to learn the overall picture of product; Developer reviews the QA test cases to learn the business logic.
(My understand: So, try to understand the thing in a high level, in a big picture. No need to be so constraint by the role. For example, if I am a developer, I don't like to say I am a developer purely. Rather, I will say I am a member of solution provider, and mainly focus on good quality of source code. That means, I am still responsible for the final delivery quality of the whole product. I won't miss understand the customer's requirement. It is not only the pre-sale's job. )
Friday, 27 July 2012
How to integrate a socket check with QT intgeration
In socket programming, you may want to call select to check which sockets is available. Normally, it is called inside a loop.
But in QT GUI programming, the main loop is encapsulated inside application.exec(). See in below:
int main(argc, argv)
{
QApplication a(argc, argv);
return a.exec();
}
You need to find a way to put your select operation in the loop. How to do?
What I found is,
we may use class QAbstractEventDispatcher to register our own SocketNotifier.
You tell QT framework please pay attention to my SocketNotifier. The SocketNotifier has a parameter of fd, which is your own socket one.
I suspect inside QT framework loop may call select implicitly, which supports the integration of the socket programming.
I haven't checked yet, hope it is a right way to do that. I think It should be the correct direction to integrate the socket programming.
If thinking in a more broad way, we can use this mechanism to integrate any data access operation into QT application. For example, look at the Unix, it use fd to abstract file and socket access. You can also define your data access system with a fd as a key to access.
But in QT GUI programming, the main loop is encapsulated inside application.exec(). See in below:
int main(argc, argv)
{
QApplication a(argc, argv);
return a.exec();
}
You need to find a way to put your select operation in the loop. How to do?
What I found is,
we may use class QAbstractEventDispatcher to register our own SocketNotifier.
You tell QT framework please pay attention to my SocketNotifier. The SocketNotifier has a parameter of fd, which is your own socket one.
I suspect inside QT framework loop may call select implicitly, which supports the integration of the socket programming.
I haven't checked yet, hope it is a right way to do that. I think It should be the correct direction to integrate the socket programming.
If thinking in a more broad way, we can use this mechanism to integrate any data access operation into QT application. For example, look at the Unix, it use fd to abstract file and socket access. You can also define your data access system with a fd as a key to access.
Third Party Library Visual Studio Version Dependence
Today I imported a
self-development library on Windows, but when the program just calls a
simple entry API of that library, the program crashes.
Finally, what I found is, this library depends on one open source third party library, whose the highest library version is, Visual Studio 2005 in official download website . But my current Visual Studio is 2010, and it will conflict! That means you need to take the open source by yourself and recompile the library!!
I don't want to do that because I don't want to be the maintenance developer of the library, so I choose a new version third party library which provides Visual Studio 2010 libraries download. But it fails again. And I checked again, our self-development library including path already hard coding the third party version, which means you cannot upgrade to the new version of third party if you want to use the self-development library!!
It seems it is a joke for Visual Studio backward compatibility, so if you want to develop a new library, don't depend on certain version of third party. The dependence should only contains the component name, and it should not contains any kind of version!
Finally, what I found is, this library depends on one open source third party library, whose the highest library version is, Visual Studio 2005 in official download website . But my current Visual Studio is 2010, and it will conflict! That means you need to take the open source by yourself and recompile the library!!
I don't want to do that because I don't want to be the maintenance developer of the library, so I choose a new version third party library which provides Visual Studio 2010 libraries download. But it fails again. And I checked again, our self-development library including path already hard coding the third party version, which means you cannot upgrade to the new version of third party if you want to use the self-development library!!
It seems it is a joke for Visual Studio backward compatibility, so if you want to develop a new library, don't depend on certain version of third party. The dependence should only contains the component name, and it should not contains any kind of version!
Big Company VS Small Company
When there are lots of stories about creating or selling their own small
company to become millionaire, I've seen somebody in big company
complains no room, lots of processes, lots of communications, hard to do
whatever he wants.
My opinion is, the management and process in big company is a must
. 1.It is so big that no easy to see in big picture. there should be some effort to maintain a communication channel.
2.since a company knows it is not easy to pass the first survival stage, it should have some sort of control to keep it grows. Not like small company, no much background and burden, just go fast and go ahead, maybe more aggressive.
3. In big picture, there is a rule in
Mmmkeconomics the incoming per unit will decay as the company is becoming larger.
My opinion is, the management and process in big company is a must
. 1.It is so big that no easy to see in big picture. there should be some effort to maintain a communication channel.
2.since a company knows it is not easy to pass the first survival stage, it should have some sort of control to keep it grows. Not like small company, no much background and burden, just go fast and go ahead, maybe more aggressive.
3. In big picture, there is a rule in
Mmmkeconomics the incoming per unit will decay as the company is becoming larger.
About Software Design
it is argued again and again.
What I think is, each component is so thin and simple that can be easily put together as a whole. They can be tested very easy and a so-call state of art software is like a tool you can extend in any way you want.
Any time it will argue about the implementation is not enough oriented design, a bit slower or the design is too complicated.
To me, it is a matter of methodology and personal preference.I understand each method will always have its advantage and drawback.
But the golden principle must be remembered is, as a programmer, you must deliver correctness, easy maintenance and enough performance in time! Otherwise, rubbish...
So at the design stage, we should focus:
1. how to make sure it is 99% correctness after delivered?
Always ask: Requirements are well understood?anything missing? Enough resource to Test? Easy to Test?
2. How to make it easy to maintain?
Each part is easy to understand? Easy to divide? Easy to put them together like a tool? What is the potential extension for future development? Requirements and Features are apparent enough? Well organized or have a layer concept(Look at the army or a big company how they are organized)?
3.good enough performance
What is the estimated and required performance in normal transaction? Do you understand the algorithm? Do you know the performance stat or try for each operation(assignment, function call, virtual call..)? What is the bottle neck? If want to talk about performance, please provide the stat data before discussion.
4. deliver in time
Have you break down the requirement detail enough how to implement in your mind? If cannot, please continue. It is the basis of project scope estimation. Try to use your experience, or FPA(Function Point Analysis, somebody suggests but I don't pratice) to estimate the time. Find a good tool to help you to consider the factor of holiday or effort percentage. OpenProj may be a free and good enough choice. If project progress falls behind the schedule, can you notice it in advance? Can you control? If cannot, ask yourself why cannot and what is the reason of that. Keep on communication and let the stakeholder know the status in time. Nobody will like to be surprised finally!
So, I don't care how it is implemented if all the above are satisfied.
What I think is, each component is so thin and simple that can be easily put together as a whole. They can be tested very easy and a so-call state of art software is like a tool you can extend in any way you want.
Any time it will argue about the implementation is not enough oriented design, a bit slower or the design is too complicated.
To me, it is a matter of methodology and personal preference.I understand each method will always have its advantage and drawback.
But the golden principle must be remembered is, as a programmer, you must deliver correctness, easy maintenance and enough performance in time! Otherwise, rubbish...
So at the design stage, we should focus:
1. how to make sure it is 99% correctness after delivered?
Always ask: Requirements are well understood?anything missing? Enough resource to Test? Easy to Test?
2. How to make it easy to maintain?
Each part is easy to understand? Easy to divide? Easy to put them together like a tool? What is the potential extension for future development? Requirements and Features are apparent enough? Well organized or have a layer concept(Look at the army or a big company how they are organized)?
3.good enough performance
What is the estimated and required performance in normal transaction? Do you understand the algorithm? Do you know the performance stat or try for each operation(assignment, function call, virtual call..)? What is the bottle neck? If want to talk about performance, please provide the stat data before discussion.
4. deliver in time
Have you break down the requirement detail enough how to implement in your mind? If cannot, please continue. It is the basis of project scope estimation. Try to use your experience, or FPA(Function Point Analysis, somebody suggests but I don't pratice) to estimate the time. Find a good tool to help you to consider the factor of holiday or effort percentage. OpenProj may be a free and good enough choice. If project progress falls behind the schedule, can you notice it in advance? Can you control? If cannot, ask yourself why cannot and what is the reason of that. Keep on communication and let the stakeholder know the status in time. Nobody will like to be surprised finally!
So, I don't care how it is implemented if all the above are satisfied.
A Code Farmer
A programmer are usually called as a code farmer in China. Why? Because
a programmer does coding for projects one by one. If the client and the
market doesn't provide the projects, a programmer will have nothing to
do and lost his value. It just like the farmer, whose harvest depends on
a good weather
Subscribe to:
Comments (Atom)