Preferences

Cyberdog
Joined 2,993 karma
Cyberdog is the internet alias of a guy with interests in:

- 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


  1. Yes, given that Limbaugh has not produced new content in four years due to his death, there would be no overlap nowadays.
  2. Retvrn to Craigslist.
  3. David Bowie transcends history and fiction, life and death.
  4. If that's the case, how come nobody seems to be writing improved Minecraft clients?

    Ever since I started playing it in the beta days I've been frustrated with how poorly Minecraft performs relative to what it's showing on the screen. (Not that that stopped me from pouring hundreds of hours into the damn thing.)

  5. > but if you're used to Wordpress plugins or an NPM package being available for whatever you need, Drupal can be frustrating.

    On the other hand, Drupal does not have the WordPress ecosystem habits where many modules/plugins have paid upgrades and/or scatter ads all over your site. The WP plugin ecosystem feels so scummy in comparison.

    I agree the switch to Drupal 8 really killed its momentum though. (Drupal was reimplemented on top of Symfony and all existing modules/plugins had to be almost entirely rewritten to work with it - which was quite a difficult hurdle for people used to the previous conventions. Also being able to implement a site's configuration entirely in code, a beautiful feature of D7 albeit one that required third-party modules to implement, was still not quite working properly last time I checked.)

  6. How did the sites auto-update to have this plug-in removed/replaced? Are your sites set up to just automatically take push updates from WordPress central command or something and auto-modify themselves?!
  7. I take incredible exception to what you are saying. What you are saying might be broadly correct for software as a whole, but not at all for web sites; most commercial web sites exist to drive sales, through advertising and promotion of products for sale if not actually selling the products. The largest client I've had for the past six years or so is a web site that makes revenue through advertising and subscription/premium account sales, so improving the site such that it draws in visitors, entices them to stick around and view ads, and encourages them towards ponying up for a premium account for access to more features is the motivation behind everything I do on it. Everything I do on that site is for the purpose of generating revenue. Another site I'm currently building is just a straight-up e-commerce site for specialized products. One I worked on in the past was a credit provider that specialized in loans for medical professionals and encouraged them to take on loans which in turn made the company profit in the form of interest. One major project I worked on early in my career was for a local newspaper that sold advertising and newspaper subscriptions. I could go on.

    As for "original software," how are you defining that? Is software only original if it doesn't use any pre-existing frameworks? Okay, is it all right if I use a pre-existing programming language with a pre-existing standard library, or do I need to build my own? Is it all right if I host on a pre-existing VPS provider, or do I need to start my own hosting company? Can I host in pre-existing datacenters or do I need to build my own? Can I use pre-existing server hardware, or… At the end of the day all programmers who are getting anything practical done are using pre-existing tools at some level to solve their problems, often building new tools along the way. If I use the right tools for the job, build what my client wants, and keep end user experience in mind as much as possible (and I always do), then what's the problem?

    Are you actually a web developer? Are you not passionate about it?

  8. I looked at the code to see why it would be doing that. It seems to handle the font customization stuff by basically downloading all of the variants and then combining them into a zip file in client-side code - even when you do no customization at all. Apparently that code which makes the zip (which I'm guessing is an external library) creates a corrupted one when run in Safari according to a comment buried in the JS.

    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.

  9. I won't disagree with you about some people liking to keep secrets just as much as others like to spill them, but could you give an example of how trauma would cause someone to want to do the former?
  10. The capacity to keep secrets, even at the state level, takes a level of mental maturity that few are capable of. So many are thrilled by the idea of knowing something few other people know to a degree that they paradoxically want to make it something everybody knows. Journalists take advantage of this and collect and share leaky sources amongst each other. The reason for the leaking is most likely just human nature.

    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.

  11. That you think full-stack developers such as myself are routinely earning "just under $200k" (but please feel free to reach out to me if you need an experienced dev and think that's a fair price to pay) yet "cost money and do not generate profit" seems to speak of a skewed perspective and/or experience, I think. I mean, if that were true, then what would be the point in hiring a web developer in the first place? Some sort of weird nepotistic makework scheme? Again, if that's your perspective…

    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.

  12. As a web developer, specifically one who started my professional career when Internet Explorer 6 had something like 85% marketshare, I'm horrified at the idea of a single browser engine dominating the space again. It will lead to stagnation just as it did back then.

    Keep WebKit alive. Open source Presto. Support Ladybird. Hell, I believe that Microsoft should never have abandoned Trident…

  13. I looked up an article to elaborate on the "threw a fit" part. It appears that Apple believes it would have to compromise security aspects of iPhone Mirroring in order to do it in a way that complies with EU law, so it's choosing to just not offer it at all.

    https://appleinsider.com/articles/24/06/28/eu-hits-back-at-a...

  14. Thankfully it's been a couple years since I had to touch a WordPress code base, but I remember being confused because I needed to define a route and couldn't figure out how to do so either in the code base or in documentation scattered about online. Eventually I realized that this was because WORDPRESS DOESN'T HAVE A ROUTER and you're supposed to just create .php files which are called and executed directly from the web server. True caveman smash-together-rocks shit.
  15. What is the computer meaning of "empty?"

    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.)

  16. How can WordPress be so prominent and have so much money behind it and still have such garbage code? Are there giant companies still running PHP 4 server farms that need it to continue to be coded to 2003 standards? Is it some government op to ensure a good deal of the sites on the web are easily-hackable? Someone explain this to me.
  17. In PHP, as in other languages, numeric types that aren't ints should be avoided as much as possible. If you don't know why, smarter people can explain it, but the basics are that the binary nature of computers (every value is 0, 1, or a combination thereof) doesn't really work for reflecting decimal values without some level of fakery.

    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.

  18. What value would an empty int have, then?
  19. Note this article is from 2021 (it goes hard on COVID dooming near the end).

    Good explanation on what an OS is and how is useful to programmers, though.

  20. Leave that page open in a tab without moving your mouse over the window for a couple minutes for a cute little treat.
  21. Don't forget the Yellow Paint Epidemic.

    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.

  22. I've been using the annoyingly-named superagent for a while for the same task, but it often seems to fail to detect some of these annoying boxes. I'll definitely give this alternative a try and see if it works any better.

    Thank you so very, very much to the EU and whatever other government agencies are responsible for making the web more annoying to use.

    https://super-agent.com/

  23. Yes, but if the web site supports both of them, then it will pick whichever one is first in the header. For example, "en;q=1.0,de;q=1.0" technically states you want equal weight to be put on English and German, but the site has to pick one to show you, so it will most likely fall back to the behavior that's used when the quality score isn't provided (such as "en,de"), which is to pick the first one it can service from left to right.
  24. The Accept-Language header, when used properly, provide exactly the semantics you ask for.
  25. > I might prefer some sites in Danish, but others I'd like to have en English. Unless browsers allow you to set language on a per site basis, we still aren't really capturing the nuances of language preference.

    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.

  26. But then where's the flag for Liberia and Belize and Singapore? What if I'm in Indonesia and you don't offer an Indonesian option but I know enough English to get by - what country's flag should I click?

    Just don't use flags, man. It's ridiculous that this is even still a discussion.

  27. > Not that hard to implement, except perhaps parsing the Accept-Language preferences with their quality value can be cumbersome.

    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

  28. That's what I was thinking too. It looks like someone just reinvented tar, and given how it's a JavaScript thing I'm wondering if it's a zoomer who didn't know tar existed and the HN crowd would set them straight. But then I come into the comments here and people are posting about how absolutely brilliant it is, so surely I'm missing something… right?
  29. > your remote GitHub repo can be located on any machine with an ssh connection

    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.

This user hasn’t submitted anything.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal