An experimental category for Megatopics that grew from the Sidebar
8
Topics
104615
Posts
@Zerosquare said in WTF Bites:
It's basically called stack ranking, and MS was known to practice it in the past. Make of that what you wish.
Now we can do Stack Overflow internetpointzzzz ranking!
Code Snippet of the Day - self-submissions for code snippets that shouldn't really exist.
304
Topics
11697
Posts
@izzion said in Visual Studio WTfs:
I wouldn't want to be on either side of the bet that Framework 4.8 is going to be available in Windows 12.
I can fairly confidently bet that it won’t be; if it ships with the OS it’ll be 4.8.1 or later.
(It will be… interesting… if they put .NET Framework 4.x on the standalone-component train like 3.5 but not the VB6 runtime.)
@GettinSadda said:@RayS said:BTW, you can't meaningfully "double" temperatures. :-) Yes you can - 50K is twice as hot as 25K I meant not in C/F. Yes you can double Kelvins.
@Corona688 said:Stop doublespacing everything. Let me write!
In most WYSIWYG HTML editors you find on forum and blog software, Enter is a paragraph break and Shift+Enter is a line break. So a bare enter looks like
this, while shift+enter looks likethis.
Tribal knowledge. Ought to be documented somewhere, but apparently isn't.
@Saladin said:If I had a nickel for every web site or message board that e-mailed me my password in plaintext after registration...
My preferred mechanism has always been:
- Email temporary password in plaintext- On first login, require password change- Store password as one-way digest- If password is lost, CHANGE THE PASSWORD and return to top
That said, I've joined SECURITY forums that sent me my password in plaintext.
However, I have one password I use to register at every site. If I decide I care about the place, I change my password. Usually, password changes don't get emailed to you at all. This minimises the number of passwords I actually have to remember, without materially decreasing security anywhere that it matters.
@skztr said:"Overlapping" doesn't mean they have the same start/end points. I in no way meant to imply that.But in this case, you only got the "overlapping" error because every now and then it was trying to copy data on top of itself. Were it merely "overlapping" that might be a separate issue, but here we can clearly see that this is a case of a source and destination column being the same thing. Were they not the same thing, they would not overlap. Um, no.memcpy() is a C function, used for copying memory. It takes a source pointer, a destination pointer, and a length in bytes. It has no concept of "database column", and it's perfectly possible for the pointed-to areas to overlap even if the pointers aren't the same, when you consider the length. It's a fast, dumb copy, which doesn't consider overlap; for things where there may be overlap, you use memmove. That's what it's there for. Hardly a WTF, except in that they didn't use memmove in the first place for something that's not guaranteed to be overlap-free.
@aikii said:I wanted to add this update but it's too late : You might be skeptical as I don't provide factual examples, but I don't
update my server too often ( I don't want to loose hours on this again
). This would be the problem; you're not using it correctly.In a binary distro, letting software get out of date means you have... old software. In Gentoo, it's not just applications you've let grow mould, it's all your build tools too, and what's going to build without those? System updates don't take much time if you let it do them when it wants to(as opposed to software updates, which I generally put off unless I have pressing reasons), but ignore them at your peril.
@DigitalXeron said:
Google
Google
Amusing I will say - especially for the unsuspecting people who wonder where the extra units are coming from Maybe to torture people I'll start measuring data rates in teaspoons, cups, jugs, etc per secondI measure fuel economy in square millimeters all the time.
@vt_mruhlin said:I generally advocate letting users use dumb pins if they feel like it.
That's why I said "If I wanted to avoid insecure PINs". I never said that was smart; I just think that given the parameters of the algorithm (avoid insecure PINs), 1357 and 0369 (along with 2468 and 3579) are insecure. So why are they false negatives? You're still eliminating less than 50 possible PINs, and if you reduce the keyspace by less than 1/2 a percent you're honestly not making that big a difference.
'They' are accessing your data!
I think I saw that exact same error after putting a 45 degree bend in a thumb drive plugged into the front of a machine. The db was on that thumb drive.
I straightened the usb thumb drive and it would then allow read access, but no more writing.
@acne said:Sure, but your bootloader is password protected against any non default kernel line, right? Or you might as well use an empty root password...And I know that any password may be changed without knowing it, but what if you get that dreaded "Enter root password or hit Ctrl+D to continue"? If access to the console is restricted, it's IMO not necessary to do protect the bootloader. On the other hand, in a very confidentional environment, you have to use encrypted filesystems as well, since someone with access to the console might as well take the harddisk out of the box and mount it on another computer.
I'm such a smarta$$, that I would have sent them the message formatted as:"Hi period I would like to know between what times my parcel will be delivered question mark Its scheduled delivery date was today dash will it still arrive today or is it going to arrive tomorrow question mark It's currently 1800 hours so I wonder what the cutoff time is since this is a residential destination period Also out of interest comma how long does the web tracker lag behind actual events question mark"Of course knowing my luck with web forms, they'd also have a silly word limit of like 100 characters...
When I signed up with Earthlink (been an Earthstink customer a long time now ... wow. Anyway ...), I got a CD at Fry's (electronics store here in So Cal; not sure if they're related to the grocery stores in Arizona), then a "helpful Fry's representative" helped me to fill the requisite information in the online form, using the store's Internet connection.
@Jojosh_the_Pi said:Dang! That looks like my early CSS efforts. I'm still embarrassed about
it, and worse, I think it's still being used for part of our company's
website.We've all written code we're ashamed of, it's the fact that we can recognise that and do better next time that stops us being awful programmers. Anyone who thinks that everything they've ever written is gold, is probably awful at their job.
I like how they make use of not one, not two but three different 3D systems, each with its very own set of angles:First there is the "flat screen", complete with skewed window contentSecond there are the 3D features of the fake scroll bar and the borderThird there is the graph itself... Talk about consistency...
@kirchhoff said:Error: Success messages are never because of errno, in my opinion.That opinion is.. well, pretty stupid. The aforementioned BitchX bug was an errno leak related to a misplaced close() call. Ergo, you're wrong - there exists at least one such bug, so they can't "never happen", and you had all that information before expressing your 'opinion'.
@Fred Foobar said:@newfweiler said:@webhamster said:I worked in a gas station during university. The number of people still flummoxed by the pump and/or the car wash is just stunning.
Around here you put in your credit card and it says, "ATM/Debit Card? Y/N"
As opposed to what? Yes it's a card. No it's a credit card. You've got the card, you stupid machine. Look at it yourself.
Some cards can be used for both, though. I personally run my card through as credit rather than debit all of the time. The reason? My bank charges me a 50 cent per-transaction fee for use as a debit card, and nothing to use it as a credit card. get a new bank.
you can resize the cmd console in windows. RIght click on the bar at the top and go to properties. Then go to layout and increast the windows size values to like 1000You don't use console applications much, do you?
The dinner menu, which happens to be the same as the full menu, contains two different "Chicken Maytag"s, with two different prices, and two very different descriptions. That'd be quite the pain in the ass for the kitchen/waiting staff. Plus, they've named it after an appliance-making company.
@bstorer said:Have you considered one of [url=http://www.coindispenser.com/mc75.jpg]these?[/url]
Now you can look like a carhop attendant for [url=http://www.sonicdrivein.com]Sonic[/url] wherever you go! Brilliant.
Logged on to check my million dollar portfolio contest entry (of which I am doing not so well in), maybe its because I dont know why my Total Return % should be so precise?
@RayS said:@Saladin said:@Kyanar said:Actually, it's not even HTML. That beast is XML with a custom DTD.
I guess that's what I get for not looking too closely at it.
If by "too closely" you mean "the first 5 characters" then yes.I just paged through it really quickly, actually, and just looked at the overall structure of it without actually reading any of the text itself, if you can believe that. And, based on the OP's post, I had no real reason not read the actual text to see whether or not it was HTML.
...Anyway. :P
@triso said:@RayS said:Oh, and AARGH! on the rack height. The last rack I had to set up was off of a narrow (barely wider than the rack) corridor. The feet had to come off the bottom, and the doorframe had to be removed to ge it in there. Even then, there was some scraping.[b]D[/b]on't you just tip it to a 45 degrees angle to let it in under the door frame.Not really. There wasn't enough room on either side of the door for that. Oh, the false ceiling in the "server room" is all of a few inches higher than the top of the cab, so it wouldn't have worked for that reason either (we considered moving the semi-fixed equipment until we noticed the ceiling issue too). Anyway... I just noticed the title. The real WTF is that I can't spell scew (sic).
I think I may have discovered the reason for the removal of the original page:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_core_the_user_interface_guidelines_for_microsoft_windows.asp
Why encourage software makers to use best practices for free, when you can charge them for it?
@annc said:
No no. Exceptions are exceptional cases. DiaperException, HungryException, and PlayfulException are almost expected when calling baby.sleep().
Perhaps I'm missing something here, but isn't "almost expected" the same thing as "not expected"?
Or should we be catching expections?
It's easiest to browse MSDN from Visual Studio, but I don't have a problem with it online, you get used to the layout, and can find what you want very quickly after you become accustomed to it. There's just a LOT of info on there.
In this case I'd say you're taking games a little too seriously :) I find nothing wrong with a friend list in an online game. I'd say in this context "friend" is not too disturbing, since there is some in-game social interaction. Oh, well, some lonely geek having his entire social life in an online game is another problem, but if a "friend list" in a online game is a problem, then the entire concept of online playing is a problem. Well, that's how I look at it.
@asuffield said:@jes said:Another and perhaps more interesting discussion would be whether the entire concept of autovivification is a good idea. It certainly removes the ability to catch a certain, probably not uncommon class of errors - misspelling a key name in a sub-hash:
I have already told you that perl provides this if you want it. The perl philosophy is to provide things like this *only* if you want them, so it's not the default.(Your examples will be caught under 'use warnings', and you can get exceptions by using restricted hashes or pseudohashes) Care to amplify on how 'use warnings;' will catch such a typo? It doesn't produce any warnings under Perl 5.86. Yes, using Hash::Util does allow trapping such errors, but at quite a cost for programs where hashes are used to collect and order data from a wide variety of sources. It's unlikely to be commonly adopted simply to eliminate the effects of typos. But use warnings by itself is insufficient:jes:/usr/home/jes$ cat x.pluse strict;use warnings;use Data::Dumper;my %thing;my ($customer, $sales_tax, $this_invoice_amount) = ("fred", 1.75. 22.79);$thing{$customer}->{separate_invoice}->{total_sales_tax} += $sales_tax;$thing{$customer}->{seperate_invoice}->{total_amount} += $this_invoice_amount;print Dumper(%thing);jes:/usr/home/jes$ perl x.pl$VAR1 = 'fred';$VAR2 = { 'seperate_invoice' => { 'total_amount' => '22.79' }, 'separate_invoice' => { 'total_sales_tax' => '1.75' } };jes:/usr/home/jes$ And re. your other comments in your reply to boh:@asuffield said:Perl hackers want people to learn perl. If it is obvious that
a person has no interest in learning perl, we're all better off if they
don't use it. It's usually quite easy to tell which group a person
falls into - the ones who begin with a rant about "how much better
python is" are not interested in learning perl, and it is a waste of
time to try changing their mind on that point.Nobody sane
wants to encourage programmers who suck. Someday you might have to use
something that they wrote, and then you would regret it. If you are directing these comments at me, I'd point out that I didn't say "how much better Python is". Perl has its uses and in some areas is far more convenient than Python. It also has its built in oddities and a distinct lack of an overall design - it's a lanuguage that has been around for a lot longer than Python and has grown by accretion, not always in what I would describe as an orderly way. That observation and my initial posting hardly constitutes a rant, nor have I seen anyone else in this thread 'ranting' about the relative merits of one language or another. I certainly find Perl's integration of regular expressions to be very convenient when programming when compared to many other languages. As to whether or not I suck as a programmer, or whether programs I've written are useful or maintainable, you have zero evidence to offer any opinion on that matter. You do seem unduly disturbed that I have pointed out that Perl's documentation doesn't match it's behaviour very well and that the effects of autovivification leave some nasty surprises for the unwary.
@pcooper said:I've seen this kind of thing in VB6 before, although the fault is partly in the COM object not correctly following the specs.You see, the Boolean data type in VB6 is 2 bytes in length. (Yes, 2 bytes. Really.)False is represented internally as 0 (&H0000), and True as -1 (&HFFFF) (For those not privledged enough to work with VB that much, the "&H" is equivilent to C's "0x"). You never see these representations in VB, but that's how it works internally. The Not operator in VB is a bit-wise not. This works just fine on the Boolean values above.However, a COM component might not follow the rules for the Boolean data type exactly, and could put a value of 1 (&H0001) in a Boolean value to mean True. When used in a conditional, VB also treats this value as true. But, when you use the Not operator on it, you get -2 (&HFFFE). Which since it's not 0, VB also treats as true.So when looking in the debugger, the value of the variable is True, and value of the Not of the variable is also true. Which means that I've actually written "Variable = (Variable = True)" in my code, in order to fix this crazy problem. (And yes, I had a big comment above it explaining exactly why that line of code was there.) Noted and filed in the appropriate mental directory. Thank you.
@tchize said:@m0ffx said:The Real WTF is that they said "move". Forces don't move objects, they accelerate them.
Or they just keep them in motion when there is a friction force :)Damned high school physics. All those Frictionless pulleys and massless strings. See what happens? You get someone who thinks that the engine of the car is only used to get the car up to highway speed, and then you don't need it anymore.
@merreborn said:You know, I pretty much expect that from website search functions these days.
Ever notice how it's far more effective to google "site:youtube.com <SEARCHTERM>" than it is to simply search <SEARCHTERM> via youtube's own search feature?
The real failure is that Google bought youtube, and they're migrating everything over to youtube. I friggin hate youtube. it is slow, you can't seek the videos (scrub, for you video snobs), and it's slow, as well as the fact that it is GOD AWFUL SLOW. man i hate youtube.
Alpha on a publicly-advertised product is just marketing-speak for "we know there are a lot of bugs in our application and we're not going to bother fixing them."
@Fred Foobar said:@VGR said:I suspect there is a dependency issue, but the WTF is still the error message.Dependency indeed. The reference client is written in Python:[code]$ file which bittorrent/usr/bin/bittorrent: python script text executable [/code]Grab Python 2.4, and you should be good to go.
Python 2.4 was present from the start. That's why the previously installed version (BitTorrent 4.4.0) worked (until I deleted it, of course).
I looked at some of the source, and while I don't know Python, it appears the error message is emitted from a "catch ImportError" block. So, if any import of a library on which BitTorrent depends fails, I apparently get a catch-all error message that naively claims I must have multiple versions installed.
@GeekMessage said:@Saladin said:I believe the OP is saying that his professor uses the word "fail" when he means to use "file." e.g., "data fail" instead of "data file."
So a "fail of fails" would be a "dairectory"?
TRUEFALSEFAIL_NOT_FOUND
Right now, I'm looking at a Dell 1907, rotated 90. (It lets me see a lot more code that way; it's quite nice.) I'd like 2 more, but I'm not the one paying the bills here.
I've turned everything gray. Firefox, Word, VS, CCS, Outlook, everything. I've disabled most images and Javascript.
Why?
I'm sitting in an "open cube" environment with dozens of other people. People walk behind me all day long. There are two people in my little "cube village" right now. It's totally lame. It's really hard to get work done when you can't concentrate.
plus, what is all this ballyhoo about them keeping things or not if this famed archive.org doesn't have it on archive?
plus, plus, we can't blame current archiving practices or difficiencies on things that happened when tv was first invented. They were just happy to have something show up in a seperate room! </rant>
@Sgt. Zim said:Hey! I used to love those tubes of crappy generic Kool-Aid. Still do, actually ...
I love them, too - but it's still crappy! It's too sweet and syrupy and there's not enough of it.
@RayS said:Cancel = (MsgBox("Do you want to cancel sending and attach that file you mentioned?", vbQuestion + vbYesNo + vbDefaultButton1, "Dimwit, you forgotted somefink") = vbYes)End SubReplace "Cancel =" with "If ToCancel then Cancel ="Hey, you get what you pay for. I don't use Firebird, but little surprise that it has a "forget your attachments?" plugin. It's something that the webmail (windows live, yahoo, gmail) guys could really do with. I guess you can bodge something up with greasemonkey, but that just seems too messy.
In this case, the langueage was C and Unicode was a definate possibility. There could also be thousands of these calls in some cases so allocating the maximum space would be a waste.
Looking at the code, I would assume that the intention is to copy a file over another (possibly) existing file. The use of GetFileAttributes / SetFileAttributes would be to ensure that the copy succeeds if the target file exists. The copy will fail if the target file is read-only.
There are 3 issues here.
Firstly, if the target file does not exist, GetFileAttributes will return INVALID_FILE_ATTRIBUTES. If this case the call to SetFileAttributes is unnecessary and guaranteed to fail.
Secondly (as another poster mentioned), the use of ^= will toggle the read-only bit, not unset it. The correct syntax is FileAttribs &= ~(FILE_ATTRIBUTE_READONLY).
Thirdly, this ignores another file flag that can cause the copy to fail. According to the MSDN documentation: This function fails with ERROR_ACCESS_DENIED if the destination file already
exists and has the FILE_ATTRIBUTE_HIDDEN or FILE_ATTRIBUTE_READONLY attribute
set. This means that the correct code from above should be FileAttribs &= ~(FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_READONLY).