Curious (Clojure) Programmer Simplicity matters

Menu

  • Home
  • Archives
  • Tags
  • About
  • My Talks
  • Clojure Tip of the Day Screencast
  • Weekly Bits & Pieces
  • RSS

Evernote productivity shortcut: quick & easy way to open the URL/link under the cursor

September 22, 2023
Table of Contents
  • How it works

Here’s a small Keyboard Maestor macro I made today:


Continue reading →

Starting Clojure REPL with plain java

September 15, 2023
Table of Contents
  • Download
  • Run
  • Resources

This is gonna be a rather short and trivial post but I wanted to share it anyway because it can be useful, ocassionally.


Continue reading →

Git - How to Delete Merged Branches Older than X Days?

September 15, 2023
Table of Contents
  • Ok, can you tell me how to actually do it?
    • TL;DR: The final script
    • How it works
  • GitHub Actions job
    • Full job definition
  • Resources

At CodeScene, we used to not delete merged git branches, at all. The practice came from Branch Analysis. To get that data, we didn’t want to remove a merged branch immediately. However, we ended up, never deleting them which also causes a problem: over time you accumulate thousands of branches. That creates a mess and makes it hard (or impossible) to select proper branch in CodeScene itself (the max number of branches we load and display is 1000).


Continue reading →

DRAFT: Clojure functions reloaded

February 10, 2023
Table of Contents
  • The problem
    • Various incarnations
  • Digging deeper - understanding the evaluation
    • Symbols and Vars
  • Things to remember
    • Quick tips how to remember?

The problem

I bet many of you have encountered the classic problem with reloading Ring handlers:

(require '[ring.adapater.jetty :as jetty])
(jetty/run-jetty routes {:port port :host "localhost" :join? false})

Here we pass routes to the run-jetty function. Now, when we modify routes those modifications are not reflected and we need to restart the server.

The problem here is

THe classic solution to the is to use a var:

(#'jetty/run-jetty routes {:port port :host "localhost" :join? false})

Notice #' in front of the run-jetty function invokation

Various incarnations

Functions passed as an arguments

Functions captured in a closure

Functions saved in a data structure


Continue reading →

Feature flags, Middlewares, and Cloudfront caching.

October 10, 2022
Table of Contents
  • All (animals) are equal, but some (animals) are more equal than others
  • Feature flags and Middlewares
    • Ring’s middlewares
    • Feature flags or "why is it always me?"
    • Mind your layers
    • Cloudfront
  • The fix
  • Takeaways
  • Resources

This post has also been published on CodeScene Engineering blog: CodeScene Engineering blog.


Continue reading →
Next »

Copyright © 2023 Juraj Martinka

Powered by Cryogen | Free Website Template by Download Website Templates