Hello guys. I built a simple voting app Tab vs Space.
I am using turso.tech (libsql) and Nuxt 3. I was planning to use websocket but it's just too complicated and just went with long-polling every 5 seconds to get the data and deploy it to cloudflare pages/worker.
There is no need to login and also no IP tracking. I use installation id and save it to cookies, so basically you can clear cookies to get a new installation id. I don't know a better way to get unique user without being "intrusive" but if you have a better idea please do give one.
You can check the source code here https://github.com/yunusefendi52/tab-vs-space
Thank you
This isn't word processing - everyone's IDE or environment is going to be different, from colour scheme to syntax highlighting to font size to font to line spacing to monitor DPI. Get over it and use tabs - you will not control how code looks on my screen(s).
Tabs.
Tabs let people make the indention level (2 or 4, or 8 for monsters) whatever they want. If you want tighter code you can make it 2 spaces, if you want to “space” things out you can go with 4.
Spaces make it way too easy to accidentally insert +/-1 space by accident. Now your indention is 1 or 3 spaces instead of 2 or 4.
Spaces encourage/allow non-standard indention for aesthetic reasons. It’s just too easy to say “well if I use 3 spaces here everything will line up nicely”. You hand yourself a massive footgun when you have spaces at your disposal to (ab)use.
I honestly don’t care about the file size difference but tabs win here as well.
Indention is important, in some languages it’s mandatory (looking at you Python) so why would you use anything but a special character to signify it? Why would you not use a flexible character that can be rendered according to a developer’s preference?
> Tabs are 8 characters, and thus indentations are also 8 characters. There are heretic movements that try to make indentations 4 (or even 2!) characters deep, and that is akin to trying to define the value of PI to be 3.
https://www.kernel.org/doc/html/v4.10/process/coding-style.h...
But I realize now that I rarely press tab or space when I indent. I find that most of the time, I am either leveraging auto indent, or using vim’s/IdeaVim’s >> and << commands to indent. At this point, I honestly have no idea if I’ve been using tabs or spaces in the last 6 or so years.