Readit News logoReadit News
ryan-duve commented on VimDrill: A touch typing trainer for Vim   vimdrill.com/... · Posted by u/thunderbong
ryan-duve · 2 months ago
I only spent a minute on the trainer, but my recommendation is to change the user experience from "type M 5 times in a row" to something like "get to the target with a single keystroke". Without any expertise is making a Vim training program, I feel like showing someone a goal and having them think of what keystrokes gets them there will be more effective than telling them the keystroke and having them type it 5 times consecutively.
ryan-duve commented on P-Hacking in Startups   briefer.cloud/blog/posts/... · Posted by u/thaisstein
ryan-duve · 2 months ago
Good news: no p-value threshold needs to be passed to switch from one UI layout to another. As long as they all cost the same amount of money to host/maintain/whatever, the point estimate is sufficient. The reason is, at the end of the day, some layout has to be shown, and if each option had an equal number of visitors during the test, you can safely pick the one with the most signups.

When choosing one of several A/B test options, a hypothesis test is not needed to validate the choice.

ryan-duve commented on Why Pandas feels clunky when coming from R (2024)   sumsar.net/blog/pandas-fe... · Posted by u/Tomte
ryan-duve · 3 months ago
I wonder if the author would have thought Pandas feels less clunky if they knew about `.eval`?

    import pandas as pd


    purchases = pd.read_csv("purchases.csv")

    (
        purchases.loc[
            lambda x: x["amount"] < 10 * x.groupby("country")["amount"].transform("median")
        ]
        .eval("total=amount-discount")
        .groupby("country")["total"]
        .sum()
    )

ryan-duve commented on California is nearly out of license plate numbers   sfchronicle.com/californi... · Posted by u/rntn
ryan-duve · 4 months ago
> The current 9-series configuration, which will end with 9ZZZ999, is projected to end sometime in 2026... The next generation of license plates will flip that structure on its head, moving to a “Numeral Numeral Numeral Alpha Alpha Alpha Numeral” format — such as 000AAA0.

Does anyone know why they care about this structure? Naively, there are 36^7 (minus edge cases) combinations available, which will always be sufficient.

ryan-duve commented on Mark Zuckerberg says social media is over   newyorker.com/culture/inf... · Posted by u/FinnLobsien
arch_deluxe · 4 months ago
You might be interested in FreeFollow.org [full disclosure, I'm one of the engineers working on it].

It combines the economic model of web hosting (users pay to host spaces, reading is free, and writing in someone else's space is also free), the simple UI of social media (you have a profile and write posts), and the E2EE security model of 1Password (we actually implemented their published security model). It's also a non-profit so there's no pressure from owners to exploit users.

It's aimed primarily at parents of young kids who are annoyed at constantly sharing via text groups, but non-parents are also surprisingly into it.

ryan-duve · 4 months ago
When I click "Join the waitlist" on Firefox I see an empty beige box on an otherwise blank page.
ryan-duve commented on Max severity RCE flaw discovered in widely used Apache Parquet   bleepingcomputer.com/news... · Posted by u/andy99
marginalia_nu · 5 months ago
I migrated off apache parquet to a very simple columnar format. Cut processing times in half, reduced RAM usage by almost 90%, and (as it turns out) dodged this security vulnerability.

I don't want to make too harsh remarks about the project, as it may simply not have been the right tool for my use case, though it sure gave me a lot of issues.

ryan-duve · 5 months ago
What "very simple columnar format" did you switch to?
ryan-duve commented on DeepMind program finds diamonds in Minecraft without being taught   nature.com/articles/d4158... · Posted by u/Bender
danijar · 5 months ago
Hi, author here! Dreamer learns to find diamonds from scratch by interacting with the environment, without access to external data. So there are no explainer videos or internet text here.

It gets a sparse reward of +1 for each of the 12 items that lead to the diamond, so there is a lot it needs to discover by itself. Fig. 5 in the paper shows the progression: https://www.nature.com/articles/s41586-025-08744-2

ryan-duve · 5 months ago
For the curious, from the link above:

> log, plank, stick, crafting table, wooden pickaxe, cobblestone, stone pickaxe, iron ore, furnace, iron ingot, iron pickaxe and diamond

ryan-duve commented on Pytest for Neovim   github.com/richardhapb/py... · Posted by u/richardhapb
Jackevansevo · 5 months ago
For the longest time I've been using vims built-in `compiler` feature with tartansandal/vim-compiler-pytest combined tpope/vim-dispatch
ryan-duve · 5 months ago
Could you share an example of a workflow using the built in feature to run tests in Vim?
ryan-duve commented on Architecture Patterns with Python   cosmicpython.com/book/pre... · Posted by u/asicsp
kelafoja · 5 months ago
Could you explain how repository pattern is a "huge overkill that adds complexity with very little benefit"? I find it a very light-weight pattern and would recommend to always use it when database access is needed, to clearly separate concerns.

In the end, it's just making sure that all database access for a specific entity all goes through one point (the repository for that entity). Inside the repository, you can do whatever you want (run queries yourself, use ORM, etc).

A lot of the stuff written in the article under the section Repository pattern has very little to do with the pattern, and much more to do with all sorts of Python, Django, and SQLAlchemy details.

ryan-duve · 5 months ago
TL;DR, YAGNI

I had a former boss who strongly pushed my team to use the repository pattern for a microservice. The team wanted to try it out since it was new to us and, like the other commenters are saying, it worked but we never actually needed it. So it just sat there as another layer of abstraction, more code, more tests, and nothing benefited from it.

Anecdotally, the project was stopped after nine months because it took too long. The decision to use the repository pattern wasn't the straw that broke the camel's back, but I think using patterns that were more complicated than the usecase required was at the heart of it.

ryan-duve commented on Architecture Patterns with Python   cosmicpython.com/book/pre... · Posted by u/asicsp
BerislavLopac · 5 months ago
Some parts of this book are extremely useful, especially when it's talking about concepts that are more general than Python or any other specific language -- such as event-driven architecture, commands, CQRS etc.

That being said, I have a number issues with other parts of it, and I have seen how dangerous it can be when inexperienced developers take it as a gospel and try to implement everything at once (which is a common problem with any collection of design patterns like this.

For example, repository is a helpful pattern in general; but in many cases, including the examples in the book itself, it is a huge overkill that adds complexity with very little benefit. Even more so as they're using SQLAlchemy, which is a "repository" in its own right (or, more precisely, a relational database abstraction layer with an ORM added on top).

Similarly, service layers and unit of work are useful when you have complex applications that cover multiple complex use cases; but in a system consisting of small services with narrow responsibilities they quickly become overly bloated using this pattern. And don't even get me started with dependency injection in Python.

The essential thing about design patterns is that they're tools like any other, and the developers should understand when to use them, and even more importantly when not to use them. This book has some advice in that direction, but in my opinion it should be more prominent and placed upfront rather at the end of each chapter.

ryan-duve · 5 months ago
> And don't even get me started with dependency injection in Python.

Could I get you started? Or could you point me to a place to get myself started? I primarily code in Python and I've found dependency injection, by which I mean giving a function all the inputs it needs to calculate via parameters, is a principle worth designing projects around.

u/ryan-duve

KarmaCake day738October 4, 2020View Original