Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Gophercises – Coding Exercises for Budding Gophers (gophercises.com)
328 points by joncalhoun on Nov 22, 2017 | hide | past | favorite | 88 comments


You lost me at "you need to create an account". Creating an account is a big step for me, I don't open accounts on a whim. I need to be committed to something to be willing to open account with them.

Your site wants me to open an account before it is willing to show me something that would commit me.

Also, to be perfectly homest, I would never open an account to see some videos. The only player in that area who can generate enough commitment from me is Netflix.

Why, if I may ask, are you even asking me to open an account? Is this about you teaching me Go or is it about you trying to monetize me? What are you logging about me? Why not make account creation optional? I don't want your site tracking my progress anyway (I'm paranoid that way).


> Your site wants me to open an account before it is willing to show me something that would commit me.

I agree that an example video or two would be useful long term and I have been planning to add those eventually, but they aren't there yet.

> Also, to be perfectly homest, I would never open an account to see some videos.

Once the course is 100% complete I intend to post most of the videos to YouTube, but that will be gradual and I'll probably always have some sort of "bonus" for signing up. I'm not certain viewing videos on YouTube would result in you being tracked less, but at least it would give you options.

> Why, if I may ask, are you even asking me to open an account? Is this about you teaching me Go or is it about you trying to monetize me?

Being completely upfront here - both.

First, the course is in beta and I use email addresses to tell users about new exercises, request feedback, and try to improve the course.

Second, I want to teach to as many people as possible, but I also need to make a living. So far the best way I have found to do this is to occasionally collect email addresses and tell them about paid work that I think they might enjoy. I don't spam, I don't email often, and if you unsubscribe you will never hear from me again.

If that bothers you, you can just skip this particular course. I won't be offended and I get that not everyone is willing to provide an email address. I also provide free content that doesn't require an email address to access - both my blog and youtube channel are like this.

> What are you logging about me?

I don't track course progress right now - though oddly this is a requested feature by many others. I don't even have Google Analytics on the page.

That doesn't mean I won't ever add some tracking, especially if users are asking for a progress tracker, but for now I don't.

The videos are hosted through Vimeo though, and they appear to have a tracking pixel in their embed.

> Why not make account creation optional?

There are many reasons for this, most outlined above.


Probably using this FREE course as an upsell to his paid course. Still. Kudos to the creator. FREE is free. Thank you.


Why don’t you use a secondary gmail junk account for that stuff? Pretty easy to set up no?


You make a valid point but it is the sign of the times that for things like that throwaway e-mails exist.

I have a serious e-mail firstname.lastname@ account and have various throwaway accounts that I let gmail Promotions tab handle.


I want to have 20+ exercises by the time the course is complete. There are about 13 planned as of now, so if you have suggestions or topics that you think would make good Go programming exercises I'd love to hear them =D

EDIT: And in other news, a few people have reported the welcome email going to their spam so if it happens to you please let me know and I'll continue looking into why it is happening.


Image Processing and Analysis.

Goroutines, as well as the image package, are well suited to parallel operations on bitmap data right out of the bag. From simple texture synthesis routines such as sine-wave plasma generation or mandelbrot set fractals. To advanced state-of-the-art techniques like super-resolution image enhancement and frequency domain analysis. Golang is great for image science. Especially parallel operations on separable kernels.

And it makes for a fun exercise as well ;)


I'm not opposed to doing something in this space, but it is an area I have pretty much zero experience in.

Can you recommend any language agnostic resources or really anything else that would help me get started in exploring this as a potential exercise idea?


> Image Processing and Analysis.

I know from reading many programming books and blog posts over the years that this is a popular topic. However, if you go down this route, please try to provide an alternative exercise which doesn't rely on visual elements to make its point. Speaking as a blind coder, image processing might be all about the numbers, but when you can't see the result of the code you've written or even conceptually understand the idea it tends to take the wind out of your sails.


Since it's often related, audio processing. As an example, maybe removing ad breaks from podcasts? I don't know how reasonable that would be as I haven't researched it, but could be a fun challenging project.


+1 Image Processing + Video stream frame processing


Something that is kind of unique to Go is it's crypto libraries. Using the crypto libraries in some useful way would be interesting.

A cool one might be using the golang.org/x/crypto/ssh to ssh around, and send shell commands (i.e. building your own automation framework based on ssh keys)


I like the idea of using a crypto lib, but it will probably take some thought and experimentation to figure out what will fit into roughly a ~1hr exercise. That is always the hard part - not picking something too large.


Why limit the complexity/interestingness of everything to always fit into a single hour? These seem to be aimed at people who have finished introductory material and are potentially looking for (semi-)/nontrivial material. If you're married to the idea of ~1hr segments, you can always split them into parts of a series.


I'm not stuck on 1hr segments, and I am willing to split exercises up, but only when it makes sense. For an example of this, see exercises 4 & 5 - the fifth one uses the code from the fourth.

What I am weary of is a single exercise that isn't easy to break up. Or one that even if you break it up, each exercise isn't entertaining or educational enough to stand on its own.

I also prefer having exercises (at least for this course) that can be completed in someones spare time - say in an afternoon or evening - and if an exercise takes me 1hr to code in a screencast, chances are it will take someone newer to the language longer and that doesn't account for time learning about new std libraries, googling questions, etc. In short, a 1hr exercise for me might be a 3+ hour exercise for some students.


Go's crypto libs are pretty well made, and the ssh libs are less crypto and more "here's an interface similar to os/exec that lets you run commands on a remote system"


Given Java and .NET crypto libraries, and their provider infrastructure, I fail to see what is so unique to Go's crypto libraries.


Can you please explain why do you think that it's unique?


You have two SPF TXT records on calhoun.io, causing SPF to fail:

"v=spf1 include:mailgun.org include:servers.mcsv.net ~all"

"v=spf1 include:servers.mcsv.net ?all"

Get rid of the second one. Also, setup DMARC: https://dmarcian.com/dmarc-inspector/

Edit: Looks fixed now!


Thanks!

EDIT: It looks like most things are fixed, but any outlook/hotmail emails aren't going out. Sorry everyone!

I'm trying to deal w/ the issue but it looks like it has to do with an IP Mailgun uses being blocked by MSFT.


You need to combine both SPF records into one record that allows both sources.


tried to register but not getting any emails back


Well that is annoying :(

Can you check your spam folder for anything from jon@calhoun.io?

If you keep having issues email me (same email as above) and I'll manually get you a login link.


thanks for the response, i got a link using a different email address, my Hotmail one just wont get anything back, i watched the first vid(the quizz program) and liked the way you explained things,very clear, i have basic knowledge of golang but need practice to refresh and learn more! , im also interested in web development with Go, do you think these vids are good preparation material for your web development stuff? like a roadmap kind of thing? Thanks, keep up the good work!


If you are getting value out of Gophercises I don't see any reason why the web dev course would be out of your reach. There are definitely exercises in Gophercises that are much harder than anything we code in a vast majority of the web dev course.

The only thing that might make the web dev course harder is the fact that we end up with a much larger codebase, but none of the individual code is significantly more challenging in any way.


Aside from that, since you're aiming at beginners I would connect "gopher" to the Go language sooner than three screens down the page.


Noted. Thanks for the feedback :)


A WebSockets / realtime / push/pull exercise would be a good addition.


So like a simple, no-auth, realtime chat app using websockets to push data to each client? That sounds feasible in an hour.


A realtime chat without auth but with private messages or multiple rooms. Basically the user will pick a nickname, click next and then be able to chat on a general or create/join a room.


Really Nice step, I created a small course to create a flappy bird game step-by-step for my co-workers which I presented at Golab conference in Italy. This was also made into "Just for Func" series by Francesc. It was intended to be really simple for beginners, and I could help it make it better if you decide to use it :)

https://github.com/shabinesh/flappy


I recall seeing at least one video in this series :)

I love the idea and your work here, but I'm a little skeptical of doing something so similar since it won't add a ton of value with Francesc's videos already out there.


Write 20 different variants of mapping elements in a slice from one type to another. This will give you a fairly reasonable approximation of golang development.


really? Think I've done that once or twice in the last 2 years... YMMV


Signed up for the coding excercises!Awesome site!What path would you recommend to someone who is coming from a bit of Python background. I see a lot of blurb about how Golang is the perfect fit for low latency web applications. Think “data intensive applications”. Also how good is the Golang tool chain for Raspberry pi and such like? Thanks


To answer your first question with regard to resources and getting into it first; you can start with the Go tour, and then move on to other resources. Absolutely install go and start playing around; maybe try to create a simple server or port one an easy to medium Python project.

Have a look at these resources:

_

1. A Tour of Go: https://tour.golang.org/welcome/1

>> A nice step by step introductory guide through the language.

_

2. Go by Example: https://gobyexample.com/

>> A concise collection of fundamental concepts, expressions, and implementations.

_

3. The Go Programming Language: http://www.gopl.io/

>> The text by two authors of the language. You may view as the "KnR" for C but for Go.

>> It has end of chapter problems and the solutions are hosted on github:

>>> https://github.com/adonovan/gopl.io/

_

4. Effective Go: https://golang.org/doc/effective_go.html

>> Advice on writing solid Go.

_

5. Official Go Page of Documentation and Other Resources: https://golang.org/doc/

_

6. The Go Language Specification: https://golang.org/ref/spec


I've signed up and will give this a shot. I followed the Tour of Go and was wondering where to head next.

I haven't watched the videos yet but the site looks really simple and attractive.


Love the idea of porting one easy to medium Python project to Go! No better way to learn than to actually port an existing application! Thanks a lot for the resources! Bookmarked


Go programming language, not the Gopher Internet protocol.

I wonder if there's a Gopher server written in Go yet...


Got confused as well, this happens frequently.

And yes, there is. https://godoc.org/github.com/prologic/go-gopher



I see a lot of these dismissive corrections when talking about Go and Gophers and just wondered how relevant the original gopher protocol was in your day to day? Like, when did you last request data using gopher?


I don't know about msla, but i have my Gopher client right next to my Web browser[1] (yes the workspace is called Web, but they are both in the sort of same category of applications so i have them together :-P) and i use it quite often.

I mainly read "phlogs" though, but there is generally a lot of stuff to read when bored.

[1] https://i.imgur.com/Ck1UDhg.png


What gopher client is that? It looks really nice but searching for "Little Gopher Client" didn't bring up anything.


Mine :-), you can find it here:

http://runtimeterror.com/tools/gopher/


Hi,

Care to join #gopherproject @freenode? I think I found a small display bug.


Are you asking how relevant the protocol was in the day to day back when it was popular? Or now?

Obviously, not many people still use the protocol, it has been almost entirely replaced by http. However, I used it a ton back in the early 90s. It was way more useful than the early web.


https://github.com/prologic/go-gopher appears to have you covered.


I was hoping some of the exercises was to implement gopher client/server in golang...


Go Go Gadget Gopher! :)


Thank you a ton for this one! I find Golang amazing and have done all the tutorials and can kinda use it but I've never build anything real in it, mostly because of lack of ideas. Thanks!


Looks great! I've been running through exercises on exercism.io, but this looks like a good next step in my Gopher journey.


This is fantastic. The exercises are non-trivial enough to be useful. One minor suggestion: if you can have the favicon set to your gopher, it can be great. Mine is a potentially narrow use case, but after logging in, I pinned this to a tab in safari, and the G throws me off a little.


Pinned tabs actually have their own icon: https://developer.apple.com/library/content/documentation/Ap...


Thanks. I'll have to go create an icon for this. So many custom icon formats :\

Edit: I believe I have an icon set here now. I might need to tweak it but it should work in the meantime.


I recently got turned onto RealFaviconGenerator.net after researching the various icon formats I might need to support and finding a nice in-depth stack overflow answer [1] from the author of that website. I would be surprised if it did NOT support pinned images.

[0] https://realfavicongenerator.net/

[1] https://stackoverflow.com/questions/4014823/does-a-favicon-h...


This is indeed the site I used to fix the issue :)


Thanks! Can you possibly email me a screenshot so I can fix it? jon [at] calhoun.io


Sent. First world problem admittedly.


Great website, the exercises look interesting and the focus on topics makes things clear.

I was looking for something like this but for C++ a few months ago and was quite disappointed by what I found. If someone here has some links to share, that would be great!


I think the idea is excellent, but I have (almost) no interest in Go and I struggle to improve my javascript. Do anyone knows about a similar experience for javascript ?


Try Javascript 30 by Wes Bos. https://javascript30.com/

He's a good educator and this is a fun series of exercises to practise your JS.


What is the slice of ints at the following URI about?

https://www.calhoun.io/hire-me/


Its a hex/base64 encoded string that will get you a discount on his book.


It is a puzzle :)


I'm definitely going to be doing this. Your other sites and courses look badass too.

If I could afford your algorithms course I'd buy it immediately. I'll have to save up.


The "algorithms course" isn't really a course at this point but is just a series of blog posts and youtube videos. I want to do more with it eventually, but there are only so many hours in a day :(

Anyway I hope you enjoy it!


I was mistaken. I meant to say, I'd buy the web development course you're offering. The algorithms material looks great too. Thanks for putting it out there!


Email me - jon@calhoun.io

I'll see if there is a way I can help you out :)


Message sent =)


This looks interesting - but is it usable without the videos?

I much prefer text - to the point that simple transcripts might be preferable to videos for me. So if the essential information is available as text and source code, I might want to give this a shot - but not if I can't really get started without having to listen to//watch videos.


You can try to code each exercises on your own just by reading the GitHub repos. Eg https://github.com/gophercises/quiz

If you want to see my solution and how I coded it then you have to watch the video and there aren't any transcripts yet :(

There are branches with solutions for each exercise tho, so you could just look at the diff to see if that is enough.


I think I need to get these exercise gophers as stickers... The barbell gopher is great!


I want to get a run of 3" die cut stickers using all 3 designs but that will probably be a couple months. :/


Awesome graphics man :-)


+1. boxing gopher even brings up his right hand to guard his face :P


I'll just pretend I know all about boxing and it was intentional :)


I'm getting

  "Sorry
Because of its privacy settings, this video cannot be played here."

in both Chrome and Firefox. What's up with that?


It is probably an extension of some sort.

I have heard this can happen with Privacy Badger, but I'm sure other extensions can cause the issue. I think it is a fairly common issue with embedded Vimeo videos, but I haven't had a chance to look at alternative options/settings and hosting videos myself comes with a whole other set of issues.

Just FYI I am not personally doing a bunch of tracking here. I don't even think I have Google Analytics setup on this domain. Instead it is a byproduct of Vimeo having at tracking cookie :(


I turned off NoScript, and uBlock doesn't show any blocked requests (the only privacy add-ons I have.)

Still no video.

The player loads and shows an image, the video bar shows background video loading progress and even clicking to certain parts of the video shows different image clips. Just no video. So I've just given up.


That sucks. Email me? jon@calhoun.io

I'll happily work with you to figure out the issue, even if it means giving you a link to download some videos in the meantime.


I discovered the problem after I managed to break video playback while configuring the newly installed browser.

Firefox has an "advanced" setting (about:config only) to prevent media automatically playing which was preventing playback - even with the video player's buttons. about:config | media.autoplay.enabled | true -> breaks the player.

However there's another anti-tracking option that prevents embedded videos even being displayed - Preferences | Privacy & Security | Tracking Protection | click [Change Block List...] -> 'Basic' works, 'Strict' doesn't .


I have Firefox Nightly installed now (with no extensions yet) and a blank profile which works so there's no need. I do appreciate the offer to help though.


I'm getting "Sorry, Because of it's privacy settings, this video cannot be played here" for every video.


this looks really nice, i have been looking for something newbie friendly to learn go


Impressive artwork - did you outsource that Jon?


Yes. There's a link in the site footer to the artist, Marcus, though I did animate them myself.


Oh thanks - I missed that link at the bottom. The tutorials look interesting too!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: