Skip to main content
7 of 8
grammar and spelling fixes
cigien
  • 60k
  • 4
  • 81
  • 83

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 on the debugging step, I got a comment from a more experienced user (around 20k rep), claiming that my edit was not relevant and, in a later 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