Intel's Ronler Acres Plant

Silicon Forest
If the type is too small, Ctrl+ is your friend

Friday, May 15, 2015

Tabs Versus Spaces

Facit typewriter tab stop rack
I've been writing more C language computer code recently, so I'm looking for a place to post it on the net. It would be nice to be getting paid for writing code, but like Mick says, we can't always get what we want. Since I'm only doing this for fun, I thought I should post it somewhere for people to see. Might prove useful, or possibly entertaining, which is probably more valuable these days.
     Wherever I post it needs to display it in a readable format, which means a fixed pitch font (no Times-Roman). Color coding would be nice, too. And we need to be able to do this without having to go through a bunch of contortions.
     Google Drive now seems to support C source files, and it seems to presume tabs are set to every 4 spaces. But it doesn't do color coding, at least not on Firefox and Linux (does it do color coding on my Chromebook? Maybe. The thumbnails appear to have color coding, but when I look at the file itself, no. Weird, man).
     Github does color coding, but it presumes tabs are set every 8 spaces, which every true believer knows is wrong (if you don't believe tabs should be set to every 4 spaces you are obviously a heretic and should probably be burned at the stake. Or maybe we'll just burn your coffee).
    Anyway, I'm experimenting using my Nicomedes program to start with. I used the Linux program expand to replace the tab characters with the appropriate number of spaces and pasted the resulting copy into Github. You should be able to see the file here.

Does anyone else remember when tabs used to be arbitrary? Back in the good old days, back when we had typewriters, tabs were set individually. There was no automatic every-so-many-spaces tab setting. If you wanted a tab at the 4th position, you spaced over 4 spaces and pressed the tab set key. If you wanted a tab at the 47 position, you spaced over 43 more spaces and pressed the tab set key. Now the first time you press the tab key you go to column 4, and the second time you press it you go all the way to column 47, which means the carriage picks up some speed on the way and arrives with a typewriter shaking thump. Which is how God intended for you to arrive at column 47.


3 comments:

eu4 console commands said...

Am I the only one who thinks that she pressed all the spaces in purpose to make Richard nervous? She works at FB it's obvious she knows she can automate that.

ark adobe ramp said...

He runs a software compression company? Then he should know that spaces and tabs can compress just about the same. And she should know that most IDEs let you use the Tab key to make multiple spaces.

carb cycling meal plan pdf said...

Am I the only one who thinks that she pressed all the spaces in purpose to make Richard nervous? She works at FB it's obvious she knows she can automate that.