Something out of Nothing: Null Object Pattern

What is nothing? nil? null? undefined? A vast void of emptiness that fills your soul with dread? Oh sorry, that’s just my stomach.

We often think of nothing as… well, nothing. It’s when something doesn’t exist and therefore cannot be interacted with. So in our code, we try account for having nothing. No User? No problem.

Continue reading “Something out of Nothing: Null Object Pattern”

Ruby’s Safe Navigation Operator &. and is it a Code Smell?

What is &.?

Ruby devs are probably all too familiar with seeing this error:

Most of the time, it’s probably due to a typo, but every now and then we end up having to do something like:

If you’re on Rails, or are using ActiveSupport, you can use present? or try():

Continue reading “Ruby’s Safe Navigation Operator &. and is it a Code Smell?”

Composition over Inheritance, with JavaScript examples

If you are into object-oriented programming, you most likely have heard about composition over inheritance. The concept itself is simple: Whenever possible, prefer to compose objects rather than introducing inheritance.

Continue reading “Composition over Inheritance, with JavaScript examples”

Common Code Smells in OOP

Over years of reviewing Ruby code, the same things tend to come up over and over. In this post, I’d like to address some of the most common code smells I find when reviewing OOP code (and Ruby code in particular).

Continue reading “Common Code Smells in OOP”

Let’s Abstract a While() in FileMaker

Introducing JSON Filter, Map, Reduce.

Now that FileMaker has given us a practical and more simplified way to loop in a calculation with the While() function, the doors have opened to other ways to look at looping. Continue reading “Let’s Abstract a While() in FileMaker”

We’ve been waiting for While()… for a while

FileMaker has been missing a looping control structure in its function set for…well…a while. So, the introduction of FileMaker 18’s While() function is less a fancy new feature than it is a fix for a long standing limitation in FileMaker’s function set.
Continue reading “We’ve been waiting for While()… for a while”

Modularizing The JavaScript You Already Have

Over time, without structure, things fall apart. So give them structure, a few conventions, and start to make them more maintainable. Let me say more, at least in the context of JavaScript in your applications (or did you think I was talking about gardens or buildings or such? lol.)
Continue reading “Modularizing The JavaScript You Already Have”

Which Server-Side Swift Framework Is Best For Your Project?

Server-side Swift is making waves in the web and services worlds, and developers from iOS, web and other coding backgrounds are increasingly joining the server-side Swift community. There’s just one problem (a good one): How do you choose which open-source Swift framework to use?
Continue reading “Which Server-Side Swift Framework Is Best For Your Project?”

A Ruby-ish Xmas

Ruby-ish, rubbish… Get it? Anyways, not like Ruby-ish means bad! Quite the opposite!

It’s the day after Xmas and because Ruby is awesome and delivered 2.6.0, we’ll get to play with some of our new Xmas gifts: Kernel#then, Proc#>> and Proc#<<.

Continue reading “A Ruby-ish Xmas”

1 2