Play 2 Framework not finding environment variables in IntelliJ IDEA on Mac

Recently I was experiencing an issue with the Play 2 Framework where it could not find environment variables on Mac OS when compiled within IntelliJ IDEA. The solution turned out to be simple, but could be inconvenient when an environment variable is used in many programs.

Read more »

Process Street is looking for a UI/UX Co-Founder

We are looking for a team member to join as a co-founder for a new startup called Process Street. Process Street is building a collaborative process management system targeted at the SME market.

We are a brand new startup, working to build our MVP. We currently have 2 of our desired 3 “Dream Team”. We have our Hustler (business/marketing) and our Hacker (coding/sys-admin), we just need our Hipster (UI/UX) co-founder to help make our dream a reality.

We are Australian and Canadian and the company is based in Delaware, USA, but we are living and working in Buenos Aires, where we plan to build out the initial product and work on doing market testing and gaining traction. If everything goes well, we plan to move to San Francisco (Silicon Valley) to scale out the business.

Read more »

Pajama: Client and Server Validation Simplified

When implementing an HTML form that requires validation, a developer must make a decision: should I use client-side validation, server-side validation, or both?

In this article I will give a quick overview of the pros and cons of these validation techniques, as well as introduce my solution to the problem: Pajama.

Read more »

Counting Syllables and Detecting Rhyme in PHP

I was looking at a Software Developer posting on the FreshBooks careers page the other day, and near the end of the “How to apply” instructions there was a curious sentence:

“If you want to prove you’re really paying attention, include a verse of ottava rima and a link to your GitHub profile with your application and you’re guaranteed to have your application reviewed by our Software Development Manager.”

I’d never heard of the ottava rima rhyming stanza form before, but a quick trip to Wikipedia remedied that. Essentially, an ottava rima stanza must satisfy three rules:

  1. Each stanza must have 8 lines,
  2. The lines must be iambic pentameter,
  3. The stanza must have the rhyming format a-b-a-b-a-b-c-c.

Here is an example of an ottava rima stanza by Frere (as given in the Wikipedia article):

But chiefly, when the shadowy moon had shed
O’er woods and waters her mysterious hue,
Their passive hearts and vacant fancies fed
With thoughts and aspirations strange and new,
Till their brute souls with inward working bred
Dark hints that in the depths of instinct grew
Subjection not from Locke’s associations,
Nor David Hartley’s doctrine of vibrations.

The simplicity of the rules got me thinking: how hard would it be to write a program to check if a poem stanza is ottava rima?

In this article, we will write a simple ottava rima detector in PHP.

(If you’re not interested in the details, you can skip to the code at GitHub.)

Read more »

Creating ASP.NET HttpCookie-compatible multi-valued cookies in JavaScript

Cookies are ubiquitous on the web. They’re used to store usernames, login tokens, shopping cart contents, and so on. In libraries, cookies are typically modeled as name-value pairs. An API consumer requests a cookie using a known name (e.g. $.cookie('user') in jQuery with the Cookie plugin) and the library returns a string (e.g. alice). Sometimes, however, just plain old name-value pairs aren’t enough. In this article, we will take a look at how to bake multi-valued cookies in JavaScript that are compatible with the Values property of ASP.NET’s HttpCookie class.

Read more »

Introducing CoffeeDOM, a JDOM fork for Java 5

When it comes time to work with XML in Java, the first thing I usually do is go to the JDOM website to check for a Java 5 update. Unfortunately, I am always disappointed. There has not been a major JDOM release in over 6 years and, if the JDOM mailing list is to be believed, no Java 5 version is planned. As a result, I have decided to take my own initiative and make CoffeeDOM, a JDOM fork with Java 5 support.

CoffeeDOM is intended as a natural evolution for JDOM developers. As such, there have been minimal changes to the API. CoffeeDOM adds support for Java 5 features like generics, enums, and covariant method return types, and reduces the amount of boilerplate required by making previously checked exceptions (like JDOMException) unchecked. In this article, I will briefly go over these changes.

(If you don’t want to bother with the article, you can skip right to the Google Code page or browse the Javadoc API documentation.)

Read more »

Things I miss from Java while programming in C#

One of the perks of being a freelance programmer is that I get to program in a lot of different languages, either because the client has dictated a certain language, has left the choice up to me, or limited me by what is supported by a host (Hi PHP!).

As fate would have it, I have had the good fortune to have extensive experience with both C# and Java. While many articles will list things a programmer misses from C# while coding in Java (properties, LINQ, reified generics, type inference, named and optional parameters, closures, continuations), this post intends to look at things a Java programmer might miss while coding in C#.

Read more »

Eager boolean operators in JavaScript

In most programming languages like Java, JavaScript, C and C#, the boolean operators && and || perform short-circuited evaluation. Essentially, this means that a program, when evaluating boolean operators, will only evaluate as many arguments as is necessary to determine the value of a boolean expression. Sometimes, however, this is not the behaviour we want.

In this article we will look at how to implement non-short-circuited or “eager” versions of the JavaScript boolean operators && and ||.

Read more »

How to do an AJAX search with jQTouch, Part 2

In the last installment of How to do an AJAX search with jQTouch we looked at how to setup a jQTouch interface with the goal of performing an AJAX search. In this article, we will write the necessary JavaScript to perform that AJAX search, as well as a PHP script to respond to those calls.

This article assumes you have read the first part of this series.

Read more »

How to use custom jQuery animation queues

You may not know this, but whenever you use jQuery commands like fadeIn, slideDown, and delay, you are implicitly making use of a jQuery queue behind the scenes. That queue is named fx, and it is the default queue that all animations use unless otherwise specified.

In this article, we will look at how jQuery animation queues work, how to create and manipulate them, and how to use them in a meaningful way.

Read more »

Next Page »