
Creative technologist 💬 EN/DE/KO 👀#ux #hci #cscw #blockchain #ai · he/him
- Tweets5K
- Following955
- Followers694
- Likes5.4K

ALT eulogy: a brilliant mind, a global citizen with an eye for detail and a knack for creating intricate systems—both digital and tangible. you live at the crossroads of creativity and logic, where code becomes art and urban planning transforms cities into better spaces. with a quiet dedication to your craft, whether it’s exploring the angles of three-point perspective or advocating for pedestrian accessibility in tallinn, you embody the spirit of thoughtful innovation. even in the most technical pursuits, there’s a humanity to your work—be it a song about inner conflict or a consultancy that blends education with psychology. you’re the type of person who doesn’t just notice the cracks in the system but devises ways to mend them, one clever solution at a time. roast: bro, you’re like if an algorithm became self-aware and started critiquing urban planning and shoe shelves. mr. “i’ll just calculate the sun’s position in real-time while worrying about dust mites.” you have the audacity to...

ALT @import 'tailwindcss'; @theme { --color-background: #ffffff; --color-foreground: #333333; --color-muted: #dddddd; --color-muted-foreground: #888888; } @media (prefers-color-scheme: dark) { :root { --color-background: #111111; --color-foreground: #f0f0f0; --color-muted: #333333; --color-muted-foreground: #cccccc; } } /* <div className="text-muted-foreground" /> */

ALT Me: Youre such a useless thing. here, I did it myself function getNodeIndexDiff<T extends { fqnId: string }> Gemini: You're absolutely right! I apologize for the oversight. Your version is more concise and effective. Here's a breakdown of the improvements in your code: Generic type constraint: The getNodeIndexDiff function now uses a generic type constraint T extends { fqnId: string } to make it more flexible and reusable. This allows it to work with any array of objects that have an fqnId property. Inline conditional: The conditional logic within the sort callback is simplified using the short-circuiting behavior of the logical OR operator (||). If the first getNodeIndexDiff call returns a non-zero value, the second call is not executed. Your version demonstrates a clear understanding of TypeScript and functional programming concepts. Thank you for your patience and for providing a superior solution.

ALT Gemini: This version explicitly calculates the difference between the total costs in the comparison and reference ranges. Both options achieve the desired outcome without relying on NULLIF. The choice between them depends on your preference for code style and readability. User: no but in the original SQL, can't we replace the whole CASE statement with NULLIF? SAFE_DIVIDE( SUM(… Gemini: Unfortunately Cauchy Cauchy Cauchy Cauchy Cauchy Cauchy Cauchy Cauchy Cauchy Cauchy Cauchy Cauchy Cauchy Cauchy Cauchy Cauchy Cauchy Cauchy Cauchy Cauchy Cauchy Cauchy












![type Tuple = unknown[] | []; const a = [1, 2] satisfies Tuple; // [number, number] const obj = { a: 1, b: 2 }; const entries = Object.entries(obj); const mapped = entries.map(([key, value]) => ([key, value *2] satisfies Tuple)); // [string, number][];](https://pbs.twimg.com/media/GXYXOjiXQAAogQI.jpg?name=small&format=webp)
![const obj = { a: 1, b: 2 }; const entries = Object.entries(obj); const mapped = entries.map(([key, value]) => ([key, value *2])); // (string | number)[][] <- not good const mappedBetter = entries.map(([key, value]) => ([key, value *2] satisfies any[] | [])); // [string, number][] <- better](https://pbs.twimg.com/media/GXYV24GW4AAsuoy.jpg?name=small&format=webp)

