[-] sisyphean@programming.dev 3 points 1 year ago

If I remember correctly, the properties the API returns are comment_score and post_score.

[-] sisyphean@programming.dev 4 points 1 year ago

someone watching you code in a google doc

I’ve had nightmares less terrifying than this

[-] sisyphean@programming.dev 5 points 1 year ago

You can put spoilers in posts or comments this way:

TitleSecret

Here is how it renders:

TitleSecret

(AFAIK apps don't render these correctly, only the website)

[-] sisyphean@programming.dev 3 points 1 year ago

We should do an AmA with her!

[-] sisyphean@programming.dev 3 points 1 year ago

First, thank you for the detailed response.

Second, I think you finally convinced me to delete my FB. I will link to this comment wherever possible to show people what a terrible company Meta is.

[-] sisyphean@programming.dev 5 points 1 year ago* (last edited 1 year ago)

Good humor is based on reality

[-] sisyphean@programming.dev 3 points 1 year ago

Can you tell us more about what they are like?

[-] sisyphean@programming.dev 3 points 1 year ago

This is an excellent explanation of hashing, and the interactive animations make it very enjoyable and easy to follow.

199

Old but gold.

1

Prompt:

open source, federated software connecting free people across the globe, without commercial interest --q 2 --v 5.1
5
1

cross-posted from: https://programming.dev/post/107386

From the article:

symbex inspect_hash | llm --system 'explain succinctly'

Output:

This function calculates the hash of a database file efficiently by reading the file in blocks and updating the hash object using SHA256 algorithm from the hashlib module. The resulting hash value is returned as a hexadecimal string.
8
1
[-] sisyphean@programming.dev 3 points 1 year ago

I understand what you mean, and I even agree with it, but just to be a little pedantic, variable names are code, or at least they are more code than comments or docs.

But yes, encoding units into the type system is a much better solution. It doesn't work however for config options, environment variables or CLI switches.

[-] sisyphean@programming.dev 5 points 1 year ago* (last edited 1 year ago)

Related: Making Wrong Code Look Wrong

TL;DR: there is good and bad Hungarian notation. Encoding types (like string or int) in variable names is bad. Encoding information that cannot be expressed in the type system is good. (Though with the development of type systems, more and more of those concepts can be moved into the types, keeping variable names clean.)

But as a Hungarian, I'm obviously a little biased :)

[-] sisyphean@programming.dev 3 points 1 year ago* (last edited 1 year ago)

Oh definitely. I've been on a continuous Lemmy/kbin binge since Friday. This place is way more enjoyable than reddit because:

  • Your voice matters. People actually upvote and reply!
  • There is no karma! One less thing to obsess over (though you can see how many posts/comments a user has made).
  • The content is much more interesting and reminiscent of the early days of Reddit.
  • Maybe I'm too nerdy but I like how clean the site is.
  • There is absolutely zero commercial interest across the entire lemmyverse and it's awesome. You can talk to actual people and have fun!
  • It feels magical that there are all these different Lemmy and kbin servers and you can see people from 10 instances talking to each other in the same thread.
21
submitted 1 year ago* (last edited 1 year ago) by sisyphean@programming.dev to c/programming@programming.dev

Whenever you store a value that has a unit in a variable, config option or CLI switch, include the unit in the name. So:

  • maxRequestSize => maxRequestSizeBytes
  • elapsedTime => elapsedSeconds
  • cacheSize => cacheSizeMB
  • chargingTime => chargingTimeHours
  • fileSizeLimit => fileSizeLimitGB
  • temperatureThreshold => temperatureThresholdCelsius
  • diskSpace => diskSpaceTerabytes
  • flightAltitude => flightAltitudeFeet
  • monitorRefreshRate => monitorRefreshRateHz
  • serverResponseTimeout => serverResponseTimeoutMs
  • connectionSpeed => connectionSpeedMbps

EDIT: I know it’s better to use types to represent units. Please don’t write yet another comment about it. You can find my response to that point here: https://programming.dev/comment/219329

6
Who even uses Celsius (programming.dev)
5
Who even uses Celsius (programming.dev)
0

I’m a moderator of a smaller community. I’m posting quality content multiple times a day, and I posted about it in New Communities. The number of subscribers is low but it’s growing steadily.

Could you please give me some advice on growing this community? I don’t want to spam/flood or come off as rude or weird, but I really believe in it and think it would be useful to many people.

57
i++ (programming.dev)
4
[-] sisyphean@programming.dev 3 points 1 year ago* (last edited 1 year ago)

Some of the /r/ExperiencedDevs mods are running the programming.dev instance and most Star Trek-related subreddits moved to startrek.website, so it’s already happening.

view more: ‹ prev next ›

sisyphean

joined 1 year ago