Hacker News new | ask | show | jobs
by cyberferret 2226 days ago
Been using Carbon for quite a while now when illustrating code in my blog posts or on Twitter etc. It is even on my Chrome shortcuts bar.

Copy and paste aside, it is ideal for showcasing important bits of code such as variable or function names that you want to stand out for illustrative purposes. It is a wonderful teaching tool.

In any case - who wants to be a copy and paste programmer?? </wink>

2 comments

Who wants people with visual impairments to read their posts?
It's called ALT text. If you don't paste the same source in the alt attribute, that's the problem. Not having a nice image for sighted folks.
Alt text certainly wasn't intended for this kind of use. Screen readers don't cope with newlines in alt text particularly well, most just stop at the end of a line[0]. Also more care has to be taken when escaping the contents of the attribute, it's something people will definitely get wrong.

[0] https://developer.paciellogroup.com/blog/2015/09/short-note-...

The MacOS app Deckset has a pretty sweet syntax highlighting feature where you can selectively highlight smaller parts of the code in that way, and then step through it as an animation.

And at least you've got the original markdown and PDF/HTML exports for extra accessibility.