🔗 Links of the Week: e-ink and AI

Not AI Version 2 of my solar-powered, ePaper digital photo frame: This guy made an incredible solar-powered color epaper photo frame. It can only display white, black and red pixels so he implemented dithering. The result is really cool. Another color eink photo frame: This is more compact and uses a battery. Honestly I like the dithering; it gives an artistic quality to the images. Beepberry - a portable e-ink computer for hackers: This is one of those things I know would just collect dust after an initial honeymoon period but is still want it SO MUCH!...

May 21, 2023 · 2 min · 240 words · Botond

🔗 Links of the Week: A Windows Bug, Image Kernels, AWS, GitHub, and of course AI

Not AI How to lose your work using Undo Copy in Windows: Windows has a terrible surprise hidden in the context menu of Windows Explorer. Image Kernels Explained Visually: A technique used in image editors like Photoshop or Gimp and in computer vision is to apply image kernels (or convolution filters/matrices) to images to enhance or reducing certain features. This website allows you to try different kernels on an example image....

May 14, 2023 · 2 min · 301 words · Botond

🔗 Links of the Week: Programming, AI, AI, and even more AI

Not AI World Smallest Office Suite: Obviously impractical, but the way he implements the apps is very interesting. I found the best anagram in English: Perl veteran finds an interesting way to rank anagrams. AI Bing’s A.I. Chat: ‘I Want to Be Alive. 😈’: Microsoft’s new chatbot goes crazy after a journalist uses psychology to manipulate it. The article contains the full transcript and nothing else. It’s a fascinating read....

May 11, 2023 · 3 min · 441 words · Botond

👨‍💻 Micrograd.js

I have recently started working through Neural Networks: Zero to Hero, Andrej Karpathy’s excellent AI course. In the first video, he demonstrates how to build micrograd, a library that can be used to implement backpropagation, the algorithm used to train neural networks. As an exercise, I tried to reimplement it in JavaScript to check my understanding. I was able to do it mostly from memory which is a testament to Andrej’s qualities as a teacher....

May 4, 2023 · 4 min · 790 words · Botond

💡 TIL how to select N random lines from a file on the command line

I’ve just learned how to select N random lines from a file on the command line: shuf -n 10 file.txt This is amazing. I’ve been using Linux for years and I had no idea this was so easy.

May 1, 2023 · 1 min · 38 words · Botond

🔗 Links of the week: AI, GPT, Prompt Engineering

OpenAI API: If you want to call OpenAI’s models (e.g. ChatGPT) programmatically or build AI-based products. Neural Networks: Zero to Hero: If you want to understand how GPT works from the ground up (I’ve only watched the first two videos but they’ve been fantastic). A simple Python implementation of the ReAct pattern for LLMs: How a simple plugin system works. Prompt injection: What’s the worst that can happen?: The most serious vulnerability of GPT-based applications....

May 1, 2023 · 1 min · 149 words · Botond

🌀 Dealing with Nothing in C# - Option

It is a very common pattern to return null when something does not exist. Suppose we have a system where a UserRepository object can retrieve User objects from persistent storage - like a database. public class UserRepository { public User Get(string email) => context.Users.SingleOrDefault(u => u.Email == email); /* ... */ } This is also a very common source of bugs. Consumers of the UserRepository routinely forget to check whether the reference returned is null, causing the code to blow up at runtime unexpectedly....

December 15, 2016 · 9 min · 1844 words · Botond

🌀 Dealing with Nothing in C# - Nullable

In the previous installment of this series, we saw why the null value can be an annoying source of errors. But there are cases when you positively wish for a variable, that otherwise cannot be null, to be able to have a null value. Imagine, for example, a web site that stores the last time each user has logged in. public class User { public string NickName { get; set; } public string Email { get; set; } public string PasswordHash { get; set; } public DateTime LastLoginTime { get; set; } } If a user has just registered but they haven’t yet logged in, we want the LastLoginTime property to be somehow empty....

November 30, 2016 · 8 min · 1594 words · Botond

🌀 Dealing with Nothing in C# - The Null Object Pattern

The null reference is so ubiquitous, such an integral part of our experience as programmers, that it would be hard to imagine a world without it. Yet it is the source of so much frustration and actual financial loss that it is well worth the effort to think about some alternatives. But what exactly is the problem? Let’s imagine we have a system where customers can place orders. The orders contain line items that have a reference to a product and they store the quantity ordered....

November 11, 2016 · 4 min · 704 words · Botond