| General > General Technical Chat |
| Religious technical opinions |
| << < (12/22) > >> |
| newbrain:
--- Quote from: Siwastaja on February 25, 2022, 07:28:14 am ---when working in team projects, you have to cope with the choices made by others. --- End quote --- This. Working alone do whatever you like. Use edlin if you like. In any sufficiently mature organization there will be design rules, coding and style guidelines, and the code should not pass inspection if it does not abide by them. Spacing is only a very secondary part of those rules. They might not always be the best possible, and you have a right and in my case also a duty to try and improve them, but just complaining or being an anarchist is wasted effort or, worse, disruptive. The coding standard in the section where I work (8 spaces - you might catch the odd tab in some old codebase) does not match my preference (4 spaces - no tabs), but I see no reason to push for my personal preference - and I'm in the group that can decide on that kind of change. |
| samnmax:
Personally, I prefer spaces. Mainly because I constantly use vertical alignment between different lines, for clarity. For example: --- Code: ---if ((vdsstat1.bit.VDS_H1 == 0u) && (vdsstat1.bit.VDS_L1 == 1u) && (vdsstat1.bit.VDS_H2 == 1u) && (vdsstat1.bit.VDS_L2 == 0u)) { --- End code --- If I had written it using tabs, with 4 spaces per tab, when someone with their editor set to 2 spaces per tab opened it, they would see this: --- Code: ---if ((vdsstat1.bit.VDS_H1 == 0u) && (vdsstat1.bit.VDS_L1 == 1u) && (vdsstat1.bit.VDS_H2 == 1u) && (vdsstat1.bit.VDS_L2 == 0u)) { --- End code --- With spaces, code stays how I wrote it. ^-^ |
| VK3DRB:
--- Quote from: dunkemhigh on February 24, 2022, 12:03:01 am --- --- Quote --- Those who use underscores as delimiters in net labels rather than hyphens --- End quote --- Uh... <guilty look> What's the issue there? Edit: Altium do it. --- End quote --- You made it look better by selecting something else and fading everything. Depending on the view sometimes you cannot see the underscore at all. Especially on a printout. I never use underscores on net labels EXCEPT on differential pair net labels where Altium sadly gives the user no option. A better practice, IMO, is for example: I2C-CLOCK nRESET // Reset active when low 3V3 // +3.3V, positve by default -5V // Must be a negative because it is not joining two words. Altium should fix this up so underscores can always be seen. A colleague said to me a few years ago, "Altium needs to completely re-architect and rewrite their software and not make it backwardly compatible. Start afresh, make the menus a bit smarter and more logical and fix the kludges up, like the harnesses. Also those sheet properties with the various title bar fields.. what a mess. I could add that Altium 365 is a bit of a mess too, but it works once everything is painfully set up between companies. If I was granted one wish for a feature, it would be for a "paint" feature like we get in MS Word, so that the attributes like fonts etc can easily be painted onto different text fields or whatever. As it is, it's a pin in the arse. |
| alexanderbrevig:
--- Quote from: VK3DRB on February 25, 2022, 12:10:34 pm ---[...] A better practice, IMO, is for example: I2C-CLOCK [...] --- End quote --- This makes it so you _must_ make a drag selection for selecting the whole label. Try double clicking I2C-CLOCK, then on I2C_CLOCK and be convinced to not use hyphens for identifiers. 8) |
| PlainName:
--- Quote from: VK3DRB on February 25, 2022, 12:10:34 pm --- --- Quote from: dunkemhigh on February 24, 2022, 12:03:01 am --- --- Quote --- Those who use underscores as delimiters in net labels rather than hyphens --- End quote --- Uh... <guilty look> What's the issue there? Edit: Altium do it. --- End quote --- You made it look better by selecting something else and fading everything. --- End quote --- I did not. That's a straight screencap from the Altium help pages: https://www.altium.com/documentation/altium-designer/sch-obj-netlabelnet-label-ad I thought that was obvious from the figure label "Net labels identify and..." 'Sok, no need to apologise. --- Quote --- Depending on the view sometimes you cannot see the underscore at all. Especially on a printout. --- End quote --- Yes, after posting that clip I realised the problem. I use underscores for two reasons: 1. (this involved natural language but, thinking about it, it's not really applicable) 2. A hyphen is a no-no in code, and I like to use the same label in both schematic and code (to avoid confusion). Probably comes from my software background, although I did hardware before that - you certainly realise if you get it wrong in code, whereas a schematic label just starts an argument on a web forum :) --- Quote ---Altium should fix this up so underscores can always be seen. --- End quote --- That would help, but it seems to me you can fix it yourself by choosing a suitable font. For instance, one where the underscore is at the same lower level as a normal character - the only reason underscores are that low is because you could overtype, but that's no possible on a computer (generally) so an underscore is always going to be on its own. If Altium provided that font it would encourage all users to use it, but it's possible to adapt your own without any input from Altium. Maybe someone has already done it. |
| Navigation |
| Message Index |
| Next page |
| Previous page |