CUDA by Example

With single processor speeds having hit a wall, there is a lot of interest in heterogeneous computing today. One of the popular ways to speed up applications is to rewrite them as massively parallel applications that execute on the NVIDIA CUDA architecture. It is quite hard to think of parallel solutions to existing problems and writing CUDA programs can be a minefield. These factors have made learning to swim in the choppy waters of CUDA difficult for beginners. Despite an abundance of CUDA information on the web, there has been no introductory material that is both simple and of good quality. The new book CUDA by Example: An Introduction to General-Purpose GPU Programming written by Jason Sanders and Edward Kandrot (both NVIDIA employees) aims to be such an introductory book for CUDA programming.

The only prerequisite expected of this book’s reader is knowledge of C. Spread over 12 quick chapters, the book uses example CUDA C programs all through to introduce concepts and explain their usage. Every example program is thoroughly broken down and the authors explain every stage of the process. It is quite heartening to see this detailed hand-holding extend all the way through to the complex concepts and last chapters. Chapters 1-5 are essential reading and the reader should be able to write simple CUDA programs after this point. The rest of the chapters acquaint concepts which are useful to further optimize the CUDA solution to take advantage of the problem domain or the CUDA architecture or both.

The book is strictly introductory, thankfully, and does not explain the CUDA architecture and its inner workings. I cannot commend the authors enough for taking this hard-line and making the jump into CUDA as simple and painless as they have done here. It would be natural to read the CUDA Programming Guide after this and keep it around as a reference for CUDA programming. This book is perfect for any inquisitive programmer wanting a taste of CUDA to see if it is worth his time. The avid reader can finish this book, having worked the examples and understood the major concepts, easily over a weekend.

Example code and errata of the book can be found here.

Silas Marner

These busy times have made it very hard for me to find the time and motivation to re-read a good book from the past. I somehow managed to pick up Silas Marner by George Eliot this weekend. From the very opening line of the book rolled in vivid memories from middle school! 🙂 Our young and energetic new English teacher had chosen this book as our non-detailed textbook for the English class. If Alice in Wonderland was the first real book-length book I enjoyed, Silas Marner was the first prescribed book that captured my imagination. A good teacher can make any subject interesting, and our new teacher surely fit that bill. Was it those rapturous noon readings in class by a fantastic teacher or the biblical tale of a lonely forsaken creature, I cannot tell which. Silas ended up becoming a character so graphic and real that, even in middle school, I really thought I could feel his pain.

At its heart, Silas Marner is the story of redemption. Silas is a weaver who is cheated out of his wife and life by a close friend. Losing all interest in social ties, he settles down on the fringe of a hamlet called Raveloe. He focuses only on weaving and with his miserly ways soon collects a large amount of gold. Bereft of human contact, the gold becomes his life. He is completely shattered when his gold is stolen one night. Seeking the help of the villagers to find the thief, Silas slowly warms up to them. Soon after, a dying woman leaves a golden haired baby at his hearth. It is this gurgling baby that brings closure to Silas’s life. He soon loves her more than his previous gold and dedicates his life to bringing her up. The cute baby becomes the cord that binds Silas and the villagers.

Except for a few middle chapters which are quite prolix, Silas Marner is solid English prose and it is no surprise that it is a classic of English literature. It is a short, tight read, unlike the verbosity of Charles Dickens, who was also writing at the time of this book. While the secondary characters are used skillfully to complete the story, the book solely rests on the bent back of the lonely weaver. The murky image of Silas plodding slowly through misty late evening light on a lonely road is sure to haunt any reader for life! His story becomes our story and his pain ours. I found it hard not to empathize with his predicaments and the book has the power to leave one somber long after the last page has been turned.

As I learned from a recent In Our Time episode on this book, George Eliot is the male pen-name of Mary Anne Stevens. One of her other books that I hope to read sometime is Mill on the Floss. I read Silas Marner this time from an Everyman edition, edited by Anne Smith. The book has a good introduction to George Eliot, her life and times and the setting of Raveloe and its villagers. Special mention goes out to the beautiful cover of this edition, from a painting called The Cottage Home by William Snape, which I found to fit the story well. The yellowed pages of Silas Marner gave me a melancholic Sunday afternoon and I hope I can do it again in a few years.


A few memorable excerpts from the book:

The beautiful opening quote …

“A child, more than all other gifts
That earth can offer to declining man,
Brings hope with it, and forward-looking thoughts.”
— Wordsworth

The villagers did not trust Silas because they believed he had secret powers …

[…] the rude mind with difficulty associates the ideas of power and benignity.

A shadowy conception of power that by much persuasion can be induced to refrain from inflicting harm, is the shape most easily taken by the sense of the Invisible in the minds of men who have always been pressed close by primitive wants, and to whom a life of hard toil has never been illuminated by any enthusiastic religious faith.  To them pain and mishap present a far wider range of possibilities than gladness and enjoyment: their imagination is almost barren of the images that feed desire and hope, but is all overgrown by recollections that are a perpetual pasture to fear.

Silas would have episodes of the fits …

[…] there might be such a thing as a man’s soul being loose from his body, and going out and in, like a bird out of its nest and back.

George Eliot speaks out against religion sometimes in the book. Here is Silas when his friend cheats him …

“[…] there is no just God that governs the earth righteously, but a God of lies, that bears witness against the innocent.”

With his life stolen from him Silas becomes a shell of his former self …

[…] like a rivulet that has sunk far down from the grassy fringe of its old breadth into a little shivering thread, that cuts a groove for itself in the barren sand.

The loneliness of Silas in achingly beautiful words …

[…] as he sat in his loneliness by his dull fire, he leaned his elbows on his knees, and clasped his head with his hands, and moaned very low.

The child shows Silas a whole new life …

As the child’s mind was growing into knowledge, his mind was growing into memory: as her life unfolded, his soul, long stupefied in a cold narrow prison, was unfolding too, and trembling gradually into full consciousness.

The C++ Programming Language

C++ is a Goliath of a programming language and the one essential reference book in every C++ programmer’s quiver is the The C++ Programming Language by Bjarne Stroustrup. This is not a book to read cover-to-cover, which was possible with The C Programming Language by Kernighan and Ritchie.

After many years of C++, to me it is a mess of a language. It has a C past which it cannot and will not shed. It tries to acquire every possible programming paradigm in the worst possible way (procedural, object-oriented, functional and template metaprogramming). And if you follow its development over the years, you quickly realize why design-by-committee is the worst possible way to evolve a language! 😐

Why that rant on C++? Well, all the confusing mess of C++ continues on in the language reference book by its creator. The organization of the chapters is disappointing and Stroustrup rambles quite a bit when not needed. And when clarification is sorely needed, the minutiae are no where to be found. For example, the explicit constructor is useful to prevent unintended implicit conversions. If you look up explicit in the book to see how to use it, you will not know if this qualifier should be specified in the header or source file or in both. Actually, this qualifier is used in the header and not allowed in the source file, but you would not find that information in this reference.

Also, the examples are uninteresting and the book on the whole is uninspiring. However, since the actual C++ standard is so goddamn un-readable by any mortal, this book remains the prime reference to look up anything about the language. (Thankfully, the STL has a much better book by Nicolai M. Josuttis.) Whenever I need any clarification on any C++ language feature, I look up the index of this book and jump from there. Last updated in 2000 for its Special Edition (3rd Edition), this book is badly in need of a re-write due to the C++0X features introduced since then.

The Pencil

After relying on pens for many years, I returned to pencils this year for all writing. I am so loving the minimalism of the pencil that I ended up reading the only book dedicated to this common writing instrument. The Pencil: A History of Design and Circumstance by Henry Petroski is a book that looks at the evolution of human engineering in the last few centuries by using the pencil as an example.

The word pencil comes from peniculus, Latin for brush. That word itself is derived from penis, which as you may not know, is Latin for tail. For many centuries before the invention of the woodcase pencil, the word pencil was used for small brushes used to draw fine lines. Not surprisingly, the name was transferred to the woodcase pencil when it turned out to be perfect for this task.

Much like its erasable nature, the history of the pencil has not been as well recorded compared to that of the pen. A piece of coal or the burnt end of wood that early humans used to write on cave walls could be the earliest progenitor of the pencil. During the Roman period, metal styluses were used to write on wax tablets that were called pugillares. Soon, thin pieces of lead wrapped in paper came to be used to write on hard surfaces like wood or metal. Lead leaves a faint line, so various alloys of lead were tried to obtain a darker line.

Graphite, which is what is used in today’s pencils, was discovered in Cumberland, England in 156x. Shepherds who discovered it used it to mark their sheep and it soon became a replacement to the lead pencil. It was called black lead or wadd and was used by wrapping it in string or encasing it in wood or metal holders. This was both dirty and shaky to write with. Around 166x, Staedler and other wood workers in Germany encased square rods of graphite firmly in wood. The user would whittle the pencil with a pen knife as it wore off. This idea caught on and woodcase pencils started to be produced in England and Germany. The graphite was broken into sheets and then into square rods for the pencils. Good quality graphite was available only from Cumberland, and it produced the best pencils. Conte in France invented a method of mixing low-quality graphite powder and clay, rolling it and then firing them to form quality leads.

Across the pond in USA, family businesses like that of Thoureax (yes, the Thoreaux of Walden) ran family businesses around pencils and graphite (which was used for metalwork too). The principal difficulty was getting the graphite-clay mix right. Every pencil business kept their recipes secret, so new entrants had to keep reinventing the magic formula. Pencils of this time were mostly made from cedar wood. Pencils were sold unpainted until Koh-i-noor started selling theirs in bright yellow colors, which is the most common coloring of today’s pencils. England continued to use pencils of pure graphite until the Cumberland mine was spent. Germany continued to produce the best pencils and the American companied tried to compete on economy. With the industrial revolution, USA took the leap and created the machinery to make pencil production automated. Dixon and Faber were the most popular brands in USA and Europe at this time. While the American companies never ventured out, the European companies entered USA and competed fiercely. Mechanical pencils, plastic pencils and leads made of graphite and polymers were also invented.

The demise of the woodcase pencil has been called many times, but it survives even today. The pencil of today is made from 2 pieces of wood glued together with the lead encased in between. The lead is circular and the pencils are hexagonal, round or triangular.

The Pencil tries to describe the history of human engineering along with that of the instrument. The history, personal stories, engineering, business and branding of the pencil are quite fascinating to read. Henry does a good job of linking this to the changes in the style of engineering and products of engineering through the last few centuries. However, the book feels extremely verbose, and at half of its current 42x pages it could have been a very fulfilling read. Henry Petroski teaches at Duke University and has written a lot of books on the history and engineering of everyday objects. I am extremely curious about these things and so I will be keeping an eye out for his books.

The Visual Display of Quantitative Information

The Visual Display of Quantitative Information is an iconic book on statistical graphics by Edward R. Tufte. The book has been on my reading list for many years now and I read the Second Edition this weekend. This book presents the theory and practice of statistical graphics, the graphs, plots, charts and maps used for depicting information. We live in a time of information overload and this book, first published in the 1980s, is apt today more than ever.

The book is extremely easy to read, there is very little prose and every page is filled with authentic reproductions of graphs from various sources. A good third of the book is used to introduce the reader to the history of graphs and examples of good and bad graphs. The visual depiction of data is merely 200 years old, surprisingly new considering how advanced both mathematics and art were by that time. The pioneers of the field were Lambert and especially Playfair. The latter invented bar charts and other kinds of charts, which he used to beautifully illustrate the economic rise and fall of the British empire. One of the must-see graphs in the book was created by Minard way back in 1869 and depicts the devastating losses in the Russian campaign of 1812 by Napolean. (It can be seen here.) With common examples, Tufte shows how most graphs we see in mass media today, intentionally or not, deceive us by showing wrong statistics. This chapter was an eye-opener since the reader gets a lot of guidance on how to detect such deviations.

The rest of the book is dedicated to the creation of graphs. Thanks to computer software, most graphs today are choked with unnecessary colors, patterns, graphics and text, all of which make the actual data hard to find and understand. Tufte seems to be a minimalist at heart. He radically redesigns some of our common plots into extremely minimal forms. He further formalizes this practice in following chapters by creating terms to quantify the various aspects of a graph. Data-ink refers to the fraction of the total ink used in a graph that refers to the data. Maximizing data-ink leads to graphs where the frivolous elements are discarded and the data shines through. In graphs with lots of data points, the data density becomes crucial. Again, high data density should be the goal, though this can be non-trivial to achieve. Tufte also snubs his nose at artists who add decorations instead of informing.

Tufte is a minimalist who firmly stands behind data and not behind the aesthetics of statistical graphics. In any paper, article or book, both the text and the graphics  try to present information. Rigorous standards of typography, text layout, prose, terseness, and integrity are used for text. Tufte argues for such high standards for the graphics too. A graph provides the writer with a multi-dimensional playground for his data. If he strives to create a good graph, it gives the reader multiple levels of understanding of the underlying data. I found this book to be an illuminating read and I am pretty sure that you will never see a graph the same way after this book. This book is highly recommended for both creators and consumers of information i.e., everyone. 😉

Learning the vi and Vim Editors

There are precisely 3 books available today about the Vim (not vi) editor: Vi Improved by Steve Oualline, Hacking Vim by Kim Schulz and this book, Learning the vi and Vim Editors. The former two deal completely with Vim and I had come away not much impressed with them. I had kept away from this book by O’Reilly since it primarily dealt with vi, which I had no interest in. I was finally motivated to try this book after Steve Losh recommended it in his post Coming Home to Vim.

Learning the vi and Vim Editors is the 7th edition of a long running series from O’Reilly. Earlier editions dealt primarily with vi, and in recent years had expanded to cover the vi clones like Vim. The concept of modal editing, the ex line editor and its commands, the vi visual interface to ex and its modes are all covered very nicely. After years of blindly using vi and Vim, this history and anatomy lesson finally gave me insight necessary to understand why and how they work like they do. This basic foundation of ex and vi is crucial, since once that is solid, one cannot but fall in love with this editor.

The book is not meant to be a comprehensive compendium of vi commands, it only introduces the most common and useful of them. Vim gets a hefty chunk of the book devoted to it covering Vim commands, windows, GVim, tabs, splitting, and VimScript. But, I was left feeling hungry even after this, since Vim has many more features! (I guess I will have to go back to the other two Vim books for more.) The book also covers other vi clones like nvi, viles and elvis. I felt this was a waste of paper, since I am yet to run into folks who use these clones! I hope that the book will deal purely with vi and Vim in its next edition. The last part of the book are Appendices that list the commands and their explanations. This again seemed a waste since Vim has awesome :help documentation.

I am happy to report that this book was not only interesting to read, but helped me get back to Vim. It feels great to work with an editor which can be completely customized to fit one’s needs. This is an introductory book, highly recommended for folks who want to learn about vi and Vim. I hope you stick through the chapters on ex and vi, since that knowledge sets the groundwork to understand Vim better. Among the 3 Vim books, this one clearly stands out as the best introduction to both vi and Vim.

“To me, vi is Zen.
To use vi is to practice zen.
Every command is a koan.
Profound to the user,
unintelligible to the uninitiated.
You discover truth every time you use it.”
— Satish Reddy

Alice’s Adventures in Wonderland

Rating: 4/4 (Remains a most fantastic dream trip to this day!)

There are a few memories from childhood which remain vivid to this day. One of them is possessing and reading a hardcover copy of Alice’s Adventures in Wonderland. This children novel by Lewis Carroll was presented by my dad and I was proud because it was one of the first unabridged novels I read. A little while after this, it would fall into the vicious hands of a cousin, who merrily proceeded to mercilessly vandalize its every page! With age the memory of this book has only grown fonder and I have kept an eye out for this particular edition of the book everywhere, but the search has been futile! 😐

“Begin at the beginning and go on till you come to the end: then stop.” – The King of Hearts

On a whim, I recently picked up a 1950 edition by Arcadia House to re-read this classic. There is a certain comfort in reading a well worn tale. Alice falls down a rabbit-hole and lands in a Wonderland. She comes across magical drinks, cakes and mushrooms, which when consumed cause her to grow or shrink in size. She meanders through this Wonderland without any purpose, talking and meeting with its creatures. Some of these creatures have now become eponymous in English literature. The Cheshire Cat is probably the most famous, with his transparent appearance, calm demeanour and magical smile. The White Rabbit is always hurrying about, checking his pocket watch for the time and always late for his next appointment. The mad trio of the March Hare, the (Mad) Hatter and the Dormouse, who are stuck in a weird time-warp where  it is always tea time. The coolest creature is probably the Caterpillar who sits on a mushroom sucking on a hookah! And finally the Queen of Hearts who tries to behead anyone she does not like.

Alice’s Adventures in Wonderland unfailingly brings up a dream universe when reading it. Much like a dream, the story has no direction of any sort, things just happen. This is not surprising since the story was conceived by Carroll to entertain a few kids on a boat journey. The conversations between Alice and the creatures are both non-sense and profound at the same time. The reader can imagine quaint metaphors for every little scene or incident in the book.

“I can’t explain myself, I’m afraid, Sir, because I’m not myself, you see.” – Alice

Like all modern editions, this Arcadia House publication too lumps together the sequel Through the Looking-Glass along with the original. I tried reading the sequel, but gave up. It is neither fun nor easy to read. It is hard to imagine that the same Lewis Carroll wrote that one or that a kid could enjoy it. The original Alice’s Adventures in Wonderland remains a most fantastic dream trip to this day! 🙂

“We’re all mad here.” – Cheshire Cat

Flatland: A Romance of Many Dimensions

Rating: 4/4 (Takes the reader on an inter-dimensional journey!)

If you dip your toes into any general reading involving dimensions, space or topology, Flatland is the book that comes heavily recommended. Flatland: A Romance of Many Dimensions was written by Edwin Abbott Abbott more than a hundred years ago in 1884. It is a fictional story narrated by a resident of Flatland. As its name might imply, Flatland is a 2-dimensional world, whose residents are straight lines and regular polygons. The book is seemingly written by A Square, a square Flatland resident, who now finds himself behind bars for proselytising the existence of a higher dimension (3D). The first half of the book introduces the layout and beings of Flatland. A strict class system is in force in this land, based on the number of sides of the polygonal residents. Straight lines (line segments to be precise) are women, the lowest class, they receive no education, have no careers and exist mostly for procreation. Isosceles Triangles are soldiers and workers. The more sides the polygon has, the higher his class. The highest class are the Circles, who are actually polygons with innumerable tiny sides. All irregular sided polygons are either fixed or killed to prevent their spread. Flatland residents perceive each other by sight and touch (feeling). The most interesting event in Flatland’s history was a Color Revolt which threatened the existence of the entire class system. This revolt, ironically, would have given residents the freedom to color (paint) themselves as they wished to. However, this revolt was cleverly put down by the Circles whose authority it undermined.

More interesting events occur in the second half of the book. One night A Square has a dream where he visits a 1-dimensional world called LineLand. Residents of LineLand are line segments of different lengths, they all live and die on a single straight line, which is their entire world. A Square shocks the king of LineLand when he is able to not only enter and leave their world at will, but can see their entire world and their insides too. Soon after this dream, A Square is visited by a Sphere, a being of SpaceLand, a 3-dimensional world. He takes A Square to his higher dimensional world and introduces him to the existence of solids. Being a 2-dimensional being, A Square initially finds it very hard to perceive this 3D world. But, by using analogy Sphere is able to convince A Square. For example, A Square already knew that a Point when moved along a direction formed a Line and a line moved parallel to itself formed a Square. Using such analogies, Sphere educates him on the existence of polyhedrons such as himself and Cubes. Together they visit the 0-dimensional world of PointLand, where a single Point is the sole happy resident. Unsurprisingly, the Point is found to be quite full of himself! 🙂 A Square’s story though ends in tragedy. On his return to Flatland, he tries to spread the Gospel of 3 Dimensions, only to be punished with life imprisonment for this heresy.

Flatland is a tiny book and has undergone lots of editions over the years. I read the Princeton Science Library (1991) edition, with an introduction by Thomas Banchoff. In my opinion, it is better to read this introduction after reading the novel. Banchoff introduces the life and times of Abbott. He lived in Victorian England, when education was not yet provided to women and the class system was in play. Both of these are well satirized in Flatland, by representing women as lower-dimensional (1D) entities and by the rigid polygonal class system. The eradication of all irregular polygons is also a representation of Abbott’s times, when anyone who deviated in form or thought was labeled as a freak.

Flatland is above all a dimension-travel book. It is surprisingly easy and light to read. By anthropomorphizing polygons, Abbott skillfully makes all dimensions easy to understand. After reading his book, the reader cannot but believe that higher dimensions must exist! Even if seeing such a higher dimension is beyond us, Flatland provides us the signs and hints of how such a higher dimensional being will appear and affect our world. For example, a 4D being could see inside us and could appear and disappear at different places at will. It is no secret that Abbott might believe that God is such a higher dimensional being. The book does not deal with space-time, where time is the 4th dimension. This is not surprising since space-time became popular only after Einstein. But, even then, I believe time would be (or is) a different kind of dimension, not a strict topological higher dimension. Flatland is a highly recommended read that is sure to take the reader’s mind on an inter-dimensional journey! 🙂


A few quotes from the book:

Sphere: “I had hoped to find in you — as being a man of sense and an accomplished mathematician — a fit apostle for the Gospel of the Three Dimensions, which I am allowed to preach once only in a thousand years: but now I know not how to convince you.”

I: “[…] take his servant on a second journey into the blessed region of the Fourth Dimension, where I shall look down with him once more upon this land of Three Dimensions, and see the inside of every three-dimensioned house, the secrets of the solid earth, the treasures of the mines of Spaceland, and the intestines of every solid living creature, even the noble and adorable Spheres.”

“That Point is a Being like ourselves, but confined to the non-dimensional Gulf.  He is himself his own World, his own Universe; of any other than himself he can form no conception; he knows not Length, nor Breadth, nor Height, for he has had no experience of them; he has no cognizance even of the number Two; nor has he a thought of Plurality; for he is himself his One and All, being really Nothing.  Yet mark his perfect self-contentment, and hence learn his lesson, that to be self-contented is to be vile and ignorant, and that to aspire is better than to be blindly and impotently happy.”

“It fills all space […] and what It fills, It is. What It thinks, that It utters; and what It utters, that It hears; and It itself is Thinker, Utterer, Hearer, Thought, Word, Audition; it is the One, and yet the All in All.  Ah, the happiness, ah, the happiness of Being!”

The C++ Standard Library

Rating: 4/4 (A gentle introduction and a must-have reference for all C++ programmers.)

One of the love-hate features of C++ is the standard library. A predominantly large part of the library is the Standard Template Library (STL), which consists of containers, iterators and algorithms. The C++ programmer combines these classes to write his application. Due to the size of the library, the number of classes and functions and their odd eccentricities, a good reference is needed to use it properly. Thankfully, the The C++ Standard Library (A Tutorial and Reference) by Nicolai M. Josuttis is up to the job. This is probably the C++ book which I have used the most in the past few years.

The containers, iterators and algorithms of the STL use template metaprogramming heavily. However, learning this is still quite an uphill task for most programmers. I love this book because it cleanly sidesteps that part of C++, while still being to introduce and provide a compendium of usage of the STL classes. The reader only needs to read and understand the introductory chapters. The rest of the book serves as a reference to lookup when he actually faces a task that needs a container or algorithm. Chapter 6 (Containers) and Chapter 9 (Algorithms) are what I refer to most frequently almost every day. There are very few books which deal with the C++ standard library, thankfully this one is very good! The C++ Standard Libary is a must-have reference for all C++ programmers.

.Net Book Zero

Rating: 4/4 (The perfect introductory C# book for C and C++ programmers!)

I am most comfortable with C and C++, though it is mostly a love-hate relationship. C# is a modern programming language for the .Net platform and I have wanted to try it for sometime. I looked around for some good books and found most C# books to be horribly written. I mean, anyone can teach the keywords of the language and syntax. What one wants from a book is a deeper introduction. I finally found my match in .Net Book Zero by Charles Petzold. Petzold is a technical author who is legendary for his Programming Windows series of books. .Net Book Zero is his book for C and C++ programmers who want to learn C# and .Net.

Call me old fashioned, but I love it when the author says “Close your Visual Studio kid! Let me show you how to write and compile a C# program at the command-line using the C# compiler (csc.exe). Now, let us disassemble the program using the IL Disassembler (ildasm.exe) and examine the IL code the compiler produced for our program.”

I used version 1.1 of this book, which is updated only up to C# 2.0. I did not mind this, so the book was perfect for my needs! Petzold quickly glosses over features which work the same in C# as in C and C++. Instead he focuses on features that are new or work in subtly different ways. I especially loved the depth with which value types (allocated on the stack) and reference types (allocated on the managed heap) are covered all throughout the book. It is this kind of writing that enables a C/C++ programmer to come through this 250+ page book with an in-depth knowledge of how the gears crank underneath C#. The one thing that is missing in this book is a good index. I cannot think of an introductory C# book that is better suited for the C/C++ audience. Highly recommended. Petzold made a mistake sharing the book for free 😉

The book has some spelling mistakes, I have compiled the errata here.

Blog at