Skip to content

Instantly share code, notes, and snippets.

View Sedose's full-sized avatar
:shipit:

Sedose Sedose

:shipit:
  • Ukraine
View GitHub Profile
@Sedose
Sedose / Readme.md
Last active July 24, 2025 14:28
Advantages and disadvantages of Golang (Go) https://go.dev/

Advantages

  • By avoiding implementation class inheritance, the design naturally encourages composition and aggregation, leading to simpler, more maintainable code. This prevents the project from becoming an unmaintainable mess like many Java and C# projects that lean too heavily on inheritance, which can seriously put at risk business continuity. https://gist.github.com/Sedose/978e0670c43dd8e904d2b479b49961b8
  • Interfaces are implicit and satisfied automatically, reducing boilerplate and improving decoupling.
  • Fast compilation and single static binary output make builds and deployments straightforward.
  • Simple concurrency model with goroutines and channels makes writing concurrent code accessible.
  • Minimalist core language reduces cognitive load and improves readability across teams.
  • Standardized formatting across all codebases via gofmt ensures consistency and removes bikeshedding.

Disadvantages

@Sedose
Sedose / Readme.md
Last active July 22, 2025 12:17
`setlocal` and `endlocal` commands

Understanding setlocal and endlocal in Batch Scripts

In a Windows batch script (.bat or .cmd), the commands setlocal and endlocal are used to create a local scope for environment variable changes.


setlocal

This marks the beginning of a local scope.
After this point, any environment variable changes (with set, call set, etc.)

@Sedose
Sedose / Readme.md
Last active July 22, 2025 09:18
OpenAI deep research regarding IaaS and PaaS

Based on the provided documentation and medium articles from trusted engineers,
what is the most critical and comprehensive distinction between Infrastructure as a Service (IaaS) and Platform as a Service (PaaS),
particularly in terms of customer responsibility, resource management, and application deployment focus and other fundamental things?
Support your answer with examples from Google Cloud services.
Provide me with info, so I will be top prepared for PCD: GCP exam around IaaS and PaaS \


IaaS vs PaaS: Differences in Responsibility, Resource Management, and Deployment Focus

Overview of IaaS and PaaS

@Sedose
Sedose / Readme.md
Last active July 22, 2025 08:59
Conversation regarding huge (e.g. 5 levels) classes inheritance chains

Human: Large classes in programming

Claude: Large classes in programming are considered a sign of poor code design for several reasons:

Violation of the single responsibility principle A large class usually tries to solve too many tasks simultaneously. This makes the code confusing and difficult to understand. Each class should have one clearly defined role.

Maintenance complexity When a class has hundreds or thousands of lines of code, finding the right fragment becomes a real quest. Making changes turns into a dangerous operation - it's easy to break something in another part of the class.

Gradle Task: Copy Source files Context to Clipboard for Use with LLMs

This Gradle task collects .java source files and other files, concatenates their contents, and copies the result to your system clipboard.

It’s designed to help developers programmatically control what context is given to LLMs (like ChatGPT, Claude, Gemini) by automating the process of assembling relevant code and docs into a single pasteable chunk.

Features

  • Collects all .java files under src/
  • Includes key project files (README.md, AGENTS.md, build.gradle.kts)
@Sedose
Sedose / Readme.md
Last active July 18, 2025 05:38
Employer litmus-test

Checklist to bring to interviews (as a candidate) or early-stage conversations. Ask these aloud—or work them naturally into technical discussions—and listen for both the content of the answer and the spontaneity with which they can give concrete examples.

# Question to the team / hiring tech lead Green flag Red flag
import java.util.Arrays;
import java.util.stream.IntStream;
class Solution {
public int[][] matrixReshape(int[][] originalMatrix, int targetRows, int targetCols) {
int totalElements = originalMatrix.length * originalMatrix[0].length;
if (totalElements != targetRows * targetCols) {
return originalMatrix;
}
@Sedose
Sedose / Expression-Oriented vs Imperative in Kotlin.md
Last active July 12, 2025 09:05
Two Paradigms, One Algorithm: Expression-Oriented vs Imperative in Kotlin

Two Paradigms, One Algorithm: Expression-Oriented vs Imperative in Kotlin

Below are two structurally identical solutions for checking if one binary tree is a subtree of another. Only the control-flow style differs.


1. Expression-Oriented (Functional-Leaning)

import java.util.ArrayList;
import java.util.List;
enum TokenType {
BANG,
EQUAL,
LEFT_PAREN,
RIGHT_PAREN,
LEFT_BRACE,
RIGHT_BRACE,
@Sedose
Sedose / InterfaceDefaultMethod.java
Created April 27, 2025 08:35
Default methods in Java interfaces give a slightly similar feeling to Kotlin extension functions, but they are not the same thing
public class Main {
public static void main(String[] args) {
User user = new User("Dora");
System.out.println(user.getGreeting());
}
}
interface UserOps {
default String getGreeting() {
return "Hello, " + getName() + "!";