Git Product home page Git Product logo

Comments (10)

epsitec avatar epsitec commented on August 24, 2024 1

@codebude, sorry for the long silence - I somehow lost track of this issue.

I don't see any other solution than duplicating types to keep current implementations from compiling after such a major change. And who knows if type and enum names have not been persisted under some form or another, and what it would mean to break deserialization...

Obsoleting the misnamed types and methods will certainly be useful, until the next major release where such a braking change would be acceptable.

from qrcoder.

codebude avatar codebude commented on August 24, 2024

Hi @epsitec ,

thanks for your feedback. In theory this is a good and justifiable proposal. Nevertheless I'm a bit scared of the user's/developer's reactions, when they have to rewrite their code after the next update.

Do you have a strategy or idea in mind, how to switch "softly"? May be we can switch by giving support for old an new naming for a while. (While marking the old named functions as obsolete like explained here: http://stackoverflow.com/a/1759357/251719)

from qrcoder.

 avatar commented on August 24, 2024

Doing it all at once might be better that way it is just done otherwise it is just delaying the issue

from qrcoder.

tilkinsc avatar tilkinsc commented on August 24, 2024

I think a massive code go-through can be justifiable.

from qrcoder.

codebude avatar codebude commented on August 24, 2024

Hi @epsitec , @mrtops and @Hydroque ,

since you guys argue for renaming, let's try to do so. Before doing such breaking changes, I want to ensure, that we have to do this only one time. So can we bring up a list with all classes/methods/variables which shall be changed together? I just want to ensure that nothing is left behind.

File Type Old New
AbstractQRCode.cs property QrCodeData QRCodeData
PayloadGenerator.cs method isHexStyle IsHexStyle
PayloadGenerator.cs enum-value (CalendarEvent) iCalComplete ICalComplete
PayloadGenerator.cs enum-value (GeolocationEncoding) GEO Geo
PayloadGenerator.cs enum-value (MailEncoding) MAILTO MailTo
PayloadGenerator.cs enum-value (MailEncoding) MATMSG MatMsg
PayloadGenerator.cs enum-value (MailEncoding) SMTP Smtp
PayloadGenerator.cs class MMS Mms
PayloadGenerator.cs enum MMSEncoding MmsEncoding
PayloadGenerator.cs enum-value (MmsEncoding) MMS Mms
PayloadGenerator.cs enum-value (MmsEncoding) MMSTO MmsTo
PayloadGenerator.cs method HMACToString HmacToString
PayloadGenerator.cs enum-value (OneTimePasswordAuthType) HOTP Hotp
PayloadGenerator.cs enum-value (OneTimePasswordAuthType) TOTP Totp
PayloadGenerator.cs enum OoneTimePasswordAuthAlgorithm OneTimePasswordAuthAlgorithm
PayloadGenerator.cs enum-value (OneTimePasswordAuthAlgorithm) SHA1 Sha1
PayloadGenerator.cs enum-value (OneTimePasswordAuthAlgorithm) SHA256 Sha256
PayloadGenerator.cs enum-value (OneTimePasswordAuthAlgorithm) SHA512 Sha512
PayloadGenerator.cs class SMS Sms
PayloadGenerator.cs enum SMSEncoding SmsEncoding
PayloadGenerator.cs enum-value (SmsEncoding) SMS Sms
PayloadGenerator.cs enum-value (SmsEncoding) SMS_iOS SmsIos
PayloadGenerator.cs enum-value (SmsEncoding) SMSTO SmsTo
PayloadGenerator.cs class SwissQrCode SwissQRCode
PayloadGenerator.cs exception-type SwissQrCodeException SwissQRCodeException
PayloadGenerator.cs enum-value (SwissQRCode.Currency) CHF Chf
PayloadGenerator.cs enum-value (SwissQRCode.Currency) EUR Eur
PayloadGenerator.cs method (SwissQRCode.Iban) IsQrIban IsQRIban
PayloadGenerator.cs enum-value (SwissQRCode.IbanType) QrIban QRIban
PayloadGenerator.cs exception-type SwissQrCodeIbanException SwissQRCodeIbanException
PayloadGenerator.cs enum-value (SwissQRCode.ReferenceTextType) QrReference QRReference
PayloadGenerator.cs enum-value (SwissQRCode.ReferenceType) NON Non
PayloadGenerator.cs enum-value (SwissQRCode.ReferenceType) QRR Qrr
PayloadGenerator.cs enum-value (SwissQRCode.ReferenceType) SCOR Scor
PayloadGenerator.cs exception-type SwissQrCodeReferenceException SwissQRCodeReferenceException
PayloadGenerator.cs exception-type SwissQrCodeContactException SwissQRCodeContactException
PayloadGenerator.cs enum-value (WiFi.Authentication) nopass NoPass
PayloadGenerator.cs enum-value (WiFi.Authentication) WEP Wep
PayloadGenerator.cs enum-value (WiFi.Authentication) WPA Wpa
QRCodeGenerator.cs method CalculateECCWords CalculateEccWords
QRCodeGenerator.cs method CreateCapacityECCTable CreateCapacityEccTable
QRCodeGenerator.cs method CreateQrCode CreateQRCode
QRCodeGenerator.cs method IsValidISO IsValidIso
QRCodeGenerator.cs method XORPolynoms XorPolynoms
QRCodeGenerator.cs enum ECCLevel EccLevel

Please add, edit, remove, proof and discuss this list. 👍

from qrcoder.

epsitec avatar epsitec commented on August 24, 2024

Thank you for your proposal. It seems that Microsoft has some difficulty at adhering to their own coding standards. See for instance what they did for SHA or HMAC...

https://msdn.microsoft.com/en-us/library/system.security.cryptography.hmac(v=vs.110).aspx

So, switching all acronyms to the three letter words is probably not the path to least surprise for users of Cryptography namespace.

Now I am confused.

from qrcoder.

codebude avatar codebude commented on August 24, 2024

Hi @epsitec ,
that's why I initially said, that I don't see a big "benefit". Yes, coding standards are good and everyone should try to met the standards, but it's not possible all the time.

I'm still scared, that we could put happy users off, by doing this breaking changes. On the other hand you and the others said, that the changes would make the lib more intuitive to use. But spoken for myself, when I start using a new lib, I don't know how the methods/properties are named. I have to use Intellisense/autocomplete and/or the wiki/docs to learn what methods are available and how to use them. So does renaming methods really bring the effort, when have to use docs/wiki anyway?

from qrcoder.

epsitec avatar epsitec commented on August 24, 2024

You might be right, after all. Removing the surprise of the Qr spelling by breaking compatibility is probably not worth it.

from qrcoder.

tilkinsc avatar tilkinsc commented on August 24, 2024

My intent for proposal would be looking through all the code for formatting and regulation. Not just simple name changes, but optimizations and code flow. Making a new release doesn't mean that people can't rely on the previous instance if they want. They will come to want the more additional features in the mean time. As long as the dev has good documentation over what has changed, it shouldn't be that hard to figure out.

Also, I prefer my acronyms capitalized, and leading WORDS to be lowercase.
Example
QRCoderExample and WTFToString

from qrcoder.

codebude avatar codebude commented on August 24, 2024

Postponed. Maybe implemented in the next major release.

from qrcoder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.