Posts

css box shadow instead of border

Borders take up space in web browser html When setting width/height in a component this can have unintended consequences: the size of the component is not as expected. The content area may be less. A cool solution is to use box-shadow instead of border e.g. 1 px border `box-shadow: inset 0px 0px 0px 1px blue` see good explanation here

AI Assistants - Kent Dodds, "Ai assistants are a force multiplier"

"Ai assistants are a force multiplier" "Learn how to use efficiently" I watched Kents Epic dev course (15 mini videos) on how to use AI in your workflow. These are my notes. Customize your AI assistants. the more AI assistants know about you the better chatGpt 4 allows you set "custom instructions", which Kent uses to tell his role (web developer), frameworks & languages used (e.g. remix, typescript), some prettier rules, works on a mac, uses vscode etc. unfortunately this is a chatGpt 4.0 feature (I don't see in 3.5), but I asked chatGpt about it and it recommended you could start the conversation by providing this as context information and provide detailed instructions  you can also tell chaGpt how to respond e.g. "terse", "casual", "call me Denis", "consider new technologies and contrarian ideas", "be accurate and thorough" etc. I tried Kents query in 3.5 and it provided a better answer than 4.0

NVIDIA CEO Jensen Huang is impressive

The more I learn about him, the more Nvidia CEO Jensen Huang impresses me. "No task is beneath me because remember I used to be a dishwasher and I mean that. I used to clean toilets. I've cleaned a lot of toilets. I've cleaned more toilets than all of you combined" - wow! his first job was at Dennys, they have a booth dedicated to him there - from  this Stanford talk An immigrant to the US where he attended high school. Graduated as an electrical engineer from Oregon State Uni 1984. Masters from Stanford in 1992. At age of 30 in 1993 founded Nvidia. Lost 80% of share price in the 2008 Great Recession. But has recovered spectacularly. He has ~40 direct reports. Doesn't understand why a CEO would have only a few reports. "The future of computing will be highly generated. Most of it is intelligence. In the future our computers will behave in that way." Highly generative versus retrieved. "Start from first principals" How would I build it if doing

Notes on The Turing Lectures: "What is generative AI?"

  The Turing Lectures: What is generative AI? Generative - create new content (audio, code, images, text, video) Artificial Intelligence - automatically using a computer program  "a lot of myth about it, its just a tool", "we have to spell it out" Generative AI is not a new concept. Google translate (17 yo) is an example of generative AI. Another example is Apples Siri (11yo), another generative AI.  Phone autocomplete or Google search autocomplete Not that new so "what is the fuss"? Answer:  chatGpt was launched.  chatGpt is a lot more sophisticated than older AIs.  You can have a conversation. The technology is not extremely new. It uses language modeling. Given a context, the language model can predict e.g. context: "I want to" prediction: play, eat, shovel AIs used to count to predict but latest use Neural Networks. Feed context (prompt text) into neural language model which predicts the answer. Basic steps to build a language model: Step 1.

a unified theory

  What a well written and thoughtful post A unified theory of  " That’s what work is, after all. Work—the action of change, the movement of energy from one being to another—is the means by which fucks are granted.  Good work is the art of giving a fuck about the living.  And all of us, every day, are faced with good work that needs doing, and good work that we can do."

npmtrends is cool

Image
npmtrends is cool great for researching npm packages, you can enter multiple packages and see some comparison info, checkout the table below including "last updated" and suggested searches e.g. this link compares different react drag'n'drop libraries https://npmtrends.com/@dnd-kit/core-vs-react-beautiful-dnd-vs-react-dnd-vs-react-drag-and-drop-vs-react-draggable-vs-react-file-drop

Ye lowly ole' html checkbox

Ye lowly ole' checkbox Often when developing with frameworks like React we use html elements like checkbox (input type="checkbox") as "connected" controls and don't depend on or avail of the default html behavior  (by connected, I mean using useState to track the checked/unchecked state of the checkbox). Also worth noting we often use custom components which wrap the html element. But react-router v6.4 and above requires you (using the standard flow of Form to action function handler) to depend on the default/native html element behavior because react-router follows standard web patterns for form handling and submission (which is a good thing). For checkbox that  native html element behavior  is: use the name attribute to give it a name and if it's checked the name will be submitted in  the form data  by default if the checkbox is checked when submitted, then the form submitted will contain: <name>=on "on" is just the default html checkbo