what i really want to see from this article is a curve showing a tradeoff between speed and embedded text quality. there's the preamble that just going by character has quality problems, but i dont think delimiters are necessarily the best either, vs being able to find paragraph or even chapter boundaries.
how much of a problem is it that ~1 sentence per chunk gets corrupted in the by-character solution? what level of sentence corruption is left in by switching to these delimiters? what level of paragraph/idea corruption is left in with each? chapter/argument level?
but also dont try coding on a laptop. use a proper desktop, or better yet, get time on a mainframe. the problem has been solved forever, juat do work from the workplace at a dedicated terminal, built for doing that work at.
Not coding on a laptop is actually good advice?! My argument would be that you shouldn't be doing any work without plugging your laptop into a full size keyboard and mouse at least. And, ideally, at least one external display of some form (I recommend 2 or 3, but it depends on exact setup/total resolution/etc.). But it's your body, not mine.
Regarding terminals, how often does this requirement occur in practice? Assuming it does, you can probably use your laptop for it, in which case, see above.
ive tried slack before, but a challenge is how well you can get results returned back in a way where you can actually see what it did and give proper next steps
getting a PR back and being able to put comments on it is fine, but ive had middling success getting qcli at least to actually match the comments with the code that was commented on. i get the sense that there isnt any training with the comments inlined well on a diff:/
it doesnt have to be a vpn though, i was on an oauth webbrowser terminal, and things like coder[0] let you run vscode on the browser, including on your phone browser. there's also happy coder[1] which i tried using to connect between the new builtin android linux vm, and skip all the remote stuff entirely, but the phone would inevitably kill the terminal runbing claude, killing the whole thing. you can currently just run claude from your phone in that, which only has the problem that when the vm crashes, all you can do is wipe the partition.
the first time you write something, descriptive names are handy, but if youre writing a second or thrid copy, or trying to combine several back down into one, those names are all baggage and come with a full mental model.
an alternative ive seen work well is names that arent descriptive on their own, but are unique and memorable, and can be looked up from a dictionary
this rings alarm bells for me reading that a cleanup_c(c) has maybe been forgotten somewhere, since the happy and unhappy paths clean up different amounts of things.
i imagine your python code escapes the giant tree by using exceptions though? that skips it by renaming and restructuring the goto, rather than leaving out the ability to jump to a common error handling spot
> this rings alarm bells for me reading that a cleanup_c(c) has maybe been forgotten somewhere, since the happy and unhappy paths clean up different amounts of things.
The exact point of taking the main work to a separate function is so that you can see all the paths right there. Of course there is no `c` to worry about; the wrapper is so short that it doesn't have room for that to have happened.
The Python code doesn't have to deal with stuff like this because it has higher-level constructs like context managers, and because there's garbage collection.
def get_resources_and_do(action):
with get_a() as a, get_b() as b:
action(a, b)
with code in good shape, i think i prefer having unnamed tests and instead you read the test to see that its an important function.
however, ive also done code archaeology, and same thing, old inaccurate comments were one of the few remaining things with any idea what the code was supposed to do and got me enough pointers to company external docs to figure out the right stuff.
wiki links, issue links, etc all had been deleted. same with the commit history, and the tests hadnt worked in >5 years and had also been deleted
the best comments on that code were about describing Todos and bugs that existed rather than what the code did do. stream of consciousness comments and jokes
what Ive left for future archaeologists of my code is detailed error messages about what went wrong and what somebody needs to do to fix that error
or very concretely, if legal sets a constant to 0, there should be some test that makes sure the code handles divisions by that number properly, or otherwise fail to deploy.
youd need tests both with the current constant for the current state, and with various bounds on that constant to show that the code always works
on those notes, i dont think those errors are categorized by caller action, those are internal state.
NotFound should instead have an instruction "create this object first using that SOP" or "stop the transaction from going through"
Ratelimited has an instruction "try again in x ms" or "raise your rate limit following this SOP"
PermissionDenied has an instruction "request permissions here" or "complete this oauth"
as far as the flat error definition i think that rather than simple, its easy. its simpler to have each module define its own errors and have dedicated translation code to the libraries errors, rather than putting the translation and equivalencies between different modules errors within the library in the programmers head and code comments on the big error definition file.
Estimates of health insurance fraud is also around $30 billion, so same order of magnitude, and considering the margins of error and the fact that they are estimates, by definition, it makes it hard to say public health insurance is more fraud ridden then private. Plus due to the inherent differences there are probably differing avenues of research and estimating possible between private and public insurance, and heck whole different forms of draining money that might affect ease of uncovering the level of fraud between private and public, which would make it have an even larger margin of error.
how much of a problem is it that ~1 sentence per chunk gets corrupted in the by-character solution? what level of sentence corruption is left in by switching to these delimiters? what level of paragraph/idea corruption is left in with each? chapter/argument level?
reply