Comments (10)
@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.
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.
Doing it all at once might be better that way it is just done otherwise it is just delaying the issue
from qrcoder.
I think a massive code go-through can be justifiable.
from qrcoder.
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.
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.
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.
You might be right, after all. Removing the surprise of the Qr spelling by breaking compatibility is probably not worth it.
from qrcoder.
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.
Postponed. Maybe implemented in the next major release.
from qrcoder.
Related Issues (20)
- [WIP] How do we split the QRCoder? (NuGet packages) HOT 3
- [WIP/QRCoder2] How do we split the QRCoder? (Github repositories) HOT 1
- [WIP/QRCoder2] Version number handling HOT 1
- [WIP/QRCoder2] Documentation and wiki HOT 2
- [WIP/QRCoder2] How do we handle changes during the 2.0 development? HOT 2
- [WIP/QRCoder2] Coordination of development (VCS) HOT 1
- [WIP/QRCoder2] Coordination of development (Organization) HOT 1
- [WIP/QRCoder2] Communication tools besides Github? HOT 1
- [WIP/QRCoder2] System.Drawing vs X HOT 2
- [WIP/QRCoder2] Use of System.Drawing.Primitives HOT 1
- [WIP/QRCoder2] How do deal with COM-support? HOT 5
- [WIP/QRCoder2] Shall we re-think the Payload Generator? HOT 7
- [WIP/QRCoder2] Consider Removing QRCodeGenerator Instance Methods
- [WIP/QRCoder2] Which frameworks and language version to target HOT 3
- vCard to QRCoder - diacritics problem HOT 8
- [WIP/QRCoder2] Consider Removing Nested Types from Public API Signatures HOT 2
- [WIP/QRCoder2] Consider Updated Abstractions HOT 12
- Is there a plan to support QRCode parsing HOT 1
- In Linux system, which class do I use to generate QR codes with iocn? HOT 1
- How to get QR bytes in Blazor app .NET8? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qrcoder.