1,247 karma · joined September 25, 2017
email: hnfriends31415 at gmail
# app/models/application_record.rb
class ApplicationRecord < ActiveRecord::Base
include PrimaryKeyGenerator
end
# app/models/concerns/primary_key_generator.rb
module PrimaryKeyGenerator
extend ActiveSupport::Concern
included do
after_initialize :generate_id
end
def generate_id
return if self.class.attribute_types["id"].type != :uuid
return if id.present?
self.id ||= SecureRandom.uuid_v7
end
end
This also gives you the advantage of having your PK known before record persisted (maybe it's just me but I like my UUID PKs generated in app instead of db)I wish the TypeScript/React integration was easier. Say what you will but there's no way you can achieve interactivity and convenience of React (et al) UIs with Turbo/Hotwire in a meaningful time.
These days, every time I have to pay for something online I ask myself: is it worth 5.5% per year guaranteed no-risk that i'm losing out if I'd buy bonds instead?
I know it's offtopic, but I did a review last month and stripped down number of subscriptions:
* Replaced Dropbox with GDrive that I already pay for as part of my personal Google Workspace subscription (email on my domain).
* After recent Apple One price hike I couldn't justify it canceled and got _exactly what I need_ (just 200GB iCloud and Music), 3x cost reduction.
* Started transferring my soon-expiring domains from Gandi to Porkbun (I was too lazy before).
And so on, there were some more and I trimmed my online spend down significantly.
Out of curiosity, anyone else is doing this sort of optimization? During ZIRP I never cared much.
By the way, we've seen it years ago:
* https://news.ycombinator.com/item?id=27048048
* https://www.nextgov.com/artificial-intelligence/2019/03/whit...
Still coming soon? Kudos to OP for submitting this as a reminder.
Edit: when time comes rolling their debt at a higher interest rate (post-ZIRP) I expect them to trim down their workforce and start costcutting. They currently have 6k+ employees.
However, one thing that is concerning for me is this:
> The employee used his access at Vercel to find his personal email, location, and the list of his projects.
(from https://twitter.com/nico_jeannen/status/1713139186474406206)
I'm unsure if this tweet is 100% truth, and I certainly don't believe it's "normal" as the tweet implies at the end - but it would be nice to get some sort of feedback on this, ideally. (e.g. "the employee was let go" + "we've reiterated internally that this is absolutely not something anyone at Vercel should do").
Last piece of thought - maybe the ToS need some clarifications to see if you could make it less permissive w.r.t. data and content? I understand you need to distribute it etc but would it be an option to e.g. rephrase "you hereby grant right to distribute data and content [...] only to provide you the customer with Service".
Note that I'm typing all this in good faith and I appreciate the work you folks do at Vercel.
Edit: domain is .com (I don't trust ccTLDs) and paid for 10 years.
Maybe it's just me but I just don't like DHH's governance lately. Not in a bad way, but following him on Twitter I just no longer respect him.
At amazon in 2010, it started with a meeting invite that was accidentally sent to everyone. The meeting was for the Amazon Wallet team for whatever work they were doing at the time. A reply-all storm ensued, and despite several people asking to stop hitting the reply-all button, it continued for several days. The management had to chime in and sometimes threatened people with punishment if they continued participating to the reply-all storm.
If you ignored the conversation you may not have seen it, but most reply-all storm ended up with someone saying something the line of "we don't care about your wallet".
Anyway, asking people to stop hitting the reply-all button is far from being the latest reply-all on these kind of things...
I genuinely hope you'll feel better eventually, will think about your and your loved ones' future, and finally enjoy the now - the best time to live in in human history.