Pretty-printing JavaScript objects with JSON.stringify

It’s fairly frequent that we end up wanting to log what the contents of a JS variable is. Often times though, that ends up being an object. Frequently this leads to something like this: This of course prints: The interpolation

Posted in JavaScript, Programming

ES6 / JS2015 : Rest and Spread operators

The Rest and Spread operators added in ES6 / JS2015 drastically improve the ability to deal with unknown numbers of function parameters, and array and hash manipulation.

Tagged with: ,
Posted in JavaScript, Programming

CSS Styling Illustrator SVGs

One of the problems with using CSS to style an SVG is that you will typically want to target class names, just like other HTML elements. Unfortunately it can be difficult to get meaningful class names exported into your SVGs in most editors. Here is a technique for exporting names in Adobe Illustrator.

Posted in Programming

Building Test Fixtures to Clean up Mocha / Jasmine Tests

One of the problems with unit testing complex software is that the tests often become as complicated as the system under test. This eventually leads to bloated test code that is hard to read and maintain, and is usually littered

Tagged with: , , ,
Posted in JavaScript, Programming

Dealing with the deprecation of peerDependencies in NPM 3

The peerDependencies configuration was originally designed to address the problem of NPM packages that were ‘plugins’ for other frameworks. The original problem is discussed more in-depth here on the NPM blog. For example, the grunt-contrib-jasmine package requires that the project using

Tagged with: , , ,
Posted in JavaScript, Programming

Making a Windows shell that doesn’t suck

Over the last 20 years, I’ve had the pleasure of using Unix, Linux, DOS, Windows and OSX. One thing they all had in common was the notion of a “shell” or “command prompt”. One thing they didn’t all have in

Posted in Windows

Using Deferreds With the Cordova File API

Reading and writing to files with the Cordova File API can be difficult and messy due to heavy use of nested callback functions. We can make a convenient wrapper around this API and use jQuery deferreds to clean up our code.

Tagged with: , ,
Posted in JavaScript, Mobile, Programming

CodingWithSpike is Jeff Valore. A professional software engineer, focused on JavaScript, Web Development, C# and the Microsoft stack. Jeff is currently a Software Engineer at Virtual Hold Technologies.

I am also a Pluralsight author. Check out my courses!

  • @GrantWinney Not opened half-used food? That's weird... 1 week ago
  • This is how #agile #Scrum works. Totally nothing Waterfall happening here. 👍 1 week ago
  • Sometimes I look at the stack of old floppies in my basement and wonder "how many of these have the Monkey Boot virus?" 2 weeks ago
  • @kevinkuebler My wifi still rarely connects on boot. Always have to click the connection system tray icon to get it to do anything. 3 weeks ago
  • Windows 10 / Surface Pro 3 now stuck at 100% screen brightness after last Win update. Good job guys, you're killin' it! 👍 3 weeks ago