Hacker News new | ask | show | jobs
by dmix 2587 days ago
Was there a reason why the runnable code example (plus a link to more examples "Rust by Example") that was front & center of the old homepage was removed?

I found it difficult to find any code examples on the new site.

2 comments

There's been a years-long discussion about how to get a good code sample, and we've never found anything satisfactory. Short examples don't show anything interesting, and interesting examples are too long. Nobody was happy with the old code sample, and nobody was happy with all of the suggested alternatives.
Every time a new language is posted on HN I spend ~15 seconds looking for code and, if I can not find it, I close the tab.

I can't imagine that isn't the case for many others.

I think Go nails this with the multiple code samples.

edit: In retrospect, I'm sure this is beating a dead horse and you're all well aware of this. I wonder, instead, what the approach is to fixing these problems when they reach a standstill? It sounds like no one could agree, so progress halted.

Everyone's experiences are different. Many languages don't even have a centralized web presence, and many don't have code snippets on the home page. Just as you'd absolutely expect it, I would equally never expect it.

You can see some code in less than fifteen seconds by clicking the big yellow "get started" button.

I think your parent commenter gave you a very valuable marketing feedback and you should take it seriously and not deflect it with the diplomatic yet hollow "everyone's experiences are different".

Did you agree with their feedback? Disagree? State it plainly, no one is going to sue you for it. :)

Many people who frequent HN are quite busy professionals. I too quickly close web pages that show zero code, or motivation for creating the language, or brief install instructions. To me it means that the creators can't present well and that leads me to assume that their programming language is bad at expressing intent as well (and thus verbose or confusing). Is this a wrong assumption? Very likely, but the first 10-30 seconds of percepting something new are not rational. That's a widely accepted psychological premise in marketing.

You might disagree and that's okay. Marketing however isn't at all about what you like but what your average site visitor likes.

So, finally, what was wrong with the code samples? They might have been too simple to be useful but they still did send the right signal to your busy programmer visitor -- IMO.

Feedback is valuable, and I did take it seriously. It's not new feedback.

> Marketing however isn't at all about what you like but what your average site visitor likes.

I agree 100%. But anecdotes, mine, yours or anyone else's, aren't data.

Ohh that’s where it is. That page with install instructions and examples is perfect.

I wasn’t looking to “Get Started” but why I might want to use it. Install instructions plus a basic example is all 90% of people want from a programming website.

You are coming from the perspective of somebody with deep knowledge of the language. For somebody that never saw it, a short code sample say a lot.

I know this because the first Rust code I've seen was that short sample. But then, I completely understand if you desire to focus the site on people with experience on Rust.

I may have experience, but it wasn't me that decided this. It was also from talking to a lot of new people, and their reactions to various code samples.

> I completely understand if you desire to focus the site on people with experience on Rust.

It's not, actually! It's the opposite. However, the audience is not just pure programmers either, it's also people like CTOs, etc.

golangs multiple options (via dropdown) always seemed the best to me https://golang.org/

Nim's line length one is okay https://nim-lang.org/

Although I'm sure you guys debated it to death already I still find it unusual to not be able to find a any example of actual within a few clicks. Committee-driven design is always difficult.

Go's page is for programmers; Rust's new page is for non-programmers. I think it's a mistake that you have to click "Get Started", then read through installation instructions, to finally see what Rust code looks like. It's all backwards. A short snippet (or two) should be front and center.

Crystal lang is another very good example: https://crystal-lang.org/.

Something similar to how Crystal approaches it could perhaps work, giving a whole bunch of different small examples (including compilation errors) with corresponding entrances to documentation.
Their new website is more marketing oriented. They tried to look for a "good" example and didn't find it. So basically they saw that the language looked ugly and didn't want to show it, which is in my opinion very dishonest. I remember voicing my dissatisfaction on this change. A snippet code should show what the language looks like, not mislead the reader.
Seems like there should be two sites; one for people they want to "market" to, and one for developers.