Maybe it really is a bug on Safari's part but creating custom zip archives is something which would be far saner to do on the server side in the first place.
3,013 karma · joined December 10, 2015
- Swift programming language
- Cryptocurrency
- Vidya gaems
- Unix and macOS (though I don't hate Microsoft/Windows - you do you)
- Instinctively distrusting Google
- East Asia culture, language, politics, and especially food
Maybe it really is a bug on Safari's part but creating custom zip archives is something which would be far saner to do on the server side in the first place.
That said, the existence of the state of Israel is such a contentious topic that the leakers may have been motivated by politics as well as the above, sure. But I doubt state-level agencies are condoning the leaking here.
In my world, clients come to me with a web site and a problem (or no web site and the problem of "I don't have a web site"), we agree on contract terms, and I solve their problem. If I do a good job at it (and I want to do a good job at it, because solving problems and making clients happy feels good while failing at that feels really bad), the client finds value in my work and they will come back to me the next time they have another problem that needs solving. It's that simple. Nobody's hiring me because of "candidate compatibility" and then throwing a bunch of money at me to do nothing.
At least in the short term, I'm not too worried about AI taking my job, because, as stated elsewhere, it's not yet good enough to do more than the least complex of tasks, and as one tries to get it to do more complex things, the odds that it will hit a brick wall due to a bug it can't code its way around or a creative understanding it can't unravel increase - so these sorts of tools might actually end up creating more work for more experienced professionals like myself (although I don't necessarily look forward to the days where I'm regularly being hired to unravel a plate of ChatGPT spaghetti). But even more than that, I feel like a good deal of the value I provide is in being able to talk to a client about what they want the site to do, how it will earn them money, and foresee potential problems or offer better solutions based on my experience - to answer questions that they didn't think to ask, and ask questions of my own to make sure we're on the same page on things. A client just giving me a description of what they want built followed by me just building it? That never happens. There's always discussion and back-and-forth to nail down details and make sure the site is as good as it possibly can be. So long as clients see the value in that, and until AI can do that sort of thing, I'm not sweating it.
Keep WebKit alive. Open source Presto. Support Ladybird. Hell, I believe that Microsoft should never have abandoned Trident…
https://appleinsider.com/articles/24/06/28/eu-hits-back-at-a...
I'll answer - there really isn't one. You could say "undefined" but we already have another word for that ("undefined") - an "empty" construct doesn't exist in any other programming language that I'm aware of. Back in PHP's way-too-helpful days, they came up with this concept, so they got to define what it meant. (And to be fair, as with other things from the bad old days, it has caused confusion ever since.)
When working with things like money amounts, lengths, etc, store values as ints of the smallest denominator you support. For example, store $1.23 as 123 cents, or 4.567 meters as 4567 tenths of a centimeter. If you want to still allow the user to be able to, for example, enter a price as 1.23, multiply by 100 on input (like `$priceInCents = round($_POST['price'] * 100);`) and divide by 100 when displaying the value(`number_format($priceInCents / 100, 2)`), but keep it as an int all the way in between.
In terms of PHP, this also makes empty() a lot more predictable, because once a value is cast as int, the only time empty() will return true is if it is zero - or you could explicitly code `$priceInCents === 0` and have the exact same result.
Good explanation on what an OS is and how is useful to programmers, though.
Some game devs don't even want to risk the chance that players might have to stop and explore a little bit before they find the right path to continue the game.
Thank you so very, very much to the EU and whatever other government agencies are responsible for making the web more annoying to use.
This problem is solved already by competent sites. On your first visit to a site, it uses Accept-Language to guess what language you want to see. If you use a language switcher menu to pick a different language, a cookie is used to save your choice. On your next visit to the site, the cookie is sent and that takes precedence over Accept-Language to send you the page in your preferred language. Easy.
If/when you decide to create a user account on the site (if the site even supports that) then your language preference can be stored with your user data so you would see it automatically after you log in even if you're on a different browser/device.
As with many other things, there are already best practices on how to do all this stuff. It's just a matter of getting web devs and their managers to be aware of them and/or care enough about providing a good experience for their users (unfortunately this has turned out to be a huge ask) to find and implement them.
Just don't use flags, man. It's ridiculous that this is even still a discussion.
Many web frameworks provide a tool for parsing these for you. If yours doesn't (or you're not using one) you may be able to find a package that does. Some will also do the matching for you, so you can pass it a list of languages you can support alongside the Accept-Language string and it will pick the best option that's found in both.
For example, here's the documentation for such a method in the excellent Nette PHP framework that I've been using where I can lately: https://doc.nette.org/en/http/request#toc-detectlanguage
But I've also used this stand-alone package: https://packagist.org/packages/willdurand/negotiation
Technically true, but GitHub provides so many more tools that it's almost silly to do so. Aside from the "hub" in GitHub such that it is often the first and only way that some people will look for projects they're interested in, you also get the nice web interface for quick code browsing, issue queues, the ability to add and remove people with a simple GUI rather than SSH key management, wikis, email notifications, and so on and so on.
Some of this can be mitigated by using a self-hosted web-based Git tool like GitLab, Gitea, Phorge, etc. But you still lose the "everyone uses it because everyone uses it" factor of GitHub on top of whatever GitHub features the clones may lack.
That said, certainly there does seem to be a weird glib assumption by some hobby/OSS projects that of course I already have the same developer ecosystem/toolchain installed on my system as they do - of course I have a Rust toolchain or can install dependencies with Homebrew or am using Linux with systemd/Wayland. This project at least kindly asks me to install Go first if I haven't already.
Personally, since I've discovered the field/group/record/file separator characters in ASCII, I've been using them to concat fields and rows on one-to-many SQL joins. They work great for that purpose since (at least on all the projects I've done this with so far) I can be certain that none of the values in the joined data will have those characters, so no further escaping is necessary. For example, in MySQL:
SELECT
i.item_id,
GROUP_CONCAT(CONCAT_WS(0x1F, f.field_id, f.field_value) SEPARATOR 0x1E) AS field_values
FROM items i
LEFT JOIN fields f ON f.item_id = i.item_id
WHERE ...
Then split field_values with 0x1E to get each field ID and field value pair, and split each of those on 0x1F. Easy as pie.But on the other hand I doubt gay furries actually did this hack. More likely it was edgy teenagers who constantly use homophobic slurs in their Discord servers and are just saying it was done by gay furries to be funny.
Maybe you can come back to this comment in five or ten years and laugh at me, but right now it feels like RISC-V is a solution in search of a problem.
After that, deduplication can probably bring you down at least another 50% - how many of these files are just the same things being posted over and over? Probably quite many of them. Store a file once with a database tracking its SHA1 hash, and whenever you see a file with the same hash come in, throw it away and instead store a reference to the first file.