HN user

tcopeland

406 karma

https://thomasleecopeland.com

Posts34
Comments118
View on HN
thomasleecopeland.com 7y ago

Invalid or incomplete POST parameters

tcopeland
2pts1
thomasleecopeland.com 7y ago

Safer JSON munging

tcopeland
1pts0
thomasleecopeland.com 8y ago

Building ruby with jemalloc

tcopeland
1pts0
thomasleecopeland.com 8y ago

Db:migrate:down and Bash completion

tcopeland
1pts0
thomasleecopeland.com 8y ago

Advanced Active Record

tcopeland
2pts0
thomasleecopeland.com 8y ago

Active Record associations without foreign keys

tcopeland
1pts0
thomasleecopeland.com 8y ago

An encouraging podcast

tcopeland
1pts0
aaronlasseigne.com 8y ago

Mastering Ruby: Strings and Encodings (ebook)

tcopeland
1pts0
thomasleecopeland.com 8y ago

Finding missing non-null constraints

tcopeland
2pts0
thomasleecopeland.com 8y ago

Automating a redirect_to / flash cleanup

tcopeland
1pts0
thomasleecopeland.com 8y ago

Preserving technical knowledge

tcopeland
2pts0
www.monkeyandcrow.com 9y ago

The Constructive No

tcopeland
1pts0
thomasleecopeland.com 9y ago

A Ruby shadowing bug in the wild

tcopeland
2pts0
thomasleecopeland.com 9y ago

Turning a data set into a game

tcopeland
2pts0
thomasleecopeland.com 9y ago

Six years is too long to go between server rebuilds

tcopeland
1pts0
thomasleecopeland.com 9y ago

Upgrade Ruby, find a bug

tcopeland
1pts0
thomasleecopeland.com 9y ago

Rewriting Ruby with synvert

tcopeland
6pts0
thomasleecopeland.com 9y ago

Programs that rewrite Ruby programs

tcopeland
77pts8
angrystaffofficer.com 9y ago

Classic Military Quotes Brought into the Modern Era

tcopeland
3pts0
passedballorwildpitch.com 10y ago

Show HN: Passed ball or wild pitch?

tcopeland
10pts4
thomasleecopeland.com 10y ago

Why is a BasicObject a Range?

tcopeland
1pts0
thomasleecopeland.com 10y ago

How to make your next Ruby on Rails upgrade easier

tcopeland
1pts0
militaryprofessionalreadinglists.com 10y ago

Sunday afternoon reading – CIA reading list (2011)

tcopeland
3pts2
thomasleecopeland.com 10y ago

Finding bugs with HTTP verb and response code mismatches

tcopeland
2pts0
thomasleecopeland.com 10y ago

Picking the right data structure

tcopeland
3pts0
militaryprofessionalreadinglists.com 11y ago

U.S. Army Engineer School Commandant’s Reading List

tcopeland
84pts23
thomasleecopeland.com 11y ago

Some lessons learned using the Google Directory SDK Ruby client

tcopeland
1pts0
thomasleecopeland.com 11y ago

Ruby String API use and misuse

tcopeland
3pts0
thomasleecopeland.com 11y ago

Finding suboptimal Ruby class API usage

tcopeland
3pts1
militaryprofessionalreadinglists.com 11y ago

Military Professional Reading Lists

tcopeland
65pts23

Another scenario is when an acquisition occurs for the data a company has collected and so the codebases are quietly retired. In that situation there's still some value in paying down some technical debt - security updates on libraries and whatnot - but there's a point at which the decommissioning effort becomes the primary driver.

That's the truth. I had a thing come up the other day where a client wasn't including a content type header and thus the body was being interpreted as application/x-www-form-urlencoded. Rack middleware to the rescue on that one.

I was always disappointed by rails:update - look at all these crazy changes, I can't do all this stuff! - until I figured out I was using it the wrong way. A good way to use it is to run it in a different branch and then scroll through the diff, picking out items that you want to update. This lets you pick and choose and do even that incrementally, so you can do some easy ones first (like removing unnecessary MIME type registrations) and then move on to more complicated ones.

Longer writeup is at https://thomasleecopeland.com/2015/08/06/running-rails-updat... - it's 3+ years old now, but, hey.

In the "things learned from Ruby" section:

  Focus on strong object oriented programming
What I've learned from Ruby is to favor functional programming concepts - minimize side effects, isolate state mutation, etc. Ruby is definitely OO, but when my Ruby code is more functional it's less buggy, easier to understand and move around, and generally less convoluted.

In the morning, usually setting things up for whatever operations are scheduled for the 0800-1200. In the evening, squaring things away from whatever we did that day and maybe prepping for night helo ops.

That an interesting watch rotation to stand. At first I dreaded that one because you get less sleep. But the upside is that 0400-0800 is a quiet time aboard a ship, and 1600-2000 things are usually winding down as well.

And if you're standing that watch that means you're not standing port and starboard (i.e. 4 hours on 4 hours off) so, could be worse!

Yup but coverband doesn't do code coverage during tests (like simplecov); it does code coverage in production by sampling requests and profiling them.

Looks interesting! I've always used https://github.com/aasm/aasm, but this looks pretty good.

More generally I get worried about my ActiveRecord objects getting too bulky and business logic getting all wound up in post-transition callbacks and such. But that's something that can be managed with service objects and being disciplined about triggering state changes.

There's an interesting bit at the end of John Barry's "The Great Influenza" about how Wilson got the flu at Versailles. Barry suggests that Wilson was physically and mentally affected and thus gave in on terms around punishing Germany for the war. Apparently until he got the flu he'd been pushing back hard against anything like that.

Thanks for including real numbers, e.g. "Only 100 requests were rejected this month from this rate limiter". Always interesting to see how much a particular trapdoor actually had to be opened.

At one point I was working on a utility to detect suboptimal sequence of method calls; canonical example is using "[1,2,3].select {|x| x > 1 }.first" rather than "[1,2,3].detect {|x| x > 1}". These can be performance issues, although the bigger win is in readability and communicating the developer intent. More details and examples here if you're interested:

https://thomasleecopeland.com/2014/10/22/finding-suboptimal-...

I haven't worked on it much recently though because the problems it found weren't that significant. But I like the idea of runtime analysis for finding issues, especially in a dynamically-typed language.

To me microservices work when you split out things that the core app doesn't always need. So "promocodes" becomes its own microservice because not all purchases need a promo code. And now the main app isn't cluttered with promo code admin logic and UI.

Yup, official military reading lists include a fair bit of fiction. Recent ones that I can think of are Ghost Fleet, Starship Troopers, Enders Game, Red Badge of Courage, The Orphan Master's Son, The Kite Runner.

The really nice thing is that since many of those lists are refreshed yearly, they are an ongoing fountain of interesting books. Good stuff!