search results matching tag: tab

» channel: weather

go advanced with your query
Search took 0.000 seconds

    Videos (70)     Sift Talk (87)     Blogs (9)     Comments (1000)   

Tabs v(ersu)s Spaces from Silicon Valley S3E6

gwiz665 says...

In a closed environment you should use what you agree on and stick to it. Whether it's tabs or spaces doesn't really matter, depending on what language/editors are in play. VIM vs Emacs is a waste of time, as professionals have to use something like Visual Studio anyway.

We use tabs.

Tabs v(ersu)s Spaces from Silicon Valley S3E6

Buttle says...

I have to disagree with this. If you're working with even a team of two, you have to edit someone else's source code, and tabs v spaces has to be agreed upon. There are a lot of other, more entertaining questions of formatting that have to be settled upon, not to mention how to name things: CamelCase versus under_scores.

Any halfway competent programmer figures out the local standards by observation and follows them. Anything else is an indication that she just doesn't give a shit about getting along with co-developers.

MilkmanDan said:

Basically, I think that tabs vs spaces is completely a personal preference issue if you're working alone OR on a small team that don't interact with each other's code much. And even on a large team, either choice is fine BUT it becomes important to conform to the standards of the team as a whole.

Tabs v(ersu)s Spaces from Silicon Valley S3E6

ChaosEngine says...

Oh, it's on! If you don't indent your code, you are like Hitler multiplied by Trump.

Anyway, to clear up any remaining confusion:

1. In theory, use whatever the code base is already using. Having a tabs vs spaces fight is a pointless waste of time. In practice, anyone who uses tabs should be fired immediately.

2. No-one actually types out 4 spaces. You press the tab key and it inserts spaces for you. Either that or you are so incompetent at using your tools that you should be fired immediately.

There you go. The complete and definitive guide to tabs (you're fired) vs spaces (correct).

Not that I'm biased.

Jinx said:

I don't indent at all.

Fight me.

Tabs v(ersu)s Spaces from Silicon Valley S3E6

MilkmanDan says...

@lucky760 -
I still think Judge is actually presenting the situation pretty accurately. If you look up online forum posts about tabs vs spaces, the file size thing is brought up as a pro for tabs very regularly.

While it is technically true, you're right that it doesn't make much sense because the difference is *tiny*, so conforming to the standard of wherever you are working is vastly more important.

BUT, that doesn't stop individual programmers from being (irrationally) passionate in their preferences.

Another dynamic that is (correctly) displayed in the show in my opinion is the difference between a big corporate environment, working as an individual in a large team of programmers as compared with having a project that starts out as a the brainchild of one person and grows into a small team.

The show is about the latter. In that scenario, a programmer / software engineer ends up trying to also be a manager of a team, in spite of the fact that he isn't really built for it. In a big corporate environment, they are well aware that style issue conflicts can turn into big time wasters unless they set out guidelines clearly at the outset. But that sort of micro-managing is NOT what a pure engineer type is comfortable doing.

Basically, I think that tabs vs spaces is completely a personal preference issue if you're working alone OR on a small team that don't interact with each other's code much. And even on a large team, either choice is fine BUT it becomes important to conform to the standards of the team as a whole.

Tabs v(ersu)s Spaces from Silicon Valley S3E6

lucky760 says...

https://stackoverflow.blog/2017/06/15/developers-use-spaces-make-money-use-tabs/

Was just having this discussion the other day.

It's one of the very rare things where a Mike Judge product doesn't make much sense [unintentionally].

It's nonsensical argue for a smaller file size. But on the other side of the coin, it screws everyone else up if you use tabs because then whenever other developers open the file and they [rightly] use spaces, they're screwed.

Anyway, check out that link I included above. The comparison between income of US developer and India developer is shocking.

Tabs v(ersu)s Spaces from Silicon Valley S3E6

Buttle says...

In my experience as a working programmer, tabs v spaces is a question of editor configuration, not typing. So, no, I don't believe he could hear it.

Conforming to the local convention on tabs v spaces isn't being anal, it's showing you want to keep your job. In particular, throwing in tabs where they are not expected results in unreadable hash.

MilkmanDan said:

I thought it was pretty clear in the show that he knew she was using spaces instead of tabs because of the sound of her repeatedly hitting the spacebar at the beginning of each line (which depending in your editor/IDE might be done automatically).

They are in a small environment, (loosely?) collaborating on code. He's anal about tabs vs spaces, and can tell that she's using the "wrong" one because of the repetitive (and annoying from his perspective) sound.

Put programmers together in a confined space, and they'll grate on each other over style issues / noise levels / music / whatever. I find the show extremely accurate in portraying the general atmosphere or feel of software development, if occasionally accenting or misportraying some details in the interest of making it good TV.

Tabs v(ersu)s Spaces from Silicon Valley S3E6

MilkmanDan says...

I thought it was pretty clear in the show that he knew she was using spaces instead of tabs because of the sound of her repeatedly hitting the spacebar at the beginning of each line (which depending in your editor/IDE might be done automatically).

They are in a small environment, (loosely?) collaborating on code. He's anal about tabs vs spaces, and can tell that she's using the "wrong" one because of the repetitive (and annoying from his perspective) sound.

Put programmers together in a confined space, and they'll grate on each other over style issues / noise levels / music / whatever. I find the show extremely accurate in portraying the general atmosphere or feel of software development, if occasionally accenting or misportraying some details in the interest of making it good TV.

Buttle said:

The film, however, makes no sense, because the only way you can find out about a fundamental disagreement on spaces v tabs is by opening someone else's file in your editor, and finding the indentation all messed up. It's not something you can tell by looking over a shoulder.

ant (Member Profile)

Tabs v(ersu)s Spaces from Silicon Valley S3E6

Buttle says...

It does have to do with writing code.

I have to deal with a source code repository that's full of tabs at work every day. Indentation for code may be composed of spaces and tabs, or spaces only. If tabs are present, then everyone working with the code has to use the same tab width setting, otherwise the indentation will be fubar.

If two people save edits using a different tab width setting, then there really is no way of fixing it up beyond auto-indenting it all and saving with a consistent tab setting.

The advantage of tabs is saving a few bytes on file size, which is completely undetectable in today's world of html email and xml everything.

The film, however, makes no sense, because the only way you can find out about a fundamental disagreement on spaces v tabs is by opening someone else's file in your editor, and finding the indentation all messed up. It's not something you can tell by looking over a shoulder.

The difference between emacs and vi, by the way, is that emacs has several good vi emulations, but it would be laughable to think of an emacs emulation in vi.

Emacs used to seem a completely outsized pig of a program, but in our modern times it's actually tiny. Still, you would expect a vi-champion to want tabs instead of spaces, not vice versa.

Not a lot of understanding displayed here, I'm afraid.

eric3579 said:

Don't think i've ever used a tab outside filling in a form or playing video games. Does the tab thing have more to do with writing code?

Tabs v(ersu)s Spaces from Silicon Valley S3E6

Tabs v(ersu)s Spaces from Silicon Valley S3E6

MilkmanDan says...

(**EDIT** hmm, code HTML tag doesn't seem to allow whitespace to show at the beginning of lines, so I'm replacing spaces with _underscores_ in the pseudocode below)

Code uses spaces or tabs to visually distinguish the flow of the program, what code belongs to what functions / loops / whatever.

Here's some C-style "pseudocode" that should get the idea across:

void function fizzbuzz {
__for (i = 1; i <= 100; i++) {
____set print_number to true;
____If i is divisible by 3
______print "Fizz";
______set print_number to false;
____If i is divisible by 5
______print "Buzz";
______set print_number to false;
____If print_number, print i;
____print a newline;
__}
}


The braces { } show the beginning and ending of a "function" (essentially one of potentially many self-contained algorithms in a program) and the beginning and ending of a "for loop" (that will repeat the code inside it some number of times). And the "if" statements will only perform the stuff after them IF the test they perform evaluates to true.

So in that pseudocode, there's sort of 4 tiers or things going on. First is the function (named "fizzbuzz"). Since functions are kind of the most basic structural unit of the code, they are on the far left -- not indented at all. Sorta like Roman Numerals in an outline.

Then, the actual content of that function (the code that makes up its algorithm) is set a consistent amount of space to the right to make it clear that it is contained inside the function. That can be done with *1* tab, or some consistent amount of spaces so that it lines up. The only thing in that tier is the "for loop" and the braces that show its beginning and end.

Then the content of the for loop is set a bit further to the right (with another space or another set number of spaces). All of the "if" statements are at that 3rd tier level, along with a bit more code at the beginning and end. Then, the actual content of the if statements is set one more tier to the right to help distinguish that it will only run IF the conditions are met.

That pseudocode uses spaces for all of the tiering -- 2 spaces per tier. I'm a tab person like the guy Richard in the video, because it seems easier to press tab once per tier than hitting the spacebar 2/3/4 times per tier. But it really is just a personal preference issue, because as he said in the video, by the time the code is compiled (turned into an executable file that the computer can run) the final result will be the same whether the programmer used spaces or tabs.

But like with many things, Silicon Valley really hits the nail on the head here. Programmers tend to be very set in their ways and anal about their style preferences for code. If we have to go through someone else's code that doesn't follow our style conventions exactly, it kinda tends to throw us out of whack. To make an analogy with something less nerdy, consider how annoying it can be when someone borrows your car and you have to adjust the seat / mirrors / radio stations etc. when you get back in.

eric3579 said:

Don't think i've ever used a tab outside filling in a form or playing video games. Does the tab thing have more to do with writing code?

Tabs v(ersu)s Spaces from Silicon Valley S3E6

eric3579 says...

Don't think i've ever used a tab outside filling in a form or playing video games. Does the tab thing have more to do with writing code?

Tabs v(ersu)s Spaces from Silicon Valley S3E6

CRS-11 | Landing aerial footage (4K available)

Esoog says...

Yes, you can allow full screen in the embed code. YT did change this recently to disallow fullscreen by default on embedded videos (I dont know why). To enable fullscreen, you need to click the "share" link on the video you want to share, then click the embed tab. There, you will get the full embed code that includes the important "allowfullscreen" attribute. When you include that, embedded videos on videosift (and elsewhere) will have the functional fullscreen button. I just tested this with a new video.

oritteropo said:

Is there really anything you can do to the embed to allow fullscreen on these? YT made a change that just disabled it by default for 60% of vids, and if there's a way to re-enable I'm interested.

Rethinking Nuclear Power

radx says...

If Hinkley Point C is any indication, you're not going to find someone to finance/build a nuclear power plant, not in a capitalist society.

It's a massive upfront investment that private entities are basically allergic to; it cannot be insured due to the massive damage caused if things go south on you, so you need the government to act as a backstop; the price you'd have to charge per MWh is humongous compared to solar/wind, so you need massive subsidies, and that's without the ridiculous amount of rent-seeking corporations insist on nowadays.

That, to me, sounds like private is out. Hinkley Point C is being built by EDF, aka the French state, and EDF is struggling not be dragged into the abys by Areva, after the EPR in Flamanville is nothing short of a financial disaster. And we're not even talking about the troubles they are in for having fudged the specifications on the pressure vessels of more than 20 French power plants. Cost-cutting measures, as always.

So, which capitalist state is going to pick up the tab? Any volunteers? Over here, we cannot even get bridges fixed before they collapse...

And to be honest, I'm not entirely sure I would want a profit-oriented enterprise or austerity-supporting government construct something like an NPP these days. Look at the construction sites at Flamanville and Olkiluoto, they are modern towers of Babylon, with subcontractors of subcontractors from 30 different countries working for povery wages. Anyone think either of these, should they ever be finished at all, will come even close to the safety standards layed out in their official plans?



Send this Article to a Friend



Separate multiple emails with a comma (,); limit 5 recipients






Your email has been sent successfully!

Manage this Video in Your Playlists