Lurker News

Comments (123) 33 threads

Earlier comments
r1ch1 reply#
Very pretty, though syntax highlighting for HTML seems to be conspicuously absent.
thomaspaulmann#
Thanks for reporting. We need to add it for sure!
galaxyLogic#
A shortcoming of this would seem to be that there are no line-numbers. (?) If you send a picture of code and want to discuss it with others it would be helpful to be able to refer to parts of the code by line-number.
alpaca12810 replies#
I may be rather opinionated on this, but there are literally community efforts to transcribe memes and other pictures containing text so visually impaired people get access to content, and meanwhile about every 3-4 weeks HN features yet another web app that basically takes human readable text and stores it in one of the most inefficient and inaccessible ways possible. It becomes invisible to screenreaders, impossible to copy-paste like you'd otherwise expect from text based content.

I don't want to come across as all too negative, but it somehow feels really strange to have so many websites that basically just take a fancy screenshot of text. To me it kind of comes across like a developer version of those Instagram pictures of meals at restaurants.

strangetortoise3 replies#
I think one of the problems here is that people wanna share code snippets on social media, where generally, the other approaches mean linking to an external github gist or similar, which isn't as visible. I'm not sure if I see a good solution, other than suggesting that the "link previews" for social media sites display the code snippet inline, if it's a link to a pastebin/github gists page.

Edit: Perhaps something can be done by somehow embedding the content into the image (EXIF?) Metadata?

abc_lisper#
Is there way to keep it as text, but make it uneditable? Ohh.. wait!
follower#
Yeah, I was just about to suggest embedding the code in a PNG text chunk: http://www.libpng.org/pub/png/book/chapter11.html#png.ch11.d...

Twitter etc should really already have standardised on a way to store the ALT text in an image so it only ever needs to entered once.
Even GIF has support for text in a couple of different forms.
( Although I learned something new about PNG's support for GIF's text support here: http://www.libpng.org/pub/png/book/chapter11.html#png.ch11.d... )
( I've spent far too long reading the GIF spec in relation to my project that adds audio to GIFs: http://audiogif.rancidbacon.com :) )

jaegerpicker3 replies#
Some people love the text from an aesthetic view. I don't think we should be against that but rather to advocate the improvement of accessible technology.
neilpanchal3 replies#
Engineering documentation shouldn't be about making pretty pictures, it should be about functionalism and putting that at the top of the list just below accessibility.

What do you know, people love fancy and decorative things. Just human nature.

jaegerpicker#
I'm not sure this is about Engineering documentation. I mean is that the purpose of the site? I agree Documentation should put function first but this is more about Aesthetics then documentation. A form of art if you will.
SirHound#
Doesn’t get you shares on Twitter though so shoulds aren’t relevant.

Continue this thread — 1 reply

wongarsu#
We have great accessible technology for colored text with background images.
whimsicalism#
Just not a valid concern in 2021
jeffalyanak1 reply#
What would be great is if it generated an SVG with the screen-reader accessible title and description built in.

[title] [long description] ...

qbasic_forever1 reply#
Why do you even need SVG if you're on the web already though? Nothing in these code pictures requires more than basic CSS and HTML. You can go wild with fonts, gradients, shadows, etc. to make beautiful looking pre and code elements. Tools like prismjs will syntax highlight with spans. Everything is in plain old semantic HTML with aria properties where appropriate.
saagarjha#
You need it for places that will only take images.
riedel#
Good point. Totally agree. SVG would be nice way out but it is also hard to make accessible in comparison to pure html. Another example are badges. Even shields.io SVG badges are hard to make screen reader compatible (personally gave up on this some time ago). In the end inclusive design will make the web better for everyone beyond the short wow effects.
Lorkki1 reply#
> a developer version of those Instagram pictures of meals at restaurants

I guess those pictures are popular because food is easy to relate to, and people build lots of social interactions around eating. Developers also relate to things about code, and like to share those relations among each other.
I feel some puzzlement about the format too, though. These days it's so easy to make text on the web look nice, and it's easily accessible, copyable and searchable.

littlestymaar#
But you can't share it on Twitter (which is almost 100% of the use-case for this kind of tools).

Too bad Twitter isn't a tech company, otherwise they could implement something like a code view in tweets. Wait a minute…

f-word1 reply#
It's not like the alt attribute stopped existing or anything. This simply lets you make what amounts to pretty screencaps of your code
alpaca1282 replies#
Name one social media/image hosting site that lets you set an alt attribute.

And when you actually have control over the content you can use some nice CSS to get the same look with a fraction of the size and 100% accessible.

jeswin#
If you're seeing many people building the same thing, it's probably because there's a need that you might have overlooked.

Here's one: people want to share formatted snippets on Twitter. They often post a link to the code below the pic, but being able to see it within the tweet is quite useful.

xwdv#
Just throw it in the alt text
com2kid5 replies#
I use fancy code display tools when making slide shows.

Though in my case I have a plugin for Notepad++ that lets me copy syntax highlighted code from NP++ and paste it into PowerPoint with all the highlighting and formatting maintained. Super cool plugin.
I can't just screenshot my editor (VSCode) because I use a theme that many people find violently irritating (DOS Edit).
Anyway, this looks like someone's fun little hacked together project to make something shiny. Making shiny things is fun. No one craps on shader toys for being inaccessible.
If someone tried to use the linked tool to make screenshots and used them in an actual MOOC or any other place for public consumption, yeah, wrong tool for the job. Don't do that. Use one of the dozens of existing tools that pretty print and embed code in an accessible way.

Continue this thread — 5 replies

Continue this thread — 1 more reply

leifg#
I love it. Will definitely use this for presentations.

The only missing feature I really need is Elixir syntax support (even though Ruby works for most examples)

Load more comments