All Tutorials

All programming and AI tutorials, organized by series.

Go Practice

Go Intermediate

Go Basics

ProgrammingBeginnerSeries 1

Go Setup and Your First Program

Install Go 1.24, understand what GOPATH and module mode really mean, and get comfortable with go mod init, go run, go build, go fmt and go vet.

ProgrammingBeginnerSeries 2

Go Variables, Types and Zero Values

var versus :=, the zero-value design that removes uninitialised variables, constants and iota, and the boundaries between string, byte and rune.

ProgrammingBeginnerSeries 3

Go Control Flow: if, for and switch

Why Go has exactly one loop, how the if initialiser keeps variables scoped, what switch does differently, and how range behaves over slices, maps and strings.

ProgrammingBeginnerSeries 4

Go Functions and Error Handling

Multiple and named results, the error interface, wrapping with %w and inspecting with errors.Is and errors.As, plus where defer, panic and recover belong.

ProgrammingBeginnerSeries 5

Slices versus Arrays in Go

Arrays carry their length in the type and copy on assignment; slices are small descriptors over shared memory. Length, capacity and append aliasing explained.

ProgrammingBeginnerSeries 6

Go Maps and Structs

Declaring and populating maps, the comma-ok idiom, why nil maps panic on write, plus struct literals, exported fields, JSON tags and embedding.

ProgrammingBeginnerSeries 7

Go Pointers, Methods and Value Semantics

Address-of and dereference, new versus composite literals, value and pointer receivers, method sets and interface satisfaction, plus when a pointer is worth it.

ProgrammingBeginnerSeries 8

Go Interfaces and Composition

Implicit interface satisfaction, why small interfaces travel further, type assertions and type switches, the nil-interface trap, and composition over inheritance.

JavaScript Basics

ProgrammingBeginnerSeries 1

JavaScript Variables: var, let and const

How var, let and const differ in scope, hoisting and rebinding, what the temporal dead zone protects you from, and why typeof null returns "object".

ProgrammingBeginnerSeries 2

JavaScript Operators and Type Coercion

Why == surprises you, which eight values are falsy, how + and - coerce differently, and when to reach for ??, ?. and Number.isNaN().

ProgrammingBeginnerSeries 3

JavaScript Conditionals and Loops

Pick between if, switch, for, for...of and while with intent, and avoid the iteration bugs: fall-through cases, for...in on arrays, and break inside forEach.

ProgrammingBeginnerSeries 4

JavaScript Functions, Scope and Closures

Compare declarations, expressions and arrow functions, use default and rest parameters, and understand scope chains, closures, and the classic var-in-a-loop trap.

ProgrammingBeginnerSeries 5

Essential JavaScript Array Methods

Split the array API into methods that mutate and methods that return a new array, then use map, filter, reduce, find and some correctly, including sort's string default.

ProgrammingBeginnerSeries 6

JavaScript Objects and Destructuring

Object literals, property access and iteration, destructuring with renames and defaults, and why spreading gives you a shallow copy that still shares nested objects.

ProgrammingBeginnerSeries 7

JavaScript Strings and Template Literals

Template literal interpolation, string immutability, UTF-16 length surprises, slice versus substring, and why replace() only changes the first match.

ProgrammingBeginnerSeries 8

JavaScript Error Handling

What an Error carries, when to throw, how try/catch/finally runs, custom error classes with instanceof, the cause option, and why async errors escape try/catch.

JavaScript Intermediate

JavaScript Practice

PHP Practice

PHP Intermediate

PHP Basics

ProgrammingBeginnerSeries 1

PHP Variables and Data Types

Variable syntax and scope, the scalar types, strings and arrays, why loose comparison bites, what declare(strict_types=1) actually changes, and the falsy values that surprise newcomers.

ProgrammingBeginnerSeries 2

PHP Strings and Arrays

Indexed and associative arrays, how foreach really iterates, array_map/filter/reduce, the difference between + and array_merge, and the string functions you need — including mb_* for UTF-8.

ProgrammingBeginnerSeries 3

PHP Conditionals and Loops

if versus match versus switch, when to use for, foreach and while, break/continue with nesting levels, and the alternative colon syntax that keeps HTML templates readable.

ProgrammingBeginnerSeries 4

PHP Functions, Types and Scope

Declare parameter and return types, use defaults and named arguments, understand pass-by-value versus reference and object handles, plus closures, arrow functions and static locals.

ProgrammingBeginnerSeries 5

Handling Forms and Requests in PHP

Work with $_GET and $_POST safely: choose the right method, validate with filter_var, escape output with htmlspecialchars, and follow Post/Redirect/Get to stop duplicate submissions.

ProgrammingBeginnerSeries 6

Reading and Writing Files in PHP

file_get_contents and file_put_contents for small files, fgets streaming for large ones, file locking for concurrent writes, directory iteration with SPL, and why paths must start from __DIR__.

ProgrammingBeginnerSeries 7

Errors and Exceptions in PHP

How PHP separates errors from exceptions, the Throwable hierarchy, try/catch/finally, which exception class to throw, JSON_THROW_ON_ERROR, a global handler, and production error settings.

ProgrammingBeginnerSeries 8

PHP Sessions and Cookies

Start and use sessions, destroy them properly, regenerate the ID on login to prevent fixation, set cookies with secure, httponly and samesite, and never trust cookie contents.

Python Intermediate

ProgrammingIntermediateSeries 1

Python Comprehensions and Iteration Tools

List, dict and set comprehensions, generator expressions, and the standard library helpers — enumerate, zip, sorted, itertools — that replace most manual loops.

ProgrammingIntermediateSeries 2

Python Modules, Packages and Virtual Environments

How imports resolve, absolute versus relative imports, the __main__ guard, and isolating dependencies per project with venv, pip and pyproject.toml.

ProgrammingIntermediateSeries 3

Python Classes and Object-Oriented Basics

Define classes, tell instance and class attributes apart, use @property, @classmethod and inheritance with super(), and implement __repr__ and __eq__ correctly.

ProgrammingIntermediateSeries 4

Python dataclasses and Type Hints

Annotate your code so editors and mypy catch mistakes before runtime, then let @dataclass generate __init__, __repr__ and __eq__ — with default_factory, frozen and slots.

ProgrammingIntermediateSeries 5

Python Iterators and Generators

Separate iterables from iterators, trace exactly how yield suspends a function, stream a large file through a generator pipeline, and know when yield from, send and close are worth the complexity.

ProgrammingIntermediateSeries 6

Python Standard Library Essentials: datetime, collections and json

The standard library modules worth knowing by heart: datetime arithmetic and time zones, Counter, defaultdict and deque, json round-trips, plus os.getenv, subprocess and secrets.

ProgrammingIntermediateSeries 7

Regular Expressions in Python

How search, match, findall and sub actually differ, the metacharacters you need, greedy versus lazy quantifiers, named groups, compile flags, and the failure modes that make regexes fragile.

Python Practice

Python Basics

ProgrammingBeginnerSeries 1

Python Variables and Data Types

How Python variable binding actually works, the built-in types you use daily, and why mutable vs immutable changes how bugs show up.

ProgrammingBeginnerSeries 2

Python Conditionals and Loops

How truthiness works in Python, when to use for versus while, the rarely used loop else clause, and the iteration mistakes that produce wrong results.

ProgrammingBeginnerSeries 3

Python Strings, Slicing and Formatting

Create and inspect strings, use the methods you actually reach for, format output with f-strings, and keep str and bytes straight at the encoding boundary.

ProgrammingBeginnerSeries 4

Python Lists and Dictionaries in Practice

The list and dict operations you reach for daily: slicing, iteration, shallow versus deep copies, get versus indexing, and grouping with setdefault.

ProgrammingBeginnerSeries 5

Python Tuples, Sets and Immutability

When a tuple beats a list, how packing and unpacking work, what immutability actually prevents, and why sets give O(1) membership tests.

ProgrammingBeginnerSeries 6

Python Functions and Argument Passing

Define functions, mix positional and keyword arguments, avoid the mutable default trap, collect extra arguments with *args and **kwargs, and understand scope rules.

ProgrammingBeginnerSeries 7

Reading and Writing Files in Python

Open files safely with with, stream large files line by line, build paths with pathlib, and handle JSON, CSV, and encodings without the usual surprises.

ProgrammingBeginnerSeries 8

Python Exceptions and Custom Errors

How try/except/else/finally actually runs, which exceptions to catch, keeping context with raise from, designing custom error hierarchies, and the anti-patterns that hide bugs.

Standalone