Viewing profile — dhh
dhh
HN member- Joined
- Wed, Apr 23, 2008, 2:26 PM UTC
- HN karma
- 2,844
- Public activity
- 256 items
- HN profile
- View on Hacker News ↗
About dhh
No profile information was provided.
Recent public activity
-
comment
Comment #25508468
I get the rush to provide technical comparisons to something that was just revealed five minutes ago, but none of what you just said is actually how Hotwire or Turbo works. There's…
-
comment
Comment #8276074
Rails will have custom configuration built-in from 4.2, but you can also just use the gem today: https://github.com/dhh/custom_configuration Then you can centralize all your config…
-
comment
Comment #8266208
Incentivizing any behavior is likely to end in ruin: http://www.alfiekohn.org/books/pbr.htm
-
comment
Comment #8201223
Here are some Rails sites: Basecamp, Github, Shopify, Airbnb, Soundcloud, Indiegogo. All have millions of users.
-
comment
Comment #7674169
I'm working with code bases that have passed the decade mark now. They're not of trivial size. They're still imminently maintainable. They are proudly Rails Applications.
-
comment
Comment #7667147
Everyone has their own definition of complexity. I make no mince about a decade worth of developing Basecamp is where I draw my primary experience from. That system is small by web…
-
comment
Comment #7555659
Responsive views only go so far. Trying to shrink an app designed for a desktop browser down to a 4" phone is a fool's errand. Much easier to go with different templates in that ca…
-
comment
Comment #7438884
Love when people play code ping pong. There's too much talk and not enough play in these threads. But I have to ask you, do you really think that splitting out those two classes im…
-
comment
Comment #7438757
Yes, when stumbling across bad code, the first instinct should be: how can I make this simpler. Not how can I wrap this bad code in more convoluted patterns. Don't use a big word w…
-
comment
Comment #7438449
On a separate note, I feel like this article series might better be titled "The Missing Parts of Our Knowledge of Basic Rails Features". Reinventing basic features doesn't make you…
-
comment
Comment #7438361
Ensuring that the Ticket is valid is obviously a domain model concern. Policy objects can be a fine idea when they're swappable and you need to allow for multiple different policie…
-
comment
Comment #7340568
I asked for specific code, you gave me specific code, so here's how I would have structured that without the (imo, needless) command pattern: https://gist.github.com/dhh/9348053 It…
-
comment
Comment #7336854
Please do share the 3 or 4 controllers all sharing this logic. I'd be happy to play code pong with them.
-
comment
Comment #7336841
Let's just say I have philosophical differences with the views presented in that presentation. Also, I never said never. I said this particular example was a poor example and the g…
-
comment
Comment #7336812
Why would the delivery of the emails fail? Because your SMTP server is down? That's an exceptional state, handle it with exceptions -- not with conditions. Or maybe because the ema…
-
comment
Comment #7336796
If reassigning a case is part of the domain, it belongs in the model. I don't know how to put this gently, but this concoction looks like a hot mess with no separation between mode…
-
comment
Comment #7336285
Yes, rewriting a system after it's already settled and designed can indeed bring a cleaner code base about. But don't confuse that with "better architecture". Don't even get me sta…
-
comment
Comment #7336245
Here's another version that doesn't even use private methods in the controller and uses a PORO for the email grouping: https://gist.github.com/dhh/9333991
-
comment
Comment #7336185
Coulda, woulda, damn shoulda. You're future coding with your "what ifs". Most controller actions are not reused. The time to extract for reuse is when you need to reuse. Not crysta…
-
comment
Comment #7336166
I rewrote the code in this example to use the "Beginner's Version" of Rails ( sigh ). You judge which you like better: https://gist.github.com/dhh/9333694
-
comment
Comment #7336046
The proof is always in the pudding. While there are good and reasonable times to introduce "interactors", this particular example is poor. The tests presented are anemic, and the c…
-
comment
Comment #7335960
By this I hope you mean that the smaller it is, the better. /lib is intended for non-app specific code. The halfway house before code is extracted into either a Rails PR or a separ…
-
comment
Comment #6885643
It relies on a header, which can't be set through the attack vector, so it's all kosher.
-
comment
Comment #6884513
We reuse all controllers and models for our mobile views and for our API. We just do that reuse at the server instead of through the client. So no loss there.
-
comment
Comment #6720070
I think you're forgetting that Rails was created for free, in my spare time, while I was being paid $30/hour working for 37signals and other US clients on a variety of projects. Bu…