ITKE Community Blog

Jan 28 2013   7:21PM GMT

Book giveaway: Effective JavaScript



Posted by: Michael Tidmarsh
Contests, JavaScript

JavaScript image via Shutterstock

For many IT workers, using JavaScript can become a major headache. No need to worry, David Herman’s book, Effective JavaScript: 68 Specific Ways to Harness the Power of JavaScript, provides many detailed techniques and strategies to avoid the hassles and get the most out of JavaScript. We have an excerpt of the book on our IT Bookworm blog.

To win a copy of the book, tell us your most frustrating story involving JavaScript. Good luck!

Comment on this Post

Leave a comment:

TomLiotta  |   Jan 29, 2013  12:46 AM (GMT)

When attempting to use Google GWT/GXT in my last project, I had to handle backslashes in a property (stored in a properties file). This was a property value entered by customers, and a backslash was a valid character. (That ought to be all I need to say to explain the problem to anyone who has had to do the same thing for the first time.)
 
I had no prior experience with GWT/GXT, nor any similar framework. Past experience was always a straight ‘javascript’. This project was outside of my usual project responsibilities, a project developed by another group in the company.
 
The first thing I had to figure out was that many “normal” javascript functions weren’t implemented in GWT/GXT, and many that were implemented would support only subsets of methods. But implemented or not, the IDEs (NetBeans and Eclipse) would accept the syntax without complaint, and only when ‘compiled’ would any syntax problems show.
 
Over and over I tried various methods of accepting, then storing, then retrieving the blasted “property” while retaining the backslash, all the while cursing the original developers who thought that storing this value as a “property” was a good idea. Over and over, the backslash would disappear at some point in the series of operations. Sometimes it would also cause the following character to disappear, as should be expected when the backslash acted in it’s normal ‘escape’ mode for that character.
 
The number of web searches I had to make and of alternative routines I had to code before finally coming up with a concise, clean code sequence that some future developer could grasp is more than I can remember. Those included multiple discussions with all members of the original team, none of whom had any suggestions on how to make it work.
 
If I have to dig into someone else’s javascript code again, having some solid and practical guidelines will be much appreciated.
 
Tom
 


 

dyowee  |   Feb 2, 2013  2:16 AM (GMT)

My most frustrating experience is trying to maintain a legacy application, with no modularity in the javascript code, scattered throughout the markup, and written much in way by someone who had experience with another OO language, but not javascript. 


 

KevinBeaver  |   Feb 8, 2013  9:17 PM (GMT)

How about security and all the flaws/exploits/opportunities JavaScript represents? It’s a huge challenge.


 

Michael Tidmarsh  |   Feb 11, 2013  3:38 PM (GMT)

Congratulations Tom, you have won the book! Watch out for an email from me so I can sent it to you.


 

TomLiotta  |   Feb 12, 2013  4:40 AM (GMT)

Telling the ‘frustrating’ story made me partly relive it again. But I’m hoping the book will compensate. Thank you. — Tom