Better HN
topnewbestaskshowjobs
Log inSign up

usrbinbash

4,687 karma · joined Dec 4, 2021 (4y ago) · 1,693 submissions

Submissions

comment 3y ago · link · parent

> you're losing the user's context

We're talking about BOOKMARKS, so what context do we lose? The users browsers home screen?

comment 3y ago · link · parent

Would that be equal to zero.js?

comment 3y ago · link · parent

> Seems pretty vanilla

No it doesn't, same as "automobile" doesn't seem pretty Saturn-5, despite the fact that both are moving under their own power.

Terms have meaning, including meaning derived from communities by and large accepting that a certain term has a certain semantic meaning. And the accepted semantic meaning of "Vanilla Javascript" is "runs without a framework besides the browsers own API".

If my code works out of the box in an unmodified browser, then it is Vanilla JS. If I have to load a framework for it to work, then it isn't, period. And it matters exactly nothing whether the framework in question has 900,000 or 9 lines of code.

comment 3y ago · link · parent

> until the user refreshes that page

Funny enough, a page-refresh is usually what happens, after I fill in a login form that appears in a modal.

But even if it doesn't do that: If the page is reachable without logging in, then what relevant information is there on the page to display to the user that is both so important that it immediately needs to appear on login, and so unimportant that it doesn't justify requiring a refresh?

And on the off chance that the use case actually requires that, what specific advantage does a modal confer over two input fields (Username, Password), tucked discreetly along a "Login" Button into the navbar?

comment 3y ago · link · parent

> Modal windows and how they interact with the user is obviously something that should be standardized,

It already is. It's called tabs.

comment 3y ago · link · parent

> A more obvious example is /login and /register in a modal, a cherry on top if logging in or registering doesn't reset app state if the user decides to register halfway through a task.

That cherry on top can be just as easily implemented by opening the /login in a new tab. Auth gets set, there, user is logged in even in the old tab, and doesn't lose his position in the page either.

Added cherry on top of that: If the user decides to log into the page halfway through the application, he can still bookmark the login page.

The same is true for almost every other use case of a modal where it displays a resource.

Tabs are builtin capabilities of the browser. Even terminal browsers like w3m support tabs. Why built something else that can be built poorly, instead of using what the browser already can do?

comment 3y ago · link · parent

I agree, and I also don't think that modals should be used for these things. I merely also agree with the article that these are use cases when a modal "can" be used. It still isn't a good solution, but at least it doesn't actively hurt my ability to access a resource.

comment 3y ago · link · parent

> Modal sometimes also works as a peek view of a resource.

That's what thumbnails and stubs are for.

> In fact, you can make a link open modal with left click but open in new tab with middle click. I think it is the most balanced way in my opinion.

Cool. How do I "middle click" on my phone? Left click is "open resource" by default. If a webapp doesn't have a damn good reason to overwrite the browsers default behavior, it shouldn't.

And "we thought it would make the design really pop", is not one of those reasons.

comment 3y ago · link · parent

> Further - users (and I mean normal paying users, not HN commentators) rarely ever give a shit about URLs.

Tell that to my non-techy spouse and her +1400 bookmarks. You know what her most recent rant was about? That she cannot bookmark certain timetables at a booking platform she uses. Why? Because guess what: The timetable shows in a modal.

> The modal is about not losing the current place for the user.

Resources opening in tabs also don't lose the place of the user. But you know what modals do usually lose the user? The ability to interact with anything but the model while it's open. A usual gem is a form which opens a modal, where I would then really really like to copypaste some info I already entered in another part of the form, but can't, because the effing modal is in the way. So I have to close it, and that usually wipes all the info in it.

> "Dont open a modal" in cases where the user is likely going to get lost in a detour otherwise is bad advice.

If a web design can cause the user to get lost in the first place, then the problem isn't that there is no modal, and adding one will likely not fix it.

comment 3y ago · link · parent

> ut there’s no reason a URL can’t resolve to a landing page and already open modal state populated with the content the other person shared to you.

I can think of 2 very good reasons right away:

1. It increases the complexity of the webpage

2. It makes it impossible to simply download or integrate the resource elsewhere

comment 3y ago · link · parent

> You don't need a modal window

You don't need most of the cruft that clutters "modern" webpages. While not solely responsible, ever more "clever design" has certainly contributed to the status quo, where we load upwards 30MB of garbage to display <10 lines of information.

comment 3y ago · link · parent

> This will worsen the UX more often than not. Guaranteed.

The article states very clearly the use cases for which modals make sense:

    Modal windows can be used for views that don't constitute a "resource" or correspond to a domain entity:
    
    - Alerts
    - Confirmation dialogs
    - Forms for creating/updating entities
As soon as something is a resource, that is, an article to read, a picture to watch, a diagram to open, a sound to play, in short anything for which it makes sense that it should be reachable via an URI, a modal is the wrong choice.

comment 3y ago · link · parent

Good for flowcharts, less so for programming.

> My least favorite thing about all the common programming languages is that programs are represented as one dimensional byte arrays

The reason why graphical notations never took off in programming (and never will), is simple: It's all neat and shiny when we represent small algorithms or small example programs as flowcharts.

And then, as soon as the program grows to a sizeable project, that has to deal with state, external state, user defined state, represent a GUI, talk to another system, or does anything even slightly more complex than the examples or single algorithms, the whole thing goes to hell. Try to represent a webserver with 50 different endpoints as a graph. Try representing a single page application for a webshop, including error handling and different ways of discovery. You'll need ALOT of screenspace, and those are not even complex examples.

And then there is the problem of editing, storing, versioning, compiling and transmitting the programs. All these are solved problems with code, none of them are universally solved for graphs. Sure, we could just define a textual representation of the graphs, but then we're right back to the "byte arrays", just with one added layer of complexity.

comment 3y ago · link · parent

> The source of the notion is that we can do it pretty well ourselves

Well, that notion is wrong, otherwise, what's the explanation for something like this:

https://www.theregister.com/2023/05/17/university_chatgpt_gr...

comment 3y ago · link · parent

Lets see, how many commands does it take me to port my entire vim config to a new machine? Ah, right...one.

    git clone https://github.com/MY_USERNAME/vim.git
Not exactly what I'd call a difficult or time consuming method.

comment 3y ago · link · parent

> Besides, the whole point of Vim bindings is supposed to be that they are the same everywhere (muscle memory yadda yadda yadda).

No, the whole point of ViM bindings is that MY bindings are the same everywhere. That's why it's main config is a simple textfile that I can just `git clone` or `sftp` onto whatever machine I intend to spend more than a few seconds writing code on.

Which, incidentially, is something that is an absolute PITA, if it's possible at all with the more "modern" editors, or on the off chance it isn't a PITA, usually depends on some specific platforms offerings.

> Plus, you get the additional benefit that the software fits in with the rest of the system, rather than sticking out like a sore thumb.

Well, from my PoV, what with i3 desktop, vim in the terminal, and the browser being the only GUI application that I use regularly, vim seems to fit in pretty well with everything else.

comment 3y ago · link · parent

> Don't surprise me. Blend in. Look and behave like other programs.

There is hardly anything in the world that blends in better with everythign else, then a terminal application between other terminal applications.

comment 3y ago · link · parent

The problem with defaults is, someone won't like them anyway, so trying to make them likeable to everyone, isn't going to happen, no matter how hard we try.

Using ViM as an example, using the keys that are prevalent on a US keyboard, was a sensible approach when it was developed, and since remapping the keys is probably one of the easiest things to do, it's also not an issue. In fact, writing a simple remap into a text file is easier than remapping keys in most "modern" editors, where the option to do so usually lives behind 2 sub-menus hidden behind a hamburger-button, and forcing me to scroll down an endless list that may or may not have a search function. And good luck if I want to export/import my config, or, god forbid, check it into a repo.

> But defaults matter, if you target anyone else.

Products have to target an audience and cater to them. That's how we ended up with alot of the modern webapps sharing the same usability problems, because "being like everyone else because that's what the audience is familiar with" encourages stagnancy, not evolution.

FOSS Tools on the other hand, have the freedom to explore ideas. If people don't like these ideas, they don't have to use the tools.

comment 3y ago · link · parent

> C-[, which cannot be pressed e.g. on QWERTZ layouts because the [ character requires AltGr.

So the user just presses Ctrl-AltGr-[, what's the problem? And changing keyboard layouts or keybinds, isn't something that someone using vim should have a lot of trouble with anyway.

> It's bad enough that a text editor that ignores the past few decades of UX research is still in widespread use,

Maybe that's because a lot of people using it decided that the "decades of UX research" produced precious little of worth. That's because alot of the "research" done in areas that are, by their nature, heavily opinionated, produces, what a surprise, mostly opinions.

And when we take a giant pile of opinions, and pile them all on top of one another, well...

...that's how we ended up in a world where, somehow, people now actually have to wait for an application to open, like they did in the early 90s, on machines that are orders of magnitude more powerful. Where webpages load 20MiB of giant hero images, useless framework code and spyware, to display 4 lines of text. Where applications get more "modern" and "streamlined" by somehow lowering information density, losing functionality and getting less self-explanatory.

comment 3y ago · link · parent

> to recreate said object given outside changes...

Unless we're talking about something other than diffusion models, the new image is generated from initial random noise. It also doesn't "recreate" parts of it's training data, unless the model was overfitted to a particular work, or the prompt is deliberately designed to do so, or the user is running it in img2img mode against a preexisting work.

comment 3y ago · link · parent

> These are brain intensive questions

They really are not. Even rodents with brains the size of a peanut manage to not willfully destroy the environment they are living in, despite already having all the resources they need, out of sheer greed.

comment 3y ago · link · parent

> At the most basic level: “don’t go into a town and pick a random person to murder”

https://pledgetimes.com/russian-attack-the-traces-of-the-ret...

My point isn't to say shared core values don't exist. They clearly do, that's why we call what's happening over in Ukraine war crimes. That's why the notion of humanitarianism exists, that's why laws against murder, rape, etc. are commonplace.

My point is, that humans are, unfortunatly, able to willfully ignore even such basic shared values, and our technology does reflect that. Murder is bad. War is to be avoided. That's not in question. And yet societies develop and build ever more ingenious weapons of war.

So "aligning by shared core values" might pose difficulties beyond the, already pretty difficult, task of defining these values in unambiguous and workable terms to a machine.

comment 3y ago · link · parent

> It’s not clear we really need super general models.

It's also not clear such models are even possible.

Every time I see "alignment" and that whole jazz coming up, I can't but wonder if that discussion isn't getting much more attention than needed. Especially since there are very real, very proven, very immediate problems that AI technology poses, that actually need solving right now.

But of course, discussing things like the economic fallout of job displacements doesn't have the same scifi-cool vibe to it than worrying about the Matrix coming to turn humanity into paperclips ;-)

comment 3y ago · link · parent

> there are at least some core values that I believe a majority of humans share.

Really? What are those?

Given that there are entire countries that refuse to, oh idk. punish things like rape adequately, and that we have nation states who happily tout their ability to burn down the planet, I'd really love to hear about these core values we all share.

comment 3y ago · link · parent

> The problem is we have as yet struggled to clearly articulate consistently what our actual best interests are, in terms of goals we can train into our AIs.

And imho, we never will be able to do that, because as soon as there is more than one human, they are likely to disagree about something.

Even things that should be no-brainers like "should we preserve our habitat or burn it down for profit", or questions like "is it a good idea to have loads of deadly assault weapons just float around in our society", seem to be too hard for our species to resolve.

If we cannot even align with our fellow humans, how can we expect to do so with machines?

comment 3y ago · link · parent

While that is true, many companies over here sell american made brands clothes and those are still, for some unfathomable reason, using the original measurements, starting with waist sizes in inches, which in my personal experience can mean anything from: "Fits as intended" to "Could be used as cover for a Jet Engine".

comment 3y ago · link · parent

> What sort of functional requirements would cause you to choose one over the other?

Simple: I don't like having headaches. Therefore, I chose postgres.

comment 3y ago · link · parent

> and the availability of web tools is much wider in php than for python.

If that was a metric for language quality, then Javascript would be undeniably the most perfect language ever designed by any intelligent species in the universe, judging by the number of frameworks.

> to an almost decent language

And now I would like to hear a good reason why I should use an "almost decent language", when I can use a decent one instead.

> It can be used properly if you know what you are doing

It doesn't matter what I do, the language still insists of having multiple modes of error handling, a massive amount of builtins all of which sit in my global namespace, it's configuration is still seperated between compiler flags, a system wide ini, and local config. The base deployment mode is still "dump files into folder and let CGI do the rest".

comment 3y ago · link · parent

The average user won't have to care when these models run as part of whatever app he is using on his device, or on the server his app uses as a backend.

Look at the first uses of StableDiffusion. It was either "you know python or you use Dall-E". Now we have one-click installers setting everything up, and nice user interfaces on top of it.

1
262728
57