@bstorer said:
Oh, like when German characters in WWII films speak English with a bizarre cross between a German and British accent?
Yes, and like all latinos always say "Señor" in their sentences, even when they're speaking English.
-dZ.
@bstorer said:
Oh, like when German characters in WWII films speak English with a bizarre cross between a German and British accent?
Yes, and like all latinos always say "Señor" in their sentences, even when they're speaking English.
-dZ.
The question makes sense, and at least 2 answers are right, too. The original post asked how to remove duplicate values from a Hashtable. The Hashtable can most certainly contain duplicate values. All those who remarked that the question was wrong were confusing "values" with "keys". Keys must be unique, but values not necessarily.
dZ.
- "This voodoo magic seems to work fine. Just pay attention to the "new_item" square brackets when it's already returned as a list type in a function like llParseString2List(). I got a stack-heap collision error when I was composing an huge list by the usual way. This way has worked fine."
It's always fun to have voodoo magic for basic intrisic data manipulation, it makes the language more challenging. I mean, any weenie can do "list.add(item)", but without undocumented side-effects or arcane incantations that's just lame!
-dZ.
Wow, I lost count after Canada and UK became states, so I guess I missed a few:
http://video.aol.com/video-detail/obamas-59-states/1005427843
-dZ.
I've seen this before in an e-commerce web app I inherited from someone else a long time ago. The problem in that case was that the page set the session ID in the querystring, therefore when people sent each other e-mails with links, or when a search engine spidered the site, or when another web site offered a link to it, visitors would end up sharing the same session IDs, and by consequence, their shopping cart contents and billing information.
That was scary. And stupid.
-dZ.
@morbiuswilters said:
I think the language itself is pretty strong, though. It's fast and has a pretty clean syntax. It has tons of good extensions, is great at string manipulation and has primitve vectors/hashes. I think of it as perl without the cruft and obfuscation.
Funny, I think of Perl as "The fast and pretty PHP, with standardized calling conventions, native regexp support, and without redundant library functions, bloat, and nasty quote escape needs".
-dZ.
@AbbydonKrafts said:
I rarely log and re-throw. It's one or the other for me. All of my libraries simply re-throw. It's up to the application to do something with it. That makes for a beautiful stack trace. Heh.
I do the same. Whoever ultimately handles the exception has the responsibility of logging it. If nobody handles it, there is a global catch-all at the outermost application level which logs and, if necessary, terminates the application. The idea is that only those exceptions which are truly unforseen and, er, exceptional, should make it that far up the chain, everything else should have been handled (and logged, if necessary).
The reason I don't log and re-throw is that then you may end up with duplicate entries, with potentially different messages at different points of the call stack.
@vt_mruhlin said:
I do remember somebody talking about that. Whichever language they were referring to had an option of just saying "throw" that would throw it as the original type.
That's how it works in Delphi, where "Raise" is used instead of "throw" . If you call Raise E, you re-raise the same exception object, but lose the stack trace. However, if you call just "Raise", it will re-raise the original object with all its attributes intact.
dZ.
@spamcourt said:
@mallard said:
first byte is used to hold the length. Thus they are limited to 255 characters.But only in the old shortstring which noone uses anymore. The modern Pascal strings have 4 bytes of length information, allowing up to 4GB strings. And they are also null terminated, so they can be passed to C functions directly .
Those "old shortstrings" are in fact "Pascal Strings". The new C-like strings may be the way modern Pascal implements strings, but the name "Pascal String" is still used to refer to the old short strings of a maximum of 255 characters. Delphi documentation, for example, calls them "shortstrings", but it uses the term "Pascal String" interchangeably.
-dZ.
The real WTF is that they used VBScript.
-dZ.
@Zylon said:
Apparently I'm feeling very bored this evening...
Fantastic!!
Alex, would you consider modifying the MFD to have George draw the comics and Zylon write the dialog?
-dZ.
@EpilepticFridgeBoy said:
Ok, so I'm telling this from my own point of view, humour being subjective etc. etc., but like I said before, for this to be funny it can't simply retread the same ground as the other office based comics. This has the potential to be something new. The crazy outfit the boss wears hints at that. Zylon's retelling of 1.9 shows it. The "real" 1.9 misses the point, for me.
I agree. The comics so far are very lame (the artwork itself is OK), but some of the re-hashes shown in the comments so far have been funny while their only difference is the dialog.
As I've said before, the dialog tries too hard to be funny by pandering to the most commonplace stereotypes or memes, without offering any unique point of view. The setup is so simplistic that you can see the punchline a thousand miles away, and some of them don't even deliver.
I'm not trying to be rude, and I don't mean any disrespect to George; I just honestly don't find the comics funny at all. And although I somewhat agree with others that the style or technique of some other web comics such as XKCD, Penny Arcade, or Tira-Ecol may have been just as crude when they started, they have one undeniable difference from the MFD comics: They were pretty much funny (or interesting) from the start. Which is the reason they became popular early on.
And I enjoyed the comments because -- amisdt all the bitching and clenching of teeth -- there were some very funny remarks, and even a few genuinely funny bonus comics provided by the readers.
-dZ.
@Zylon said:
Damn! That's very funny!! :)
Now, where's today's comic by that guy that was doodling them in MSPaint in the forums?
-dZ.
@Alex Papadimoulis said:
This comic sucks, drop it This comic rocks, keep it No, you're wrong
No, you're wrong!
-dZ.
@bstorer said:
I know people who still work directly with the Windows API. They are sick, sad people.
I work directly with the Windows API. In fact, most of the time it's the most sane way to go in order to get stuff done reliably and efficiently.
I'll tell you what The Real WTF is: The Windows API itself! Now, that's sick!!
-dZ.
@asuffield said:
@clively said:Just take a look at the responses so far, here are supposedly decent developers arguing for a flat structure.
Congratulations, you have failed to learn how to read. Nobody has said that.
(Not that there's even anything wrong with flat databases like those used in an RDBMS, but the subject hasn't come up in this thread)
I'm sorry, but that sample table I mentioned in my original post -- the one most people here are arguing is perfectly fine and needs no real modifications -- is in essence a flat structure. I believe that was his point.
dZ.
@clively said:
Changes like this have to come from the top. If you can get the guy in charge (Dev Manager?) to do it, then everyone else will change or leave. If you can't get the guy in charge to do things the right way, then you have to either conform or leave.
And that's what I meant by "help with arguments": How can I "get the guy in charge" (or anybody else, for that matter) to buy into this idea. By the way, as I alluded in my original comment, my intent is not re-engineering the current system (although I would hope that would happen someday, at least piecemeal), but to influence others to *not* use such models when building new applications -- new applications which I may have to maintain. So far, this is the current de facto approach, even for mission-critical applications.
If you've been successful in the past regarding this problem, I would appreciate any pointers in conveying proper arguments in favor of a more relational model.
-dZ.
OMG... I should have known better than to post in here.
Do I work with any of you? He, he, he.
-dZ.
Does anybody know a good and convincing argument in favor of desiging and using a normalized relational database versus the flat-file-in-sqldb approach many developers take? For example, in the company I work for, many databases have long tables with columns such as:
recid
firstname
lastname
addrs1_1
addrs2_1
city_1
state_1
zip_1
addrs1_2
addrs2_2
city_2
state_2
zip_2
addrs1_3
addrs2_3
city_3
state_3
zip_3
special_code1
special_code2
special_code3
special_code4
special_code5
extra_special_code1
extra_special_code2
extra_special_code3
extra_special_code4
extra_special_code5
Every time a new attribute is needed, a new column is added to the table, usually just another "super_extra_special_code" or something like that. And then, of course, anything that doesn't fit there falls into the catch-all "key-value" table.
It seems impossible to me to convince anybody how bad and braindead that mess is, and whenever I propose a more normalized solution, it usually is met with resistance and suggestions of unnecessary "over-engineering". "Things just work," I'm told, "so what's the real advantage?". For every one of my arguments regardng performance gains, easier maintenance, conceptual integrity, etc. I am again reminded how everything has worked so far and have been maintainable -- in its own way, so again: why change?
Seeing databases like that make my eyes burn, but no matter what I say, its all perceived as "my way of doing things" versus "their way", neither right nor wrong; just two different ways. Then I feel like killing someone.
Can anybody help with some good arguments?
-dZ.
@HockeyGod said:
something like $max = array[sizeof(array))] to get the last element.
He, he, he, idiot! He's getting the last item of the array, instead of reversing the array and getting the first one.
Why use a sledge hammer to drive in a nail, when you can use a bazooka with a bit more effort. DOH!
-dZ.
Actually the mbox format is a fairly mature, stable and very portable file format for mailboxes. It is trivial to port the file to other formats, and exteremely easy to parse. And if all else fails, you can always open it and fix it by hand, if needed.
For you to appreciate its elegance, you must first understand its intended use, that of maintaining e-mail mailboxes. The delimiter line is intended to represent minimal "index" information, such as the sende and the timestamp, so that an index can easily be built. With a simple index of file offsets, you can scan the file efficiently for a particular message. Also, back in the elden days, in the long lost time before spam, most people archived their e-mail and there was little reason to delete messages, since most (if not all) of the messages you received were relevant or significant; so the flat, vertical format was appropriate for a continuously growing file.
Sure it seems ancient now, but that does not mean it is obsolete. E-mail had always an immediacy and significance to it, so it was always important to keep the data in a format that would be hard to corrupt and almost impossible to loose, and as easy to transport. After all, if for some reason, a single message choked up your mailbox reader, you were only a few keystrokes away from fixing it with a text editor; and always be able to retrieve data from the other messages in a pinch. Try doing that with a binary and compressed format.
And what about the possibility of corrupting the mailbox by a stray delimiter keyword? Well, that's a potential flaw of all deimited formats, be it tab, space, newline, or "From " line delimited. Heck, the SMTP protocol marks the end of the message data with a single dot (.) on a line by itself -- talk about a potential misinterpretation of data! That's why such formats build into their specification a requirement to escape the delimiter in some way. For CVS, is to quote fields containing the delimiter; for the SMTP protocol, it is to double-up single dots on a line (..); and for the mbox format it is to add an closing angled-bracket (>) to any line starting with the string "From ". This is done automatically by mail clients or even the mail servers (the same as they do for the SMTP dots), and completely abstracted from the end-user. The client (or the server) will then interpret the escaped delimiter and render it appropriately, just like, say, Excel displays CVS fields without quotation marks, and automagically adds them when saving the file.
As for it being safe "to move files in this format betwween mail clients", well it is -- as long as they support mbox format. However, the most appropriate way is to use a migrating tool (usualy available or built-into the application). This guarantees that any index or other necessary internal files are created. It also safeguards against some minor differences in the programs' assumptions about the file. Although mbox is a standard format, some programs differ in the way the actual context is stored. As pointed out already, some will automatically store all content as quoted-printable, or some may decided to add additional information to the "From " delimiter line (Eudora adds the sender's name). These things won't "mangle" or corrupt the file, but it may cause the application to interpret it differently, if it can't find the stuff it expected was inserted there by itself.
All in all, its still a relevant format today, and obviously very popular.
-dZ.
WARNING: This product contains chemicals, including lead, known to the State of California to cause cancer, and birth defects or other reproductive harm. Wash hands after handling.
Wow, that's neat! I can wash my hands and get rid of cancer and birth defects. Does the Mayo Institute know about this?
-dZ.
Not to sound pretentious or anything, but I would expect two months to be enough for an experienced developer to get aclimated to a new environment and start being very productive. If you oversold yourself on your resume then I'm sorry to say that its your own fault. If on the other hand they were aware of your lack of experience in their particular methodologies and platforms, but still offered you the job, then it strikes me as strange that they wouldn't mentor you further, expecting you to slowly "grow into" the team.
-dZ.
@Zylon said:
Y'know, no matter how many times I look up the definition of "developmestuction", my brain keeps rejecting it. It's a horrible, ugly, gangly abomination of a neologism with no intuitively apparent meaning.
"Develop me some stucco suction", perhaps?
Its Alex's "cute" term for an environment that is both for "development" and "production" at the same time (developme-s-tuction, gittit?). I agree that its lame.
-dZ.
@Alex Papadimoulis said:
LOL -- you see, this is why I have tried to become more "strict" with the comments. It was at 220 when Michael mentioned it to me, and at that point it was just too late. Poor Poor Mr. O'Hare -- an otherwise fun article, burned up by a flame war.
Kinda interesting though -- I think the whole thing coulda been nipped in the bud by the one guy who trolled "shoulda used a real lang like CF". Ah well, expect some changes soon -- I'm going to be upgrading the site to CS 2.1 and adding in a Custom Moderation feature.
@bobday said:
Of course, there's no documentation at all - I've been reverse-engineering the protocol from the server's log output and the source code.
But its not as good as the messages I get from the firewall at my office, which says:
<font style="font-size: 14pt;">This site has been categorized as: Personal Pages, and may contain unsuitable content.</font> <font style="font-size: 11pt;">Proceed only if you are comfortable with viewing such content. </font>
<font style="font-size: 11pt;">
Request: http://www.wikipedia.org/ </font>
If you wish to continue, click here:
The author added this comment to explain that it is a joke:
----
<font face="Tahoma" size="3">Note: On August 11th, this site was Dugg by somebody (not me) and it obviously received a lot of traffic as a result.
</font>
<font face="Tahoma" size="3">Yes, the site is meant as a joke. I had
bought this domain a while back but haven't had time or a great desire
to develop it yet so I decided to make it into a joke until I did.
Although with all the backlinks and such now, I'll probably have to
keep it as a joke. The sad thing is that most web design companies
today vary differently from "Modulus Web Design".. sure they may have
evolved slightly but esseentially the quality is not a whole lot
different.
</font>
<font face="Tahoma" size="3">My name is Tyler Cruz
and I'm a web entrepreneur. I decided that since this site was Dugg, I
might as well try to stir some traffic to my new site I'm trying to
promote now: PublisherForums.com.
It's slogan is "Intelligent Discussion for Web Publishers" and should
give you an idea what the forum is about. If you're interested in such
discussion, I'd like to invite you to visit the site.
</font>
<font face="Tahoma" size="3">Cheers,
</font>
<font face="Tahoma" size="3">Tyler
</font>
Its funny, but it could have been worse. It would have been a bigger (and funnier) WTF had the buttons been the traditional "OK" and "Cancel":
----
You Have Unsaved Changes. OK To Cancel?
[OK] [Cancel]
----
dZ.
@hetas said:
@GettinSadda said:These days there only seem to be two that get used - LF only in *nix and CRLF in Windoze.IIRC Macs use CR only.
I have to disagree. Although the coder is certainly an idiot for doing things like that, VB is notorious for encouraging such braindead behaviour. Just think: a programming language that wants to be all things to all people by offering convenient access to OS API, COM and other underlying frameworks, but whose only exception handling primitives are an unconditional ignore or a generic goto.
Those who "learn" to program on such platform are usually damned to do such things.
dZ.
So, if you save -$80.00, does that mean you owe them?
-dZ.
@R.Flowers said:
@Thalagyrt said:@GettinSadda said:I think that you should compare this with the following article:
http://thedailywtf.com/forums/thread/84085.aspxEr, 10 points for linking from the thread to the same thread.
And 10 more points. And 10 more points. And...
@ammoQ said:
@triso said:<font size="5">I</font> can´t even read it. It looks like the English was computer translated by Google or Babbelfish. Neither one is any good on a document longer than four words.
I've read the German text (German is my native tongue) and I can tell you: it's not a translation problem. No, not at all. This guy is really talking bullshit. I guess he was high on crack when he wrote the web page, or maybe he'd heard some crypto buzzwords and could not make sense of it, but used them on the web page anyway. Or maybe both. I wonder what kind of program you would get for the 100 Euro he wants; could be nothing at all or some rot13-VB-program.
@phlox said:
<font face="Courier New" size="2">http://kryptochef.net/
^I found this site on the net. Its about a really secure encryption
program, the best of the world, at least the author thinks so.
Well, I am gonna leave that to your own judgement :D</font>
@triso said:
<font style="font-size: 36px;" size="5">I</font> can´t even read it. It looks like the English was computer translated by Google or Babbelfish. Neither one is any good on a document longer than four words.
@themagni said:
Sounds more like wrapping a pillow around your thumb so that it doesn't hurt that much when you hit with the hammer because, for some reason, it keeps landing directly on your hand.@merreborn said:
"load-bearing" print statements?
Are we talking about something like, print $x++;?A load-bearing print statement is one that is required for your code to run correctly. This happens because the printf statements (and all their derivatives) take a loooong time to execute. While they can be used to create a delay, it's sort of like using hammer to drive a screw in because you either can't find nails or can't be bothered to look for a screwdriver. Edit: Actually, it's more like using a rock because you don't know what hammers are.
That's because, although Perl's definition of an array may seem too liberal, its still as string as in any other language; it just looks that way.
Perl arrays are indeed a list of like items. In your example, references, numbers, strings, lions, and bears, are all of the same basic type: scalars, which is one of the very few "intrinsic" data-types in Perl.
-dZ.
@Eric Shinn said:
<font face="Arial">Having strings and numbers as the same thing is nothing like assembler.</font>
@jesirose said:
I've been adding some features to a program at work, and at one point had to view old transaction records in accounting - imagine my glee to see:
Enter date in this format: 06/05/06
@xrT said:
@nipper said:The hot foosball chick is sliding away from the top-sponsor slot grieves
<font face="Tahoma">Am I the only one who doesn't seem to see any foosball chick out here?
All I see is a blank "Sponsored By" section between the "Navigation" and "Sidebar WTFs"
</font>
I use Firefox with the Adblock extension, so I am blessed with a lack of adverts on this site and others. I honestly don't miss them :)
-dZ.
Actually, Delphi is a very mature and robust language, designed by Anders Hejlsberg, the same architect of Turbo Pascal, C#, and other frameworks. The problem that you are seeing is not a deficiency of Delphi, but a misunderstanding of how it works. An array is an intrinsic data structure, but a multi-dimensional array is not, and is treated as an anonymous user defined data structure, therefore they are different. It is not strictly an array of pointers, even if it is implemented as such at the lowest levels. You could, of course, create an array of pointers and it will work just fine, but then you'll have to typecast or dereference the items yourself manually.
You can easily make it work by just creating a named type and using that in the function declaration.
dZ.
@Waterfall008 said:
@dhromed said:@foobar2005 said:I want to say 'First!', but then I'd be like those other loosers
Too late.
I hae no idea.
(a) doesn't get passed as argument while a does?
Parentheses on an int have special meaning?
Actually, it's quite complicated. I found a blog posting about it here:
@foobar2005 said:
this file can be run as sh script, php, perl, tcl, haskell, python or compiled as C/C++
http://blog.sykosopp.com/wp-content/rulethemall.txt
@Jeremy D. Pavleck said:
The worst thing is duct tape on a car window. My electric windows actuator went out, so I just taped the window up in place until I had time to take it in. Well, 5 months later and I get it fixed, and the tape residue is near impossible to get off, I've tried everything.
Whatever you do, do NOT use Gorilla brand duct tape - they aren't lying when they say it's stickier and sticks to things others wont. I love the stuff, and it held the window up like you wouldn't believe, but months later I'm still fighting with the goo. Blech!
I might just pay for a detailer to take car of it for me - let em work for their pay!
@Alex Papadimoulis said:
@drf said:
<font face="Arial" size="2">Removing this attribute in forum.css would fix the behavior.</font>Good find! I do prefer having this attribute there, however, as someimtes the posts get wider than the area allowed ... for example, you'd hate to have this break the whole layout of the page:
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
@Xarium said:
<font face="Tahoma" size="2">
No technology can fix a bad design.
</font>