HNHacker News
TopNewBestAskShowJobs

emptysea

534 karma · joined June 23, 2018

submissionscomments
emptysea··on Software testing, and why I'm unhappy about it
yeah I think the system is a combination, although I'm not sure the intricacies tbh

I've heard google does something fancier where they take a test, run it a bunch after it fails to check if it's failed

I think the system at work only runs each test a couple times before giving up and marking it failed

emptysea··on Software testing, and why I'm unhappy about it
when the codebase gets large enough you need to allow some tests to "fail" but really I mean you need a way to quickly mark a failing test as flakey so the author can fix it while everyone else can get on with their day and merge code.

At $dayjob this works well, if your CI comes up red with some unrelated test failing, you can mark the test as flakey in the UI and CI will allow your code to merge and a Jira ticket will be created for the test owner to fix their test (and it will be disabled for future test runs)

I think for small to medium projects, you can have all tests succeed but once the repo is large enough / has frequent enough changes, flakey tests are bound to slip in.

emptysea··on NYC Slice
If you're in the Boston area go to Bagel world (technically not in Boston, but a little north of it)

edit: for crossiants and other treats, A.J. King is my fav -- they supply a lot of the Boston cafes

Kane's for donuts

emptysea··on Django Styleguide
I think as a concept a task queue with some workers makes a lot of sense but having used Celery in production, it leaves a lot to be desired

We’ve run into various bugs and weird performance gotchas (like the workers prefetch jobs which is terrible if they aren’t all the same size)

emptysea··on MT-Propeller 11 blade propeller delivers 15% increase in static thrust
Interesting so basically the more blades, the less efficient it gets but you get more thrust

Sort of makes sense why drones have a couple blades so they can putter along for hours

emptysea··on The YC Founder Directory
Search is really quick and a look under the covers shows it’s using algolia + s3 for images
emptysea··on Two surprises in browser crashes
That report API is interesting, I’ve seen it used for csp errors but not for browser errors, I wonder if error monitoring services support it
emptysea··on Two surprises in browser crashes
At least for me when building things the first thing I install after setting up a project is Sentry.

They have a generous free tier and are open source so that’s a plus too

emptysea··on Pyright: Static Type Checker for Python
If you have a tagged union type with Boolean literals as the tags, like in the slack api, then you can’t say ‘if not res.ok’ to narrow the type, you have to say ‘if res.ok == True’

Which isn’t very pythonic imho

Also I’m pretty sure ‘if res.ok is True’ doesn’t work

emptysea··on Once an open sewer, New York Harbor now teems with life
Sewage still goes in the river during heavy rains at the numerous sewage outflows

I think it’s technically a combined sewer system that has both street water and sewage so when it rains, the system gets overloaded.

Fixing the sewer system is a massive project

emptysea··on Pyright: Static Type Checker for Python
Pyright doesn't support narrowing based on object truthiness and some other python isms.

In my experience, mypy tends to be more correct and correctly understands more python code.

For example, the following won't type check in pyright (it doesn't infer the type of out):

    out = []
    for x in bar:
      out.append(x \* 2)
    return out
Edit: also pyright's vendoring of type stubs is annoying as they take precedence over downloaded type stubs.

Edit2: also lack of plugins, makes using things like Pydantic less type safe compared to mypy

emptysea··on Databases in 2022: A Year in Review
I’m not well versed in the tech but is Spanner the sort of dynamic sharding approach your talking about?
emptysea··on Gripes with RSS after one week
Ditto, that’s what Feedly does as well

Additionally, the social features the OP mentions are helpful in determining which RSS feed is the right one since some sites have multiple.

emptysea··on Auth.js Authentication for the Web
I've used things like django-allauth before and it's honestly not that hard to implement OAuth flows yourself and then you don't have to learn the ins and outs of someone else's API (i.e., allauth's numerous config settings).

Not sure this applies to Auth.js, but with hosted offerings, it's really hard to migrate off. Like how do you get the passwords into your system without forcing everyone to reset them?

emptysea··on The return of lazy imports for Python
Typing in python is pretty thorough nowadays, you’ve got overloads, literal types, strict null checking, unions

It’s a more advanced type system than Go and Java

emptysea··on Devpod: Remote development environment at Uber
Wonder how it handles things like dot files?

Also does it automatically install dependencies? Feel like running npm install each time (or the equivalent) would be slow.

emptysea··on SWR 2.0 – React Hooks for Data Fetching
With `useSWR` the return type is

    export interface SWRResponse<Data = any, Error = any> {
      /**
       * The returned data of the fetcher function.
       */
      data: Data | undefined
      /**
       * The error object thrown by the fetcher function.
       */
      error: Error | undefined
      mutate: KeyedMutator<Data>
      isValidating: boolean
      isLoading: boolean
    }
 

https://github.com/vercel/swr/blob/14956a840ac9b75fe321bf846...

so if I check `isLoading` in my component then typescript isn't able to narrow/refine the type to something more specific since it isn't a sum type.

While with react-query, it's a proper sum type that can be differentiated by checking `isLoading`.

The type is actually quite long so here's just a bit

    export type QueryObserverResult<TData = unknown, TError = unknown> =
      | QueryObserverIdleResult<TData, TError>
      | QueryObserverLoadingErrorResult<TData, TError>
      | QueryObserverLoadingResult<TData, TError>
      | QueryObserverRefetchErrorResult<TData, TError>
      | QueryObserverSuccessResult<TData, TError>


    export interface QueryObserverLoadingResult<TData = unknown, TError = unknown>
      extends QueryObserverBaseResult<TData, TError> {
      data: undefined
      error: null
      isError: false
      isIdle: false
      isLoading: true
      isLoadingError: false
      isRefetchError: false
      isSuccess: false
      status: 'loading'
    }
https://github.com/TanStack/query/blob/9b21609350d9ad41faf5c...

The key point in the type above is `isLoading: true` and `data: undefined`, which means if I check `isLoading === true`, then typescript knows the data is not available.

SWR doesn't provide these guarantees.

emptysea··on SWR 2.0 – React Hooks for Data Fetching
I think the big difference between react-query and its competitors like SWR is typescript support.

React-query has proper sum types for its hook’s return value

emptysea··on Stripe’s real pricing: a primer
I’m pretty sure adyen requires a decent amount of volume before they will allow you to use them, like in the 10s of millions.

Stripe provides self serve with is nice for getting started and I’m guessing once you’re big enough to jump to adyen, you can likely get a discount on the sticker price since you have bargaining power

emptysea··on It’s not Tourette’s but a new type of mass sociogenic illness
I’m guessing they’re looking for a reaction. Similar to people driving by and yelling out the window
emptysea··on BloomTech, previously Lambda School, cuts half of staff
Hit or miss really. Like anyone hiring is difficult but I wouldn't shy away from hiring someone with a bootcamp experience
emptysea··on Bringing Codecov into the Sentry Family: Where Code Coverage Meets Am
I’d be interested to see if sentry integrates their performance monitoring tooling into test suites.

Would be super nice to be able to look at the sentry dashboard to find slow tests rather than having to break out the profiler

emptysea··on Why People Think PHP Sucks (2014)
Laravel is way ahead of Django in terms of batteries included and developer experience. As a Django user, I’m jealous!
emptysea··on Monica: Open-source personal relationship manager
Curious to learn more about the rewrite, do you have and docs handy?

Edit: should have scrolled down more: https://news.ycombinator.com/item?id=33612776

emptysea··on How PlanetScale Boost serves SQL queries faster
Startup I worked at paid like 100k + equity for a two word .com domain name and it wasn’t anywhere near as nice of name as planet scale is
emptysea··on How PlanetScale Boost serves SQL queries faster
I’m really curious how this works and how it’s implementation compares to something like materialize — I wonder if there are any caveats around consistency
emptysea··on Ask HN: Is React impacted by Meta layoff?
what is `tag-ish`? Having trouble googling it
emptysea··on Ask HN: Is React impacted by Meta layoff?
Interesting, does it cross compile a hack based DSL to iOS and android?

Curious to hear more!

emptysea··on Crunchy Bridge's Ruby Back End: Sorbet, Tapioca, and Parlour
Infer kind of does this, it has multiple frontends and provides linting capabilities

https://fbinfer.com

emptysea··on Passage Is Joining 1Password
Seems like an Auth0, Okta, Clerk alternative.

1Password moving into the developer space?

← PreviousPage 3 of 8Next →