The right tool for the job
-
In our line of work, it is often necessary to share some changes in code. This task is so old and so well-solved that it’s usually a no issue. After all – there are tons of tools that can move changes to a file, from one computer to another.
But some organizations tend to be creative (and not in a good way). Let’s give an example: a file is in source control and someone made a change. How to distribute it?
- Commit, push and pull the change? – nah, it’s too trivial.
- Make and apply a patch? – patches are old school, who uses them anyway?
- Just send the file so the other party can make a diff themselves? – still not creative enough.
So, what to do? If you work in a certain Korean company you get Excel diffs! The rules are simple – column one is old line; column two is new line. Who cares if it’s not readable and no tool can handle it automatically. If you’re bored you’ll have fun for hours, instead of mere seconds, trying to apply a patch this way. You can’t get more creative than that!
-
I'm not capable of even beginning to understand the confused thought process that gave birth to this monstrosity.
-
Export to CSV, write a search and replace script and pray to God you have no two identical lines in your code?
-
Export to CSV, write a search and replace script and pray to God you have no two identical lines in your code?
Are there line numbers? If so, the above it very doable.
-
Export to CSV, write a search and replace script and pray to God you have no two identical lines in your code?
That and no conflicts (which there usually are).
-
@Maciejasjmj said:
Export to CSV, write a search and replace script and pray to God you have no two identical lines in your code?
Are there line numbers? If so, the above it very doable.
Line numbers will become fun if person A inserts a line, person B manipulates the original code and person A inserts his stuff first. :)
-
True, but at least it reduces your search space, for the initial search anyway. I mean, what are the chances there are identical pieces of code within, say, 10 lines...
Actually, forget it, given some of the code we've all seen, this is highly likely. Sigh...
-
Samsung's Tizen team strikes again?
I'm wondering even HOW they get anything done using methodologies like this; or they might have some Korean supremacy views and just intimidate the shit out of white developers on their teams.
-
Tell me you at least have a tool to generate Excel diffs, instead of maintaining them manually.
-
Fortunately (or not) we are on the receiving end.
-
So, you're saying, take a text file, split it line by line, and put each line in a row in an excel column?
How do you even... I mean... I guess you can copy-paste in excel to transform to/from text, but... how do you come up with this idea in first place?
-
Yup, that's how it looks like. I don't know who came up with that and why; nor do I want to know. I have seen too much of this kind of stuff to inquire about another.
I have seen the dark universe yawning
Where the black planets roll without aim,
Where they roll in their horror unheeded,
Without knowledge, or lustre, or name.
-
how do you come up with this idea in first place?
The Management has to be aware of all the changes!
There are commit logs...
ALL the changes!
Ok, there are diffs...
What is this, it's hard to read, do not understand! Can we get it in Excel?
.... ummm... Ok, sure?
Great! Send this over to the other team!
But... they can read diffs... and use automated tools...
Diffs are not approved by The Management. Only approved changes can be made. Send forth the Excels!
-
Yup, that's how it looks like.
Does that mean that the first column is the entire original file, and the second column is the entire new one, or have they taken it to the next level and left out rows that are common to both?
-
They left out common rows. There are just changed lines.
-
How do they deal with insertions and deletions?
-
I think I actually never have seen an insertion, and I don't think I want to. I'll ask my coworkers, tho.
-
Is it like one Excel file per file? Or do you get a single Excel workbook with a page for each file?
This is a fun, "try to come up with a WORSE way to do this" type of challenge.
-
This is a fun, "try to come up with a WORSE way to do this" type of challenge.
Umm, worse. Well, I suppose if we go to really contrived we can do something.
How about two Excel file per directory, one for the old state and one for the new, and have each refer to the other by cross-workbook name for computing the summary diffs at runtime? And have each directory always use the same filename for the before and after changes, so good luck looking at changes in multiple directories at once. Might as well have some VBA in there for integrating this all with a system for management approvals, just to tie everything together a bit more unpleasantly.
Actually, this makes me feel slightly nauseous just thinking about it.
-
How about two Excel file per directory, one for the old state and one for the new, and have each refer to the other by cross-workbook name for computing the summary diffs at runtime? And have each directory always use the same filename for the before and after changes, so good luck looking at changes in multiple directories at once. Might as well have some VBA in there for integrating this all with a system for management approvals, just to tie everything together a bit more unpleasantly.
-
This is a fun, "try to come up with a WORSE way to do this" type of challenge.
You could store stuff in an oracle database.
-
So if a file hasn't changed, would that be represented by an empty string or a NULL?
Filed under: Never gets old, Well, I guess it does, but that means people get annoyed by it, so more fun for me!
-
If a file hasn't changed, you don't store a new revision for it?
-
How else can you be sure the non-changing state was observed and recorded correctly?
-
Still not sure if a whoosh...
-
Oh, please, we have to explicitly note recognition of the
'' IS NULL
meme now?
-
And here I thought that the best tool for any purpose was @blakeyrat.
-
Actually, when I first reading this, I thought that they're using the "Change Tracking" function of Excel instead of 2 columns.
In that way, given we made the copied code into file one row per line, we can even have something resembles SourceSafe.
Not that I really think it's good idea, though.
[spoiler]How dare you have project that has more than 255 files![/spoiler]
-
How do they deal with insertions and deletions?
What I expect a project leader to answer on that question:
"Insert or delete? Are you insane?!? It will mess up all our line approval forms from the last 7 rounds of management meetings up to management level G5!No, only append, modify and comment-out are to be used. If you want to insert a line comment or change behavior, call a new function and append it.
Also, our code is perfect so this only happens weekly, deal with it."
-
This is a fun, "try to come up with a WORSE way to do this" type of challenge.
You print 3 copies of Codebase Change Report and write down all your changes by hand.
This gets sent to QA for code review. If approved (and signed), it's forwarded to HR, so they know how well you are working.
One copy stays there. Remaining two are sent to management.
Management keeps one copy, so they can check latest changes quickly, when making critical business decisions.
Last remaining copy is sent to developers to apply changes in their local codebases.When changes are made, CCR is signed by a PM and sent to archives.
-
Management keeps one copy, so they can check latest changes quickly and make amendments to support business objectives, when making critical business decisions.
Last remaining copy is sent with those amendments to developers to apply changes in their local codebases.Always room to add scope for someone pencilling in something crazy.
-
You forgot the part where the forms are placed on a wooden table to be photographed, the film sent to a one-hour photo place to be developed and printed, and once back in the office, the resulting photos scanned so the report can be mailed to whoever needs it.
-
You forgot the part where the forms are placed on a wooden table to be photographed, the film sent to a one-hour photo place to be developed and printed, and once back in the office, the resulting photos scanned so the report can be mailed to whoever needs it.
Well of course they are photographed. During annual digitalization of the archives. Duh.
Filed under: We live in digital age after all
-
Excel WTFs deserve their own category.
Today I just received this monstrosity of an Excel sheet. It included the two of the things which Excel sucks at and nothing else:
- Long URLs
- Images
They guy who did this was trying to explain their "we-need-a-CMS-but-don't-want-to-pay-so-we-put-shit-in-a-server-using-a-stupid-URL-pattern"
Oh, and the pattern is just magic:
var url = '${base}/${s}/${i}/${i}_and/${i}_and_${d}/${p}_${i}_and_${d}.jpg'; // generates: http://example.com/foo/bar/10/10_and/10_and_ios/1_and_10_and_ios.jpg
So I've got this 50x5 pages spreadsheet with a bunch of this and some images.
-
Last remaining copy is sent
with those amendmentsimmediately, while amendments are being made to developers to apply changes in their local codebases.No, no, no, you can't hold up development waiting on silly things like requirements or business objectives! You have to start right away. It's their own fault if they don't implement the changes you made at your desk after handing it off.
-
You print 3 copies of Codebase Change Report and write down all your changes by hand.
You know what, I became a little bit dead inside from reading this.
-
No, no, no, you can't hold up development waiting on silly things like requirements or business objectives! You have to start right away. It's their own fault if they don't implement the changes you made at your desk after handing it off.
you've been spending time with those poopypants "Business Analysts" again, havent you?
-
Ours aren't even competent enough to be bullshit artists.
Well... that's not strictly true. They're good at bullshitting our idiot boss about how busy they are. That's it though.
-
They're good at bullshitting our idiot boss about how busy they are.
Yeah ... real developers slack off on TDWTF
-
-
Today I had a talk with one guy from another project, who handled such Excel - and it was worth it. One monstrosity he worked on was malevolence incarnate. Along with old line/new line diff, he had instructions like "find function X and fix Y there" or "find Z and delete it". Everything mangled together into one stinking sheet.
-
-
I'm so sorry.
-
no tool can handle it automatically.
I'm sure you could integrate with whatever crazy non-Excel tools you people use, with enough VBA. Alt-F11 and off you go!
-
Excel diffs
I'm not capable of even beginning to understand the confused thought process that gave birth to this monstrosity.
I agree. Why you no photograph on wooden table?
-
Is faux-wood good enough? I don't think my office has any real wooden tables.
-
So, a coworker got another kind of diff - a screenshot from a file comparison tool. No, this is not a joke, sadly.
-
Was the screenshot embedded in an Excel document?
-
a screenshot from a file comparison tool
It's amazing what people come up with