Better HN
topnewbestaskshowjobs
Log inSign up

chrstphrhrt

289 karma · joined Dec 1, 2011 (15y ago) · 193 submissions

Submissions

comment 6y ago · link · parent

If you want to integrate with the data science ecosystem, would you use modern Python for APIs as well, or do Go services with minimal Python bits?

EDIT: coming from someone who has had great experiences with FastAPI and Uvicorn combined with Dask and Redis.

comment 6y ago · link · parent

Do you track down their email or just send a message on LinkedIn? How customized are the initial communications (e.g. common elements per type of work or type of company)?

comment 6y ago · link · parent

Yeah, we've graduated to using militarized police to do that for a while now.

comment 6y ago · link · parent

I'm working on a project that depends on Graphene and Django (not my choice). Any ideas off hand about doing the same thing there? IIRC Django can also use SQLAlchemy but it didn't used to be very nice back in the day.

comment 6y ago · link · parent

Too bad it got hobbled on the last Mac update. With Metal I find it completely unplayable and it doesn't do fullscreen.

6.

Ask HN: How to transition (back) into frontend dev?

1 points · by chrstphrhrt · 6y ago · discuss

comment 6y ago · link · parent

Agree 110%, and I want to take your notion as a cue to expound a little more from personal trauma :)

I find OOP useful for configuration and library-level APIs (e.g. for injecting dependencies and wrapping things), when there is really zero expectation that a user should have to understand the class definition entirely. But that's about it.

Where it seems to break down for me is when classes are actively used at the application implementation level for general encapsulation. E.g. data access layers. This can be done perfectly fine with modules/packages. Adding inheritance is just asking for trouble in a team setting IMHO.

Trouble comes when there is no clear peer review and style policy to avoid classes for anything other than config or distributing libraries (as separate projects). What ends up happening is a proliferation of subclasses or method overrides when developers are in a rush to ship features without understanding the whole codebase. This is a technical loan with very high interest.

It makes sense rationally in the moment, as classes have an inviting feel to the user as a kind of grab bag of related functionalities that are easily introspected (at first). Compare it to searching through docs for all the different namespaces in a package and learning what types their various functions support, it requires more thought and grasping the concepts of the library. Alternatively, a class with a broadly defined purpose starts to look like a common utility to throw things at. It's a grab bag of stuff that is more amenable to hacking with blinders on, in a way.

Next thing you know the chains of inheritance and method overrides have grown into a very hard to disentangle hydra. The accumulated overhead of maintaining it is compounded by the debugging challenge of knowing where exactly a given instance is coming from and which layers it has been through on its way to a given breakpoint.

comment 6y ago · link · parent

Can't wait to see what a judge thinks about this.

comment 6y ago · link · parent

Same thing happens on HN. Comments that go against the kooolaid-driven white saviour ethos of certain VC-backed ideas are often downvoted. Still not as bad as popular Reddit subs though.

There is so much dystopian doublespeak in startup marketing, and people continue to believe it, because not doing so threatens their careers. Of course there are also many startups out there that actually do improve lives, but I wouldn't say it's the majority.

comment 6y ago · link · parent

Aaand I finally read the article and PEP and there's no escape from the GIL :( Damn wishful thinking.

comment 6y ago · link · parent

True true, my comment was not clear. With asyncio it's still a single threaded event loop (that can be clustered like Node or any Python processes as has always been done).

With sub-interpreters, I wonder how different it is from normal multithreading like in JVM. Need to read up on this idea. I can't see how it wouldn't require the same locking and mutexes or message passing if multiple interpreters are to work on logically related data.

So my immediate thoughts were about leveraging it as a replacement for multithreading and event loop clustering by treating the interpreters as lightweight processes and having them communicate over some kind of protocol. Like how the BEAM does built-in process supervision.

The "supervisor" process itself is async in the way it coordinates the tree.

comment 6y ago · link · parent

This makes sense. Combine it with asyncio and you have a full Node-like runtime without relying on Uvicorn and the like (even though clustering is still good for scaling).

13.

Language skills more important than math to learn programming, research shows(massivesci.com ↗)

13 points · by chrstphrhrt · 6y ago · 2 comments

comment 6y ago · link · parent

If it's your primary residence that you live in for e.g. 80% of the year and you swap with other primary residences or actually stay in normal hotels when travelling, I can't see any distortion there.

Not trying to apologize for hosts or hotels in particular, I just feel like primary residence swapping is pretty harmless. Also, if hotel licenses are required, how is adding more hotels distorting the hotel market other than adding a tiny amount of fair and regulated competition?

comment 6y ago · link · parent

Nice downvotes, found the sycophant Airbnb managers who just fired everyone :)

comment 6y ago · link · parent

Hoarding shelter should be outlawed anyway. Or hotel licenses should be required with massive fines for evasion. Get a real job "hosts" (a disturbing doublespeak term for parasite).

The original evolution of couch surfing that Airbnb started with was still cool and I like to be able to let my apartment when out of town. It's the rent seeking behaviour that distorts the housing market.

comment 6y ago · link · parent

Yep. I’ve been on a few remote teams where I write a lot (in plain language too), and have found that if my audience is non-technical management that they simply don’t read it. Decisions continue to be made on their gut whims despite access to the critical information.

I guess that what the article is on about. Writing on its own isn’t enough, the culture must be set top-down to include reading and value added communications as well.

I think a lot of workers who do not have a craft per se just want to coast and pretend to work, and get offended or embarrassed when they encounter serious contributors that make them look useless.

There is an attitude toward the writer of “if you know the topic so well, then just handle ‘it’ and get ‘it’ done”. Unfortunately their idea of “it” has nothing in common with what is described or advocated in the writings.

comment 6y ago · link · parent

Internet access is a human right that flows from the right to education.

comment 6y ago · link · parent

Replace car parks with social housing.

comment 6y ago · link · parent

This is especially useful for those of us who have grown up thinking of ourselves as smart and becoming very identified with intelligence as personality. It can lead to anxiety disorders because sometimes rumination and thinking harder just can't help explain things. Listening to nature and letting it happen to us is such a sweeter ride than trying to carry around a simulation of everything.

comment 6y ago · link · parent

This can sometimes lead to burnout for me. When I blindly try to please no matter what, it also raises the bar of expectations. Sometimes people just want to feel superior and will take advantage, which can be hard to see in the moment.

comment 6y ago · link · parent

What are your thoughts on the welfare state and its compatibility with your freedom? What do you think about homelessness?

comment 6y ago · link · parent

I used to love Stoic thinking and read the usual primary sources a few years ago. I still do love it and practise it.

However, I became more and more turned off by the modern company of success porn bros who use it as a kind of macho way to justify not caring about others. This is not the truth of it, as Stoic ethics is about concentric circles of concern emanating outward (family, friends, community, country). I wish there was more focus on that.

comment 6y ago · link · parent

Is that any way related to dollar cost averaging?

-not an investor

comment 6y ago · link · parent

Just to add a bit on that, if you dynamically generate channel names according to a validatable naming convention that any consumer can predict (ideally with a client lib for generating them), you can do pretty complex message passing that doesn't blow up code complexity. Combine that with the locking and consumer groups built in, it's pretty much distributed computing "for free" even if stuck with multiprocessing for runtime scaling (e.g. Python/JS without the builtin concurrency or multithreading of VMs/hosted languages).

comment 6y ago · link · parent

STREAMS, best pubsub solution imho. I used it as a backing store for an MQTT frontend once, and also for generally coordinating worker processes to handle background tasks.

27.

Lenovo will start offering ThinkPads with Linux pre-installed(techspot.com ↗)

6 points · by chartpath · 6y ago · discuss

comment 6y ago · link · parent

Self-reply: I found these two but haven't tried them.

https://github.com/pelotom/runtypes

https://github.com/ianstormtaylor/superstruct

comment 6y ago · link · parent

Same. I have tried using it and enjoyed the IDE powers a bit more, but already knowing JS quite well, it wasn't a game changer.

Lately I have started using FastAPI in Python, which uses Pydantic to enforce type hints at runtime. This saves a lot of manual checking code (e.g. "if input_data["mykey"] == "unhappy path": raise ValidationError").

This was the same annoyance in Node.js because the types are so flimsy and manually checking is really boring. Tests are great but if you can have correctness while rapidly prototyping that would seem to be a win.

Is there a great TS lib to do runtime type reflection like Pydantic?

comment 6y ago · link · parent

But you can't contract to do something illegal, and contracts must have consideration ("this for that"). Not sure what their test for excessiveness was.

Reminds me of predatory lending rules like charging more than X% interest is excessive.

1234567