Posts

Superb message of caution about AI from MDN - Learn web development

MDN - Learn web development: A cautionary tale - "AI tools present their answers in a confident, authoritative voice, but they can often be misleading or just plain wrong. Some of the mistakes they make can be very subtle. They don't have any innate intelligence of their own — they are basically advanced pattern matching tools. AI tools compile their answers from other sources out there, so will hoover up wrong information as well as correct information. Even two correct sources can be combined to create an answer that is incorrect." Based on my usage of AI tools for web and mobile app development for close to one and a half years now, I completely agree with the first sentence of the above paragraph: "AI tools present their answers in a confident, authoritative voice, but they can often be misleading or just plain wrong." Note that my software development work involving these AI tools has been mainly using React, React Native and Vanilla JavaScript and also qu...

JavaScript Refresher and Detailed Study - Part 3

Last updated on 4 Sep 2026 Post series: Prev Part (2) Contents First look at iterable in javascript.info Quick look at MDN: Iterators and generators; Did not see iterators and generators in React JS codebases I saw Why this. is needed in the iterable examples of javascript.info What's needed to make an object iterable? Javascript.info range iterator case does not really iterate over range object Vanilla JS program could leverage run to completion guarantee but that may not be recommended in React JS programs Dangers of merging iterator into the iterable JavaScript surrogate pair (e.g. most emojis) causes length property of string to give inaccurate string length; Array.from() fixes it Vast majority of apps still use standard .length property; Array.from() is slower and .length is good enough for most use cases Modern C++ std::string too faces the same issue; Special functions provide solution but at performance cost Using break in loop is acceptable as guard c...