<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>CalliCoder</title>
    <link>https://www.callicoder.com/</link>
    <description>Programming tutorials for backend engineers</description>
    <language>en</language>
    <item>
      <title>Software Engineering Principles: A Practical Guide</title>
      <link>https://www.callicoder.com/software-development-principles/</link>
      <guid isPermaLink="true">https://www.callicoder.com/software-development-principles/</guid>
      <description>KISS, DRY, YAGNI and SOLID are quoted far more often than they are applied. What each one actually claims, the failure mode it prevents, and the cost of following it too literally.</description>
      <pubDate>Sat, 11 Sep 2021 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Deploying a Go App with Redis on Kubernetes</title>
      <link>https://www.callicoder.com/deploy-multi-container-go-redis-app-kubernetes/</link>
      <guid isPermaLink="true">https://www.callicoder.com/deploy-multi-container-go-redis-app-kubernetes/</guid>
      <description>Adding a stateful dependency: why a Deployment with a ReadWriteOnce volume deadlocks on rollout, StatefulSet against Deployment for Redis, the maxmemory that must sit below the container limit, and degrading rather than failing when the cache is gone.</description>
      <pubDate>Fri, 10 Sep 2021 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Core Java Interview Questions with Answers</title>
      <link>https://www.callicoder.com/core-java-interview-questions-answers/</link>
      <guid isPermaLink="true">https://www.callicoder.com/core-java-interview-questions-answers/</guid>
      <description>The topics Java interviews actually probe — equals and hashCode, the memory model, collections, exceptions, generics — with what each question is really testing and the follow-up that separates a memorised answer from an understood one.</description>
      <pubDate>Sat, 04 Sep 2021 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Squares of a Sorted Array</title>
      <link>https://www.callicoder.com/squares-of-a-sorted-array/</link>
      <guid isPermaLink="true">https://www.callicoder.com/squares-of-a-sorted-array/</guid>
      <description>Sorting the squares is the obvious O(n log n) answer and the wrong one. Two pointers from the outside in gives O(n), because the largest square is always at one end — and filling the result backwards is what makes it work.</description>
      <pubDate>Tue, 03 Aug 2021 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Longest Substring with Same Letters After Replacement</title>
      <link>https://www.callicoder.com/longest-substring-with-same-letters-after-replacement/</link>
      <guid isPermaLink="true">https://www.callicoder.com/longest-substring-with-same-letters-after-replacement/</guid>
      <description>A sliding window where the shrink condition is the count of the most frequent character, why that maximum never needs to be recomputed downward, and the off-by-one that makes the answer too large.</description>
      <pubDate>Sun, 01 Aug 2021 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Sliding Window Maximum Explained</title>
      <link>https://www.callicoder.com/sliding-window-maximum/</link>
      <guid isPermaLink="true">https://www.callicoder.com/sliding-window-maximum/</guid>
      <description>A deque holding indices in decreasing order of value gives O(n) where a heap gives O(n log k). The deque stores indices rather than values so the window boundary can be checked, and each index enters and leaves exactly once.</description>
      <pubDate>Tue, 27 Jul 2021 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Maximum Sum Subarray of Size K</title>
      <link>https://www.callicoder.com/maximum-sum-subarray-of-size-k/</link>
      <guid isPermaLink="true">https://www.callicoder.com/maximum-sum-subarray-of-size-k/</guid>
      <description>The sliding window that turns O(n·k) into O(n): add the entering element, subtract the leaving one, and never recompute. Plus the two off-by-ones in the window boundary and why negative numbers do not break it.</description>
      <pubDate>Sat, 24 Jul 2021 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Find the Minimum in a Rotated Sorted Array</title>
      <link>https://www.callicoder.com/find-minimum-element-in-rotated-sorted-array/</link>
      <guid isPermaLink="true">https://www.callicoder.com/find-minimum-element-in-rotated-sorted-array/</guid>
      <description>Comparing the midpoint to the right end rather than the left is what makes this work, why the loop uses &lt; instead of &lt;=, and the duplicate that forces the worst case back to O(n).</description>
      <pubDate>Tue, 20 Jul 2021 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Go Command-Line Flags and Options with the flag Package</title>
      <link>https://www.callicoder.com/go-command-line-flags-options-exmple/</link>
      <guid isPermaLink="true">https://www.callicoder.com/go-command-line-flags-options-exmple/</guid>
      <description>Why flags after a positional argument are silently ignored, single and double dashes being equivalent, custom flag types, and FlagSet for subcommands.</description>
      <pubDate>Tue, 06 Jul 2021 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Golang Sorting and Custom Sorting by Functions</title>
      <link>https://www.callicoder.com/golang-sorting-custom-functions/</link>
      <guid isPermaLink="true">https://www.callicoder.com/golang-sorting-custom-functions/</guid>
      <description>The slices package replaced most of sort, SortFunc wants a three-way comparison where sort.Slice wanted a boolean, and neither is stable unless you ask.</description>
      <pubDate>Sun, 04 Jul 2021 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Golang URL Encoding and Decoding</title>
      <link>https://www.callicoder.com/golang-url-encoding-decoding/</link>
      <guid isPermaLink="true">https://www.callicoder.com/golang-url-encoding-decoding/</guid>
      <description>QueryEscape turns a space into a plus and PathEscape turns it into %20, url.Values handles repeated keys, and building a URL by concatenating strings is how the encoding gets skipped.</description>
      <pubDate>Sun, 04 Jul 2021 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Base64 Encoding and Decoding in Golang</title>
      <link>https://www.callicoder.com/golang-base64-encoding-decoding/</link>
      <guid isPermaLink="true">https://www.callicoder.com/golang-base64-encoding-decoding/</guid>
      <description>Four encodings in one package and why picking the wrong one breaks a URL, the padding that some APIs reject, and the streaming encoder that avoids holding the whole payload twice.</description>
      <pubDate>Thu, 01 Jul 2021 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Equal Subset Sum Partition Problem</title>
      <link>https://www.callicoder.com/equal-subset-sum-partition-problem/</link>
      <guid isPermaLink="true">https://www.callicoder.com/equal-subset-sum-partition-problem/</guid>
      <description>An odd total is an instant no. Beyond that it is a subset-sum for half the total, and the one-dimensional table must be filled backwards or each item gets used more than once.</description>
      <pubDate>Sun, 13 Jun 2021 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>The 0/1 Knapsack Problem Explained</title>
      <link>https://www.callicoder.com/0-1-knapsack-problem/</link>
      <guid isPermaLink="true">https://www.callicoder.com/0-1-knapsack-problem/</guid>
      <description>From the recursive definition to a one-dimensional table: why greedy fails here but works for the fractional version, why the 1D loop must run backwards, and what pseudo-polynomial actually means.</description>
      <pubDate>Thu, 27 May 2021 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Spring Boot, MySQL and React with Docker Compose</title>
      <link>https://www.callicoder.com/spring-boot-mysql-react-docker-compose-example/</link>
      <guid isPermaLink="true">https://www.callicoder.com/spring-boot-mysql-react-docker-compose-example/</guid>
      <description>A three-service stack in one file: healthcheck-gated startup so the API does not race the database, a React build served by nginx with the API proxied behind it, and a dev override that keeps hot reload.</description>
      <pubDate>Sun, 15 Nov 2020 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Java CompletableFuture Tutorial with Runnable Examples</title>
      <link>https://www.callicoder.com/java-8-completablefuture-tutorial/</link>
      <guid isPermaLink="true">https://www.callicoder.com/java-8-completablefuture-tutorial/</guid>
      <description>A CompletableFuture tutorial that runs: how to create one, chain transformations, combine several, handle exceptions properly, and pick the right executor so your pipeline never quietly stalls the common pool.</description>
      <pubDate>Wed, 30 Sep 2020 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Java Concurrency Issues and Thread Synchronization</title>
      <link>https://www.callicoder.com/java-concurrency-issues-and-thread-synchronization/</link>
      <guid isPermaLink="true">https://www.callicoder.com/java-concurrency-issues-and-thread-synchronization/</guid>
      <description>Thread interference and memory consistency are two different bugs with two different fixes. Why volatile solves one and not the other, what synchronized actually locks, and the lock objects that are shared with code you have never seen.</description>
      <pubDate>Sun, 20 Sep 2020 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Java Callable and Future Tutorial</title>
      <link>https://www.callicoder.com/java-callable-and-future-tutorial/</link>
      <guid isPermaLink="true">https://www.callicoder.com/java-callable-and-future-tutorial/</guid>
      <description>What Callable adds over Runnable, and the four things Future cannot do — no callbacks, no composition, no manual completion, no exception handling without blocking — with the CompletableFuture equivalent for each.</description>
      <pubDate>Tue, 15 Sep 2020 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Java ExecutorService and Thread Pool Tutorial</title>
      <link>https://www.callicoder.com/java-executor-service-and-thread-pool-tutorial/</link>
      <guid isPermaLink="true">https://www.callicoder.com/java-executor-service-and-thread-pool-tutorial/</guid>
      <description>Submitting work, sizing a pool, and shutting one down properly — plus the two Executors defaults that turn a slow consumer into an OutOfMemoryError, and why an uncaught exception in submit() vanishes.</description>
      <pubDate>Thu, 10 Sep 2020 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>How to Format Date and Time in Java</title>
      <link>https://www.callicoder.com/how-to-format-date-time-java/</link>
      <guid isPermaLink="true">https://www.callicoder.com/how-to-format-date-time-java/</guid>
      <description>DateTimeFormatter patterns that mean something other than what they look like, the locale that changes the output of code you did not touch, and why formatting an Instant throws.</description>
      <pubDate>Mon, 01 Jun 2020 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Add or Subtract Days and Hours from a Date in Java</title>
      <link>https://www.callicoder.com/how-to-add-subtract-days-hours-minutes-seconds-to-date-java/</link>
      <guid isPermaLink="true">https://www.callicoder.com/how-to-add-subtract-days-hours-minutes-seconds-to-date-java/</guid>
      <description>plusDays against plusHours across a daylight-saving change, the month-end clamping that turns 31 January into 28 February, and why Calendar.add mutates the object you passed in.</description>
      <pubDate>Wed, 01 Apr 2020 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Reading and Writing Environment Variables in Go</title>
      <link>https://www.callicoder.com/go-read-write-environment-variables/</link>
      <guid isPermaLink="true">https://www.callicoder.com/go-read-write-environment-variables/</guid>
      <description>LookupEnv distinguishes unset from empty and Getenv does not, Setenv only changes this process, and an environment variable is readable by anything that can read /proc.</description>
      <pubDate>Tue, 10 Mar 2020 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Reading Command Line Arguments in Go</title>
      <link>https://www.callicoder.com/go-read-command-line-arguments/</link>
      <guid isPermaLink="true">https://www.callicoder.com/go-read-command-line-arguments/</guid>
      <description>os.Args includes the program name at index zero, why that name is not a reliable path, and the difference between raw arguments and what flag.Args returns after parsing.</description>
      <pubDate>Thu, 05 Mar 2020 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>How to Create a New File in Java</title>
      <link>https://www.callicoder.com/how-to-create-new-file-java/</link>
      <guid isPermaLink="true">https://www.callicoder.com/how-to-create-new-file-java/</guid>
      <description>Files.createFile against File.createNewFile, the parent directory that has to exist first, POSIX permissions set at creation rather than after, and the temp-and-move pattern that makes a write atomic.</description>
      <pubDate>Sat, 15 Feb 2020 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>How to Get the Current Date and Time in Java</title>
      <link>https://www.callicoder.com/how-to-get-current-date-time-java/</link>
      <guid isPermaLink="true">https://www.callicoder.com/how-to-get-current-date-time-java/</guid>
      <description>LocalDate, LocalTime, LocalDateTime, ZonedDateTime and Instant — which one has a time zone, which one is a moment, and why the answer to now() depends on a JVM default you did not set.</description>
      <pubDate>Sat, 15 Feb 2020 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>How to Get the Current Epoch Timestamp in Java</title>
      <link>https://www.callicoder.com/how-to-get-current-epoch-timestamp-java/</link>
      <guid isPermaLink="true">https://www.callicoder.com/how-to-get-current-epoch-timestamp-java/</guid>
      <description>Seconds against milliseconds is the bug this causes, why an int epoch stops working in 2038, and the fact that a LocalDateTime cannot be converted without supplying a zone.</description>
      <pubDate>Sat, 15 Feb 2020 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>How to Read a File in Java</title>
      <link>https://www.callicoder.com/java-read-file/</link>
      <guid isPermaLink="true">https://www.callicoder.com/java-read-file/</guid>
      <description>Files.readString for a small file, Files.lines for a large one, why the stream must be closed, and the charset default that changed in Java 18 and still bites on older runtimes.</description>
      <pubDate>Thu, 06 Feb 2020 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>How to Compare Date and Time in Java</title>
      <link>https://www.callicoder.com/how-to-compare-date-time-java/</link>
      <guid isPermaLink="true">https://www.callicoder.com/how-to-compare-date-time-java/</guid>
      <description>isBefore and isAfter against compareTo and equals, why two ZonedDateTimes for the same moment are not equal, and the truncation that makes a timestamp comparison behave.</description>
      <pubDate>Sat, 01 Feb 2020 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>How to Parse a String to a Date in Java</title>
      <link>https://www.callicoder.com/how-to-convert-parse-string-to-date-java/</link>
      <guid isPermaLink="true">https://www.callicoder.com/how-to-convert-parse-string-to-date-java/</guid>
      <description>LocalDate, LocalDateTime, ZonedDateTime and Instant from text — plus the two traps that pass every test and fail in production: yyyy under a strict resolver, and month names that depend on the default locale.</description>
      <pubDate>Thu, 30 Jan 2020 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>How to Check if a File or Directory Exists in Java</title>
      <link>https://www.callicoder.com/java-check-file-directory-exists/</link>
      <guid isPermaLink="true">https://www.callicoder.com/java-check-file-directory-exists/</guid>
      <description>Files.exists, Files.notExists and why they are not opposites, the race between checking and acting that makes the check pointless, and what a symbolic link does to the answer.</description>
      <pubDate>Tue, 07 Jan 2020 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>How to Copy a File or Directory in Java</title>
      <link>https://www.callicoder.com/java-copy-file/</link>
      <guid isPermaLink="true">https://www.callicoder.com/java-copy-file/</guid>
      <description>Files.copy will not overwrite unless you ask, copying a directory copies only the directory, and COPY_ATTRIBUTES is the difference between a copy and a duplicate.</description>
      <pubDate>Tue, 07 Jan 2020 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>How to Delete a File or Directory in Java</title>
      <link>https://www.callicoder.com/java-delete-file/</link>
      <guid isPermaLink="true">https://www.callicoder.com/java-delete-file/</guid>
      <description>Files.delete throws where File.delete returns false, a directory must be empty first and the JDK has no recursive delete, and deleteOnExit accumulates filenames for the life of the JVM.</description>
      <pubDate>Tue, 07 Jan 2020 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>How to Move or Rename a File in Java</title>
      <link>https://www.callicoder.com/java-move-file/</link>
      <guid isPermaLink="true">https://www.callicoder.com/java-move-file/</guid>
      <description>A move within one filesystem is atomic and nearly free; across filesystems it is a copy and a delete, and ATOMIC_MOVE throws rather than degrading silently. Renaming is the same call.</description>
      <pubDate>Tue, 07 Jan 2020 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>How to Create a Temp File or Directory in Java</title>
      <link>https://www.callicoder.com/java-create-temp-file-directory/</link>
      <guid isPermaLink="true">https://www.callicoder.com/java-create-temp-file-directory/</guid>
      <description>Files.createTempFile creates with owner-only permissions and File.createTempFile does not, deleteOnExit leaks until the JVM stops, and the shared temp directory is a hostile place to write.</description>
      <pubDate>Sun, 05 Jan 2020 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Valid Parentheses Problem Explained</title>
      <link>https://www.callicoder.com/valid-parentheses/</link>
      <guid isPermaLink="true">https://www.callicoder.com/valid-parentheses/</guid>
      <description>A stack, and the three checks that make it correct: a closer with an empty stack, a closer that does not match the top, and anything left open at the end. Missing any one passes most tests.</description>
      <pubDate>Sat, 05 Oct 2019 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Binary Search: Iterative and Recursive in Java</title>
      <link>https://www.callicoder.com/binary-search-implementation-iterative-recursive/</link>
      <guid isPermaLink="true">https://www.callicoder.com/binary-search-implementation-iterative-recursive/</guid>
      <description>The midpoint calculation that overflows, why the loop condition is &lt;= and not &lt;, what the return value means when the target is absent, and the lower-bound variant that handles duplicates.</description>
      <pubDate>Thu, 03 Oct 2019 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Longest Palindromic Substring</title>
      <link>https://www.callicoder.com/longest-palindromic-substring/</link>
      <guid isPermaLink="true">https://www.callicoder.com/longest-palindromic-substring/</guid>
      <description>Expanding around each centre is O(n²) with O(1) space and beats the dynamic-programming table on both. The trick is that there are 2n−1 centres, not n — every gap between characters is one too.</description>
      <pubDate>Thu, 03 Oct 2019 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Search an Element in a Rotated Sorted Array</title>
      <link>https://www.callicoder.com/rotated-sorted-array-search/</link>
      <guid isPermaLink="true">https://www.callicoder.com/rotated-sorted-array-search/</guid>
      <description>One half of every split is always sorted, which is the single comparison the whole algorithm rests on — plus the boundary conditions that decide whether the target is in that half, and what duplicates cost.</description>
      <pubDate>Thu, 03 Oct 2019 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Full-Stack Spring Boot on Kubernetes with Volumes</title>
      <link>https://www.callicoder.com/deploy-spring-mysql-react-nginx-kubernetes-persistent-volume-secret/</link>
      <guid isPermaLink="true">https://www.callicoder.com/deploy-spring-mysql-react-nginx-kubernetes-persistent-volume-secret/</guid>
      <description>MySQL needs a PersistentVolumeClaim and a StatefulSet, a Secret is base64 rather than encrypted, and the React build has to be served by nginx that also proxies the API — with the routing decided at build time or not at all.</description>
      <pubDate>Sat, 27 Jul 2019 00:00:00 GMT</pubDate>
    </item>
    <item>
      <title>Deploying a Containerized Go App on Kubernetes</title>
      <link>https://www.callicoder.com/deploy-containerized-go-app-kubernetes/</link>
      <guid isPermaLink="true">https://www.callicoder.com/deploy-containerized-go-app-kubernetes/</guid>
      <description>Deployment, Service and Ingress for a Go binary — plus the four settings that decide whether a rollout drops requests: probes that mean different things, resource requests, terminationGracePeriod and preStop.</description>
      <pubDate>Sat, 20 Jul 2019 00:00:00 GMT</pubDate>
    </item>
  </channel>
</rss>