Two great books about JavaScript

Recently I read two great books about JavaScript: JavaScript: The Good Parts and Effective JavaScript: 68 Specific Ways to Harness the Power of JavaScript. Both are not for beginners, but rather programmers who know some Object Oriented language (e.g., C#, Java or C++).

JavaScript: The Good Parts

JavaScript: The Good Parts - cover
Written by the “God Father of JavaScript”: Douglas Crockford. This book is an overview of JavaScript language features that are different than in Object Oriented programming languages, such as C# or Java. Additionally, there is an overview of the good, and the bad parts of the language. What to avoid, and how. You can read it in a week (~200 pages).

In addition to JavaScript Good Parts, I recommend you to watch Crockford on JavaScript (mirror). You will learn not only about JavaScript, but also about the history of programming languages. There is also JavaScript the Good Parts course by Douglas Crockford on Pluralsight. This course is focused only on JavaScript though.

Effective JavaScript: 68 Specific Ways to Harness the Power of JavaScript

Effective JavaScript - cover
I like this book even better than “The Good Parts”. It contains very good examples that show specific aspects of the language. These examples combined with associated explanations makes this book clear and very informative for me. What I like especially was the structure: short 68 problems with explanation, analysis, and examples. Also, not very long (~200 pages). If you can choose only one of the books described in this post, read this one.

Other JavaScript books

I would be very happy to hear from you other JavaScript books that are worth (or not) reading. So far, besides mentioned books, I heard good things about:

Can you recommend some of them? Share your opinions in comments.

C# in Nutshell

C# 5.0 in a Nutshell: The Definitive Reference

C# 5.0 in a Nutshell is a great reference book about C#. Furthermore, it is worth to read it from the beginning to the end, to understand how C# works and to get familiar with the language features (can be used in the future as a reference). This book describes many features, which I have never used (after over 4 years programming in C#) like some XML serializers, COM interoperability or advanced threading/tasking techniques. Now, I know about them and where to look if needed.

This book is rather for experienced C# programmers. I do not recommend it as “first C# book”. It has a lot of examples, but the structure is rather encyclopedia style, than discovering the language from the basics. For beginner I would recommend Sams Teach Yourself Visual C# 2010 in 24 Hours.

C# in Nutshell has 1064 pages! Although it takes a while to read, it is worth your time if you think seriously about becoming good C# programmer. There are very detailed overviews and analysis of the language, supported by examples. If you do not want to spend time reading entire book, I recommend to use it as a reference and start learning about concrete feature, which you need at the time, from specific chapter in this book.

Why we read

Transferring domain (from Webio to GoDaddy)

Recently, I purchased new domains at GoDaddy. I decided to transfer my existing domain to GoDaddy as well. I thought it would be easy. However, I have never done this before.

Making long story short, here are steps to accomplish the transfer:

  1. Request the current registrar (in my case: Webio) to remove Privacy Protection and Theft Protection
  2. Request the current registrar (in my case: Webio) to give you authinfo code
  3. Start domain transfer at GoDaddy
  4. You should receive Transaction ID and Security code from the current registrar (requested by GoDaddy)
  5. Authorize transfer at GoDaddy using:
    • Transaction ID
    • Security Code
    • Authinfo code

After that it should take around 7 days to perform the transfer. I received e-mail (from current registrar) that the transfer will be performed in a few days if I do not cancel it. It is some sort of theft protection. In your case (if you have different registrar) it may be different. E.g. you may need to confirm the transfer.

The best way is to contact you current registrar and destination registrar about the specific instructions. That’s what I did and both was very nice and helpful.

EDIT: Do not forget to change Nameservers and DNSes on GoDaddy after transfer is completed 😉

A book that every programmer should read: The Elements of Computing Systems

I would like to say thank you to Scott Hanselman, who tweeted about this book. When I saw the content, I knew I will love it. And I was right.

The Elements of Computing Systems cover

The Elements of Computing Systems: Building a Modern Computer from First Principles is written by Noam Nisan and Shimon Schocken, who are University Professors. They created course based on this book (or wrote this book based on their course :)). The first 6 (out of 12) chapters are available for free at course website.

Why every programmer should read this book? Because it allows you to understand how computer works. It is going from logic gates, through machine code, intermediate code, compilers etc., to high level programming language. At the end of each chapter, there are exercises in which you are ‘building’ parts of the computer.

This book has only 344 pages and of course it doesn’t cover all details. Each chapter is kind of basic overview, however it is sufficient to get the idea and basic understanding before you go more deeply (e.g. into Computer Architecture or Compilers).

I really enjoyed reading this book. It is amazing how all those things we are doing everyday on our machines are done just by adding, subtracting, comparing and copying sequences of zeros and ones.

The book is available at amazon. There is also a website with more information about it (e.g. 10 minutes overview video), and software created for exercises (which you can find at the end of each chapter).

Why you should read “The Pragmatic Programmer”

The Pragmatic Programmer cover

Finally I read book written by Andrew Hunt and Dave Thomas: The Pragmatic Programmer. It was published in 1999, but it is still valid. The main idea provided by this book is the way of thinking. In other words: how ‘The Pragmatic Programmer’ should behave and what actions he should take in various situations.

There are also tips which skills are useful for programmer (e.g. using perl/bash scripts, mastering command line and at least one text editor).

Some advices are not valid in any case. E.g. in my opinion tip to never leave broken functionality has exceptions. Especially when it is some minor bug. There are situations when it is better to first focus on most important features and the problematic one leave for the end. After all we will have a few minor bugs and working main functionality. Instead of solved some or even only one, hard minor bug (like css styling:)) and not implemented main functionalities.

The other well-known (or should be well-known) tips like use Source Control, learn new technologies, analyze mistakes from past projects are also mentioned and described.

Here you can find list of tips from the book in nutshell: It is kind of summary of the book content.

At the and of each chapter, there is a set of exercises. This one blew my mind:

A quick reality check. Which of these “impossible” things can happen?

  1. A month with fewer than 28 days.
  2. stat(“.” ,&sb) == -1 (that is, can’t access the current directory)
  3. In C++: a=2;b=3; if (a+b!=5) exit(l);
  4. A triangle with an interior angle sum != 180°
  5. A minute that doesn’t have 60 seconds
  6. In Java: (a + 1) <= a

Fortunately at the end of the book there are answers (I wouldn’t even start googling, due to 100% certainty that some of them just can not happen, like 1 or 5):

  1. September, 1752 had only 19 days. This was done
    to synchronize calendars as part of the Gregorian
  2. The directory could have been removed by another
    process, you might not have permission to read it,
    &sb might be invalid—you get the picture.
  3. We sneakily didn’t specify the types of a and b.
    Operator overloading might have defined +, =, or !
    = to have unexpected behavior. Also, a and b may
    be aliases for the same variable, so the second
    assignment will overwrite the value stored in the first.
  4. In non-Euclidean geometry, the sum of the angles of
    a triangle will not add up to 180°. Think of a triangle
    mapped on the surface of a sphere.
  5. Leap minutes may have 61 or 62 seconds.
  6. Overflow may leave the result of a + 1 negative (this
    can also happen in C and C++).

Summarizing: The Pragmatic Programmer contains huge amount of tips, which can help you to become better programmer. You may already know some of them (or most of them). In that case you will recall why they are important. Even Scott Hanselman said on his blog (in post Six Essential Language Agnostic Programming Books), that he ‘like to read this book at least every six months or so’.

It is 352 pages book. Can be easily read within 2 weeks by 1 hour reading per day. In my opinion it is one of must-read for programmer.