Articles - Ryan Kienstra

Computer monitor

Code Reviews: Guiding, Not Solving

By: Ryan Kienstra on: October 25, 2017  in: Programming

When reviewing code, sometimes I’m tempted to do the work myself. By commenting with the exact code snippet. Especially in reviews for less experienced developers, it can be faster. And it can prevent a second round of review. But I think being less clear is better for both of us. For example, when reviewing this line: […] Read more


telescope icon

Steve McConnell on Software Estimation

By: Ryan Kienstra on: October 24, 2017  in: Programming

It is difficult to make predictions, especially about the future –unknown source Predictions are hard. But I think the real goal of software estimation is to be as accurate as possible. And then convey any uncertainty in the estimate. Steve McConnell’s Software Estimation: Demystifying the Black Art gives some great ways to do this. Some […] Read more


deploying-on-time icon

Deploying on Time to WordPress VIP

By: Ryan Kienstra on: March 5, 2015  in: Programming

With the WordPress VIP code review process, deploying on time can be a challenge. But a VIP Developer Orientation video has great advice on this. And the VIP coding standards are just the beginning. Commit Messages In the orientation, VIP engineer Spencer Cameron-Morin said that detailed commit messages are crucial. He said that they could take […] Read more


Write jQuery Plugins

How To Write jQuery Plugins

By: Ryan Kienstra on: February 7, 2015  in: JavaScript

You’ve written complex jQuery code. And you’d like it to be clearer, or more flexible. Maybe you’ve heard how easy it is to extend jQuery. Here’s why and how to write jQuery plugins. Why Write jQuery Plugins? 1. Use 1 less argument jQuery plugins could be plain functions. But they’d have to take a jQuery […] Read more


Prevent JavaScript Bugs icon

7 Ways To Prevent JavaScript Bugs

By: Ryan Kienstra on: January 27, 2015  in: JavaScript

JavaScript is flexible, and it doesn’t throw many errors. But it makes it easy to create bugs. These 7 conventions will help you prevent JavaScript bugs. 1. Equality Operators Use === and !== not == and != The expression ( foo === "" ) is more reliable than ( foo == "" ). The operator === […] Read more


JavaScript modules

JavaScript Modules In WordPress

By: Ryan Kienstra on: January 25, 2015  in: JavaScript

Most JavaScript files in WordPress are actually modules. This makes all of the variables and functions private. And lets you control what should be public. JavaScript modules are: More secure Easier to change Creating A Module Wrap the entire file in a function. ( function( $ ) { // file contents } )( jQuery ); This […] Read more


JavaScript variable declaration

JavaScript Variable Declaration

By: Ryan Kienstra on: January 24, 2015  in: JavaScript

Good PHP developers can learn basic JavaScript quickly. But JavaScript variable declaration is different from PHP. And forgetting declarations will cause subtle bugs, not errors. Variable Declaration Declare all variables by using var var myVariable = 'foo_string'; If you don’t, you’ll make the variable global. var scopeTest = function() { accidentalGlobal = 'The value inside […] Read more


oop inheritance icon

OOP Inheritance For WordPress

By: Ryan Kienstra on: January 20, 2015  in: OOP For WordPress

OOP inheritance allows powerful, reusable code. If you haven’t already, you might read my guides: OOP Fundamentals For WordPress OOP: Instance Vs. Static Rationale: Reusing Code Programming is largely about reusing code. Functions execute the same code every time they’re called. The only difference is the arguments. But inheritance in object-oriented programming is much more […] Read more


Get Free Updates

  • This field is for validation purposes and should be left unchanged.