aspose file tools*
The moose likes Blatant Advertising and the fly likes Learn the Secrets of the JavaScript Ninja! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Other » Blatant Advertising
Bookmark "Learn the Secrets of the JavaScript Ninja!" Watch "Learn the Secrets of the JavaScript Ninja!" New topic
Forums: Blatant Advertising HTML, CSS and JavaScript Bunkhouse Porch
Author

Learn the Secrets of the JavaScript Ninja!

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

About Secrets of the JavaScript Ninja

[UPDATE] Secrets of the JavaScript Ninja was published in December of 2012. Hard-copy can be purchased from any book-seller including Amazon and the Manning site (see links below). E-book formats are available at the book's Manning page (also see link below).

A CodeRanch Book Promotion was held on the week of Dec 18, 2012.



John Resig

Bear Bibeault

Links for Secrets of the JavaScript Ninja

Inspect the Table of Contents for Secrets of the JavaScript Ninja

Visit the Manning (publisher) page for Secrets of the JavaScript Ninja

Buy Secrets of the JavaScript Ninja from Amazon.com or Amazon UK

Download the free sample code for Secrets of the JavaScript Ninja

Read the first chapter of Secrets of the JavaScript Ninja

Peruse John Resig's description of the book

A sample figure from Secrets of the JavaScript Ninja

The following diagram is from chapter 5, explaining how closures affect variable scope.


Figure 5.5 Hiding the variable inside the constructor keeps it invisible to the outer scope, but where it counts, the variable is alive and well inside the closure


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
chris webster
Bartender

Joined: Mar 01, 2009
Posts: 1775
    
  14

Congrats!

But I'm more of a JavaScript Numpty, so will this book be far beyond my comprehension?

And will there be turtles?


No more Blub for me, thank you, Vicar.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

The book is not for the complete novice. But I strongly feel that Part 2 of the book, which includes an in-depth coverage of functions, closures, prototypes, and regex, should be read by everyone who writes JavaScript.

Here's an excerpt from the front matter on that subject:
1.2.1 Audience

This is not your first JavaScript book. If you're a complete novice to JavaScript, or you only understand a handful of statements by searching the web for code snippets, this is not the book for you. Yet.

This book is aimed at web developers who already have at least a basic grasp of JavaScript. You should understand the basic structure of JavaScript statements and how they work to create straightforward on-page scripts. You don't need to be an advanced user of the language -- that's what this book is for -- but you shouldn't be a rank novice.

You should also have a working knowledge of HTML and CSS. Again, nothing too advanced, but you should know the basics of putting a web page together.

If you want some good prerequisite material, grab one of the popular books on JavaScript and web development, and then tackle this one. We can recommend JavaScript: The Definitive Guide by David Flanagan, JavaScript: The Good Parts by Douglas Crockford, and Head First JavaScript by Michael Morrison.


No turtles. But an iguana did make its way into the text.
chris webster
Bartender

Joined: Mar 01, 2009
Posts: 1775
    
  14

Bear Bibeault wrote:The book is not for the complete novice. But I strongly feel that Part 2 of the book, which includes an in-depth coverage of functions, closures, prototypes, and regex, should be read by everyone who writes JavaScript.

Sounds like a plan - I might as well aim a little high, anyway. Best of luck with the book!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

chris webster wrote:
Sounds like a plan - I might as well aim a little high, anyway.

The nice thing about the way that book is structured, is that you can aim as high or low as you like by reading successive chapters and stopping when you've had enough.

As I said, Part 2* is accessible to just about anyone who has a basic knowledge of JavaScript. If you know what a for loop is, and can create and call a basic function, you can tackle part 2.

Part 3 is more advanced, but if you groked everything in part 2, you should be OK.

Part 4 is even more advanced. It's for those that really want to see how some of the esoteric things that libraries like jQuery and Prototype do are done.

You can stop when you think you've reached your personal zenith.

I think Part 2 is worth the cost of the book alone, and would benefit anyone writing JavaScript.

Best of luck with the book!

Thanks!


* The two chapters of Part 1 are just an intro, and a discussion about the state of debugging and testing tools. The only real "meat" is the development of an assert() function that we use throughout the rest of the book.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

Update: the chapters have been through their first round of typesetting and I got to see them as they will appear in the print book and eBook! Cool!

Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1671
    
    7

I have the MEAP but have not had a chance to take a look yet. At this rate I might get the paper copy before I get a chance to crack it open. I am looking forward to learning some things though


[How To Ask Questions][Read before you PM me]
Vinod Tiwari
Ranch Hand

Joined: Feb 06, 2008
Posts: 459
    
    1
Great, congratulations for the book. Wish it becomes a best seller. Look forward to it.


Vinod Tiwari | Twitter
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

Manning is running a 50% off sale on all MEAP books today, including Secrets of the JavaScript Ninja.

So if you want to snatch up the Ninja book at a bargain, use code dotd1210au at checkout.

Today (Dec 10, 2012) only!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

P.S. If you see this too late to act, if you wait until December 24th or 25th, you can try again. Manning will be running another sale then. I'll post the codes as the time approaches. (Or you can probably figure them out on your own if you look carefully at the code for today.)

Also, you can learn more about Manning's Countdown to 2013 at http://deals.manningpublications.com/countdown2013.html, including how to get a shot at an iPad Mini!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

Secrets of the JavaScript Ninja will be the target of next week's book promotion here at CodeRanch.

Information on the book promotions
The book promotion schedule

The promotion itself will be conducted in the HTML, CSS and JavaScript forum.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

The promotion now active in the HTML, CSS and JavaScript forum.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

The cover that went to the printers:



Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

Update: the book has been sent to the printer's and should find its way out of the bindery by Dec 28th.

The ebook should be available sometime next week.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

Manning is offering half off of everything until Dec 25th at midnight (US Eastern Time, I assume). Use code celebrate50.
Karim Kiswarday
Ranch Hand

Joined: Oct 01, 2010
Posts: 50

Hi,
somebody knows if is possible to write on the the pdf version?

Can I write note on that or is it locked?

Thanks,
Karim

P.S.
The book is a MEAP version but I presume it's complete now.


No fun at the table, no fun in the sack.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

Karim Kiswarday wrote:somebody knows if is possible to write on the the pdf version?

Do you mean with annotation tools like Acrobat or Preview? I would assume so, but I don't have a final copy yet.

The book is a MEAP version but I presume it's complete now.

It is! The print copies are being manufactured as we speak and should be in warehouses by the weekend. The eBook should be published during the coming week.
Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1055

is it suitable for beginners


http://www.lifesbizzare.blogspot.com || OCJP:81%
Rameshwar Soni
Ranch Hand

Joined: Feb 03, 2011
Posts: 247
Vishal Hegde wrote:is it suitable for beginners


This has been already answered. Read this.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

Actually, that question is answered here.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

Look what I got in the mail yesterday!



Chris Disilva
Greenhorn

Joined: Apr 29, 2012
Posts: 5
Wow, I found this book by looking at John Resig's "Javascript and jQuery" talk on youtube. I googled his book Pro Javascript Techniques and because that was written in 2006, I continued to google to see if he had written anything else. I eventually landed on Amazon.com where this book is being sold. However, amazon.com states deliver is 1 to 2 months! I then zoomed on the book cover graphic to see the publisher so I could google them. That's where I saw the Manning publisher and googled them. And I found the book listed, but only in PDF form. I continued to follow links until I landed here at CodeRanch.com! Now, I see that here on this forum there has been alerts of discounts and I missed BOTH of them! Plus, I see that a poster got his book on last Saturday! I can hardly wait for the epub to be available on Jan. 15! This may be a dumb question, but does "pbook" mean printed book?

After reading sample chapter 1, I am so glad to read where John writes: "If you're reading this book, you know that there's nothing simpe about creating effective and cross-browser JavaScript code. " Ain't it the truth! I write HTML and CSS and fell in love with Javascript from the beginning circa 1999, however, back then applets were being used more often, then javascript kinda went under the radar and was kinda frowned upon by computer programmers. But a few years later, it resurfaced in the AJAX world web 2.0 and she was back in business! How I wished I could have learned the language back then, but there really wasn't much on the web for a self-learner like myself. I feel like I'm playing "catch up" because javascript "resurfaced" with such a bang and hasn't stopped since! I've bought quite a few books on javascript and jquery, but this one really excites me! For those of us who may not be able to afford to go back to school and get a CS degree, I'm hoping this book will really provide a solid understanding through reading. I truly believe that javascript needs to be learned as a programming language just like java or c#, it shouldn't be taken lightly. Thanks Bear for your post here "Important Info" that gives us a sneak peek into chapters of the book, why it was written and what readers will learn.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

Chris Disilva wrote:However, amazon.com states deliver is 1 to 2 months!

It's likely to be less than that. The print book is shipping from the bindery, so Amazon has either received inventory or is about to soon.

I just got 12 copies in the mail last week see above), so it does exist!

This may be a dumb question, but does "pbook" mean printed book?

Yup.

I truly believe that javascript needs to be learned as a programming language just like java or c#, it shouldn't be taken lightly.

Then I think you will like the book -- especially Part 2 which explains the fundamentals.

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

Finally! 5 weeks after being published, Amazon is finally shipping the book. Apparently, they were having "warehouse issues".



And today, it's the #1 book in the JavaScript and Java categories (despite not being a Java book -- go figure).

Jayesh A Lalwani
Bartender

Joined: Jan 17, 2008
Posts: 2408
    
  28

But,.. Javascript has Java in it!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

To be honest, I do mention Java a number of times in the book. Usually as the foil representing non-functional languages.
tom lurge
Greenhorn

Joined: Feb 20, 2013
Posts: 1
Hi, I'm in the middle of the fourth chapter and so far I like the book very much. I have very little practice with JavaScript but a little with Java and I did finish two or three tutorials on JavaScript. I think you have a very good way of explaining concepts and underlying assumptions that other books gloss over. Thanks a lot!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

Hi tom.

Thanks for the feedback! That's exactly what we set out to do. Most other JavaScript books gloss over some important details, or present how to write JavaScript without explaining the why. We though that was important.

I also made sure that the informatioin was accessible to people coming to JavaScript from a Java background; there are a lot of us!
Rob Levin
Greenhorn

Joined: Mar 09, 2013
Posts: 2
I cannot for the life of me find a place to properly submit errata for this book (which I'm thoroughly enjoying by the way!).

So I believe that page 161 has an error in the regex.
(parseFloat(filter.match(/opacity=([^)]+/)[1]) / 100) + "" :
The closing parans for the capture group should be inside the closing regex literal forward slash. For example, I've isolated just the pertinent part and in chrome console:

filter.match(/opacity=([^)]+/)[1] / 100
SyntaxError: Invalid regular expression: /opacity=([^)]+/: Unterminated group
filter.match(/opacity=([^)]+)/)[1] / 100
0.5

If I run the full code example in chrome the ternary will be bypassed. I would think this would throw an error in IE but I haven't tested.

P.S. Please advise where readers should post errata errors for the book ... thanks ;)
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

Hi Rob, thanks for the report.

That particular error has already been caught and is listed at the book's errata page (http://manning.com/resig/excerpt_errata.html).

You can report errata by posting in the HTML forum here, or by posting at the Manning book forum (http://www.manning-sandbox.com/forum.jspa?forumID=431).
Rob Levin
Greenhorn

Joined: Mar 09, 2013
Posts: 2
Omg how did I miss that! Anyway thanks for a great book!!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

No problem, and thanks.

And welcome to the Ranch. Stick around for a while!
chris webster
Bartender

Joined: Mar 01, 2009
Posts: 1775
    
  14

My copy finally arrived from Amazon - whoo-hoo!

One day, I too will be able to snatch the pebble from the hand of the master....
Arun Giridhar
Ranch Hand

Joined: Mar 10, 2012
Posts: 147

Right now ..I'm in Master Training


hate Professionalism . Join the http://2014.hack.lu/index.php/Main_Page
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

Congrats! That means you've read through a lot of difficult material and are still going! As the part opener for Master Training points out, it's not for the faint of heart. Good going.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

On June 7th (that's tomorrow at the time of this posting) Secrets of the JavaScript Ninja will be featured as Manning's Deal of the Day.

You can get the book for half off by using code dotd0607au at checkout.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

According to Amazon, my book is a choking hazard!

Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30764
    
156

Bear Bibeault wrote:According to Amazon, my book is a choking hazard!

But you'd have to agree that it isn't for children under 3!


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

Indeed! Please do not feed a child my book!
 
jQuery in Action, 2nd edition
 
subject: Learn the Secrets of the JavaScript Ninja!