Tables died (thankfully) to make room for flex and grid. I can't see any use case for them at all anymore.
Tabular data? Tables have a purpose, it's just that people misused them for layout purposes.
Do you know that there is an HTML tables API?
11–20 of 206 posts
Re: Do you know that there is an HTML tables API?
#12Tables died (thankfully) to make room for flex and grid. I can't see any use case for them at all anymore.
I personally disagree. When data is semantically a table, not just a “table-looking” layout, I would rather use the table tag.
Re: Do you know that there is an HTML tables API?
#13https://github.com/ClickHouse/ClickHouse/blob/master/program...
Re: Do you know that there is an HTML tables API?
#14Earlier quoted context omitted.
Tabular data? Tables have a purpose, it's just that people misused them for layout purposes.
To be fair, we did that when there wasn’t much choice for laying out web pages other than using tables. I was there!
Young folk don't understand just how wildly different IE5 was to the Netscape or the Mozilla browser. Or just how bad Javascript was when it started to be used on the internet.
I've lived through and seen the evolution. For all the shit the JS community takes for constantly revving frameworks, it's 1000x easier to make a website that looks the same regardless of browser due to a lot of these frameworks and browsers themselves evolving.
Re: Do you know that there is an HTML tables API?
#15 let table = [
['one','two','three'],
['four','five','six']
];
let b = document.body;
let t = document.createElement('table');
b.appendChild(t);
table.forEach((row,ri) => {
let r = t.insertRow(ri);
row.forEach((l,i) => {
let c = r.insertCell(i);
c.innerText = l;
})
});
Use full words for variable names!Re: Do you know that there is an HTML tables API?
#16Re: Do you know that there is an HTML tables API?
#17Interesting, but the JavaScript examples hurt: let table = [ ['one','two','three'], ['four','five','six'] ]; let b = document.body; let t = document.createElement('table'); b.appendChild(t); table.forEach((row,ri) => { let r = t.insertRow(ri); row.forEach((l,i) => { let c = r.insertCell(i); c.innerText = l; }) }); Use full words for variable names!
As someone who likes to program in Haskell, I feel this pain very strongly. :)
Re: Do you know that there is an HTML tables API?
#18Tables died (thankfully) to make room for flex and grid. I can't see any use case for them at all anymore.
Re: Do you know that there is an HTML tables API?
#19Interesting, but the JavaScript examples hurt: let table = [ ['one','two','three'], ['four','five','six'] ]; let b = document.body; let t = document.createElement('table'); b.appendChild(t); table.forEach((row,ri) => { let r = t.insertRow(ri); row.forEach((l,i) => { let c = r.insertCell(i); c.innerText = l; }) }); Use full words for variable names!
const te = document.createElement('table');
document.body.appendChild(te);
[
['one', 'two', 'three'],
['four', 'five', 'six' ],
].forEach((r, i) => {
const re = te.insertRow(i);
r.forEach((c, j) => {
re.insertCell(j).innerText = c;
})
});
My personal stance on short variable names is that they are fine as long as their scope is very limited, which is the case here. Rather, the "crime" to me is an overuse of rather pointless variables as the majority of them were only used once.Disclaimer: I have not tested the code and I only write JavaScript once every few years and when I do I am unhappy about it.
Re: Do you know that there is an HTML tables API?
#20Interesting, but the JavaScript examples hurt: let table = [ ['one','two','three'], ['four','five','six'] ]; let b = document.body; let t = document.createElement('table'); b.appendChild(t); table.forEach((row,ri) => { let r = t.insertRow(ri); row.forEach((l,i) => { let c = r.insertCell(i); c.innerText = l; }) }); Use full words for variable names!
I was just about to comment the same. I’m sure people have a good reason for it (or at leafy _a_ reason), but single-letter variable names always struck me as optimizing for the wrong thing. As someone who likes to program in Haskell, I feel this pain very strongly. :)