Is this candidate a genius or a potential disaster?
-
@Dragoon And Makefiles.
-
@wft said in Is this candidate a genius or a potential disaster?:
@blakeyrat You see, I dunno how it's with other VCSes, but git has "blame" and "annotate", which allow me to see, on each line, who changed it last, when, and in which commit.
We don't, as a company, use "blame" and I personally think it's a fucking terrible idea. Maybe if it were named, "who can explain this function to me".
If you have bad code, that means it's gone through code review. If it's gone through code review and nobody caught it before it was merged, then it's everybody's bad code. It doesn't matter who originated it.
I check history occasionally, especially in "this worked before we cut the 5.4 release, what changed?" type of investigations, but I wish there were a way to see history without having names attached to the commits.
@wft said in Is this candidate a genius or a potential disaster?:
Also, including unrelated code into a commit makes cherry-picking commits hard as fuck, but that's another story.
I just always merge instead of "cherry pick".
@Dragoon said in Is this candidate a genius or a potential disaster?:
@Adynathos Python
Then find a Python diff tool smart enough to know which whitespace changes are significant and which are not. My premise here is: if this is a problem, it's because your tools are shitty. Find better tools.
@wft said in Is this candidate a genius or a potential disaster?:
@Dragoon And Makefiles.
Don't use shitty tools. Find better tools.
-
@blakeyrat He was arguing that white space isn't change, I was merely contending that it can constitute change. Also, if you know of a tool that understands Unibasic let me know, I am all ears.
-
@Adynathos said in Is this candidate a genius or a potential disaster?:
The point is that whitespace change is not change
Git doesn't think so.
Ever since I joined here, we're had check-out-as-is-commit-as-is as our default. Which with Visual Studio and copy/paste totally screws EOLs. I have to constantly check every commit to see if I accidentally changed a unix-style to windows-style EOL. (and we won't even talk about the files that now have mixed EOLs!) I basically have zero support to just change to unix-on-server-checkout-native style because it would hose blame.
(edit: yeahyeah, I know, shitty tools...)
-
@blakeyrat said in Is this candidate a genius or a potential disaster?:
Maybe if it were named, "who can explain this function to me".
You can be the Leonard of Quirm of naming, but "blame" takes far fewer keystrokes and thus wins. Everybody understands what it's about and doesn't make a fuss.
I know you have lots of bad qualities, I just keep hoping that being one of the little crowd that wants to rename "master/slave" into "leader/follower" all over the documentation is not one of them.
-
A quick check in git's help suggests
git blame -w
will ignore whitespace changes. A similar flag may exist in other non-shitty VCSes
-
@Dragoon said in Is this candidate a genius or a potential disaster?:
Also, if you know of a tool that understands Unibasic let me know, I am all ears.
If the tools suck, why are you using that language? You could have used C#.
-
Most of our programming languages are "shitty tools" in this regard, because they allow multiple representations of exactly the same program.
Advanced IDEs hide this problem by parsing, autoformatting and autocomplete.
But the problem is still there, and shows itself in those formatting standards or even wars, in the difficulties with version control etc.
Do we really need the ability to write syntactically invalid programs so much?
-
@blakeyrat I do use C#, it is what our client and middle tier are written in. The server however, is written in Unibasic.
-
@dcon said in Is this candidate a genius or a potential disaster?:
Ever since I joined here, we're had check-out-as-is-commit-as-is as our default. Which with Visual Studio and copy/paste totally screws EOLs. I have to constantly check every commit to see if I accidentally changed a unix-style to windows-style EOL.
There's a VS feature to check line-ending consistency when opening a file:
It appears to be on by default in 2015.
There doesn't appear to be an option to set Visual Studio to "use Unix-style line endings at all times" mode, but Git can be set to that anyway, so. I hate Git with a passion, and even I know that.
-
@blakeyrat said in Is this candidate a genius or a potential disaster?:
If you have bad code, that means it's gone through code review. If it's gone through code review and nobody caught it before it was merged, then it's everybody's bad code. It doesn't matter who originated it.
Whatever your view on who is at fault, when it was changed is important, because you should be able to link the commit back to however you track issues, so you can understand why it was changed, and maybe even learn that it isn't actually a bug introduced by that change, but that the reporter wants something different to happen. Or whatever.
-
@wft said in Is this candidate a genius or a potential disaster?:
You can be the Leonard of Quirm of naming,
I have no idea what the fuck that means.
@wft said in Is this candidate a genius or a potential disaster?:
but "blame" takes far fewer keystrokes and thus wins.
Right-clicking the selection of code and choosing "blame" from the pop-up menu takes zero keystrokes.
@wft said in Is this candidate a genius or a potential disaster?:
Everybody understands what it's about and doesn't make a fuss.
If people want to sling around blame, that's their prerogative. Our development team is more interested in creating a quality product.
@wft said in Is this candidate a genius or a potential disaster?:
I know you have lots of bad qualities, I just keep hoping that being one of the little crowd that wants to rename "master/slave" into "leader/follower" all over the documentation is not one of them.
We had a developer try to introduce "master/slave" terminology where it didn't previously exist; it didn't make it through code review.
-
@blakeyrat said in Is this candidate a genius or a potential disaster?:
There doesn't appear to be an option to set Visual Studio to "use Unix-style line endings at all times" mode, but Git can be set to that anyway, so. I hate Git with a passion, and even I know that.
Right, but we now have file that are unix-only, windows-only, and mixed. So enforcing anything will cause issues. I tried to fight the fight. Some things aren't worth it...
-
@Adynathos said in Is this candidate a genius or a potential disaster?:
Most of our programming languages are "shitty tools" in this regard, because they allow multiple representations of exactly the same program.
Right; and they do that because when you suggest saving a code file as something other than plain text, the people who love living in 1976 and hate change have heart attacks.
Why exactly is a C# class stored in a text file? Is there an actual reason other than "we've always done it that way"? Think of all the problems it would solve if the editor just saved the essence of the program without all the formatting distraction.
-
@blakeyrat said in Is this candidate a genius or a potential disaster?:
Right-clicking the selection of code and choosing "blame" from the pop-up menu takes zero keystrokes.
Sounds like you need a less shitty IDE. Like Eclipse, for instance:
-
@boomzilla said in Is this candidate a genius or a potential disaster?:
because you should be able to link the commit back to however you track issues,
Our commits require JIRA numbers. So that's taken care of.
Like I already said, I do check history/blame/whatever if I'm researching why something used to work correctly and no longer does. Our policy isn't to not use the feature; it's to not blame an individual for bad code.
-
@dcon said in Is this candidate a genius or a potential disaster?:
Right, but we now have file that are unix-only, windows-only, and mixed. So enforcing anything will cause issues. I tried to fight the fight. Some things aren't worth it...
Well if it makes you feel any better, Visual Studio doesn't give a shit and works fine with Unix-style endings, AFAICT. I believe there's an add-in you can download that tells it to use Unix-style all the time... here, try this one: http://www.grebulon.com/software/stripem.php
-
@boomzilla I don't know what "annotation" even is. That's not a Git feature.
But sure, if Eclipse does it better, than Eclipse does it better.
-
@blakeyrat said in Is this candidate a genius or a potential disaster?:
Think of all the problems it would solve if the editor just saved the essence of the program without all the formatting distraction.
That is exactly what I would like to use.
Maybe I will have some time to build something like that in the summer.
But the main problem is unfortunately adoption.
-
@Adynathos said in Is this candidate a genius or a potential disaster?:
But the main problem is unfortunately adoption.
You'll never get past the grumpy old people who'll bitch about "we've always done it this way". And since some of those grumpy old people are actually young people, like Ben L as an example, you'll never make any positive contribution to software development ever because this industry is fucking terrible.
Sorry.
-
@blakeyrat Depressing but true.
Still, maybe it is worth trying.
-
@blakeyrat said in Is this candidate a genius or a potential disaster?:
I don't know what "annotation" even is. That's not a Git feature.
Yes it is. In most systems I've seen
annotate
andblame
are synonyms. Looking it up in git, they basically are, though apparently there's some minor formatting differences there.The only difference between this command and git-blame(1) is that they use slightly different output formats, and this command exists only for backward compatibility to support existing scripts, and provide a more familiar command name for people coming from other SCM systems.
Not that I expect you to care.
-
@boomzilla "annotate" is a way better name than "blame". They should have standardized on it.
But that would have taken 36 milliseconds of thought about the user experience, and dammit that ain't gonna happen!
-
@blakeyrat Indeed. I know that at least for hg,
annotate
shows up in the list of commands andblame
is included as an alias. If fact,hg help blame
shows the help forannotate
.
-
@blakeyrat said in Is this candidate a genius or a potential disaster?:
just saved the essence of the program without all the formatting distraction.
This was actually done in the Commodore 64 era. Not sure why it didn't catch on.
-
@Jaime If you were all coding in Fixed-Format RPG, you wouldn't have this issue with unique coding styles
-
@blakeyrat said in Is this candidate a genius or a potential disaster?:
@Adynathos said in Is this candidate a genius or a potential disaster?:
Most of our programming languages are "shitty tools" in this regard, because they allow multiple representations of exactly the same program.
Right; and they do that because when you suggest saving a code file as something other than plain text, the people who love living in 1976 and hate change have heart attacks.
Why exactly is a C# class stored in a text file? Is there an actual reason other than "we've always done it that way"? Think of all the problems it would solve if the editor just saved the essence of the program without all the formatting distraction.
Well, Microsoft in fact didn't always do it that way. 30 years ago QuickBASIC used some kind of binary format for more efficient storage of source files.
That doesn't solve any problem, it only creates new problems. Such as not being able to edit or even view a file without installing the entire IDE, and not being able to have a mixed-language project in a single code repository with a working diff functionality.
-
@Jaime said in Is this candidate a genius or a potential disaster?:
This was actually done in the Commodore 64 era. Not sure why it didn't catch on.
87% sure HyperTalk did that too (when embedded in HyperCard stacks, at least. Not in AppleScript form.)
-
@Grunnen said in Is this candidate a genius or a potential disaster?:
That doesn't solve any problem,
Really?
Then why are people in this very thread bitching about whitespace and line-ending changes?
@Grunnen said in Is this candidate a genius or a potential disaster?:
Such as not being able to edit or even view a file without installing the entire IDE,
Why would you want to?
@Grunnen said in Is this candidate a genius or a potential disaster?:
and not being able to have a mixed-language project in a single code repository with a working diff functionality.
That's the source control software's problem. Source control software is, if you haven't figured this out by now, fucking awful. Even the ones that aren't designed by open source fans tend to be, at best, "barely tolerable".
The best revision tracking I've ever seen is the one in Microsoft Word. No programmer's source control tool has ever even come close.
-
@blakeyrat said in Is this candidate a genius or a potential disaster?:
@Grunnen said in Is this candidate a genius or a potential disaster?:
That doesn't solve any problem,
Really?
Then why are people in this very thread bitching about whitespace and line-ending changes?
I don't know. I'd guess that nowadays any text editor (except notepad.exe) can cope with all kinds of line endings and that version control should have the intelligence of not showing a line as "changed" when only the line ending changed.
Tabs vs spaces is something different. And technically it would be no problem to make, say, Visual Studio in such a way that it automatically converts any code block to single-tab-indentation. But apparently programmers are aesthetes so such a restrictive IDE would probably generate even more complaints than a coding style guide.
@Grunnen said in Is this candidate a genius or a potential disaster?:
and not being able to have a mixed-language project in a single code repository with a working diff functionality.
That's the source control software's problem. Source control software is, if you haven't figured this out by now, fucking awful. Even the ones that aren't designed by open source fans tend to be, at best, "barely tolerable".
The best revision tracking I've ever seen is the one in Microsoft Word. No programmer's source control tool has ever even come close.
Microsoft Word's version control is complete shit, because it doesn't act with other version control systems so you cannot track the changes of code and the changes of .docx-documentation in the same system.
For this reason alone I create the documentation at my work using TeX, so that all changes can be tracked by the same system.
-
@Grunnen said in Is this candidate a genius or a potential disaster?:
But apparently programmers are aesthetes so such a restrictive IDE would probably generate even more complaints than a coding style guide.
But that's the point.
The code STYLE is meta-data. It's not the same thing as the functional part of the code. The compiler doesn't give a shit.
So the part checked-in to source control should be the actual product, the stuff the compiler cares about, minus the style meta-data. Then every developer can use their own style meta-data as they want, and you never have to ever have a debate about tabs vs. spaces ever again in history ever.
The style is not part of the code. It's not part of the product. The fact that the tabs even exist in the file is solely due to human beings being able to read the file easier that way. It's meta-data, not data.
The only reason we store code in text files is "we've always done it that way". Well, that's a shitty reason to do anything.
@Grunnen said in Is this candidate a genius or a potential disaster?:
Microsoft Word's version control is complete shit, because it doesn't act with other version control systems so you cannot track the changes of code and the changes of .docx-documentation in the same system.
Because (and here's a trend you might notice) source control software is fucking awful. Quick question: Word supports plug-ins. Plug-ins can do whatever with the product; there's very little they can't do. So why doesn't Git have a Word plug-in? Why can't Git handle Word files? What's stopping it right now?
Nothing. Nothing except its shit developers who did a shitty half-job, declare the product "done", then ship it to unsuspecting customers.
-
@wft said in Is this candidate a genius or a potential disaster?:
I dunno how it's with other VCSes,
SVN and HG can both do the same thing. That's how BusFactor works.
-
This post is deleted!
-
@blakeyrat said in Is this candidate a genius or a potential disaster?:
The code STYLE is meta-data. It's not the same thing as the functional part of the code. The compiler doesn't give a shit.
So the part checked-in to source control should be the actual product, the stuff the compiler cares about, minus the style meta-data.Comments are meta-data. The compiler doesn't give a shit.
Descriptive identifiers are meta-data. The compiler doesn't give a shit.
-
@blakeyrat said in Is this candidate a genius or a potential disaster?:
@Grunnen said in Is this candidate a genius or a potential disaster?:
But apparently programmers are aesthetes so such a restrictive IDE would probably generate even more complaints than a coding style guide.
But that's the point.
The code STYLE is meta-data. It's not the same thing as the functional part of the code. The compiler doesn't give a shit.
So the part checked-in to source control should be the actual product, the stuff the compiler cares about, minus the style meta-data. Then every developer can use their own style meta-data as they want, and you never have to ever have a debate about tabs vs. spaces ever again in history ever.
That's what a tab is for. The tab character is exactly this character for which every user can set the 'meta-data' in their personal preferences.
Yet some people insist on using spaces.
Because (and here's a trend you might notice) source control software is fucking awful. Quick question: Word supports plug-ins. Plug-ins can do whatever with the product; there's very little they can't do. So why doesn't Git have a Word plug-in? Why can't Git handle Word files? What's stopping it right now?
Nothing. Nothing except its shit developers who did a shitty half-job, declare the product "done", then ship it to unsuspecting customers.
Actually, Mercurial has a 'zip' plugin. It can unzip a docx file, store a diff for the resulting plain-text XML and return a compressed docx again when doing a checkout.
I'm a bit wary still. Is it robust and will it not break when connecting Mercurial to git or SVN? Also, it isn't officially supported by MS.
-
@anotherusername said in Is this candidate a genius or a potential disaster?:
Comments are meta-data. The compiler doesn't give a shit.
Correct.
@anotherusername said in Is this candidate a genius or a potential disaster?:
Descriptive identifiers are meta-data. The compiler doesn't give a shit.
Also correct.
Were you trying to make some sort of point? Maybe actually make it.
-
@blakeyrat I'm questioning the logic behind "throw away all the meta-data! the compiler doesn't care about it!"
Because at that point you might as well just be working with decompiled code. It might make perfect sense to the compiler, but it's nigh unintelligible to a human.
-
@anotherusername said in Is this candidate a genius or a potential disaster?:
@blakeyrat I'm questioning the logic behind "throw away all the meta-data! the compiler doesn't care about it!"
But I never said that. Once again, you're putting words into my mouth.
But you know what? This time I'm not going to bother. You're obviously not interested in having a discussion, so I won't bother having one either.
-
@blakeyrat you said that style information should all be thrown away just because it's meta-data. Whether other meta-data should also be thrown away because it's meta-data is a perfectly valid question to ask.
If not, then what makes style information "bad" meta-data, and comments "good" meta-data? Isn't it just your opinion?
-
I understand the principle that because certain people are really picky about whitespace and the tabs vs. spaces holy wars are completely pointless (as long as people are consistent is all I personally care about). Same goes for line-endings. I'd be perfectly fine with having source control ignore all that.
But that's as far as I'm willing to go. Other whitespace standards one may arbitrarily employ (e.g. putting 2 lines between the end of one function and the beginning of another, putting line breaks after X number of characters, putting the curly brace on the same line as the if vs not, etc.) should be stored in source control.
Otherwise, merging/diffing becomes way more complicated, it's impossible to tell someone else "look at line X of this file," and you're relying solely on your editor to format the code the way you want it.
-
@blakeyrat if you kill the whitespace and merge code based on the compiler's interpretation, then what happens to comments? I guess you make the source control try to move the comments around to keep them attached to the relevant code?
Also, if you're going to solve whitespace wars, you should solve curly brace wars at the same time.
-
@wft said in Is this candidate a genius or a potential disaster?:
...while having unit tests or not, 100% coverage, classes under 250 lines... you know, my teeth literally hurt as I enumerate this utterly insignificant shit! Oh gods. People, just get a fucking grip on reality. These are not even means to an end. These are means to means to an end. They are useful guidelines, but hell, don't put them on a fucking pedestal!
You might enjoy this article:
-
@fbmac said in Is this candidate a genius or a potential disaster?:
how many tentacles should a proper class have?
Just enough for a Japanese businessman to be able to jerk off to. No more.
-
@blakeyrat said in Is this candidate a genius or a potential disaster?:
All good companies I've worked for have a simple hiring policy: if you're on the fence about a candidate, say no. I've never seen that strategy go wrong.
That is a very succinct way to state a good policy.
Don't hire someone just to fill a position. You need sharp minds, not just warm bodies.
-
@Polygeekery said in Is this candidate a genius or a potential disaster?:
Don't hire someone just to fill a position. You need sharp minds, not just warm bodies.
Pretty sure we have some threads (probably in the Lounge) where management felt otherwise...
-
@Grunnen there's actually a very simple solution to that problem. Store the AST (abstract syntax tree) as a directory tree on the file system. Every tool you could think of knows how to work with data stored in directories.
-
@anotherusername said in Is this candidate a genius or a potential disaster?:
If not, then what makes style information "bad" meta-data, and comments "good" meta-data?
Comments express the ideas and knowledge of the author, they cannot be re-created by just looking at the executed parts of the code.
Formatting is just the visual arrangement of code and comments, can be easily derived from the code (also according to each user's preferences), so there is no need to store it.
If you have a vector-graphics image, there is no point putting a rasterized copy inside the file. Send the vector file and let the viewer decide the resolution to display it.
-
@Adynathos hey, don't give him the answers!
-
@Dragoon said in Is this candidate a genius or a potential disaster?:
Yeah, and than someone new comes in uses tabs instead of spaces, reformats the entire doc and does a commit. Now your diff is every single line and you have no idea what the hell they actually changed.
That'd be an entirely justifiable reason to switch them to requiring code reviews (preferably by the most pendantic asperger on staff) before merging any future commits to branches other than their own scratch space.
-
@Adynathos said in Is this candidate a genius or a potential disaster?:
Comments express the ideas and knowledge of the author, they cannot be re-created by just looking at the executed parts of the code.
In the best cases, yes. They're worthwhile because of that.
Unfortunately, lots of actual comments could be recreated by a small script because the author of them has nothing real to say. And much real code lacks comments when it really needs them (e.g., what format of identifier string are we supposed to put in this argument and why is it different from the format of identifier string that we feed into the other method with the subtly different name?) and that just makes me hate the authors' lives…