On the other hand, I still fondly recall how my mind was blown by the concepts I learned when I first learned programming. It was my senior year in college and I picked up the book, the New C Primer Plus, 2nd Ed. by Mitchell Waite and Stephen Prata while Christmas shopping in 1995. I stumbled across it in Circuit City on the bottom shelf below all the shrink-wrapped software. I recall that it was sitting all alone on the shelf–all the other things around it had been snatched up by the Christmas rush. It was a throw-back to the time when learning how to use a computer still meant learning how to program it, but most people rushing through Circuit City had overlooked it. At the time, people told me to learn a newer language like Java or Visual Basic, but I had become fascinated by how computers work, and wanted to learn the gritty details of a low-level language like C. I spent the next 3 weeks reading 700 pages of code examples in utter fascination. The book taught me dozens of new concepts. At the end of each chapter, there were exercises to do as homework. Since I didn’t have a C compiler, I wrote out my code examples with pencil and paper, not really knowing if they worked or not, but simply enjoying what I was learning.
In contrast, when Rust appeared on my radar a year ago, it obsessed me for several weeks in a row. I read every page of Steve Klabnik’s The Book, which is Rust’s online manual to learn the language. I consider myself a reasonably intelligent person capable of learning new concepts. I had taught myself half a dozen programming languages and currently work in an open source software company, without ever having taken a class in computer science. Rust, however, made no sense to me. I would read a code example and then reread it and always be left with more questions than answers. The explanation for many of the code examples by often made no sense to me. I was left very frustrated by the way Klabnik glossed over the necessary technical details. I kept asking myself as I read The Book, “why use a reference there?,” “why does a string work that way?,” or “why the hell can’t Rust do *that* in a reasonable way like most other languages?”
I come from the old school of programming, which means that I want to know why something works, not just know how to cut and paste it off stackoverflow. When I learn a new programming language, I want to learn in a slow and methodical fashion, so I understand each concept before I move onto the next concept. I know that I am considered a dinosaur by today’s standards, where everything is about ease of use and producing something as fast as possible. However, that is not how I learn. If I don’t feel like I understand something, I get uncomfortable and have to retrace my steps, which is why I hate those books for dummies that promise to teach me something new as fast as possible. Anything that I learn fast, I forget just as fast.
A good book on programming is invaluable, because it makes you stop and think about why you do something a certain way and what are the advantages of one way over another. It was clear to me that programming in Rust demanded thinking in a whole new way about programming, but The Book didn’t explain enough for me to understand the details of the programming examples. The Book touched on the general concepts behind Rust, but didn’t provide the technical explanation to what it was doing and I was left without the necessary understanding of how to put those concepts into practice. After a few weeks of reading about Rust, I never wrote anything in the language. Aside from a few interesting tidbits I wrote about in my blog, I never made it from reading The Book to actually programming in the language.
I had similar experiences with Pascal, Java and True Basic. I read hundreds of pages about those languages, but never made the critical transition from reading about the languages to using them. Only when you are forced to write code in a language do you really learn it, no matter how many pages of code examples you might have read.
If Rust were a language like Go, I don’t think that it would have bothered me that I had failed to learn it. I stopped trying to learn Go, just like I stopped trying to learn Pascal, Java and True Basic, because they no longer interested me. I had learned enough to satisfy my curiosity about the languages, but decided that it wasn’t worth my time to continuing learning more. Rust on the other hand tickled my imagination with its concepts, so I wanted to learn more, but I was frustrated by my inability to grasp many of its technical details, so I set it aside.
A couple weeks ago I stumbled on the Rust website and saw that they had a new preliminary version of The Book, so I started reading it again. I found the second edition to be much better than the first. It was still frustrating in its lack of technical explanation, but there was more to fill in the details, so I kept reading, often while on the bus on my way to work. I now feel like I know enough that I want to use the language, but I still don’t know enough to know what I’m doing when I try to write Rust code.
Unlike last year when there were no published books on the language, now there are a half dozen books available. Only one of them, however, looks to be an in-depth dive that really explains not only the details of the language, but also the thinking behind its design–O’Reilly’s Programming Rust: Fast, Safe Systems Development by Jim Blandy and Jason Orendorff.
From the reviews on Amazon and the sample text, it looks like exactly the kind of book I need to learn the language. Unfortunately, I can’t get the book, because I live in Bolivia. If I shell out $54.80 to buy the book online, plus pay for $20 in shipping, I have no guarantee that it will get to me. People who live in developed nations have no idea how hard it is to get books when in a place like Bolivia. First of all, there is no reliable postal system, so things can disappear in the mail. Even worse, customs often seizes items of value. It is so hard to get items out of customs that it often isn’t worth the hassle. On top of that, it is very hard to justify paying $75 for book, when that amount represents 1/11th of my monthly salary.
I have to ask if it really costs O’Reilly that much to produce a quality book? Unlike most programming books that are rushed out the door, this one does appear to be of high caliber, but I can’t believe that computer books cost that much to edit and produce. I would love to order a digital copy, but Amazon only sells it with DRM which I refuse to use for ethical reasons. Besides, I can’t believe that it truly costs Amazon anywhere close to $30, which is the price it charges for the Kindle version of the book.
Last night I searched online and found a copy of Blandy and Orendorff’s book on PirateBay. I downloaded it with Transmission and now I’m staring at the book on my computer, wondering if I should read it or not. I suspect that I will, but I still wonder about the ethical dimensions of that decision.
I can find all sorts of reasons why I should disregard the copyright. The US copyright system no longer serves the social purpose for which it was created. The US copyright was originally based on the British Copyright Law of 1710, which was also known as the Statute of Anne. It granted exclusive rights to authors over their works for a 14 year period, with the possibility of renewing those rights for another 14 years if the original author was still alive. By 1786, all of the newly independent states except Delaware had created similar copyright laws. The US federal Copyright Law of 1790 was also based on the British law, with the same provision for a 14 year copyright, followed by the option for one 14 year renewal.
A number of the founders, especially Thomas Jefferson, argued that what we now dub as “intellectual property” should be limited. The US Constitution granted congress the power “to promote the Progress of Science and useful Arts, by securing for limited Times to Authors and Inventors the exclusive Right to their respective Writings and Discoveries.” Notice that the purpose of the copyright as outlined in the constitution was not to provide fair compensation for authors, but rather to “promote the Progress of Science and useful Arts” and it was considered that the best way to do that was to grant authors a copyright for “limited Times”.
Current copyright law violates the “limited Time” provision of the US constitution because media corporations have essentially bribed congress to keep passing extending the lifespan of the copyright so it will never expire. Extensions to the US copyright were passed in 1831, 1909, 1962-74, 1976 and 1998. Today, a US copyright lasts for the lifetime of the author, plus another 70 years, which is clear violation of the literal words of the constitution, but somehow all the justices on the Supreme Court who claim to be constitutional originalists proved that they are really just shills to corporate interests when they ruled 7 to 2 in favor of the 1998 extension of the copyright in Eldred vs Ashcroft.
Copyrights used to just extend to national boundaries. Americans could enjoy the writings of British author Thomas Dickens, without paying him royalty fees. Today, however, copyright is universal, since almost every major country has signed onto the Berne Convention for the Protection of Literary and Artistic Works, which guarantees that a copyright will last for at least the lifetime of the author, plus another 50 years.
In the past, copyright law had some justification as the necessary price to pay for the publishing of books, since printing presses were expensive and people couldn’t produce their own books. Today, however, with the advent of word processors, desktop publishing, home printers and the internet, there is much less justification for granting book publishers so much power over the creation and distribution of books. It has become so much easier to ordinary people to create and distribute books so there is less need for copyright law to incentivize publishers. Nonetheless, US copyright law has become significantly more onerous and restrictive under the Berne Convention Implementation Act of 1988, the Copyright Renewal Act of 1992, the Copyright Term Extension Act of 1998 and the Digital Millennium Copyright Act of 1998 (DMCA).
Would Blandy and Orendorff have been willing to write their book and O’Reilly publish it under the provisions of the 1710 British Copyright Law? Most certainly. In 28 years time, it is highly unlikely that anyone will still be reading their book. It is hard to think of any programming books aside from Donald Knuth’s The Art of Computer Programming that anyone still buys 28 years after their original publication. Most programming books become outdated within 5 years of their publication, especially for a language like Rust which is rapidly evolving. The differences between versions 1 and 2 of Rust’s The Book are striking.
More important is the question of the motivation of Blandy and Orendorff in writing their book. In the prologue, they thank the Mozilla Foundation for lessening their other duties as employees of the Foundation in order to be able to write their book. Mozilla wants to promote the usage and learning of its new programming language, and it gave two of its valuable employees fewer duties so they would have the necessary time to write a book on how to program with Rust. Just like most academic writing, the writing of this book probably would have happened regardless of current copyright law, since it is an unofficial part of Blandy and Orendorff’s job and their professional advancement. Maybe O’Reilly wouldn’t have been willing to edit and publish it without the protection of US copyright law, so it might have been of lesser quality, but the book probably would have been written in some fashion regardless of whether Blandy and Orendorff ever got a single cent in royalty fees. However, those royalty fees and the nagging of their publisher might have been an extra incentive to get the book out of the door and into the public’s hands sooner.
Nonetheless, the needs of the public, as envisioned by the original framers of the US constitution ought to be balanced with the needs of the authors and publishers. The system has gotten so out of balance that people like me feel justified in largely ignoring copyright law. If there were an option to buy Blandy and Oredorff’s book in an electronic format on reasonable terms that was free of DRM, then I would have paid for it. However, I couldn’t easily find it, so I took the illegal route to obtain it.
In Bolivia, students of computer science (or “systems engineering” as they normally call it here) pass around flash drives filled with hundreds of programming ebooks that have been illegally downloaded. It is hard for me to condemn the practice, knowing that none them will ever get a job where they can plunk down $50 for a programming book without thinking about the dent it will make in their monthly salary. The average programmer in the US making over $100k doesn’t have to think twice about the cost of decent programming books, but it becomes a real consideration for people who don’t earn their bread as a programmer in the First World.
I suspect that I will thoroughly enjoy reading Blandy and Oredorff’s book and I will probably recommend it to others as well. Will I feel badly about not fairly compensating the authors? No, not under the present system that has forgotten the original purpose of copyright law. However, I might feel differently about the matter if the political system had treated the needs of society as being more important than the profits of the media companies and demands of their lobbyists.