User's banner
Avatar

russ

russmatney@programming.dev
Joined
3 posts • 40 comments
Direct message

One thing i undervalued for most of my career was just reading code.

Get into the habit of digging into open source repos that catch your curiousity, and try to grok the way the project is layed out, what namespaces/files exist, what some of the core functions are, where the complexity is housed.

It’s all about getting exposure to patterns, especially if there aren’t other people to work with in your day to day.

permalink
report
reply

every time i’m playing some old guilty pleasure that isn’t ‘actually good’ (think: just wanted to play a jock jam for a moment), i worry about the influence on next week’s discover weekly…

permalink
report
reply

Nice work!

Tauri is great. I haven’t built a proper app with the nice native backend features, but i wrote a wrapper for passing a url on the command line, which lets you run an arbitrary web app like it’s a native one: https://github.com/russmatney/clove

Very happy to have something lightweight!

permalink
report
reply

Yes! I love using x (and xs) for functions over whatever the thing is (or things are).

permalink
report
parent
reply

Feedback loops are super important! For momentum, for reducing burnout, for implementing/debugging, everything. I think of it mostly as a tooling problem - the point of maintaining and improving your tools is to maintain/improve your feedback loops.

For me it’s about this question: How quickly and easily can you verify that the code is doing what you think it’s doing?

This is what I love about writing Clojure - you can write and evaluate abritrary bits of code (functions, expressions) without leaving the editor. Invoke a keybinding to send the current expression to the running repl, and the resulting value is returned, and can be interactively explored/walked in the editor. It makes for a fun interactive dev-loop, and is a nice way to design a solution to some problem. (A caveat is that getting into a working repl is non-trivial, as it’s dependent on your editor+plugins. It takes a bit of learning and unfortunately isn’t beginner-friendly.)

Vim and emacs are also excellent for improving you feedback loops - both take some investment and some discomfort in the beginning, but ultimately you get out what you put in, and soon you can imagine and realize better workflows without much effort (adding your own functions, keybindings, hydras, etc). VSCode and other editors are also hackable, to some extent.

Mostly I think it’s important to hack on your tooling on a regular basis, at least once a week or so.

My old boss used to say he expected us to keep ‘sharp knives’ (as in cooking). I think companies should make time for the devs to work on tooling to improve these feedback loops - it’s the hiccups in the workflow that build up and lead to burnout/fatigue. Smooth workflows can actually be energizing instead of energy-draining!

permalink
report
reply

I think of this as interactive development, or repl-driven development. You can work this way today in Clojure (frontend, backend, and lately even for scripting via babashka), and with lisps in general - the syntax lends itself to sending expressions to the repl and returning values to your editor.

It’s really the best way (my favorite, at least) to program that i’ve found for exactly the reasons you mentioned - it’s excellent for debugging and ensuring the behavior of small functions with minimal overhead.

Types are frustrating because they lock things up and they don’t guarantee behavior, which is really all a program cares about. I feel similarly about unit tests… it’s extra code locking up your behaviors, so make sure they’re what you actually want! A general problem with types is that you have to commit to some shape early, which can lead to premature design and basically some arbitrary DSL when you just needed a couple functions/transformations. Feels like the problem of OO at times.

On the other side, the trouble (beyond people generally not wanting to read/learn lisps, which is unfortunate) is that repl-driven dev requires that you take care of your tools, which means there’s a tough learning curve and then some maintenance cost for whatever editor you want to use.

At a career-level scale, in my opinion, the investment is well worth it, but it’s a tough thing to figure out early in your career. I expect most devs with a couple years of js/python see types and feel like it’s a huge relief, which is real, and maybe types make sense at a certain team size…

I think people should spend time in several different languages and paradigms - it makes the ones you go back to make more sense :D

permalink
report
reply

Just to share a perspective from erlang/elixir: pattern matching to filter for only happy-path inputs and the principle of “letting it fail” (when the inputs don’t match the expected shape) works really well in some paradigms (in this case, the actor model + OTP, erlang’s 9 9s of uptime, etc). In that kind of architecture you can really only care about the happy path, because the rest is malformed and can be thrown away without issue.

permalink
report
parent
reply

Types and unit tests are bloat that increase the maintenance cost of whatever code they are involved in. Most types force premature design/optimization. Most unit tests lock up some specific implementation (increasing cost of inevitable refactors) rather than prevent actual bugs.

Nil-punning in clojure has spoiled me rotten, and now every other language is annoyingly verbose and pedantic.

permalink
report
reply

100%! It was mind-blowing to realize lisps are actually syntactically simpler than all the non-lisps so popular today

Takes a bit of love from editor standpoint unfortunately, so most devs will just never attempt that hurdle

permalink
report
parent
reply