HNHacker News
TopNewBestAskShowJobs

gshulegaard

2,019 karma · joined March 3, 2016

submissionscomments
gshulegaard··on Just Be Rich
Indeed, mea culpa it is too late. I ultimately had to go to the source to confirm:

https://www.pewresearch.org/social-trends/2020/01/09/trends-...

Where it was clearer:

> Even so, the gains for both lower- and middle-income families were outdistanced by upper-income families, whose median wealth increased by 85% over the same period, from $344,100 in 1983 to $636,000 in 2001. (Figures are expressed in 2018 dollars.)

gshulegaard··on Just Be Rich
I am going to assume the original comment-or simply didn't think about inflation (common mistake...which is further understandable since the graphic doesn't make it obvious whether or not it is nominal dollars or adjusted dollars).

So in that spirit, here is another resource which talks about minimum wage and even included an adjusted minimum wage graph within:

https://www.cnn.com/2021/02/21/politics/minimum-wage-inflati...

The minimum wage is not the only measurement for this discussion, but it does seem like since the 1980's the purchasing power represented by minimum wage has been falling (but at the very least is less today than then).

gshulegaard··on Things I hate about PostgreSQL (2020)
I greatly appreciate your positivity!

Experience is a great expertise builder for sure, although I find the more experience I get the more technical expertise I realize I don't have. A bit ironic now that I am thinking about it in those terms.

But I hope my comment made scaling PostgreSQL feel approachable for others who consider themselves non-experts in the area. The message I hoped to build was that non-experts can be successful without trivializing the effort. Which can be a somewhat difficult line to walk.

But thank you regardless.

gshulegaard··on Things I hate about PostgreSQL (2020)
This is the type of thing that I hope make into a tool like postgresqltuner, although I must confess this is the first time I have heard of it (great looking utility though!). I am more of a generalist that happens to have spent time scaling Postgres so I can't comment much on what a "true" DBA would do, but I find myself applying sensible settings in the postgres config for parameters I have used before. This would be more on the "manual" side of your question. To be fair, I think the relatively straightforward nature of PostgreSQL and the great configuration documentation makes this easy once you know a configuration parameter exists.

If I were to skew more of my development cycles to dedicated database management, I think incorporating analytic tools like postgresqltuner would be a must. Although I would probably cross-reference any suggestions with my past experience and dig into Postgres docs on the specific parameters it highlights. Regardless I suspect it would be a valuable source of additional context.

gshulegaard··on Things I hate about PostgreSQL (2020)
Exactly! Reduce "random_page_cost" down (default is 4) and this becomes a non-issue. It's just one of the less well known things and somewhat difficult to diagnose. What I mean is that what you will see is your database returned rows metric will rapidly climb but rows fetched will hold steady (or decrease). Based on that alone it is a bit of a leap (or at least it was for me at the time) to conclude that the query planner was not using an index on a table that was clearly indexed.

Once you understand what is going on, it makes perfect sense. It's just getting there that is the trick.

gshulegaard··on Things I hate about PostgreSQL (2020)
Oh that is a self-coined term...sorry! Basically (as I understand it as a layman) the query planner can "choose" to perform a sequential scan instead of use an index when executing a query. For "normal" sized workloads on "traditional" hardware (like 5400 rpm disk drives) this is a performance gain, but for large data sets it can cripple performance and even lock up a DB.
gshulegaard··on Things I hate about PostgreSQL (2020)
Thanks for that! Been doing a lot of Postgres work but first time seeing that slide deck.
gshulegaard··on Things I hate about PostgreSQL (2020)
Sorry for the long, rambling comment. After I wrote it I wasn't sure it added much, but since I invested so much time writing it I figured someone might find something in it useful so in that off chance I am posting it.

---

Those were really interesting reads, and it's obvious to me that the author is well experienced even if I find myself at odds with some of the points and ultimate conclusion. To be explicit, there _are_ points which resonated strongly with me.

I am by no means an expert, and fairly middling in experience by any nominal measure, but I _have_ spent a significant portion of my professional experience scaling PostgreSQL so I thought I would throw out my $0.02. I have seen many of the common issues:

- Checkpoint bloat

- Autovacuum deficiencies

- Lock contention

- Write amplification

and even some less widely known (maybe even esoteric) issues like:

- Index miss resulting in seq scan (see "random_page_cost" https://www.postgresql.org/docs/13/runtime-config-query.html)

I originally scaled out Postgres 9.4 for a SaaS monitoring and analytics platform, which I can only describe as being a very "hands on" or a manual process. Mostly because many performance oriented features like:

- Parallel execution (9.6+) (originally limited in 9.6 and expanded in later releases)

- Vacuum and other parallelization/performance improvements (9.6+)

- Declarative partitioning (10.0) (Hash based partitions added in 11.0)

- Optional JIT compiling of some SQL to speed up expression evaluation (11.0)

- (and more added in 12 and 13)

Simply didn't exist yet. But even without all of that we were able to scale our PostgreSQL deployment to handle a few terabytes of data ingest a day by the time I left the project. The team was small, between 4-7 (average 5) full time team members over 3 years including product and QA. I think that it was possible--somewhat surprisingly--then, and has been getting steadily easier/better ever since.

I think the general belief that it is difficult to scale or requires a high level of specialization is at odds with my personal experience. I doubt anyone would consider me a specialist; I personally see myself as an average DB _user_ that has had the good fortune (or misfortune) to deal with data sets large enough to expose some less common challenges. Ultimately, I think most engineers would have come up with similar (if not the same) solutions after reading the same documentation we did. Another way to say this is I don't think there is much magic to scaling Postgres and it is actually more straight forward than common belief suggests; I believe there is a disproportionate amount of the fear of the unknown rather than PostgreSQL being intrinsically more difficult to scale than other RDBMS's.

The size and scope of the PostgreSQL feature set can make it somewhat difficult to figure out where to start, but I think this is a challenge for any feature-rich, mature tool and the quality of the PostgreSQL documentation is a huge help to actually figuring out a solution in my experience.

Also, with the relatively recent (last 5 years or so) rise of PostgreSQL horizontal-scale projects like Citus and TimescaleDB I think it is an even easier to scale PostgreSQL. Most recently, I used Citus to implement a single (sharded) storage/warehouse for my current project. I have been _very_ pleasantly surprised by how easy it was to create a hybrid data model which handles everything from OLTP single node data to auto-partitioned time series tables. There are some gotchas and lessons learned, but that's probably a blog post in it's own right so I'll just leave it as a qualification that it's not a magic bullet that completely abstracts the nuances of how to scale PostgreSQL (but it does a darned lot).

TL;DR: I think scaling PostgreSQL is easier than most believe and have done it with small teams (< 5) without deep PostgreSQL expertise. New features in PostgreSQL core and tangential projects like Citus and TimescaleDB have made it even easier.

gshulegaard··on Python Pattern Matching
I could be wrong, but this PEP feels to me like it only got accepted because Guido is stepping (or stepped) back from his BDFL role. It has noticeably more rough edges and less consistency than most feature adds I have seen in the past. This is pure personal speculation though.
gshulegaard··on VSCode, Dev Containers and Docker
All of those benefits were solved problems with VM based workflows using something like Vagrant long before Containers started gaining traction (IMO).

Don't get me wrong, I am a fan of containers (in particular LXC), but I wouldn't list those benefits as if they are unique or novel to container based workflows.

Edit: To be clear, there _are_ benefits to containers over VMs, just not the things you listed above from my perspective.

gshulegaard··on AMD Launches Ryzen 5000 Mobile: Zen 3 and Cezanne for Notebooks
Ah yeah, I have similar feelings.

BumbleBee was promising at one time:

https://github.com/Bumblebee-Project/Bumblebee/wiki/FAQ

But seems kind of dead now.

https://www.bumblebee-project.org/

gshulegaard··on AMD Launches Ryzen 5000 Mobile: Zen 3 and Cezanne for Notebooks
Graphics switching remains somewhat painful in the Linux ecosystem. There are options but nothing that quite achieves the seamlessness of Windows or Mac solutions.

Did you get the System76 with PopOS? I was impressed with my last one with the desktop menu that allowed graphics switching (albeit after a restart).

https://support.system76.com/articles/graphics-switch-pop/

Which I think is just a wrapper around the nvidia drivers, but at least I didn't have to install it myself and the menu location is a tad more convenient.

gshulegaard··on AMD Launches Ryzen 5000 Mobile: Zen 3 and Cezanne for Notebooks
Ah man, you are describing my ideal laptop as well.

I don't have a solution for you, but I have had good experiences with System76 in the past and am hoping that upcoming laptop refreshes should start to hit those points or me as well.

Ideally this gets a better screen:

https://system76.com/laptops/pangolin

Or this gets a Ryzen APU and a 16:10 aspect ratio:

https://system76.com/laptops/lemur

But those are dreams at this point...

gshulegaard··on Signal WhatsApp Chats Import
Are you sure about this?

> With Signal I can already add a new device and continue existing conversations without the other participants being notified that I've added a new device.

Just today I had a group chat notification that said:

"More than one member of this group is no longer marked as verified. Tap for options"

Tapping brought me to a menu that said:

"Safety Number Changes -- The following people many have reinstalled or changed devices. Verify your safety number with them to ensure privacy"

At which point I was given the option to re-verify (e.g. via a provided QR code), but also the option to manually mark "verified". That is to say something does notify participants of changes to recipient devices.

gshulegaard··on Signal WhatsApp Chats Import
I think it's astute of you to point out that the Signal developers do not value chat history the same way many people do, but I am not sure I track with this:

> It's not a technical issue - they just think you're wrong when you want to keep your conversations.

as much.

When you are treating security as a number one priority I think there are a lot of things that become technical issues which aren't typically. Transferring or backing up history between disparate devices, which become trusted at different times, is one of those things that I think _is_ difficult to do without sacrificing security.

For example, in the classic case when a user adds a new device and wants history to be available on both you can't let the devices controlled by one person simply sync with one another. To do so would be making a security concession to the other members of the chat in that they no longer verify every destination of their message. If you are unwilling to make a security concession everything in this area becomes magnitudes more difficult. I wouldn't say it is impossible, but it's definitely not trivial.

My gut reaction is also that it is difficult to _guarantee_ history in this type of security first mindset. If you add a new device and someone doesn't approve/verify/trade encryption keys with the additional client then there isn't much you can do besides not make that data available no? So I don't think it unreasonable for developers to hold the mindset that history is not a priority for a security first application.

gshulegaard··on What I’ve Learned in 45 Years in the Software Industry
Not quite the same. I moved away from Django some years ago when I ran into a bug that I traced back to the Django ORM. At the time it was neither obvious to fix nor easy to replace the Django ORM with something like SQL Alchemy.

It’s not necessarily about avoiding rewriting entirely, but rather minimizing the amount of rewrite required if you have to improve, change, or fix something. If your roadblock is in the framework, the bigger the framework, the more you have to rewrite.

gshulegaard··on Sony publishes an official Linux driver for Playstation 5 DualSense controllers
Eh, I feel like I have a 50% chance of a game working in proton. Age of Empires II works, but has multiplayer issues (which, while it "works" in GloriusEggroll's 5.21 build, that's about all it is since I get frame stutter / 13 FPS which I do not see in single player). Warframe is another game which kinda works, but can have some visual/audio quirks (audio issue being listed as fixed in GE 5.21 proton as well but I haven't tested it yet). On the more positive side, Witcher III works well enough for me to consider it "no tinkering needed"...so there are definitely success stories out there. I just wouldn't expect the majority of titles to "just work" at this point in time.

All in all, I stand by what I said in that Proton is great, but expectations should be tempered since it definitely has some rough edges still.

gshulegaard··on Sony publishes an official Linux driver for Playstation 5 DualSense controllers
Just to temper expectations, gaming on Linux is still not a plug and play type experience (although it is a LOT closer than it was 5 years ago).

Even games that have reasonable performance on Linux may require custom builds of Proton, winetrick startup modifications, etc. I love Proton and the work Valve has been doing, but I certainly feel the friction when gaming on Linux still.

gshulegaard··on Buy Don't Build
Hmmm, this is an interesting take, but I think you are expanding the scope of "core to _your_ business" a bit much. Product marketing, sales, and distribution are shared between _all_ businesses so unless you are a marketing, sales, or distribution company I (personally) wouldn't consider them part of the core business flywheel.

For example, let's pretend I have a fictional company that sells a web server. Marketing, sales, and distribution are all important parts of my business, but my "Core" business is the web server software. If I am looking to build reinforcing feedback loops that give me an advantage over time (flywheels) it's my opinion that you shouldn't be looking to build them (at least initially) in marketing, sales, or distribution.

gshulegaard··on Buy Don't Build
Ah, but if it is core to your business flywheel that is precisely where you should be spending the most time.
gshulegaard··on Buy Don't Build
I love this comment because it articulates a dynamic that I think is often overlooked much better than I could. I might even go a step farther and suggest that anything that is core to your business flywheel should be built and not bought (in general).

Mostly because you don't want pricing to act as a disincentive to exercising the flywheel.

gshulegaard··on Slack wanted to stay independent, but was unable to compete with tech giants
To add to this, bundling IE with Windows effectively killed the browser market. Netscape anyone? Microsoft was even subject to an anti-trust case centered around their IE handling:

https://en.wikipedia.org/wiki/United_States_v._Microsoft_Cor....

gshulegaard··on System76 – Pangolin
I believe that it's a reference to the colloquialism that references how matadors use red capes to fight bulls:

https://www.urbandictionary.com/define.php?term=seeing%20red

So Team Red -> Seeing Red -> Bull?

gshulegaard··on Twitter and Facebook's action over Joe Biden article reignites bias claims
Never said we should. Just because they are part of the problem doesn't mean they have to be part of the solution.
gshulegaard··on Twitter and Facebook's action over Joe Biden article reignites bias claims
I would second this and take it a step further and point out that the right to free speech is not the right to freely say whatever you want. This is particularly sticky when it comes to misinformation.

Currently we have systems which make misinformation more dangerous (primarily via amplification) and a bunch of people conflating free speech with the freedom to say whatever you want. I think what we still need to explore is whether or not there is a responsibility on individuals to be factually accurate when engaged in amplified speech. What does that even mean? Do you simply need to believe what you are saying at the time? Or is the standard higher? Is this responsibility shifted if you provide a citation (where the responsibility of the cited source shoulders some of the responsibility for your derivative thoughts)?

It's a particularly thorny issue. One that isn't necessarily new, but is particularly acute in contemporary times. I am against censorship, but I also recognize certain trends which seem to be deepening divides and strengthening conspiracy theories in our society.

gshulegaard··on The unreasonable effectiveness of the Julia programming language
I am not sure how much I agree with this. I have spent most of my professional career in Python and have watched the trajectory of type hinting in the Python ecosystem somewhat closely.

Python is not a statically typed language and yet type hinting sentiment seems to have gone from: "Why do you want it? Python isn't statically typed?" to "Well, mypy is a useful optional package" to "Let's just support type hinting in the language itself". Which is to say I think there is value to type checking by development tools even in dynamically typed languages.

--

On a slightly unrelated note, Julia seems to be similar to Python when it comes to types; that is to say both appear to be dynamically and strongly typed. But take that with a grain of salt as I don't have any first-hand knowledge of Julia.

gshulegaard··on ProtonMail CEO calls Apple's forced in-app purchases 'Mafia extortion'
I somewhat disagree. I think the gold standard would have been for Fortnite to simply increase the prices of IAP purchases on iOS devices to pass the 30% on to consumers who choose to use iOS IAP.

I can't seem to find a rule that says pricing must be the same for IAP as elsewhere in current guidelines:

https://developer.apple.com/app-store/review/guidelines/#sub...

That seems like the best of both worlds in the sense that as a user you can choose to purchase in iOS for convenience or go to Fortnite elsewhere and purchase there for cheaper. This move just seems like Epic wanted to pick a fight, they weren't actually interested in offsetting the Apple cut.

gshulegaard··on Toward a “modern” Emacs
I used Emacs as my exclusive DE when I was started programming (can't argue with free) but as I started coding professionally branched out to other IDEs; however, I am back to developing with Emacs 100% of my time. A rough history of editors would be:

* VisualBasic (HS)

* Emacs/R

* Spyder

* PowerBuilder/Emacs

* PyCharm

* SublimeText

* Visual Studio Code

* Emacs (but now full time)

Even when I wasn't using Emacs for the bulk of my development work, I still preferred it as my terminal editor of choice and fter having to configure Emacs from scratch several times, I finally decided to spend some time to try and make my Emacs config portable:

> https://gitlab.com/gshulegaard/my-emacs

My takeaway from doing that was both positive and negative. On one hand, Emacs is extremely customizable and it was pretty rewarding to get my set-up just right to fit my needs. On the other hand, it is extraordinarily time-intensive to do so. Even as a reasonably seasoned developer with almost a decade of experience _using_ Emacs, installing extensions and configuring them to work together is a pretty off-putting task.

For example, even before installing an extension you first have to answer, where do I want to download it from? To which there isn't an obvious answer. My personal config actually configures 4 separate package archives:

> https://gitlab.com/gshulegaard/my-emacs/-/blob/master/src/cu...

Once you have an extension installed, there can often be additional steps or dependencies which have to additionally be managed. Which I get; Emacs is not a IDE, it's an extensible text editor so it probably shouldn't try to be more than that. But if the goal is improving usage then I think improving extension management (and by extension configuration) should be the top of the list.

In my opinion, suggesting changing default key-bindings, right-click behavior, or theme are just dancing around the elephant in the room which is: The world has moved on from plain text editors and Emacs is just not as approachable as IDE counterparts.

Honestly, this might be fine! Even when using an IDE for development work I still reach for Emacs when doing terminal text editing or want to manage multiple shell buffers from a single SSH session. But if we want to have a discussion where the context is waning Emacs usage is a problem, I can't help but feel we have to start with extension and configuration management. It's hard to justify spending the time required to install and configure Emacs with extensions when there are alternative tools that require almost no additional components or offer nearly one-click installation processes (e.g. SublimeText and Visual Studio Code).

gshulegaard··on Things we learned running Postgres 13
I think this might provide more context which you are looking for (and your suspicion seems spot on!):

> This means more writes to do on updates and makes access to old row versions quite a lot slower, but gets rid of the need for asynchronous vacuum and means you don't have table bloat issues. Instead you can have huge rollback segments or run out of space for rollback.

https://stackoverflow.com/questions/25153532/why-is-it-a-vac...

Edit: Just wanted to explicitly call out that the Robert Haas article linked in the answer is excellent (I am still reading my way through it).

gshulegaard··on Monitoring your own infrastructure using Grafana, InfluxDB, and CollectD
ClickHouse's intial release was circa 2016 IIRC. The work I was doing at NGINX predates ClickHouse's initial release by 1-2 years.

ClickHouse was certainly something we evaluated later on when we were looking at moving to a true columnar storage approach, but like most columnar systems there are trade-offs.

* Partial SQL support.

* No transactions (not ACID).

* Certain workloads are less efficient like updates and deletes, or single key look ups.

None of these are unique to ClickHouse, they are fairly well known trade-offs most columnar stores make to improve write throughput and prioritize high scaling sequential read performance. As I mentioned before, the amount of data we were ingesting never really reached the limits of even Postgres 9.4, so we didn't feel like we had to make those trade-offs...yet.

I would imagine that servicing ad events is several factors larger scale than we were dealing with.

← PreviousPage 3 of 19Next →