07-24-2019
02:34 AM
- last edited on
12-26-2024
03:55 PM
by
Content Cleaner
@armmic wrote:
Yes, SCC has got to be top of my list. In our R&D department we are using GitLab for firmware source code - I've never used it myself (I've used Tortoise SVN in the past). Any experience of GitLab with LabVIEW? - Pros and Cons etc?
Git is perfectly OK... It has added functionality over SVN, biggest one is that you have full repo access (commit, revert, etc.) even when you're not connected.
You can use TortoiseSVN with Git (Git is a SVN client), if you want a slow transition.
I see Git as a step forward (over SVN). HG\mercurial is completely different, being a non-centralized SCC system. So you'd have only local repo's, and a branch is a copy... Git would also replace this functionality, as it does support local repos. IMHO...
Make sure to mark lv files as binary in Git, or Git will merge on occasion:
Also:
configuring-hg-or-git-to-use-labview-compare-and-labview-merge
tutorial-getting-started-with-git-github-and-tortoise-git
07-24-2019 07:47 AM
I have an extensive archive of everything I've done for the last 15 years. I rarely go back to any of it. Why would I want to inherit someone else's stuff?
Source control and organize everything that is current and working FIRST. Go with what you know. As time permits just glance over the old stuff and move it to an archive and forget about it. You can do that between sips of coffee.
07-24-2019 08:25 AM
@PaulG. wrote:
Why would I want to inherit someone else's stuff?
Nobody in their right mind wants to, but it's not always optional.
Of course when you all work with the same standards, it doesn't need to be too bad to inherit something.
07-24-2019 11:34 AM
Here is an old, but relevant post from Joel on Software:
https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/
07-24-2019 11:44 AM
@armmic wrote:
Yes, SCC has got to be top of my list. In our R&D department we are using GitLab for firmware source code - I've never used it myself (I've used Tortoise SVN in the past). Any experience of GitLab with LabVIEW? - Pros and Cons etc?
We are running our own gitlab-server and have no issues with LabVIEW.
We also made up a toolkit git4G to make it easier to connect to a git repository directly from the project explorer of LabVIEW.
Regards
07-24-2019 12:07 PM
@Gregory wrote:
Here is an old, but relevant post from Joel on Software:
https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/
I think it's only dangerous if your ego is bigger than your brain. And Joel is making an even more dangerous mistake, and that is to generalize too much.
07-24-2019 12:23 PM
@billko wrote:
@Gregory wrote:
Here is an old, but relevant post from Joel on Software:
https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/
I think it's only dangerous if your ego is bigger than your brain. And Joel is making an even more dangerous mistake, and that is to generalize too much.
Well, even if you disagree with the tagline, there are still some great nuggets from that article:
"There’s a subtle reason that programmers always want to throw away the code and start over. The reason is that they think the old code is a mess. And here is the interesting observation: they are probably wrong.The reason that they think the old code is a mess is because of a cardinal, fundamental law of programming: It’s harder to read code than to write it."
"The idea that new code is better than old is patently absurd. Old code has been used. It has been tested. Lots of bugs have been found, and they’ve been fixed."
07-24-2019 01:12 PM
@Gregory wrote:
@billko wrote:
@Gregory wrote:
Here is an old, but relevant post from Joel on Software:
https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/
I think it's only dangerous if your ego is bigger than your brain. And Joel is making an even more dangerous mistake, and that is to generalize too much.
Well, even if you disagree with the tagline, there are still some great nuggets from that article:
"There’s a subtle reason that programmers always want to throw away the code and start over. The reason is that they think the old code is a mess. And here is the interesting observation: they are probably wrong.The reason that they think the old code is a mess is because of a cardinal, fundamental law of programming: It’s harder to read code than to write it."
"The idea that new code is better than old is patently absurd. Old code has been used. It has been tested. Lots of bugs have been found, and they’ve been fixed."
That's pretty much what I meant by "ego bigger than brain". If your brain is sufficiently larger than your ego (which is not as common as you would hope), you can recognize whether or not the code is actually in need of a rewrite. I'm a big fan of "don't fix what's not broke" - but at the same time, you have to realize when something actually is broke(n).
07-24-2019 01:15 PM
So many times I have said, "Man, that code is ugly and likely full of bugs, but it seems to work and no one's complaining."
07-25-2019 02:12 AM
@billko wrote:
So many times I have said, "Man, that code is ugly and likely full of bugs, but it seems to work and no one's complaining."
It's even worse when the customer decides the code should be rewritten.
"this code needs to be rewritten, to do exactly what it does now".
That's when the programmer's alarm bells should go off. It makes absolutely no sense to rewrite something that isn't broken. Only logic behind it must be that it is in fact broken.
This problem is harder that it seems at first. Not only do you need to rewrite a completely undocumented program, the program itself isn't a specification at all, since it should in fact be 'improved'. At the grace of the customer, who gets to decide what the improvements are, and what the new bugs are.
Make an estimate for the rewrite, and multiply by 4...