Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

8
  • 10
    Naming for these extensions functions is horrible. I would highly recommend using encodeToBase64 or something similar. Commented Nov 14, 2018 at 10:59
  • They are absolutely not clear and obvious. Tell me: what means "decode" or "encode"? There are thousands of decoding/encoding algorithms... What if you need Base64 and Hex? How would you name the methods then? Commented Nov 15, 2018 at 11:25
  • 2
    Nevertheless I would prefer something like: 'toBase64()' and 'fromBase64()' as a minimum. This way I don't need to read any documentation to know what the method will do. Keep in mind: "code is read more than it is written". Commented Nov 15, 2018 at 11:30
  • 1
    Yes, if i want to emphasize encoding and algorithm i will name it like toBase64UTF8(), but i don't need it, simple is better. Naming is one of the major problem in development. Please vote down on this answer and we close this dicussion, thanks. Commented Nov 15, 2018 at 11:39
  • 8
    So much fuss for an example :) Commented Nov 15, 2018 at 20:04