An experimental category for Megatopics that grew from the Sidebar
8
Topics
104741
Posts
@Tsaukpaetra said in WTF Bites:
@ixvedeusi said in WTF Bites:
So yeah, given that second step in this sequence, maybe Windows just decided to decline my request to turn off fast startup. OTOH, all the shenanigans happens before any WIndows screen is shown so I was thinking that this is all done by the EFI firmware.
Most likely the latter, probably due to their implementation of Secure Boot.
That being said, WTF, are you using a Server/Workstation motherboard? Holy shit, even my crap doesn't take two minutes on cold boot to even start loading the OS bootloader!
I don't think it's two minutes, but my machine does take a bit to get to the spinning circle thanks to all the drives I have hooked up. The BIOS UEFI's gotta check each and every one to see if it's bootable, especially those external USB hard drives that don't spin up until requested.
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.)
Error'd - features fun error messages and other visual oddities from the world of IT.
468
Topics
11434
Posts
@BernieTheBernie said in Error'd Bites:
@boomzilla That's merely a little mix-up of Big Endian and Little Endian.
It's just the latest standard™. After slot, tri-point, Philips, Pentalobe, Allen, double-square and 12-point, behold: the InfiLobe!
He should really have made a function that creates a list of disks and
a list of partitions for each disk, depending on OS. And then a
function to read the first 512 bytes from a file-like object, and a
function for converting a list of bytes to a hex dump. Computers should
explode with great violence and wipe out the neighbourhood when programmers use copy+paste. That would really teach people about code reuse.
As to the question of 50-char versus 2-char var names, the perpetrator
of this code probably has a Fortran trauma (see his wiki space); that might explain his morbid preference for variable names that are longer than the
expressions that assign to them.
ClaudioGrondi - Python Wiki
Link (as if) to perpetrator's wiki page
This is completely stupid, any value or object gets promoted to boolean when used in a JS boolean operation anyway, if it exists it's positive, if it doesn't it's negative, specific values may cast differently ("", 0 and "0" all cast to false)
So no, it's not "best practice" of anything, especially not if the variables are always defined, and even less if they're already booleans
Exactly my first reaction too, but he was looking so convinced of it that I had a doubt
@Savior said: WeblogPermission fpFinal = section.ResolvePermission(user) as WeblogPermission;
Casting like this calls for a 'null reference check', otherwise cast the standard way:
WeblogPermission fpFinal = (WeblogPermission)section.ResolvePermission(user);
Maybe I overlooked, but this is the only WTF I found!
I love these bits of code:
if(query.HasCategory || query.HasNoCategories)
If it has a category, or it doesn't have a category. or this 'if' statement is extremely redundant, then...
Later on:
if(!query.HasNoCategories && query.HasCategory)
If it doesn't (not have categories), or it (has a category), or (x), or not (not x), then..
I also like the mixed pluralization (plural "HasNoCategories" yet singular "HasCategory").
Telligent...
/// <summary> /// Returns the time of the last modified post. Might be able to move this to the base /// </summary> protected override DateTime Modified { get { if(posts != null && posts.Count > 0) { return ((WeblogPost) (posts[posts.Count -1])).BloggerTime; } else return new DateTime(2004,1,1); } }
If you are in the US then take a look at
<http://www.consumeraffairs.com/insurance/insurance.htm>.
Google will find other sources if you are elsewhere.
Theres quite a few gems on that "glossary" site(http://www.hyperformancemedia.com/Glossary.htm):
<font color="#808080">
<font style="font-size: 11pt;">Bandwidth</font><font style="font-size: 11pt;">
- It’s the way that bits are transferred between the server and visitor to
a web site. The most common bandwidth is a 56k modem. The amount of
bandwidth affects the speed that the information is sent.
</font></font>
priceless....
excuse me while I correct myself (maybe it'd help if I read what I was replying to)...
I think that rounding down 0.5s would be an uncommon round. I've personally never encountered it.
@Alex Papadimoulis said:Although it didn't make the Wiki, there is one place you can now find it: a coffee mug.
Gifts - CafePress
Looking for the ideal Gifts? Come check out our giant selection of T-Shirts, Mugs, Tote Bags, Stickers and More. CafePress brings your passions to life with the perfect item for every occasion. ✓Free Returns ✓100% Satisfaction Guarantee ✓Fast Shipping
As an aside, a nicely written article!
Thanx! :)
-dZ.
(And thanks also to all those who edited it).
A year ago I inherited a web project that had over 300 code files, All their classes inherited from the same base:
Public Class TNSPage
Public MustInherit Sub ProcessIt()
End Class
Then all the subclasses had stuff like this:
Public Class Foo
Inherits TNSPage
Public Var1 As String
Public Var2 As Integer
Public Overrides Sub ProcessIt()
' Starts Everything Running <- Their comment, not mine.
End Sub
End Class
No property procedures, just public fields, and everything has a ProcessIt method that's MILES long, making hundreds of thousands of hits to the database. And it all went something like this: (no stored procedures here. Just bare SQL thrown at the server)
Get a SqlDataReader on several hundred thousand records, then loop over them, loading them into a HashTable, then loop over the hashtable loading them into an empty datatable (Which they acquired by re-running the same select statement with WHERE 0 = 1) and then loop over the data table doing minor manipulations, and then loop over the data table AGAIN doing an ExecuteNonQuery() on each record.
When I got done with that one, it was 4 SqlParameters and a stored procedure call.
Sheesh.
I second that!
It really REALLY bugs me. But not as much as Visual Studio's copying of empty rows!
Place marker on an empty row and hit ctrl+c and VS copies an empty row! Arrgh!
Man that felt good to get off my chest.
And in sweden the banks have started to put nails (like those punk
rockers wear all over.) around the cardslot on the ATMs. And once in a
while you're told to not use ATMs that doesnt have these as they might
have cardreaders installed.
(this didnt make front page so i'm posting here)
Well I was trying to fix a problem our rivals left us in one of our clients Navision system. This dude had functions to calc amount of days between two dates.. (syntax is pascal/delphi like.. Lithuanian var names). Here it goes: [I]
<FONT face="Courier New" size=1>function KalenDienø(data1 : Date;data2 : Date) visokd : Integerbegin //>> AL1 AD02 00.03.21 visokd:=0; IF data1>data2 THEN EXIT; dat1:=DATE2DMY(data1,3)*10000+DATE2DMY(data1,2)*100+DATE2DMY(data1,1); dat2:=DATE2DMY(data2,3)*10000+DATE2DMY(data2,2)*100+DATE2DMY(data2,1); dat:=dat1 DIV 100; a:=0; WHILE(dat<=(dat2 DIV 100)) AND (a<12) DO BEGIN ld:=KiekDienø(dat DIV 100,dat MOD 100); IF ((dat1 DIV 100)=dat) OR ((dat2 DIV 100)=dat) THEN BEGIN IF (dat1 DIV 100)=dat THEN yrakd:=ld-(dat1 MOD 100)+1; IF (dat2 DIV 100)=dat THEN BEGIN IF(dat1 DIV 100)=(dat2 DIV 100) THEN yrakd:=yrakd-(ld-(dat2 MOD 100)) ELSE yrakd:=dat2 MOD 100; END; END ELSE yrakd:=ld; visokd+=yrakd; IF (dat MOD 100)=12 THEN dat:=((dat DIV 100)+1)*100+1 ELSE dat:=dat+1; a+=1; END; //<< AL1 AD02 00.03.21end</FONT>
<FONT face="Courier New" size=1>function KiekDienø(met : Integer;men : Integer) ld : Integerbegin //>> AL1 AD02 00.03.21 IF (men MOD 2)=(men DIV 8) THEN ld:=30 ELSE ld:=31; IF men=2 THEN BEGIN IF (met MOD 4)=0 THEN ld:=29 ELSE ld:=28; END; //<< AL1 AD02 00.03.21end</FONT>
Uhm.. OK? But that's not even the point here.. Navision syntax allows some simple date math, like..
<FONT face="Courier New" size=1>function KalenDienø(data1 : Date;data2 : Date) visokd : Integerbegin</FONT> <FONT face="Courier New" size=1>exit(data2-data1+1);end</FONT>
Well, it's never fun to do it easy, eh? [8-)]
<FONT face="Courier New" size=1></FONT>
@Alex Papadimoulis said:How about ............
http://stupidity.synnottsoftware.com/id92cat19 .. ?
Woah! That is the ugliest site I've ever seen. My eyes are hurting from looking at it
@Ben Hutchings said:If you cut the power halfway through the reset then the stored
configuration will be invalid and the unit will presumably ignore it
and let you start configuration from scratch. It's still a bit weird
that it doesn't just use the default configuration in that case though.
It's really just a more forgiving variant of your power going out in
the middle of operation and your OS refusing to start because some
configs were truncated or corrupted. Ah, the sweet smell of fried
system 7 and windows 95 in the morning.
@Brendan Kidwell said:I was excited to get a new system image for my computer at work a few
weeks ago. Windows XP Pro and IE 6 and all that cool stuff. I just
noticed something weird about IE:
What are all those blank boxes in the status bar?! No indicator
icons when they're in their 'normal' state, no tooltips. The only one
that does anything while I'm on a normal web page is the second one,
which apparently gives me a context menu for the popup blocker if I
right-click it. Because this button is conveniently lalbeled with
absolutely nothing, I have to right-click them all if I forget which
one it is. I suppose the others are for stuff like SSL and whatnot,
when the browser is in those modes.
Is it just me, or does this arrangement just not make sense?
Double-clicking will give results for some of them. Numbering from the
left, starting at 1, the 5th box will give a message about security
certificates for the site you're at. I cannot get the 4th box to do
anything after a few moments of effort. The 3rd box brings up a window
regarding add-ons. Again, nothing from the 1st box.
The design of this is awful.
@Drak said:Lets see... the label has to be created... The
page has to be parsed (which it will be anyway, even without the
labels). The proper value's are to be inserted for the labels... I
think data transport would still take longer than any of this, except
maybe for the very first time.
You think that's all that happens - but can you really be certain?
I sure wouldn't bet on it when a framework is involved. In fact, I
would never bet on ANY performance estimation from anyone. The only
really trustworty source of performance information is a profiler. Of
course that also goes for the CEO, but we don't know whether his
distaste for labels is really unfounded or not. It may well be that he
was burned by some app where labels were abused and removing them
actually caused a big performance gain. Of course even then it's a big
WTF to fire someone over it without warning (if that's really what
happened).
That's not a problem, that's a feature - at least it is considered THE fundamental change of paradigm that John von Neumann introduced...
Okay, you read a little too much into that...
There's a difference between treating data as code and having code with the ability to modify itself. While you're correct about the impact of the von Neumann machine concept of treating data and code as different forms of the same thing, there is very little reason in modern computing for code to actually be self-modifying.
Code very, very rarely has to actually write other code programmatically. And the ability to do it is still there, you simply have to tell the computer "yes, I'm writing self modifying code" by setting a flag somewhere. Having the ability to write new code to memory and then run it by accident is the cause of this sort of exploit. That ability simply should not be available by default. You should explictly ask for it.
@ItsAllGeekToMe said:It wasn't until the package was on its way
back that he realized, that maybe.....just maybe.......there was a more
modern and much faster way to send an electronic copy of
something.Why didn't you tell him to use FTP then? Or nobody
had an FTP server setup?
@SnipeZ said:Reminds me of the way Sierra used to descibe these
"unknown" errors in their adventure engine in the DOS days.
"Oops, you did something we didn't expect"
Notice the "you" here
At least it was a honest and perfectly appropriate error message. Yes, I know how adventure games are programmed.
@Mike R said:@Generic said:@Mike R said:@Generic said:Hi, Mike.I'm new to C++. Started to program för Symbian Series 60 in C++ this spring.Just an small School- project for developing an Calendar application.I have got the feeling that variable i shuld be set. There is nothing that states that it is 0.And i wonder why do you declare the variable before the if-statement?>>Crosses Fingers<< Please be joking. Please be joking. Please be joking. Me like Mike. Mike is funny. But you did not answer my question. This makes Generic sad.Please make me happy by answering my question.Okay, let me spell it out for you in explicit terms. Because the code was a joke. Why do you think the post was swimming in sarcasm? Did you bother to read the discussion after the post? Apparently not. It was never meant to be taken seriously, or even work. Generally if I plan on doing a for loop like that, I initialize the variable in the initialization segment of the for loop. i.e. for(int i = 0; i < n; i+=11) etc...Some terms you may be unfamiliar with:joken.
Something said or done to evoke laughter or amusement, especially an amusing story with a punch line.
A mischievous trick; a prank.
An amusing or ludicrous incident or situation.
Informal.
Something not to be taken seriously; a triviality: The accident was no joke.
An object of amusement or laughter; a laughingstock: His loud tie was the joke of the office. See definition 1.sar·casmn.
A cutting, often ironic remark intended to wound.
A form of wit that is marked by the use of sarcastic language and is intended to make its victim the butt of contempt or ridicule.
The use of sarcasm. See Synonyms at wit<FONT size=-1>1</FONT>.
See definition 2.
I would like to inform you Mike that I have been practicing my skill, or lack of skill in sarcasm. But due to my logic way of thinking I find it hard.
Do you have any tricks that I could use?
@Alex Papadimoulis said:Here's a story from Michal Chaniewski that I thought was definitely worth sharing ...
<! SNIP !>
Our guys tryed to talk calmly and not to get their attention.
Suddenly there is a phone call to Matt, somebody has some problems with
a daemon on a production server, and Matt says: If you can't do it the
other way, just kill him.
After the call, one of the genlemen turns around, looks at our guy, and says: Respect, bro!
I wonder what they would have thought had the call been a bit more
involved, like say, dealing with a super-daemon with many child
processes:
-- "Just kill him. Yeah, make sure you get the children
too. As a matter of fact, kill the children first, one by
one. No wait, just kill him, that'll take care of the children
for sure."
He he he. :)
-dZ.
@rsynnott said:@felix said:Nice... There is a little thing called the GNU coding standard that
requires the presence of certain documentation files in the software's root directory.
Qt isn't under the GPL.
“GNU coding standard” == “GPL”? WTF?
While it’s probably not GNU coding standard directly, I have seen of a lot of free software that comes with empty README, NEWS, COPYING, and other files. That’s because GNU autoconf, which is used very commonly, enforces the presence of these files.
Ebay feedback is the best part of the whole site. It's hilarious -
especially for the obvious pirate resellers. Hey, lowest price + bad
feedback = must bid!
The homegrown checkout systems are the worst.
Brendan Kidwell wrote:
I agree with the poster above who says
that having the having one cyphertext and matching plaintext doesn't
really give you much help in a brute force attack on GPG, but I imagine
it's marginally better than starting with only the cyphertext.
divVerent wrote:
Wrong.
If you can break a public-key scheme given a number of
plaintext/ciphertext pairs, you can also break it without them. Just
choose your own plaintexts and encrypt them with the public key you
have since it is _public_.
[Brendan takes his foot out of his mouth.]
Duh! Gee, it's a good thing I'm not actually a security professional or anyhting. :^)
@Katja said:It is rumored that the next Delphi version will also include Borland C++ Builder so you'd have lots of choices to do your development.
Ah you mean like with Visual Studio?[;)]
@Katja said: Delphi 2005 is also able to compile VB.NET sources... Weird.
It's all included in the .NET SDK, so nothing more to do than check the file extension and choose the appropriate compiler. They keep it pretty well hidden though to prevent riots from Delphi minions...[;)]
I just migrated a pretty big project to D2005 from D7... I must say I'm pretty disappointed, I don't think there's a way for Borland to keep up with MS development. It keeps crashing, giving errors, and is extremely slow, refactoring very limited, etc etc.
Really, I think the only positive thing compared to VS.NET would be ECO II. C# is the language for .NET, the rest is only there for marketing purposes, there's not evenr real backwards compatibility.
@tiro said:<font size="2"></font>
I've always loved the phrase malicious cookies. Delicious little
chocolate chip treats with fangs. No idea how they're going to
destroy files though. Perhaps they'll eat them?
They're laced with arsenic.
And VBScript in a university computer science course? By a guest
lecturer. How odd. The lecturers here tend towards the view that
anything other than Eiffel-like things, Prolog-like things, and at a
pinch C, is beneath them.
Not an infinite loop, but (in)finite recursion. More like an
inward spiral, depending on the size of the domain, it has the
potential of eventually collapse upon itself, and therefore end.
An infinite loop doesn't necessarily consume increasing amounts of resources that would impede its "progress".
-dZ.
@DZ-Jay said:
So I guess that the poster was pointing out the irony of the
thedailywtf.com site offering recommendations for Visual Studio, after
all the VB bashing that is done on the site.
-dZ.
Visual Studio isn't inherently evil. Its a WTF if that was what was
pointed out. VB is just a wart that got tacked on to the development
suite.
RE: All the money in the world...
I was once looking for firewall software to test out briefly and do a
presentation on for a networks class (stupid assignment, but I had to
do it anyway). I found an "Armor2Net" personal firewall in some mass
consumer database, some Futureshop-equivalent.
Cost: $0.00
Shipping: something like 900-odd billion US dollars. For comparison,
IIRC the entire damn U.S. space program up to 1993 cost only 300-odd
billion.
I took a screencap, added some text, and posted to a "Priceless" site...
Armor2Net Firewall: free
Shipping: 900 billion USD
Watching /someone else's/ massive consumer database go down in flames: Priceless.
@Alex Papadimoulis said:
Personally I've found the latest barage of anti-smoking ads here in the
US quite annoying ... I'm not a smoker ... but dammmn, those ads make
me want to be one just to piss off the "pissed off non smokers".
Hehe I feel just the same way. Too bad it's so damn
unhealthy. Nothing like pissing off the overly self
righteous.
It seems I failed to make myself clear.
The original FAQ file was probably on the website, or on some
newsgroup, in which case the instructions for unpacking were justified.
When a copy of the file was included in the package, nobody had time
to remove the now irrelevant questions and answers. What's so strange
about it?
Hmm it is a bit like
y = x;
y = x; // just in case
Possible it ( the email software responsible ) has some sort of loop
that adds the content-type and it 'forgets' ( read : programmer forgot
) to not display the content-type the second time round ( and the third
, forth ... ). I havent done and programming for email software but a
common is to use "var .= var2" ( or the equivalent in your langage of
choice ) when "var = var2" was intended .. maybe
Sure, marry the guy even though he may be a complete whack job? Check out The Sims, The Sims 2, Very cool games. I am addicted to the Sims 2. It's a good thing you can turn off the aging, My characters would have died about 10 times by now!
Oh come'on guys, MS Money isn't that bad, the price is definetly much better than Quicken and MS is often giving out sweet rebate/coupons on Money around the tax season brining the price down even further.
I'm all for a better package but I somehow feel dumbed down by an application using the iTunes UI model. Ok ok I know OS10 Tiger wants everything to look like iTunes but please, I'll pass.