HN user

software_writer

245 karma

I'm a Ruby on Rails contractor and write about Rails at writesoftwarewell.com.

Posts34
Comments26
View on HN
world.hey.com 1mo ago

Basecamp Five

software_writer
5pts0
writesoftwarewell.com 2mo ago

How to Safely Drop a Column in Rails

software_writer
2pts0
www.dell.com 2mo ago

Year of the Linux Laptop: Omarchy on XPS

software_writer
8pts2
ma.tt 7mo ago

DHH and Open Source

software_writer
13pts1
world.hey.com 7mo ago

Six billion reasons to cheer for Shopify

software_writer
3pts1
infosec.exchange 8mo ago

Jeff Atwood (Coding Horror) Threatens DHH

software_writer
16pts0
byroot.github.io 9mo ago

Dear Rubyists: Shopify Isn't Your Enemy

software_writer
67pts13
world.hey.com 10mo ago

Thrice Charmed at Rails World (DHH)

software_writer
3pts0
blog.codinghorror.com 1y ago

My Scaling Hero (2008)

software_writer
1pts0
www.writesoftwarewell.com 1y ago

How a Ruby Method Becomes a Rails Action: Part One

software_writer
2pts0
www.writesoftwarewell.com 2y ago

Growing Object-Oriented Software, Guided by Tests

software_writer
1pts0
www.writesoftwarewell.com 2y ago

Why You Need Strong Parameters in Rails – Mass Assignment Vulnerability

software_writer
1pts0
www.writesoftwarewell.com 2y ago

Ruby on Rails Internals: A Deep Dive into Active Job Codebase

software_writer
2pts0
www.writesoftwarewell.com 2y ago

Understanding the Rails Router: Why, What, and How

software_writer
2pts0
www.akshaykhot.com 2y ago

Base64 Encoding, Explained

software_writer
256pts119
www.akshaykhot.com 2y ago

Length, Size, and Count in Ruby and Rails: When to Use Which?

software_writer
1pts0
www.akshaykhot.com 2y ago

Refactoring: Improving the Design of Existing Code

software_writer
1pts0
book-notes.pages.dev 2y ago

Deep Survival

software_writer
1pts0
www.akshaykhot.com 2y ago

How to Debug and Step-Through Rails Codebase

software_writer
1pts0
www.akshaykhot.com 2y ago

The Complete Guide to Working with Cookies in Rails

software_writer
2pts0
www.akshaykhot.com 2y ago

Rails Middleware: (Almost) Everything You Need to Know

software_writer
2pts0
www.akshaykhot.com 2y ago

Let's Read the Turbo Source: What Happens When You Click a Link?

software_writer
3pts0
www.akshaykhot.com 2y ago

Let's Implement the Map Method from First Principles

software_writer
1pts0
www.akshaykhot.com 2y ago

Rails Active Record Database Migrations Cheatsheet

software_writer
2pts0
www.akshaykhot.com 2y ago

How to Check If a Variable Is Defined with Ruby's defined? Keyword

software_writer
3pts2
www.akshaykhot.com 2y ago

Ruby's hash is a Swiss-army knife

software_writer
168pts77
www.akshaykhot.com 2y ago

Abbrev: A hidden Ruby gem

software_writer
81pts31
www.akshaykhot.com 2y ago

How to Implement Content Security Policy in Rails

software_writer
1pts0
www.akshaykhot.com 2y ago

Various Ways to Run Shell Commands in Ruby

software_writer
2pts0
www.akshaykhot.com 2y ago

What Every Web Developer Must Know About Content Security Policy (CSP)

software_writer
2pts0

After more than a decade with Apple (and Windows before that), I’ve been using Linux with Omarchy exclusively for the past few months and have been very happy with it. Can’t imagine going back to Mac or Windows at this point.

I had never really used Linux as a daily driver (aside from sysadmin stuff on remote servers), but Omarchy setup took less than 10 minutes and getting comfortable took just a few hours. Since switching, I’ve seen clear productivity boost, and the competency gained in Linux, Vim, etc. and overall performance made it totally worth it.

I’m running it on a cheap ThinkPad for all my daily development work and it likely saved me over $4000 since I was planning to buy a new MacBook Pro before trying this. Haven’t touched my old MacBook in quite some time.

Just wanted to share my experience with Omarchy, definitely worth trying if you're on the fence.

A classic book. I learn something new each time I read it.

Also, Dave Thomas, one of the authors, is looking for a job.

So, I'm looking for a job!

Internal or external consultant, devrel, training, team fixing, design, architecture. WFH or travel the world.

So, if you know any company that has a Dave-shaped hole, please email me. Some more about me on my site. Links below.

Many thanks.

email: dave@pragdave.me

https://x.com/pragdave/status/1978142569272877078

[dead] 1 year ago

This post shows how your application servers (Rails, Django, Laravel, etc.) can offload file delivery to reverse proxy servers like Nginx using the X-Accel-Redirect (or X-Sendfile) header. We'll also read a new reverse proxy's (Thruster) source code in Go to learn how this pattern is implemented at the proxy level.

Author of the original post here. I have no affiliation with either the Flatiron bootcamp, nor the SuperByte company. But I know Pedro and he (and his story) is real.

If you take a quick look at the rest of my blog, you'll quickly know that this was neither an ad for any bootcamp or company, nor an attempt to 'manipulate tech news readers'.

[dead] 2 years ago

Ruby's defined? keyword is an elegant way to check if a variable is defined or not and also to cache expensive operations. However, it's confusing, and a few gotchas await the new Rubyist.

In this post, we'll learn how it works and how to use it correctly to cache expensive operations returning `nil` or `false`.

[dead] 2 years ago

In this article, we'll build a simple but complete application in plain Ruby without Rails, to get a deeper understanding and appreciation of everything Rails does for us.

[dead] 3 years ago

Rails 7.1 ships with a handy `perform_all_later` method that lets you enqueue multiple jobs to be executed at once, reducing the round-trip to the job backend like Redis or the database.

Although it's currently supported only by Sidekiq and GoodJob (as far as I know), it provides a nice abstraction to enqueue multiple jobs at once. This post explores this method including the behind-the-scenes implementation.

I was trying to think of a good example, but the following table from RFC 5424 [1] might be a good starting point. I guess unknown could be used for the top 3 conditions.

           Numerical         Severity
             Code

              0       Emergency: system is unusable
              1       Alert: action must be taken immediately
              2       Critical: critical conditions
              3       Error: error conditions
              4       Warning: warning conditions
              5       Notice: normal but significant condition
              6       Informational: informational messages
              7       Debug: debug-level messages
[1] https://datatracker.ietf.org/doc/html/rfc5424

It could be useful for logging messages that don't fit a particular category, i.e. a catch-all category, to identify patterns over time. Edit: You could also use it to turn-off logging for a while. Since unknown is the highest level, no other logs would be recorded.

Closures and anonymous functions are very useful concepts, especially in functional programming. Ruby makes working with them a pleasure via its flavors like blocks, procs, and lambdas. This post provides an in-depth tutorial and shows the subtle differences between them.