• (cs)
    "At least it's not XML stored in SQL Server," Floyd added, "although we have a lot of that as well."
    Um... that's exactly what we're doing at work. If you want a generic auditing mechanism for web services, it's the easiest way to store it. Then, with Oracle's XML functions, you can create a view that looks like a proper little table.

    Surely, this could be done in Java as well, and the result stored in a real table. It would also be a far less flexible solution, and relegate your database engine to a somewhat funny-looking file system. Fine if you use MySQL or similarly limited database engines, but the 'XML in a database is bad' mantra is yet another urban myth that 'real' developers should get out of their heads.

  • (cs)

    Well, I'm disappointed. Mr P posted this so late there were no comments this morning. And so many memes that could be exploited, frist, yo dawg, etc. but somebody beat me to being the post before second so I shan't bother.

    Overall, this is such a bad idea, it's not funny. I despair.

  • Joe the Bladerunner (unregistered)

    In logging, funny, I just saw a guy make a table like this, with varchar columns col1, col2, col3....ad nauseam. When asking "WTF?" he said, "well, these are placeholders, into which the users of my LOGGING TABLE can write what they want". Behold the well organized, scalable, non-corruptible architectural vision of the author. Thank God I got him to shoot it down, albeit after a LONG discussion where his argument was "there are many ways to skin a cat". I would like to skin him...

  • Vexorg (unregistered)

    (Insert appropriate "LOG ALL THE THINGS!" meme here)

  • Warren (unregistered)

    private void WriteComment(long articleID) { articleComment.GenericVariableString1 = articleId; articleComment.GenericVariableString2 = "Frist!!111"; // Not real comment, thankfully... articleComment.Funny = false; articleComment.GenericVariableString3 = String.Empty;// Future use... articleComment.GenericVariableString4 = String.Empty;// Future use... articleComment.GenericVariableString5 = String.Empty;// Future use... articleComment.GenericVariableString6 = String.Empty;// Future use... articleComment.GenericVariableString7 = String.Empty;// Future use... articleComment.GenericVariableString8 = String.Empty;// Future use... articleComment.GenericVariableString9 = String.Empty;// Future use... articleComment.post(); }

  • Steve (unregistered)

    Time to ask a stupid question - Why would anyone create these "place holders"? I mean, why can't you just add new variables as you need them?

    Note that I don't touch ASP, or any web/database oriented language.

  • Ü. Loggington (unregistered) in reply to Severity One
    Severity One:
    the 'XML in a database is bad' mantra is yet another urban myth that 'real' developers should get out of their heads.

    We use Xml columns in SQL Server to store serialized objects, which works well except for the otherwise pretty good Entity Framework which interprets Xml columnds as strings..

  • Mmmpf (unregistered) in reply to Ü. Loggington
    Ü. Loggington:
    Severity One:
    the 'XML in a database is bad' mantra is yet another urban myth that 'real' developers should get out of their heads.

    We use Xml columns in SQL Server to store serialized objects, which works well except for the otherwise pretty good Entity Framework which interprets Xml columnds as strings..

    Is it really a problem? Supposing you're using .net, you can just use LoadXml when you read from your column and ToString when you write to it, can't you? I did that when I had to port a db to SQL Compact, and I can't see why it would be a bad idea.

  • StJohn (unregistered)

    Is it just me or is there so much wrong with this apart from being copy/pasted into 200 pages?

    From the static logEntry vars to the reserved vard and the comments about not getting stuff to work.

    Also this; logEntry.GenericVariableString2 = "WebForm1.aspx"; // Not real page name, thankfully...

    Why make an entry of if when it's of no use?

    Or did I miss something?

  • Smitt-Tay (unregistered)

    Why is anyone using anything other than the system logger ?

    Every modern OS out there comes with built-in, high performance logging facilities. Just use them !

  • (cs)
       logEntry.ActionDescription = "Added missing Id.";
    Oh dear, oh dear. Either that's the log message, or it's not. If it is, why is it hard coded there and not a parameter? If not, WTF is it doing there at all?!

    The rest of the code isn't better either, and the large-scale duplication is just peachy…

  • Expert (unregistered) in reply to Steve
    Steve:
    Time to ask a stupid question - Why would anyone create these "place holders"? I mean, why can't you just add new variables as you need them?

    Uhm, well, you never experienced major version release?

    This is called "backward-compatibility" - and nobody loves to rewrite old software which suddenly stopped working when someone changed file format.

  • Guru (unregistered) in reply to Smitt-Tay
    Smitt-Tay:
    Why is anyone using anything other than the system logger ?

    Every modern OS out there comes with built-in, high performance logging facilities. Just use them !

    Are they secure enough? How do you know they didn't send sensitive data directly to Steve

  • StJohn (unregistered) in reply to dkf

    Must be an Enterprise logger.

  • PM (unregistered)

    One logger to rule them all....

  • (cs)

    The only thing a logger should do is shout 'Timber!' as a warning. But I'm never sure whether to hard code his axe or make it flexible so it simply may be replaced by a chainsaw later...

  • Bob (unregistered) in reply to Severity One

    Ha, ha! Classic troll! Brilliant!

    It's got the, "I'm doing it so it can't be a wtf!" It's got, "Mixing display rules with data is a great idea." It's got XML! It's got, "It makes perfect sense to store structured metadata (XML) in a structured data environment (DB), after all, if structured data is good, then doubly structured data is twice as good." It's got some random reference to Java. It's got an uneducated sideways swipe at MySQL.

    What do you mean, "He's serious"?

    I'm really worried what they're doing with that expensive Oracle DB that it becomes a "somewhat funny-looking file system" is you don't store XML in it.

  • (cs) in reply to Bob
    Bob:
    Ha, ha! Classic troll! Brilliant!

    It's got the, "I'm doing it so it can't be a wtf!" It's got, "Mixing display rules with data is a great idea." It's got XML! It's got, "It makes perfect sense to store structured metadata (XML) in a structured data environment (DB), after all, if structured data is good, then doubly structured data is twice as good." It's got some random reference to Java. It's got an uneducated sideways swipe at MySQL.

    What do you mean, "He's serious"?

    I'm really worried what they're doing with that expensive Oracle DB that it becomes a "somewhat funny-looking file system" is you don't store XML in it.

    Fuckinell I wish I was a clever bugger like you to instantly be able to analyse all the aspects of a system which you've got 4 lines of description of an instantly know it's a bad design because some fucker told you once that he doesn't think it's a good idea to do this sort of stuff. You cunt.

  • (cs)

    Who logs the Über Logger?

  • Sylvain Colinet (unregistered) in reply to LegacyCrono

    I guest the Über logger can log itself

    public void logLogEntry();

  • doctor_of_common_sense (unregistered) in reply to Steve
    Steve:
    Time to ask a stupid question - Why would anyone create these "place holders"? I mean, why can't you just add new variables as you need them?

    Note that I don't touch ASP, or any web/database oriented language.

    To answer a stupid question with even more stupidity - they will have place holders to do this:

    WriteLog("Nagesh");

  • Annonymous (unregistered)

    But... but... if it wasn't copied into every page, we'd need some kind of module that's referenced from every other place in the system. That's tight coupling to a God object. That's bad! So just copy and paste instead.

    That way, when you want to adjust the logging for one page, you don't have to worry about side effects for other pages.

    Captcha: Christmas Praesent.

  • Hater (unregistered) in reply to Matt Westwood
    Matt Westwood:
    You cunt.
    [image]
  • Myth (unregistered) in reply to Matt Westwood
  • Logger Failure (unregistered)

    True story: I got a service call to one of our customers whose minicomputer (and there was nothing mini about it) was crashing, almost every day. The computer was the size of two refrigerators side by side, with a top-of-the-line 32MB disk drive the size of a washing machine attached at one side. It sat in the midst of a high school's computer lab, helping people learn how to program in FORTRAN etc. One computer wired to 16 green-screen terminals, which, with their 80 column by 24 line display regions, were vastly inferior to the 132 column by infinity DecWriters they had replaced. But now at least you could do vi instead of ed, and the first bony fingers of the future's GUI began scratching their way up out of the earth.

    Since it was a school, I was pretty sure what the problem was before I even got there. Some teacher was going "Everyone type your user ID... Now hit Return... Now type your password... Ready? ... Now hit Return" which would kick off 16 simultaneous resource-hogging login processes. Even then, people thought "slow" meant "crashed", even though the system would usually sort things out on its own after five minutes or so.

    But no, the lab was well in session before the system died. And one glance at the console proved that it was, indeed, crashed, for there was the familiar maze of hexidecimal numbers splayed everywhere like digital puke. I looked up the failure code in my technician's manual (hardcopy of course... the system is down!) and it said "ERROR WHILE WRITING ERROR MESSAGE TO ERROR LOG" which, of course, was intended to be much more helpful than the uninterpreted version 0A7EF4BD.

    Hmmm... error while writing... sounds kinda like a write error... to the log file, which like everything else would be on the washing-machine disk. On a hunch I checked. Yep. The disk write-protect button, a red square only slightly smaller than what you'd use to panic shutdown a nuclear plant, was engaged. It was intended to be used in a two drive system, where the immutable stuff like the OS lived on the write protected drive, while swap space and user files were on the writable drive.

    But the school could only afford a one-drive system. So there was no reason why the write-protect switch should ever be used. I asked the lab assistant, a dictionary case of the untouchable nerd, complete with whining voice, mispronounced words, and coke-bottle glasses, if he had any idea why the write-protect switch was on. (His student work-study program paid him to spend 2 hours a day in the lab, but he hung out there more like 60 hours a week.)

    "Oh, yes," he said proudly "I activated the safety! The system crashes almost every afternoon, and I've developed the ability to tell when it is about to happen. Usually when everyone is logged in and starts compiling their programs, the disk drive will begin shaking violently like an unbalanced washing machine on spin. When I does, I drop whatever I'm doing, run to the computer, and press the button to protect the files from corruption. Usually I barely get there in time, because it crashes just a second or two later!"

  • Ralph (unregistered) in reply to Logger Failure
    Logger Failure:
    a two drive system, where the immutable stuff like the OS lived on the write protected drive, while swap space and user files were on the writable drive.
    Yet another feature still not supported by Windows, lo all these decades later. But why do one simple thing that would foil 90% of the millions of Windows viruses, and run the risk of confusing our precious ignorant users?
  • (cs) in reply to Logger Failure
    Logger Failure:
    True story: I got a service call to one of our customers whose minicomputer (and there was nothing mini about it) was crashing, almost every day. The computer was the size of two refrigerators side by side, with a top-of-the-line 32MB disk drive the size of a washing machine attached at one side. It sat in the midst of a high school's computer lab, helping people learn how to program in FORTRAN etc. One computer wired to 16 green-screen terminals, which, with their 80 column by 24 line display regions, were vastly inferior to the 132 column by infinity DecWriters they had replaced. But now at least you could do vi instead of ed, and the first bony fingers of the future's GUI began scratching their way up out of the earth.

    Since it was a school, I was pretty sure what the problem was before I even got there. Some teacher was going "Everyone type your user ID... Now hit Return... Now type your password... Ready? ... Now hit Return" which would kick off 16 simultaneous resource-hogging login processes. Even then, people thought "slow" meant "crashed", even though the system would usually sort things out on its own after five minutes or so.

    But no, the lab was well in session before the system died. And one glance at the console proved that it was, indeed, crashed, for there was the familiar maze of hexidecimal numbers splayed everywhere like digital puke. I looked up the failure code in my technician's manual (hardcopy of course... the system is down!) and it said "ERROR WHILE WRITING ERROR MESSAGE TO ERROR LOG" which, of course, was intended to be much more helpful than the uninterpreted version 0A7EF4BD.

    Hmmm... error while writing... sounds kinda like a write error... to the log file, which like everything else would be on the washing-machine disk. On a hunch I checked. Yep. The disk write-protect button, a red square only slightly smaller than what you'd use to panic shutdown a nuclear plant, was engaged. It was intended to be used in a two drive system, where the immutable stuff like the OS lived on the write protected drive, while swap space and user files were on the writable drive.

    But the school could only afford a one-drive system. So there was no reason why the write-protect switch should ever be used. I asked the lab assistant, a dictionary case of the untouchable nerd, complete with whining voice, mispronounced words, and coke-bottle glasses, if he had any idea why the write-protect switch was on. (His student work-study program paid him to spend 2 hours a day in the lab, but he hung out there more like 60 hours a week.)

    "Oh, yes," he said proudly "I activated the safety! The system crashes almost every afternoon, and I've developed the ability to tell when it is about to happen. Usually when everyone is logged in and starts compiling their programs, the disk drive will begin shaking violently like an unbalanced washing machine on spin. When I does, I drop whatever I'm doing, run to the computer, and press the button to protect the files from corruption. Usually I barely get there in time, because it crashes just a second or two later!"

    "digital puke" - FTW

    In those circumstances it's so tempting to make up something expensive and revenue-boosting for the service contractor - even if they're on a flat rate - as a recompense for being so fucking stupid. Or (if you're wearing gloves) lifting the lank, greasy fanta-top of the fucking nerd to look into his ear and announce boldly, "Blimey! I can see daylight!"

  • StJohn (unregistered) in reply to Ralph

    Well, I guess updates could be installed on the writable drives and extend OS functions, but a virus would probably be able to exploit that.

  • (cs) in reply to Logger Failure
    Logger Failure:
    True story: I got a service call to one of our customers whose minicomputer (and there was nothing mini about it) was crashing, almost every day. The computer was the size of two refrigerators side by side, with a top-of-the-line 32MB disk drive the size of a washing machine attached at one side. It sat in the midst of a high school's computer lab, helping people learn how to program in FORTRAN etc. One computer wired to 16 green-screen terminals, which, with their 80 column by 24 line display regions, were vastly inferior to the 132 column by infinity DecWriters they had replaced. ...

    Oh yeah, while I think about it: this dates from about 1970 / 1980? That was when we had one green-screen and 30-odd DecWriters. Happy days.

  • (cs) in reply to Severity One
    Severity One:
    "At least it's not XML stored in SQL Server," Floyd added, "although we have a lot of that as well."
    Um... that's exactly what we're doing at work. If you want a generic auditing mechanism for web services, it's the easiest way to store it. Then, with Oracle's XML functions, you can create a view that looks like a proper little table.

    You're storing XML in (Microsoft) SQL Server, and then using Oracle's XML functions to create a view? That sounds like one hell of a 'WTF to me. Please submit it.

  • (cs) in reply to Bob
    Bob:
    It's got the, "I'm doing it so it can't be a wtf!" It's got, "Mixing display rules with data is a great idea." It's got XML! It's got, "It makes perfect sense to store structured metadata (XML) in a structured data environment (DB), after all, if structured data is good, then doubly structured data is twice as good." It's got some random reference to Java. It's got an uneducated sideways swipe at MySQL.

    What do you mean, "He's serious"?

    I'm really worried what they're doing with that expensive Oracle DB that it becomes a "somewhat funny-looking file system" is you don't store XML in it.

    Thank you for sharing that with us.

    Thing is, we have a lot of web services. We outsource certain bits, like the web portal front-end and the CRM system installation, and to talk to the bare-metal back-end such as telephony switches and our own custom systems, we develop SOAP web services (in Java).

    Obviously, you'll want to audit, one way or another, whatever comes into and whatever goes out of each and every web service. So, you have two choices:

    • Develop a separate auditing mechanism for each and every web service
    • Use your brain for a few moments and come up with a generic solution

    FWIW, I'm the same guy who wrote the ws-run application, which runs a web service using an (Java) Endpoint, instead of a servlet or J2EE engine such as Tomcat. I mentioned it a few months ago on this site.

    Logging used to be part of this package, but has now been moved to its own generic framework. This uses a SOAP handler that intercepts calls, and stores the XML in a neat little object that is in turned passed to logging services. These are loaded using the ServiceLoader interface, so you can simply add a JAR file and the new logging mechanism is used automagically. The support people still have to manually set which loggers to use; whilst there is no strict requirement to do so, it makes it more flexible for them. Switching things on or off using a configuration file is easier than having to move JAR files about.

    As a standard, there's the log4j logging service, which extracts each SOAP request into a tree structure and logs this using log4j. The support people like it.

    So, a new logging service, this time an 'database auditing' one, was developed, and all SOAP requests get stored in the database. Sure, you could write something in Java that analyses the XML, and stores the hierarchical XML some way or other into the table-based relational database. But it would have to be done for each and every web service invocation, and as such, it would incur a performance penalty. This doesn't make sense, because an audit trail is something that you don't use very often.

    By storing the XML directly, you can separate the concerns of logging the data and visualising it. You could write a tool that shows it to customer service representatives, or create the aforementioned view so it looks like a table, and gives the support people an idea of what is going on.

    We, as developers at our company, are always trying to find ways to make things easier both for ourselves and for the support people, and to separate concerns.

    Another aim is to use the best tools. Oracle is a seriously powerful beast (and a bugger to use most of the time, but hey), and XML processing is one of them.

    Hopefully, this has elucidated you a little bit, but if you have a better idea, I'm all ears.

    But do try for substance next time you touch the keyboard.

  • Ralph (unregistered) in reply to StJohn
    StJohn:
    Well, I guess updates could be installed on the writable drives and extend OS functions, but a virus would probably be able to exploit that.
    1. Since viruses can no longer walk right through one of the ten new "remote admin" bugs patched every month to install themselves on the immutable drive, you can put a stop to the endless patch whirlwind. Yeah, your OS still has bugs. Got pwned? Reboot. Solved. Kinda reduces the payoff for hackerz.
    1. Twice a year when you feel like installing the latest service pack or whatever, download it, disconnect from the net, press the write enable button (physical button, untouchable by software) and apply the bundle. Power off, write protect, boot. A piece of cake for anyone competent, scary as hell for the beloved know-nothings we must worship with every gigabyte of bloated code.
  • GUI Expert (unregistered)

    TRWTF is visual basic

  • (cs) in reply to slippyr4
    slippyr4:
    Severity One:
    "At least it's not XML stored in SQL Server," Floyd added, "although we have a lot of that as well."
    Um... that's exactly what we're doing at work. If you want a generic auditing mechanism for web services, it's the easiest way to store it. Then, with Oracle's XML functions, you can create a view that looks like a proper little table.
    You're storing XML in (Microsoft) SQL Server, and then using Oracle's XML functions to create a view? That sounds like one hell of a 'WTF to me. Please submit it.
    1 2 3 4 5 6 7 8 9 10

    1 2 3 4 5 6 7 8 9 10

    1 2 3 4 5 6 7 8 9 10

    No, we're using something similar but on a different database engine. Do I have to explain everything?

  • Uber Nerd (unregistered) in reply to Logger Failure
    Logger Failure:
    the lab assistant, a dictionary case of the untouchable nerd, complete with whining voice, mispronounced words, and coke-bottle glasses
    Wow that brings back memories! I recognize that guy -- it's me. Yeah I was pretty clueless about computers then -- almost everyone was -- but I sensed a powerful potential and I was determined to learn all I could. The teachers knew less about computers than anyone else, so I skipped my classes to learn hands-on in the lab. And after a couple years, and a couple thousand mistakes, I learned a lot.

    Then I got a job as lab TA at University where I learned even more. One of the students I helped regularly eventually confided in me that he was a foreign exchange student and his dad was a big shot in the Saudi oil business. They were trying desperately to computerize but couldn't find skilled people anywhere. Did I want a job paying $150,000 a year to start?

    The Saudis insisted I polish my appearance. Expensive suits, etiquette coaching, even surgery for my eyes -- they paid for it all. And because I knew English and computers, the annual salary increases varied from ridiculous to obscene.

    30 years later I'm the Vice President of I.T. for a multi billion dollar operation. And the laws here, for rich people, are pretty flexible. In addition to my regular harem, any time I want a new bitch for variety I just have to dream up her particulars, describe her in detail, and within a day or two she is mine -- American or Saudi, no problem. When I tire of them, I can have the good ones paid off and sent away, and the annoying ones I just have, well, "removed".

    I remember you coming to the lab that day. You made me feel pretty stupid. But I was just trying to help.

    So what are you doing these days? Still wiping digital puke off the consoles of baby mainframes? Or have you graduated to field-swapping Dell motherboards? I bet you went the all-American route: got married, got 2.3 kids, got a mortgage the size of an elephant and a membership at the Church of Perpetual Payments.

    Post your email address; I'll arrange to send the next worn-out bitch your way. It's the least I can do. Do you have a hair color preference?

  • callcopse (unregistered)

    I heard you liked logging dawg, so I logged the logging of your logs for you. If you want me to log the log log logs that's cool bro.

  • (cs) in reply to Bob
    Bob:
    Ha, ha! Classic troll! Brilliant!

    It's got the, "I'm doing it so it can't be a wtf!" It's got, "Mixing display rules with data is a great idea." It's got XML! It's got, "It makes perfect sense to store structured metadata (XML) in a structured data environment (DB), after all, if structured data is good, then doubly structured data is twice as good." It's got some random reference to Java. It's got an uneducated sideways swipe at MySQL.

    What do you mean, "He's serious"?

    I'm really worried what they're doing with that expensive Oracle DB that it becomes a "somewhat funny-looking file system" is you don't store XML in it.

    I'll have to bring that up in our next code review. The application we are about to launch needs to be able to store its state between runs. What we are currently doing is just serialize the entire state to XML and store it as a string in the database along with some meta-data to correctly identify which state to reload, de-serialize and re-inject. If you know of a better way to store a complex state in a much simpler way, please let me know so I can rectify it tomorrow. Thanks

  • Jack (unregistered) in reply to bjolling
    bjolling:
    The application we are about to launch needs to be able to store its state between runs. What we are currently doing is just serialize the entire state to XML and store it as a string in the database along with some meta-data to correctly identify which state to reload, de-serialize and re-inject. If you know of a better way to store a complex state in a much simpler way, please let me know so I can rectify it tomorrow. Thanks
    Write the XML to a flat file with a datestamp in the filename. That way you can do individual backups and restores, diff vs. any historical version, distribute a favored state to a thousand clones worldwide, and a million other lovely things.
  • rpr (unregistered) in reply to Severity One

    Sounds like you work for the big red telecom giant in Canada...

    Captcha: saluto - what I'd like to do to the outsourced technical support people...

  • rpr (unregistered) in reply to rpr
    rpr:
    Sounds like you work for the big red telecom giant in Canada...

    Captcha: saluto - what I'd like to do to the outsourced technical support people...

    That was directed at SeverityOne, btw...

    captcha: veniam - Dr. Seuss logic

  • (cs) in reply to Uber Nerd
    Uber Nerd:
    Logger Failure:
    the lab assistant, a dictionary case of the untouchable nerd, complete with whining voice, mispronounced words, and coke-bottle glasses
    Wow that brings back memories! I recognize that guy -- it's me. Yeah I was pretty clueless about computers then -- almost everyone was -- but I sensed a powerful potential and I was determined to learn all I could. The teachers knew less about computers than anyone else, so I skipped my classes to learn hands-on in the lab. And after a couple years, and a couple thousand mistakes, I learned a lot.

    Then I got a job as lab TA at University where I learned even more. One of the students I helped regularly eventually confided in me that he was a foreign exchange student and his dad was a big shot in the Saudi oil business. They were trying desperately to computerize but couldn't find skilled people anywhere. Did I want a job paying $150,000 a year to start?

    The Saudis insisted I polish my appearance. Expensive suits, etiquette coaching, even surgery for my eyes -- they paid for it all. And because I knew English and computers, the annual salary increases varied from ridiculous to obscene.

    30 years later I'm the Vice President of I.T. for a multi billion dollar operation. And the laws here, for rich people, are pretty flexible. In addition to my regular harem, any time I want a new bitch for variety I just have to dream up her particulars, describe her in detail, and within a day or two she is mine -- American or Saudi, no problem. When I tire of them, I can have the good ones paid off and sent away, and the annoying ones I just have, well, "removed".

    I remember you coming to the lab that day. You made me feel pretty stupid. But I was just trying to help.

    So what are you doing these days? Still wiping digital puke off the consoles of baby mainframes? Or have you graduated to field-swapping Dell motherboards? I bet you went the all-American route: got married, got 2.3 kids, got a mortgage the size of an elephant and a membership at the Church of Perpetual Payments.

    Post your email address; I'll arrange to send the next worn-out bitch your way. It's the least I can do. Do you have a hair color preference?

    Are you still hiring?

  • Guru (unregistered) in reply to Uber Nerd
    Uber Nerd:
    Logger Failure:
    the lab assistant, a dictionary case of the untouchable nerd, complete with whining voice, mispronounced words, and coke-bottle glasses
    Wow that brings back memories! I recognize that guy -- it's me. Yeah I was pretty clueless about computers then -- almost everyone was -- but I sensed a powerful potential and I was determined to learn all I could. The teachers knew less about computers than anyone else, so I skipped my classes to learn hands-on in the lab. And after a couple years, and a couple thousand mistakes, I learned a lot.

    Then I got a job as lab TA at University where I learned even more. One of the students I helped regularly eventually confided in me that he was a foreign exchange student and his dad was a big shot in the Saudi oil business. They were trying desperately to computerize but couldn't find skilled people anywhere. Did I want a job paying $150,000 a year to start?

    The Saudis insisted I polish my appearance. Expensive suits, etiquette coaching, even surgery for my eyes -- they paid for it all. And because I knew English and computers, the annual salary increases varied from ridiculous to obscene.

    30 years later I'm the Vice President of I.T. for a multi billion dollar operation. And the laws here, for rich people, are pretty flexible. In addition to my regular harem, any time I want a new bitch for variety I just have to dream up her particulars, describe her in detail, and within a day or two she is mine -- American or Saudi, no problem. When I tire of them, I can have the good ones paid off and sent away, and the annoying ones I just have, well, "removed".

    I remember you coming to the lab that day. You made me feel pretty stupid. But I was just trying to help.

    So what are you doing these days? Still wiping digital puke off the consoles of baby mainframes? Or have you graduated to field-swapping Dell motherboards? I bet you went the all-American route: got married, got 2.3 kids, got a mortgage the size of an elephant and a membership at the Church of Perpetual Payments.

    Post your email address; I'll arrange to send the next worn-out bitch your way. It's the least I can do. Do you have a hair color preference?

    Har har har.

    I was expecting along the lines "but my father in jail now, so send $10.000 first so we can arrange a lawyer and you will get those $150.000"

  • (cs) in reply to Jack
    Jack:
    bjolling:
    The application we are about to launch needs to be able to store its state between runs. What we are currently doing is just serialize the entire state to XML and store it as a string in the database along with some meta-data to correctly identify which state to reload, de-serialize and re-inject. If you know of a better way to store a complex state in a much simpler way, please let me know so I can rectify it tomorrow. Thanks
    Write the XML to a flat file with a datestamp in the filename. That way you can do individual backups and restores, diff vs. any historical version, distribute a favored state to a thousand clones worldwide, and a million other lovely things.
    Yet another example of my least-favorite kind of TDWTF comment: the one where I can't tell if the poster is an idiot or is just trying to pull our legs.
  • Klimax (unregistered) in reply to Ralph
    Ralph:
    Logger Failure:
    a two drive system, where the immutable stuff like the OS lived on the write protected drive, while swap space and user files were on the writable drive.
    Yet another feature still not supported by Windows, lo all these decades later. But why do one simple thing that would foil 90% of the millions of Windows viruses, and run the risk of confusing our precious ignorant users?

    Well, I think we got this day TRWTF and can go home. Almost nothing in there is true...

  • Luiz Felipe (unregistered) in reply to Logger Failure
    Logger Failure:
    True story: I got a service call to one of our customers whose minicomputer (and there was nothing mini about it) was crashing, almost every day. The computer was the size of two refrigerators side by side, with a top-of-the-line 32MB disk drive the size of a washing machine attached at one side. It sat in the midst of a high school's computer lab, helping people learn how to program in FORTRAN etc. One computer wired to 16 green-screen terminals, which, with their 80 column by 24 line display regions, were vastly inferior to the 132 column by infinity DecWriters they had replaced. But now at least you could do vi instead of ed, and the first bony fingers of the future's GUI began scratching their way up out of the earth.

    Since it was a school, I was pretty sure what the problem was before I even got there. Some teacher was going "Everyone type your user ID... Now hit Return... Now type your password... Ready? ... Now hit Return" which would kick off 16 simultaneous resource-hogging login processes. Even then, people thought "slow" meant "crashed", even though the system would usually sort things out on its own after five minutes or so.

    But no, the lab was well in session before the system died. And one glance at the console proved that it was, indeed, crashed, for there was the familiar maze of hexidecimal numbers splayed everywhere like digital puke. I looked up the failure code in my technician's manual (hardcopy of course... the system is down!) and it said "ERROR WHILE WRITING ERROR MESSAGE TO ERROR LOG" which, of course, was intended to be much more helpful than the uninterpreted version 0A7EF4BD.

    Hmmm... error while writing... sounds kinda like a write error... to the log file, which like everything else would be on the washing-machine disk. On a hunch I checked. Yep. The disk write-protect button, a red square only slightly smaller than what you'd use to panic shutdown a nuclear plant, was engaged. It was intended to be used in a two drive system, where the immutable stuff like the OS lived on the write protected drive, while swap space and user files were on the writable drive.

    But the school could only afford a one-drive system. So there was no reason why the write-protect switch should ever be used. I asked the lab assistant, a dictionary case of the untouchable nerd, complete with whining voice, mispronounced words, and coke-bottle glasses, if he had any idea why the write-protect switch was on. (His student work-study program paid him to spend 2 hours a day in the lab, but he hung out there more like 60 hours a week.)

    "Oh, yes," he said proudly "I activated the safety! The system crashes almost every afternoon, and I've developed the ability to tell when it is about to happen. Usually when everyone is logged in and starts compiling their programs, the disk drive will begin shaking violently like an unbalanced washing machine on spin. When I does, I drop whatever I'm doing, run to the computer, and press the button to protect the files from corruption. Usually I barely get there in time, because it crashes just a second or two later!"

    He is not a nerd, he is a moron. If he were a real nerd, he would know how machine worked.

  • sreagsgio (unregistered) in reply to SCSimmons

    What's wrong with that? Beats storing it in a database. If you're on a *nix esp., there's a bajillion file state systems that you can pick up that really eases this sort of thing.

  • (cs) in reply to Severity One

    If you need to store structured data in a database, why not just use a document database like MongoDB or CouchDB? They're designed to store, retrieve, and manipulate data as JSON so you don't even have to write wrappers half the time. And CouchDB can basically do the hosting for you so you don't even have to write a web service.

    But I guess real developers are too busy fitting square pegs into round holes to bother thinking laterally and using a better solution.

  • Guru (unregistered) in reply to Soviut
    Soviut:
    If you need to store structured data in a database, why not just use a document database like MongoDB or CouchDB?

    They really named their products that, or you just mocking up names from your head?

  • Luiz Felipe (unregistered)

    Ist storing everything on database same problema as *nix people that think everything must be a file. Some people think that all things is records and tables. If all you have is a hammer, all looks like a nail.

  • Luiz Felipe (unregistered) in reply to Guru
    Guru:
    Soviut:
    If you need to store structured data in a database, why not just use a document database like MongoDB or CouchDB?

    They really named their products that, or you just mocking up names from your head?

    Yes it is, there also somthing like Voldemort and Cassandra.

Leave a comment on “The Über Logger”

Log In or post as a guest

Replying to comment #:

« Return to Article