HN user

ickyforce

100 karma
Posts2
Comments47
View on HN

I tried this with Gemini 3.6 Flash

Me:how many P's are in the following text? [Pasted text with 10 P's]

Gemini: There are 9 "P"s (1 uppercase P and 8 lowercase ps) in the provided text. [List of words except the one missed]

Me: How many in strawberry?

Gemini: Something went wrong (1096)

and any decent formatter will split up long lines

Any decent editor can wrap long lines on demand. But it's even better not to have to do either of those if not necessary.

I've felt strongly for a while now that abbreviations should be "lossless" in order to be useful

This is how we got lpszClassName. The world moved away from hungarian notation and even away from defining types for variables in some contexts (auto in cpp, := in Go, var in Java). Often it just adds noise and makes it harder to understand the code at a glance, not easier.

So unless those pools are full of primitive data types, you’re going to cause more frequent full GC pauses, and longer due to all the back pointers.

If you have enough objects pooled to get low allocation rate then you never trigger full GC. That's what "low latency Java" aims for.

I think that the main downside of object pools in Java is that it's very easy to accidentally forget to return an object to a pool or return it twice. It turns out that it's hard to keep track of what "owns" the object and should return it if the code is not a simple try{}finally{}. This was a significant source of bugs at my previous job (algo trading).

each world was spherical (...) suddenly orienting the map was a challenge

The other downside was the fact that it was possible to assault arbitrary points - e.g. drop units from orbit in the middle of enemy base. It required much more awareness about the whole map. In 2D game one could mostly focus on front lines and choke points.

CME documentation states:

"LMM – CME Designated Lead Market Makers are each allocated a configurable percentage of an aggressor order quantity before the remaining quantity passes to the next step."

Certain matching algorithms allocate orders to LLM before considering FIFO - specifically algorithm T (LMM w/o Top). So I guess it depends on how strict is your definition of "FIFO order queue".

https://cmegroupclientsite.atlassian.net/wiki/spaces/EPICSAN...

https://cmegroupclientsite.atlassian.net/wiki/spaces/EPICSAN...

(I don't know the internals of the mentioned exchanges)

I have tried various approaches and here's what worked best, assuming that there is some natural way to partition most of the data (e.g. per account):

1. Init the DB with some "default" data - configuration, lookup tables, etc

2. Each test in the test suite owns its data. It creates a new account and inserts new records only for that account. It can for example create users on this account, new entities, etc. It can run multiple transactions, can do rollbacks if needed. It is important to only touch the account(s) created by the test and to avoid touching the initial configuration. There's no need to clean up the data after the test finishes. These tests can run concurrently.

3. Create a separate integration test suite which runs sequentially and can do anything with the database. Running sequentially means that these tests can do anything - e.g. test cross-account functionality, global config changes or data migrations. In practice there aren't that many of those, most tests can be scoped to an account. These tests have to clean up after themselves so the next one starts in a good state.

Other approaches had tons of issues. For example if each test is wrapped with a transaction which is later rolled back then testing is very limited - tests cannot use transactions on their own. Savepoints have similar issue.

GIT is already best model for keeping history of textual changes

Git doesn't even keep history of changes, just snapshots before and after the changes. A very common problem is viewing history of a single file as it gets modified and renamed - this information just isn't stored. It's common for tools to show file history incorrectly - i.e. a previous version is removed and the new one (with small changes) magically appears.

It's not just the type of work but also experience. Here are two cases:

1. After working for many years in Java I needed to build a service. I spent few days designing it and then a month on implementation. I used DBs and libraries I knew very well. I didn't need to access google/stackoverflow, I didn't need to look up names of (std)lib methods and their parameters and if something wasn't working it was fairly obvious what I needed to change.

2. Recently I wanted to create a simple page which fetched a bunch of stuff from some URLs and showed the results, simple stuff. But with React since that was what frontend team was using. I never used React and rarely touched web in the recent years. Most of my time was spent googling about React and how exactly CORS/SOP work in the browsers, and with polishing it took a couple of days.

I'm pretty sure that in case 1) AI wouldn't help me much. Maybe just as a more fancy code completion.

In case 2) AI would probably be a significant time save. I could just ask it to write some draft for me and then I could make few tweaks, without having to figure out React.

But somehow nobody quantifies their experience with the languages/tools when they are using AI - I'm sure there's a staggering difference between 1 month and 10 yoe.

In my opinion PR/changeset description is exactly what should be in the commit description. In cases were we had 1 commit per PR (i.e. squashing before merging) just copying the PR description into merge commit worked really well - the goal for a PR description and a commit is essentially the same.

I wish github allowed to make the copying automatic and ensure that it happens (it doesn't, unfortunately).

If someone wants to learn the full history - the remarks during code review, perhaps all the WIP commits - they can read the PR/code review comments. I found it to be very rarely needed.

I don't see how replacing the "it works on my machine" with "it works in this VM" is much better. It is the same problem.

It's not that. It's replacing "it works on my machine and I'm not sure why it doesn't on yours" with "follow these exact steps and it will work on your machine too".

I Hate NestJS 3 years ago

I'm very curious to hear from someone who likes DI in a non-OOP language - why?

The alternative to DI is keeping dependencies in a global state (global variables, singletons, whatever) and that is a maintainability nightmare for any codebase above a certain size. I don't think that it matters if the language is OOP or not, the issue is the same.

Time from enqueue to start isn't a good metric - it completely disregards the queue size. Enqueuing 1M jobs won't change this metric as it only updates once the job reaches the front of the queue, and when the 1Mth job does that the situation is already over.

I had much better results with a metric that shows estimated queue time for jobs that are getting enqueued right now (queue_size * running_avg_job_processing_time / parallelism).

Looks interesting, I'll probably try it.

I think that the area where I'd love some tool to help me would be keeping track of phone calls - ideally even attaching recordings to a proper company, transcribing them and summarizing. It's easy to get back to an email because stored but in case of a phone call I need to make notes quickly.

When I keep track of things in a text file or spreadsheet it's easy to get an overview quickly - because it's all on a "single page". I can even grep for some key word. I don't think Rolepad UI helps here. The current the company list shows only name, position and stage. I would like to at least see some "comment" for each.

The last time I searched for a job I created labels in gmail for each position and created rules to automatically label incoming emails. It was very easy, just select an email -> "filter messages like these" -> label (set new to jobs/company-name) and done. While I could potentially use Rolepad to store notes about companies I doubt that I would forward emails there because I don't see potential benefits since Rolepad won't automatically update any entries on its own. Maybe if I it aggregated all communication channels? emails, phone calls, linkedin messages, etc

By the way - I use multiple email addresses (wildcard in my own domain) when contacting recruiters but the accounts have just one so the email forwarding won't work.

I don't think her conclusion is correct in this case (that it's all about chronological order). It's not about what happens first but about levels of abstraction. It doesn't make sense to say that we want to decide on the number of doors before specifying if we're building a LEGO car or a skyscraper in Manhattan.

The reasonable approach is to start from high-level concepts and only then deal with the details - without specifying high-level concepts the details have no particular meaning.

As a side note I have to say that I definitely prefer languages with `object.function` rather than `function(object)`, precisely because of this. Another example: `if(foo == 5)`, not `if(5 == foo)`

This is completely another level of "issues" than other problems in this thread. During code review I'd only mention it as a nit. The longer form is correct and the only downside is that's a bit longer. It doesn't mess up code modularity or affect maintainability in a noticeable way.

Well, assuming that the language doesn't have any quirks in this area - e.g. in Java your statements aren't equivalent for a Boolean x.

Jira has a search bar which seems ok-ish. Except that I have to wait 10s after I open Jira for the search bar to start working because it's probably the last thing to become interactive after a page load :|

I haven't used them for real but (briefly) evaluated with the intention to maybe replace Jira, about a year ago.

Space wasn't there yet. IIRC the main issue was lack of a way to set custom fields via API, or some weird restriction around that. My general impression was that it was promising but too immature at that time.

For any Jira competitors reading this - start with providing 2-way sync between your product and Jira instance. It would make moving away from Jira soooo much easier! The current state is that even importing Jira data is below what I'd expect - e.g. Linear (last time I checked) didn't import comments at all and all issue IDs were changed to new ones. Really, if there's FOO-123 in Jira it's table stakes for it to be also called FOO-123 in the new tool.

I wrote a tool to migrate an issue tracker to Jira which imported everything as expected and updated links in issue descriptions/comments to keep their integrity. It took few days for a one-time migration so I'd expect someone who builds a business in this area to just have that as a baseline. It's sad how bad the "import from Jira" journeys are.

Using micro-services instead of monoliths is a great way for software engineers to reduce the complexities of their code

Could you share why you think that's true?

IMO that it's exactly the opposite - microservices have potential to simplify operations and processes (smaller artifacts, independent development/deployments, isolation, architectural boundaries easier to enforce) but when it comes to code and their internal architecture - they are always more complex.

If you take microservices and merge them into a monolith - it will still work, you don't need to add code or increase complexity. You actually can remove code - anything related to network calls, data replication between components if they share a DB, etc.

I don't like the fact that I need to grant read/write access to all public and private repositories to use the dashboard or create PRs. I know that github has no decent solution to limit access scope to 1 repository but this is the reason why I haven't tested graphite on any real work. I guess that the only sane way would be to create a separate github user which only has access to a single repo where I'd like to use/test graphite.

At the same time I'd probably be ok with the CLI having wider access, as long as the website does not have it. I can control/monitor CLI to some degree but not the web part.

It's ok except the wrapping rules. Everything turns out into vertical grotesque - and TypeScript has longer lines because of type names so it wraps often.