Xah Web Dev Blog

Xah Web Dev Blog Archive

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

todo work in progress CSS: Word Wrap, Overflow Wrap

review CSS: Line Wrap

todo. review and add to panel index CSS: Reset, Default Values

todo. remove references.

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

todo

Micropayment on the Web: It's Only a Matter of Time

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

todo

Social Media Like Button

JavaScript complexity 2014

todo

there exist fucks in the coding industry that creates this complex fuck, and, is common, used everywhere in industry, as accepted practice

look

var CC = function(){
    var kk = function() {
        this.ii.apply(this, arguments);
    };
    kk.prototype.ii = function(){};
    return kk;
};

var PP = new CC;
PP.prototype.ii = function(){};

var p1 = new PP;

can you understand what it does? it's only 8 lines

take few min to try. see how far is your js skill. really, try to understand it. not just roughly get the idea. if all you can do is roughly have some idea what it does, that means you are another drib in the industry.

instead, you should: describe the full behavior of CC

now, let's dissect it mathematically.

first of all, it defines a function CC

kk is a function. kk returns undefined when kk is called

the idiots in the industry with that mcv and class shit. it's a train that won't stop, but runs out of steam in 10 years as always.

creating extreme complexity that nobody understands

your job is to analyze this code, detail EVERY aspect of its behavior, as a piece of math. (btw it is common, as exemplarily from js gurus)

my job, is to ding it with profusion and gravity. wait for it. i'm betting on myself on this. this is, boarding the train first, think about ticket later.

screenshot 2019-09-29 frf2s
screenshot 2019-09-29 frf2s

JS: Load Order (major update)

Xah Web Dev Blog Archive

If you have a question, put $5 at patreon and message me.