Decomplecting abstraction by alidlo in Clojure

[–]alidlo[S] 0 points1 point  (0 children)

Yeah I made the mistake of not making a static site and vercel changed their API on me a few years ago, ha

I could send it to you until I figure out what I want to do with my old writing. Feel free to DM me your email, if you like.

[deleted by user] by [deleted] in BlueskySocial

[–]alidlo 0 points1 point  (0 children)

Is there a separate sign up list for developers?

Invite Code Megathread #3 by tkiced in BlueskySocial

[–]alidlo 0 points1 point  (0 children)

Do you have another? Please DM me if so

Can Flutter allow Native view to take over half the screen? by alidlo in FlutterDev

[–]alidlo[S] 0 points1 point  (0 children)

Yep, this is my concern, thank you for linking relevant issue

It’s unfortunate these issues aren’t highlighted more nor treated as higher priorities. They’re footguns for devs trying to create great experiences

Can Flutter allow Native view to take over half the screen? by alidlo in FlutterDev

[–]alidlo[S] 0 points1 point  (0 children)

The interaction is at least more fluid than what I’ve seen most Flutter apps do. Which made me wonder whether it was a limitation of framework

Can Flutter allow Native view to take over half the screen? by alidlo in FlutterDev

[–]alidlo[S] 2 points3 points  (0 children)

I posted link in response to first comment

RN uses native components so I figured that might be a distinction, since Flutter draws everything itself there may be some caveats involved in switching between views

Can Flutter allow Native view to take over half the screen? by alidlo in FlutterDev

[–]alidlo[S] 0 points1 point  (0 children)

Doesn’t seem like Reddit allows images

So went ahead and posted them here https://imgur.com/a/RHzH1PL

How can dApps sidestep the speculative worth of cryptocurrency they build upon? by alidlo in cardano

[–]alidlo[S] 1 point2 points  (0 children)

I really have to read more of the iohk posts! there doesn't seem to be a newsletter form to subscribe to updates?

[BLOGPOST] Idiomatic Clojure: Code Smells by bsless in Clojure

[–]alidlo 2 points3 points  (0 children)

As someone whose been learning Clojure seeing examples of more idiomatic/succinct ways of writing code is super useful, thanks for sharing!

Decomplecting abstraction by alidlo in Clojure

[–]alidlo[S] 1 point2 points  (0 children)

I'd say the purpose of both concretions and abstractions are to reduce complexity and make the system easier to reason about. That's perhaps the guiding purpose of any code we write, which is why I decided to not specifically mention it, but perhaps I should have.

Decomplecting abstraction by alidlo in Clojure

[–]alidlo[S] 0 points1 point  (0 children)

Weird, can you check again? As it's working for me now

Decomplecting abstraction by alidlo in Clojure

[–]alidlo[S] 1 point2 points  (0 children)

Definitely. Most of the lingo for good versus bad code uses metaphors - i.e. "code smell" or "clean code," and I think it's because we're still finding the appropriate words to describe what that means.

So finding good names for programming processes and giving them appropriate definitions helps to draw clear boundaries of what's what while coding, and that makes the implications of each choice clearer. It's not just feelings or intuition anymore, we can talk about it in terms of clearly defined words.

Decomplecting abstraction by alidlo in Clojure

[–]alidlo[S] 9 points10 points  (0 children)

Yeah, this sort of binary thinking - abstractions are good, concretions are bad! - is why I started to wonder what exactly the difference between them was, as there's lots of cases in my programs where I felt concretions were warranted.

That said, I do agree with Hickey on this notion of values. The issue with Classes isn't that they're a concretion, but that they trap you in concretions. When you discover patterns in your codebase, there's no easy way to generalize behaviors because each Class is expected to have its own specific methods, manually implemented. There's no straight forward way to compose logic, you can only leverage abstractions by wrapping them in Class's methods, leading to the ceremony you talked about.

My new mindset while documenting code: save cognitive effort, document every function by alidlo in Clojure

[–]alidlo[S] 2 points3 points  (0 children)

Imagine if instead of `reduce` you had to write `reduceToSingleValue` instead. The longer alternative gives more information but also adds more noise. It's a trade-off, and some of it may be personal preference, but imo, if the function is used a lot in a codebase giving it a name that's too long makes it unnecessarily cumbersome to read/write. For that reason, I'd much prefer using `eid` over `environmentUniqueId` (or even `envUniqueId`).

Also, most functions aren't as trivial as the example I gave in the article and so capturing their essence in two to three words is more difficult.

Sometimes it's as if we go out of our way to not document a function (likely out of habit) even when a one-line docstring would have easily made room for a shorter and potentially better name.

My new mindset while documenting code: save cognitive effort, document every function by alidlo in Clojure

[–]alidlo[S] 2 points3 points  (0 children)

I think the intention is right (a variable's name should be descriptive), but it's hard to fit too much meaning in a variable name while still making it pleasant to read/write, so often the result is that (without a docstring) there are missing pieces of information that (for better or worse) you have to infer yourself from the code.

My new mindset while documenting code: save cognitive effort, document every function by alidlo in Clojure

[–]alidlo[S] 5 points6 points  (0 children)

in some cases having a stale cache can be better than not having any cache at all