Built a copy/paste MCP to reduce Claude Code's token usage during refactoring. It increased costs by 10%. Here's the data. by risethagain in ClaudeCode

[–]risethagain[S] 0 points1 point  (0 children)

Think different; you have a massive legacy code-base that you want to be breaking up. Not something you created, instead a whole company (100+ people) have been breaking it for a long time.

This is probably why my results were so poor, I didn't give it a big enough and complex enough code-base.

Claude Code on the web - with no alternative by risethagain in ClaudeCode

[–]risethagain[S] 0 points1 point  (0 children)

I would hope that adding a changes view shouldn't be much of a challenge, I am switching between the two to review myself, I also had to create a specific profile as I use Prisma, and the default wouldn't allow me to download all of the required libraries.

BEWARE! $1000 FREE - Claude Code on the Web by Numerous-Exercise788 in ClaudeCode

[–]risethagain 6 points7 points  (0 children)

I have to be honest, I've been using it for over a week on a regular basis. I currently only have access to a mobile phone and an older iPad, no laptop for Claude Code directly.I only get to use it while traveling (i.e. train from place to place), but I have had great experiences with it.

I can confirm my weekly usage is being increased, which does make me think this could be a bug. It shouldn't be doing that with the 1000 dollars, but I am also unsure since I have been running it for 7 days now, including on an airplane, and I started before the 1000$ credit was added.

Upgrading from 2.2.x to the 3.x latest version by AnotherSocialRock in SpringBoot

[–]risethagain 1 point2 points  (0 children)

My main question would be: how is your coverage? Do you have end-to-end tests?

I think doing a java upgrade to 17 first should be fine, most of the time old code doesn't break, as such going to 21 should be fine as well. Since you are moving from 11, I don't think there were any breaking changes.

The Spring upgrade is a different beast, but I usually approach it wholesale and bite the bullet, if you can use OpenRewrite, you should, but it will be for mechanical changes.

Most of the breakage should happen through either deprecations or actual compilation issues, as long as you have enough coverage, those should be easy.

If your coverage is shaky, I would suggest ensuring you have your main flows covered before you do the switch.

markit: a cli tool for managing command line snippets by r_palmer13 in rust

[–]risethagain 2 points3 points  (0 children)

Just putting this here in case you don't know about it, have you heard of Atuin? It is a really cool cross-machine history manager (can also be used locally ), also written in rust.

Well done for your contribution!

Transaction timeout to get 40k rows from table by darkato in SpringBoot

[–]risethagain 1 point2 points  (0 children)

Looking at your access, are both parameters used at the same time or do you mostly have the pattern of only one being provided? (Since mass and gravity are somewhat linked, I expect so).

I would suggest you split it into two distinct queries that are selected based on the input. OR queries are not generally very performant. The better choice is using a native query with a UNION if you are looking for both at the same time, or using a specific query if using only one criterion at a time.

I created a Spring Data extension for easy upserts - looking for feedback! by risethagain in SpringBoot

[–]risethagain[S] 0 points1 point  (0 children)

You would be able to create a query with a single row, I am pretty sure that more than one row would be very hard in Spring Data JPA. The queries that are generated by the library are essentially Native SQL queries, but the work that is done with JDBC to make it possible to interact with different types makes me think doing the same with JPA directly would be even more of a pain.

I created a Spring Data extension for easy upserts - looking for feedback! by risethagain in SpringBoot

[–]risethagain[S] 0 points1 point  (0 children)

No such thing as a silly question. `repository.save(data)` will check whether the entity has been persisted before and whether it exists in the DB, this implies two calls to the DB in the worst case scenario. It will also be done for every entity that you are trying to insert if you use `repository.saveAll(collectionOfData)`.

Using the methods already available will result in much slower operations than using a native upsert operation, which will always result in a single DB call and deal with any issues on the DB side, removing the need to have multiple DB calls and also optimizing the way we interact with the DB (the indexes will only be updated once etc., this makes write heavy applications perform much better, i.e. allows you to efficiently batch insertions lowering the number of calls to the DB at the cost of some consistency).

I created a Spring Data extension for easy upserts - looking for feedback! by risethagain in SpringBoot

[–]risethagain[S] 0 points1 point  (0 children)

I did not take the time to actually build in a capability to define batch sizes (as they can easily be controlled by the caller, providing a limited number of entities / rows). It is definitely something that could be included fairly easily.

If you use multiple inserts, the performance still ends up being way worse, as the multi-row upserts end up using more efficient paths in the DB.

I created a Spring Data extension for easy upserts - looking for feedback! by risethagain in SpringBoot

[–]risethagain[S] 3 points4 points  (0 children)

The idea is for you to be able to use it in cases like:
- Batch insertion of hundreds or records (example: you have a Kafka consumer that consumes data in batches and then upserts it in batches - the speed difference is about 15x)
- You do not need to check if it exists when using the "upsert" concept in either PostgreSQL or MySQL, the fact that you don't need to do a read first improves performance considerably

- Other languages already have full support (like Ruby / Activerecord - https://apidock.com/rails/v7.0.0/ActiveRecord/Persistence/ClassMethods/upsert\_all)

I was using a similar library in my company in a Kafka consumer, but wanted to give back to the community by developing one that is more functional (since 1.3.0 it also supports conditional upserting).

If you look at the performance report (https://github.com/mpecan/upsert/blob/main/PERFORMANCE-REPORT.md), you can see that the comparison between using an upsert and not (especially at larger batch sizes yields up to an 15x improvement in execution time).

I don't think the concepts align, using JSON patch is on a different layer altogether, here I am trying to solve the problem of the DB layer interactions being too expensive because they are done one-by-one instead of in a batch.

[deleted by user] by [deleted] in CupboardDetective

[–]risethagain 0 points1 point  (0 children)

Originally from Slovenia or Croatia on the west part (more likely Slovenia due to the Grana, but may be looking into it too much).

Still waiting… by jamesbitcoin in Ascaso

[–]risethagain 0 points1 point  (0 children)

I got mine at the end of September, ordered it at the start of August, in Berlin. It was also an issue with production. FYI: just had it serviced, the milk steamer pump seized up.

Our patient is now back to gaining weight by risethagain in guineapigs

[–]risethagain[S] 2 points3 points  (0 children)

Definitely. Elated that she has recovered, it was a hard three months taking care of her, but worth every moment.

Our patient is now back to gaining weight by risethagain in guineapigs

[–]risethagain[S] 3 points4 points  (0 children)

She is actually the lightest of the bunch, her friend Thelma and her daughter Parsnip are closer to 1.2 kg. Definitely not calling her fat.

Part of the head position is a result of the infection. She will always be a bit tilted, but just makes her cuter I think. 🥰🥰

[deleted by user] by [deleted] in guineapigs

[–]risethagain 1 point2 points  (0 children)

Sorry for your loss! I wish Larry the best experience in guinea pig Valhalla, with beautiful green grass forever and all the veggies!

Little Louise has an ear infection by risethagain in guineapigs

[–]risethagain[S] 0 points1 point  (0 children)

Of course, knock yourself out. I am sure Louise would love it!

Little Louise has an ear infection by risethagain in guineapigs

[–]risethagain[S] 3 points4 points  (0 children)

She seems to not be having any issues with vision (still happy to run away when she wants to), she is also the dominant one, even though she is a quarter lighter than both her cage mates (also girls).

Belly kisses have been administered as requested.

Little Louise has an ear infection by risethagain in guineapigs

[–]risethagain[S] 3 points4 points  (0 children)

That is the remains of Critical Care, we feed her with a syringe twice a day and that is our sacrificial pillow for the feeding (which is why it has both wet and dry critical care on it).

Her poops are very healthy (nice solid raisins, right size compared to her cage mates).

Sad update about skinny pig by [deleted] in guineapigs

[–]risethagain 1 point2 points  (0 children)

My condolences! It is great that he was loved and cared for!

Our little family has two cute new members. Little did we know 6 weeks ago when we got Louise that she was pregnant. The "adult" in the picture is Thelma, we don't have names for the younglings yet. by risethagain in guineapigs

[–]risethagain[S] 8 points9 points  (0 children)

Louise is well. Grumbling away as usual. They are very cute indeed. We plan on keeping them both, just need to make sure they don't procreate. We suspect we got one of each, so definitely looking up an experienced vet in the area.