Thursday, January 29, 2009

Silver Cityjobs Brampton

Best Practices: Thinking in C + + by Bruce Eckel


Among the readings suggest that there is Thinking in C + + by Bruce Eckel . The first edition of 2000, but the concepts are still very modern. There are listed a set of best practices fundamental for those who write code and irrespective of the technology platform used.
Following a series of insights learned and translated (very!) freely from the original text ... and not take ourselves too seriously to let the word Dilbert , mythical character from Scott Adams that all developer for their survival techniques and not only (the other is recommended reading The Career Programmer: Guerilla Tactics for an Imperfect World ) should take into account a large ... perhaps even more than Bruce Eckel!


1. Before you let it run, then make it fast ! This is true even if you are certain that any piece of code is really important and that it will become the main bottleneck of your system. Do not touch that fragment to optimize it. First of all try to get a working system with a project as simple as possible. Only later, if it is not fast enough, think about it. Almost always find that the real problem is not "your" bottleneck. Save time for what is really useful.

2. elegance in coding always pays. It is not frivolous activity. You will hand in a program not only easier to compile and test, but also easier to understand and maintain: and this is where you find the economic value of your work . You may need a little 'first experience to understand this fact, as it might appear that, as you seek to make a smart snippet, you are not really productive. Productivity will emerge later when the code will integrate seamlessly into your system, and even more when the code or the system will be changed.

3. Remember the principle "divide et impera " . If the problem you are facing is too complex, try to imagine what might be the basic operations of the program. Perhaps imagining a "something" to deal with the most difficult parts!
This something is an object and then write code that uses that object. Then analyzed the object and encapsulated within its intricate parts of other objects, and so on.

4. If you have a large block of code that needs to change, begin to isolate the parts that will not change possibly being included in a "class API" as static methods. Next, focus your attention on the code that will change, restructuring it into classes. Thus makes easier the changes as your business maintenance will proceed.

5. Keep the distinct from its creator class user (client programmer ). Who uses the class is the "customer" and does not need nor want to know what happens behind the scenes. Who creates the class must be the expert in designing classes and must write it so that it can also be used by most novice programmers, continuing to behave in a robust application. The use of any library is simple only if it is transparent.

6. When you create a class, use a nomenclature as clear as possible . Your goal is to make the programming interface is conceptually simple. Try to make your names so clear as to make unnecessary comments. To this end, exploited overloading of functions and default arguments to create an intuitive, easy to use.

7. The control allows you (the creators of the class) to make extensive changes in the future that will then be possible without adversely affecting the client code where the class is used. In this perspective, keep everything as private possible, and make public only the class interface, instead of always using the data functions . Make the data public only when you are forced. If users do not need a class to invoke a function, declare it private . If a part of your class must be visible to any classes inherited as protected , provides an interface to functions rather than expose data directly. In this way, the changes implemented will have minimal impact on derived classes.

8. First of all, and if possible write the test code . Even before I write the class and then keep evolving along with the class. Make the automatic execution of your test perhaps through a makefile or by an instrument similar. In this way, any changes can be controlled automatically by running the test code, and errors are immediately detected. Knowing that I have the safety net of the test environment, you will be more likely to make significant changes when they feel the need. Remember that the major improvements in programming languages \u200b\u200bcome from internal controls provided by type checking, exception handling, and so on, but these features are to a certain point. You have to get down the road that leads to the creation of robust systems by introducing the tests that verify the specifics of your class or your program.

9. Remember a basic rule Software Engineering: All the problems of software design can be simplified by introducing an extra level of dereference conceptual. This idea is behind the ' abstraction, the primary feature of object-oriented programming.

10. Make the most atomic classes can in other words, give each class a single clear purpose . If your classes or your system design becomes too complicated, break complex classes into simpler classes. The most obvious sign of this is exactly the same size: if a class is large, there is the possibility of doing too much and then you need to analyze it.

11. Beware long method definitions. A long and complicated operation is difficult and expensive to maintain, and is probably trying to do too much alone. If you are to handle such a function, means that, at least, should be divided into several smaller functions. It could also suggest the creation of a new class.

12. Beware long argument lists. Function calls are hard to write, read and maintain. Rather, try to move the method in a class which is most suitable, and / or pass an object as a parameter.

13. Do not repeat yourself . If a piece of code appears in many functions in derived classes, move that code into a single function in the base class and call the functions of derived classes. Not only save space, but allow easy propagation of changes. You can use an inline function perl'efficienza. Sometimes, the discovery of this common code brings considerable benefits to the functionality of your interface.

14. Beware of instructions switch or the if-else concatenated. Typically, this is a clear indicator of the type of programming type-check . Programming
type - check means that you are choosing what code to run under some kind of type information (the exact type could not be immediately apparent). Usually, you can replace this kind of code using inheritance and polymorphism, the polymorphic function call to perform the type check for you, and allow for a more affordable and easier extensibility. [NDT - In reality, the type checking is characteristic of the C + + is a strongly typed language, but the principle is still valid as a point of attention of a general nature in the sense that an excess of if-else statement nested is certainly index entropy high you are entering in the code.]

15. Look limitations in the inheritance . Projects cleaner add new features to those inherited. Beware of a project that removes the old functionality (while you are inheriting) without adding more. But rules are made to be broken, and if you are working with an old class library could be more efficient to restrict an existing class in its subclasses, rather than restructure the hierarchy so that your new class you go to where it should enter, above the old class.

16. not to extend the core functionality in subclasses . If an interface element is essential for a class should be in base class, and not be added during the derivation. If you are adding methods through inheritance, perhaps you should rethink the project.

17. Less is more. Started by minimal interface for the class, simple and small enough to solve your current problem, but do not try to anticipate all the ways in which your class could be used . At the time of use, you will discover the way in which you have to expand the interface. However, once the class is in use, you can not modify the interface without disturbing the client code. If you need to add more features, all right, will not create problems with the code, if not the need for recompilation. But even if the new methods replace the functionality of the old ones, let alone the existing interface (if you want, you can combine the functionality in the implementation below). If you need to expand the interface of an existing function by adding new topics, leave the existing arguments in order, and assign default values \u200b\u200b to all the new ones, in this way, you will not create any problems to call existing that function.

18. Overloading of operators is only "syntactic sugar " a different way to call a function. If overloading an operator does not make the class interface clearer and easier to use, do not. For a class create a single operator for the automatic conversion type.

19. Do not worry about premature optimization. It is pure folly . In particular, do not bother to force the code to be efficient when you are just building the system. Your main aim is to test the project, unless it requires the same degree of efficiency.

20. Keep the scope as small as possible, so that the visibility and the life of your objects are the lowest possible level. In this way, you decrease the possibility of using an object in a wrong context, and to hide a bug hard to find.

21. Avoid, avoid, avoid as much as possible ... we will never tire of repeating, the global variables. Always try to insert data into classes. It is more likely to run into global functions rather than global variables, even though you might realize later that a global function would be a more appropriate location static as a method of a class.

22. Take advantage of your benefit check for errors made by the compiler. Compile your code enabling all warning, and correct your code inmodo to eliminate them all. Write code that uses the errors and warnings at compile time rather than code causing runtime errors. Use assert for debugging, but to use the runtime exceptions.

23. Favorite compilation errors to runtime errors. Try to handle an error as close as possible to the point where there was . It is preferable to handle the error at that point rather than throw an exception. Catch the exceptions in the handler closer than having enough information to handle them. Do everything you can with the exception to the current level and if this does not solve the problem, rilanciatela again.

24. not create your own notation "custom" for the names of member variables ( underscore , prefixes, imaginative variations of Hungarian notation, and so on), unless you have a lot of pre-existing global variables; if not, let the classes and namespaces do the job for you.

Tuesday, January 27, 2009

Bad Credit Mortgages Rates Sask.

Architects: John Von Neumann, the Supreme Architect

E 'difficult, very difficult to write about John Von Neumann ... In reality there should be a lot of material on the net about this myth of information to make almost unnecessary to add anything. And nothing more ...
One imagines that, as the Supreme Architect of the John von Neumann, who in fact has made possible everything that can be defined as "digital world", including the Internet, nothing should be added. And instead
Network is no homage to his Creator ...
There is very little material, moreover so disorderly, for anyone who wants to learn more. But maybe it's not just the fault of the network in truth.
I have personal memories of when I had my first encounter with the world of programming and computers.
University, during programming of computers. Von Neumann was just a mention, on the fly and very superficial indeed, by the professor turn.
A brief reference to the diagram (a masterpiece of abstraction and simplicity) on the architecture of MAG (Generalized abstract machine), some historical sull'ENIAC (the first computer as we know it today) and so on, right on with the course programming ... UNIVAC Fortran 77 and 1100 (punch cards!) As a processor of the computer lab.
It is said that von Neumann designed the scheme of MAG in minutes, immediately after realizing that the designers of what became the ENIAC were groping in the dark ... Absence of Intuition in darkness.

Today, almost always, when speaking of Von Neumann and his eclecticism Supreme (was also one of the greatest mathematicians of the modern era), there are many, unfortunately, the IT professionals who rummage in bulk in its memory.

And we are talking about when we talk about Von Neumann, the one who posited and made possible the application of bit as a unit of primary information.

Von Neumann was, however, undoubtedly a genius and, as often happens with outstanding personalities, certainly a genius of evil.

He must, in fact, the first systematic and disinterested collaboration of science with the arms industry. This means an organization, the Rand Corporation Of which he was one of the most prominent and also, perhaps, hidden shareholder.

Together with his friend, the nuclear physicist Edward Teller, who died recently, however, represented the other side of science, the one that brought the United States to any strategy meeting at the Presidential Cabinet, the need to secure their first strike "during the so-called Cold War. In full compliance with the principles of game theory.

Their opponents, of Teller and Von Neumann were the bus stops, the Oppheneimer, Einstein and the paradox was that all together, the opponents of Von Neumann, who after the end of World War II took on the role of pacifist doves, actually had their own contributed decisively to the creation of nuclear weapons.

Much the same Von Neumann in that we see a historic photo below along with Oppheneimer and ENIAC.


Fermi had demonstrated the possibility of atomic fission reaction, and he knew when the experiment said the United States, what would be served.
Einstein had even written a letter to President Roosevelt's prayer for you to endow the project Mahnattan funding. And Einstein argued the request was motivated by the terrible need to defeat the Nazi monster at all costs. For the Von Neumann
monster to defeat a any price would have been a Communist.

Oppenheimer, last but not least, was the scientist with exceptional organizational skills made it possible to reach the bomb in a few years. The organization's chief operating officer of Project Mahnattan. One of the largest organizations in history, perhaps second only to that period, Albert Speer, Hitler's Armaments Minister, another world. Architectural organizations. All
doves, however, Einstein and those of his circle, after delivering the bomb ...

demon The only official so to speak, however, was Von Neumann ... better omitted or forgotten. Known only by specialists sector, by mathematicians and totally unknown to most.
The creator of Game Theory, another fundamental cornerstone of many scientific disciplines, along with Nash ... but that's another story ...

Monday, January 26, 2009

Do I Pay Tax On A Used Boat Purchase In Ontario

Enterprise Web 2.0 Agenda of 2009 - Dion Hinchcliffe's Predictions

The guru of Web 2.0, Dion Hinchcliffe, recently published an abstract of his predictions for 2009. Forecasts and trends expected from the entire world community Enterprise Web 2.0. Obviously
premise ... Hinchcliffe also notes the serious world economic situation, but with the spirit typical of Americans (and the election of Obama, a spokesperson for the New Deal called is significant to do so) also undisputed guru of the Web 2.0 world believes that, in terms of IT, we are facing a unique chance .

Chance is a word that exists both in French and in the Anglo-Saxon vocabulary.

For the French, has more the meaning of destiny, fate .

means mainly to the Anglo-Saxons challenge, opportunity .

... and how the Old Continent is reacting to the global crisis we can understand the clear difference between the two worlds ...
Europe is awaiting his fate in a substantial inaction, waiting, so to speak, walk the storm ...
America is actively looking for her instead chanche , challenge ...

And Web 2.0 for the Americans, is one of the clearest opportunities, clear and defined scope of web technologies.

Opportunities also extremely pragmatic and concrete. The diagram above
Hinchcliffe is clear and immediate.
Only two notes of interest to us to stress his article (which can be viewed in full at the link http://blogs.zdnet.com/Hinchcliffe ).

platforms Social Network, according to Hinchcliffe, agrees to extend and deploy them in particular:

  • to and integration with CRM systems, which already have the vital need to expand the quality of interaction with customers (essentially what managing call center have not been able to manage these years)

  • for sharing knowledge within organizations (collaboration platforms work more effectively and Wiki mode on systems based on criteria of social networking integration and cooperation with the outside world - see the case of R & D Procter & Gamble outsourced mode Wiki).

In this respect, unfortunately, are very symptomatic attitudes of closure (blocking Internet ports, for their employees, to all the Web 2.0 platforms like Twitter , Facebook, YouTube , Microsoft Instant Messenger Messanging as ...) that many European companies are implementing in a systematic way against the Web 2.0 that is rampant on the Internet now.

ramp and expand the Web 2.0 platforms and like all new technologies are also a little 'fear!

There is certainly a misunderstanding about what Web 2.0 and how they are viral accelerators and catalysts of knowledge ( Internal Knowledge ) social networks and therefore do not understand the closing also media (see increasingly aggressive campaigns Facebook to denigrate the traditional media - print and television in particular - though in that case maybe it was before a battle between competitors !) In such technologies.

In the end, however, this feeling of isolation was the same as businesses and not only they had years ago to the whole Internet world in the initial phase of its expansion.
The extreme paradox then is that often companies that block and close platforms like Facebook or Messenger are the same ones that are maybe planning to sell or provide to their customers, collaboration platforms Web 2.0!
E 'apparent contradiction, and therefore was confident, along with Dion Hinchcliffe, that such conduct, even if we are at the bottom of schizophrenics, sooner or later will be reconsidered ...