by yunusefendi52 on 7/6/24, 2:31 AM with 17 comments
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
by ilius2 on 7/6/24, 10:04 AM
by atmanactive on 7/6/24, 10:13 AM
by metaloha on 7/6/24, 2:12 PM
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).
by joshstrange on 7/6/24, 10:41 AM
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?
by withinboredom on 7/6/24, 3:07 PM
function stuff($a, $b, $c,
$d, $e, $f) {}
by alserio on 7/6/24, 8:08 AM
by hackpelican on 7/6/24, 12:45 PM
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.
by yunusefendi52 on 7/6/24, 11:41 AM
by 0xDeveloper on 7/6/24, 6:56 AM
by 0x073 on 7/6/24, 6:56 AM
by MrVandemar on 7/6/24, 2:40 AM
by extragood on 7/6/24, 7:56 AM