HNHacker News
TopNewBestAskShowJobs

codekansas

726 karma · joined October 19, 2016

AI research @ OpenAI

Fmr: YC W24, AI researcher at FAIR, Autopilot ML engineer at Tesla FSD

Personal website: https://ben.bolte.cc/

submissionscomments
codekansas··on Using Mypy in Production
I don't think you're understanding their use case, they aren't building some Flask service, they're an ML drug discovery company supporting research scientists and as such they're more or less building a framework. There's a lot of code reuse and most large orgs building similar frameworks have adopted similar code quality standards - think PyTorch, Fairseq, Pytorch Lightning, Huggingface - which is why tools like MyPy / PyLint / Black exist. For people who have used those libraries there is a night-and-day difference between the anything-goes ones and the ones that do linting and unit testing.
codekansas··on Using Mypy in Production
As someone who owns multiple label makers and organizes my utensils by type when I put them into the dishwasher I really like Mypy. Cool writeup, good points. I think a lot of people (ML scientist people especially) who haven't been forced to use a type checker don't realize the productivity benefits of having a type checker running on your whole codebase - they only see the annoying slow-down of having to do things a particular way and having the type checker bug you for inconspicuous errors.

Example: One pattern (which I don't think a lot of people are familiar with?) that I started adopting recently is the use of `Literal` for type-checking strings. For example, instead of something like

(on closer reading I realized this was in the blog post as well, but I suspect maybe some ML people will have seen this specific case before)

  class ActivationType(enum.Enum):
    sigmoid = "sigmoid"
    tanh = "tanh"

  def get_activation(key: str | ActivationType) -> nn.Module:
    key = ActivationType[key]
    if key == ActivationType.sigmoid:
      return nn.Sigmoid()
    if key == ActivationType.tanh:
      return nn.Tanh()
    raise KeyError(key)
you can do something like this instead:

  from typing import Literal

  ActivationType = Literal["sigmoid", "tanh"]

  def get_activation(key: ActivationType) -> nn.Module:
    if key == "sigmoid":
      return nn.Sigmoid()
    if key == "tanh":
      return nn.Tanh()
    raise KeyError(key)
The advantage is that you can do something like

  act = get_activation("tahn")
and Mypy will show an error for your typo (instead of having to run your code and eventually hit the `KeyError`). So if you're just trying to quickly implement an idea, you don't have to kill brain cells searching for typos.

Of course, doesn't make a difference if your coworkers all use Vim and Emacs with no extensions...

codekansas··on Anarchy Works (2010)
Honestly this gave me a good chuckle. There was a recent rerun on the Freakonomics podcast about American hyperindividualism and how it leads to us having an unusually high rate of violent crime, which is definitely something I saw play out. Like if CHAZ had happened in Japan (which would have been pretty weird from the premise) it probably wouldn’t have ended with a bunch of shootings and turf wars
codekansas··on Anarchy Works (2010)
Yeah a lot of local businesses did hire private security, but then there were a bunch of random plainclothes dudes with guns walking around, which wasn’t great for business. The soccer field is publicly funded so I guess the city government could have hired private security but I’m not sure the police union would’ve been happy about it

Also this sounds like the “no true Scotsman” thing. Some of the people in the zone were self described anarchists, they were setting up co ops and volunteer medical services, and if it had succeeded (meaning, not been overrun by violent crime) I’m sure people would have pointed to it as a model of anarchist principles in action.

codekansas··on Anarchy Works (2010)
I lived in Capitol Hill in Seattle during the formation of CHAZ. Anyone interested in anarchism in America should read up on what happened there because it was effectively a month-long stretch where the Seattle city government just abdicated a few blocks. In that short period of time a local rapper with a bunch of guns started patrolling the streets at night, some kids got shot, some murals got painted, parts of a field got torn up to make a crappy community garden. It was a wild ride. Finally got steamrolled by SPD when another two kids were shot.

Wikipedia: https://en.m.wikipedia.org/wiki/Capitol_Hill_Occupied_Protes...

codekansas··on Electric Vehicles as a Subscription
I got excited initially when I thought this was something that would work for day-trips. I recently moved to NYC and sold my Tesla, so the idea of being able to borrow a Tesla for two or three days to get out of the city is definitely something I'd pay $400-500 dollars for if it meant not having to worry about insurance and where to park it when I'm done.
codekansas··on Edible insects role in transmission of parasitic diseases to humans (2019)
Could just be because they're hard to catch in bulk compared to other prey
codekansas··on Economists are revising their views on robots and jobs
OP owns a CNC shop which is almost tautologically capital
codekansas··on Agatha Christie could afford a maid and a nanny but not a car
Is it impossible to believe that someone harvesting corn with a combine would be able to sell it for cheaper than if they had harvested it by hand?
codekansas··on Economists are revising their views on robots and jobs
Well, and to the people buying your products, presumably
codekansas··on The history of the end of poverty has just begun
I wonder if there were some sort of metric that could account for parity in the power in purchasing between two locations?
codekansas··on The Great Resignation? More Like the Great Renegotiation
Presumably if the meat packers also raise wages to keep up with inflation, they will have to charge McDonald’s higher prices for patties. Similarly for lettuce growers, beverage bottlers, etc. All these would put small amounts of pressure on the price of a burger. If the ultimate price ends up going from 2$ to 3$, suddenly the 10$ to 15$ wage hike doesn’t mean anything (except for people who didn’t get the wage hike in the first place).
codekansas··on HistoEnder: A 3D printer-based histological slide autostainer
Yeah I think that's why in the US as well, but I think it reflects a lack of sense of urgency for figuring out how to do it more cheaply. Compared to hospitals in Vietnam, for example, where sanitization standards are much lower, they do a lot more creative stuff to save on costs. It leads to worse outcomes, of course, but if they insisted on the highest quality care for everyone then a lot fewer people would get care in the first place
codekansas··on HistoEnder: A 3D printer-based histological slide autostainer
This is cool. I frequently find that medical people (at least in America) are intentionally ambivalent towards how much things cost - charitably, for patient care at least, you want the highest quality care for everyone, and skimping on cost could compromise someone's health. The idea that something being more expensive makes it more scarce, as obvious as it would seem, is often a secondary consideration.

Example: My wife is in surgery, and has told me how surgical tools often come billed as a set. Rather than being able to bill for a single tool, if an operation requires another duplicate of the same tool the surgeon will often just open an entire new set.

Another example: In college I build a tDCS machine [1] for about $20. I knew a doctor from the VA who was working in the area who showed me one with essentially the same circuit which sold for $80,000 - essentially for the stamp of approval from the FDA to use it in a clinical research setting.

There are reasonable-sounding explanations for both things I guess, but the obvious consequence is that the number of people able to receive care is dramatically lower. I feel like there are probably similar analogies in technology, but maybe they are more easily disrupted because of lower regulatory barriers.

[1] https://www.hopkinsmedicine.org/psychiatry/specialty_areas/b...

codekansas··on Letter from Union Pacific to LA District Attorney re: train thefts, safety [pdf]
Personally I'd rather not have big businesses carrying out vigilante justice to secure their property
codekansas··on Google hired union-busting consultants to convince employees “unions suck”
Partly this is a consequence of the relatively small number of unions compared to corporations (which is by design). For example, if you work in the auto industry, there are a lot of different corporations you could work for but only one major union. It also means that you generally have more choice in your employer than your union representation.
codekansas··on The Rise of Performative Work
Presumably Barack Obama
codekansas··on IQ decline and Piaget: Does the rot start at the top? [pdf]
Huh, I hadn't thought of this. I suppose pre-natal planning and IVF would also qualify. Reminds me a bit of the Freakonomics piece about abortion and crime [0] [1] I remember it was extremely controversial when it came out

[0] https://freakonomics.com/2005/05/abortion-and-crime-who-shou...

[1] https://freakonomics.com/podcast/abortion-and-crime-revisite...

codekansas··on IQ decline and Piaget: Does the rot start at the top? [pdf]
In a normally functioning system, intelligent individuals should naturally have more bargaining power, because their skills are more in-demand. However, medical residency is set up in such a way that your bargaining power is delayed until after you finish, because if you leave you are basically blacklisted from the whole field. This benefits the people who have made it out the other side, who are also the people in a position to effect change
codekansas··on IQ decline and Piaget: Does the rot start at the top? [pdf]
In the modern world, is there any evolutionary selection for intelligence? I can think of at least a few which are against

Anecdotally, my wife is applying for surgical medical residencies, a field which generally attracts intelligent, ambitious individuals. The whole system seems downright hostile to having children. It obviously wasn't designed with women in mind, and the entire system has been intentionally ossified to prevent it from responding to the desires of residents, for the benefit of attending physicians. I imagine there are a large number of similar industries. This has definitely impacted our plans for children, and it wouldn't be an issue if she were considering a less competitive specialty. In fact, it seems that the very selectivity which ensures that the program is filled with intelligent people is used as justification for intense hours and lack of maternal support.

In my opinion this is the sort of externality that would benefit from government intervention in some way. However, I don't think financial support would be very good at targeting such cases. I think the reason that tech companies have done a better job of providing child care support is that the field doesn't have the same sorts of institutional barriers to responding to employee demands that medicine does - specifically demand by employees in their prime child-rearing ages.

codekansas··on Facing housing crisis, L.A. voters back duplexes in single-family neighborhoods
Not after Prop 19
codekansas··on Facing housing crisis, L.A. voters back duplexes in single-family neighborhoods
Isn't this effectively what Prop 13 did in 1978? If anything it has greatly reduced the incentive to upzone, because homeowners in highly desirable areas don't pay taxes commensurate to the increasing desirability of the area they live in, while having the additional negative effect of burdening renters and newcomers with higher property taxes
codekansas··on Amazon is using algorithms with little human intervention to fire Flex workers
In the Cory Doctorow book "walkaways" there's this central version controlled repository that basically makes all the decisions for this commune about who should do what. Anyone can contribute to it (although AFAIR the review process wasn't too fleshed out).

Regarding Amazon, Uber and other "instant employment" type companies - it's a weird world, where you can basically get automatically hired and fired by an algorithm. It creates, in theory, full employment (although not very good employment, at least right now) and gives workers more leverage if they want to quit another job, but also more instability if the rules for the new job aren't made clear or are applied arbitrarily. It also feels like we're in a very nascent stage for this. Maybe this could be done better - it seems like an area that is ripe for disruption.

codekansas··on Crypto miners are killing free CI
Crypto actively rewards anti productive behavior. I wonder how many smart, ambitious people will decide to exert their talents doing basically useless stuff simply because of the financial incentives
codekansas··on Apple commits $430B in US investments over five years
I find it pretty weird whenever I read about company news on one of these corporate blogs. The writing and layout feels like they're hoping people will think it's a third party source and not notice the URL
codekansas··on Amtrak's 2035 map has people talking about the future of U.S. train travel
That plus the clear difference that funding trains would basically mean subsidizing the operations of a few large companies, while anyone can drive on publicly funded roads
codekansas··on Berlin rent cap overturned by Germany's top court
In some US cities like Portland the construction costs for public housing are typically double costs for comparable private housing. The government has little motivation or expertise to reduce the cost since the bill is footed by the public. Seems much more parasitic in my opinion
codekansas··on Surely We Can Do Better Than Elon Musk
A bit off topic, but what is the cut off to be a self-made man instead of privileged? Obviously most people would prefer to conceptualize themselves as the former, and most anti capitalists such as Robinson prefer to conceptualize people as the latter, and it mostly seems like a matter of semantics and/or confirming your priors
codekansas··on Ask HN: Who's winning 2030's Turing Award ?
Major coup if the Turing Award can win a Jeff Dean
codekansas··on The Economic Consequences of Increasing Sleep Among the Urban Poor
Read the abstract...
← PreviousPage 5 of 7Next →