Better HN
topnewbestaskshowjobs
Log inSign up

never_inline

897 karma · joined Aug 26, 2022 (4y ago) · 561 submissions

Submissions

comment 1y ago · link · parent

I would like to know where I can read more in depth about profiling and performance analysis techniques.

comment 1y ago · link · parent

How would that work across files and libraries?

comment 1y ago · link · parent

what do you think about speedscope's sandwich view?

comment 1y ago · link · parent

> are meant to run is essentially a loop of listing resources, comparing to spec, and making moves to try and bring the state of the cluster closer to spec.

Aren't they supposed to use watch/long polling?

comment 1y ago · link · parent

I guess you don't use an IDE. Use VSCode or IntelliJ with auto completion and error highlighting as you type. Type hints are a blessing.

186.

Some tricks for interactive usage of Bash shell(mahesh-hegde.github.io ↗)

1 points · by never_inline · 1y ago · discuss

comment 1y ago · link · parent

For someone writing a whole essay why python's speed is not a problem, one would expect to have worked in workloads where performance actually matters. For most people in this industry, that would be web APIs. Though it's kinda fine for low traffic APIs.

GP comment reeks of textbook "performance doesn't matter" rhetoric.

comment 1y ago · link · parent

This is just not true. Poetry existed for a while. It was slower than uv but not a deal breaker.

comment 1y ago · link · parent

These patterns have seen real use (not saying optimal) in the wild.

Of course we know today composition is better than inheritance, plain data structs are enough for most cases, and "parse, don't validate". but did people know it in 1990s?

comment 1y ago · link · parent

That's probably a good idea. They can also earn interest on the deposit. (Not that they need the money).

comment 1y ago · link · parent

It has a much better language and works across platforms. these things have real value.

comment 1y ago · link · parent

Try flutter.

comment 1y ago · link · parent

I learned programming in turbo C++ - not because I grew up in 1990s, but because Indian education system is stuck in 1990s.

> So the question I want to part with is: have we advanced much in 30 years? Modern IDEs have some better refactoring tools, better features, and support more languages, but fundamentally… they haven’t changed much.

I can't give up any of: intellisense, type checking as I type, semantically meaningful navigation.

comment 1y ago · link · parent

> I'm considering creating my own migration library tailored to our actual needs and usage. It should not be so hard.

Indeed. Go has like 5 options for SQL DDL migrations now. On python side there's alembic and bunch of homegrown stuff in various frameworks.

I think much of the complexity in liquibase comes from supporting various databases.

One thing to remember: mark a new version before each step that can fail, even if the steps themselves are together in the same file.

This is a problem I ran too much into with alembic in which each file is a single unit - a statement in the middle of the script fails and there's no simple way to roll back (unless your DB supports transactional DDL). So the pattern I have settled is to have only one simple change in one file. Liquibase of course doesn't suffer this because it has unique IDs per statement.

comment 1y ago · link · parent

You're just replacing the functionality of CRI, which is already pluggable. Rest of the kubernetes is still needed.

comment 1y ago · link · parent

You're using the F-Droid version?

comment 1y ago · link · parent

I have similar OCD behaviors which make reviewing difficult (regardless of AI or coworker code).

specifically:

* Excessive indentation / conditional control flow * Too verbose error handling, eg: catching every exception and wrapping. * Absence of typing AND precise documentation, i.e stringly-typed / dictly-typed stuff. * Hacky stuff. i.e using regex where actual parser from stdlib could've been used. * Excessive ad-hoc mocking in tests, instead of setting up proper mock objects.

To my irritation, AI does these things.

In addition it can assume its writing some throwaway script and leave comments like:

    // In production code handle this error properly
    log.printf(......)
I try to follow two things to alleviate this.

* Keep `conventions.md` file in the context which warns about all these things. * Write and polish the spec in a markdown file before giving it to LLM.

If I can specify the object model (eg: define a class XYZController, which contains the methods which validate and forward to the underlying service), it helps to keep the code the way I want. Otherwise, LLM can be susceptible to "tutorializing" the code.

comment 1y ago · link · parent

I think too much of RLHF is done on small scale tutorial-ish examples.

LLMs often write tutorial-ish code without much care how it integrates with rest of codebase.

Swallowing exceptions is one such example.

comment 1y ago · link · parent

A related questions: How do LLMs format code so consistently? I mean, when you write middle-indented things like struct fields in Go, how do they know in advance what the largest field name will be?

comment 1y ago · link · parent

I have creatdd a readings page on my blog to serve a similar purpose. The theoretical intention is to update it from time to time.

https://mahesh-hegde.github.io/readings/

comment 1y ago · link · parent

Here are some real open-ended questions you can use to see how well a junior hire with no Industry background will do.

* Test whether they understand data types and abstraction. * You have a function returning two numbers in <your favorite language>, how will you do? * Now you need 4 items from this function called getUserInfo(), how will you return it? (Eg: username, email, location and age). * You need to share some state between two calls to this function. i.e a database connection. How will you do it? * Now imagine multiple threads / requests call this function. how will you share state?

And so on..

r/CSMajors types who have done only leetcode will fumble this kind of open ended discussion.

Similarly for networks

* Google "my IP address" from your phone?

* Is it really the IP address of your phone?

* There are more than 4 billion mobiles + computers on this planet. How are they getting unique IPs then?

* If you run your school project (likely to be django or express js app), will you be able to reach it from another phone or desktop using this IP?

* Why or why not?

These are kind of things they should be able to answer if their networking / OS etc... classes were any good.

comment 1y ago · link · parent

This is a positive signal, but doesn't necessarily tell whether the person has intellectual capability to write "proper" code or just had some opportunity at the early age to be exposed to programming.

I have seen good and bad engineers who had been programming before graduation. Fortunately, good ones outnumber the bad ones.

comment 1y ago · link · parent

Isn't this already quite popular theory?

Eg: https://www.lesswrong.com/posts/Q8zqoBWBBHD2RjDuS/autism-and...

comment 1y ago · link · parent

Why does this not happen in go? Maybe Go's design is practically better because you have to research the repository reputation before adding it? Or is it because go developers add few dependencies on average? Is it because of namespacing (such things are rare in Java as well).

comment 1y ago · link · parent

maybe a good thing because gen Z will send all your code to ChatGPT.

/s

comment 1y ago · link · parent

> Something I think would be interesting for model APIs and consumer apps to exposed would be the probability of each individual token generated.

Isn't that what logprobs is?

1
678
19