News for hackers. Stuff that matters.

fmdz

Re:Usage Tracking for Claude Code and Codex on Tuesday February 03, 2026 @08:28AM (#46870714)
I've been keeping eye on my usage with Codex and Claude Code lately, so last night I built costats.

It's an open source and lightweight Windows tray app that shows your LLMs usage status for Codex and Claude Code along with token counts and how much you're spending daily and over the last 30 days.

Original implementation for MacOS/Linux is CodexBar, so this is Windows version.

I hacked a BIG prize web game hosted by a popular supermarket chain

A few years back, a well-known supermarket chain, part of Delhaize Belgium, set up a prize game.It was a web game where your prizes depended on your ranking. Since it was a web-based game, you can guess what might happen With a few tricks, I managed to tweak the scoring logic. I could award myself as many points as I wanted in each round.The prizes were items worth more than $50 and there were...

( Read More... | 3 comments | 4 points | on HN )
It is, I agree.

You have full control over generated tests. Also, I put focus on putting as much control as possible, so you can set different inputs to reach higher quality of generated tests.

At the end, you add or append file with generated tests, so you have full control over them.

There are positive, negative and edge cases.

They are generated by AI, so unit tests will be implemented by case definitions.

Sure. Here is one example from run I performed just now.

TypeScript utility method I generated cases and tests for -------

  static merge<T extends { id?: string }>(arr1: T[], arr2: T[]): T[] {
      arr1 = arr1 || [];
      arr2 = arr2 || [];

      // Create a map for quick access to items in arr1 by id
      const map = new Map<string, T>(arr1.map((item) => [item.id, item]));

      // Iterate over arr2 and merge or add items
      arr2.forEach((item) => {
         if (map.has(item.id)) {
            // If item exists in arr1, merge it
            map.set(item.id, { ...map.get(item.id), ...item });
         } else {
            // If item doesn't exist in arr1, add it
            map.set(item.id, item);
         }
      });

      // Convert the map back to an array
      return Array.from(map.values());
   }


Generated test cases ------------- POSITIVE - Merging two arrays with unique and overlapping objects by id Given: Two arrays of objects with unique and overlapping ids When: Merging two arrays of objects where some objects have matching ids Then: Should return an array of merged objects with no duplicates and combined properties for overlapping ids

NEGATIVE - Merging arrays when second array contains objects with undefined ids Given: First array of objects with valid ids and second array with some objects having undefined ids When: Second array contains objects with undefined ids Then: Should throw an error or handle undefined ids gracefully without merging those objects

EDGE CASE - Merging arrays where all objects in the second array have matching ids in the first array Given: Two arrays of objects with ids where the second array's objects all have ids that match those in the first array When: Every object in the second array has a matching id in the first array Then: Should return an array with objects from the first array having their properties updated by the second array's objects

Generated unit tests by test cases -------------

---> 1st case ---------------

it('Merging two arrays with unique and overlapping objects by id should return an array of merged objects with no duplicates and combined properties for overlapping ids', () => { // Arrange const arr1 = [{ id: '1', name: 'Alice' }, { id: '2', name: 'Bob' }]; const arr2 = [{ id: '2', name: 'Robert' }, { id: '3', name: 'Charlie' }]; const expectedResult = [ { id: '1', name: 'Alice' }, { id: '2', name: 'Robert' }, // Note: 'Bob' is overwritten by 'Robert' { id: '3', name: 'Charlie' } ];

  // Act
  const result = merge(arr1, arr2);

  // Assert
  expect(result).toEqual(expectedResult);
});

---> 2nd case ----------------

it('Merging arrays when second array contains objects with undefined ids should throw an error or handle undefined ids gracefully', () => { // Arrange const arr1 = [{ id: '1', name: 'Alice' }, { id: '2', name: 'Bob' }]; const arr2 = [{ id: '2', age: 30 }, { name: 'Charlie' }]; // Charlie has undefined id

  // Act and Assert
  expect(() => MyArrayUtils.merge(arr1, arr2)).toThrow();
});

---> 3rd case ----------------

it('Merging arrays where all objects in the second array have matching ids in the first array', () => { // Arrange const arr1 = [{ id: '1', propA: 'A1' }, { id: '2', propA: 'A2' }]; const arr2 = [{ id: '1', propB: 'B1' }, { id: '2', propB: 'B2' }]; const expectedResult = [ { id: '1', propA: 'A1', propB: 'B1' }, { id: '2', propA: 'A2', propB: 'B2' } ];

  // Act
  const result = merge(arr1, arr2);

  // Assert
  expect(result).toEqual(expectedResult);
});
Do you mean within overview page of extension, on examples gif/images or within real flow in VS Code?
We are writting ton of such tests, on daily basis haha.

That is infinite process, we're all stuck within :-)

Show HN: Wasted hours on Unit tests, so I built VS Code ext for AI tests

https://marketplace.visualstudio.com/items?itemName=snippethubio.snippethubx

Hey guys,I'm investing a ton of time on writing unit tests, for both enterprise and personal projects.I came up with the idea to make extension for AI-generated tests and cases within a VS Code.Happy to hear feedback, both positive and negative.

( Read More... | 15 comments | 5 points | on HN )

Show HN: I made a VS Code extension where you can use Mixtral 8x7B for free

https://marketplace.visualstudio.com/items?itemName=snippethubio.snippethubx

Hey guys,I made a VS Code extension, within which you can use the Mixtral 8x7B AI model for free.Mixtral 8x7B is a new AI model from the Mistral family, which outperforms GPT-3 in many benchmarks, a fact that I have personally confirmed in daily coding tasks, where Mistral 8x7B was the clear winner.You can use all the AI features, such as AI Lens with custom instructions and similar. I&#39;m...

( Read More... | no comments | 3 points | on HN )

Show HN: GPTs directory where you can get $ tips and track detailed analytics

https://gptsfor.me/

Hey HN,I&#39;ve built GPTs Hub, a GPTs directory with some cool features like detailed analytics, tipping, etc...GPTs Hub is composed of carefully reviewed and handpicked GPTs. The aim of the GPTs Hub platform is QUALITY - not quantity.Why is quality important here? We witness that a huge number of GPTs are created daily, and most are based on a very small amount of data, thus providing poor...

( Read More... | 1 comment | on HN )
It's Codey, text generation model from Vertex AI family. Currently, it's Codey for Code Chat

Show HN: I made feature-rich and free VS Code extension to use GPT-3/4 (PaLM2)

https://marketplace.visualstudio.com/items?itemName=snippethubio.snippethubx

Hey HN,I am a software engineer and solopreneur who has recently been delivering a bunch of apps.While coding, at the beginning of the year, I developed my own VS Code extension, which I&#39;ve been using for coding tasks and assistance from top AI models like GPT-3/4 and Google PaLM2.After a while, I realized it would be good to publish it, so I integrated it into an existing SaaS, which I had...

( Read More... | 2 comments | 3 points | on HN )