| ▲ | zwnow 7 days ago |
| I actually want string length. Just give me the length of a word. My human brain wants a human way to think about problems. While programming I never think about bytes. |
|
| ▲ | dwb 7 days ago | parent | next [-] |
| The whole point is that string length doesn’t necessarily give you the “length” of a “word”, and both of those terms are not well enough defined. |
|
| ▲ | jibal 7 days ago | parent | prev | next [-] |
| The point is that those terms are ambiguous ... and if you mean the length in grapheme clusters, it can be quite expensive to calculate it, and isn't the right number if you're dealing with strings as objects that are chunks of memory. |
| |
| ▲ | zwnow 7 days ago | parent [-] | | [flagged] | | |
| ▲ | zahlman 6 days ago | parent | next [-] | | It is not possible to write correct code without understanding what you dismiss here. | |
| ▲ | tomsmeding 7 days ago | parent | prev | next [-] | | If the validation rules don't specify (either explicitly or implicitly) what the "length" in the rule corresponds to (if it concerns a natural-language field, it's probably grapheme clusters), then either you should fix the rule, or you care only about checking the box of "I checked the validation rules", in which case it's a people problem and not a technology problem. | |
| ▲ | dwb 7 days ago | parent | prev [-] | | You are in the wrong job if you don’t want to think about “nerd shit” while programming. | | |
| ▲ | zwnow 7 days ago | parent [-] | | Idk it pays my bills and I have success at work so I must do something right. | | |
| ▲ | jibal 10 hours ago | parent | next [-] | | Posting "Miss me with that nerd shit" in this thread certainly isn't doing anything right. | |
| ▲ | dwb 6 days ago | parent | prev [-] | | Well I just hope I don’t have to use any of the software you build. What a shameful attitude. | | |
| ▲ | zwnow 6 days ago | parent [-] | | [flagged] | | |
| ▲ | dwb 6 days ago | parent [-] | | I agree about Palantir but that’s a big deflection. And don’t patronise me. Paying your bills and paying enough attention to technical details to write good programs are in no way mutually exclusive. |
|
|
|
|
|
|
|
| ▲ | int_19h 6 days ago | parent | prev [-] |
| Humans speak many different languages. Not all of them are English, and not all of them have writing systems which make it meaningful to talk about "string length" without disambiguating further. |
| |
| ▲ | zwnow 5 days ago | parent [-] | | Why exactly would I care about humans not speaking any of the languages I speak? | | |
| ▲ | int_19h 3 days ago | parent [-] | | My point is that "the human way" is not specific to the way you think about these things. |
|
|