Skip to main content
replaced http://meta.dba.stackexchange.com/ with https://dba.meta.stackexchange.com/
Source Link

Someone posted a comment (which was soon after deleted) with a link to an answer on Meta DBAanswer on Meta DBA with the same idea.
Given that the status of the question is (even for DBA!), I think this is by far our best option.

Someone posted a comment (which was soon after deleted) with a link to an answer on Meta DBA with the same idea.
Given that the status of the question is (even for DBA!), I think this is by far our best option.

Someone posted a comment (which was soon after deleted) with a link to an answer on Meta DBA with the same idea.
Given that the status of the question is (even for DBA!), I think this is by far our best option.

Use `practice`, since it seems to be so important.
Source Link
Siguza
  • 23.7k
  • 3
  • 24
  • 37

On Code Golf SE it is common practisepractice to use stack snippets to display leaderboards, i.e. tables.
So why not use them to process CSV?
Admittedly, this is more of a workaround than an actual solution, but I think it would still be better than having a ton of 1-rep users presented with yet another formatting feature just waiting to be abused over and over.
Users who do a little research and read through the help center can be trusted with formatting options though, IMO.

On Code Golf SE it is common practise to use stack snippets to display leaderboards, i.e. tables.
So why not use them to process CSV?
Admittedly, this is more of a workaround than an actual solution, but I think it would still be better than having a ton of 1-rep users presented with yet another formatting feature just waiting to be abused over and over.
Users who do a little research and read through the help center can be trusted with formatting options though, IMO.

On Code Golf SE it is common practice to use stack snippets to display leaderboards, i.e. tables.
So why not use them to process CSV?
Admittedly, this is more of a workaround than an actual solution, but I think it would still be better than having a ton of 1-rep users presented with yet another formatting feature just waiting to be abused over and over.
Users who do a little research and read through the help center can be trusted with formatting options though, IMO.

Rollback to Revision 3
Source Link
Siguza
  • 23.7k
  • 3
  • 24
  • 37

I vote against implementing this as a feature, because way too many people are struggling with the current formatting options already.  
Of course, such a formatting feature could be made available based on reputation points or something, but people don't seem to like that idea.

But I too get annoyed at database questions, sometimes because I wish I has a graphical view of their databaseDB, and the OP only provided an SQL dump, and sometimes because the OP actually made the effort of creating some ASCII art, but I wish I had an actual SQL to play around with.

On Code Golf SE it is common practicepractise to use stack snippets to display leaderboards, i.e. tables.  
So why not use them to process CSV?  
Admittedly, this is more of a workaround than an actual solution, but I think it would still be better than having a ton of one1-reputation pointrep users presented with yet another formatting feature just waiting to be abused over and over.  
Users who do a little research and read through the help center can be trusted with formatting options though, IMO.

Example snippet & data:  
(Warning: the JavaScript codeJS was made in less than 3 minutes<3 min and does not reliably parse CSV;CSV, it's only for PoCPoC!)

The JavaScript codeJS can be golfed to a one-liner, and the data could be put in the HTML or CSS field (I chose HTML here), so by default, you could look at the raw CSV data, and upon pressing "Run code snippet", you'd have it displayed as a nice table.  
Of course the code could (and likely should) then be expanded to switch between table and SQL view, display the table header in <th>s instead of <td>s, etc.

Database schemas, CSV and SQL
 

In order to present your database schema in the most useful and clear way, the community has come up with some code. To use it, press Ctrl+M or click on "JavaScript/HTML/CSS snippet" in the editor, then insert your SQL/CSV into the "HTML" field and paste this line into the "JavaScript" field:

Someone posted a comment (which was soon after deleted) with a link to an an answeranswer on Meta DBA with the same idea.  
Given that the status of the question is (even for DBA!), I think this is by far our best option.

I vote against implementing this as a feature, because way too many people are struggling with the current formatting options already.  
Of course, such a formatting feature could be made available based on reputation points or something, but people don't seem to like that idea.

But I too get annoyed at database questions, sometimes because I wish I has a graphical view of their database, and the OP only provided an SQL dump, and sometimes because the OP actually made the effort of creating some ASCII art, but I wish I had an actual SQL to play around with.

On Code Golf SE it is common practice to use stack snippets to display leaderboards, i.e. tables.  
So why not use them to process CSV?  
Admittedly, this is more of a workaround than an actual solution, but I think it would still be better than having a ton of one-reputation point users presented with yet another formatting feature just waiting to be abused over and over.  
Users who do a little research and read through the help center can be trusted with formatting options though, IMO.

Example snippet & data:  
(Warning: the JavaScript code was made in less than 3 minutes and does not reliably parse CSV; it's only for PoC!)

The JavaScript code can be golfed to a one-liner, and the data could be put in the HTML or CSS field (I chose HTML here), so by default, you could look at the raw CSV data, and upon pressing "Run code snippet", you'd have it displayed as a nice table.  
Of course the code could (and likely should) then be expanded to switch between table and SQL view, display the table header in <th>s instead of <td>s, etc.

Database schemas, CSV and SQL
 

In order to present your database schema in the most useful and clear way, the community has come up with some code. To use it, press Ctrl+M or click on "JavaScript/HTML/CSS snippet" in the editor, then insert your SQL/CSV into the "HTML" field and paste this line into the "JavaScript" field:

Someone posted a comment (which was soon after deleted) with a link to an answer on Meta DBA with the same idea.  
Given that the status of the question is (even for DBA!), I think this is by far our best option.

I vote against implementing this as a feature, because way too many people are struggling with the current formatting options already.
Of course, such a formatting feature could be made available based on reputation or something, but people don't seem to like that idea.

But I too get annoyed at database questions, sometimes because I wish I has a graphical view of their DB, and the OP only provided an SQL dump, and sometimes because the OP actually made the effort of creating some ASCII art, but I wish I had an actual SQL to play around with.

On Code Golf SE it is common practise to use stack snippets to display leaderboards, i.e. tables.
So why not use them to process CSV?
Admittedly, this is more of a workaround than an actual solution, but I think it would still be better than having a ton of 1-rep users presented with yet another formatting feature just waiting to be abused over and over.
Users who do a little research and read through the help center can be trusted with formatting options though, IMO.

Example snippet & data:
(Warning: JS was made in <3 min and does not reliably parse CSV, it's only for PoC!)

The JS can be golfed to a one-liner, the data could be put in the HTML or CSS field (I chose HTML here), so by default, you could look at the raw CSV data, and upon pressing "Run code snippet", you'd have it displayed as a nice table.
Of course the code could (and likely should) then be expanded to switch between table and SQL view, display the table header in <th>s instead of <td>s, etc.

Database schemas, CSV and SQL

In order to present your database schema in the most useful and clear way, the community has come up with some code. To use it, press Ctrl+M or click on "JavaScript/HTML/CSS snippet" in the editor, then insert your SQL/CSV into the "HTML" field and paste this line into the "JavaScript" field:

Someone posted a comment (which was soon after deleted) with a link to an answer on Meta DBA with the same idea.
Given that the status of the question is (even for DBA!), I think this is by far our best option.

Expansion, etc. Added some context.
Source Link
Peter Mortensen
  • 31.6k
  • 4
  • 22
  • 14
Loading
added 5 characters in body
Source Link
Siguza
  • 23.7k
  • 3
  • 24
  • 37
Loading
added 242 characters in body
Source Link
Siguza
  • 23.7k
  • 3
  • 24
  • 37
Loading
Source Link
Siguza
  • 23.7k
  • 3
  • 24
  • 37
Loading