AuthorJosh

My ultimate life hack

M

Buy a take-and-bake pizza
Acquire and wield food scissors
Cut pizza into single, individual slice(s); set aside
Put any remaining pizza back into refrigerator
Cook the newly-cut pizza slices

Preventing online credit card fraud

P

In this post, I’ll go into detail on how to prevent online transaction card fraud by building a fingerprint of a user and doing some research (which any programmer can automate.) Some of these tips will be incredibly obvious, some of them won’t be so obvious. It’s a rather exhaustive and extensive process that can only be done manually if your transaction volume is low, but...

Cleaning up your icky ApplicationController

C

“Fat model, skinny controller” is a mantra. It’s a good mantra. But since `ApplicationController` is an abstract class, that’s not exactly easy (or good practice.) As the complexity of your application grows, you’ll find yourself in `application_controller.rb` quite a bit: adding methods and helpers for analytics, error handling, tracked events, roles/authorization...

What would the ideal service layer look like? (Part 1)

W

I’m a Ruby developer and I do a lot of stuff in Rails. Rails has a lot of things ready to go out of the box, but it really lacks a service layer, and while there are a few design patterns that lend themselves to having a more positive experience with service objects, there’s nothing that is very Rails-like. To get to this Rails-like service layer, we first need to understand what...

Creating a secure password the easy (and logical) way

C

Passwords are hard. My mom has had the same password since her first email account at work (90s). She used the same methodology for her password as she did my initial password. As someone who has spent time in the security field I’ve realized how important a secure password is, particularly when I have access to numerous admin-like credentials. Password managers are great, but sometimes...

How to not deal with donation fraud

H

Watsi.org — a great company — recently published a blog post titled Stopping Sharon. It describes how they deal with and attempt to prevent “online donation fraud.” Quotes because “online donation fraud” makes it seem worse than it is: fraudulent transactions, most of the time from someone with a stolen credit card, are made to check the validity of a credit card. Preface:...

It’s okay to love Ruby on Rails in 2017

I

It’s okay to love Ruby on Rails for web development in 2017. There was a time when every third post on HackerNews was relevant to Ruby on Rails, if not Ruby. That time has passed. Does that mean Ruby on Rails is dead? No. Picking a language or framework is kind of like adopting: the older they are, they less cool they seem. Having said, Ruby on Rails is mature; it’s that older dog in the...

Does Ruby on Rails scale? Yes, yes it does.

D

Does Ruby on Rails scale? Yes, it does, and it does very well. To be more specific: Yes, it does. If someone told you it doesn’t scale, they haven’t been through the trenches. Those benchmarks you’re looking at are very skewed, too. The whole idea that “Rails doesn’t scale” admittedly started before my time with Rails, but it carries over today, though with little weight. These days, everyone’s...

So you want to learn Ruby. Here’s how.

S

Ruby is great. I love Ruby. Lots of people love Ruby. I’d argue that you’d be hard-pressed to find more Ruby die-hards than you would Python, PHP, or Go. Ruby is cool. Ruby is straightforward. Ruby is effortless. Ruby just makes sense most of the time[0]. Operating System Disclaimer If you’re on Windows 8 or older you’re going to have a bad time long-term. If you’re on Windows 10 you can probably...

How to evaluate your stack

H

I’m fluent in many languages and I’ve used many frameworks. I have opinions about many of them. If you’ve read anything I’ve written, you’ve seen I’ve fallen in love with an 11-year-old framework. Things I ask myself Who am I trying to impress? Am I trying to impress my friends with my stack? My family? My colleagues? Am I trying to get responses like “wow, that’s a really gutsy move; you must be...