Writing a Markdown Compiler

Have you ever wanted to make your own programming language? Maybe a template engine? A JSON parser? If you have ever built any of those, you might have noticed it’s not exactly easy to get started. There are a lot of concepts to digest before you get going. That’s why lots of devs just give up. We’d like to help with that.

At Beezwax, a few years ago we built a WordPress plugin which allows users to upload their blog posts to the Apple News platform. In order to do this, we had to translate HTML to some particular format. What we wrote is, at its core, a compiler. Compilers are not only for programming languages, they are in many more places than you might think!

Continue reading “Writing a Markdown Compiler”

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 (with examples in Ruby), plus how to get nil out of the way and be more confident.

Does this code look familiar?

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).

Continue reading “What is Dependency Injection”

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.

Continue reading “A Web Developer’s OS”

Our Five Favorite Talks from RailsConf 2015

The Beezwax web dev team had a great time at RailsConf at the end of last month. The three days of the conference were packed with interesting talks, necessitating a series of painful triages each day as we selected which to attend and which to leave unseen. But now that ConFreaks has posted full video for almost all of the talks, everyone can catch up. Here are five of Shivam’s and Kevin’s favorites:

Continue reading “Our Five Favorite Talks from RailsConf 2015”

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”

Alternative FMP/Rails Integration: External SQL sources

[Authored by Ian]

In my last post, I described my preferred methodology for integrating Rails and FMP. In this post, I’ll discuss an alternative technique using FMP’s external SQL sources functionality. Since IANAFMPD (I am not a FileMaker Pro Developer), I’ll skip the implementation details and just cut to when it’s an appropriate solution.

Continue reading “Alternative FMP/Rails Integration: External SQL sources”