Author Topic: Religious technical opinions  (Read 11897 times)

0 Members and 7 Guests are viewing this topic.

Offline tooki

  • Super Contributor
  • ***
  • Posts: 12222
  • Country: ch
Re: Religious technical opinions
« Reply #25 on: February 20, 2022, 12:25:26 pm »
It's hard for me to take the video seriously when they're using Apple computers.
Yeah, I mean, only a handful of the world's biggest tech companies ...
[blah blah blah]

For the humor impaired, I was making a joke about religious technical opinions.
Or maybe my sense of humor is fine, but your joke was just devoid of humor and/or of any hint that it wasn't meant seriously...
 

Offline eugene

  • Frequent Contributor
  • **
  • Posts: 496
  • Country: us
Re: Religious technical opinions
« Reply #26 on: February 20, 2022, 03:06:27 pm »
Or maybe my sense of humor is fine, but your joke was just devoid of humor and/or of any hint that it wasn't meant seriously...

OK, I added an emoji for those that need to be told what is a joke and what isn't. Whether or not the joke is funny, I don't like the emoji; it's like a comedian laughing at their own jokes.
90% of quoted statistics are fictional
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 27499
  • Country: nl
    • NCT Developments
Re: Religious technical opinions
« Reply #27 on: February 20, 2022, 05:45:41 pm »
Has there ever been a thread title which is more self contradicting ?  >:D
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline newbrain

  • Super Contributor
  • ***
  • Posts: 1745
  • Country: se
Re: Religious technical opinions
« Reply #28 on: February 23, 2022, 10:05:15 pm »
I also used spaces because the software I learnt to write code in
...
I converted to tabs also about 16 years ago and have never looked back.
Spaces and tabs, meh...they are both overrated.
You need neither to indent C code, or at all, as a matter of fact.
Code: [Select]
#include/**/<stdio.h>
#include/**/<stdlib.h>
#define/**/HELLOSTRING/**/"Hello\x20world!\n"
int/**/main(void)
{
/**/printf(HELLOSTRING);
/**/return/**/EXIT_SUCCESS;
}
Nandemo wa shiranai wa yo, shitteru koto dake.
 
The following users thanked this post: Someone

Offline Karel

  • Super Contributor
  • ***
  • Posts: 2247
  • Country: 00
Re: Religious technical opinions
« Reply #29 on: February 23, 2022, 10:35:22 pm »


 :-DD

 
The following users thanked this post: Someone, ebastler

Online nctnico

  • Super Contributor
  • ***
  • Posts: 27499
  • Country: nl
    • NCT Developments
Re: Religious technical opinions
« Reply #30 on: February 23, 2022, 10:45:32 pm »
@Karel: Wow!  :o Just Wow... I thought I had seen all by now.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Online fourfathom

  • Super Contributor
  • ***
  • Posts: 1922
  • Country: us
Re: Religious technical opinions
« Reply #31 on: February 23, 2022, 10:49:49 pm »
Or maybe my sense of humor is fine, but your joke was just devoid of humor and/or of any hint that it wasn't meant seriously...

OK, I added an emoji for those that need to be told what is a joke and what isn't. Whether or not the joke is funny, I don't like the emoji; it's like a comedian laughing at their own jokes.

Well, *I* thought it was funny.  After all, it referenced the Apple / Microsoft / Linux religious wars.
We'll search out every place a sick, twisted, solitary misfit might run to! -- I'll start with Radio Shack.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22126
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Religious technical opinions
« Reply #32 on: February 23, 2022, 11:14:58 pm »


Also, I recall reading about some header file that made, maybe it was Forth or something, into valid (compile no warnings) C code.  Woe be unto you, of course, if the syntax is ever so slightly off, and the resulting ill-formed macros explode everything to bits. ;D  Thus, the program becomes a polyglot, when such header is provided.

(It's probably ioccc material, and I've probably remembered the target language wrong?)


More seriously, and back to the original topic(?), I've been more mindful of late, how many things I repeat, or "know that I know" -- but don't actually have references handy to support those positions.  Which might range from, say, experiments that I've done, but haven't documented for various reasons (long time ago, poorly recorded -- I wouldn't write an article about some effect illustrated with some crappy decade-old photos; just not very interesting to me, etc.), to articles I've ran across but not archived, to, just... a whole variety of things that I can't properly source (for the above and other reasons) that I have nonetheless synthesized into a more complete state of knowledge.

The latter being the most frustrating of all, because, surely if I could just tell someone all of the truths that have come together to support some particular position I hold, surely they would hold it as well, but what are the chances they'll actually sit and read all of those things -- nevermind if I had those sources to hand -- let alone come to the same inferences?

But, I rarely see others providing references either, so I'm not exactly feeling guilty about it, by way of peer pressure anyway.

So that's, in part, my confessional non-confession, if you like. :-DD

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline VK3DRB

  • Super Contributor
  • ***
  • Posts: 2261
  • Country: au
Re: Religious technical opinions
« Reply #33 on: February 23, 2022, 11:27:27 pm »
Similar issues in electronics hardware design. Those who use underscores as delimiters in net labels rather than hyphens in Altium need their backside kicked. Also those who overuse harnesses to the point they are unreadable don't know what they are doing. Harnesses are a kludge in Altium and should be used sparingly and with caution.

It is nonsense to use small circles as pin 1 designators. They look like vias, solderballs, test points or fly vomit. All my footprints use small filled triangles (Place -> Solid Region) on the top overlay. Much easier to see and these have the added benefit of pointing to the chip of interest in a crowded PCB, reducing ambiguity.

With software there are many annoyances, especially abbreviations that run into each other LKTHSDOES. Needless abbreviations, ambiguities and inconsistencies seem to be common. Not many hardware engineers know how to write decent embedded code. Some do. Most don't. Lavbiew is a classic where code can be written as if it was in the Wild West (unreadable mess) or beautifully composed using coding standards and a little extra effort.

Any professional company should have coding standards for software development, and PCB Assembly design standards for hardware development. I learnt this over 20 years ago when a company I worked for used them. I have implemented standards in a number of companies since then.
 

Offline PlainName

  • Super Contributor
  • ***
  • Posts: 7061
  • Country: va
Re: Religious technical opinions
« Reply #34 on: February 24, 2022, 12:03:01 am »
Quote
Those who use underscores as delimiters in net labels rather than hyphens

Uh... <guilty look> What's the issue there?

Edit: Altium do it.
« Last Edit: February 24, 2022, 12:06:34 am by dunkemhigh »
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8542
  • Country: us
    • SiliconValleyGarage
Re: Religious technical opinions
« Reply #35 on: February 24, 2022, 12:31:49 am »

But then mindless user with their "helpful" IDE that hides this and makes it look pretty for them starts adding in a random mixture of tabs and spaces.

Proper IDE's can do this automatically.  They strip all leading whitespace upon load and re-indent everything. just like they can colorize source.
Visual Studio Code, Slickedit, Eclipse , notepad++ have been able to do that for decades.
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline Someone

  • Super Contributor
  • ***
  • Posts: 4713
  • Country: au
    • send complaints here
Re: Religious technical opinions
« Reply #36 on: February 24, 2022, 01:02:28 am »
But then mindless user with their "helpful" IDE that hides this and makes it look pretty for them starts adding in a random mixture of tabs and spaces.
Proper IDE's can do this automatically.  They strip all leading whitespace upon load and re-indent everything. just like they can colorize source.
Visual Studio Code, Slickedit, Eclipse , notepad++ have been able to do that for decades.
Then what do they save.... hence the mess of indentation through large and/or historic code bases.
Being able to make it pretty for your preferred settings /= correct.
Whitepace changes to suit your preference = vandalism.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22126
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Religious technical opinions
« Reply #37 on: February 24, 2022, 01:17:48 am »
BTW, an actually useful argument in favor of tabs:
https://www.reddit.com/r/javascript/comments/c8drjo/nobody_talks_about_the_real_reason_to_use_tabs/

It seems the most effective use is to combine both, tabbing only to set indentation, then only spaces to align text e.g. when you have to lay out a table or something in the comments, or want to get nice columns of variables in repeating statements.  The former of which is probably not a great idea anyway (e.g. Doxygen is just going to use a proportional font by default -- you have to use markup to layout that; better yet, just write the supplementary docs, alright?), and the latter, I mean, I like doing it (lining up statements), though I don't know how accessible it is.  And all bets are off anyway with proportional fonts (as scary as it might seem to write code that way).  Not clear how many use prop'l. for accessibility, but something to keep in mind in any case.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: Someone

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15030
  • Country: fr
Re: Religious technical opinions
« Reply #38 on: February 24, 2022, 02:30:23 am »
It seems the most effective use is to combine both, tabbing only to set indentation, then only spaces to align text e.g. when you have to lay out a table or something in the comments, or want to get nice columns of variables in repeating statements.

That's my take on this as well. TABs are effective at conveying indentation *and* make code much easier to navigate on top of that, both with keyboard and mouse (as clicking inside one indentation 'spacing' will just get you to the nearest token inside of just setting the cursor right inside it at some space character, which I find horribly annoying). But with keyboard navigation, spaces for indentation are just a royal pain. Similarly, I absolutely *hate* editors that do not stop the cursor at the end of a line but allow you to set it absolutely anywhere beyond the end of lines. It's freaking non-productive to a large degree.

The only potential problem with TABs, when used to align text beyond the indentation level, is that alignment will of course get borked if you use a different TAB width (which in itself is not that big a deal - it's, or at least was, relatively common to document the TAB width used in source files in the files themselves for that exact purpose. But sure, it would still mildly annoy people who want to use a certain TAB width at all times, even when the source code is not theirs.)

That said, I've found myself guilty of occasionally using TABs to align text beyond the indentation level, but I try to avoid that now.
Better yet: I try to avoid aligning text beyond the indentation level altogether, which I think is usually a waste of time with little added value. I have better things to do than frantically hit the spacebar (or TAB key, when done "unproperly") just to supposedly make things a bit prettier (which is subjective.)
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22126
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Religious technical opinions
« Reply #39 on: February 24, 2022, 05:14:03 am »
That's my take on this as well. TABs are effective at conveying indentation *and* make code much easier to navigate on top of that, both with keyboard and mouse (as clicking inside one indentation 'spacing' will just get you to the nearest token inside of just setting the cursor right inside it at some space character, which I find horribly annoying). But with keyboard navigation, spaces for indentation are just a royal pain. Similarly, I absolutely *hate* editors that do not stop the cursor at the end of a line but allow you to set it absolutely anywhere beyond the end of lines. It's freaking non-productive to a large degree.

Not a fan of HOME/END, CTRL+arrows?

CTRL+LEFT/RIGHT isn't all that efficient through a sea of operators or punctuation, but it's not too bad overall.

I haven't used an unlimited-line-length editor since QBASIC... :-DD

...Oh no wait, that's not true.  There's one.  Altium's text editor, of course. :palm: :-DD

(But anyway, I don't mind those too much, as long as END works, which, I haven't seen one that doesn't.  Handy for, say, writing tables so you don't have to spam in all the white space, but not very useful beyond that.)

The modern-ish feature that took me by surprise is ALT selection (columns).  Now there's a handy editing mode!

Tim
« Last Edit: February 24, 2022, 05:15:40 am by T3sl4co1l »
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 12222
  • Country: ch
Re: Religious technical opinions
« Reply #40 on: February 24, 2022, 06:20:20 am »
It seems the most effective use is to combine both, tabbing only to set indentation, then only spaces to align text e.g. when you have to lay out a table or something in the comments, or want to get nice columns of variables in repeating statements.

That's my take on this as well. TABs are effective at conveying indentation *and* make code much easier to navigate on top of that, both with keyboard and mouse (as clicking inside one indentation 'spacing' will just get you to the nearest token inside of just setting the cursor right inside it at some space character, which I find horribly annoying). But with keyboard navigation, spaces for indentation are just a royal pain. Similarly, I absolutely *hate* editors that do not stop the cursor at the end of a line but allow you to set it absolutely anywhere beyond the end of lines. It's freaking non-productive to a large degree.

The only potential problem with TABs, when used to align text beyond the indentation level, is that alignment will of course get borked if you use a different TAB width (which in itself is not that big a deal - it's, or at least was, relatively common to document the TAB width used in source files in the files themselves for that exact purpose. But sure, it would still mildly annoy people who want to use a certain TAB width at all times, even when the source code is not theirs.)

That said, I've found myself guilty of occasionally using TABs to align text beyond the indentation level, but I try to avoid that now.
Better yet: I try to avoid aligning text beyond the indentation level altogether, which I think is usually a waste of time with little added value. I have better things to do than frantically hit the spacebar (or TAB key, when done "unproperly") just to supposedly make things a bit prettier (which is subjective.)
”Tab” isn’t an initialism, so it’s not in all-caps.
 

Offline pardo-bsso

  • Regular Contributor
  • *
  • Posts: 212
  • Country: ar
Re: Religious technical opinions
« Reply #41 on: February 24, 2022, 04:35:30 pm »

I have better things to do than frantically hit the spacebar (or TAB key, when done "unproperly") just to supposedly make things a bit prettier (which is subjective.)


My editor has been inserting 4 (or whatever the current project requires) spaces every time I hit tab until reaching the correct level but I get your feeling of time wasting too
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8433
  • Country: fi
Re: Religious technical opinions
« Reply #42 on: February 24, 2022, 06:12:59 pm »
It seems the most effective use is to combine both, tabbing only to set indentation, then only spaces to align text e.g. when you have to lay out a table or something in the comments,

Exactly this. Tabs are the right way because then everyone can choose their exact own preference, and code base written with tab indentation on the left will automagically just work for any setting. There is then no need to fight over the "right" amount of indentation.

Choose spaces, and you will always be fighting. Maybe that's the point?

And this is not religious technical opinion; it's the opposite. Using tabs (for the line indentation in code) has multitude of very strong, factual arguments behind. Anti-tabbing resembles more like a religion of some sort, though. The only real reason to use spaces instead would be some limited software which cannot output or handle tabs correctly, but such programs are extremely rare, I can't think of any example. The reality is more dire: there are two reasons to prefer spaces: "just because", i.e., people who just picked up this habit somewhere, never really thought about it, and just kept doing what seems to work well enough for them. I was in this group. And then; sociopaths, because picking the "space" side is a way of controlling others, and ensuring having some sparkling fights about the correct number of spaces and spaces vs. tabs.

The former is of course more usual than being a sociopath. I was that way in the past, too. But sensible people who think about things (instead of making them religious choices of group identity) tend to convert into tabs at some point in their career. Unless they come into conclusion that it doesn't matter that much; people use suboptimal processes like imperial units that get the job done for them, without being evil.
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8542
  • Country: us
    • SiliconValleyGarage
Re: Religious technical opinions
« Reply #43 on: February 24, 2022, 06:35:02 pm »
But then mindless user with their "helpful" IDE that hides this and makes it look pretty for them starts adding in a random mixture of tabs and spaces.
Proper IDE's can do this automatically.  They strip all leading whitespace upon load and re-indent everything. just like they can colorize source.
Visual Studio Code, Slickedit, Eclipse , notepad++ have been able to do that for decades.
Then what do they save.... hence the mess of indentation through large and/or historic code bases.
Being able to make it pretty for your preferred settings /= correct.
Whitepace changes to suit your preference = vandalism.
Why do i care what they save ? They could save it without any leading spaces. it would still be rendered properly in the IDE and compile just the same. The compilers don't care about leading spaces / tabs ( unless you code in that python crap )
You can set your colorization to your liking ( i am colorblind : i do not see green. The receptor in my eyes is missing. so i may use different colors from anyone else ).
IDE's are there to make your life easier. Use em instead of fighting useless religious wars over tabs / spaces, vi / emacs and kde / gnome , mac/ pc , windows / linux, flathead or phillips. Scraping along with pen and paper cause you don't like 'puters' is counterproductive.

it doesn't matter that i use notepad++ , someone else slickedit and yet a third person uses visual studio. The code gets rendered properly. irrespective of tabs and spaces. That is what is important.
« Last Edit: February 24, 2022, 06:37:35 pm by free_electron »
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 
The following users thanked this post: tooki

Offline Someone

  • Super Contributor
  • ***
  • Posts: 4713
  • Country: au
    • send complaints here
Re: Religious technical opinions
« Reply #44 on: February 24, 2022, 08:54:18 pm »
But then mindless user with their "helpful" IDE that hides this and makes it look pretty for them starts adding in a random mixture of tabs and spaces.
Proper IDE's can do this automatically.  They strip all leading whitespace upon load and re-indent everything. just like they can colorize source.
Visual Studio Code, Slickedit, Eclipse , notepad++ have been able to do that for decades.
Then what do they save.... hence the mess of indentation through large and/or historic code bases.
Being able to make it pretty for your preferred settings /= correct.
Whitepace changes to suit your preference = vandalism.
Why do i care what they save ? They could save it without any leading spaces. it would still be rendered properly in the IDE and compile just the same.
Only rendered "correct" by your specific choice of editor/IDE. If the tools only clean leading whitespace then middle whitespace with tabs are still broken. Also a quick google suggests none of those programs auto indent on loading a file, its a user action (or automated on saving, eclipse might be able to do it on import but its not clear, requires plugin?). Decades you say? so it should be obviously documented and easy to point to a reference.

But its the "why do I care" that is telling, exactly the attitude of: works fine for me and I don't value anyone else's time/effort. Hence the problem.
 

Offline PlainName

  • Super Contributor
  • ***
  • Posts: 7061
  • Country: va
Re: Religious technical opinions
« Reply #45 on: February 24, 2022, 09:08:50 pm »
Quote
But its the "why do I care" that is telling

That's what struck me, too.
 
The following users thanked this post: Someone

Offline eugene

  • Frequent Contributor
  • **
  • Posts: 496
  • Country: us
Re: Religious technical opinions
« Reply #46 on: February 24, 2022, 10:53:12 pm »
I might ask the question: are you saying that everyone, including me, should use [spaces | tabs], or are you saying that you personally prefer one or the other for your own use.

I'm neither agreeing or disagreeing with free_electron, but he does have the advantage in that he's not trying to tell me I'm wrong in some way.
90% of quoted statistics are fictional
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8542
  • Country: us
    • SiliconValleyGarage
Re: Religious technical opinions
« Reply #47 on: February 24, 2022, 11:26:38 pm »
It doesn't matter to me what you are using ( spaces , tabs , tabs converted to 3 spaces, tabs converted to nine spaces ).
Use whatever you want. i don't care because it is not a problem. (unless dealing with python , but that too is not a problem. i refuse to use that freakshow) . 

There is no 'standard' for indentation or tab to space conversion. Whenever you use some library it all seems to be done differently. Oracle Java specs a tab as 8 characters..
If i will use your code i will load it in an IDE that cleans all that stuff (ya ya not automatic it takes a hotkey or menu action . so what ? ) and properly indents it according to MY rules. The way I want to see it.



Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline alexanderbrevig

  • Frequent Contributor
  • **
  • Posts: 700
  • Country: no
  • Musician, developer and EE hobbyist
    • alexanderbrevig.com
Re: Religious technical opinions
« Reply #48 on: February 24, 2022, 11:31:06 pm »
I don't get why people still argue about tabs vs spaces!?
Which leads me to some opinions:

  • git is the best VCS, it can handle check in/out and keep tabs or spaces as is by file
  • 80 chars are not the only char width that makes sense (thank you, punch card storage boxes)
  • vim is the only editor, vim is the best editor, if you disagree you've not really tried it (or using emacs which is fine) <vim makes me forget tabs vs spaces is a thing>
  • private members does _not_ belong at the top of the file, give me what I probably come looking for first
  • code style does not matter, good tooling does, autoformat on save all the things => smaller git diffs
  • "not invented here" is just as bad in hardware design as it is in software, yes you can probably trust that footprint that's been used since 2005 by countless projects, even if you did not draw it yourself.
  • if you cannot automatically test what you've made, you're doing it wrong
  • hating a programming language only means you're not an expert in it
  • embedded developers use way too much magic in their code, the compiler is our friend, let's make use of it!

In all honesty though, if you've got a colleague with bad vision: Show them vim!
They will love the "not hunting for the cursor" aspect of the typical IDE experience, and of course the ability to set tab width that works for hard and soft tabs.

So there, that's my head on the chopping block :D  :box:
 

Offline Someone

  • Super Contributor
  • ***
  • Posts: 4713
  • Country: au
    • send complaints here
Re: Religious technical opinions
« Reply #49 on: February 25, 2022, 12:22:35 am »
I might ask the question: are you saying that everyone, including me, should use [spaces | tabs], or are you saying that you personally prefer one or the other for your own use.

I'm neither agreeing or disagreeing with free_electron, but he does have the advantage in that he's not trying to tell me I'm wrong in some way.
There is no general reason to prefer one or the other if you write code for yourself. You are not wrong for picking either, they are wrong for saying that it does not matter since their choice of text editor hides the differences (or worse, forcefully changes it to a specific indentation method+pattern).

If you share work on code (particularly through a change tracking system such as git) and people need to edit each others files, then it becomes an issue. Editing text is a small part of delivering "code".

Many text editors/IDEs will "work" with tabs or spaces (even with varying "sizes" for tabs), but you need to be careful not to make unnecessary changes when returning files with your new changes. Generally most people continue whatever indentation is already used in the file, or for a new file some agreed upon standard within the team/group. But feel free to be that one guy who no-one wants to work with if you insist on using your preference against whatever is already in place.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf