The real wtf is in using something that relies on a "very strictly controlled Windows environment" to work without requiring your users to reboot. I believe it's time for one of your users to come down to IT support and give you a righteous beating for wasting their time on broken software.
olsner
@olsner
Best posts made by olsner
Latest posts made by olsner
-
RE: User Oblivion
-
RE: Interesting difference here, can the experts explain this?
You have not grokked the difference between an n-dimensional array and an array of arrays. The Java array is:
T myarray, where T=U[], where U = V[], where V = W[], where W = int - note that types T and U are 1-dimensional arrays of objects and V is a 1-dimensional array of ints
while the C# array is:
V[,,] (3-dimensional!), where V = int.
Not that I know C#, but I still can guess :P
-
RE: Origins of WTF coders
Dear God!
He actually teaches a "course" at a "university" based on this book!
More horror at http://www.franca.com/cmps060/
-
RE: Precise time
[quote user="runegri"]
You also have AddTicks that adds a number of 100-nanosecond ticks to the DateTime. And the datetime is actually measured as the number of ticks since 12:00 midnight, January 1st 0001 AD.
[/quote]
Are you sure? I thought it was 1600 AD (which is possibly even more WTF - 0001 is at least a pretty even number (1 being the second integer, but indeed the first year...)). At least, the Win32 API uses that time (epoch=January 1st 1601) for files: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcekernl/html/_wcesdk_win32_filetime_str.asp
And I can find no mention of how this time measure interprets the several changes in calendars we've went through since that time. And I'm quite sure that none of you really know how many years ago year 1 actually was (years, months, days, hours and seconds have all been fudged by arbitrary constants in the calendar shifts).
-
RE: Default password
Perhaps the idea is that you print (and preferably read) the instructions *before* formatting the server and starting the installation CD you probably know nothing about.
Or just COPY file.txt LPT1: - works nicely if the printer&file is postscript or if the file is plain text. If you need to use a network printer, you'll need to install it first - then you can set it up as a virtual LPTn: port to use with COPY, or just use it as a normal printer with Notepad.
If the installation instructions are in HTML, you'll be out of luck unless the server a) has Internet Explorer (yay! servers with insecure web browsers!) b) you want to read it all in HTML code.
-
RE: Unary arithmetic
Let's break it up: (analysed to the best of my regexp abilities.. YMMV)
^...$: The whole string must match ...
Now, the outer parens contain two cases and a special ?: operator in the beginning:
(`) ?: makes it so that the string matched by the enclosing parens isn't captured as \1 - I guess this one's optional, but makes the (b) subexpression less confusing
(a) 1? - matches 0 or 1 '1' - i.e. the two special non-primes.
(b) (11+?)\1+ - This one finds n-(n>=2)-multiples of strings of 2 or more ones using a back-reference. i.e. for 42*'1', this part of the reg-exp would match \1 = "11" followed by 20 copies of \1. By using (11+?), the shortest sequence of ones (minimum length 2) is chosen for the back-reference - i.e. the smallest factor of the number is in the \1 and the largest factor is the number of times it is matched by backreference. Which is why 42 matches 2*21 instead of 7*6. I can only guess that it is done like that for efficiency.
Now that I almost understand it, it doesn't seem that awesome anymore, but kindofa neat trick to have up one's sleeve - should impress the cow-orkers.
Edit: Whatever... the previous poster probably said it better ;-)
-
RE: Not so C++
[quote user="HeroreV"]... you'd just be dipping into a big bucket of bits with no safety checks.[/quote]
But that's what C++ is good for! The big bucket of bits without the safety checks is what it's all about! Absence of {raw bit buckets, unchecked casts, pointer arithmetics, ambiguous grammar, (2^k; k much larger than 1) ambiguous and unintuitive precedence rules} makes Jack a dull boy, you know.
-
RE: A flamewar on java dev forums WTF
Allow me to misunderstand and redefine all terms used in your previous post when I say: Java dont uses call-by-value for objects (just another name for passing an objects by-value instead of the actual value of the object). this why the three-wire design of JSP isn't by the J2EE design document PROPER. Just by passing by-value of objects it is! But you must count the client in, otherwise the previous proof isn't proven - at least that is what thet say with the design document (I have read this, if you say not you are incorrect!).
How many posts like those posted by daFoi over there, are posted and moderated to oblivion over here? Any moderator willing to share their experience?
Or are we in fact so lucky as not to have such moronic posters at all in this forum? I sort of find that inprobable, even though this site is so much more serious in contents, I mean some of the posts here must strike some nerve even in daFoi's mind. OTOH, he probably finds most of the WTF:s prime examples of How It Should Be Done(tm) in the Real World, and the Real WTF in daFoi's mind is always that we don't understand how infinitely clever the code in the WTF is.
-
RE: Google code search
Now THIS is why I never comment my code - you just never know where those comments are going to end up!
-
RE: Solaris /bin/true
Most systems already come with a fully functional filenotfound utility.
/bin/filenotfound; echo $?
zsh: no such file or directory: /bin/filenotfound
127
/bin/true; echo $?
0
/bin/false; echo $?
1