logoalt Hacker News

cousin_ittoday at 2:19 PM4 repliesview on HN

Maybe off topic, but I couldn't help thinking that "we need to show a heart icon" -> "let's use a heart emoji because it's easy" -> "let's use a specific emoji font for consistency across platforms" -> "let's import it from Google Fonts every time" seems like a problematic developer mindset.

A better heuristic is always keep in mind not only developer efficiency, but also program efficiency. I'm not saying optimize everything, but keep program efficiency in mind at least a little bit. In this case, that would've led the developer to download a tiny SVG or PNG and serve it from the app itself. Which would've avoided the problem in the post, and maybe other problems as well.


Replies

apiketoday at 3:53 PM

Not off topic at all!

While in this case we’d included the emoji font for displaying user content in another part of the app, the hazard of letting a “simple” approach expand and get out of hand is part of what I wanted to convey in writing this.

riwskytoday at 2:52 PM

I agree that the font and emoji hops aren’t great for complexity or performance, but the problem in the post was in the rendering of a tiny SVG; serving it directly would not have avoided the problem.

bambaxtoday at 3:52 PM

Not OT at all. Emojis everywere are ridiculous. And coding agents love them! They put emojis in Python log lines which inevitably break the console, and of course in web pages. Logs don't need emojis. Not sure if anything does.

kitdtoday at 2:24 PM

I would say just reusing widely-used emojis you have already downloaded would be less error prone

... assuming it all works ofc (though you could say that about serving svgs too)