Skip to content

Instantly share code, notes, and snippets.

@baole
baole / README.md
Created January 5, 2017 16:59 — forked from adewes/README.md
Ebay Ads - Bot. Because who wants to write messages by hand...

To use this bot:

  • Download ads_bot.py and requirements.txt.
  • Type pip install -r requirements.txt to install the requirements.
  • Fill out the required information in the Python file.
  • Ideally, create a (free) Slack account and set up a web hook to receive notifications from the bot.
  • Run the script :)
  • Relax and be ready to answer incoming calls :D
@baole
baole / Timezone.kt
Created December 18, 2017 10:08
Create timezone list
package com.anttek.alice.utils
import com.google.gson.GsonBuilder
import com.google.gson.reflect.TypeToken
import org.junit.Test
import java.util.*
class Timezone {
data class Zone(var value: String, var name: String){
package com.anttek.alice.util.markdown;
import org.commonmark.node.Node;
import org.commonmark.node.StrongEmphasis;
import org.commonmark.node.Text;
import org.commonmark.parser.delimiter.DelimiterProcessor;
import org.commonmark.parser.delimiter.DelimiterRun;
public class AliceAsteriskDelimiterProcessor implements DelimiterProcessor {
@baole
baole / architecture_test_what.md
Created July 15, 2026 18:27
architecture_test_what.md
View What it sees well What it misses
JVM bytecode Compiled classes and class dependencies Kotlin source intent, source sets, Gradle project boundaries, some compiler-plugin effects
Kotlin source scan Packages, imports, declarations, modifiers, annotations The real Gradle module graph and project dependency policy
Gradle graph inspection Modules, source sets, declared project dependencies Source-level imports, public signatures, visibility, and type leakage
Linters Local style and single-file quality Whole-project structure and architectural ownership
@baole
baole / architecture_test_tools.md
Created July 15, 2026 18:30
architecture_test_tools.md
Tooling option Strong at Weak at Use it when Combine with Konture when
ArchUnit Mature JVM bytecode rules and class dependency checks Gradle project graph, KMP source sets, source-level Kotlin intent The system is primarily JVM and the rule is visible in compiled classes You also need module dependency policy, Kotlin visibility, or KMP/platform boundaries
detekt custom rules Kotlin PSI, style, naming, local declaration rules Gradle module graph and cross-module dependency policy The rule is close to lint: naming, annotations, local source conventions A lint finding needs to line up with module ownership or public API boundaries
Gradle Doctor or module-graph plugins Build health, project graph visibility, dependency reports Source imports, signatures, class visibility, API leakage You need graph insight, build performance reports, or dependency hygiene A graph edge is only half the story and source-level leakage also matters
Cust
@baole
baole / architecture_test_jobs.md
Last active July 16, 2026 04:37
Kotlin Architecture Tests
Job Threat Build-level rule Source-level rule
Logical isolation Layers or modules depend in forbidden directions :domain does not depend on :data; feature implementations do not depend on sibling implementations Domain packages do not import data, UI, framework, or platform packages
API hermeticity Implementation detail becomes public contract API modules stay separate from implementation modules Public signatures do not expose persistence, transport, or framework types
Mechanical hygiene Structure becomes harder to navigate and build Module graph has no cycles Files avoid wildcard imports, class/file mismatch, or uncontrolled generated-code zones
@baole
baole / architecture_test_troubleshooting.md
Last active July 16, 2026 04:37
Kotlin Architecture Tests
Failure shape What it usually means First repair to try
Module :a depends on :b, which is not allowed A Gradle project dependency crossed the module policy Depend on an API module, move the contract, or remove the edge
Circular dependency detected Two or more modules now form a dependency cycle Extract a shared contract or move ownership to one side
Class ... should only depend on classes in ... A source import, signature, or referenced type crossed a package boundary Map to a boundary model, invert the dependency, or narrow the rule if the architecture changed
Generated or build files appear in violations The suite is checking code the team does not author directly Add explicit generated-code exclusions or scope the rule to production packages
A rule fails for many unrelated files The rule may be too broad or too early for enforcement Run it informationally, quarantine legacy zones, then tighten over time