Click here to Skip to main content
15,887,376 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Rob Grainger21-May-20 23:11
Rob Grainger21-May-20 23:11 
RantRe: What's the Most Concise, Human-Understandable Practical Language? PinPopular
Member 1456470917-May-20 20:49
Member 1456470917-May-20 20:49 
GeneralRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Leo5617-May-20 21:36
Leo5617-May-20 21:36 
GeneralRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Steve Naidamast18-May-20 2:50
professionalSteve Naidamast18-May-20 2:50 
GeneralRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Jalapeno Bob22-May-20 9:22
professionalJalapeno Bob22-May-20 9:22 
GeneralRe: What's the Most Concise, Human-Understandable Practical Language? Pin
johnywhy23-Oct-21 3:57
johnywhy23-Oct-21 3:57 
AnswerRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Fred283417-May-20 20:51
Fred283417-May-20 20:51 
GeneralRe: What's the Most Concise, Human-Understandable Practical Language? Pin
johnywhy8-Dec-22 20:29
johnywhy8-Dec-22 20:29 
Fred2834 wrote:
I would not want a very long hash table to be described without any special character. In the real world, large XML or JSON files are a reality.
I would. If i had to enter/edit the data manually, then i would want a long hash table to be described without any special character.

I had to achieve exactly that with a new Javascript tool i created. I had to figure out a way to store human-editable data in html -- ie, plain text. So, no formatting, no tabular display.

Here's my solution. It uses no special characters at all, no tags, and unlike XML/JSON the fieldnames aren't repeated for every record. I find this quite readable. It's optimized for low-risk editing. There are no syntax to screw up or special symbols to put in the wrong place, no punctuation to get wrong. And it's far less laborious without having to type all those tags or braces.

<mt-records hidden id="tattooists">
    NAME
    LINK
    DESCRIPTION

    Genevieve Dupre
    https://www.genevievetattoos.com
    This isn't what you expected.

    Joey Armstrong
    https://thunderhandtattoo.com
    The most amazing.
</mt-records>
GitHub - johnaweiss/HTML-Micro-Templating: Lightweight, robust HTML templating system.[^]

Granted, this would quickly become unwieldy with a lot of fields. The solution above isn't intended for data with a ton of fields.

But if i had a lot of fields, then i wouldn't be manually editing raw data in plain text format. Dude, why are you doing that?

XML/JSON are best suited for machine manipulation, not human reading/editing. But this thread is about human readable languages, not machine languages. So i'm unclear how your XML/JSON contradicts my desire for human-readable code.
https://github.com/johnaweiss?tab=repositories


modified 9-Dec-22 14:12pm.

AnswerRe: What's the Most Concise, Human-Understandable Practical Language? Pin
lopatir17-May-20 20:52
lopatir17-May-20 20:52 
GeneralRe: What's the Most Concise, Human-Understandable Practical Language? Pin
johnywhy22-Oct-21 7:57
johnywhy22-Oct-21 7:57 
GeneralRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Lorenzo Bertolino17-May-20 20:59
professionalLorenzo Bertolino17-May-20 20:59 
AnswerRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Richard Deeming18-May-20 1:28
mveRichard Deeming18-May-20 1:28 
AnswerRe: What's the Most Concise, Human-Understandable Practical Language? Pin
KateAshman17-May-20 21:57
KateAshman17-May-20 21:57 
GeneralRe: What's the Most Concise, Human-Understandable Practical Language? Pin
kalberts17-May-20 22:48
kalberts17-May-20 22:48 
GeneralRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Richard Deeming18-May-20 1:33
mveRichard Deeming18-May-20 1:33 
GeneralRe: What's the Most Concise, Human-Understandable Practical Language? Pin
kalberts18-May-20 4:30
kalberts18-May-20 4:30 
GeneralRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Richard Deeming18-May-20 4:39
mveRichard Deeming18-May-20 4:39 
GeneralRe: What's the Most Concise, Human-Understandable Practical Language? Pin
kalberts18-May-20 20:59
kalberts18-May-20 20:59 
GeneralRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Richard Deeming18-May-20 23:40
mveRichard Deeming18-May-20 23:40 
GeneralRe: What's the Most Concise, Human-Understandable Practical Language? Pin
kalberts19-May-20 6:55
kalberts19-May-20 6:55 
GeneralRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Richard Deeming19-May-20 7:31
mveRichard Deeming19-May-20 7:31 
AnswerRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Stuart Dootson18-May-20 0:59
professionalStuart Dootson18-May-20 0:59 
AnswerRe: What's the Most Concise, Human-Understandable Practical Language? Pin
BryanFazekas18-May-20 2:21
BryanFazekas18-May-20 2:21 
AnswerRe: What's the Most Concise, Human-Understandable Practical Language? Pin
W Balboos, GHB18-May-20 2:35
W Balboos, GHB18-May-20 2:35 
AnswerRe: What's the Most Concise, Human-Understandable Practical Language? Pin
Member 1181677618-May-20 3:47
Member 1181677618-May-20 3:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.