cache_miss,
VulcanSphere,
VulcanSphere avatar

Great to read this, hopefully this fix will be implemented ASAP

Calcharger, (edited )
Calcharger avatar

var magazineString = ‘kBiNmEta’;
var magazineString = magazineString.toLowerCase();

Or something

Edit: Damn i'm getting downvoted. I'm just learning javascript for the first time after Python, what am I writing wrong?

HotDogFingies,
HotDogFingies avatar

I wouldn't know either way because I'm an idiot.

sailsperson,
sailsperson avatar

They might be downvoting you because you're basically declaring the variable twice, with the same name, too. If someone knows better, though, please correct me.

Either of the following should work just as well:

var magazineString = 'kBiNmEta';
magazineString = magazineString.toLowerCase();
var magazineString = 'kBiNmEta'.toLowerCase();

Another reason some people may be upset is that they see it as downplaying the complexity of the issue, I suppose, but I'm not going to play psychic here or put words into peoples' mouths. One thing I'll say for certain is if there's anything I learned about any sort of work, is that it's always far more complicated than it sounds/looks like; applies especially well to software.

But don't you get discouraged! Learning to code yields great result even if you decide to not pursue the career with it for whatever reason - it's fun, it's rewarding, you can easily turn into something useful, you can contribute to open source, etc. There's always something.

Calcharger,
Calcharger avatar

That makes more sense, thanks!

Euka,

Another thing on the technical side is using "var" is frowned upon. It was replaced with "let" in 2015. The new keyword has over 96% browser support and is safer.

The gist of it is "var" makes it easy to produce silent failures. That means your code will run but the results will be wrong and you'll wonder why because there's no error message. Uncountable hours were wasted fiddling with logic that wasn't wrong in the first place but worked on "corrupted" inputs. For your own sanity use "let" unless you cannot (legacy systems). You won't need to consider anything, it just works better. If you want to learn specifics, relevant topics are scopes, variable hoisting and the global object.

Calcharger,
Calcharger avatar

I thought "let" was only used in instance blocks and "var" was global? Haha I should have just stayed with python

duringoverflow,

that they see it as downplaying the complexity of the issue

my bet is there as well. He just pointed a core JS function that makes a string lower case. The comment didn't even provide something like "I found in the repo in line XXX, we can add this ...". It was dead simply a core JS function. Do you think a person capable to pull the code from the git repo, set it up locally, find the correct place in the code, make adjustments, commit, push, make PR back to the origin repo, wouldn't had known the "toLowerCase()" function?

duringoverflow,

what am I writing wrong?

your comment didn't offer anything. Good for you for learning JS I guess, but what did you expect from this comment?

Calcharger,
Calcharger avatar

Fair

!deleted120991,

deleted_by_author

  • Loading...
  • FaceDeer,
    FaceDeer avatar

    He offered an answer to the question being asked.

    duringoverflow,

    I replied to his question why he was getting downvotes. I didn't downvote him. What do you expect from your comment though?

    eltimablo,

    Moral superiority, I guess?

    ScottyB,
    ScottyB avatar

    yeah, default redirect for case correction seems like the best way forward. But it needs to happen soon before there is 2 versions of the same subreddit and it can't be undone.

    cjerrington,
    cjerrington avatar

    Either a redirect or a text based comparison saying "NewMagazine" already exists as "newMagazine". Being case sensitive also allows for text based identification easier to read. Just like kbinMeta gives you the clarity of where the words start and end to not confuse things.

    Simple example: nowrap. Is it "no wrap" or "now rap"? Same words but could be different topics

    AmidFuror,

    "Who represents"

    Trebach,

    "Pen island"
    "Experts exchange" changed their domain to put a hyphen between the words.

    seikoshadow,

    I think best case is that they retain capitalisation of subs, but redirect regardless of capitalisation, duplicate magazines should be disallowed if the only difference is capitalisation

    speck,

    That's how you get the fun of superbowl

    fuocoebenzina,
    fuocoebenzina avatar

    wish you hadn't said that, because there doesn't seem to be a superbowl magazine yet and I'm so tempted...🦉

    speck,

    I think you should go for it. Some subs deserve another life. And the ensuing confusion is part of the charm of these sites

    cjerrington,
    cjerrington avatar

    This was the example I was thinking of haha. I made a post on Mastodon and tagged about the Super Bowl and started seeing these Superb Owls... Not the same indeed.

    HeartyBeast,
    HeartyBeast avatar

    SuperbOwl?

    PabloDiscobar,
    PabloDiscobar avatar

    You want to be renamed scottyb?

    Bloonface,
    Bloonface avatar

    You can't create two magazines with the same name as the check for that is case insensitive (e.g. I own /m/uwotm8, you can't create /m/UWotM8 as the software checks for that).

    So it's mainly a UX thing relating to URLs, which does need to be solved.

    Jerry,

    Case sensitivity in magazine names is a known issue. There's an open Pull Request for it:

    Community name case sensitivity (?) issue

    Ernest marked it as a bug. It will eventually be fixed.

    ngmi,
    ngmi avatar

    Oof, that's a big design flaw

    sofi,

    This also applies for usernames. Check out https://kbin.social/u/Sofi vs https://kbin.social/u/sofi

    Terrifying and ripe for abuse.

    tal,
    tal avatar

    I don't know if kbin usernames can contain Unicode, but given that there are many similar glyphs in Unicode, that's another attack vector.

    Something that domain names had to deal with when they started using Unicode.

    Goronmon,

    I don't think you can actually create the username with a difference case though, correct? The check for uniqueness in magazines and usernames appeared to me to validate that, but the routing rules for them don't appear to try to resolve the differences.

    dotflac,
    dotflac avatar

    I had it in my head that URLs were always supposed to be case-insensitive but I'm scrolling around the relevant RFCs now and don't see much mention of case after the scheme. Still, I think it's generally what people expect and it prevents a lot of problems.

    justanotherjo,

    That is the one down side to Linux, it's a case-sensitive OS, but humans aren't...

    DoucheAsaurus,
    DoucheAsaurus avatar

    Only one downside? Sign me up!

    AmericanScream,

    That's not a downside. That's an upside. It gives people more control. Of course, people who don't know how to write user-friendly apps can bungle that control.

    Fatalchemist,
    Fatalchemist avatar

    It's a downside if you want to just quickly go to something like kbin.social/m/kbinMeta for example. If I'm manually typing it, I may forget if the "M" is uppercase or not. What about the "k" since it's the first letter? I mean if I get it wrong, I just change the casing around or something.

    For example sometimes when I want to find something new, I would just go to reddit.com/r/gamedeals and it doesn't matter if I put GameDeals or gamedeals. I still get sent there with no problem.

    I don't think it's a massive downside, but I don't see how its an upside. What control does it give people? Whether the letters are small or big? Or am I missing something here?

    tal,
    tal avatar

    Most environments on Linux that support tab-completion have some sort of mechanism for providing case-insensitive tab completion for people who want it.

    Oinks,
    Oinks avatar

    Fun fact: It's possible to set an ext filesystem to be case insensitive. I haven't done it so I can't say for certain that this won't break some major stuff but technically there's no assurance of case sensitivity in Linux.

    AmericanScream,

    Hostnames are case insensitive. E-mail addresses are case insensitive.

    But paths and filenames definitely are case-sensitive in Unix (although not in Windows). Any deviation from this is implemented on the application side.

    In applications, you should avoid using case-sensitive URLs unless it's for specific things like encrypted data/hashes.

    Fatalchemist,
    Fatalchemist avatar

    Hostnames are case insensitive. E-mail addresses are case insensitive.

    Fun fact: E-mail address are technically case sensitive, however, every single modern email client/service makes sure to send the email regardless of what casing you use. But that's just kind of being pedantic about the technical side of things for us end-users, it's basically treated as not case-sensitive. This wasn't me trying to say "you're wrong" but rather give a fun little side fact.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • kbinMeta
  • DreamBathrooms
  • mdbf
  • everett
  • magazineikmin
  • osvaldo12
  • ethstaker
  • InstantRegret
  • Youngstown
  • slotface
  • rosin
  • GTA5RPClips
  • cisconetworking
  • kavyap
  • thenastyranch
  • bokunoheroacademia
  • Durango
  • khanakhh
  • tacticalgear
  • Leos
  • anitta
  • modclub
  • lostlight
  • tester
  • cubers
  • relationshipadvice
  • HellsKitchen
  • normalnudes
  • sketchdaily
  • All magazines