Top
Best
New

Posted by begoon 1 day ago

Do you know that there is an HTML tables API?(christianheilmann.com)
248 points | 195 commentspage 2
skerit 1 day ago|
Interesting, 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!
layer8 1 day ago||
A bike-shedding thread on top as usual.
dang 1 day ago|||
I understand the frustration (probably no one feels it more than we do, because it's our job to help discussion stay meaningful). But please don't respond by posting like this.

It takes time for the contrarian dynamic to work itself out (https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...), and once that happens, the original problem subsides but and the secondary problem (shallow objection to the objection) sticks out like a sore thumb.

It's usually enough to downvote (or, in egregious cases) flag a post that shouldn't be at the top. In really egregious cases, emailing hn@ycombinator.com is also a fine idea.

From the guidelines: "Please don't sneer, including at the rest of the community." - https://news.ycombinator.com/newsguidelines.html

bfkwlfkjf 1 day ago||||
Yeah I see this a lot on HN. I think people feel the need to make precise and accurate statements about things. I think a lot of them, if they'd deep breath and waited 30 minutes, they wouldn't comment.
embedding-shape 1 day ago||
The internet is filled with pedantics, creeps and dogs posing as cats. The whole "take a breath" thing was early abandoned in favor of the now traditional "reply until the other party gives up" approach, which requires you to really dig into their messages and point out spelling mistakes, fallacies, and for programmers, variable names.
poisonborz 1 day ago||||
Code quality is not bike shedding.
Sharlin 1 day ago|||
It is, however, off topic and beside the point. And whether short names are a code quality issue is a rather contested and context-dependent topic.
nkrisc 1 day ago|||
Code quality of... an example snippet?
davidmurdoch 1 day ago||
Especially
blackcatsec 1 day ago||
especially now that the example is gonna end up in some LLM somewhere and folks will just copy pasta.
skerit 1 day ago||||
It's hard to read, especially in the lambdas.

It's a small critique, I'm sorry it got upvoted by other people.

refulgentis 1 day ago|||
Usually I'd cosign, but I get it, after a similiar issue I had a couple days ago with a Rust article that was insanely frustrating to deal with.

It's a brain scramble because you can't just read in toto.

Well, you can literally, but, you don't feel like you grok it.

And when you take a second pass you gotta slow down and stop and parse "what's r here? is it relevant? oh rows?"

It's one of those things that's hard to describe because it doesn't sound like much if you got it. And this example is trivial, especially if you're not open to the idea its a problem (r/c = rows/columns) But it's nigh-impenetrable in other scenarios.

You feel like you're barely understanding something that you actually might grok completely.

embedding-shape 1 day ago||
> It's one of those things that's hard to describe because it doesn't sound like much if you got it. And this example is trivial, especially if you're not open to the idea its a problem (r/c = rows/columns) But it's nigh-impenetrable in other scenarios.

I agree, it's highly context-specific.

In a small demo for a small blog post with basically no complexity? Go ahead, use 1 character variable names, it really isn't difficult.

In the 1000 long CUDA kernel where you barely understand what's going on even though you understand the concepts? I'd be favoring longer descriptive names than one letter names for sure.

Sharlin 1 day ago|||
It’s normal to use short names for things with short scopes.
foofoo12 1 day ago||
Yes, and the reason for why that's OK is that the context is just few lines. But this is borderline due to the amount of variables.

In just 4 lines you have r, row, t, ri, l, i and c.

The full variables names are so short anyway that personally I'd write them out. Code does evolve and there's a risk of this suffering as a result.

Sharlin 1 day ago|||
That’s a fair point.
NetMageSCW 1 day ago|||
rowIndex isn’t that short.
foofoo12 1 day ago|||
We might be able to use rowIx? Let's discuss it on the next Monday standup. Everyone will need to have an opinion, max 5 minutes per person.
bdangubic 1 day ago|||
shortness is in the eye of the beholder… program with spring framework long enough and rowIndex sounds like abbreviation. :)
foofoo12 1 day ago||

  RowIndexFactoryGeneratorService rowIndexFactoryGeneratorService = new RowIndexFactoryGeneratorService();
  RowIndexFactory rowIndexFactory = rowIndexFactoryGeneratorService.getTheFactoryOrSomethingIDontCare();
  RowIndex rowIndex = rowIndexFactoryGeneratorService.generateRowIndex();
niek_pas 1 day ago|||
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. :)

adamddev1 1 day ago|||
Strong BASIC memories. On the Apple IIe, anything after the first two characters of variable names was ignored.
somat 1 day ago||||
It is also a math thing. most(if not all) constructions intended for mathematical consumption have some of the most miserable naming I have ever seen. I think it comes down to two things. when I am feeling less charitable it is that naming things is hard. so they don't bother. And when more charitable it is that they are optimizing for quick mental manipulation of a familiar machine. This tends toward the smallest variable names you can get away with, tons of implied context and compressed symbology. Of course this leaves the rest of us struggling, not with the concept but the way it is presented.

I like to joke, "you think programmers are bad at naming thing, you should see the mathematicians, programmers are infants before the infernal naming sense of the common mathematician".

bottd 1 day ago||||
Do you always feel this is the case? To me the go to single letter variables are very readable. Used so widely my eyes parse them like other symbols: =, &, +, etc.
alentred 1 day ago||
My rule of thumb: only using single letter variables in one-liners (and never if it spills to another line), or for something that is conventionally represented as such. So for example:

    ```python
    bar = [foo(e) for e in elements]
    ```
or, using `x`, `n`, `s` and similar when they represent just that, a generic variable with a number, string, etc. I think there is a Code Complete chapter about it.
jazzypants 1 day ago||
Yeah, I'm not GP, but my exceptions to this rule are `i` for "iterator" in `for` loops and `e` for "event" in event listeners.
NetMageSCW 1 day ago||
Don’t use ‘i’ (looks like 1), use ‘j1’, etc - helps set you up if you need a nested loop someday. Of course, at that point better naming would probably be best.
croes 1 day ago|||
In real ok, but in this short example it‘s pretty obvious what t,b, r and c mean
shiandow 1 day ago|||
I think the short names aren't anywhere near as bad for readability as using (ri,i) as a table index.

If you're going to use short names at least make it clear which belong together. Especially don't use different lengths when things ought to be similar.

    data.forEach((row,i) => row.forEach((ele,j) => ... ))
egorfine 1 day ago|||
> let b = document.body;

This one hurts the most. Save a few bytes for an ungodly amount of mental friction.

tbrownaw 1 day ago||
It doesn't save any bytes, that variable is used once.
jfengel 1 day ago|||
It's the lets that bother me. The point is elderly JS, and the entire operation is fundamentally imperative. But this code is brimming with opportunities to make mistakes. JS deserved its reputation.
fsckboy 1 day ago|||
>Use full words for variable names!

that's like saying in spoken language "don't ever use pronouns, or even first or nicknames, use full given names"

groguzt 1 day ago||
you are being intentionally dense, they are saying "don't use a single initial to identify someone, use their firstname instead"
AlienRobot 1 day ago|||
Personally I'd make everything const instead of let and use for of instead of forEach, but it's like 10 lines of code it doesn't really matter.
Sharlin 1 day ago||
Are you sure this old API does the right thing with for…of?
kaoD 1 day ago|||
It's only used to iterate the array
Sharlin 1 day ago||
Oops, right, I confused the variables.
runarberg 1 day ago|||
Should work just fine:

    > document.createElement("table").rows[Symbol.iterator]()
    // Array Iterator { constructor: Iterator() }
HTMLTableElement.prototype.rows actually just returns a HTMLCollection, so same as document.forms, or document.getElementsByClassName. HTMLCollection implements Symbol.iterator as you would expect.

https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableEl...

ninjin 1 day ago|||
Really? The variable name lengths? Not that the code is clearer as:

    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.

jonathrg 1 day ago|||
This is not an improvement. Having named variables for things is good actually. They will need to be declared again immediately once you want to modify the code. insertCell(i).innerText = c is a nonsense statement, it should be 2 lines for the 2 operations
ninjin 1 day ago||
I disagree, but maybe it is a cultural thing for those of us that are more used to functional styles of programming? I was taught method chaining as a style by a seasoned JavaScript and Ruby programmer myself and I do not find the semantics confusing. "Create X with Y set to 17 and Z to 4711" can be either on one or three lines to me, as long as the method calls are clear and short enough.

As for variables, I (again personally) find it taxing to have many variables in scope, so I do net see their presence as a universal good. If we instead simply use expressions, then there is no need to concern yourself with whether the variable will come into play later on. Thus, I think it increases clarity and favour that over the ease of future modification argument you propose (heck, I would argue that you get better diffs even if you force the variable declaration into a future modification).

As for bikeshedding this piece of code further, if I steal some ideas from chrismorgan [1] and embedding-shape [2] who appear to be way more seasoned JavaScript programmers than me:

    const $t = document.createElement('table');
    for (const r of
            [
                ['one',  'two',  'three'],
                ['four', 'five', 'six'  ],
            ]) {
        const $r = $t.insertRow();
        for (const e of r)
            $r.insertCell().innerText = e;
    };
    document.body.append($t);
This is now rather minimal and the logic is easy (for me) to follow as the scopes are minimal and namespace uncluttered. It was a rather fun little exercise for a language I am not overly familiar with and I learned a few tricks and perspectives.

[1]: https://news.ycombinator.com/item?id=45782938

[2]: https://news.ycombinator.com/item?id=45781591

matt_kantor 1 day ago|||
Looks like your code inserts a new row for every cell.
ninjin 1 day ago||
Cheers! Fixed.
phoronixrly 1 day ago||
Looks to me like it's following the JS conventions... Jk, no such thing exists still!!
The_President 1 day ago||
The depreciation of marquee and blink wasn't necessary; it's web developer's choice whether to use these and the visitor's choice whether to be repulsed. Marquee should have been improved for use as ticker elements for specialized application. The depreciation of nobr misses the point - the alternative is more complex. Hope the standard continues to keep the legacy elements: small, i, em, hr... etc.
pspeter3 1 day ago||
I’m curious what changes the author would like to see to the API
bstsb 1 day ago||
intermittent loading errors (503 Service Unavailable)

https://archive.ph/APbi8

runarberg 1 day ago||
I feel like IndexedDB is becoming this abandonware as well. There are so many ways where this (IMO rather badly designed) API can be improved but the standards committee seems completely uninterested. Even things like adding BigInt as primative is unimplemented.

I fear this will be even worse now that we have the origin File System API and people can bring their own database engines (like web-assambled SQLite). But for those of us that are striving towards smaller download sizes this is a disaster.

indolering 20 hours ago|
What has stalled with IndexedDB and BigInt?
runarberg 11 hours ago||
Lack of interest from standards committee and browser vendors seems to be the only thing stalling:

https://github.com/w3c/IndexedDB/issues/230

I personally think that this stall is simply a symptom of the larger issue that the IndexedDB standard was bad to begin with, and that lead to lax adoption from developers, which deprioritized vendors from fixing the standard, leading to a vicious cycle where even a seemingly trivial issue like adding BigInt support goes unimplemented.

I personally think that IndexedDB is salvageable, and not only that, it has the potential to be an amazing web API. But the way things are progressing with the standards committee, I very much doubt it will be any better in the foreseeable future.

indolering 10 hours ago|||
Yeah, they definitely stopped investing in the APIs themselves. If someone can make a polyfill to shoe-horn in the functionality, then they don't really see a need. Which is sad, as we have outsourced our future to TypeScript, React, etc.
righthand 1 day ago||
Will Google remove this API then if it’s abandoned?

Topic is reminiscent of a submission from yesterday about XSLT:

https://news.ycombinator.com/item?id=45779261

simonw 1 day ago|
XSLT requires hundreds of thousands (maybe millions?) of lines of security-sensitive code. That's why it's proposed for removal.

I doubt that's true for .insertCell() and .insertRow().

righthand 13 hours ago||
But the precedent isn’t fix the security sensitive insertCell() API, it is to remove it due to low usage. The number of lines is irrelevant IMO.

The Google deprecation notice fails to address why a gigantic company with nearly unlimited resources couldn’t implement this feature themselves instead of forcing a breaking change.

thatwasunusual 1 day ago||
> That way they’d finally get the status as data structures and not a hack to layout content on the web.

I remember doing this 25 years ago, but I assume (and hope) it's a huge minority who do this today?

embedding-shape 1 day ago|
cough view-source:https://news.ycombinator.com/item?id=45781293 cough
louissan 1 day ago||
Hey Chris :-)
Insanity 1 day ago||
Phew, this post single handedly made me feel old this morning. I started dabbling with the web just over 20 years ago but have mainly been working on the backend the past 10-15 years. I had no clue that nowadays programmers don’t know about this, so I assume it’s supplanted by modern frameworks or modern JS/CSS
spinningarrow 1 day ago||
I’ve been building sites since around 2000 and I’ve used HTML tables a lot (including for page layouts, remember those days?). There was a time when I thought I was fluent enough to not have to look up HTML or CSS docs for most things. But I don’t think I’ve ever actively used the DOM API that this article mentions so I learned something new today.
mattmanser 1 day ago||
Surprised, as we used this a lot around 2005, when IE6 was still dominant.

If was much simpler to build tables in javascript with this rather than using document.createElement.

Perhaps this was one of those things that you just had to know about, or be working on data heavy web apps.

alentred 1 day ago|||
Thank you for confirming I am not... crazy, just old then. I was staring at the code for minutes, trying to spot something unusual that I missed. So, this really just about the `<table>` element, or do I actually not see something?
xg15 1 day ago|||
It's about the insertRow() and insertCell() methods and rows[] and cells[] fields on the table element, not the table itself.
eterm 1 day ago||
I figured that was the normal way to interact with tables, what would people do otherwise?
xg15 1 day ago|||
Using the standard DOM APIs or - if they don't care about anything - innerHTML, I suppose.
kleiba 1 day ago||
Sorry I - also - am one of those old timers who don't understand this because the shown code is all I've ever used for creating table. So, what is this "standard DOM API" if I may ask? Could you post a code example?
wging 1 day ago||
You can use document.createElement and document.appendChild to create every last <th>, <tr>, and <td> if you want. Those functions are not specific to tables, unlike the one mentioned in the blog post. They can be used to create any elements and place them in the DOM. But if you know what you are doing you can get a perfectly fine table out of that. (Not that you should.)
xg15 1 day ago||
Yeah, that was what I was thinking of. I knew those as the essential APIs to modify the DOM without a full re-parse. And you can use them on table/th/tr/td nodes just like on any other node.
thorum 1 day ago|||
createElement(‘tr’) and table.appendChild(row)
paperpunk 1 day ago|||
It’s not about the table element, it’s about the API to construct and manipulate that element with a columns and rows interface which is largely superseded by general DOM manipulation.
littlestymaar 1 day ago||
Exactly like how `getElementById` replaced the direct use of the id as a JavaScript identifier.
xg15 1 day ago||
I remember there being posts that explicitly discouraged using IDs directly, but I'm not sure of tge reasons anymore. Maybe browser incompatibilities or unclear scoping and confusion with other variables?
withinboredom 1 day ago|||
It was either Mozilla (Netscape, I think) or IE that it didn’t work on for the longest time.
mook 1 day ago||
I think that was a native IE API that Mozilla had to add support for, as well as document.all (Netscape used document.layers).
chrismorgan 1 day ago|||
It works everywhere (it’s now specified in https://html.spec.whatwg.org/multipage/nav-history-apis.html...), but it’s brittle. It can break by adding colliding properties to window deliberately or by accidental global leak (… including things like setting in dev tools), by browser defining new globals, by some 'name' attribute conflict.
jcpst 1 day ago|||
Yep, didn’t realize this was unknown by enough web developers to warrant an article.
embedding-shape 1 day ago|||
I see new frontend developers using <div> for building buttons, and I've even seen people using <div> for doing titles! Us greybeards don't know how much apparent knowledge we're sitting on, it seems.
jacobyoder 1 day ago|||
In 2004 I was at a company that dedicated a team of people to rebuilding a bunch of tables (lots of financial data) in to styled divs because... "tables are depreciated". The fact that they couldn't pronounce or understand the word "deprecated" should have been enough of a clue to ignore this person, but they were the 'lead' on the web team, and... had been there longer than other people. Obviously they must know what they're talking about. Weeks later after having converted dozens of spreadsheets to divs (instead of just using tables) they were 'done', but it was a tremendous waste of time that ignored all the semantics of tables. I was asked to 'help out' on that project to meet the deadline and refused, citing that it was not just stupid, but a big waste of time and against web semantics.

"table" was never deprecated in HTML at all, but was discouraged for general layout (we were aware of this even in the early 2000s). But for representing tabular data - like... data in rows/columns from spreadsheets (with column headers and such)... HTML tables were absolutely the right (only?) way to present this.

I was at that company less than a year...

withinboredom 1 day ago||||
And spans for creating links…
Izkata 1 day ago|||
I recently discovered our frontend widget library draws an SVG to implement Radio instead of using <input type="radio">. I was looking at it because they forgot to add a "disabled" attribute.

Best case I'm hoping it's because they were required to get an exact design, but they really should have pushed back on that one if so.

joquarky 1 day ago||
Sounds like they either don't care about accessibility or like wasting money comprehensively reinventing things.
LaundroMat 1 day ago|||
Thereby forgetting that some people like to open links in a new tab.
embedding-shape 1 day ago||
And for the ones that remember to implement middle-mouse click to open new tabs, forgets that one can also do CTRL+click to open in new tab, or vice-versa.

Just use <a> please :)

jfengel 1 day ago|||
Is that bad?

Seems to me that we have redundant mechanisms for specifying semantics: tags and attributes (and classes as a specific attribute). Seems to me that tags are really just syntactic sugar for things like roles. Tables in particular are easily abused.

Of course I use the tag names, because they're idiomatic. But I feel like a newbie who identifies divs as the only true structure builder has a proper developer's intuition for separating presentation from content.

embedding-shape 1 day ago|||
> Is that bad?

As long as you think about semantics and accessibility and does the extra work to add those things, then not really.

But why add those extra things when we already get those for free by doing <h1> and then customizing the style? Everything you'd need to manually add, automatically works fine then, so seems like a no-brainer to avoid putting more work on your table.

swiftcoder 1 day ago|||
div-as-button/link leaves a lot of default interaction behaviour on the table. You'll need to handle all the keyboard interactions yourself, all the accessibility markup, etc.
bryanrasmussen 1 day ago|||
I knew it existed but I figured it was only really useful for extremely data-table centric applications so I've never used it.
dmd 1 day ago|||
Same. I use this all the time, have for decades. Had no idea other people didn’t.
zkmon 1 day ago||
Just a catchy title. Not abandoned etc. This is the only API available to manipulate HTML table tags.
jazzypants 1 day ago|||
Most people use declarative frameworks to build tables, and you could just use `innerHTML` or `append` or any other imperative DOM API to work with tables.
moritzwarhier 1 day ago||
Declarative frameworks build on the imperative DOM API.
simonw 1 day ago|||
They don't use .insertRow() and .insertCell(). Try searching the React codebase for those.
moritzwarhier 1 day ago|||
Yea, but that's pretty much irrelevant as long as the effect is exactly the same. Which brings us back to the point of the article: seeing this and feeling inspired to imagine interface extensions that go beyond syntax sugar.

I was replying to the wrong comment, because I was responding to this:

> I still use this pretty much everywhere to create HTML tables. Do people use something else now?

Regarding React: what would be the benefit for using this old syntax sugar in its vDOM implementation?

Page reflow is not an issue for vDOM as it batches such updates anyway?

And using syntax sugar without benefits in the DOM reconciliation would be pointless.

React also doesn't locate form input elements using document.forms.[name]?.[name] because... why should they?

Just because they can...

Regarding the creation of tables, the most common way to do it would be... parsing initial document's HTML?!

zkmon 1 day ago|||
What do they use?
simonw 1 day ago||
appendChild() and the like.
jazzypants 1 day ago|||
And, not a single one of the declarative frameworks use the HTMLTableElement API!
moritzwarhier 8 hours ago|||
Which is completely fine as long as it makes zero difference.

It's not that long ago when people were fighting here about React, Vue etc being too complex and comparing bundle sizes.

Using this right now would increase bundle size for no good reason whatsoever.

zkmon 1 day ago|||
So how they do they talk to the browser to add a row to the table? Do you know of any API other than DOM used for this?
plorkyeran 1 day ago||
They use createElement instead of the table-specific API.
moritzwarhier 1 day ago|||
appendChild, replaceChildren, etc work fine with tables?
lelanthran 1 day ago|||
> Phew, this post single handedly made me feel old this morning.

I hear you!

For me though, it made me feel old for a different reason

I had first developed webapps in the late 90s (96 onwards) using cgi-bin, perl, etc. My first webapp, done for money, was something similar to MRTG.

At some point in the last almost-30-years) I had actually used this API! I have, however, forgotten all about it and was only reminded of it with this post.

So, yeah, I feel old because I can legitimately say to many modern web-devs that "I've forgotten more about web dev than you you currently know" :-)

phkahler 1 day ago|||
HTML tables are cognitively if not officially deprecated these days. I made my 1996 resume in HTML using a table for layout and it was indistinguishable from the Word version when printed. Made by editing the HTML by hand too!

Tables are great. I don't doubt that CSS stuff is more capable, but the old ones are still useful.

xg15 1 day ago|||
I think the problem was that tables were always supposed to be for things that look like actual tables in the output - for that purpose they are not deprecated.

What is discouraged is using tables as invisible layout grids - and that was their primary de-facto usecase before CSS and grid layouts. But that had always been a hack, even though a necessary one.

euroderf 1 day ago|||
> What is discouraged is using tables as invisible layout grids - and that was their primary de-facto usecase before CSS and grid layouts.

After too.

I've seen enough "Introduction to CSS"s filled with caveats and hemming & hawing to know that it's all to be avoided when+if possible. I know, I know, there's a whole wide wonderful world out there full of aligns and borders and containers and insets and margins and masks and offsets and paddings and positions oh my. Bleccch..

joquarky 1 day ago||||
How was it a hack?

Hack implies brittleness. Using tables for layout was just fine for all but the most ideologically pure pedants.

leptons 1 day ago||||
Tables are probably still useful for layout in HTML emails (for advertising). I haven't had to work with HTML emails in probably 20 years, but I doubt much has changed about what is and isn't allowed in HTML emails.
fortyseven 1 day ago|||
Yep. Tables for tabular data are still on the menu.
ranger_danger 1 day ago||||
> HTML tables are cognitively if not officially deprecated these days.

According to who?

cruffle_duffle 1 day ago|||
Back in the early to mid 2000's, making your site "table free" while still working on IE6 was seen as a badge of masochistic pride.

Doing table-free multi-column layouts involved doing crazy “float: left/right + padding + margin” with an heavy sprinkle of IE6 clearfix hacks to work right. I mean eventually people dialed in the correct incantations to make table-free designs work for IE6 but it was never quite as straightforward or reliable as a good old fashioned table. Many megajoules of energy were wasted on webform drama between the pragmatic "fuck you, tables just work and I have shit to ship" webdev and the more academic "tables break the semantic web and aren't needed, use CSS." crew.

Like most things, the "tables are evil" mantra was taken too far and people started to use floated divs (or <li/>’s or <span/>’s or whatever) for shit that actually was tablular data! (I was guilty of this!).

And like most things, a lot of the drama went away when IE6 finally went away. People who weren't around back then simply cannot understand exactly how much IE6 held back modern web design. You could almost count on half your time being spent making shit work for IE6, despite the ever decreasing amount of traffic it got. I'm pretty sure I almost cried the day Google slapped a "IE6 will no longer be supported" on it's site.... the second they did that, my site got the exact same banner. Fuck IE6. The amount of costs that absolute pile of shit browser caused the industry exceeded the GDP of entire nations.

Anyway.... back to adding weird activex shit in my CSS so IE6 can support alpha-blended PNGs....

icedchai 1 day ago||
I remember those days. It was simpler to use tables for layout than to use early CSS for quite a while.
JofArnold 1 day ago|||
It's worth checking who the author is... Cristian's not exactly new to the game. I think he's being humble he doesn't know something despite his experience.
nunez 1 day ago|||
I feel like I used this when I built a red-light, green-light dashboard for Windows servers at a bank for my first job out of college (in 2009).
prokopton 1 day ago|||
I’ve been doing ssr for so long I can’t fathom why you’d build a table using JS.
EvanAnderson 1 day ago||
I've been working on a little SPA that manipulates tabular data and allows the user to insert rows. This is exactly the API I've been using. Like a lot of other commenters it never occurred to me that people wouldn't know this API exists.

Aside: I started with Perl CGI scripts, then ColdFusion, and finally Classic ASP back in the 90s. I had a chuckle a couple years ago dealing with a younger developer who was shocked that and oldster like me was up on new-fangled SSR patterns.

simonw 1 day ago||
You knew about the .insertRow() and .insertCell() methods?
spiderfarmer 1 day ago||
I made my first CRUD UI that didn't do full page refreshes with those methods.
embedding-shape 1 day ago||
I think most of us did the ol `$el.appendChild(document.createElement('tr'))` dance rather than using those, at least I did during the 00s for sure.
tokioyoyo 1 day ago|
Woah, it’s always weird to see how there’s modern web engineers that didn’t grow up during the era where entire layouts were built on tables. Not saying that it was good or bad, but just interesting.
wombatpm 1 day ago|
I remember doing image maps, splitting large images up into pieces, placing them in table cells and adding links to each cell as a poor man's GUI
joquarky 1 day ago||
I did this with OCR text. The OCR software output bounding boxes which I converted into client side image maps. The company wanted to patent it.
More comments...