I am Francesc Campoy Flores. Ask me anything.

I’m the VP of Developer Relations at source{d}.

I have a passion for developer relations, specifically when it comes to Go and anything that can help developers be more productive and happier.

Previously, I was a Developer Advocate for the Go team at Google and for Google Cloud Platform. I’ve been working closely with the Go team at Google since 2012, and my goal has always been to make the language as accessible as possible to everyone.

In this page you will find the projects I’ve worked on, such as my YouTube series justforfunc, as well as some of my GitHub repos, blog posts, and some of the talks I’ve given over the years.

Ask Francesc Campoy Flores about:

  • Golang
  • Golang tooling
  • Machine learning in general and machine learning on code
  • Open source
  • Justforfunc Youtube channel

Comments (40)

Add a comment
Cegal's photo

Hi Francesc!

Thank you tremendously for the JustForFunc series.

What (existent or absent) libraries do you think the community should work on to improve the things we can do with Golang?

Francesc Campoy Flores's photo

VP of Product & DevRel at source{d} - #MLonCode #CodeAsData #golang #justforfunc

I'd say my favorite thing is the effort on bringing generics. I've wanted them for quite a while, since they will empower gophers to write more concise code.

Imagine a library containing common concurrency patterns, or maybe even some functional programming concepts like reduce or filter ... the dream!

I don't care that much about the error handling, because I think that once we have good generics we should be able to improve error handling thanks to other concepts like error monads etc.

Hiren Chauhan's photo

Hi Francesc,

Thanks for the AMA. I want to learn GO but I'm not sure what's the correct path. If you could suggest some books and some course or blogs that would be awesome. And your YT channel is an amazing place to look for new stuff in golang.

If you were to learn the golang today, how would you start the learning process and where would you look on the internet.

Francesc Campoy Flores's photo

VP of Product & DevRel at source{d} - #MLonCode #CodeAsData #golang #justforfunc

If I was to learn Go today I'd probably try to learn it the same way ... by joining the Go team! Hahaha

I'm not kidding, that learning experience was amazing and I recommend it to anyone that has the chance to try.

But more realistically I'd say a good idea is to simply start writing Go, as much as possible, even when it doesn't really makes sense! My first program in Go was something that I would have normally written in bash, a bunch of calling other commands and pipes, etc.

The next step is to share that code and seek feedback wherever you can (the gophers slack is a great place for this)! I do code reviews on http://justforfunc.com from time to time, so make sure you send your code for consideration at http://form.justforfunc.com.

Code reviews are actually my favorite way to learn, because you're getting feedback on what you're doing wrong! So you already have the context and the knowledge is absorbed much more efficiently.

That said that's not always possible for everyone so if you want to know websites and books to read:

  • excerism.io: great place to exercise your coding skills in Go and receive feedback from the rest of the community
  • adventofcode.com: a great way to find problems to solve in Go! also you'll be able to see many other solutions, which kinda counts as getting feedback I guess.
  • Dave Cheney's blog posts are a jewel! https://dave.cheney.net/category/golang
  • justforfunc.com ... I've heard it's pretty decent 😎

Regarding books, I'm not much of a book reader when it comes to programming languages ... other than "Learn you a Haskell for a greater good" which is amaaaaaazing!

I'd say the cannonical book is "The Go Programming Language" by by Alan A. Donovan and Brian Kernighan, but I'll admit I haven't read it completely ...

Cecil Phillip's photo

I'm used to working with streams and sockets in other programming languages. I've been trying to wrap my head around channels for IO. Could you help break down the differences between channels and streams. Maybe also any recommended examples, posts or code that really highlight their usage

Francesc Campoy Flores's photo

VP of Product & DevRel at source{d} - #MLonCode #CodeAsData #golang #justforfunc

Hah, great question!

Channels are more about communication and synchronization than streaming data, tbh. Everything you can do with streams you can also do with channels, but take into account that the result will very probably be much less efficient.

This is due to the inherent complexity on making things work correctly across multiple goroutines and threads.

If you want to write with streams in Go, io.Reader and io.Writer are your friends!

For instance you could do something like:

  1. http.Get on a url that serves a zipped json file, that returns an http.Response
  2. Create a zip.Reader reading from http.Response.Body
  3. create a json.Decoder reading from zip.Reader
  4. io.Copy from the json.Decoder to os.Stdout

This will start printing the first decoded objects from JSON before you're actually done downloading the file if the network is slow enough!

So if you wanna do data streaming use io.Reader and io.Writer, if you wanna do synchronization of workers sharing tasks channels.

For the synchronization of tasks, check out this talk by John-Graham Cumming!


Greg's photo

Concebollista o sincebollista?

Francesc Campoy Flores's photo

VP of Product & DevRel at source{d} - #MLonCode #CodeAsData #golang #justforfunc

Concebollista hasta la muerte!!

clarifcation: he's asking whether I use onions in the Spanish omelette, the answer is "duh!" 😄

Wang Y's photo

What is your opinion on the future of Go? What do you think Go 2 will bring to us?

Show all replies
Wang Y's photo

Thanks for your detailed explanation! I wasn't thinking about what would breaking changes do to the community.

"Attaching your career to any specific technology is always a losing bet." - absolutely agree 👍