Category Archives: Web Development

Writing DSLs: The joy of human consumable APIs

A well-designed Domain Specific Language (DSL) can help you be more productive as a developer, thus making you, your team and your clients happier. In this post, I’ll guide you through the design and creation of a simple DSL to create EPUB files. We’ll start with a regular API and refactoring until we get to a DSL solution.

Continue reading Writing DSLs: The joy of human consumable APIs

Avoid nil-checks. Code confidently. Be happy.

This post is about pretty code, how to get nil out of the way, and be more confident.

Does this code look familiar?

How about this?

Continue reading Avoid nil-checks. Code confidently. Be happy.

What is Dependency Injection

If you are a developer, chances are very good that you know what Object-Oriented (OO) code is. You might have also heard about OO Design Patterns, things like single responsibilities, decoupled code, and my subject here: Dependency Injection (DI).

OO Design patterns help you write code that is easier to change, and easier to test. Being quite abstract concepts, they apply to many modern programming languages, including Java, Ruby and PHP. Each language has its own way to do things, thus each language implements the concepts in a different way. Some implementations are similar, others not so much. In this article I’ll talk about Dependency Injection with a special focus on web development. I’ll explain what DI is, and I’ll elaborate on Ruby’s implementation. Finally, I’ll compare the Ruby approach with PHP’s view on DI.

Continue reading What is Dependency Injection

FMAjax and FileMaker Web Viewers

With everything that we’ve learned with our last post, Communicating with a Web Viewer in FileMaker, it makes sense to wrap up the functionality into a FileMaker module and JavaScript library.

FMAjax is a JavaScript library and accompanying FileMaker module which includes functions to facilitate communication with a web viewer without reloading the page. It helps you call FileMaker scripts from a web viewer app and return data to the Web Viewer. These solutions work across Mac, Windows, and iOS, on both hosted or local files. FileMaker 13.0v2 or later is required.

Continue reading FMAjax and FileMaker Web Viewers

Useful Vim Mappings

A few mappings to help boost your Vim workflow.

Rotate through different line numbering settings

Switch between absolute line numbers (normal), relative numbers (based on distance from your cursor) and no numbers at all using CTRL-n:

Continue reading Useful Vim Mappings

A Web Developer’s OS

What must an Operating System do to satisfy web developers’ needs? This is a tricky question, as each person is a whole different world, so it’s impossible to have a single answer to satisfy every person.

One could say “Well, because each person is different, the OS must be able to adapt to all different kinds of people”. Basically, meaning the OS must be easy to customize. This is great, but when is it too much customization? Systems that are very customizable also tend to be hard to use. In this post I’ll compare the three most used Operating Systems out there, namely Windows, OS X and GNU/Linux. I like FreeBSD but the userbase is so small I sadly won’t consider it here.

When talking about customization, I’d say Linux is king. Windows, on the other hand, is not natively customizable, but easy to use and with sane defaults. OS X gets the best of both worlds. That’s just my humble opinion, as I don’t consider myself to be a full power user of any of those systems, I just use them to get work done on a daily basis.

Continue reading A Web Developer’s OS

Keep FileMaker Server Web Logs at Fixed Paths

If you need to scrounge through the web server’s logs in the file system, the way FileMaker Server stores these on Mac OS can be a bit annoying. You end up with a bunch of files named like this:

This presents two problems. First, its difficult to tease out the name of the most recent log, although the shell’s autocomplete helps with that a bit.

Continue reading Keep FileMaker Server Web Logs at Fixed Paths

jQuerySF 2015 – Much more than jQuery…


Attending jQuerySF 2015:

This week I had the pleasure of attending jQuerySF 2015, held in San Francisco, CA.

Despite the name of the conference, the range of web-technology topics included far more than just jQuery. The conference spanned two days, with each day featuring a series of 20 minute presentations by charismatic representatives of diverse web technology subject matter. If you couldn’t make this year’s jQuerySF, and are wondering what you missed, fear not! Below is a quick outline of the conference, a short list of my favorite presenters, and links to full conference video from both days.

Continue reading jQuerySF 2015 – Much more than jQuery…

Never write a render_foo method again

[Authored by Ian]

I’ve probably written a hundred render_not_found methods in my life as a Rails dev. Usually they just render a static file under /public, and maybe, if I’m feeling nice, give an XML response. No more!

Continue reading Never write a render_foo method again

Setting the Commit Author to Pair Programmers’ Names in Git

[Authored by Sam]

In beezwax’s webdev division we generally work in pairs, but our commit logs didn’t used to show this. We wouldn’t bother to reconfigure the git author every time we sat down with a new pair so our git log only recorded one of the programmers’ names. Bryan Helmcamp has a nice script for setting your git commit author in pair programming situations. Here’s another one which works interactively.

Continue reading Setting the Commit Author to Pair Programmers’ Names in Git