• Indentation in source code files

    From Digital Man to All on Thursday, August 24, 2017 13:00:04
    POLL
    • Indentation in source code files
    • When creating or modifying source code files (e.g. *.c, *.h,
    • *.js, *.py, *.pl, *.html), do you indent (and save the files)
    • with tab (horizontal tab, ASCII 9) characters or spaces?
    • 1) Spaces
      28
    • 2) Tabs
      45
    •  
      You cannot vote on this poll.
  • From Mro@BBSESINF to Digital Man on Thursday, August 24, 2017 16:18:15
    Re: Indentation in source code files
    By: Digital Man to on Thu Aug 24 2017 01:00 pm

    When creating or modifying source code files (e.g. *.c, *.h,
    *.js, *.py, *.pl, *.html), do you indent (and save the files)
    with tab (horizontal tab, ASCII 9) characters or spaces?

    1: Spaces
    2: Tabs

    INDENTING IS FOR POOFS
    ---
    ■ Synchronet ■ ::: BBSES.info - free BBS services :::
  • From jagossel@KK4QBN to Digital Man on Thursday, August 24, 2017 21:42:57
    Re: Indentation in source code files
    By: Digital Man to on Thu Aug 24 2017 13:00:04

    When creating or modifying source code files (e.g. *.c, *.h,
    *.js, *.py, *.pl, *.html), do you indent (and save the files)
    with tab (horizontal tab, ASCII 9) characters or spaces?

    1: Spaces
    2: Tabs

    Very hard to choose... Where I work, the ABSOLUTE coding standard is tabs, amd that is taken very seriously.

    However, my personal preference is 2 spaces.

    -jag
    Code it, script it, automate it!

    ---
    * Synchronet * KK4QBN - kk4qbn.synchro.net - 7064229538 - Chatsworth GA USA
  • From Nightfox@DIGDIST to jagossel on Friday, August 25, 2017 11:25:49
    Re: Indentation in source code files
    By: jagossel to Digital Man on Thu Aug 24 2017 09:42 pm

    Very hard to choose... Where I work, the ABSOLUTE coding standard is tabs, amd that is taken very seriously.

    However, my personal preference is 2 spaces.

    My workplace doesn't have a policy on it, but I tend to use tabs. For my personal projects, I used to indent with spaces (I usually used 3 spaces), but I've started using tabs. It seems easier to be consistent when using tabs, and also with tabs, editors often give you the option on how much space it will use to represent a tab. For my Synchronet scripts/mods, I used to use Notepad2 (in Windows) to edit them, and eventually switched to Notepad++. Notepad++ made it more obvious that indentation was inconsistent in many places - Some code had a mixture of tabs and spaces, which was hard to tell with Notepad2 because they looked similar and the indentation looked good with Notepad2.

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com
  • From jagossel@DIGDIST to Nightfox on Friday, August 25, 2017 14:09:27
    Re: Indentation in source code files
    By: Nightfox to jagossel on Fri Aug 25 2017 11:25 am

    Very hard to choose... Where I work, the ABSOLUTE coding standard is ta
    bs,
    amd that is taken very seriously.

    However, my personal preference is 2 spaces.

    My workplace doesn't have a policy on it, but I tend to use tabs. For my personal projects, I used to indent with spaces (I usually used 3 spaces), b
    ut
    I've started using tabs. It seems easier to be consistent when using tabs,
    and
    also with tabs, editors often give you the option on how much space it will
    use
    to represent a tab. For my Synchronet scripts/mods, I used to use Notepad2
    (in
    Windows) to edit them, and eventually switched to Notepad++. Notepad++ made
    it
    more obvious that indentation was inconsistent in many places - Some code ha
    d a
    mixture of tabs and spaces, which was hard to tell with Notepad2 because the
    y
    looked similar and the indentation looked good with Notepad2.

    The tab width preferemce was the exact argument made why it's an absolute coding standard where I work, and it does work really well in that aspect,
    and the 2-spaces standard is left over feom when I was programming for fun in QBasic while I was in high school (probably just datdd myself by saying that :D); and I think it's a standard from Code Guide (I forget the exact name).

    You can view whitespace characters in any decent text editor and IDEs. In Notepad++, I forget where it is. WinMerge has that option as well.

    -jag
    Code it... Script it... Automate it!

    ---
    ■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com
  • From Vk3jed@FREEWAY to jagossel on Saturday, August 26, 2017 08:20:00
    jagossel wrote to Digital Man <=-

    Very hard to choose... Where I work, the ABSOLUTE coding standard is
    tabs, amd that is taken very seriously.

    Interesting.

    However, my personal preference is 2 spaces.

    I like 2 spaces for indents as well. Looks "right".


    ... Elvis has left the echo.
    --- MultiMail/Win32 v0.49
    ■ Synchronet ■ Freeway BBS in Bendigo, Australia.
  • From Ragnarok@DOCKSUD to Digital Man on Tuesday, September 26, 2017 10:41:52
    El 24/08/17 a las 17:00, Digital Man escribi≤:
    When creating or modifying source code files (e.g. *.c, *.h,
    *.js, *.py, *.pl, *.html), do you indent (and save the files)
    with tab (horizontal tab, ASCII 9) characters or spaces?

    1: Spaces
    2: Tabs

    spaces forever

    ---
    ■ Synchronet ■ Dock Sud BBS TLD 24 HS - http://www.docksud.com.ar - telnet://bbs.docksud.com.ar
  • From Digital Man to Ragnarok on Tuesday, September 26, 2017 11:23:22
    Re: Re: Indentation in source code files
    By: Ragnarok to Digital Man on Tue Sep 26 2017 10:41 am

    El 24/08/17 a las 17:00, Digital Man escribi≤:
    When creating or modifying source code files (e.g. *.c, *.h,
    *.js, *.py, *.pl, *.html), do you indent (and save the files)
    with tab (horizontal tab, ASCII 9) characters or spaces?

    1: Spaces
    2: Tabs

    spaces forever

    You couldn't vote on the poll?

    digital man

    Synchronet "Real Fact" #34:
    The back-up synchro.net nameserver and CVS repository is hosted by Deuce. Norco, CA WX: 84.3°F, 19.0% humidity, 3 mph ESE wind, 0.00 inches rain/24hrs
  • From The Millionaire@PARKAVE to °#e[$Éö^░4Ö≈?╡Ω5≥{Σc%>─₧Σ on Wednesday, February 19, 2020 18:19:35
    Re: Indentation in source code files
    By: Digital Man to on Thu Aug 24 2017 01:00 pm


    ▲Éúá▄}↔'♂ܶ↑muV`Q76┬RàE% ‼Ö♦k1◄╥♠"╤ä♂⌐4█═@╤ «áü█â↔}FO╪]∞NôÖ╣╒âlª▄rL░╩╟├·ó±Θ╤ª₧▌▀┼siáÑG*:₧nΣü≡{┌8╙Σ?6BqqΘ∞▄┬L± v祲▓ i╪d4åC╖ÄC-≈ßΘ∩▌─▐*.╒m╧$âL☻aßp╙qå!·Q♠â3▌ô1¢ √Æ`╒Ç☻╥ Y╤ΘbHLΣ♂*$IHô╤¥i'▒-í≥1«4─↓╡&╟▒Åu▲#÷±▌ó$ The Millionaire $
    Park Avenue Place
    Surrey, B.C., Canada

    ---
    ■ Synchronet ■ Park Avenue Place - Surrey, B.c., Canada
  • From Nightfox@DIGDIST to The Millionaire on Wednesday, February 19, 2020 21:14:24
    Re: Indentation in source code H#9
    By: The Millionaire to °#e[$Éö^▒4Ö≈?╡Ω5≥{Σc%>─₧Σ on Wed Feb 19 2020 06:19 pm

    yeahhh.... If you could refrain from posting binary data, that would be great. https://www.austinchronicle.com/binary/9ef6/screens_feature3-1.jpg

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com