Easy-level Cosmos SDK interview questions covering chain code, SDK basics, and Ignite CLI. Q1: What is Cosmos SDK and how does it work? Answer: Cosmos SDK is a framework for building blockchain applications in Go. It provides modular components that developers can combine to create custom blockchains. Key Components: โฆ
Read MoreHard-level Cosmos SDK interview questions covering advanced SDK internals, performance optimization, and complex module design. Q1: How do you implement a custom ABCI application with advanced state management? Answer: Custom BaseApp: 1package app 2 3import ( 4 "github.com/cosmos/cosmos-sdk/baseapp" 5 โฆ
Read MoreMedium-level Cosmos SDK interview questions covering advanced module development, SDK internals, and Ignite customization. Q1: How do you implement custom state transitions and state machines in a module? Answer: State Machine Pattern: 1package keeper 2 3import ( 4 sdk "github.com/cosmos/cosmos-sdk/types" 5) 6 โฆ
Read MoreCobra is a powerful library for creating modern CLI applications in Go. Used by kubectl, Hugo, GitHub CLI, and many other popular tools. Provides commands, subcommands, flags, and automatic help generation. Use Case Use Cobra when you need to: Build complex CLI tools with subcommands Provide consistent flag handling โฆ
Read MoreStandard Go project layout following community conventions. Organize your Go projects for maintainability, testability, and clarity. Use Case Use this structure when you need to: Start a new Go project Organize a growing codebase Follow Go community standards Prepare for open source release Standard Layout 1myproject/ โฆ
Read MoreCommon code smells in Go and how to fix them. Ignoring Errors 1// โ Bad 2result, _ := doSomething() 3 4// โ Good 5result, err := doSomething() 6if err != nil { 7 return fmt.Errorf("failed: %w", err) 8} Not Using defer 1// โ Bad 2file, err := os.Open("file.txt") 3if err != nil { 4 return err 5} 6data, โฆ
Read MoreGo modules and workspaces for dependency management. Essential commands for Go project management. Initialization 1# Initialize new module 2go mod init example.com/myproject 3go mod init github.com/username/repo 4 5# Initialize in existing directory 6cd myproject 7go mod init example.com/myproject go.mod file: 1module โฆ
Read MoreSecure coding practices for Go applications. SQL Injection Prevention 1// โ Vulnerable 2username := r.FormValue("username") 3query := fmt.Sprintf("SELECT * FROM users WHERE username = '%s'", username) 4db.Query(query) 5 6// โ Secure 7username := r.FormValue("username") 8query := โฆ
Read MoreTools for checking vulnerabilities in Go code. Govulncheck 1# Install 2go install golang.org/x/vuln/cmd/govulncheck@latest 3 4# Check current module 5govulncheck ./... 6 7# JSON output 8govulncheck -json ./... Gosec 1# Install 2go install github.com/securego/gosec/v2/cmd/gosec@latest 3 4# Scan project 5gosec ./... 6 7# โฆ
Read MoreGo examples for accessing Raspberry Pi GPIO, I2C, SPI, and PWM using periph.io. Installation 1# Install Go (if not already installed) 2wget https://go.dev/dl/go1.21.5.linux-arm64.tar.gz 3sudo tar -C /usr/local -xzf go1.21.5.linux-arm64.tar.gz 4 5# Add to PATH 6echo 'export PATH=$PATH:/usr/local/bin/go/bin' โฆ
Read More
I've been involved in Full Stack for a while now in one form or another(either maintaining, designing or working on Full Stack projects). Even during school time, I was building websites for myself and my friends. I've built sites commercially even. Although I've been using either pure HTML+JS or even PHP/Perl at some โฆ
Read MoreYears 2020, 2021 and 2022 have been tough for almost everyone. The pandemic, the war, global economic collapse, bancruptcies in Crypto sphere... You name it. Although, for me it was a rather productive period(despite a divorce spanning almost 3 years), since I have accustomed to working from home and working on various โฆ
Read More