Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror

Comment Re:Why put tabs in code anyway? (Score 0) 390

Spaces work better than tabs because the code is always formatted properly. Code that is formatted improperly does not do what you think it does. This matters a lot when you have projects developed by 200+ developers with multiple millions of LOC. It matters even more when you have 3000+ developers working on many such code bases and they move between said projects with high frequency.

You cannot have your indent be two and me with 8 and have the code line up properly, especially when lining up complex if or math statements (where you may be using the level of indent to help with showing how the parens or operators nest). While you could argue "then split into multiple statements", I could argue "it's actually more readable as is". Subjective is neat that way.

Files that are being constantly updated because someone doesn't like someone elses formatting is dumb. Have a standard, stick to it. Fire the offender who refuses to play ball, problem solved.

Who prints code? Fine, let's say you do. Modifying the number of spaces per tab causes the issue I pointed out at phase 1.

Relationship argument makes no sense to me, sorry. Where the code lines up is what matters to me, not how many invisible characters appear between the beginning of the line and the first character.

Microsoft

Visual Studio 2010 Forces Tab Indenting 390

An anonymous reader writes "For years, Microsoft has allowed Visual Studio users to define arbitrary tab widths, often to the dismay of those viewing the resultant code in other editors. With VS 2010, it appears that they have taken the next step of forcing tab width to be the same as the indent size in code. Two-space tabs anyone?"

Comment Always... (Score 5, Insightful) 278

It's a little shortsighted to use "always" to describe the web's winning streak for two reasons:

1) The web has not always won. Despite Google's Office suite, Microsoft continues to dominate the office space and will continue to do so for the foreseeable future. So at least in one market, thick clients have continued to win out over thin clients.

2) The web is just not that old. Claiming that the web will win because it has always won is a weak appeal to tradition made especially weak by the fact that the web is realistically 13-15 years old.

Comment Re:great for publishers? (Score 0, Offtopic) 155

Here's my slightly offtopic rant for you slashdotters that think it's funny or clever to replace an 's' with a dollar sign.

I get it. You think that the entity being referred to is greedy. Here's what you don't seem to get. It's childish, and it does one of three things:

1) It gives the impression that your rhetoric wouldn't be strong enough to stand on its own--therefore you need a gimmick to ensure that people really get your message.
2) It's unrelated to your rhetoric, and therefore distracting from your overall message.
3) It makes you seem to be an uninformed, out of touch individual who has no concept of how things work in the real world.

I'm going to offer a bit of free advice, whether you want it or not. Spelling and presentation matter. And do you know why they matter? They matter because you're trying to convey a message. Your readers and listeners only have so much concentration they can or will devote to understanding your message. If we have to spend effort translating your spelling or grammatical errors, or we have to perform in-place symbol substitution, that is distracting us from the point you are trying to make. Do yourself a favor, and give up on these childish devices.

Here's a short list of the slashdotisms that need to die:

- Substituting '$' for 's'
- ^H (acceptable for Funny posts only)
- Calling Microsoft employees or users Microserfs

Comment Re:It's not about the learning curve. (Score 1) 578

I can express this easily in python as well, and honestly given reasonable functions in C/C++, I could do so there. A lot of complexity in code is entirely dependent on how clearly you decide to make your code, and where you decide to provide helper functions.

For example, I'd probably do something like this in python:


for item in filter(lambda x: x.Checked, styleMenu):
    if item.Style not in currentFont.ProvidedStyles:
        item.Checked = false

Contrary to what a lot of purists say, I disagree that syntax is unimportant. I think it's very important. But I also think that where the syntax of a language fails you, you can (typically) make up a lot by writing helpful functions. For example, here's a stab at this in C++. Please forgive my early adoption of the auto keyword, I agree that the syntax of iterating over containers in stl is pretty verbose.

if (currentFont) {
    auto items = styleMenu.items();
    for (auto it = items.begin(); it != items.end(); ++it) {
        if (!it->IsChecked()) continue;
        if (!currentFont->ProvidesStyle(it->Style)) {
            it->SetChecked(false);
        }
    }
}

Language choice definitely matters, and many new languages offer high level abstractions that just make coding easier and more productive. But old languages can, for some cost, be made more easily readable, too.

Slashdot Top Deals

Real programmers don't bring brown-bag lunches. If the vending machine doesn't sell it, they don't eat it. Vending machines don't sell quiche.

Working...