Comment On Excel-lent Design

The user’s incident report did not contain the most useful description of the problem. “The calculator always outputs zero,” it said. Fortunately for Aram, he had a little bit of an idea of the context, and he knew that the issue was in the Customer/Regulation Administration Processor. [expand full text]
« PrevPage 1 | Page 2Next »

Re: Excel-lent Design

2012-11-13 06:45 • by ParkinT
CRAP Code == Code Responsible for Aram's Puzzlement.

Re: Excel-lent Design

2012-11-13 08:12 • by TheCPUWizard
Aram got it all re-installed and added to the License Compliance system, but he had one question.


That is the real WTF. Microsoft Office Licenses specifically prohibit the applications from being used in a Server Environment. This is the biggest reason why Server Applications that *must* create Office "documents" need to use the OpenXML implementation.

Adding something to the "License Compliance System" does *NOT* make something actually comply with legal licensing requirements.

Re: Excel-lent Design

2012-11-13 08:18 • by Medinoc
I didn't know about the license thing, but I know there is an article on MSDN that recommends against using Office Automation on server-side code, because there is no official support for it and the UI can't be disabled, only hidden.

It means that there is nothing, nothing, that prevents the automated Office application from displaying (visibly or not) a modal dialog box.

Some old code of ours (thankfully replaced with OpenXML since) used Word automation and someday was paralyzed by an unforeseen, invisible "spellchecker overloaded by too many spelling errors" modal message box.

Addendum (2012-11-13 09:17):
Duh, the "license thing" is on the page itself:
Besides the technical problems, you must also consider licensing issues. Current licensing guidelines prevent Office applications from being used on a server to service client requests, unless those clients themselves have licensed copies of Office. Using server-side Automation to provide Office functionality to unlicensed workstations is not covered by the End User License Agreement (EULA).

Re: Excel-lent Design

2012-11-13 08:21 • by letatio (unregistered)
394724 in reply to 394722
TheCPUWizard:
Aram got it all re-installed and added to the License Compliance system, but he had one question.


That is the real WTF. Microsoft Office Licenses specifically prohibit the applications from being used in a Server Environment. This is the biggest reason why Server Applications that *must* create Office "documents" need to use the OpenXML implementation.

Adding something to the "License Compliance System" does *NOT* make something actually comply with legal licensing requirements.


I cringe merely at the thought of Microsoft in a server environment.

Re: Excel-lent Design

2012-11-13 08:22 • by Smug Unix User (unregistered)
Just make them connect to a VM on the server technically they are processing on a server rather than a client. Problem solved.

Re: Excel-lent Design

2012-11-13 08:25 • by Omego2K (unregistered)
Real men use BIFF

Re: Excel-lent Design

2012-11-13 08:37 • by foo (unregistered)
And that's why sane systems implement functionality in a library or batch-mode program first and build the GUI on top, rather than the other way around.

(OK, bring on the flames. I don't have to work with that CRAP. :)

Re: Excel-lent Design

2012-11-13 08:42 • by ubersoldat
394728 in reply to 394723
Medinoc:
used Word automation and someday was paralyzed by an unforeseen, invisible "spellchecker overloaded by too many spelling errors" modal message box.


Wow, good luck debugging that!

TRWTF is pussy whipped managers that when reached with this kind of requirements, sheeply accepts them as valid. But, OTOH at the time, since it was a client-side application, maybe it made sense.

Re: Excel-lent Design

2012-11-13 08:42 • by Joe (unregistered)
Oh, I hope the part where the CRAP handles multiple simultaneous requests properly was left out of the story by editorial license.

It would be a bad thing if user A got the spreadsheet user B just uploaded instead of the one 'e's waiting for.

--Joe

Re: Excel-lent Design

2012-11-13 08:49 • by Sarten X (unregistered)
394730 in reply to 394722
TheCPUWizard:
That is the real WTF. Microsoft Office Licenses specifically prohibit the applications from being used in a Server Environment.

As an admin currently working through an audit, I'll point out that Microsoft's licensing is TRWTF.

Re: Excel-lent Design

2012-11-13 08:56 • by Medinoc
394732 in reply to 394728
ubersoldat:
Medinoc:
used Word automation and someday was paralyzed by an unforeseen, invisible "spellchecker overloaded by too many spelling errors" modal message box.


Wow, good luck debugging that!

It wasn't that bad, because launching Word first and launching the server process in an interactive session made the Word automation visible on the server machine. Still shows that server-side Office automation = WTF and even Microsoft agrees on that.

Re: Excel-lent Design

2012-11-13 09:02 • by LoremIpsumDolorSitAmet
I was expecting the story to end like this: he found out that the spreadsheet just did simple multiplication and addition, so he simply inlined the calculation into the code and got rid of the Excel nonsense altogether. Wishful thinking, apparently!

Re: Excel-lent Design

2012-11-13 09:08 • by ¯\(°_o)/¯ I DUNNO LOL (unregistered)
I don't see the WTF here. I mean, Excel is Turing-complete, right? Party on!

I'm sorry, I meant to say "Excel is WTF-complete".

Re: Excel-lent Design

2012-11-13 09:10 • by Abico (unregistered)
If I wanted to read I'd pick up a book. Where's the code? Code me!

Re: Excel-lent Design

2012-11-13 09:13 • by WC (unregistered)
It's an excel spreadsheet. It's got formulas in it. Turn them into server-side code and eliminate all that craziness.

I've written some seriously crazy Excel formulas in my day, but every one of them would have been a lot easier in a normal language that would run on that server with no problems.

Re: Excel-lent Design

2012-11-13 09:15 • by Code Master (unregistered)
394737 in reply to 394733
LoremIpsumDolorSitAmet:
I was expecting the story to end like this: he found out that the spreadsheet just did simple multiplication and addition, so he simply inlined the calculation into the code and got rid of the Excel nonsense altogether. Wishful thinking, apparently!


In my experience the excel spreadsheet would be running several VBA add ins, and few COM libraries, plus maybe some xlls, and the calculation would involve calling serveral of these. Replacing this functionality in your code would be difficult assuming it wasn't all documented (fairly safe assumption).

Re: Excel-lent Design

2012-11-13 09:25 • by justanotheradmin
394738 in reply to 394722
TheCPUWizard:
Microsoft Office Licenses specifically prohibit the applications from being used in a Server Environment. This is the biggest reason why Server Applications that *must* create Office "documents" need to use the OpenXML implementation.

Adding something to the "License Compliance System" does *NOT* make something actually comply with legal licensing requirements.


Not quite. It prohibits installing it to a server for the purposes of serving requests to unlicensed clients. In other words, doing Excel-y things for users who don't have Excel installed.

As long as Excel is installed as part of your standard build, so all users using the server app have a local installation, you're golden.

Re: Excel-lent Design

2012-11-13 09:26 • by emaNrouY-Here (unregistered)
I'm wondering if an enterprising hacker would be able to insert a little code injection into those forms and have excel pwn the web server.

Seems like this solution as bad as it is on the surface is just as bad, or worse, underneath.

Re: Excel-lent Design

2012-11-13 09:47 • by Cbuttius
Got the cornify image to come up.

where this line is:
Aram had heard that the core developers were gradually migrating it to a more SOA implementation.

click on the word SOA

Re: Excel-lent Design

2012-11-13 09:50 • by Tiki (unregistered)
The CRAP hit the fan... an nobody cleaned it up.

CAPTCHA: causa - causes nausea

Re: Excel-lent Design

2012-11-13 10:02 • by ObiWayneKenobi
Ah, the joys of people that have no idea about IT operations wanting to utilize IT for their business; it always ends up with a clusterfuck because the people making the high-level decisions don't know anything other than computers are some magic box. That's where this nonsense about "enterprise assets" and "required to use SOA" comes from - somebody that clearly has no clue what they're doing but heard/used a few buzzwords in a past life.

This is why IT policy should only ever be decided by people with modern IT background; I'm so tired of having the IT boss be some nimrod who cut their teeth on mainframes or Foxpro or some ancient and obsolete technology decades ago but who never bothered to evolve with the industry. They ALWAYS cause major WTFs because they don't understand how technology works in the modern age.

Re: Excel-lent Design

2012-11-13 10:19 • by pif (unregistered)
394743 in reply to 394727
> sane systems implement functionality in a library or batch-mode program first and build the GUI on top

You may s/sane/Unix/.

Captcha: immitto; indeed, I'm "immitting" my comment.

Re: Excel-lent Design

2012-11-13 10:23 • by Leak
394744 in reply to 394724
letatio:
I cringe merely at the thought of Microsoft in a server environment.

I'm pretty sure this whole site is run using IIS and ASP.Net...

Re: Excel-lent Design

2012-11-13 10:31 • by WaffleSauce (unregistered)
:(

I don't want to live on this planet anymore......

Re: Excel-lent Design

2012-11-13 11:18 • by tim (unregistered)
394747 in reply to 394722
TheCPUWizard:
Aram got it all re-installed and added to the License Compliance system, but he had one question.


That is the real WTF. Microsoft Office Licenses specifically prohibit the applications from being used in a Server Environment. This is the biggest reason why Server Applications that *must* create Office "documents" need to use the OpenXML implementation.

Adding something to the "License Compliance System" does *NOT* make something actually comply with legal licensing requirements.

and TRWFT is, no they don't - get your facts straight

Re: Excel-lent Design

2012-11-13 11:23 • by Coyne
Any solution so...wrong...could only be the brainchild of a PHB. Is this from a Dilbert comic?

Re: Excel-lent Design

2012-11-13 11:34 • by El Ka-Ben (unregistered)
It sounds mostly like a stopgap measure to me -- they get it working now and add this to the bug tracking list. When they get a chance to tackle it then it can be rewritten in code.

Right now someone has disabled the current production version, not their development version, and that needs to be addressed before the root cause can be tackled.

It'd be like putting the doughnut spare back on the car to get to the shop and have a tire replaced.

Re: Excel-lent Design

2012-11-13 11:35 • by Little Bobby Excel (unregistered)
394750 in reply to 394739
emaNrouY-Here:
I'm wondering if an enterprising hacker would be able to insert a little code injection into those forms and have excel pwn the web server.
Exactly. This situation does not call for persuading management to do The Right Thing, because they've already demonstrated that their comprehension of such matters has drifted inside the event horizon of a black hole.

Instead, this is where compliance is your friend. If you can't get them on the license* nonsense, go to an unsecured wi-fi and use TOR to upload a malicious spreadsheet that splatters ugly colors all over the place but does no real harm. (They need to see the threat to understand it.) Then arrange for your company's auditor to hear that OMFG our server was haxxor3d!! Stand back and watch in amazement as idiots get fired and management takes a day off from playing golf to try to figure out WTF is going on.

* Seriously, if paying good money for something that's available free doesn't bother you, then what about the legal risk? And all the hassle of license management? Free software is so much better even if the only thing it adds is freedom from the abuse heaped upon you by license-checking mechanisms

Re: Excel-lent Design

2012-11-13 11:38 • by Jack (unregistered)
394751 in reply to 394743
pif:
> sane systems implement functionality in a library or batch-mode program first and build the GUI on top

You may s/sane/Unix/.
That's pretty much a tautology.

In other words, s/sane/Unix/g

Re: Excel-lent Design

2012-11-13 11:40 • by Oh My (unregistered)
Sounds like a few "team members" need a large dose of Specialized High Intensity Training.

Re: Excel-lent Design

2012-11-13 11:43 • by Cbuttius
What, you mean a rewrite?

The next best thing after doing a totally green field project is being allowed to do a rewrite.

A good rewrite will not necessarily throw everything away but will often mean a re-architecture and then bring in what you find useful and throw away whatever isn't. A bit like demolishing a building or vehicle but being able to use some of the parts to rebuild.

In my history I have joined many a project who brought in a moderate to large development team to do a "rewrite" but then the team sat for months waiting for permission whilst having to "just wait until after the next release" and spending their time doing small enhancements and endless test runs instead, after which most got bored and left.

And during all that time the team could be writing ahead: developing and prototyping and ensuring things work better, but that often requires investment, and possibly a bit of extra hardware which always seems to go begging and is often not justified by the fact that after 6 months or whatever they haven't written much "production" code.

There is also a misconception that the more code that is changed, the more chance of introducing bugs and the harder the maintainence. That is NOT the case. The more obscure the codebase and the requirements, the more chance of bugs and the harder the maintenance. When you rewrite, you will end up far more familiar with the codebase. And good documentation and specifications will ensure you are properly familiar with the requirements.

And yes, sometimes the process changes.

Re: Excel-lent Design

2012-11-13 11:48 • by foxyshadis (unregistered)
394754 in reply to 394736
WC:
It's an excel spreadsheet. It's got formulas in it. Turn them into server-side code and eliminate all that craziness.

I've written some seriously crazy Excel formulas in my day, but every one of them would have been a lot easier in a normal language that would run on that server with no problems.

Sadly, the users probably STILL send updated "templates" regularly, and can't be bothered with learning any templating language other than their homegrown Excel one.

Re: Excel-lent Design

2012-11-13 11:50 • by Another Andrew (unregistered)
I got to the paragraph where he mentioned excel on the server and I threw up a little in my mouth.

I've approached problems with excel on the server and never have I concluded that it was a good enough for production. The only reason you would want excel invoked is so that you can offer the results in a downloadable spreadsheet and there are .net components that will do that for you without having to work with excel on the server.

Aside from the nasty usage of excel formulas, how many instances can excel manage server-side before it crashes, one? A database and asp.net would be far superior for processing the form and then if they needed to export to excel then they could use a .net component. It would handle all the requests you could throw at it and would be much easier to support.

Re: Excel-lent Design

2012-11-13 11:58 • by shinyemptyhead (unregistered)
I ran into a similar situation years ago, working on a Visual C application that created documents using MS Word templates owned by the users, which were then populated via a set of WordBasic commands. The idea was that the users would be able to customise the tmeplates - but nobody ever did, they just treated it as another impenetrable directory of application data. It was thus pretty pointless, but it worked - until the users were upgraded to Office 97 and WordBasic was no longer supported. After some heated discussions, the code was updated to produce RTF files directly instead.

Re: Excel-lent Design

2012-11-13 12:02 • by foo2 (unregistered)
394757 in reply to 394723
Medinoc:
I didn't know about the license thing, but I know there is an article on MSDN that recommends against using Office Automation on server-side code, because there is no official support for it and the UI can't be disabled, only hidden.

It means that there is nothing, nothing, that prevents the automated Office application from displaying (visibly or not) a modal dialog box.

Some old code of ours (thankfully replaced with OpenXML since) used Word automation and someday was paralyzed by an unforeseen, invisible "spellchecker overloaded by too many spelling errors" modal message box.


Excel is rather behaved when automated; so when you turn dialogs off, well, they turn off.

Word, on the other hand, just loves tossing up weird & wonderful messages and bringing the whole show to a standstill. Automating Word client-side is bad enough...

Re: Excel-lent Design

2012-11-13 12:03 • by foo2 (unregistered)
394758 in reply to 394757
foo2:
Excel is rather behaved when


...well-behaved..., that is.

Re: Excel-lent Design

2012-11-13 12:33 • by Mason Wheeler
394760 in reply to 394743
pif:
> sane systems implement functionality in a library or batch-mode program first and build the GUI on top

You may s/sane/Unix/.


Actually, s/sane/designed to be automated/. Even on Linux, I doubt there are too many games (to pick just one example) designed as a command line system with a UI built on top of it.

Re: Excel-lent Design

2012-11-13 12:34 • by mag (unregistered)
I hope Customer/Regulation Administration Processor was commonly referred to as C/RAP

Re: Excel-lent Design

2012-11-13 12:57 • by Valczir (unregistered)
394763 in reply to 394744
I kinda think that was the point. And I fully agree. Microsoft anything is useless. Microsoft anything in a server environment is frightening.

Re: Excel-lent Design

2012-11-13 12:59 • by Michael (unregistered)
394764 in reply to 394723
Some code of ours (which is still there) uses Microsoft Office applications to print documents with a special printer and convert them to fax messages. If conversion takes to long, it attempts to click on modal dialogs.

Usually this only happens if the print area differs from the printer's, otherwise works just fine. Of course, if it happens, then for the 10000+ fax jobs that were spawned from documents created by the marketing department [please do not add bleed to ads to be sent via fax, thank you] ;)

Re: Excel-lent Design

2012-11-13 13:09 • by foo2 (unregistered)
394765 in reply to 394764
Michael:
print documents with a special printer and convert them to fax messages.
I vaguely remember what a 'printer' is, but what's this 'fax' you speak of?

Re: Excel-lent Design

2012-11-13 13:20 • by Some Random Texan (unregistered)
So if someone screwed with the Excel calculation spreadsheet, they could make an error pop up on Excel, and everyone's "calculator" on the client side would return all 0's without any notification otherwise.

Looks like TRWTF is unmitigated client requirements.

Code does what the client wants, how the client wants.

captcha.
caecus - old English for blind. Oh the irony

Re: Excel-lent Design

2012-11-13 13:45 • by Ragnax
394768 in reply to 394723
Medinoc:
I didn't know about the license thing, but I know there is an article on MSDN that recommends against using Office Automation on server-side code, because there is no official support for it and the UI can't be disabled, only hidden.

From personal experience; the older COM interop assemblies for Office automation would leak entire instances of Excel.exe when the application pool happened to recycle in the midst of an operation, because dispose operations tied into freeing everything would never be called correctly in that scenario.

I guess you could call that 'not being officially supported'...

One of my former employers actually worked the issue by using a dedicated (virtual) machine to mangle Excel I/O and putting it on a 15min reboot cycle. Good lord that application was awful.

Re: Excel-lent Design

2012-11-13 14:14 • by Slapout (unregistered)
I've been fighting with the OpenXMLSDK for the last two days. You'd think it'd be easy to find a content control by tag name and replace it's contents, but no...

Re: Excel-lent Design

2012-11-13 14:35 • by G Applqst (unregistered)
ClosedXML is a free wrapper of OpenXML that improves productivity tremendously for reading/writing xlsx.

Re: Excel-lent Design

2012-11-13 15:02 • by Michael (unregistered)
Amazing! TRWTF is that my old workplace (a German Investment Bank in London) did something similar about 10years ago. And it was waved through with the same arguments: The front-office people love Excel and want to be able to update their formulas easily.

Re: Excel-lent Design

2012-11-13 15:18 • by LANMind (unregistered)
394773 in reply to 394772
Michael:
Amazing! TRWTF is that my old workplace (a German Investment Bank in London) did something similar about 10years ago. And it was waved through with the same arguments: The front-office people love Excel and want to be able to update their formulas easily.


It would be nice if dot net provided a runtime interpreter. I manage a bunch of contantly changing pricing formulas that I would love to present to the users in a UI, and if it isn't right then it isn't my problem...

Re: Excel-lent Design

2012-11-13 15:22 • by Maurits
394774 in reply to 394765
foo2:
Michael:
print documents with a special printer and convert them to fax messages.
I vaguely remember what a 'printer' is, but what's this 'fax' you speak of?


Image download over POTS (except that fax machines actually predate telephones)

Re: Excel-lent Design

2012-11-13 16:47 • by Frostie (unregistered)
394775 in reply to 394740
Sparkly ones!

The power of SOA!

Re: Excel-lent Design

2012-11-13 17:08 • by barf 4 eva (unregistered)
394776 in reply to 394724
letatio:
TheCPUWizard:
Aram got it all re-installed and added to the License Compliance system, but he had one question.


That is the real WTF. Microsoft Office Licenses specifically prohibit the applications from being used in a Server Environment. This is the biggest reason why Server Applications that *must* create Office "documents" need to use the OpenXML implementation.

Adding something to the "License Compliance System" does *NOT* make something actually comply with legal licensing requirements.


I cringe merely at the thought of Microsoft in a server environment.


Happens all the time, so cringe away..
« PrevPage 1 | Page 2Next »

Add Comment