How many spaces is a tab in Java, Rust, C++, Python, C#, Powershell, Golang, Javascript

How many spaces is a tab in Java, Rust, C++, Python, C#, Powershell, Golang, Javascript

How many spaces is a tab in Java, Rust, C+, Python, C#, Powershell, Golang, etc.

A tab is not made out of spaces. It is a tab, whether in Java, Python, Rust, or generic text file editing. It is represented by a single Unicode character, U+0009.

It does not generally mean “insert this many spaces here” either. It means “put the cursor at the next closest tab stop in the line”. What that means exactly depends on the context. On an old typewriter I had, a tab key would advance the roller to the next column that was a multiple of 10

How many spaces is a tab in Java

That is pretty much the same function as the tab character does.

Just for reference, modern text editors have their tab stops set to either every 4 or every 8 characters. That doesn’t mean that 1 tab = 4/8 spaces, that means that putting in a tab will align the cursor with the next multiple of 4/8 columns

How many spaces is a tab in Java

In mainstream IDEs you can set the tab key to insert a desired number of spaces instead of a tab character.


 The concept of tab independent of space is rarely used these days. In any case, what the character represents is decoupled from what the key does is decoupled from what the screen shows.

In many IDEs, the tab character inserts the required number of spaces to advance to the next tab line. This is often a default.

I imagine it’s a compromise between tab loving extremists and space advocates. The ideal whitespace character is a subject of intense debate among programmers.


AI Unraveled: Demystifying Frequently Asked Questions on Artificial Intelligence (OpenAI, ChatGPT, Google Bard, Generative AI, Discriminative AI, xAI, LLMs, GPUs, Machine Learning, NLP, Promp Engineering)

Source: Quora

  • How to Give Up Sooner
    by /u/zeeedz (programming) on February 21, 2024 at 1:52 am

    submitted by /u/zeeedz [link] [comments]

  • Wo kann man Saxenda zur Gewichtsreduktion kaufen… (Liraglutid).:
    by Benz Hernandez (Programming on Medium) on February 21, 2024 at 1:08 am

    Titel: Gewichtsverlust mit Ozempic: Ein umfassender LeitfadenContinue reading on Medium »

  • The Role of a Software Engineer in the Modern Tech Industry
    by KASATA (Programming on Medium) on February 21, 2024 at 12:57 am

    Continue reading on Medium »

  • nahaa money Loan CUSTOMER Care Helpline Number⓿➎➋➒➏⓿➋⓵// 9608751671 // 7090175805 ✓✓/ contact…
    by Ksomusn (Programming on Medium) on February 21, 2024 at 12:52 am

    Continue reading on Medium »

  • nahaa money Loan CUSTOMER Care Helpline Number⓿➎➋➒➏⓿➋⓵// 9608751671 // 7090175805 ✓✓/ contact…
    by Ksomusn (Programming on Medium) on February 21, 2024 at 12:52 am

    Continue reading on Medium »

  • nahaa money Loan CUSTOMER Care Helpline Number⓿➎➋➒➏⓿➋⓵// 9608751671 // 7090175805 ✓✓/ contact…
    by Ksomusn (Programming on Medium) on February 21, 2024 at 12:52 am

    Continue reading on Medium »

  • nahaa money Loan CUSTOMER Care Helpline Number⓿➎➋➒➏⓿➋⓵// 9608751671 // 7090175805 ✓✓/ contact…
    by Ksomusn (Programming on Medium) on February 21, 2024 at 12:52 am

    Continue reading on Medium »

  • nahaa money Loan CUSTOMER Care Helpline Number⓿➎➋➒➏⓿➋⓵// 9608751671 // 7090175805 ✓✓/ contact…
    by Ksomusn (Programming on Medium) on February 21, 2024 at 12:51 am

    Continue reading on Medium »

  • nahaa money Loan CUSTOMER Care Helpline Number⓿➎➋➒➏⓿➋⓵// 9608751671 // 7090175805 ✓✓/ contact…
    by Ksomusn (Programming on Medium) on February 21, 2024 at 12:50 am

    Continue reading on Medium »

  • What PWA Can Do Today
    by /u/fagnerbrack (programming) on February 21, 2024 at 12:19 am

    submitted by /u/fagnerbrack [link] [comments]

  • Building a log search service for under $7/mo
    by /u/massus (programming) on February 21, 2024 at 12:10 am

    submitted by /u/massus [link] [comments]

  • Honey I shrunk the CPU! A CPU in just 76 LUTs (and a BRAM)
    by /u/howerj (programming) on February 20, 2024 at 11:40 pm

    submitted by /u/howerj [link] [comments]

  • Falsehoods Junior Developers believe about becoming Senior
    by /u/bndrz (programming) on February 20, 2024 at 9:41 pm

    submitted by /u/bndrz [link] [comments]

  • Writing good programming abstractions
    by /u/ketralnis (programming) on February 20, 2024 at 7:24 pm

    submitted by /u/ketralnis [link] [comments]

  • Testing Distributed Systems w/ Deterministic Simulation
    by /u/ketralnis (programming) on February 20, 2024 at 7:24 pm

    submitted by /u/ketralnis [link] [comments]

  • Floats Are Weird
    by /u/ketralnis (programming) on February 20, 2024 at 7:24 pm

    submitted by /u/ketralnis [link] [comments]

  • Hare is a systems programming language designed to be simple, stable, and robust: 0.24.0
    by /u/ketralnis (programming) on February 20, 2024 at 7:21 pm

    submitted by /u/ketralnis [link] [comments]

  • Questioning Go's range-over-func Proposal
    by /u/ketralnis (programming) on February 20, 2024 at 7:20 pm

    submitted by /u/ketralnis [link] [comments]

  • Planner programming blows my mind
    by /u/ketralnis (programming) on February 20, 2024 at 7:19 pm

    submitted by /u/ketralnis [link] [comments]

  • Discovering hard disk physical geometry through microbenchmarking
    by /u/ketralnis (programming) on February 20, 2024 at 7:18 pm

    submitted by /u/ketralnis [link] [comments]

  • A response to "Erlang – overhyped or underestimated"
    by /u/ketralnis (programming) on February 20, 2024 at 7:16 pm

    submitted by /u/ketralnis [link] [comments]

  • Let's Build the GPT Tokenizer (by Andrej Karpathy) [video]
    by /u/ketralnis (programming) on February 20, 2024 at 7:16 pm

    submitted by /u/ketralnis [link] [comments]

  • Fast memory vulnerabilities, written in 100% safe Rust
    by /u/ketralnis (programming) on February 20, 2024 at 7:15 pm

    submitted by /u/ketralnis [link] [comments]

  • Projected File System
    by /u/Chaoses_Ib (programming) on February 20, 2024 at 6:49 pm

    submitted by /u/Chaoses_Ib [link] [comments]

  • Bloom Filters
    by /u/BrewedDoritos (programming) on February 20, 2024 at 4:21 pm

    submitted by /u/BrewedDoritos [link] [comments]

  • 22 years later, YAML now has a media type
    by /u/pimterry (programming) on February 20, 2024 at 3:24 pm

    submitted by /u/pimterry [link] [comments]

  • Lunar Explorer - A deep dive into a 1987 computer game
    by /u/zeroone (programming) on February 20, 2024 at 1:56 pm

    submitted by /u/zeroone [link] [comments]

  • Vector databases & similarity search explained
    by /u/True_Hedgehog6990 (programming) on February 20, 2024 at 11:27 am

    submitted by /u/True_Hedgehog6990 [link] [comments]

  • The sad reality: Cybersecurity in Corporate Culture
    by /u/CorpFire (programming) on February 20, 2024 at 7:46 am

    submitted by /u/CorpFire [link] [comments]

  • Measuring energy usage: regular code vs. SIMD code
    by /u/Specialist_Disk_8087 (programming) on February 20, 2024 at 6:17 am

    submitted by /u/Specialist_Disk_8087 [link] [comments]

  • How Reddit Scaled to Millions of Decisions Per Second
    by /u/odd_sherlock (programming) on February 19, 2024 at 6:30 pm

    submitted by /u/odd_sherlock [link] [comments]

  • Building a 2FA app that tells you when you get `012345`
    by /u/jacobs-tech-tavern (programming) on February 19, 2024 at 5:28 pm

    submitted by /u/jacobs-tech-tavern [link] [comments]

  • How to be a -10x Engineer
    by /u/13steinj (programming) on February 19, 2024 at 5:24 pm

    submitted by /u/13steinj [link] [comments]

  • [META] The future of r/programming
    by /u/ketralnis (programming) on October 9, 2023 at 4:03 pm

    Hello fellow programs! tl;dr what should r/programming's rules be? And also a call for additional mods. We'll leave this stickied for a few days to gather feedback. Here are the broad categories of content that we see, along with whether they are currently allowed. ✅ means that it's currently allowed, 🚫 means that it's not currently allowed, ⚠️ means that we leave it up if it is already popular but if we catch it young in its life we do try to remove it early. ✅ Actual programming content. They probably have actual code in them. Language or library writeups, papers, technology descriptions. How an allocator works. How my new fancy allocator I just wrote works. How our startup built our Frobnicator, rocket ship emoji. For many years this was the only category of allowed content. ✅ Programming news. ChatGPT can write code. A big new CVE just dropped. Curl 8.01 released now with Coffee over IP support. ✅ Programmer career content. How to become a Staff engineer in 30 days. Habits of the best engineering managers. How to deal with your annoying coworkers, Jeff. ✅ Articles/news interesting to programmers but not about programming. Work from home is bullshit. Return to office is bullshit. There's a Steam sale on programming games. Terry Davis has died. How to SCRUMM. App Store commissions are going up. How to hire a more diverse development team. Interviewing programmers is broken. ⚠️ General technology news. Google buys its last competitor. A self driving car hit a pedestrian. Twitter is collapsing. Oculus accidentally showed your grandmother a penis. Github sued when Copilot produces the complete works of Harry Potter in a code comment. Meta cancels work from home. Gnome dropped a feature I like. How to run Stable Diffusion to generate pictures of, uh, cats, yeah it's definitely just for cats. A bitcoin VR metaversed my AI and now my app store is mobile social local. 🚫 Politics. The Pirate Party is winning in Sweden. Please vote for net neutrality. Big Tech is being sued in Europe for gestures broadly. 🚫 Gossip. Richard Stallman switches to Windows. Elon Musk farted. Linus Torvalds was a poopy-head on a mailing list. Grace Hopper Conference is now 60% male. The People's Rust Foundation is arguing with the Rust Foundation For The People. Terraform has been forked into Terra and Form. Stack Overflow sucks now. Stack Overflow is good actually. ✅ Demos with code. I wrote a game, here it is on GitHub 🚫 Demos without code. I wrote a game, come buy it! Please give me feedback on my startup (totally not an ad nosirree). I stayed up all night writing a commercial text editor, here's the pricing page. I made a DALL-E image generator. I made the fifteenth animation of A* this week, here's a GIF. 🚫 AskReddit type forum questions. What's your favourite programming language? Tabs or spaces? Does anyone else hate it when. 🚫 Support questions. How do I write a web crawler? How do I get into programming? Where's my missing semicolon? Please do this obvious homework problem for me. Personally I feel very strongly about not allowing these because they'd quickly drown out all of the actual content I come to see, and there are already much more effective places to get them answered anyway. In real life the quality of the ones that we see is also universally very low. 🚫 Surveys and 🚫 Job postings and anything else that is looking to extract value from a place a lot of programmers hang out without contributing anything itself. 🚫 Meta posts. DAE think r/programming sucks? Why did you remove my post? Why did you ban this user that is totes not me I swear I'm just asking questions. Except this meta post. This one is okay because I'm a tyrant that the rules don't apply to (I assume you are saying about me to yourself right now). 🚫 Images, memes, anything low-effort or low-content. Thankfully we very rarely see any of this so there's not much to remove but like support questions once you have a few of these they tend to totally take over because it's easier to make a meme than to write a paper and also easier to vote on a meme than to read a paper. ⚠️ Posts that we'd normally allow but that are obviously, unquestioningly super low quality like blogspam copy-pasted onto a site with a bazillion ads. It has to be pretty bad before we remove it and even then sometimes these are the first post to get traction about a news event so we leave them up if they're the best discussion going on about the news event. There's a lot of grey area here with CVE announcements in particular: there are a lot of spammy security "blogs" that syndicate stories like this. ⚠️ Posts that are duplicates of other posts or the same news event. We leave up either the first one or the healthiest discussion. ⚠️ Posts where the title editorialises too heavily or especially is a lie or conspiracy theory. Comments are only very loosely moderated and it's mostly 🚫 Bots of any kind (Beep boop you misspelled misspelled!) and 🚫 Incivility (You idiot, everybody knows that my favourite toy is better than your favourite toy.) However the number of obvious GPT comment bots is rising and will quickly become untenable for the number of active moderators we have. There are some topics such as Code of Conduct arguments within projects that I don't know where to place where we've been doing a civility check on the comments thread and using that to make the decision. Similarly some straddle the line (a link to a StackOverflow post asking for help and the reddit OP is the StackOverflow OP, but there's a lot of technical content and the reddit discussion is healthy). And even most 🚫s above are left up if there's a healthy discussion going already by the time we see it. So what now? We need to decide what r/programming should be about and we need to write those rules down so that mods can consistently apply them. The rules as written are pretty vague and the way we're moderating in practise is only loosely connected to them. We're looking for feedback on what kind of place r/programming should be so tell us below. We need additional mods. If you're interested in helping moderate please post below, saying why you'd be a good mod and what you'd would change about the space if you were. You don't need to be a moderator elsewhere but please do mention it if you are and what we could learn on r/programming that you already know. Currently I think I'm the only one going down the new page every morning and removing the rule-breaking posts. (Today these are mostly "how do I program computer" or "can somebody help me fix my printer", and obvious spam.) This results in a lot of threads complaining about the moderation quality and, well, it's not wrong. I'm not rigorously watching the mod queue and I'm not trawling comments threads looking for bad actors unless I'm in that thread anyway and I don't use reddit every single day. So if we want it to be better we'll need more human power. FAQ: Why do we need moderation at all? Can't the votes just do it? We know there is demand for unmoderated spaces in the world, but r/programming isn't that space. This is our theory on why keeping the subreddit on topic is important: Forums have the interesting property that whatever is on the front page today is what will be on the front page tomorrow. When a user comes to the site and sees a set of content, they believe that that's what this website is about. If they like it they'll stay and contribute that kind of content and if they don't like it they won't stay, leaving only the people that liked the content they saw yesterday. So the seed content is important and keeping things on topic is important. If you like r/programming then you need moderation to keep it the way that you like it (or make it be the place you wish it were) because otherwise entropic drift will make it be a different place. And once you have moderation it's going to have a subjective component, that's just the nature of it. Because of the way reddit works, on a light news day r/programming doesn't get enough daily content for articles to meaningfully compete with each other. Towards the end of the day if I post something to r/programming it will immediately go to the front page of all r/programming subscribers. So while it's true that sub-par and rule-breaking posts already do most of their damage before the mods even see them, the whole theory of posts competing via votes alone doesn't really work in a lower-volume subreddit. Because of the mechanics of moderation it's not really possible to allow the subreddit to be say 5% support questions. Even if we wanted to allow it to be a small amount of the conten, the individuals whose content was removed would experience and perceive this as a punitive action against them. That means that any category we allow could theoretically completely take over r/programming (like the career posts from last week) so we should only allow types of content that we'd be okay with taking it over. Personally my dream is for r/programming to be the place with the highest quality programming content, where I can go to read something interesting and learn something new every day. That dream is at odds with allowing every piece of blogspam and "10 ways to convince your boss to give you a raise, #2 will get you fired!" submitted by /u/ketralnis [link] [comments]

error: Content is protected !!