Author Topic: Difference Checker for code  (Read 1677 times)

0 Members and 1 Guest are viewing this topic.

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2132
  • class keyThumper<T>:ILazy<T>
Difference Checker for code
« on: May 26, 2023, 06:41:51 PM »
Saw a reference to this in an on-line course.
An online  difference checker . . . in case you don't have a professional one on your machine.
Free web version suitable for any text based files . . . other file types checking available in paid version

https://www.diffchecker.com/



Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8691
  • AKA Daniel
Re: Difference Checker for code
« Reply #1 on: May 26, 2023, 07:44:07 PM »
I use winMerge, hoping for a dark theme, but it works well

danAllen

  • Newt
  • Posts: 133
Re: Difference Checker for code
« Reply #2 on: May 26, 2023, 09:04:04 PM »
I use BeyondCompare. Also use for backup scripts, uploading to SFTP, organizing downloading camera photo downloads and skipping duplicates, archiving project files to zip after major issue/submittals. Have had a license since 2002, could not live (on a computer) without
https://www.scootersoftware.com/

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2132
  • class keyThumper<T>:ILazy<T>
Re: Difference Checker for code
« Reply #3 on: May 26, 2023, 10:38:57 PM »
Each editor I use has a file comparer built in , except VS, so I use an extension for that,
https://marketplace.visualstudio.com/items?itemName=MadsKristensen.FileDiffer

I also have a stand alone UltraCompare  ( by the guys who wrote UltraEdit ) I use for VLisp & odd files.

The comparer in the JetBrains products is excellent ( Rider, WebStorm, PyCharn, etc )

I don't mind WinMerge either , but since getting GitKraken for Git Version Control I've been using their GitKraken built-in Client

Great for those 'WTF did I/they change' moments.
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

JohnK

  • Administrator
  • Seagull
  • Posts: 10626
Re: Difference Checker for code
« Reply #4 on: May 26, 2023, 10:43:33 PM »
Nice. I did not know there was a web verion(s) for DIFFing.

A few additions to the developing list of tools here (sorry, not really a graphical guy, so these will be command line versions):

1. In windows there is a tool called File Compare (I have never used it though).
https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/fc

2. There is also the gnu win32 diff tool (no need to "install" just get the Binary and the Dependencies zip files and unpack to a directory in your Windows enviopment path).
https://gnuwin32.sourceforge.net/packages/diffutils.htm

3. Git includes a copy of the gnu diff tool as well for the "git diff <file>" command (if you use Git).
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2132
  • class keyThumper<T>:ILazy<T>
Re: Difference Checker for code
« Reply #5 on: May 26, 2023, 10:46:52 PM »

A differ has been necessary since keyboards were invented, so it's not surprising that there are some good ones out there.
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

BIGAL

  • Swamp Rat
  • Posts: 1409
  • 40 + years of using Autocad
Re: Difference Checker for code
« Reply #6 on: May 26, 2023, 11:05:38 PM »
Another Notepad++, Compare is a function, use it to compare setvars say between 2 pc's and so on.
A man who never made a mistake never made anything

VovKa

  • Water Moccasin
  • Posts: 1629
  • Ukraine
Re: Difference Checker for code
« Reply #7 on: June 05, 2023, 09:18:19 AM »
i use Compare It https://grigsoft.com/wincmp3.htm
like it because it is extremely lightweight and supports custom highlight schemes https://www.contexteditor.org/highlighters/

mhupp

  • Bull Frog
  • Posts: 250

danAllen

  • Newt
  • Posts: 133
Re: Difference Checker for code
« Reply #9 on: June 07, 2023, 12:16:45 PM »
Reading the article on VS code compare, it does not have a code merge function to copy lines between files. As a commenter in that article said, Beyond Compare does. Example image below where the yellow arrows allow copying lines between. I assumed most code compare programs would do the same?

JohnK

  • Administrator
  • Seagull
  • Posts: 10626
Re: Difference Checker for code
« Reply #10 on: June 07, 2023, 12:51:37 PM »
<snip>Example image below where the yellow arrows allow copying lines between. I assumed most code compare programs would do the same?

I'v only used diff tools on the command line so I never knew this was a feature. I've always just had to copy-paste or retype. -i.e. It's just been a manual type of operation if I needed to revert (but then again, I use version control software and I revert that way so DIFFing was always just a way for me to see what has/will change and never a code tool).

How do you guys use your DIFF tool (and/or what is your development workflow)?
My coding workflow is roughly like this:
- make code.
- compile/test/run.
- commit code.
- add/fix code.
- compile/test/run.
- commit code.
- rise and repeat.

I use DIFF more for my commits then just fixing bugs.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

danAllen

  • Newt
  • Posts: 133
Re: Difference Checker for code
« Reply #11 on: June 07, 2023, 04:32:22 PM »
I only program for myself now, no commits. Only if I screw something up and need to compare to an archive do I use a compare. When I used to work in an office and manage some office lisps and some of my own, I would sometimes have a mess of files at work or at home, and use difference compare to merge files or update code as required. I would often be using a VPN using Beyond Compare to sync drawings & code between home & office as well.

Beyond Compare has a free 30 day trial, which is days of use not time period. So plenty of opportunities to try out. They also seem to have configuration with version control systems. https://www.scootersoftware.com/kb/vcs#gitwindows

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8691
  • AKA Daniel
Re: Difference Checker for code
« Reply #12 on: June 07, 2023, 06:18:41 PM »
I use some sort of version control for most every project.

Windiff can merge just fine…usually… it gets confused sometimes
I rarely use any of the merge features, usually just pluck out some function I committed then reverted
“oh wait… I needed that”   

I use diff as code review tool, just before I commit. I guess since it’s a different look than my editor,
and the changes are highlighted, it makes it easy to spot dumb stuff. I have a lot of those “oh wait..that's dumb” moments.



BIGAL

  • Swamp Rat
  • Posts: 1409
  • 40 + years of using Autocad
Re: Difference Checker for code
« Reply #13 on: June 07, 2023, 08:44:49 PM »
Like others how many versions of that Library code do I have as make a subtle edit to improve, try to find them all and keep only one.

Look at "Everything" great software throw away explorer looking for duplicates. It is just so slow finding files Everything is instant.
A man who never made a mistake never made anything

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2132
  • class keyThumper<T>:ILazy<T>
Re: Difference Checker for code
« Reply #14 on: June 08, 2023, 12:38:35 AM »
@danAllen,

BeyondCompare looks interesting.
I like their Clipboard Compare module.

If I was working for a living the price would be very attractive.

//-------------------------
@BigAl,
Yes, "Everything" is excellent.

//-------------------------
@JohnK,

I don't use a differ as part pf a regular workflow.
Mainly for the WTF moments , when one is indespensable.

//-------------------------

Speaking of tools :
I use a package called 'SyncBack' from https://www.2brightsparks.com/
Used it to do scheduled backups to a spare harddrive/computer.
Fully configurable.
They have a free version. https://www.2brightsparks.com/freeware/index.html

Really handy for backing up changed files each period ( say hour) and then doing a full backup of selected projects at night.
Creates timestamp-named folders to store the backups according to the config file.

Used it for .dwg , code, db , emails and data files.
 
Haven't used it much since I 'retired', but it was an arse saver more than once.

Having a differ to compare periodic saves with current files was really handy when finding out what went wrong.






Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.