JavaRush
AI Academy
new
Promotion
Learning
Courses
Tasks
Quizzes
Games
Help
Schedule of nudges
Internship
Community
Users
Forum
Chat
Articles
Activities
Reviews
Subscriptions
Light theme

Lectures

  • Reviews
  • About us
  • CS50
Start
Start learning
Start learning
  • My progress
  • Courses
  • Quest map
  • Lectures
  • Naming in Go: export, abbreviations, and receivers

    Go SELF
    37 level,0 lecture
    We break down practical naming rules in Go: how export (a capital letter) turns something into a package’s public contract, why you should export as little as possible, how to write abbreviations ( ID/ URL/ HTTP) in CamelCase, and how to choose short, stable receiver names ( t, s) without extra noise. Plus: a micro-refactoring “before/after” and a list of common mistakes.
    Open
  • Function design: guard clauses

    Go SELF
    37 level,1 lecture
    We break down how to design functions in Go so that the main scenario ( happy path) reads linearly: we use guard clauses, early return, neat error handling in the (T, error) style, and we learn to split “kitchen-sink” functions into small functions with a single responsibility. We reinforce everything with a mini example of an in-memory task service ( todo.Service) and a refactoring of main.
    Open
  • Errors: text, wrapping, user messages

    Go SELF
    37 level,2 lecture
    We cover a practical approach to errors in Go: how the same error serves two audiences (user and developer), how to write “chainable” text and add operation context, how simple text addition differs from wrapping via fmt . Errorf and %w, how errors . Is/ errors . As work, when wrapping can become part of an API contract, and how at the application boundary to turn causes into stable user-facing messages. At the end: a mini-todo and a set of typical mistakes.
    Open
  • Antipatterns — interface‑pollution

    Go SELF
    37 level,3 lecture
    We break down why abstractions in Go do not provide “free flexibility”, how interface‑pollution emerges (interfaces “just in case”), why the “interface for tests” argument often turns into unnecessary layers, and how to distinguish a useful interface from a premature abstraction. Using a todo app as an example, we show the evolution from a concrete MemoryStore to narrow interfaces ( TaskAdder, TaskLister) and provide a checklist of “code smells” and common mistakes.
    Open
  • Package contracts: minimal API

    Go SELF
    37 level,4 lecture
    We break down how to design a “package contract” in Go: what exactly becomes part of the exported API, why it’s useful to start with minimal exports, how to keep model invariants (hide fields and create via NewTask), how to make errors part of the domain contract (sentinel var ErrNotFound and intentional wrapping via %w for errors.Is), and how to keep dependencies explicit via small interfaces ( Store, Clock) and the NewService constructor.
    Open
Learn
  • Registration
  • Java course
  • Help with tasks
  • Pricing
Community
  • Users
  • Articles
  • Forum
  • Chat
  • Activities
Company
  • About us
  • Contacts
  • Reviews
  • FAQ
  • Support
JavaRushJavaRush — is an interactive online course for learning Java programming from scratch. It contains 1200 practical tasks with one-click solution checking, the necessary minimum of theory on Java basics, and motivating features that help you complete the course: games, quizzes, interesting projects and articles on effective learning and the career of a Java developer.
Follow us
Язык интерфейса
Русский
English
Українська
"Programmers are not born" © 2026 JavaRush
MastercardVisa
"Programmers are not born" © 2026 JavaRush