We are all attached to the things that we create. From our relationships, to our work, to trivial things like the way we decorate our home — we don’t like to destroy things that we have put effort into.
That’s why it’s even more important to delete your code.
Never be afraid to throw away code that’s not working when the requirements change.
You know more about the reguirements now than you did when you first wrote
the code. Be brave.
The key insight is to use the primary key as the offset to avoid missing records (if they’re deleted between invocations)
and to increase performance by using a RANGE join type,
which is much faster (constant time.)
Simplified algorithm:
We get PAGE_SIZE number of records from the table. Starting offset value is 0.
Use the max returned value for the primary key (i.e., user_id) in the batch as the offset for the next page.
Get the next batch from the records which have the primary key (i.e., user_id) value higher than current offset.
For example:
SELECT user_id, external_id, name, metadata, date_created
FROM users
WHERE user_id > 51 234 123 --- value of user_id for 50 000 000th record
ORDER BY user_id ASC
LIMIT 10 000;
After watching the video, I had to read the book. Both Rosey and I finished it in one night. Within his 40 lessons, we each found a least a few that applied to us.
The book is structured as a series of 40 “lessons” on how to be miserable. Of course we’re not trying to be miserable, but following these lessons tend to make one miserable. To be happy, do the opposite!
Mr. Paterson’s lessons are:
Avoid All Exercise
Eat What You’re Told
Don’t Waste Your Life in Bed
Live Better Through Chemistry
Maximize Your Screen Time
If You Want It, Buy It
Can’t Afford It? Get It Anyway!
Give 100 Percent to Your Work
Be Well Informed
Set Vapid Goals
Rehearse the Regrettable Past
Blame Inward, Give Credit Outward
Practice the “Three Bad Things” Exercise
Construct Future Hells
Value Hope Over Action
Become a Toxic Optimist
Filter for the Negative
Cultivate Your Presence—Elsewhere
Insist on Perfection
Work Endlessly on Your Self-Esteem
Become an Island Unto Yourself
Give Them What They Want
Measure Up and Measure Down
Play to Win
Hold High Expectations of Others
Drop Your Boundaries
Bond With People’s Potential, Not Their Reality
Demand Loyalty
React to Their Motives, Not Their Messages
Cultivate and Treasure Toxic Relationships
Keep Your Eye on the Small Picture
Let Your Impulses Be Your Guide
Look Out for Number One
Duty First, Life Later
Live the Unlived Lives of Others
Stay in Your Zone of Comfort
Avoid Solitude
Choose Fashion Over Style
Pursue Happiness Relentlessly
Improve Yourself
I’d highly recommend watching Grey’s video and then reading the book. It will change how you view yourself.
a PWA is a website with special powers. The term “app” in the “Progressive Web App” is not indicative of the sort of content or experience users should expect with a PWA. You shouldn’t get hung up on it; “Progressive Web App” is a marketing term. PWAs have the ability to connect with the operating system (and, thereby, its users) on a deeper level through installation and APIs offering capabilities like notifications, access to the address book, and more. Not all of these APIs require installation for access, but some do. It may help to think about a PWA as being a website++.
All we talk about in tech is unicorns, when we should be talking about zebras. Unlike unicorns, zebras are REAL. Zebra companies are black and white — they are profitable and socially conscious. They band together in groups to protect one another. They seek to share resources instead of hoarding them. And they are more concerned about user success than user acquisition.
Great news, Rubyists! We recently released google-cloud-gemserver gem, making it possible to deploy a private gem server to Google Cloud Platform (GCP) with a single command
I thought to myself: why is there so little actionable advice out there about negotiation? I suspect it’s because deep down, many people believe that negotiation is inexplicable, that it’s something some people can do and others can’t, and that there’s no real way to break it down so anyone can learn it.
And if this is the case for some of the simplest human activities, it’s far more true for the most complex ones — writing symphonies and novels, developing new technologies, inventing new scientific paradigms. Geniuses are rarely the best teachers, the best critics, or the best explainers. So it’s rare to come across a genius’s account of “how genius works.”
But such accounts do exist, and we were lucky enough to unearth one near the end of our research into the life of Claude Shannon (1916-2001), the intellectual architect of the information age.