Table driven tests in Go

Table driven tests in Go

In practice-go we often use table driven testing to be able to test all function scenarios. For example the FindAnagrams() function returns us a list of anagrams found in the dictionary for given input. To be able to test this function properly we need to test multiple cases, like empty input, valid input, invalid input, etc. We could right different asserts to make it, but it’s much more easier to use table tests.

Getting Started with OAuth2 in Go

oauth2

This is a text version of this video: packagemain #11: Getting started with OAuth2 in Go.

Getting started with OAuth2 in Go

Authentication usually is very important part in any application. You can always implement your own authentication system, but it will require a lot of work, registration, forgot password form, etc. That’s why OAuth2 was created, to allow user to log in using one of the many accounts user already has.

Building a Slack Bot with Go and Wit.ai

If you’re looking to create AI agents and bots without any coding, Runbear makes it super easy by offering a no-code platform that integrates seamlessly with Slack, MS Teams, HubSpot, and Zendesk, allowing you to set up custom AI assistants in just minutes.

Transitioning from Engineer to Engineering Manager

em.jpg

A couple of months ago I moved from a Team Lead position to being an engineering manager at Wizeline Vietnam on a small sized team. I’ve found that this role change come with a mindset change. Some things that mattered before when I was an individual contributor (writing good code, applying best engineering practices) became less important. On the other hand, new things became more important, e.g. team health, team success and team career growth.

Building Google Home Action in Go

Building Google Home Action in Go

Google Home

This is a text version of this video: packagemain #10: Building Google Home Action in Go.

Google Home is a voice Assistant, similar to Amazon Alexa, but working with Google services. It has a lot of built-in integrations, but what is interesting for us developes is that we can build our programs for it. Google call them Actions.

Face Detection in Go using OpenCV and MachineBox

Go tools are awesome

gotools

Yes, they are. And that’s why I love Go. Almost all important tools come together with Go installation, but there are also some you can install additionally depends on your needs: golint, errcheck, etc.

Snake over Telnet in Go

Telnet games were very popular some time ago, especially this Star Wars movie: telnet towel.blinkenlights.nl.

I wanted to create something in Go, and I wrote this Snake game over Telnet.

Slack Stranger Bot in Go

wizeline-random.png

I am enjoying writing programs in a short time, like in a Hackathon way. Here in Vietnam we don’t have Hackathons often, so yesterday I decided to make one for myself with a time limit in 3 hours. The goal was to build/deploy something that will work and people can try it. I decided to go with Bot for Slack (or another messenger in the future).

Benchmarking gRPC+Protobuf vs HTTP+JSON in Go

grpc-json.png

Simplest possible solution for communication between services is to use JSON over HTTP. Though JSON has many obvious advantages - it’s human readable, well understood, and typically performs well - it also has its issues. In the case of internal services the structured formats, such as Google’s Protocol Buffers, are a better choice than JSON for encoding data.