HNHacker News
TopNewBestAskShowJobs

bgentry

5,978 karma · joined December 3, 2009

Software engineer building River (riverqueue.com). Former Co-founder at Distru. Mux, Opendoor and Heroku alum.

[ my public key: https://keybase.io/bgentry; my proof: https://keybase.io/bgentry/sigs/RDwSk5TnJBGqGLpMbkVGHs1oi8xRF6bs-yXND13oxiM ]

submissionscomments
bgentry··on Turning PostgreSQL into a queue serving 10k jobs per second (2013)
I elaborated a bit on this elsewhere (https://news.ycombinator.com/item?id=21537414) but Que’s design has changed significantly and no longer holds open a connection or transaction for the duration of working a job. It holds one database connection per worker process. Each worker process handles all job locking and assignment to the individual worker threads in that process, each of which only use connections that they themselves decide to open.

Otherwise, I completely agree on the benefits of transactional job enqueueing. This lets you push off so much complexity until you actually need it (when you’ve scaled such that a single database doesn’t handle your needs well). At that point, you get to solve the same challenges you will have been solving all along to deal with jobs that might run which depend on transactions that may not have committed (yet or ever). I believe this model is almost always the right starting point for a web application, barring some unusual job requirements or massive initial scale.

bgentry··on Turning PostgreSQL into a queue serving 10k jobs per second (2013)
While this is a great article and was completely accurate as of the time it was written, I believe it predates SKIP LOCKED, as well as some of the more recent design changes in Que which minimize the likielihood of this being an issue: https://www.2ndquadrant.com/en/blog/what-is-select-skip-lock...

In particular, Que’s new design locks jobs in a single connection per worker process, not a connection per-job. Job assignments are handled in an in-memory/unlogged table. Jobs are also automatically assigned to a free worker upon being enqueued via LISTEN/NOTIFY and an unlogged table of available workers. And jobs are locked in batches by each worker process, not one-at-a-time. So polling becomes much less frequent and is far more efficient when it happens.

This does not mean that it’s suddenly ok for jobs to take out transactions which run a long time (that is usually a bad idea in a production database) but it does substantially minimize the scenarios where these problems might occur.

bgentry··on Turning PostgreSQL into a queue serving 10k jobs per second (2013)
The author of this post, Chris Hanks, created the Que queueing library for Ruby: https://github.com/que-rb/que

It’s changed significantly since this post as the 1.x betas use a very different structure which should actually be more efficient, use fewer Postgres connections, cause less lock contention, and cause less table bloat.

Not sure if the benchmarks have been run recently or not but I’m definitely curious how things stack up to this post from 6 years ago :)

bgentry··on Ask HN: Who is hiring? (November 2019)
Distru (https://www.distru.com) | Product Marketer, Head of Sales | Oakland, CA | REMOTE | Full-Time

Distru is a software platform for the cannabis supply chain. Our product helps cannabis companies manage production, sales, invoicing, and shipments, automating compliance with complicated state regulations that require real-time inventory tracking gram-by-gram. We are growing rapidly with over $500M in transactions per year passing through our platform, and we’re uniquely positioned to define trade in the growing cannabis industry.

We are a lean 16 person engineering-focused team that includes early employees from Opendoor, GitHub, and Heroku. Our fully remote team is spread across the US, Canada, Brazil, and Spain.

After bootstrapping ourselves to profitability, we raised our seed round with Felicis Ventures, Village Global, Global Founders Capital, and notable angel investors including Elad Gil, Katie Stanton, and Avichal Garg: https://techcrunch.com/2019/06/03/distru-a-maker-of-supply-c...

Please apply at https://distru.com/careers and mention Hacker News!

bgentry··on Sleep Deprivation in NBA Players
My new LG TV has a "Reduce Eye Strain" setting which does a flux-like red shift, reducing blue light. I haven't found a setting to do this based on time of day, and it's a bit buried in menus, so I just leave it on all the time as it isn't too severe. I tend to watch TV mostly in the evening anyway.

https://www.costco.com/LG-55%22-Class-(54.6%22-Diag.)-4K-Ult...

bgentry··on Ask HN: Who is hiring? (October 2019)
Distru (https://www.distru.com) | Senior Frontend Engineer, Senior Backend Engineer, Product Designer, Product Marketer, Head of Sales | Oakland, CA | REMOTE | Full-Time

Distru is a software platform for the cannabis supply chain. Our product helps cannabis companies manage production, sales, invoicing, and shipments, automating compliance with complicated state regulations that require real-time inventory tracking gram-by-gram. We are growing rapidly with over $500M in transactions per year passing through our platform, and we’re uniquely positioned to define trade in the growing cannabis industry.

We are a lean 13 person engineering-focused team that includes early engineers from Opendoor and Heroku. We are hiring experienced engineers and a product designer to help take our product to the next level. We love product-minded engineers that can own a feature across the frontend and backend, even if they're stronger at one side of that. Our tech stack is built from the ground up on Elixir/Phoenix, Postgres, React/Redux, and GraphQL.

After bootstrapping ourselves to profitability, we raised our seed round with Felicis Ventures, Village Global, Global Founders Capital, and notable angel investors including Elad Gil, Katie Stanton, and Avichal Garg: https://techcrunch.com/2019/06/03/distru-a-maker-of-supply-c...

Please apply at https://distru.com/careers and mention Hacker News!

bgentry··on New Mac Pro Tech Specs
Wow, that’s a beast of a laptop. I just configured one and the cost isn’t all that different from my 18mo old iMac Pro :) I have to imagine that the battery life isn’t great given the non-mobile parts, and that it must weigh a ton?

I’m enjoying the combo of a powerful workstation where I work most of the time, and then a thin & light portable device for when I need portability. For me that combo works well and hits the right trade offs, especially the silence I get to enjoy.

I’m also remembering that Apple ships the same SSD setup in the newer MacBook Pro machines, which weren’t yet out when I bought this iMac Pro. Definitely nothing unique or unusual about that speed anymore!

bgentry··on New Mac Pro Tech Specs
Your Lenovo laptop has an 8 core 3.2GHz Xeon with 4.2GHz Turbo Boost, 19MB Cache, 64GB DDR4, silent cooling even under heavy load (which it can sustain), and an SSD that does 1700MB/s with full disk encryption?
bgentry··on New Mac Pro Tech Specs
Thermal limits. Lots of cores in a tiny space will generate lots of heat under a full workload. They can do full speed in short bursts (or when only one core is working hard) but can’t sustain full performance indefinitely without damaging themselves. The more cores in a small space, the lower the clock speed they can sustain for long periods of time.
bgentry··on New Mac Pro Tech Specs
I use an 8-core iMac Pro with 64GB RAM; it’s wonderful.

When I bought it I was doing some embedded device work involving a Windows VM, as well as heavy web dev on a frontend JS app and a backend app with tons of Chrome tabs open. All these things crave memory, and my 16GB MacBook Pro was swapping itself to death. This was pre-32GB MacBook Pros, so I bit the bullet and couldn’t be happier with the setup. It’s dead silent basically no matter what I do and doesn’t get thermally throttled during heavy workloads. Having the extra RAM also makes a huge difference.

Now that I’m doing more regular web dev on an Elixir & React app, I benefit from the 16x parallel compilation & test suite, as well as the ability to keep basically anything open without resource issues.

bgentry··on WeWork, Bankers Have Discussed Laying Off One-Third of Workforce
Yes, I believe that as well (though I also don't think it means we should fully ignore actual abuse).

You'll often see the perception/possibility of abuse touted as a reason to replace many/all of these situation-dependent welfare programs with a Universal Basic Income, where there is much less to abuse and thus less need to police it.

bgentry··on WeWork, Bankers Have Discussed Laying Off One-Third of Workforce
I’ve found this to be one of the strongest arguments for a strong social safety net, at least one centered around helping people to find new jobs or be retrained for new careers. Taxpayers and the economy in general do not benefit from preserving unnecessary jobs (whether in the govt or the private sector). It would be much better if society accepted that job & career turnover are necessary to a healthy functioning economy and embraced that reality by countering the disruptive downsides.

Even free market economists like Milton Friedman have argued for such programs. And at least for the time being, there is still plenty of work for people to do even if it’s different than what they were doing previously.

The hard part of this is designing the system in a way that avoids inevitable abuse, and then convincing people that it does so effectively.

bgentry··on For Airbnb employees, dream turns into disillusionment
Incentive Stock Options (ISOs) apparently have a 10 year expiration window on them. If you were granted ISOs in 2010 but did not exercise them, you may have less than a year remaining to do so before they are lost forever.

You could exercise them, but for an early employee at a company like Airbnb that may mean literally millions of dollars in taxes that would have to be paid on an asset that can’t be sold, one that is still speculative in nature.

This doesn’t just apply to ISOs, either. I’ve learned from friends similar stage companies that even RSUs in a private company have some sort of expiration window on them, meaning if the company doesn’t IPO before that date those shares can also be lost.

There are many ways for startup employees to be screwed over on equity, especially when the company seems to be delaying IPO as long as they possibly can.

bgentry··on We picked up, tracked, and analyzed 130k pieces of litter in SF
I used to wonder what caused the crazy amount of litter in SF. After working in SOMA for years, I believe the vast majority is due to people rummaging through trash cans in search of food/recyclables/whatever, often dumping the entire contents directly onto the sidewalk. I've seen this more times than I can count.

More trash cans would be great, but they absolutely won't fix the problem when people regularly empty their contents onto the street.

bgentry··on How Postgres Makes Transactions Atomic (2017)
Author accepts PRs via GitHub :) https://github.com/brandur/sorg/blob/master/content/articles...
bgentry··on Ask HN: Who is hiring? (September 2019)
Distru (https://www.distru.com) | Senior Frontend Engineer, Senior Backend Engineer, Product Designer, Product Marketer | Oakland, CA | REMOTE | Full-Time

Distru is a software platform for the cannabis supply chain. Our product helps cannabis companies manage production, sales, invoicing, and shipments, automating compliance with complicated state regulations that require real-time inventory tracking gram-by-gram. We are growing rapidly with over $500M in transactions per year passing through our platform, and we’re uniquely positioned to define trade in the growing cannabis industry.

We are a lean 10 person engineering-focused team that includes early engineers from Opendoor and Heroku. We are hiring experienced engineers and a product designer to help take our product to the next level. We love product-minded engineers that can own a feature across the frontend and backend, even if they're stronger at one side of that. Our tech stack is built from the ground up on Elixir/Phoenix, Postgres, React/Redux, and GraphQL.

After bootstrapping ourselves to profitability, we just closed our seed round with Felicis Ventures, Village Global, Global Founders Capital, and numerous notable angel investors including Elad Gil, Katie Stanton, and Avichal Garg: https://techcrunch.com/2019/06/03/distru-a-maker-of-supply-c...

Please apply at https://distru.com/careers and mention Hacker News!

bgentry··on Lessons from Stripe
I had the pleasure of working with Mark for ~3.5 years at Heroku just prior to him joining Stripe. Since leaving Stripe, he’s been working on research projects at Ink & Switch, one of which they recently chose to focus on as a stand-alone business: https://museapp.com/
bgentry··on In plain sight: California illegal pot market booming
The situation in California is substantially worse than most people are aware. Many of the large well-funded operations have also been severely disrupted since adult use legalization. Most of the blame belongs to the CA bureaucracy which has completely bungled the rollout of legalization.

CA took so long to issue annual licenses that many cannabis businesses' temporary licenses were going to expire before they received annual licenses, and the state's own authority to issue temporary licenses was going to expire before they could fix the situation (July 1). The result would be that the vast majority of the state's legal cannabis businesses were at risk of finding themselves without a license.

To fix this, the state regulators had to petition the legislators to pass an emergency resolution giving them the authority to issue a "provisional" license, which is basically a mix of a temporary and an annual license (including all of the track-and-trace requirements of a full annual license). Yet even after doing this, the state failed to issue provisional licenses for a huge fraction before July 1. Even as of today, many businesses which were operating in full compliance and with every intention of following the rules are operating without a valid license due to this gap, though I think the state has finally almost finished issuing provisionals.

Another major aspect of this is that as each licensee gets their provisional license, they must begin tracking all of their inventory operations on the state's cannabis track-and-trace system, powered by Metrc. The state is woefully unprepared to train licensees about all of the requirements of this system, and there are gaps between what the rules say and what the system actually allows you to do. Third party software providers that integrate with Metrc (like us, Distru) are also in the dark on much of this, because Metrc has only minimal documentation, is full of bugs, and doesn't offer a complete sandbox/test environment. The only way to really figure out some aspects of the system is through trial and error with live customers. We're much further along on this than most (this was my 3rd implementation of a Metrc sync engine so it's robust enough to deal with many of their issues); but there are still edge cases that are impossible to handle well.

When there is a major bug in their software (such as the GET endpoints for transfers straight up not working when they should) Metrc does not fix the problem. When there are gaps between the regulations and Metrc, Metrc won't answer and says to "talk to the state". The state won't answer (likely because they don't know) and sometimes says "talk to Metrc". We're doing our best to help our customers and train them on things the state isn't prepared to just so our customers can keep operating, but the unfortunate reality is that our hands are often tied.

The above is just a glimpse, but there are so many more issues. Banking is of course a huge problem until congress acts to fix it. Operators often have to pay their taxes by driving giant bags of cash to one of the few state offices, or to an authorized bank branch. One of our customers brought their giant bag of cash to pay their taxes directly into the state's bank account at Bank of America, and the bank's fraud systems shut down the state's bank account temporarily as a result. Add to this the regulatory variations at the local levels where most cities and counties are still outlawing the industry, and the absurdly high taxes some are trying to impose, and it's no surprise that things are going so poorly.

California could have followed the proven playbooks that other much smaller states had successfully used to roll out their regulated industry; instead we are almost 3 years into the adult use era and it is still a complete shit show.

---

Obligatory footnote: Distru is doing well in spite of this environment and we're confident we will help our customers through it. All of the above is really an opportunity, and we've been building out a world class team to help solve these supply chain problems. If you find this industry as fascinating as I do, and want to work on software that makes a huge impact on the industry, please reach out :) blake [at] distru or https://www.distru.com/careers

bgentry··on 2019 Hyundai Kona EV Explodes When Parked
I do believe the media tends to make too big a deal of EV fires and issues (given how they compare to gas cars' frequent issues). That being said, I don't think the stats you shared are at all relevant here: those stats are probably almost all from accidents and maintenance issues on the road involving moving/operational vehicles. The explosion in this story was from a stationary vehicle parked in a garage, allegedly not even charging.

There are probably some rare cases of this happening on gas vehicles over the years, but I expect any such case would also be concerning and deserving of a deep investigation.

bgentry··on Ask HN: Who is hiring? (August 2019)
Distru (https://www.distru.com) | Senior Full-Stack Engineer, Product Designer, Product Marketer, Product Manager | Oakland, CA | REMOTE | Full-Time Distru is a software platform for the cannabis supply chain. Our product helps cannabis companies manage production, sales, invoicing, and shipments, automating compliance with complicated state regulations that require real-time inventory tracking gram-by-gram. We are growing rapidly with over $500M in transactions per year passing through our platform, and we’re uniquely positioned to define trade in the growing cannabis industry.

We are a lean 9 person engineering-focused team that includes early engineers from Opendoor and Heroku. We are hiring experienced full-stack engineers and a product designer to help take our product to the next level. We love product-minded engineers that can own a feature across the frontend and backend, even if they're stronger at one side of that. Our tech stack is built from the ground up on Elixir/Phoenix, Postgres, React/Redux, and GraphQL.

After bootstrapping ourselves to profitability, we just closed our seed round with Felicis Ventures, Village Global, Global Founders Capital, and numerous notable angel investors including Elad Gil, Katie Stanton, and Avichal Garg: https://techcrunch.com/2019/06/03/distru-a-maker-of-supply-c...

Please apply at https://distru.com/careers and mention Hacker News!

bgentry··on Sugary drinks and cancer risk: results from NutriNet-Santé prospective cohort
Fruit juice and soda are effectively the same to your body. They’re both high-fructose liquids which spike blood sugar and lead to insulin resistance. The only meaningful difference is that a fruit juice probably also includes some vitamins that the soda doesn’t.

Sources: anything published by Dr. Robert Lustig @ UCSF

bgentry··on Vulnerability in the Mac Zoom client allows malicious websites to enable camera
In response to all of the well-deserved criticism, Zoom just made two updates to their blog post[1] to announce that they will be completely removing the webserver for all macOS users in a new release tonight, and also adding an option prompt going forward:

JULY 9 PATCH: The patch planned for tonight (July 9) at or before 12:00 AM PT will do the following: 1. Remove the local web server entirely, once the Zoom client has been updated – We are stopping the use of a local web server on Mac devices. Once the patch is deployed, Mac users will be prompted in the Zoom user interface (UI) to update their client. Once the update is complete, the local web server will be completely removed on that device. 2. Allow users to manually uninstall Zoom – We’re adding a new option to the Zoom menu bar that will allow users to manually and completely uninstall the Zoom client, including the local web server. Once the patch is deployed, a new menu option will appear that says, “Uninstall Zoom.” By clicking that button, Zoom will be completely removed from the user’s device along with the user’s saved settings.

PLANNED JULY RELEASE: Additionally, we have a planned release this weekend (July 12) that will address another security concern: video on by default. With this release: 1. First-time users who select the “Always turn off my video” box will automatically have their video preference saved. The selection will automatically be applied to the user’s Zoom client settings and their video will be OFF by default for all future meetings. 2. Returning users can update their video preferences and make video OFF by default at any time through the Zoom client settings.

Edit: the new version is now released at https://zoom.us/download

[1]: https://blog.zoom.us/wordpress/2019/07/08/response-to-video-...

bgentry··on Ask HN: Who is hiring? (July 2019)
Distru (https://www.distru.com) | Senior Full-Stack Engineer, Product Designer, Product Marketer | Oakland, CA | REMOTE | Full-Time

Distru is a software platform for the cannabis supply chain. Our product helps cannabis companies manage production, sales, invoicing, and shipments, automating compliance with complicated state regulations that require real-time inventory tracking gram-by-gram. We are growing rapidly with over $500M in transactions per year passing through our platform, and we’re uniquely positioned to define trade in the growing cannabis industry.

We are a lean 8 person engineering-focused team that includes early engineers from Opendoor and Heroku. We are hiring experienced full-stack engineers and a product designer to help take our product to the next level. We love product-minded engineers that can own a feature across the frontend and backend, even if they're stronger at one side of that. Our tech stack is built from the ground up on Elixir/Phoenix, Postgres, React/Redux, and GraphQL.

After bootstrapping ourselves to profitability, we just closed our seed round with Felicis Ventures, Village Global, Global Founders Capital, and numerous notable angel investors including Elad Gil, Katie Stanton, and Avichal Garg: https://techcrunch.com/2019/06/03/distru-a-maker-of-supply-c...

Please apply at https://www.distru.com/careers and mention Hacker News!

bgentry··on Raspberry Pi 4
Not the OP but I use Kelvin for this, works great! It basically treats my Hue White Ambience bulbs like Flux, where they automatically dim and warm in the evenings. Those changes happen gradually over the course of minutes/hours so it's not jarring.

https://github.com/stefanwichmann/kelvin

bgentry··on 15-Inch MacBook Pro Battery Recall Program
You might be able to use an authorized Apple Service Provider for the repair and have the machines out of your hands for way less time.

For example, I just had the battery (+ top case) on my late 2013 15" MBP replaced this week. I brought it to a local service shop for a quick inspection, then took the machine home. Part arrived the next day, brought it back in, and it was all done in a couple of hours.

bgentry··on Ask HN: Who is hiring? (June 2019)
Our fundraising was just announced in TechCrunch today :)

Our round was led by Felicis Ventures, with participation from Village Global, Global Founders Capital, and numerous notable angel investors, including Elad Gil, Katie Stanton, and Avichal Garg.

https://techcrunch.com/2019/06/03/distru-a-maker-of-supply-c...

bgentry··on Ask HN: Who is hiring? (June 2019)
Distru (https://www.distru.com) | Senior Full-Stack Engineer, Product Designer | Oakland, CA | REMOTE | Full-Time

Distru is a software platform for the cannabis supply chain. Our product helps cannabis companies manage production, sales, invoicing, and shipments, automating compliance with complicated state regulations that require real-time inventory tracking gram-by-gram. We are growing rapidly with over $500M in transactions per year passing through our platform, and we’re uniquely positioned to define trade in the growing cannabis industry.

We are a lean 7 person engineering-focused team that includes early engineers from Opendoor and Heroku. We are hiring experienced full-stack engineers and a product designer to help take our product to the next level. We love product-minded engineers that can own a feature across the frontend and backend, even if they're stronger at one side of that.

Our tech stack is built from the ground up on Elixir/Phoenix, Postgres, React/Redux, and GraphQL.

After bootstrapping ourselves to profitability, we just closed our seed round from some top tier funds and angels (announcing soon).

Please apply at https://www.distru.com/careers and mention Hacker News!

bgentry··on Cloudflare CTO: “If we did [take on GitHub] what features would you like?”
Add to that list: hardware-based 2FA. Based on past tweets from jgrahamc, I believe CloudFlare requires all their employees to use hardware U2F tokens for critical things like Google services and has for awhile, yet they still don't support those on their own dashboard.
bgentry··on Switch from Chrome to Firefox
Funny, that (also non-standard) keyboard shortcut is not shown in the menu anywhere and thus can't easily be remapped using the standard macOS keyboard preferences. I don't know if my Cmd+Shift+N private window remapping is failing due to the conflict, or if it's Firefox just not knowing about the remapping. But either way, it appears I can't easily remap Firefox's reopen last closed window to Cmd+Shift+T like other macOS browsers use.
bgentry··on Switch from Chrome to Firefox
Vastly inferior dev tools, amateur tab management (no multi selecting tabs to rearrange or close), and a lack of extensions that are super valuable in web dev.

I keep trying to switch but every time it is clear that Safari is an inferior product (aside from efficiency, where it beats the heck out of Chrome).

← PreviousPage 7 of 23Next →