Email or username:

Password:

Forgot your password?
Top-level
Nullstring 🏴‍☠️

@inherentlee now im losing cycles daydreaming of how to write something to automatically detect words and camelcase a string but getting caught up on a hypotehtical bug where multiple words could be cased out of a single string and then writing a different software to specifically locate strings that can be camel cased into different sets of words cleanly and i really gotta get back to work lmao

13 comments
lee :Fire_Trans:

@0x00string right???? same same same i went down the same rabbit hole. The #superBowl vs #superbOwl debate too...

lee :Fire_Trans:

@0x00string my best guess at the end of the day is to query for existing casings of the same string, then compare to the canonical case and do {something} to determine which is preferable...

Nullstring 🏴‍☠️

@inherentlee if it were me, a dumbass, i would just make whichever is the most used at any given time the auto-suggest one

lee :Fire_Trans:

@0x00string I did consider that! but I think the weight of the autosuggest might bias that toward lowercased versions. but use weight is definitely part of the solution 🧐

Nullstring 🏴‍☠️

@inherentlee i would drop the no-cased one from consideration if cased ones exist, idk lol, this is why i dont host websites 😂

lee :Fire_Trans:

@0x00string ah but what if someone made a typo in a single word like tyPo? it's uncommon but not impossible. Or a break in a word that is only questionably a break - I've been running into this with "iframe". do you uppercase the "f"??

lee :Fire_Trans:

@0x00string just the existence of camelcasing can't be enough, there probably needs to be some sort of bare minimum # of uses as well

DB Schwein

@inherentlee @0x00string

When you say the word outloud do you pronounce it "Eye Frame" then yes, uppercase the Frame. If you pronounce it as If-rame, you wouldn't (not that I know anyone who pronounces that one without the "eye", but you get it, right?)

lee :Fire_Trans:

@deirdrebeth @0x00string that's how I lean but my coworker has used the opposite convention! so it can be malleable, is the main point I was making

DB Schwein replied to lee

@inherentlee @0x00string

Totes. I figure that the people it was originally created for use text to speech so the sound should outweigh the marketing convention :-)

Zorro Notorious MEB 🪷🪷🪷

@0x00string @inherentlee R has a package called "janitor" that, among other things, can convert random strings in the column headers of a table to well-formed #snake_case strings.

cran.r-project.org/web/package

#rstats

Go Up