News for hackers. Stuff that matters.
Re:GitPitch – Markdown Presentations for Devs on GitHub and ... by dheera on Thursday April 27, 2017 @02:22AM (#14209584)
Am I the only one that hates markdown? HTML just seems so much more intuitive to me. I can never remember how to make text bold or italic in Markdown. Is it 3 quotes? 2 quotes? Single quotes? Double quotes? Asterisks? Wait, is astersks for bold or asterisks italic? Try all the combinations and see what happens?

Compare that to <b> -- b for bold! <i> -- i for italic! Super intuitive!

And what about headings? Is it stars? pound signs? random rows of dashes? or is it equals signs? Does more pound signs make it bigger or smaller? What happens if the number of dashes or equals signs is different from the number of characters above it -- will my PC blow up? What if one of the characters is a Chinese character -- does it still count as 1 equals sign? Or 2? Or 3? Is it based on the number of bytes after UTF-8 encoding or the number of multibyte characters? Should I just screw it and use bold text as a heading instead of googling for markdown cheat sheets?

Compare that to <h1>, <h2>, ... same syntax as the bold and italic tags so you don't have to memorize a new syntax to do headings once you've learned how to do bold and italics. Isn't that revolutionary?

As a bonus, cleanly-written semantically-meaningful HTML you write can be styled to perfection with CSS in any old web browser without any clunky interpreters or middleware. You don't even have to install anything. Isn't that even more amazing?

Am I the only one that actually wrote a script to convert HTML to Markdown just so I can create those silly README.md files without having to remember some awfully inconsistent syntax?

Re:GitPitch – Markdown Presentations for Devs on GitHub and ... by blipmusic on Thursday April 27, 2017 @02:39AM (#14209645)
You seem to miss the idea of Markdown.

In its original form it was simply an aid to get static html from human readable text (<- that there is the basis for md).

For better or worse, it's been forked a few times, adding new abilities or even in efforts to make it stricter. The main idea of readability still applies. I could hand over a markdown formatted txt file to someone and they'd probably read it just fine, whether they could code or not. Html in plain-text form, though? Not sure that would work.

It has quirks, but the whole I really like it. I've used it for writing guides, taking notes... Maybe even for web content at some point.

Re:GitPitch – Markdown Presentations for Devs on GitHub and ... by dlandis on Thursday April 27, 2017 @11:49AM (#14212382)
If you limited yourself to a small set of HTML though and kept the structure simple, then it probably wouldn't be much less readable than a Markdown document.
Re:GitPitch – Markdown Presentations for Devs on GitHub and ... by blipmusic on Thursday April 27, 2017 @12:06PM (#14212559)
How simple, though...?

    # title

    - item1
    - item2

    some paragraph with an *italic* word

->

    <html>
    <body>
    <h1>title</h1>

    <ul>
      <li>item1</li>
      <li>item2</li>
    </ul>

    <p>some paragraph with an <i>italic</i> word</p>

    </body>
    </html>
Re:GitPitch – Markdown Presentations for Devs on GitHub and ... by Chiguire on Thursday April 27, 2017 @12:22PM (#14212704)
You could have simplified that to:

<title>title</title>

    <ul>
      <li>item1</li>
      <li>item2</li>
    </ul>

    <p>some paragraph with an <i>italic</i> word</p>
No need for body and html element, you can inject that afterwards.

I think the most important aspect of markdown is not the syntax but the standardisation of styles. No needing to worry about how to make it look nice it's not only time saving but very helpful when reading hundreds of other people manuals.

Re:GitPitch – Markdown Presentations for Devs on GitHub and ... by dheera on Thursday April 27, 2017 @07:53PM (#14215839)
Really? The above HTML will look very readable if you just fire it up in a web browser. And if we all agreed on the location of an optional CSS file (e.g. ~/.default.css) anyone would be able to customize how all their documentation looks. It would be totally optional and just make semantically-good HTML go from readable to super-pretty per-user custom themes. Totally optional -- if you don't have it, you'll still have something extremely readable, well more readable than Markdown.

    <html>
    <head>
        <link rel="stylesheet" href="~/.default.css">
    </head>

    ... your documentation goes here ...

    </html>
The best part? If you don't think <i>this</i> is readable, just double-click and open the thing in a plain-old web browser and it'll be more readable than Markdown.
Re:GitPitch – Markdown Presentations for Devs on GitHub and ... by accordionclown on Friday April 28, 2017 @12:44PM (#14220932)
you have a point.

but you're just talking about _reading_...

when it comes to typing, and especially _editing,_ all that markup cruft becomes a distraction (at best), and usually much more like an irritating obstacle. and you glossed over the &rsquo; which needs to sit in the middle of every contraction. like this:

  &ldquo;if you don&rsquo;t have it, you&rsquo;ll still have something...&rdquo;
ick. no thank you.
Re:GitPitch – Markdown Presentations for Devs on GitHub and ... by dheera on Monday May 01, 2017 @04:26PM (#14241211)
"if you don't have it, you'll still have something ..."

is perfectly fine in HTML. If you for whatever reason believe left and right quotes should make a difference,

“if you don’t have it, you’ll still have something ...”

will be fine in HTML as well. You don't need awful escape sequences for these. Browsers will render them just fine.

Re:GitPitch – Markdown Presentations for Devs on GitHub and ... by blipmusic on Thursday April 27, 2017 @01:41PM (#14213331)
Fair enough and I agree on the styles. I usually take my notes in md whether I intend to render or not, just because I know I can render if necessary.
Re:GitPitch – Markdown Presentations for Devs on GitHub and ... by accordionclown on Friday April 28, 2017 @12:38PM (#14220880)
it looks a heckuva lot more simple to me. and clear.

and that's just from an "easy on the eyes" standpoint.

when i also think about actually typing all those unnecessary angle-brackets, i break out in hives. it's not "difficult". but it's terribly tedious.

but you should stick with what you like... :+)

Re:GitPitch – Markdown Presentations for Devs on GitHub and ... by fenomas on Thursday April 27, 2017 @06:17AM (#14210422)
I'm not particularly a markdown enthusiast, but most of these gripes make no sense. Remembering whether more pound signs make a header bigger is no different than remembering whether <h1> is bigger than <h3>, and double-byte characters don't affect markdown any differently than they do HTML, etc. And for the "will my PC blow up if I use the wrong number of characters?", you're referring to a rule that accepts any number of characters.

All that's going on here is that you're used to one syntax, and not to the other. If one is used to both, markdown is quite nice.

Also:

> Am I the only one that actually wrote a script to convert HTML to Markdown just so I can create those silly README.md files without having to remember some awfully inconsistent syntax?

HTML is valid markdown - you can just use <b> and <h3> and so on, there's no need to convert them to markdown equivalents.

Re:GitPitch – Markdown Presentations for Devs on GitHub and ... by chubot on Thursday April 27, 2017 @02:38AM (#14209641)
It helps a lot if you have syntax highlighting for markdown in your editor.

I've written my share of bare HTML... I did it that for 10+ years somewhat infrequently. I started a blog and used markdown and now I'm happy. HTML would have been worse for writing frequently IMO. It's annoying to type and annoying to read.

One thing that is annoying is that hyperlinks tend to take up a really long line, more than 80 characters. You can't have a space after <a href=""> or before </a>, because that affects the appearance.

Re:GitPitch – Markdown Presentations for Devs on GitHub and ... by thiht on Thursday April 27, 2017 @05:43AM (#14210299)
Is it <h1>? <header>? <head>? <title>? <caption>?

If you don't actually learn Markdown, how do you expect to be able to write it?

Titles go from # to ###### (<h1> to <h6> if you like)

Bold is * * bold* * (without spaces), italic is * italic*

Is it really that hard to learn once and for all?

Re:GitPitch – Markdown Presentations for Devs on GitHub and ... by robschia on Thursday April 27, 2017 @06:58AM (#14210569)
And this basically covers 90% of Markdown
Re:GitPitch – Markdown Presentations for Devs on GitHub and ... by finid on Thursday April 27, 2017 @08:36AM (#14210966)
I can never remember how to make text bold or italic in Markdown.

I stopped reading your comment there. It indicates that you're either lazy or not too bright.

A 5 year old can pick up 95% of Markdown in 5 minutes. Yes, and that includes bolding and italicizing text.

Re:GitPitch – Markdown Presentations for Devs on GitHub and ... by kaushalmodi on Thursday April 27, 2017 @07:35AM (#14210714)
Cannot tell if you are serious.. If you can learn HTML, you cannot learn Markdown?

http://www.markdowntutorial.com

Re:GitPitch – Markdown Presentations for Devs on GitHub and ... by PinguTS on Thursday April 27, 2017 @03:14AM (#14209775)
I am completely with you. I know what you mean. I have the very same problems.

From the history of Markdown, why it was invented? It is dead simple. John Gruber said: "I am en editor and HTML is to clunky for me, so I will reinvent the wheel and make it easier." It is basically the very same reason why we have HTML these days, because Tim said "SGML is to clunky for me, so I will reinvent the wheel and make it easier."

You need to remember, that John Gruber is a journalist/editor he writes articles for magazines (and now for the web). Presumably, he learned as a journalist to write simple plain texts with only a few marks to indicate headlines, comments, and alike. Then the layouter would do the job and layout the text for the magazine. It is even so today how most journalists work.

Also, I have been in the industry now for some time and I see that pattern over and over again. There is some kind of standard that evolved over time, because of feature requests in-cooperated into the standard. Then there comes some guy/girl with a very simple use case and thinks "This standard is way to complicated for my simple use case. I can do that better." Then this new way gets some attention and other people are speaking out loud "Yeah, we have the same trouble for some time. Lets make that new way standard and improve from that on, now." This new way will now become a standard. Lots of people having new feature request, because this old standard can do this cool feature the new standard can't, so lets in-cooperate that into the new standard. And so on, and so on. And the wheel will start over again with a new person.

BTW, you can apply the same pattern to programming languages. Remember why and how PHP started? Because Perl was a go to at the time, but it was to complicated for some people. Then came Ruby on Rails.