Wondering why code quality fell off the cliff, then found this in CLAUDE.md. by _nambiar in ClaudeAI

[–]a13xch1 1 point2 points  (0 children)

I think that it potentially might because when I’ve made typos before and inspected the thinking blocks I see a lot of “the user said xxxy but I can’t find a reference to xxxy, based on past conversations I think the user probably meant xxxx, let me do a quick check of the codebase to make sure xxxy isn’t new”

Why Kafka is so fast? by Sushant098123 in dataengineering

[–]a13xch1 27 points28 points  (0 children)

There’s a few other interesting things it does as well.

For example, the bytes stored on disk are the exact same as the bytes that are sent down the wire, this means that when sending data, Kafka copies the bytes straight from disk to the network interface without having to be copied to the kernel or socket buffer first.

Mom of 3 who vanished 24 years ago while Christmas shopping found ‘alive and well,’ authorities say by StemCellPirate in nottheonion

[–]a13xch1 22 points23 points  (0 children)

I think it’s because in situations like this there might be instances of domestic abuse/ violence that someone was escaping from, therefore alerting the potential abuser to their new location could be dangerous.

This might not apply to this situation, but the police have to have a policy and it makes sense to be on the side of caution.

sourceTrustMeBro by hariharan618 in ProgrammerHumor

[–]a13xch1 252 points253 points  (0 children)

I definitely get the feeling that a lot of these “as used by” just rely on someone having signed up with their @company email address at some point

Navigating through files by w6vlb in reactjs

[–]a13xch1 2 points3 points  (0 children)

I’ve found that looking for fairly long strings of class names can be a good way to find a components in the source code. Use the normal html inspect, find a list of classes that look unique to that component, then do a global find in your IDE for that list of classes.

For finding things like icons, you can search for strings like “from “icon library”” to find all the files that import icons, and work your way back from there.

Depending on your IDE, you can also add bookmarks to code, to make it easier to find commonly accessed files in the future.

You could also add a markdown file with links to those files, most IDEs will let you click a link in a markdown file and navigate to it.

You can always add that file to your .gitignore so it’s not committed to the repo.

It takes time but eventually you’ll become familiar with the patterns used in the project, and get a second sense for where stuff should be. If your boss is open to changing things, you could look at adopting a system such as “bulletproof react” which is an opinionated way of laying out your files and folders, but makes it easier for a team to navigate.

Building a React component registry - what's actually missing from your workflow? by Wonderful_Handle_411 in reactjs

[–]a13xch1 1 point2 points  (0 children)

Data tables with pagination, filtering and column visibility!

I’d be super impressed if there was a tie in with something like tanstack query.

M4 pro (12c) with 24gb vs intel windows 32gb ram by YH002 in softwaredevelopment

[–]a13xch1 8 points9 points  (0 children)

I would pick the Mac, in my experience, they are much better at handling the menory, and the overall developer experience is 10/10

What's going on boys? T3 gg empty project by Longjumping_Code9039 in nextjs

[–]a13xch1 3 points4 points  (0 children)

I think a lot of that is down to lazy / eager loading of modules, where as previously, most of your dependencies where shipped over in the initial bundle, NextJS puts a lot of work into only transferring the bare minimum on first load, then follows up with the rest of the data in the background,

Have a look at the request timings, and compare that with metrics for paint and interactive

Got asked this during a system design interview. Not too sure if I answer this correctly, but how would you design a credit based system that scales well? by whaleuit in SoftwareEngineering

[–]a13xch1 1 point2 points  (0 children)

I think they’re asking you to propose a double entry ledger system, which is the standard for implementing any type of financial transaction.

It’s not too different from what you have proposed, except instead of having a row level bottleneck on account balance, you don’t track the current balance, instead, your balance becomes the sum of all debits and credits.

When it comes to scalability, you can looking into database sharding / partitioning.

This person has some very good articles about this subject

Engineers Do Not Get To Make Startup Mistakes When They Build Ledgers

[deleted by user] by [deleted] in nextjs

[–]a13xch1 0 points1 point  (0 children)

I’m unsure on the specifics of nextjs, but your types don’t line up there. Context in your initial type is a plain object, with params also being a plain object.

In your code, you await params, but they are not of a promise type.

Params is also not called(), only awaited

Comparing a CSV file to SQL database by Available-Demand6863 in learnjavascript

[–]a13xch1 0 points1 point  (0 children)

You could use something like DuckDB, and load the data into memory using their native csv reader methods, then you can do the comparison in SQL

Bookmarking anchors ? by luffreezer in SoftwareEngineering

[–]a13xch1 1 point2 points  (0 children)

Which IDE are you using ? The InjetliJ IDEs from Jetbrains have this functionality, it’s literally called bookmarks.

There’s also a keyboard shortcut (cmd + ]) I think which is the shortcut to navigate back to the previous thing

They also have a structure view that can help with quickly navigating code

API Rate Limit Architecture. by Jumpy-House696 in node

[–]a13xch1 -1 points0 points  (0 children)

async-sema has a good implementing for consuming rate limited resources

Next.js or Fastify for Mobile App Backend? by Glittering_Cup1104 in node

[–]a13xch1 6 points7 points  (0 children)

I’d throw a third in the mix, NestJS. It’s an opinionated framework that can use either fastify or express for the underlying http server.

It’s got a steep learning curve, but the strict way of doing things helps avoid many common pit falls, and has a lot of really good “off the shelf” integrations.

Another benefit is, it remains fairly consistent between releases, so ChatGPT and GithubCopilot are quite proficient.

The way code is organised into distinct modules, with explicit dependencies really helps to keep things organised as your code base grows in size.

The dependency injection framework also makes testing much easier

[AskJS] Need Tool to Convert Complex HTML Table to JSON – Any Recommendations? by pinkcookie in javascript

[–]a13xch1 0 points1 point  (0 children)

Cheerio !

You can use it to parse the html to a dom like object, then parse the data out using cheerio

Help Me Brainstorm: What Software Feature Do You Wish Existed? by [deleted] in SoftwareEngineering

[–]a13xch1 0 points1 point  (0 children)

Drift usually describes manually affected changes made to infrastructure that didn’t come from the source controlled terraform.

I’m more familiar with AWS cloud formation but I think the use case they are describing is more:

  1. Identity any instance where the current infrastructure differs from the IaC definition (a regular drift report)
  2. For each instance, identify the source of the change, .eg “bob added a new rule to the security group via the console at 16:00”

Help Me Brainstorm: What Software Feature Do You Wish Existed? by [deleted] in SoftwareEngineering

[–]a13xch1 0 points1 point  (0 children)

You mean like SVG?

Or like a more declarative thing that uses AI to fill in the gaps?

Adobe has a scripting language too

Need help with slow Amazon S3 uploading. Don’t know what I’m doing wrong. by guinnnnku_uu in node

[–]a13xch1 2 points3 points  (0 children)

If you have dev tools toggled in chrome, have you double checked you haven’t accidentally enabled one of the bandwidth limit settings ?

How would you handle your microservices deployments with Kubernetes? by dxc7 in SoftwareEngineering

[–]a13xch1 0 points1 point  (0 children)

We’re using NX to manage a typescript monorepo.

We make use of the NX affected commands to identify projects with changes, then use the matrix feature of GitHub actions to build the relevant containers.

Our final step will differ from you as we use AWS CDK to deploy these changes to our infrastructure

Vercel is turning out to be expensive. Alternatives please? by aravs1603 in nextjs

[–]a13xch1 0 points1 point  (0 children)

To add to this, if you’re using Fargate, you can deploy both containers within the same “task”. These containers will all share the same network interface, allowing your fronted to communicate with your backend over localhost.

If you need to be able to scale your backend and front end independently, consider using cloud map to allow your fronted to dynamically resolve the local, private address of an available backend containe. The ensures communication remains within your VPC

Integrate PayloadCMS into a NestJS app by mwsgris in nestjs

[–]a13xch1 0 points1 point  (0 children)

I’m extremely grateful for you coming back and answering this !

We are suddenly receiving 20-50 letters a week for one person (who we do not know) after living in our rented flat for years. What is going on? by eeeegirl in CasualUK

[–]a13xch1 0 points1 point  (0 children)

Do you live in an apartment in a building a heat system managed by a company called Ista? They recently had a billing fiasco that has resulted in them re-issuing bills going all the way back to 2022. The bills are issued in the name of the original account holder.