- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
CRAP Code == Code Responsible for Aram's Puzzlement.
Admin
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.
Admin
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:
Admin
I cringe merely at the thought of Microsoft in a server environment.
Admin
Just make them connect to a VM on the server technically they are processing on a server rather than a client. Problem solved.
Admin
Real men use BIFF
Admin
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. :)
Admin
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.
Admin
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
Admin
Admin
Admin
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!
Admin
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".
Admin
If I wanted to read I'd pick up a book. Where's the code? Code me!
Admin
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.
Admin
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).
Admin
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.
Admin
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.
Admin
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
Admin
The CRAP hit the fan... an nobody cleaned it up.
CAPTCHA: causa - causes nausea
Admin
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.
Admin
You may s/sane/Unix/.
Captcha: immitto; indeed, I'm "immitting" my comment.
Admin
Admin
:(
I don't want to live on this planet anymore......
Admin
Admin
Any solution so...wrong...could only be the brainchild of a PHB. Is this from a Dilbert comic?
Admin
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.
Admin
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.
Admin
In other words, s/sane/Unix/g
Admin
Sounds like a few "team members" need a large dose of Specialized High Intensity Training.
Admin
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.
Admin
Admin
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.
Admin
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.
Admin
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...
Admin
...well-behaved..., that is.
Admin
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.
Admin
I hope Customer/Regulation Administration Processor was commonly referred to as C/RAP
Admin
I kinda think that was the point. And I fully agree. Microsoft anything is useless. Microsoft anything in a server environment is frightening.
Admin
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] ;)
Admin
Admin
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
Admin
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.
Admin
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...
Admin
ClosedXML is a free wrapper of OpenXML that improves productivity tremendously for reading/writing xlsx.
Admin
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.
Admin
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...
Admin
Image download over POTS (except that fax machines actually predate telephones)
Admin
Sparkly ones!
The power of SOA!
Admin
Happens all the time, so cringe away..