TOP 5 of the most stupid questions about Golang for Interviews of Senior Engineers

  1. Slices vs Arrays – – I think some newbies in interviews think that it will show how deep the candidate understands internals of Golang type system. WAT? – Pls, don’t ask such questions just ask about cases.
  2. What is the String type in Golang? Is it mutable ? – no comments, I don’t even know what is the purpose of this question. LOL
  3. Why Golang needs Slices? – same as #2
  4. What programming language will you choose for development?
  5. Golang vs Node JS and why you prefer Golang instead of JS ?

Note №0 “Defeat your own fears on work”

Sometimes we have a task that causes a feeling of fear. This fear appears because the task has something new, something in what I am not experienced yet.

My list about how to solve this and defeat such fears:

  1. Relax and think why you have a fear
  2. Ask your supervisor/teammate for advice/support
  3. Find some examples of solutions for a similar task
  4. Prepare first version of solution and discuss it with somemone (superviser, client, teammate)
  5. Update your solution according to feedback from them and go back for review with your supervisor/teammate

    Steps 4-5 are repeatable unless you have a proper solution.

All of us made something in the first time and the fear is a normal for everyone.

CloneGoPkg – CLI tool to create new package from template in git repository

CloneGoPkg is a simple CLI tool to create your own package from template based on any git repository

Install

go install -i github.com/wajox/clonegopkg

Usage

# clonegopkg clone [git_repository_template] [new_pkg]
clonegopkg clone git@github.com:wajox/gobase.git github.com/wajox/newproject

Sources

GitHub – https://github.com/wajox/clonegopkg

Golang Application Template

Here is my template for Golang Application – https://github.com/ildarusmanov/gobase https://github.com/wajox/gobase

Only one thing that you have to do after git clone – replace all package name entries, from github.com/ildarusmanov/gobase github.com/wajox/gobase to [your_package_name]

UPD:

Template has been updated and moved into wajox/gobase repository.

IT Nights — ночная конференция в Иннополисе

Приглашаю всех на ИТ конференцию в г.Иннополис 🙂

АНОНС МЕРОПРИЯТИЯ:

1–3 АВГУСТА 
ИННОПОЛИС, РЕСПУБЛИКА ТАТАРСТАН

IT Nights – Первая ночная конференция 
для ИТ-специалистов. 
Потому что ночью происходит 
всё самое интересное. 

https://it-nights.ru

ПОДРОБНЕЕ О ГОРОДЕ:

Иннопо́лис — город в Верхнеуслонском районе Республики Татарстан, город-спутник Казани, входящий в её агломерацию. В поселении расположены Университет Иннополис и особая экономическая зона «Иннополис». 

http://www.innopolis.com

GopherCon 2019

Побывали на Российской ГоферКонфе 🙂

Было очень полезно и интересно, очень понравились доклады от Konrad Reiche(go generate: One File to Rule Them All) и Денис Исаев(Линтеры в Go: как их готовить).

http://gophercon-russia.ru

Golang Hints: Create MongoDB Object ID from String

Sometimes you may want to find something by the Object ID in your MongoDB and due to you URI or query string contains ID you should convert the string ID to Object ID.

Below is a code that converts string ID to Object ID:

 package main

import (
"go.mongodb.org/mongo-driver/bson/primitive"
"fmt"
)
func main() {
oid, err := primitive.ObjectIDFromHex(recordID)

fmt.Printf("%s %v", err, oid)

  // if err := collection.FindOne(ctx, bson.M{"_id": oid}).Decode(e); err != nil {
  // return nil, err
// }
}