Xah Web Dev Blog

Xah Web Dev Blog Archive

great pong game in JavaScript https://jackrugile.com/pongoo/

HTML: Input Number Field
minor update.

all updated.

updated

JS: Source Code Encoding
updated.

JS: Array.prototype.flat
minor update

minor updates.

major updates.

todo

minor updates

updated.

minor updates

JavaScript NaN === NaN?

JavaScript try this in your browser console NaN === NaN did you guess right?

updated:

HTML Video Tag
minor update

todo. review, read thru. these now has type link embedded.




JavaScript what's the difference between isNaN(num) and Number.isNaN(num)

JavaScript trivia.
what's the difference between
isNaN(num)
and
Number.isNaN(num)

answer at

the idiocy of programer nerds and typographers

Font Size problem

Firefox button size changes background color

idiotic Firefox. if you change button size, it changes the background color.

button size test 2020-04-22 rk6br
button size test 2020-04-22 rk6br
<ul>
<li><button style="font-size:1rem;" type="button">1</button></li>
<li><button style="font-size:1.1rem;" type="button">2</button></li>
<li><button style="font-size:1.2rem;" type="button">3</button></li>
</ul>

new.

JS: the Map Object Tutorial

CSS: Letter Spacing, Word Spacing

HTML: Definition List dl dt dd
minor update.

CSS: “:before”, “:after”
minor update

New Version of JavaScript in Depth

new version is out. I am sending to past buyers.

If you haven't already, buy at
Buy Xah JavaScript Tutorial

Master JavaScript today.

random tip today CSS Selector Syntax
when i work on my site, i use my own tutorials and references often so i was just looking at CSS to see how can i format table better for small screen

JS: Intro to Event-Based Programing
minor update

Web Design
new nav panel.

brave browser still crashes on macOS catalina. latest version 80.1.4.96

w3c and whatwg finally merged their html spec

w3c whatwg merge html spec 2020-03-09 m533q
w3c whatwg merge html spec 2020-03-09

w3c and whatwg finally merged their html spec. No more diff specs. Also, many links to w3c html spec now redirect to whatwg. e.g. https://www.w3.org/TR/html/syntax.html#void-elements

major update to my JavaScript tutorial's navigation panel. Have a look
JavaScript in Depth

updated.

Google's webp is a virus

Google's webp is a virus. It's now used by amazon when you are in chrome. Firefox now supports webp too. Apple still doesn't. Not in Safari, not in image preview, etc.

dot product of n vectors of any dimension

so yester we did JavaScript dot product of n vectors of any dimension

const vecDot = (( ... vectors) => vectors . reduce ((v1, v2) => v1. map ((x,i) => x * v2[i])) . reduce ( (a,b) => (a+b)) );

supreme code

Xah Talk Show
hand writing Chinese, JavaScript coding vector dot product function style, intro to constructed language 2019-12-14

Xah Talk Show
JavaScript+SVG live coding+tutorial. creating polyhedron real-time rotation from scratch 2019-11-23

Xah Talk Show Geometry regular polyhedron, JavaScript + SVG tutorial, rotate 3D cube real time 2019-11-15

The Garbage Webpack Wants You to Do

the garbage webpack wants you to do. basically, they are normalizing hack. creating hack solution to solve problem. like unix did to industry.

webpackjs loading image 2019-11-01 p9fkr
webpackjs loading image 2019-11-01 p9fkr

i think webpack basic features a great, e.g. bundling, removing unused code, minimize js, etc.

but they tried to basically change the JavaScript lang, by importing css, image, font etc Using JavaScript import syntax. to move image css etc seems a major hack. Moving file and dealing with html images is a complete different category of task then JavaScript import/export modules.

they try to make the dependency clear. but the way they did is a hack job, seems they are popularizing the practice by the tool.

that's how programing industry becomes garbage.

minor updates

JavaScript Webpack Bloat

JavaScript installing webpack installs 390 f packages. F JavaScript

js npm webpack install 2019-10-29 krjs9
js npm webpack install 2019-10-29 krjs9

following webpack official tutorial, 7 lines of code (213 bytes) becomes 134 lines 565k. jesus.

webpackjs generated bloat 2019-10-30 n324t
webpackjs generated bloat 2019-10-30 n324t

imgur reactjs bloat

imgur has become rotten since about 2017. Since, you can't view images with JavaScript off.

imgur reactjs bloat 2019-10-31 cqv9w
imgur reactjs bloat 2019-10-31 cqv9w https://twitter.com/csswizardry/status/1185604806901207045

svelte.dev

this is supposed to be the latest and greatest, better than angular react vue https://svelte.dev

JS: Event Delegation

js before after 2015 2019-10-04 b47s4
JavaScript 2015 before and after

npm choke on node version

apparently, in some dinosaur age, npm decided to sit on /usr/local/lib/node_modules , and that became a relic. by the way the whole /usr/local/ is the relic inherited from your love of the unix philosophy. few milen gen understand it today.

npm choke on node version 2019-10-01 cwy5k
npm choke on node version 2019-10-01 cwy5k

my unix skillz of 1999 comes back to life. had to do surgery to get npm upgraded on MacOS. #nodejs the pesky error “npm WARN npm npm does not support Node.js v11.14.0”

npm choke on node version 2019-10-01 4vsjn
npm choke on node version 2019-10-01 4vsjn

The Story of XML

The rise and fall of XML. Be conservative in what you send; be liberal in what you accept. 2019-10-01

JS: Load Order (major update)

Xah Web Dev Blog Archive

Buy Xah JavaScript Tutorial