Quote: William Shakespeare the Fool
The fool doth think he is wise, but the wise man knows himself to be a fool. William Shakespeare
The fool doth think he is wise, but the wise man knows himself to be a fool. William Shakespeare
As I’ve discussed in the past, Microsoft Edge is a superior browser and in supporting that title, it allows you to add multiple search engines to your address bar. This week, I added Exa.ai as an option with the prefix exa. Note In the past, I’d prefix my prefixes with @ (ex. @ai, @exa, @x) but its faster to omit that and use the prefix directly. ...
In the past, I would always open new projects in VS code by navigating to them and running the simple and famous command: code . This command opens a new window with your project, leaving everything else untouched except for your system’s memory usage. This week, I finally decided to see what else was possible and it turns out you can replace the current window with the new one by appending the -r flag to the command: ...
God exists since mathematics is consistent, and the Devil exists since we cannot prove it. André Weil
You can tell TypeScript to treat a string value as a literal type using the as const phrase. For example, if you have an interface like this: export interface Message { role: "user" | "assistant" | "tool"; content: string; } You can add objects to it like this: const updatedMessages: Message[] = [ ...currentMessages, { role: "assistant", content: baseResponse, }, ...(functionResponse ? [{ role: "assistant" as const, content: functionResponse }] : []), ];
Adding scripts to your package.json file is an efficiency necessity, but what makes these scripts even more effective is the ability to pass arguments to them while still using the abbreviated npm run {command} format. To do it, simply append -- after the npm script and then add your arguments as you would if you were running the script with node: npm run start -- --foo=3
After a 15 minute, AI-assisted troubleshooting session, I squashed a bug after realizing I was calling .pop() on a TypeScript list a few turns before I was attempting to print out that list. The result? A list that was missing the very last entry. The .pop() method is mutating or destructive because it directly modifies the array it operates on.
A good plan violently executed now is better than a perfect plan next week. George Patton
Nothing is enough for the man to whom enough is too little Epicurus
Contents I use Firebase Remote Config to manage AB tests in most of my software projects. Boolean AB Testing Whenever I want to run a new AB test, I create a new boolean parameter in my Remote Config (RC) console with the name of the new test (ex. show_pro_button). The default should be false since the test will be off for anyone not in the test set. ...