25 votes

Today I finally beat being a digital pirate despite having to jump a big hurdle

The book Code Complete changed me as a programmer and as a person. It is the best book I have ever read and if you're a programmer I highly recommend you read it.

The book was so good that after having read the pirated version of it I just had to give the author its money's worth. The problem was that almost nobody sells a PDF version of the book - Amazon sells it as a Kindle book, but I prefer PDFs (can use my chioce of software to read it). After searching for a short week I finally found a seller that sells a PDF version. I have never been so happy to find a legal PDF version of a book. Having been a pirate in my teens I'm proud of having gone to such lengths to the right thing. That's all. Just wanted to share this with you.

TL;DR: Instead of pirating a book because I didn't find a legal PDF version spent time searching for a seller and bought it legally.

32 comments

  1. [2]
    fringly
    Link
    :-) Finding something so good that you're like "I have to give this person my money" is a wonderful feeling.

    :-) Finding something so good that you're like "I have to give this person my money" is a wonderful feeling.

    3 votes
    1. Social
      Link Parent
      Anything else would have been wrong. And yes it's nice to see quality work.

      Anything else would have been wrong. And yes it's nice to see quality work.

      1 vote
  2. [9]
    rhencke
    Link
    Code Complete is a beautiful book. If you're hungry for more good programming books, I highly recommend "Working Effectively with Legacy Code". It's one of those books like Code Complete - once...

    Code Complete is a beautiful book.

    If you're hungry for more good programming books, I highly recommend "Working Effectively with Legacy Code".

    It's one of those books like Code Complete - once you read it, it changes how you view a lot of things for the better.

    2 votes
    1. [8]
      Social
      Link Parent
      Wow thanks. Thanks for your suggestion Rhencke. In what way did it impact you?

      Wow thanks. Thanks for your suggestion Rhencke.
      In what way did it impact you?

      2 votes
      1. [7]
        rhencke
        Link Parent
        The biggest way it impacted me is in how I view 'legacy' code, and working with it. What makes a certain piece of code legacy code? Is it just age? Logically, it can't be just age - code doesn't...

        The biggest way it impacted me is in how I view 'legacy' code, and working with it.

        What makes a certain piece of code legacy code? Is it just age? Logically, it can't be just age - code doesn't just magically become rusty or obsolete. It's not like you're going to open up some code you wrote 5 years later, and it's going to look and act different than it used to. It's going to do exactly what it used to do.

        But, requirements change. Requirements change all the time. It's a fact of life - the world we live in is ever-changing, and what people wish software to do changes with it. This is (usually, but not always) an incremental process - we adapt our existing tools to new requirements.

        So, what makes a piece of code 'legacy' code is not only that it no longer meets our requirements, but also that the effort it takes to change it to meet our requirements is far too heavy. So, what's the natural inclination? Toss it out - start over. If we re-write it all from scratch, we can make it exactly the way we want it!

        Have you ever been part of a big re-write? I've been in several, and at least in the ones I've been in, the same story always plays out. People drastically under-estimate the amount of effort it takes to re-write software. More often than not, there are so many pieces in place the old system supports (and supports just fine!) that weren't even considered or known about up front, that the new re-write ends up becoming a behemoth of its own. The rewrite itself is becoming legacy code - and it's not even done yet! The effort to change it to meet the now-known requirements challenges assumptions made early in its design.

        A lot of times, I've seen the re-write stagnate as the level of effort becomes clear, and the end result is never even deployed. Or, if it is, the change is so jarring to the organization that there's even more cost now that wasn't accounted for in the original rewrite estimate just to get everything back up and running like it used to be.

        So, do we have other options, other than throwing the old one out? I know many times when I used to look at legacy code, I would have said 'no'. And, in a sense, I was right - but not because the old code was not salvageable! It was because my own skill set did not have the necessary skills for dealing with it.

        So, the name of the game becomes: can we change legacy code to meet our new requirements? Can we change it in such a way that our changed code is tested with unit tests to capture its requirements, and in such a way that doesn't take an extraordinary amount of time or effort, and in such a way that we minimize the amount of chance our modifications break the existing, often woefully under-documented, under-tested code?

        The answer, to my surprise and delight, is: hell yes. And that's what that book is about.

        6 votes
        1. [3]
          Social
          Link Parent
          That was a ride riding that comment. Thanks for putting the time and effort into it and also for making me see what the book is about. Although I'm just a hobby programmer this book has to have...

          That was a ride riding that comment. Thanks for putting the time and effort into it and also for making me see what the book is about. Although I'm just a hobby programmer this book has to have something valuable in it for me.

          2 votes
          1. [2]
            rhencke
            Link Parent
            It's definitely a great book. It can be even useful on your own code, to be honest. If you're not sure how to work in functionality without breaking things, or if you're not sure how you can take...

            It's definitely a great book. It can be even useful on your own code, to be honest. If you're not sure how to work in functionality without breaking things, or if you're not sure how you can take existing code you wrote and test it. Or how to take methods that have become complicated, and pull them apart to smaller chunks so you can see their meaning more clearly.

            It's true, there will be parts of it that are situations you just don't have to deal with, when you're doing it for a hobby. That's one nice thing about having it be a hobby. :)

            1 vote
            1. Social
              Link Parent
              This book will be usefull though when working in open source projects where the code is messy. And yeah having it as a hobby makes dealing with legacy code mostly optional.

              This book will be usefull though when working in open source projects where the code is messy. And yeah having it as a hobby makes dealing with legacy code mostly optional.

              1 vote
        2. [3]
          Social
          Link Parent
          Wow the book is not bad at all. Thanks for the suggestion, it will be usefull to have a "legacy code change algorithm".

          Wow the book is not bad at all. Thanks for the suggestion, it will be usefull to have a "legacy code change algorithm".

          1 vote
          1. [2]
            rhencke
            Link Parent
            Yes, it's not nearly the length of Code Complete. :) But there's still a lot of great information buried in every page. I definitely recommend reading at least part 1 fully, and the introduction,...

            Yes, it's not nearly the length of Code Complete. :) But there's still a lot of great information buried in every page.

            I definitely recommend reading at least part 1 fully, and the introduction, too. It's really good foundation material. Once you get past that, the book opens up a bit more into different tools and techniques. Some of my favorites are:

            • How to tame 'monster methods'. (Chapter 22) You know the type - those methods or functions that feel 20 pages long, littered with switches and loops and if statements, and make your head hurt trying to figure out what they do.
            • Sprout methods/Sprout classes. (Chapter 6) This is a really handy technique for when you want to add functionality to some code, especially code that might not be very well tested on its own, or hard to test manually. It lets you write your code in an isolated way, where you can easily control and test your little piece of it, then provides a way to surgically graft it into place with minimal disruption to the existing code.
            • Dealing with singletons. (Chapter 9) Singletons get abused a lot, in the code bases I've had to work in. Many times, they're just global variables in disguise. It can be really hard to test code that makes use of these, because often time you don't even know there's a global variable, er, singleton lurking behind the scenes a piece of code's depending on. There are some good techniques here for dealing with these in a way that doesn't require re-writing all the existing code using the singletons.

            I hope you enjoy the book!

            1 vote
            1. Social
              Link Parent
              Thank you friend.

              Thank you friend.

              1 vote
  3. [2]
    drg
    Link
    Can you please share where you found the PDF version for sale?

    Can you please share where you found the PDF version for sale?

    2 votes
  4. [4]
    Tardigrade
    Link
    Well done. What are you thoughts on paying for it but then pirating it in a more convenient format as you've already given some money to the author.

    Well done. What are you thoughts on paying for it but then pirating it in a more convenient format as you've already given some money to the author.

    2 votes
    1. [3]
      Social
      Link Parent
      Depends. My PDF has a watermark at the bottom ("This book belongs to the library of DrFaceless"). I could be fine with downloading a pirated version without that watermark. But. Had I bought the...

      Depends. My PDF has a watermark at the bottom ("This book belongs to the library of DrFaceless"). I could be fine with downloading a pirated version without that watermark. But. Had I bought the Kindle version I'd be against pirating it in another format. Amazon would lose "advertising" to me because I'd get less exposure to their colours and their app (kindle).

      Allthough with regards to games which require online access to play (such as Steep) I'd be fine with pirating them if I have paid for it. But. Then the cracker would get acknowledgment for their work and see that yet another one has used their torrent. That's the only thing I have against using a pirated version of a game IF I have paid for it.

      1. [2]
        Tardigrade
        Link Parent
        That's a really interesting moral take on that. Surely if you use the brand then advertising doesn't matter? Are you against ad block as well then? So piracy wise you'd agree to pirating a game...

        That's a really interesting moral take on that. Surely if you use the brand then advertising doesn't matter? Are you against ad block as well then?

        So piracy wise you'd agree to pirating a game you owned but you'd prefer it if the cracker didn't know?

        1 vote
        1. Social
          Link Parent
          I do use adblock and I have no moral reasoning to justify that. It would matter that I would be exposed to the app.

          I do use adblock and I have no moral reasoning to justify that. It would matter that I would be exposed to the app.

          So piracy wise you'd agree to pirating a game you owned but you'd prefer it if the cracker didn't know?
          Exactly.

          1 vote
  5. [3]
    ajar
    Link
    Just curious. Why didn't you buy the easier to buy Kindle version and then convert it to whatever format you prefer using Calibre?

    Just curious. Why didn't you buy the easier to buy Kindle version and then convert it to whatever format you prefer using Calibre?

    2 votes
    1. [2]
      Social
      Link Parent
      I didn't know Calibre could do that. Although Kindle books have DRM right? If they have I'll respect that DRM. Also, then I pay the one who made the Kindle version, not someone who made the PDF...

      I didn't know Calibre could do that. Although Kindle books have DRM right? If they have I'll respect that DRM. Also, then I pay the one who made the Kindle version, not someone who made the PDF version.

      1. ajar
        Link Parent
        Yes, Calibre can do that. I guess they have DRM, I don't own a Kindle though so I wouldn't know. I understand your point. Although I consider paying the author the primary concern, not so much who...

        Yes, Calibre can do that. I guess they have DRM, I don't own a Kindle though so I wouldn't know. I understand your point. Although I consider paying the author the primary concern, not so much who edited it.

  6. Catt
    Link
    I think it's great that you're supporting the author!

    I think it's great that you're supporting the author!

    1 vote
  7. [2]
    chewbacca
    Link
    A similar thing happened to me, too. I liked Grand Theft Auto 5 so much that I just had to buy a legitimate copy.

    A similar thing happened to me, too. I liked Grand Theft Auto 5 so much that I just had to buy a legitimate copy.

    1 vote
  8. [4]
    planNine
    Link
    Do they not have this book in a library? Or do you just prefer having your own copy?

    Do they not have this book in a library? Or do you just prefer having your own copy?

    1. [2]
      iiv
      Link Parent
      It's good to actually own the book if you're using it often. It can get annoying if you have to return and borrow the book over and over. Also, someone else might reserve the book, so you can't...

      It's good to actually own the book if you're using it often. It can get annoying if you have to return and borrow the book over and over. Also, someone else might reserve the book, so you can't borrow it again.

      3 votes
      1. Social
        Link Parent
        And you can write in it if you have it.

        And you can write in it if you have it.

    2. Social
      Link Parent
      To be honest I haven't checked if it's availiable in my country (we have one big library). I prefer having my own copy.

      To be honest I haven't checked if it's availiable in my country (we have one big library). I prefer having my own copy.

      1 vote
  9. [4]
    BBBence1111
    Link
    So What's this book about? "Coding" is a bit vague and I might be interested. (Piracy at first tho. My book budget is empty after last month where we had 5 bdays in a row...)

    So
    What's this book about? "Coding" is a bit vague and I might be interested. (Piracy at first tho. My book budget is empty after last month where we had 5 bdays in a row...)

    1. [3]
      Social
      Link Parent
      It's about techniques and practices to write better, more optimized, more readable, more maintainable code.

      It's about techniques and practices to write better, more optimized, more readable, more maintainable code.

      2 votes
      1. [2]
        BBBence1111
        Link Parent
        I'll go and get it sometime then.

        I'll go and get it sometime then.

        1. Social
          Link Parent
          Great. Enjoy. Part 3 "prerequisits" in the book is really great.

          Great. Enjoy. Part 3 "prerequisits" in the book is really great.

  10. stromm
    Link
    I have bought many books, videos, music, audiobooks and games after "acquiring" them. I've even gone so far as to sent cash to freeware creators and money outside the chain to some of my favorite...

    I have bought many books, videos, music, audiobooks and games after "acquiring" them. I've even gone so far as to sent cash to freeware creators and money outside the chain to some of my favorite "small" authors.

    If I think I'll like the item, I buy it up front. But if I suspect I won't, I'll acquire it first. If I don't like it, then it gets deleted and I move on.

    Edit: Oh, BTW, if you have an eBook in a particular format, use Calibre to convert it to something else. I've been using that since the Palm days.