CWYAlpha

Just another WordPress.com site

Thought this was cool: Introducing Go by Example

leave a comment »


Comments: “Introducing Go by Example”

URL: http://mmcgrana.github.com/2012/10/introducing-go-by-example.html

October 11 2012

Today we’re introducing Go by Example, a hands-on guide to Go. Go by Example helps you learn and write Go through annotated example programs.

The site already has several examples, including:

Read on to learn more about why and how we made Go by Example and what’s coming next.

Example-Based Approach

Programmers learn to program by reading and writing programs. Go by Example therefore tries to give you:

  • Explanations paired with code you’re reading – letting code speak for itself when it’s clear and providing context when it’s needed.
  • Code that enables you to solve problems you have when writing your own programs.

We have more than 15 published examples and 70 more in development.

Open

In order to best enable developers to access, use, and re-mix the content, Go by Example is released under a liberal Creative Commons license.

The source code is available on Github and we’ve already merged a pull request from a helpful reader of the alpha version.

Go Everywhere

The Go by Example site is derived almost entirely from .go source files (code + comments), rendered to HTML with a Go toolchain, and served online with a Go web server.

For example, here is the line filter Go source and corresponding rendered page.

Designed

Go by Example strives to provide the best experience possible for developers learning Go:

  • Code and docs are typeset to ~60 characters per column to maximize legibility.
  • Minimal styling keeps the focus on the docs and code.
  • Code is highlighted with the excellent Pygments library.
  • The site renders beautifully on both laptops and iPads.

We hope you find Go by Example a joy to read.

What’s Next

Go by Example is an early experiment. We’re interested in learning how developers find it useful, evolving the model, and shipping more examples that benefit developers.

If there’s an example you’d like to see or if you have any other feedback, let us know at @gobyexample or email the author at mmcgrana@gmail.com.

We’re excited to share Go by Example and hope that you check it out

To learn about new examples and other updates on the site, follow @gobyexample.

Please enable JavaScript to view the comments powered by Disqus.


from Hacker News 50: http://mmcgrana.github.com/2012/10/introducing-go-by-example.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+hacker-news-feed-50+%28Hacker+News+50%29

Written by cwyalpha

十月 15, 2012 在 5:08 上午

发表在 Uncategorized

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: