New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I want the code examples back on the front page! #396

Closed
P-E-Meunier opened this Issue Nov 29, 2018 · 11 comments

Comments

Projects
None yet
7 participants
@P-E-Meunier
Copy link

P-E-Meunier commented Nov 29, 2018

Content Feature Request

Summary

I loved the fact that there was (runnable) code on the front page.

Motivation

I've tried to teach/introduce Rust to some people, there are still echoes that it's hard to learn. Seeing some (non-scary) code on the front page might help. Also, programming languages are about code, so we want to see code first!

I guess a good sample depends on the target audience:

  • Hello, world in many languages is cool if I want to learn programming, which is not the primary target audience. This is also why I've never referred people to the front page to start learning Rust.
  • Rayon examples are great for future "former C++ users".
  • WASM is another fantastic example, with the extra benefit that things can run at native speed in the browser.

Or all three, in tabs, starting with the primary audience (i'd say Rayon).

The community is also an important part of Rust, and is quite different from other programming communities. I think organising a permanent vote to elect the best code sample, where anyone can vote, would be quite nice. To avoid popularity contests, the code should be submitted in categories (submitted by beginner/advanced) and anonymised.

@oconnor663

This comment has been minimized.

Copy link
Contributor

oconnor663 commented Nov 29, 2018

I don't have much of an opinion about what code should be on the front page, but it does feel surprising to me to have no code at all. I agree with the fire flower metaphor, that having a bullet list of generalizations about the language isn't really telling people what they need to know. But by the same token, people coming to a language's website probably do want to know what some code in the language looks like.

@ashleygwilliams

This comment has been minimized.

Copy link
Member

ashleygwilliams commented Nov 29, 2018

We've spent a lot of time investigating and debating about the best way to show the 'essence' of Rust, and eventually concluded that there is no "one true Rust way" - indeed, that's why we link so prominently to pages describing the areas you might want to use Rust for! You'll note that some of these pages do have code where it's appropriate, which provide a more tailored approach to introducing users to Rust code. We're happy with this approach and aren't looking at changing it at this time.

@oconnor663

This comment has been minimized.

Copy link
Contributor

oconnor663 commented Nov 29, 2018

Sounds fair. Mainly I just wanted to check that yall had thought about it. I bet a lot of other folks are going to end up asking the same question.

@PayasR

This comment has been minimized.

Copy link

PayasR commented Nov 29, 2018

The scala website (https://www.scala-lang.org/) has a good way of tackling this IMO, under the 'Scala in a nutshell' section. Could be a good reference point when or if anyone wishes to take a look on this.

@lilyball

This comment has been minimized.

Copy link

lilyball commented Nov 29, 2018

I strongly disagree with this decision. The lack of code examples is the cardinal sin of programming language websites. Even if it's on a secondary page devoted to code samples and not the front page, it's still something we absolutely should have (and if it is on a secondary page then it should have a prominent link on the front page).

I get that there's "no true Rust way", but as a developer, being able to see what the language looks like is really important. And the fact that we have the ability to offer an editable runnable code sample right in the browser is really compelling, I don't understand why we don't want to leverage that ability.

@oconnor663

This comment has been minimized.

Copy link
Contributor

oconnor663 commented Nov 29, 2018

@kballard note that two of the "Learn More" links go to pages with code samples.

It sounds like Ashley and the team have met people who were actually turned away by an in-your-face generic code sample. I'd be curious to hear the stories. But I worry that calling it something we "absolutely should have" implies that they haven't even considered it, which of course they have.

@varkor

This comment has been minimized.

Copy link
Member

varkor commented Nov 29, 2018

It sounds like a decision has already been made here, but I'd just like to weigh in and say that when visiting websites for programming languages, I definitely want to see code samples — it's one of the primary things I'm interested in, even if it's not incredibly useful at first glance.

The current front page has so much whitespace, it'd be easy to fit a small sample in there, which I think would be really appreciated.

@P-E-Meunier

This comment has been minimized.

Copy link

P-E-Meunier commented Nov 29, 2018

indeed, that's why we link so prominently to pages describing the areas you might want to use Rust for!

I completely understand, I wasn't aware of these discussions. I also said I wasn't particularly happy with the previous state of things. How about rolling/randomised examples, taken from a large enough list? How about links to examples from the first page?

@ashleygwilliams

This comment has been minimized.

Copy link
Member

ashleygwilliams commented Nov 30, 2018

hey folks- we are not going to put a code sample on the front page. that is decided at this point. please do not continue to comment on this issue.

@pnkfelix pnkfelix referenced this issue Nov 30, 2018

Open

Landing Page tracking issue #235

4 of 17 tasks complete
@Benjamin-L

This comment has been minimized.

Copy link

Benjamin-L commented Dec 7, 2018

This keeps getting mentioned in a lot places that decisions have already been made or that things were already discussed. I'm just curious if there's a place I can look at the discussion involved in these decisions that are now set in stone. Even if things aren't going to change at this point I would really like to know what the thought process or evidence behind the new design was, and honestly can't find any public discussion on a large set of issues that doesn't end with "this was already decided please don't talk anymore". Presumably there should be some instance where these topics were brought up for the first time and there was discussion?

@ashleygwilliams

This comment has been minimized.

Copy link
Member

ashleygwilliams commented Dec 8, 2018

Hi. This is not currently being considered at this time. I am now locking this issue as I've asked folks to cease commenting.

@rust-lang rust-lang locked as resolved and limited conversation to collaborators Dec 8, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.