Home
Fractals
Tutorials
Books
My blog
My LinkedIn Profile

BOOKS i'm reading

Napoleon Hill Keys to Success: The 17 Principles of Personal Achievement, Napoleon Hill, ISBN: 978-0452272811
The 4-Hour Workweek: Escape 9-5, Live Anywhere, and Join the New Rich (Expanded and Updated), Timothy Ferriss, ISBN: 978-0307465351
The Fountainhead, Ayn Rand, ISBN: 0452273331
Web Hosting Canada

mailto:olivier@olivierlanglois.net

Archives for: June 2007

06/30/07

Permalink 12:17:49 pm, by lano1106, 79 words, 2660 views   English (CA)
Categories: tutorials

Alternative to MFC for GDI programming tutorial update

Following Carlos Fernndez feedback, he pointed out that in the function CGradient::InsertSort() used by the tutorial sample program, the variable j that was declared inside the for statement was used outside of the for loop block. Strangely, my compiler has never complained about the problem but since it was trivial to fix, I just moved the j variable declaration outside the for loop statement.

You can read about that tutorial at:

Alternative to MFC for GDI programming tutorial

06/28/07

Permalink 10:12:23 pm, by lano1106, 358 words, 10718 views   English (CA)
Categories: C++

Aggregating a Free Threaded Marshaller to a COM object

That is a question a co-worker of mine asked. I did remember that I used to know what it does mean, but earlier today when I came back home, I have double checked in my COM reference book and I have found a subsection dedicated to the subject.

COM deals with multithreading by defining an apartment concept. 2 Apartment types exist: The single threaded apartment (STA) and the Multi-threaded apartment (MTA). One of the numerous COM class attributes is in which apartment type objects of that class are allowed to run. 3 values are possible for that attribute: STA, MTA or both.

When a thread wants to access a STA object, it will go through the same process than if the object was remote and will go through a proxy object, marshalling/unmarshalling and the thread residing in the remote STA apartment which must have a message loop, will receive the request. This whole process adds a lot of overhead and for that reason, COM allows to create a custom marshaller. Your COM object would have to implement the interface IMarshal. One example of a custom marshaller would be to serialize the whole object state to create an exact copy of it on the proxy side so once unmarshalled, all access to it would remain local.

Now, (I know the short explanation is starting to be long), in the case that a developer went through the process of making his COM class thread safe to support MTA, it would be a good idea to have a custom marshaller to just serialize a raw pointer to it for a safe direct access even when it reside in a STA apartment. This situation is so common that COM provides the custom marshaller that does it. It is the famous Free Threaded Marshaller and since COM does not allow inheritance to reuse code, the only way is to aggregate it to your COM object with the function CoCreateFreeThreadedMarshaler().

Aggregating a COM object just mean that when QueryInterface is called for getting an interface that the outer COM object does not support, it will forward it to the IUnknown::QueryInterface of the aggregated object.

06/26/07

Permalink 10:20:38 pm, by lano1106, 193 words, 2880 views   English (CA)
Categories: Software security, Software security

Applied cryptography

Applied Cryptography: Protocols, Algorithms, and Source Code in C, Second Edition, Bruce Schneier, ISBN: 0471117099

This book is extremely complete. It briefly covers the history of cryptography. It describes the political implications of cryptography and finally it shows how cryptography can be used in applications and presents the different cryptographic algorithms.

The algorithm section starts with a number theory primer.Honestly, I have found it a little bit too thin to learn all the needed background to fully understand the algorithms but on the other side, you cannot expect a simple 600 pages book to provide that background in the latest mathematical research number theories. It has at least the merit that it did stimulate my curiosity about number theory when I have read the first edition of this book.

Another point that makes this book interesting is that at the end of each chapter presenting the various algorithms in a given category, you will get Bruce Schneier opinion on which algorithm is the best. Of course, this type of information usually become outdated real fast but it is interesting to follow his thought process and test his predictions as the book grow older.

So, if you are looking for your first cryptography book, it should be this one.

06/20/07

Permalink 09:39:22 pm, by lano1106, 202 words, 2191 views   English (CA)
Categories: Software security, Software security

Hunting Security Bugs

Hunting Security Bugs, Tom Gallagher, Lawrence Landauer, Bryan Jeffries, ISBN: 073562187X

Beside Bruce Schneier books, this is the second software security book that I am reading. The first being Building Secure Software: How to Avoid Security Problems the Right Way and I have prefered this one because it provides more concrete examples. The book consists of over 20 chapters covering different security areas. As a software developer, some chapters appeared less relevent and less interesting to me and I guess that it is because these chapters are geared principally toward testers.

However, at least 2 chapters should be extremely interesting and valuable to developers like myself. It is the chapters that demonstrate with step by step tutorials how a hacker would do to exploit buffer overflow and format string problems. I was already familiar with buffer overflows and I had read a similar chapter about them in Building Secure Software: How to Avoid Security Problems the Right Way but the format string exploits were new to me.

As expected since the book is published by Microsoft Press, the book has a strong bias torward Microsoft products (ie.: .NET and ActiveX controls security) but the presented topics are general enough to make this book very valuable even for users of other OSes and/or development tools.

Permalink 09:32:47 pm, by lano1106, 59 words, 1667 views   English (CA)
Categories: Software security

Building Secure Software: How to Avoid Security Problems the Right Way

Building Secure Software: How to Avoid Security Problems the Right Way, John Viega, Gary McGraw, ISBN: 020172152X

It is a good book but with the exception of the chapter on buffer overflows, my perception of the book is that it focus mainly on the theory of software security. As someone who has an engineer formation, I have a preference for books more pratical with more concrete examples. For this reason, I did prefer Hunting Security Bugs.

06/19/07

Permalink 09:33:15 pm, by lano1106, 240 words, 5108 views   English (CA)
Categories: C++

switch/case peculiarity: Place the default clause at the end of the switch block to avoid interpretation ambiguity

Consider the following program:

#include <stdio.h>

void f(int i)
{
    switch(i)
    {
    case 1: printf("case 1\n");   break;
    default: printf("default\n"); break;
    case 2: printf("case 2\n");   break;
    }
}

int main(int argc, char *argv[])
{
    f(2);
    return 0;
}

What will be the output?
Intuitively because the cases might be evaluated in the order that they are declared to make 'fall through' possible from one case to the next one by omitting the break statement, the default case might be executed when i value is 2. I have checked my C++ reference book and my C reference book. The C++ one is silent one this issue but I have found this statement from 'The C programming language' book on page 58:

The case labeled default is executed if none of the other cases are satisfied....Cases and the default clause can occur in any order.

I still had doubt so I have compiled the sample program with Microsoft Visual C++.NET 2003 and with gcc version 3.4.4. Both compilers are compliant with what is specified in 'The C programming language' book and the case 2 is executed. Could it be possible that a compiler with a naive implementation create code that behaves as I intuitively reasoned? Maybe so for staying on the safe side and to make the code unambiguous for the maintainers, a good guideline is to always place the default clause at the end of the switch block.

06/18/07

Permalink 09:15:15 pm, by lano1106, 93 words, 2450 views   English (CA)
Categories: Windows programming, Windows programming, TCP/IP, TCP/IP

Winsock 2.0

Winsock 2.0, Lewis Napper, ISBN: 0764580493

Windows sockets are not like BSD sockets. The book explains very well the different specific modes into which winsock can be used: Blocking mode in a dedicated thread, asynchronous mode using Windows messages and Overlapped I/O that removes some memory copying when passing buffer to send/receive data from/to sockets. It also covers the Socket classes provided with MFC. In my opinion, this book covers very well the details specific to Windows version of the socket API and that will allow the readers to take advantage of this socket API version.

06/17/07

Permalink 12:53:05 pm, by lano1106, 169 words, 2247 views   English (CA)
Categories: Windows programming, Windows programming

Inside ATL

Inside Atl, George Shepherd, Brad King, ISBN: 1572318589

ATL is an interesting C++ framework to easily create COM classes. It uses extensively the C++ templates and is coupled with Visual C++ wizards to automate the writing of skeleton code of an ATL project. However there is not much documentation coming with VC++ on ATL and there are so much options in the wizards dialog windows that unless you know what you are doing, you will probably not do the right thing. This is where this book comes in.

First, one of the coauthor, George Shepherd, is also the coauthor of the book MFC Internals that I really liked. This book does a good job to guide you through the main ATL features. My only complain is that, like almost every other book on COM that I have read, it assumes that you know nothing about C++ and COM and takes the first 2 chapters to introduce you these topics and that represents almost 100 pages of prerequisite material that should have been found only in a introduction book IMO.

Permalink 11:57:14 am, by lano1106, 82 words, 2228 views   English (CA)
Categories: Windows programming, Windows programming

Effective COM: 50 ways to improve your COM and MTS based applications

Effective COM: 50 Ways to Improve Your COM and MTS-based Applications, Keith Brown, Tim Ewald, Chris Sells, Don Box, ISBN: 0201379686

This book borrow the format that made the Effective C++ popular. It presents 50 tips on COM. Its targeted audience is developers that have been using COM for a while. Prior knowledge of COM is expected for reading this book. In general, it provides very good tips but the only exception is the section about MTS. Maybe the tips are good but I do not know as I have never worked with MTS. That section contains 8 tips of the 50 tips of the book.

06/16/07

Permalink 11:12:50 am, by lano1106, 190 words, 2446 views   English (CA)
Categories: Windows programming, Windows programming

Understanding ActiveX and OLE

Understanding Activex and Ole, David Chappell, ISBN: 1572312165

Usually, when I read a book on a programming technology, I expect to see some source code somewhere. This book is surprising in that regard because it only contains plain english from the first page to the last. There was a hint on the cover page by indicating that managers are included in the targeted audience. This feature has some merits but is also a pain at some other places.

When presenting software to programmers, the most straight to the point way to present the material, it is with source code and I feel that at some occasions, a function definition would have replaced pages of explanations. On the other hand, it is easy to get lost in pages of source code filled with error condition handling code where a simple paragraph of plain english would have been enough to communicate the general idea behind a software module.

With these remarks in mind, this is why, as a programmer, I did not like the first few chapters describing COM basics and really appreciated the last chapters covering OLE compound documents, ActiveX and the usage of COM by MS Internet Explorer.

06/15/07

Permalink 10:04:02 pm, by lano1106, 66 words, 1655 views   English (CA)
Categories: C++, C++

The Annotated C++ Reference Manual

The Annotated C++ Reference Manual,  Margaret A. Ellis, Bjarne Stroustrup, ISBN: 0201514591

Yes it is outdated as it does not cover the latest features added to the standard. However it does describe in great details the core language and it is still the most detailed book about C++ to my knowledge after the C++ standard document text itself. Even the latest edition of 'The C++ programming language' book does not provide as much details about the language itself.

Permalink 09:55:50 pm, by lano1106, 212 words, 1737 views   English (CA)
Categories: C++, C++

The Design and Evolution of C++

The Design and Evolution of C++, Bjarne Stroustrup, ISBN: 0201543303

I have red this book for the first time 4 years ago. What I remember is that, at that time, I got few interesting informations here and there but overall the reading was more tedious than enjoyable. For some reasons, I have reread this book for a second time and perhaps because I could now relate my C++ programming experience with what the book explains, I have found it much more enjoyable to read this time. So my opinion is that to really get the maximum out of this book, you really need intimate knowledge and experience with the C++ programming language. I would not recommend this book for someone that has just started to use C++. Also, you have to know what the book is about. Do not expect to get practical knowledge to improve your C++ skills because you will not get much. The only exception is that this book made me curious about the "intersection" rule from Andrew Koenig about overloaded functions and made me look into the Annotated C++ reference manual to know more about it. This book is more about the C++ history and how and why certain design decisions have been taken about the language. If this is what you are expecting, you will like the book.

Permalink 09:50:22 pm, by lano1106, 76 words, 1642 views   English (CA)
Categories: Windows programming, Windows programming

Essential COM

Essential COM, Don Box, ISBN: 0201634465

I have learned a lot with this book. I would not qualify the book an introduction book because unless you have some background knowledge and practice, you are going to find the last chapters hard to digest. What the book does is to covers the essential principles of COM with great details. This will make the first reading very interesting and it will make you come back from time to time to seek back specific detail.

Permalink 10:52:51 am, by lano1106, 176 words, 2202 views   English (CA)
Categories: TCP/IP, TCP/IP

Internetworking with TCP/IP volume 3

Internetworking with TCP/IP Vol. III Client-Server Programming and Applications-Windows Sockets Version, Douglas E. Comer, David L. Stevens, ISBN: 0138487146

I want to set the expectations straight. This is not the best Winsock programming book. This book address higher level issues with network programming and it does a very good job at it. It is going to presents the different options for writing a server such as concurrent vs iterative or single thread vs multithread and explains carefully the tradeoff of each option. In my opinion that is the strength and the originality of the book. Another favorite part of the book is the presentation of the complete implementation of a telnet client where the author leads you through all the design and implementation process by explaining you the reasoning behind each decision.

What I did not like about the book is that like the volume 1, too many topics are covered so in many chapters the author barely touch the topic without going in depth into it and I am questioning the value of these chapters as reference.

This is the Windows version but there is also a Linux/Posix Sockets and a BSD sockets versions.

Permalink 10:44:16 am, by lano1106, 129 words, 2421 views   English (CA)
Categories: TCP/IP, TCP/IP

Internetworking with TCP/IP volume 2

This book goes in depth in how TCP/IP works by showing an actual working TCP/IP stack ANSI C code source. I am a believer that in order to fully understand and effectively use a piece of software, the best way to achieve this goal is to actually study at least once its source code. You will certainly get many insights in how TCP/IP works by reading this book. Unfortunately, for most readers, this will remain a theoretical exercise. I got the opportunity to work with the source code of an embedded TCP/IP stack when I was working at Nortel Networks and actually found a bug with the help of this book. That was at that moment that I truly realized the value of this volume.

Permalink 10:33:02 am, by lano1106, 140 words, 1634 views   English (CA)
Categories: TCP/IP, TCP/IP

Internetworking with TCP/IP volume 1

Internetworking with TCP/IP, Vol 1 (5th Edition), Douglas E Comer, ISBN: 0131876716

This book describe the TCP/IP family protocols. Of course, there is so much to say that in the limited space that a book can offer that I would say that the book presents only a quick overview of the protocols. Fortunately, at the end of each chapter, there are pointers on the relevant RFCs for the discussed topic in that chapter. My next statement is an impression and not a proven fact but by having read the first edition a long time ago, I have the impression that some details have been removed in this edition in favor of a better coverage of more new protocols. That being said, the information contained in the book is extremely accurate and the book is very useful when analyzing the output of a packet sniffer such as WireShark (previously known as Ethereal).

Permalink 10:27:25 am, by lano1106, 43 words, 1630 views   English (CA)
Categories: Windows programming, Windows programming

Inside COM

Inside Com, Dale Rogerson, ISBN: 1572313498

This book is probably the best COM introduction book for C++ programmers. It walks you through the basics such as the IUnknown and the IDispatch interfaces, the different types of COM servers and the threading models. Everything is explained in clear writing style.

06/14/07

Permalink 12:42:32 pm, by lano1106, 68 words, 2597 views   English (CA)
Categories: TCP/IP

ACE framework reference books

The ACE Programmer's Guide: Practical Design Patterns for Network and Systems Programming, Stephen D. Huston, James CE Johnson, Umar Syyid, ISBN: 0201699710C++ Network Programming, Vol. 1: Mastering Complexity with ACE and Patterns, Douglas C. Schmidt, Stephen D. Huston, ISBN: 0201604647C++ Network Programming, Volume 2: Systematic Reuse with ACE and Frameworks, Douglas C. Schmidt, Stephen D. Huston, ISBN: 0201795256

I am a big fan of the ACE framework. ACE is an open source C++ framework to develop networked applications and offers a free CORBA implementation. Once you have mastered the TCP/IP protocols and are ready to develop networked applications, this framework makes the development a breeze. However, due to its intimidating size you are much better to learn how to use this framework through these books.

06/13/07

Permalink 11:42:39 am, by lano1106, 61 words, 2139 views   English (CA)
Categories: Windows programming, Windows programming

ADO : Activex Data Objects

ADO : ActiveX Data Objects, Jason T. Roff, ISBN: 1565924150

I have also read Programming ADO from David Sceppa and I prefer this one because it contains a lot examples with source code. My only complain is that there is only a small C++ program and the rest are all in Visual Basic. However, this is not a big issue as it is very easy to port the samples in C++.

Permalink 11:38:23 am, by lano1106, 24 words, 1552 views   English (CA)
Categories: Windows programming

Programming ADO

Programming ADO, David Sceppa, ISBN: 0735607648

This book is fine but I have prefered the book ADO: ActiveX Data Objects by Jason T. Roff for its numerous source code samples.

06/12/07

Permalink 11:46:09 am, by lano1106, 54 words, 2886 views   English (CA)
Categories: Compiler, Compiler

Lex & Yacc

lex & yacc, Doug Brown, John Levine, Tony Mason, ISBN: 1565920007

I like this book because it is a good compromise between lex & yacc man pages and the theory found in books such as the Dragon book. You will get valuable information about the how and why of the tools that will help you to produce a quality grammar without being overwhelmed by details.

Permalink 11:43:12 am, by lano1106, 63 words, 2661 views   English (CA)
Categories: Compiler, Compiler

Compilers: Principles, Techniques and Tools

Compilers: Principles, Techniques, and Tools, Alfred V. Aho, Ravi Sethi, Jeffrey D. Ullman, ISBN: 0201100886

This is the classical reference book for compiler design. This is not an easy text because of its heavy use of mathematical notation and the algorithms are presented only in pseudo code but you will not find a more complete collection of compiler related algorithms than in this book.

There is a new edition that I have not had the chance to review.

Permalink 11:36:05 am, by lano1106, 142 words, 1467 views   English (CA)
Categories: Book reviews, Recommended books

Fundamentals of Neural Networks

Fundamentals of Neural Networks, Laurene V. Fausett, 0133341860

This is the book I used in my AI class. I have found it very well written and interesting to read and go through the very first neural networks models such as the Hebb net, the perceptron and the Adaline. Then the book continues by presenting simple neural network applications like pattern association.

I remember that our professor did ask the class to do one of the proposed projects in the pattern association chapter which consisted of implementing a small OCR with a neural network and this exercise did really help to better assimilate the principles. Finally, the following chapters present other types of neural networks such as those based on competition and the very important backpropagation neural network.

The only thing that you can complain about is its high price tag. For anyone interested in the AI field, it is recommended.

06/11/07

Permalink 10:25:39 pm, by lano1106, 296 words, 2144 views   English (CA)
Categories: Code Optimization, Code Optimization, C++, C++

Efficient C++: Performance Programming Techniques

Efficient C++: Performance Programming Techniques, Dov Bulka, David Mayhew, ISBN: 0201379503

The book title suggested to me that the book would follow the Effective C++ series format where advices are given in small items. This is not the case. This book has a more conservative format where topics are presented in chapters. This is not a problem per se but I just wanted to say it to potential readers that could have the same impression that I had by seeing the title. That being said, the topics covered are the usual areas where you can usually gain some performance such as temporaries, memory allocation and inlines. I cannot say that I have learned a lot of things because writing performant C++ code has been a topic of interest to me for a very long time.

The chapter about inlines is mixed bag of very good information and useless information. What I did appreciate less is that several pages are dedicated for describing what could be possible to do with inlines if very smart compilers were available. It was interesting to read but nothing applicable immediatly. Maybe this section is a wish list intended to be read by compiler implementers. However at the same time, it is the chapter that gave me the most new tricks that I did not already knew. This is the book that presents how to efficiently use inlines in the best way that I have seen in books.

Finally, if I abstract the fact that I did not learn a lot of new things, I must say that it is very well written. It is interesting to read. The authors give reference to actual cases from their work experience and this book would probably be very beneficial to read for someone that has never yet spent a lot of time doing code optimization.

Permalink 10:16:09 pm, by lano1106, 116 words, 1553 views   English (CA)
Categories: C++, C++

C++ Programming Style

C++ Programming Style, Tom Cargill, ISBN: 0201563657

I have read tons of C++ programming books. A lot of them lack of originality. This is where Tom Cargill book shines. The author of this book first presents a small C++ program listing for each chapter and then ask the readers to take few minutes to try to identify the errors or the aspects that could be improved. It is really instructive to find out all the things you have not identified yourself and this is what makes this format so interesting. Some people says that this book is for novice programmers but I disagree. To my opinion, almost all experienced programmers will miss at least half of the problems present in the sample programs.

Permalink 10:10:42 pm, by lano1106, 139 words, 1554 views   English (CA)
Categories: C++, C++

Design Patterns

Design Patterns: Elements of Reusable Object-Oriented Software, Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides, ISBN: 0201633612

10 years ago this book revolutionize the way programmers see object oriented programming. At that time, it was essential to read it. In fact, I remember that employers were testing candidate knowledge on design patterns at job interviews. Today, I consider this book as a classic that I would recommand to read for everyone that has just learned object oriented programming but it is less essential than it used to be as design patterns knowledge has spread in the litterature and you could even learn about them just by working on existing code. That being said, this book is still very valuable even for people that already know about patterns. I am on my second reading after many years of using the design patterns and I am picking up new insights that has escaped my attention at the first reading.

Permalink 10:05:24 pm, by lano1106, 139 words, 1587 views   English (CA)
Categories: C++, C++

Effective STL

Effective STL: 50 Specific Ways to Improve Your Use of the Standard Template Library, Scott Meyers, ISBN: 0201749629

Following in the tradition of his prior books, Meyers delivers another gem with Effective STL. This one is a must have for your software development bookshelf. The only detail that annoys me a little bit is the amount of cross references between the items. The author first 2 books were a little bit like that but it seems to me that this one is too much. I would have preferred to have items more self contained. If you want to read a particular item, this one will refer to 2 other items that will refer to some more items and so on to the point where if you would like to close the open loop, you would need to consult almost all the items.

Except for this small annoyance, this book is very good. You should read it or have it.

Permalink 09:52:17 pm, by lano1106, 209 words, 1527 views   English (CA)
Categories: C++, C++

The C++ Standard Library

The C++ Standard Library: A Tutorial and Reference, Nicolai M. Josuttis, ISBN: 0201379260

It is a tutorial and a complete reference at the same time. I already knew very well STL when I have read this book but reading this book has been very enjoyable because I really appreciated its format. The tutorial and reference part are not clearly separated in 2. I hate books where you never read the reference part because it is as fun to read than reading a phone book.

Of course, the first part is strictly tutorial where it introduce STL, its basic principles and a quick overview of all the services provided by the library to the reader. Then lengthy chapters follow to cover containers and algorithms. This is where the book shines. It covers one by one each container and each algorithm and to support their description, a small sample program follows.

Before this book, there were some algorithms that I could not figure out exactly what was their purpose or how to use them correctly just from their description in the STL man pages. By reading the samples source code of this book, I had many 'AhAh' moments where finally I could understand some algorithms less frequently used. For all there reasons, I am very happy with my decision to get hold of this book.

Permalink 09:47:25 pm, by lano1106, 86 words, 1576 views   English (CA)
Categories: C++, C++

More Effective C++

More Effective C++: 35 New Ways to Improve Your Programs and Designs, Scott Meyers, ISBN: 020163371X

Like every sequel, in my opinion, this book is less good than the original as if the topics covered in this book are the ones that did not make it into the original book. However that being said, this book is still very good and is just more of the same good stuff that made the original book a bestseller. If you liked Effective C++, there is not risk at all that you will not like this one and will get new knowledge out of it.

Permalink 09:42:40 pm, by lano1106, 70 words, 1514 views   English (CA)
Categories: C++, C++

Effective C++

Effective C++: 55 Specific Ways to Improve Your Programs and Designs (3rd Edition), Scott Meyers, ISBN: 0321334876

This book is a classic. The 55 advises can certainly be found in other books but the strength of this book is in how the author walks you through intelligent explanations on why it is wise to follow the advise. Beside, the writing style of the author makes the reading of this book as enjoyable as reading a good novel.

This is highly recommended as you will learn while having fun.

Permalink 09:35:31 pm, by lano1106, 211 words, 1572 views   English (CA)
Categories: C++, C++

C++ Templates

C++ Templates: The Complete Guide, David Vandevoorde, Nicolai M. Josuttis, ISBN: 0201734842

Before this book, most C++ textbook were at most devoting one chapter on templates which clearly is not enough to cover a topic as complex as the C++ templates. The C++ Templates book is filling this void nicely and one of the coauthor of the book is the author of my favorite STL book 'The C++ Standard Library'. The book has 4 parts: The basics, templates in depth, templates and design and finally advanced applications. Personally, I found the 2 last parts good but less interesting because I think that other books such as Modern C++ Design do a better job to cover templates applications.

Where this book really shines is the first part that covers the C++ templates syntax very well. With a capricious syntax like the templates one, a good reference is essential. One example that come to my mind is when I was trying to declare a friend template function from a class template. That sounds like a simple thing to do but it is not. The syntax rules for this declaration are, to my opinion, far to be intuitive and hard to find in regular textbooks. With the help of this book I have finally been able to fix my friend template function declaration and make my compiler happy.

Permalink 09:27:57 pm, by lano1106, 202 words, 2507 views   English (CA)
Categories: C++, C++

The C++ Programming Language

The C++ Programming Language (Special 3rd Edition), Bjarne Stroustrup, ISBN: 0201700735

This book is both a text book for learning C++ and a reference book to consult whenever tricky C++ interogations arise. I would qualify the writting style as academic and very dense in details. It has the merit to be very accurate and to cover almost every aspects of the programming language but in the same time, it is the very same reason why not a lot of people that I know went through the book from one cover to the other. This book is for serious reading and is not a fun easy reading before going to sleep. The writting style might intimidate people that have never had experience for C++. For that reason, I would recommand newbies to look elsewhere for a first book to be introduced to C++ Accelerated C++: Practical Programming by Example from Andrew Koenig would be a good suggestion. However, for any intermediate to expert programmers, this book is a must. To me, reading this book after few years of C++ usage helped me to fully integrate all the details of the concepts that I was already using on a daily basis and this had the effect of bringing my C++ understanding to a new level.

06/09/07

Permalink 02:20:25 pm, by lano1106, 306 words, 1794 views   English (CA)
Categories: C++, C++

Modern C++ design

Modern C++ Design: Generic Programming and Design Patterns Applied, Andrei Alexandrescu, ISBN: 0201704315

I read a lot of programming books (maybe too much sometimes... :-) and I think that I am getting very hard to impress but I must confess that this book is very special. It is one of the rare book that did really open my eyes on new possibilities for programming. What the author is doing with templates are things that I have never imagined possible.

The basic concepts presented in this book are policy based class design mixed with some template metaprogramming tricks. The rest of the book consist of revisiting classic design patterns such as smart pointers, singletons and factories by implementing them by using policies and template metaprogramming. The result is, to my opinion, impressive. Implementing these classes may at some point add some complexity but customizing the end result classes is incredibly easy, flexible and requires minimal changes.

Some people did not like the book by arguing that they were not sure if they would be using the patterns presented in the book. I agree with their position and I am not sure that I would find a usage for all the patterns presented in the book or if I would just not want them in my code by fear of the added complexity but in my opinion this is not a good criteria to judge the book. It is not important to know if you are going to use the presented patterns or not. What reading this book will do for sure is to widening the horizon of what you know possible with C++ templates and bring new ideas on how some programming problems can be solved. How many C++ books can do that? For myself, they can be counted with one hand. If you retain the general concepts, it is not important to know if you will use the details.

Permalink 01:04:19 pm, by lano1106, 19 words, 2607 views   English (CA)
Categories: Fractal, Fractal

Chaos

Chaos: Making a New Science, James Gleick, ISBN: 0140092501

If you want to know more about strange attractors and the Feigenbaum diagram, this is the book for you.

Permalink 12:17:57 pm, by lano1106, 92 words, 2528 views   English (CA)
Categories: Fractal, Fractal

Clifford A. Pickover books

Computers, Pattern, Chaos and Beauty: Graphics from an Unseen World, Clifford A. Pickover, ISBN: 031206179XThe Pattern Book: Fractals, Art, and Nature, Clifford A. Pickover, ISBN: 981021426X

These are the books I used to learn how to create the fractal images I show in this website. I highly recommend these books as the author writing style is superb. You can read these books almost as if they were novels. In fact, if you read these books, you might even start to be a Clifford A. Pickover fan as I did! This author has written an amazing number books. One can wonder how he finds so much inspiration. You should check the list of books written by Clifford A. Pickover!

Permalink 11:51:07 am, by lano1106, 226 words, 3431 views   English (CA)
Categories: Code Optimization

Michael Abrash's Graphics programming Black book

Michael Abrash's Graphics Programming Black Book (Special Edition), Michael Abrash, ISBN: 1576101746

This book is a monster brick of over 1300 pages with 70 chapters! Do not be misled by the book title because the 22 first chapters, which represents about the third of the 1300 pages, discuss assembly optimization. This book is getting a little bit old and a little bit outdated. For instance, this author covers optimization techniques for processors ranging from the 8088 to the Pentium and the Inner loops book covers the 486 to the Pentium Pro.

The second part covers low level graphics programming in assembly. The type of graphics programming that people were doing before Windows and DirectX.

Because assembly programming is not very popular anymore, for most people, it is not a good book to get but if assembly optimization is your thing, then you should consider this one as even if there are more recent books on x86 assembly programming, this one is the best that I have seen to lay out the basic concepts such as branch prediction, register contention, how to shuffle assembly instructions to optimize the processor pipelines usage and how to optimize the flag register usage. Armed with this knowledge in the back of your head, even when you write C or C++, you will be able to subtly change the way you formulate if/else blocks and for/while loops that will enhance your program performance without affecting the code readability.

06/05/07

Permalink 09:24:47 pm, by lano1106, 415 words, 2599 views   English (CA)
Categories: Code Optimization

Inner Loops: A sourcebook for fast 32-bit software development

Inner Loops: A Sourcebook for Fast 32-bit Software Development, Rick Booth, ISBN: 0201479605

It has historical value more than anything else...

This book is divided in 2. The first part describes the theory of assembler optimization for processors from the 486 to the Pentium Pro. 10 years ago, this information was useful but now it is pretty much deprecated as I highly doubt that Pentium optimization techniques do anything good on Athlons or Pentium IV processors. The only chapter that still contains applicable information today is the one providing general advices on optimization such as loop unrolling.

Then the second part named 'Practice' provides concrete examples of assembly optimizations for various problems such as sorting, list and tree traversals. I do not like this section neither because I feel that the presented assembly procedures are thrown at you in the face without showing you the process that the author used to derive them from the original C code. Michael Abrash's Graphics Programming Black Book does a much better job in that area by presenting you 5 versions or more of the same procedure starting from the C version that gets optimized further at each iteration. Also, someone might expect to be able to get the source from the CD-ROM coming with the book and start directly using it. Alas, it is not possible because what the presented code is sorting or searching in binary trees are integers that are directly manipulated in the registers (that is part of the presented optimizations) which has not much reuse value in a world of STL containers holding usually much more complex objects or structures than plain integers. The only value that these examples might have is that they might give you some ideas on where assembly optimization might be applied.

A much better book to learn the process of optimizing in assembly is Michael Abrash's Graphics Programming Black Book because it walks you through the optimization process step by step with more than 5 versions of the same procedure that is getting more optimized at each iteration. You will learn how to do it yourself with this book even if it suffers of the same weakness than this book. That is: it presents optimization techniques from the 8088 (that is very very old up!!!) to the Pentium Pro. Another benefit from Abrash book is that, in my opinion, there is a greater chance that you might find its code reusable.

Finally, a very good optimization book that covers optimization techniques for recent processors such as the Athlon and the Pentium IV is: Code Optimization: Effective Memory Usage.

06/02/07

Permalink 08:00:39 pm, by lano1106, 127 words, 3158 views   English (CA)
Categories: Code Optimization, Code Optimization

Code Optimization: Effective Memory Usage

Code Optimization: Effective Memory Usage, Kris Kaspersky, ISBN: 1931769249

This book has been a revelation to me. Prior to read this book, all I knew was that memory access was expensive. This book will teach you how to organize your data in memory and how to access it to improve your program performance and most of the time without having to use assembly programming. It covers x86 memory organization and the interface between the processor and the memory and there is a whole chapter covering x86 processor cache memory. To me, the most shocking information contained in this book is a C implementation of memcpy() that outbeats VC++ implementation by 25%-30%!!!

This book is not for novices but if you are ready to change your perception forever of the x86 programming, this book is highly recommended!

Permalink 03:08:07 pm, by lano1106, 48 words, 1954 views   English (CA)
Categories: Windows programming, Windows programming

Windows++

Windows ++: Writing Reusable Windows Code in C++, Paul Dilascia, ISBN: 020160891X

This is a very old book dating from Windows 3.1 era. It walks you through the methodology one could take to encapsulate the Windows API in a C++ framework. Most of the information contained in the book is still accurate today except for one chapter related to memory management.

Permalink 02:54:09 pm, by lano1106, 64 words, 1988 views   English (CA)
Categories: Windows programming, Windows programming

Windows 2000 Graphics API Black Book

Windows 2000 Graphics API Black Book,  Damon Chandler, ISBN: 1576108767

This book covers in details the GDI API and the DirectDraw API. Even if it was written for Windows 2000, it is safe to assume that these APIs have not changed much in Windows XP. The source code samples contain mistakes but it remains an excellent reference. I recommend this out of print book because you can probably get it for a very cheap price.

Permalink 02:45:18 pm, by lano1106, 129 words, 2517 views   English (CA)
Categories: Windows programming, Windows programming, Multithreading, Multithreading

Multithreading Applications in Win32: The Complete Guide to Threads

Multithreading Applications in Win32: The Complete Guide to Threads, Jim Beveridge, Robert Wiener, ISBN: 0201442345

It does a very good job at describing the Win32 API for multithreading but the applications of multithreading assumed is strictly I/O related (Networking, printing, writing/reading files). The set of techniques for parallel processing on the same data is completely absent such as data organization in memory to optimize its parallel access. This is probably due to the age of the book as when it has been written, single core processor system was the norm. Parallel processing will become very important with the growing popularity of the multi core systems. Despite this weakness, this book is still my best recommendation for learning multithreaded programming on Windows since, to my knowledge, there is not yet any book tackling the subject of parallel processing on a Windows/x86 platform.

Permalink 02:39:17 pm, by lano1106, 255 words, 2278 views   English (CA)
Categories: Windows programming, Windows programming

MFC Internals

MFC Internals: Inside the Microsoft(c) Foundation Class Architecture, George Shepherd, Scot Wingo, ISBN: 0201407213

The difference between this book and Programming Windows with MFC is that while the latter provides a complete reference on how to use MFC, it does not cover much what is going inside MFC. You might ask why should care about how MFC works? If you remember the first time you used MFC, you might remember your astonishment about how quick you could have a working decent application in five minutes just by using the MFC wizard but after that joyful moment, you spent frustrating weeks to figure out how to do add this special feature to your program. Lets face it, the documentation coming with MFC does not tell everything you have to know to fully unleash the power of MFC. The only way to truly understand MFC is to dig in the code (For Star Wars fans, Obi-Wan would say "Use the source, Luke") and this is precisely why Microsoft is providing the MFC source code. MFC source code is huge and might be intimidating at first. This is why having a book to help you in the first steps of your exploration is an excellent idea. Consider having this book as a companion for Programming Windows for MFC. However, this book is not for novices. Only buy it, if you consider yourself good with programming MFC.

If you buy it, very interesting discoveries await you! You can see by yourself by looking my MFC tutorials on my website what the knowledge contained in this book has allowed me to do with MFC.

Permalink 02:32:21 pm, by lano1106, 170 words, 1517 views   English (CA)
Categories: Windows programming, Windows programming

Programming Windows

Programming Windows, Fifth Edition, Charles Petzold, ISBN: 157231995X

This book is considered as the windows programming bible by many. Sure, you can build applications without all this knowledge with frameworks such as MFC but if you are looking to build a Windows program that do exactly what you want, there is no workaround a deep Win32 API knowledge. This book is a must for all Windows programmers bookshelf.

Something you need to know before purchasing this book is that it is very unlikely that the author will update this gem one more time as Microsoft is slowly phasing out the Win32 API in favor of the .NET framework and this will be even more real when Vista comes out. However, since there is a huge codebase of existing Win32 programs, the Win32 API will certainly stay around for a long long time. This book is simply the best for learning Win32 programming. I still refer to it very frequently. If you are looking for a reference book on Win32 API, this is the one you were looking for.

Permalink 02:27:37 pm, by lano1106, 66 words, 3096 views   English (CA)
Categories: Compiler, Compiler

Compiler Design in C

Compiler Design in C, Allen I. Holub, ISBN: 0131550454

This book is more accessible than the Dragon book but is less complete. This book presents complete source code for parser generators tools and a C compiler. Even if this book is getting a little bit old and it targets a DOS platform, it should not stop you from acquiring this goldmine of very useful information for anyone interested in compilers for a very reasonable price.

Permalink 01:11:19 pm, by lano1106, 44 words, 1628 views   English (CA)
Categories: Windows programming, Windows programming

Windows Graphics Programming: Win32 GDI and DirectDraw

Windows Graphics Programming: Win32 GDI and DirectDraw, Feng Yuan, ISBN: 0130869856

This is the most detailed book that I know about GDI programming. If you have the courage to go through this brick (it is about the same size than Programming Windows and Programming Windows With MFC), your understanding of GDI will be greatly improved.

Permalink 12:11:03 pm, by lano1106, 100 words, 2250 views   English (CA)
Categories: Rare out of print, Windows programming, Windows programming

Undocumented Windows NT

Undocumented Windows NT, Prasad Dabak, Sandeep Phadke, Milind Borate, ISBN: 0764545698

I have loved this book. It is much more easier to read than the more detailed book Windows Internals but still give you a good overall understanding on how Windows works. After having read this book, the cryptic access violation error messages suddenly made more sense. The most enlightning chapters of the book are the ones discussing how the OS manages the process memory space and how a process is launched. Do not get fooled thinking that because the book is on NT that its information is outdated. Not much has changed since and its content is still accuratly accurate.

Permalink 12:04:31 pm, by lano1106, 31 words, 2037 views   English (CA)
Categories: Rare out of print

Programming Applications for Microsoft Windows

Programming Applications for Windows, Jeffrey Richter, ISBN: 1572319968

To be honest, I have never had the chance to get my hand on this book because of his high price. It his on my wish list and has good reviews.

Permalink 11:55:17 am, by lano1106, 56 words, 2012 views   English (CA)
Categories: Rare out of print, Windows programming, Windows programming

Programming Windows With MFC

Programming Windows with MFC, Jeff Prosise, ISBN: 1572316950

This book is to MFC what Programming for Windows is for the Win32 API. I would call it the MFC bible. There is a lot of MFC books out there but Programming Windows with MFC is one of the best. If you are serious about MFC, you should consider adding this one to your references collection.

Olivier Langlois's blog

I want you to find in this blog informations about C++ programming that I had a hard time to find in the first place on the web.

June 2007
Sun Mon Tue Wed Thu Fri Sat
 << < Current> >>
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30

Search

Custom Search

Misc

XML Feeds

What is RSS?

Who's Online?

  • Guest Users: 6

powered by
b2evolution