Book Review: Automate with Grunt — The Build Tool for JavaScript

Automate with Grunt is an excellent book on how to automate your workflow using Grunt, JavaScript’s task runner. Brian P. Hogan has written a lightweight book that is heavy on the content you need, stripping away all of the unnecessary text, and getting right to the heart of the matter: ways to use Grunt.

I appreciate how he started the book with the basics of using Grunt – creating tasks, expanding tasks to accept inputs and have one or more outputs, chaining and multitasks, manipulating files on the file system – before moving on to more complex automation exercises. Brian then introduces how to utilize Grunt to execute a real-life workflow scenario, with all of the considerations that must be made when doing so. He finishes up with building Plug-ins with Grunt and, taking things a step further, creating project scaffolds to take care of the mundane setup associated with a new project.

All of the Examples Brian uses are practical and apply to things that developers face daily in their jobs and careers. I liked that he introduced Bower into the examples early on, as this is a commonly used package manager for web sites and applications. And though I am not a fan of CoffeeScript, it was easy to ignore that fact when it was introduced, as it did show the true power and potential of Grunt as an automation tool.

I would recommend this book to anyone who is new to Grunt and just starting to learn it, or anyone who wants to take their Grunt task runner to the next level in the automation needs of their web projects.

***** (5 stars)

Categories: Books, Programming Tags:

Is Flash About Dead?

September 15, 2011 Leave a comment

I was perusing Slashdot a little while ago, and I came upon the post “Windows 8 Won’t Support Plug-Ins; the End of Flash?”. What I found funny, besides the possibly premature jumping of conclusions regarding Flash’s demise, was one of the comments. I want to post it verbatim, as it is such a great comment.

This comes from Slashdot user killmenow.


Adobe Flash: I’m not dead.

The Internet: ‘Ere, he says he’s not dead.

Google: Yes he is.

Flash: I’m not.

The Internet: He isn’t.

Opera Software: Well, he will be soon, he’s very ill.

Flash: I’m getting better.

Mozilla: No you’re not, you’ll be stone dead in a moment.

The Internet: Well, I can’t take him like that. It’s against regulations.

Flash: I don’t want to go on the cart.

Apple: Oh, don’t be such a baby.

The Internet: I can’t take him.

Flash: I feel fine.

W3C: Oh, do us a favor.

The Internet: I can’t.

Google: Well, can you hang around for a couple of minutes? He won’t be long.

The Internet: I promised I’d be at the Robinsons’. They’ve lost nine today.

Apple: Well, when’s your next round?

The Internet: Thursday.

Flash: I think I’ll go for a walk.

Mozilla: You’re not fooling anyone, you know. Isn’t there anything you could do?

Flash: I feel happy. I feel happy.

[Microsoft glances up and down the street furtively, then silences Flash with his a whack of his club]

W3C: Ah, thank you very much.

The Internet: See you on Thursday.


That is fantastic Monty Python quoting/paraphrasing, if you ask me.

Categories: Internet, Miscellaneous Tags: , ,

Proper Case Script for ESRI’s ArcMap

January 16, 2011 Leave a comment

I want to make sure that any maps I make in ESRI’s ArcMap look as good as possible, and one thing I believe looks good on a map is street names having proper case. That is, instead of the name being completely uppercase or lowercase, the first letter of each word is capitalized while the rest of the letters in the word are lowercase.

The problem I have run into with the county’s data is that everything in the system seems to be capitalized, whether is be street names, the owner’s name to a parcel, or whatever. Everything is all uppercase. This is fine for within the database, actually I have issues with it, but I do not want to get into that in this blog post. So, what am I to do? After several iterations, I have hammered out what I think is a pretty good VBScript solution which will take the uppercase data passed to it and return a proper case result. In the following example, I am getting as parameters the street name (i.e. MAIN) and the street type (i.e. ST), but this could be altered to first and last name, or only a single parameter; you get the idea. This script takes care of names with spaces and apostrophes too.

Function FindLabel([ST_NAME], [ST_TYPE])
  Dim label, labelWords, i, j, retVal, word, apostWords 

  label = [ST_NAME] & “ “ & [ST_TYPE]

  If (NOT IsNull(label) AND Len(label) > 0) Then
    labelWords = Split(label)
    For i = 0 To UBound(labelWords)
      If (i > 0) Then
        retVal = retVal & " "
      End If
      word = UCase(Left(labelWords(i), 1)) &  LCase(Mid(labelWords(i), 2))
      apostWords = Split(word, "'")
      word = ""
      For j = 0 To UBound(apostWords)
        If j > 0 Then
          word = word & "'"
        End If
        word = word & UCase(Left(apostWords(j), 1)) & LCase(Mid(apostWords(j), 2))

      retVal = retVal & word
    retVal = ""
  End If

  FindLabel = retVal
End Function


Feel free to use this within your ArcMap’s Label Expressions and I hope it helps someone else out in the future.

AUTHOR NOTE: I had originally written this function in JScript, but for some unexplainable reason, ArcMap simply did not like my code, so I switched to /sigh/ VBScript instead.

Categories: GIS, Programming Tags: , ,

HTML5 Bandwagon

September 22, 2010 Leave a comment

I am officially jumping on the HTML5 bandwagon — I know I was always a strong proponent of XHTML, but I see great potential here. I am currently reviewing HTML5: Up and Running (O’Reilly) by Mark Pilgrim, and my mind is filling up with ideas for what I can do with it. Especially the <canvas> element, oh my!

But I figured I should learn more about all of this new stuff, especially since I have reentered the programming world after an almost three year hiatus. So I am also taking a free HTML5 Mobile course from @oreillymedia and @creativeLIVE starting October 5, 2010 that runs ten weeks (until December 7, 2010). Check out the course at

Book Review: Building the Realtime User Experience

September 9, 2010 Leave a comment

The Web is moving ever faster towards sites that give users what they want, not when they load or refresh pages, but rather in real time. Understanding how this works and how to leverage it on your own site so that it is useful to the user is important knowledge any developer should have. In his book, Building the Realtime User Experience, Ted Roden does just that.

Building the Realtime User Experience breaks down the technologies that make the most sense for a developer to deliver to the user in realtime such as syndication and instant messaging, for instance. One thing the book does that I appreciate is it presents the examples found throughout using different languages, applying the most practical language for a give scenario or toolkit. Doing this does not make understanding the examples very difficult, however, and any developer with reasonable coding skills should be able to follow along in any language without difficulty.

The first chapter gives an introduction into what “realtime” means in terms of the Web and development and lays out the languages the examples will use. From Chapter 2 on, the book jumps right into the different technologies that present well in a realtime format starting with syndication. Roden focuses on two technologies for syndication, Simple Update Protocol (SUP) and PubSubHubbub, giving each protocol pretty much equal treatment, leaving it for the reader to decide which protocol to implement. Chapter 3 discusses how to implement widgets that will display realtime on a web page, using Twitter and FriendFeed as examples. What was of more use was the discussion in Chapter 4 on server-side “push” technologies, and the transition into Chapter 5, which introduces the reader to Tornado – an excellent chapter that shows through example how to get Tornado running and in use on a site.

The next three chapters deal with chat, instant messaging, and SMS respectively. In each chapter, Roden gives examples on how to build an application around these technologies, which a web environment can then utilize. The chat application built throughout Chapter 6 is quite robust, as is the instant messaging client/server created in Chapter 7. Chapter 8 then extends the instant messaging service by integrating SMS into it.

I found Chapter 9 to be an interesting chapter, but it differs from the rest of the book in that it focuses on what a developer can do with analytics to view a site from an administrative point of view in realtime, instead of focusing on delivering something realtime to the end user. The examples yielded some interesting concepts and left me considering all of the possibilities for back-end development that I more often than not neglect or even disregard in my own development. Of all the chapters in the book, I think this one is the one I am most thankful Roden took the time to write. Roden finishes the book with a “Putting It All Together” chapter that takes the different applications built throughout the preceding chapters and mashes them together into a realtime game that could be pretty fun with a group of friends.

Overall, Building the Realtime User Experience is a terrific introduction into the realtime Web, and shows the reader just some of the technologies that may work well on a site. The examples are thorough and yield robust applications that are tweakable and integrate into existing sites. I would recommend this book to anyone interested in developing applications or widgets for their site that work in a realtime manner.

***** (5 stars)

Categories: Books, Internet, Programming Tags:

I Am Not a Good Blogger

September 2, 2010 Leave a comment

I would say all evidence points to me not being a very good blogger: it has been over a year (how did that happen) since I last posted ANYTHING on this blog. I am not sure how that happened, and I will not promise that I will get better at this, but I will try…

Categories: Miscellaneous Tags:

Book Review: Even Faster Web Sites

August 11, 2009 Leave a comment

Today’s Web developer knows that the speed of one’s site is an important measure to its overall success, and Steve Souders’ previous book, High Performance Web Sites (O’Reilly), laid out what seemed to be every way to achieve good performance gains without the sacrifice of functionality or aesthetics. When I began reading Souders’ Even Faster Web Sites, I therefore wondered how he could possibly demonstrate fresh ways to achieve performance gains without regurgitating the content of his previous book. What I discovered as I read Even Faster Web Sites was it presented all new best practices for making your web sites “leaner and meaner” without repeating the content of his last book.

Even Faster Web Sites takes the latest techniques available to developers and organizes them into three performance areas: JavaScript, network, and browser. Though I believe Souder knows what he is talking about regarding web site performance, I found it refreshing this time around that he had the contributions of other experts in the field to give their ideas on performance gains in these areas.

I thought the chapters on JavaScript, especially those discussing Ajax and asynchronous techniques, were well written and gave good, new best practices to trim time off the loading of content on a site.  I also appreciated the chapter dealing with Comet, as these technologies are surely a driving force for future web applications, and having best practices early in their development will only help their progress.  Of the two chapters on browser performance, I found the honesty of the discussion on the downsides of using iframes most helpful, especially when their use was discussed as a viable technique for improving performance early in the book.  I did find the chapter on CSS selectors extremely useful for analyzing where slowdowns in styling may exist based on browser implementation.  The chapters on network performance gave a good background on common hindrances such as connection limits and poor image choices, but also walked through what I felt were performance gains that can be made through less utilized techniques like chunked encoding and better compression.

Souder finished this book with an Appendix on performance tools that can be used to help in the improvement of a web site, which I found to be immensely helpful.  While many tools he listed are well known to developers, there are some I was unaware of and began making use of immediately on my own sites.

Even Faster Web Sites is an excellent follow-up to High Performance Web Sites, giving new best practices for making your web sites even faster.  As I see it, even hundredths of a second begin to add up when you put all of these techniques together, and most of the techniques presented in this book are practical for any web site being developed.  I would recommend this book to any developer looking for ways to improve the performance of his web site, as Souder has certainly demonstrated his knowledge and expertise on improving the speed of a site.

***** (5 stars)

Categories: Books, Internet, Programming Tags: