kevincox

joined 4 years ago
MODERATOR OF
[–] kevincox@lemmy.ml 11 points 1 year ago (1 children)

Even if the code isn't reused adding names to sub-expressions can be very valuable. Often times I introduce new functions or variables even if they are only used once so that I can give them a descriptive name which helps the reader more quickly understand what is happening.

[–] kevincox@lemmy.ml 6 points 1 year ago

Yes, but in theory this is factored into the price. If you get 1/4 good images then a service that provided 4/4 good images could be 4x as expensive. If a service lowers their quality to push people to regenerate more often in theory those people will see their costs going up and quality go down and switch to a competitor.

This space is pretty competitive. So while tricks like this may be used in the short term to obscure the actual cost of using the service this will probably be noticed by reviewers and customers and will likely balance itself out over time.

[–] kevincox@lemmy.ml 9 points 1 year ago

99% of people who order alcohol on a flight don't get belligerent. But every smoker disturbs people around them.

However it is unfortunately very difficult to tell who will get belligerent before serving them and there is not much in the way of discipline afterwards. Although to be fair the people who cause the most disturbance will probably be loud and annoying even if they don't have anything to drink.

[–] kevincox@lemmy.ml 11 points 1 year ago* (last edited 1 year ago)

This seems like the way to do it. I went to https://www.microsoft.com/en-ca/software-download/windows11 and found the current SHA256 hash for the English version. 36DE5ECB7A0DAA58DCE68C03B9465A543ED0F5498AA8AE60AB45FB7C8C4AE402. IDK if this URL is blocked for some VPNs.

Then I tried a few torrents based on the file name Win11_23H2_English_x64v2.iso.

Example search: https://btdig.com/search?q=Win11_23H2_English_x64v2.iso

I ended up using this torrent which game me the correct file: magnet:?xt=urn:btih:4f5f5cd398d947260876c231f93e2d40b61bac48&dn=Win11_23H2_English_x64v2.iso&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce

[–] kevincox@lemmy.ml 19 points 1 year ago (3 children)

To be fair having a name can make things easier to read. I get that i % 2 == 0 is a common pattern and most programmers will quickly recognize what is happening. But isEven(i) is just that much easier to grok and leaves that brainpower to work on something else.

But I would never import a package for it. I would just create a local helper for something this trivial.

[–] kevincox@lemmy.ml 10 points 1 year ago

To be fair, this is actually reasonable. But it does look stupid on the face of it.

[–] kevincox@lemmy.ml 20 points 1 year ago (1 children)
  1. Is available to be used in website scripting.
  2. Not quite as full of footguns as PHP (although it is close).
[–] kevincox@lemmy.ml 64 points 1 year ago (5 children)

IDE is one thing, Go refuses to compile. Like calm down, I'm going to use it in a second. Just let me test the basics of my new method before I start using this variable.

Or every time you add or remove a printf it refuses to compile until you remove that unused import. Please just fuck off.

[–] kevincox@lemmy.ml 2 points 1 year ago (1 children)

don’t plan on reading feeds on all my devices at the same time and thus I believe Syncthing would be sufficient.

The problem with this is that you accidentally read on two devices before they sync, Syncthing renamed both files and now you need to manually fix it toget your read status back.

I get that it can work well enough, but I wouldn't want to try and build something based on this.

I get that you want to avoid a server. But I'm not aware of anything in this space. It would be an interesting to create a reader like this that has a custom P2P synchronization protocol.

[–] kevincox@lemmy.ml 5 points 1 year ago (3 children)

What are you hoping to sync? If it is just your subscription list and every device fetches by itself it shouldn't be too hard. However more complex things like read/unread would be hard to sync using a basic tool like Syncthing. The problem is that tools like Syncthing don't really have any conflict resolution capabilities so apps would need to be written specifically for that form of syncing.

Most open source readers use a shared backend server that manages checking feeds and syncing read events rather than this filesystem level syncing.

[–] kevincox@lemmy.ml 11 points 1 year ago

Having an automatic ice maker in the freezer is pretty awesome. then if you have water running to your fridge you may as well have a chilled water dispenser.

I don't really care for fridge water but some people like very cold water and the tap isn't always that cold.

[–] kevincox@lemmy.ml 9 points 1 year ago* (last edited 1 year ago) (1 children)

It is thankfully becoming more rare. But I have frequently seen some hostile behaviour.

  1. Not marking password fields as such so that they don't get filled.
  2. Blocking pasting into login fields.
  3. Requiring using some sort of on-screen keyboard to enter your password (or more often PIN).
  4. Requiring enter some characters of your password rather than the full thing. (ex please enter characters 1, 8, 2, 4 of your password).
view more: ‹ prev next ›