Archive
Learn design patterns from real projects: RigsOfRods case study.
The majority of developers have already heard about design patterns, GOF(Gang Of Four) patterns are the most popularized, and each developer has his way to learn them , we can enumerate:
- Reading a book or a magazine.
- From web sites.
- From a collegue.
- Doing a training.
Clang Rocks!
Four years ago when we began the development of CppDepend we needed a C\C++ parser, our first reflex was to use GCC, in the beginning we were very excited to integrate it, but after few weeks we decide to abandon it for the following reasons:
- Gcc is monolithic and it’s difficult to isolate only the front end parser.
- Gcc doesnt treat microsoft extensions.
- The GPL license is restrictive, and we can’t use it for our commercial product.
The Architect: The succes key of the project.
Introduction
Sometimes there are some hidden correlation between two or more process developement steps, that could generates many unsuspected problems , In this article the goal is to discover the impact of the architect decisions on the other actors involved in the project.
MemCache++: An example of modern C++ design
MemCache++ is a light-weight, type-safe, simple to use and full-featured Memcache client.
It was developed by Dean Michael Berris who is a C++ fanatic, loves working on network libraries (cpp-netlib.github.com), and currently works at Google Australia. He also is part of the Google delegation to the ISO C++ Committee. You can read more of his published works at deanberris.github.com and his C++ blog at www.cplusplus-soup.com.
Studying the well designed libraries is recommended to master C++ concepts, and the goal of this article is to discover some memcache++ design choices that makes it easy to understand and use.
Read more…
Concurrency Runtime: Task Scheduler
The Task Scheduler schedules and coordinates tasks at run time. A task is a unit of work that performs a specific job. The Task Scheduler manages the details that are related to efficiently scheduling tasks on computers that have multiple computing resources.
Windows OS provides a preemptive kernel-mode scheduler,it’s a round-robin, priority-based mechanism that gives every task exclusive access to a computing resource for a given time period, and then switches to another task.Although this mechanism provides fairness (every thread makes forward progress), it comes at some cost of efficiency.For example, many computation-intensive algorithms do not require fairness. Instead, it is important that related tasks finish in the least overall time. Cooperative scheduling enables an application to more efficiently schedule work.
Read more…
CRT Concurrency Runtime: Resource Manager
Visual C++ 2010 comes with interesting new features and enhancements to simplify more native programming. The Concurrency Runtime is an added framework to simplify parallel programming and helps you write robust, scalable, and responsive parallel applications.
The Concurrency Runtime raises the level of abstraction so that you do not have to manage the infrastructure details that are related to concurrency. The Concurrency Runtime also enables you to specify scheduling policies that meet the quality of service demands of your applications.
Read more…
Visual C++ 2010: What’s new for MFC library?
Some years ago I thought that MFC will be obsolete, and no new features will be added, but I was wrong, VS2008 added many features and enhancements, and with VS 2010 I discovered new improvements.
So what’s new in MFC 10? to answer to this question I tried to compare the two versions MFC 9 and MFC 10 using CppDepend.
Refactoring:What’s the origin of bad design?
The refactoring is defined as the process of changing a software system in such a way that it does not alter the external behavior of the code yet improves its internal structure.
Refactoring improves the quality of application design and implementation, but unfortunately the expression “If it is working don’t change” is many times used to bypass it.
We can found in general three cases concerning refactoring:
Read more…
C vs C++: Linux analysis case
I think that the debate “C vs C++” will end when the two langagues will died, and each one have its advantages and inconvenients, the choice of one instead of another depends on the application context.
Recently i read a famous linus torvalds opinion about C++, where he wrote:
“C++ is a horrible language. It’s made more horrible by the fact that a lot of substandard programmers use it, to the point where it’s much much easier to generate total and utter crap with it. Quite frankly, even if the choice of C were to do *nothing* but keep the C++ programmers out,that in itself would be a huge reason to use C.”
Read more…