Dev's code manages to topple Microsoft's mighty SharePoint
- Reference: 1657873808
- News link: https://www.theregister.co.uk/2022/07/15/on_call/
- Source link:
Today's story comes from "Mark" (not his name) and concerns the time he was charged with developing a document management application for the university department where he worked. The plan was that pretty much all documents would eventually fall under its remit and the powers that be had decided a newfangled tool called "SharePoint" would do the job.
For the uninitiated, SharePoint first showed up in 2001 and has since proven popular among organizations seeking a document management platform. It is highly customizable and has been bent into all manner of shapes to meet the needs of enterprises over the years. However, the product was still in its infancy at the time of Mark's tale and he surrounded himself with guidance on how to use the thing.
[2]
"I spent a great deal of time reading manuals (RTFM)," he told us, "as this was the old days before everything was online.
[3]
[4]
"In SharePoint [back then] you wrote in line mode inside the application calling one function at a time. When you started to use a function a dialog would pop up offering you the different options for that function. You could go down a very deep rabbit hole."
It was great fun. Mark plunged deeper and deeper down the rabbit hole, and his application got bigger and bigger, right up until it stopped working. Mark couldn't figure out what was wrong – the error didn't make sense. Up until that point everything had been been fine.
[5]
In those days, one tended to rely on support contracts. And so it was that, despite his position as a lowly programmer, Mark found himself on the phone to one of Microsoft's SharePoint geniuses.
[6]This is the military – you can't just delete your history like you're 15
[7]NOBODY PRINT! Selfless hero saves typing pool from carbon catastrophe
[8]The perfect crime – undone by the perfect email backups
[9]Password recovery from beyond the grave
Perhaps he could try condensing his code a bit? Call fewer functions per subroutine?
Sure, Mark did so. The code was rewritten. It still fell over.
Another call was placed and more Microsoft engineers got on the line with more suggestions. Round and round it went until eventually, according to Mark, "the engineers finally admitted that SharePoint had a lines of code limit and I had hit it!"
"I thought this was enterprise, world-class software?" he added. "Silly me."
[10]
Armed with the new information, Mark tried again. His final rewrite was three lines short of the limit and, most importantly, did not fall into a heap.
A decade on and "the program still runs," he said.
Ever had to pick up the phone and call for help only to find that the solution to your problem was a little bit undocumented? Or were you the person on the other end of the line having to reveal your secrets to the unworthy? Tell all with an email to [11]On Call . ®
Get our [12]Tech Resources
[1] https://www.theregister.com/Tag/on-call
[2] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/applications&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=2&c=2YtE6v7ruhHdeeH48zUvkuQAAABM&t=ct%3Dns%26unitnum%3D2%26raptor%3Dcondor%26pos%3Dtop%26test%3D0
[3] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/applications&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44YtE6v7ruhHdeeH48zUvkuQAAABM&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0
[4] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/applications&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33YtE6v7ruhHdeeH48zUvkuQAAABM&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0
[5] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/applications&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44YtE6v7ruhHdeeH48zUvkuQAAABM&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0
[6] https://www.theregister.com/2022/07/08/on_call/
[7] https://www.theregister.com/2022/07/01/on_call/
[8] https://www.theregister.com/2022/06/24/on_call/
[9] https://www.theregister.com/2022/06/17/on_call/
[10] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/applications&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33YtE6v7ruhHdeeH48zUvkuQAAABM&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0
[11] mailto:oncall@theregister.com
[12] https://whitepapers.theregister.com/
* You import the data by going to this drop-down and selecting option X.
* There *is* no option X!
* You import the data by going to this drop-down and selecting option X.
* LISTEN TO ME, THERE IS NO OPTION X!
round and round in circles....
* To import the data you must have ABC access permissions set by your manager, and then you will be able to select option X.
WHY THE FUCK DOESN'T OPTION X APPEAR THEN TO TELL ME THAT'S WHERE IT IS AND TELL ME I HAVE TO ASK FOR EXTRA PERMISSIONS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Some days I really really really want to got to wherever the programmers are with a long stick and repeatedly hit them very very hard.
Read [1]http://bash.org/?4281 and invent it.
I would be your first customer!
[1] http://bash.org/?4281
Had that one too whilst trying to fix a discrepancy on a stock system. Talking to the support bloke who tells me to use the reconciliation function from one of the the drop down menus.
Me: Which one is it under?
I don’t remember, and I’m not at my desk so just try them all.
Me: Okay I’ve done that and it’s not there.
Did you go into the sub menus?
Me: Yes I tried everything I could find.
Okay I’ll call you when I get back to my desk.
Some minutes pass…..
I’m at my desk and it’s the Third one along third one down.
Me: Nope not there.
What version are you using and what privilege level are you?
Me: Twelve and I’m level two
Ah you need level Three……you should be Three if you’re support, is there someone who has that there?
At this point dear reader the store manager logs in and reconcile is there third menu along third option down.
Me: Why isn’t it visible at lower privilege levels even if disabled?
Well, people might be tempted to try and use it.
Me: So put a message box to come up saying you need to be Three or above
I’m in customer service not development, thank you!
MS genius
In the early days of SQL Server 6 (when it was much the same as Sybase 4.2) we sent in a question to MS that must have been better than we suspected as within two days we had a stinking god of programming sent over from Seattle to see what we were doing. I pity his neighbours on the aeroplane, his physical hygiene really was deficient.
I was surprised at the difficulty of the problem as we weren't trying to do anything complicated - we couldn't, it was our first time playing with relational databases and we were still bashing the rocks together.
After three days staring at the screen, grunting occasionally and honking out the office, there was a particularly loud grunt, a flurry of typing and he said, "Got it. I'm going back".
Three days later we had a patch and all was well with our database.
Exchange
Did you know there's a maximum subfolder limit in a Microsoft Exchange mailbox?
We didn't, until we logged the PSS Request with Microsoft.
In their defence, neither them or us expected a user to attempt to file their email [1]into 5,000 subfolders manually , and by the time we worked that out, the scope of the problem was well beyond a technical one...
[1] https://503sayhelo.wordpress.com/2012/07/04/folder-item-limits-for-various-versions-of-exchange/
Re: Exchange
I'm sorry but anyone who has managed Enterprise level mail systems will know that users start at the WTF level and then see how deep they can dig.
We had a team who insisted that they needed a new sub-folder for every day so they could easily find emails and another team who had to have the full company name of the sender as the sub-folder name, with sub-sub folders for the different offices of said company leading to paths such as Joe Soap Ltd/Joe Soap Ltd - Croydon Office/December 2000/Received. Doesn't take long to hit all manner of limits with those ideas
Re: Exchange
I've seen regular LAN folders go over name limits for just that reason, but the worst was when a manager renamed a folder from "AR Department" to "[Manager's full name] - Manager of AR Department", causing all manner of chaos down the file directory tree.
Re: Exchange
I'm surprised it wasn't:
Joe Soap Ltd/Joe Soap Ltd - Croydon Office/Joe Soap Ltd - Croydon Office, December 2000/Joe Soap Ltd - Croydon Office, December 2000 - Received
Some people really do not understand hierarchial naming.
It's still going on
MS Onedrive. Save a file to my Onedrive folder. Go into Outlook, try and attach that file to a message - "Sorry, you don't have permission to do that"
WTF ?? I own that soddin' document! What extra permissions do I need? MS has no idea.
Re: It's still going on
"...MS Onedrive. Save a file to my Onedrive folder. Go into Outlook, try and attach that file to a message - "Sorry, you don't have permission to do that"
WTF ?? I own that soddin' document! What extra permissions do I need? MS has no idea...."
I've found I get all sorts of weird errors if I try to attach a document from OneDrive that is currently open in e.g. Word.
Just as a check - make sure it isn't open anywhere before you try to attach it. It may or may not make a difference.
Re: It's still going on
"MS Onedrive."
A year or two ago a customer decided to keep all the files for a project I was helping with on Onedrive ("It's in the Cloud, so it must be safe."). As we were getting close to the completion of the project I got an e-mail from them saying their files had disappeared - they couldn't see anything when they logged in to Onedrive and were more than a little unhappy about that.
Oddly enough, when I logged in to the same Onedrive I could see all their files - so I downloaded everything, and sent it to them with the suggestion that keeping local copies of their data might not be a bad idea, old-fashioned though that concept may be.
A good weekend to all Commentards. -->
Re: It's still going on
What I like much with OneDrive is the list of forbidden characters that is different from the list of forbidden characters defined for the local file system.
So in some cases, when trying to open in the web interface a file created on a computer you get a message like "Sorry Dave, I can't do that" and you have to rename your file on the computer, then wait for the synchronisation, and then you can use it everywhere...
I just added a comment and it stopped working.
40 years ago... I remember working with someone who was written a program which worked, They added a comment, and it failed to compile with internal error.
Take out a different comment it worked. Cue lots of head scratching from the rest of the team.
The problem was that for a program up to a certain size, the compiler kept it in memory. Over a certain size, it had to spill and use an intermediate file.
There was a bug in the code which spilled to the file. Obvious with hind sight
Limited length of program code?
Not only in Sharepoint, but also for the stored procedure sp_execute_external_script (for calling stuff like R or python from within SQL). Took me a while to figure that out. The implementation is a pig's breakfast anyway...
Re: Limited length of program code?
Long long ago I hit a 64-character path limitation in DOS somewhere, which killed applications that needed to do something like:
C:\Apps\Admin\Setup -u "Fred Jones" -h C:\Users\fjones -g "Myst***BANG***
There were no errors, it just...... didn't work.
I never understood why anybody bought sharepoint.
It's a bad clone of some free open source Wiki software, except it doesn't work properly, and you have to pay for it.
I just love the feature where you copy and paste a picture into a page and it displays lovely on the screen. Then when you save the page and reopen it, the picture isn't there anymore.
Because you can't actually copy and paste a picture, you have to click insert picture and then upload it. And even then, if you make changes to the picture and upload it again, it carries on using the original one unless you change the filename.
If you are pasting text from other sources, the formatting and line spacing and font sizes get all screwed up and you have to resort to manually editing the HTML to make it look right.
And unless you insist on some kind of hierarchical page structure, most of the pages that users create are never looked at because they are impossible to find.
So, not that long ago, I found a bug in the office 2010 VBA editor. It wasn't quite as bad as a hard-cap on lines, but, in essence - too much code could crash it.
I was working with this horrifically complex macro - basically an entire application that happened to use Excel as a GUI. Periodically the users would ask for new functionality, and I'd be tasked with updating it (I assume in a past life I was a terrible sinner). VBA isn't hard to work with really, and this monster had a built-in error-stack, good naming conventions, lots of comments, pretty much the ideal for a gigantic excel macro, if such a thing has to exist! And it was oh so functionalised, no repeated code, lots of tiny sub-functions being called whenever that would have happened.
For some reason, it crashed a lot, but only when being tested with the VBA editor open.
t
If I closed the VBE window and just clicked GUI buttons, it worked fine! But I couldn't so much as run a test function with the VBE open, lest it hard-crash to desktop. After a few times of re-typing the same changes, the first thing I did was make sure it saved itself before doing any tests, in case I forgot, and then I went digging in the (online) manuals.
Turns out that because VBA has access to the entire Office object model, that includes _the VBA editor itself_.
So now the code checks to see if it's being run with the VBE open, and if so, it closes the VBE window to re-open either at the end of the process or if the error handler is invoked.
Amazing the lengths we can go to to avoid re-implementing decade-old excel macros in a better behaved language, eh? Still it pays my bills...
Microsoft phone support (baggy-pants edition)
2001 is probably well into the era where this sort of thing was waning, as the migration to primarily internet-based support was already well underway by the time Y2K rolled around, but a decade earlier the behemoth that was Microsoft telephone support was truly a wonder to behold.
My own dealings with it were back in the summer of 1993, when my just-survived-freshman-year self parlayed my 1/4-of-a-bachelor's-degree "experience" into a summer job doing on-site development for a business graphics service in Manhattan. The shop operated under a business model where they would meet their clients wherever they were at, technologically, rather than imposing the file-type and -format requirements typical of more regimented, higher-volume services. In order to uphold their claim that clients could submit files in any format, from any application, and have them made into whatever combination of slides, printed documents, etc. they requested invariably meant that preflight involved a fairly robust arsenal of middleware translators, parsers, reformatters, etc. sitting in the path between the customer files and the slide/document printers, and that was where I came in.
Since the bulk of the development was being done in Visual C for their Windows production workflow, at some point during the course of the summer I ended up hitting some issue that, like Mark, left me dialing the support number listed in the software manual.
What a trip. Never before or since have I encountered a phone-support infrastructure so massive in both scope and complexity, not to mention so actively used that it easily justified the entire production. The call center maintained dozens of support queues for all of Bill's various products and services, so at any time there were easily hundreds of callers holding to reach a support engineer. And while we all waited? No canned, tedious hold-music loops for these hopeful petitioners, no sir! Instead, a live DJ "hosted" the on-hold experience , interspersing his musical selections with updates on wait times for the various support queues in exactly the manner of a drive-time radio DJ giving traffic reports.
Considering there was at least one occasion where I spent a solid 45 minutes on hold, the novelty was not unwelcome.
Bug Finder
When I worked for a bank, I was always given software to pilot as I always seemed to find bugs in it. I wasn't looking for them, I just somehow found them but when I reported them, it would be along the lines of "I did A, B, C and then D and it didn't work. However, if I do A, B, D, it works." rather than "Uh... doesn't work. Bye."
Re: Bug Finder
You are Newton Pulsifer and ICM5P. :)
microsoft documentation used to be better
... last time when I dealt with MS libraries I noticed my code was doing nothing, so I went into the debugger, and there is was: "ExceptionNotImplemented" or somehting like that was triggered when calling documented methods ... had to go to the old COM libraries to get screenshots of Office documents
Lotus 1-2-crash
I was working on a budgeting system and my boss ran up a prototype in 1-2-3 for DOS to quickly show the management how it could look. But we would write it in C++...
Famous last words. Of course, the management saw the demo, said "great, make it so"... "In 1-2-3, because all our users have that."
The problem was, the tool would pull down data from an Oracle database, running on a VAX and the 1-2-3 proof of concept would pull in the various text files and work on them. Thankfully, 1-2-3 could use extended memory and all 1MB RAM on the laptops could be used, although it was dog slow, because 1-2-3.
We tried repeatedly to get the management to let us develop a real solution, but no, the p-o-c, or p-o-s as we called it, "worked" on a test dataset, so we had to get it working on the full dataset.
It started off fine, but it quickly grew and it ended up using about a couple of dozen different worksheets. Not something you really worry about these day, a few dozen worksheets are fine, when you have 16GB RAM. But back then, it was starting to bang on the 1MB limit.
The other problem is, it was written using 1-2-3 macros. That wasn't a real language, not even a macro language like Excel used, let alone VisualBasic for Applications, which was still a couple of years away. No, we are talking "keystroke macros", cells on a particular worksheet that would be executed and it emulated the keystrokes the user would make manually (E.g. "/fstest.wk3" would save the current file as "test.wk3". You could reference other cells, which would hold text or formulas to calculate the file name, for example, taking the name of the product and using that as the filename). You could also have dynamic ranges in the macro, by using formulas in the cells that are being executed - self modifying code! :-O
It all ran smoothly and then, suddenly, it didn't, it crashed in a big heap. So we single-stepped the macros, and it worked flawlessly. Run the macro, crash, go back and single step, worked, run crash, step works... Hmm, strange and, if you can't see where it is crashing, because it works when you debug it, you can't really move forward.
So we contacted Lotus. They were perplexed and asked for a copy of the code, which was duly sent, along with a set of test files.
The solution came back about a week later, "use C++, Lotus 1-2-3 was never made to do anything this complex!"
Needless to say, that didn't go down well with the management.
Buffer overflow DoS attack.
Self initiated. Caused by using the system as it is advertised.