Skip to main content
6 of 8
added 170 characters in body
lemon
  • 15.5k
  • 6
  • 9

When to use code-formatted tables and SO-formatted tables

Given a code-formatted table:

+------+------+
|  id  | name |
+------+------+
|  1   | Paul |
|  2   | Nash |
|  3   | Anne |
|  4   | Lily |
+------+------+

and its corresponding SO-formatted table:

id name
1 Paul
2 Nash
3 Anne
4 Lily

I always prefer the second one against the first one, for a very simple practical reason. If you need to debug code, and want to reproduce the tables in a private environment, and you attempt a copy-paste, the former one will give you the whole table skeleton you need to polish by hand (quite a bit of time if the table is big), while the latter one will allow you to copy data right away.

After having edited the table of a post (to the SO-format) for the sake of saving devs' (and my) time through the debugging step, got a comment from a more experienced user (around 20k rep), claiming that my edit was not relevant and, in a latter comment, that SO-formatted tables are poor with respect to code-formatted tables.

Am I missing something about it? What are the official SO guidelines?

Reference to the edited (and edit-rollbacked) question here.

lemon
  • 15.5k
  • 6
  • 9