- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
[sarcasm]Yeah, thats the problem here. That he was adding every file in his workspace to subversion. I mean come on, think of all the file space he is wasting on the subversion server with this stuff that could otherwise have been used to store the pictures he had taken of Darcy with his hidden bathroom camera.[/sarcasm]
Admin
Admin
You can do it the "hard" way with svndump though. I have done this many times to remove binary files that users have checked in.
Admin
const bool HOWCANYOUSLAP = true;
Admin
Admin
I have correct the Subject to put in the proper language in which this code is written, except for the fact that AddGirls needs struct Girl[3] at the top (unless C has changed).
In C++ you use std::string not char*.
Admin
Definitely not.
What happens in the function stays in the function.
Admin
No such thing as passing by const reference in C, the language in which the code is written.
Admin
"The build" is one of the biggest WTFs
Admin
What is so difficult about creating a new project for your personal code that is not linked to source control?! If the devs here didn't have the brains to figure out how to do that then they'd deserve to be fired :/
Admin
WTF where WT stands for Who To?
Admin
Such a fine example of the Streisand effect (http://en.wikipedia.org/wiki/Streisand_effect). You approach someone with the intention of removing an embarrassing checkin, and that guy publishes it to The Daily WTF.
Admin
You made my day.
Admin
Also, from an OOD perspective, it would be better to have the score calculation as a method of a Girl object, to have DRY/SPOT code.
Admin
Admin
Is that what you call it? Because I always consider it a win (at least for me).
Admin
Unless it's Hashini
Admin
for (Gril grl: allGirls) {
grl.getStringFromObj();
}
Admin
I've had this kind of problem before, but usually it's for a reasonable excuse. It can be quite tricky to remove data from SVN, it isn't primarily designed for that, in fact the point is to provide a high level of retention. I've encountered a fair few situations where things like passwords, etc have mistakenly made their way into an SVN revision somewhere.
Admin
Just doing
or whatever won't "remove the file from Subversion"; it has more or less the same effect as doing an and locally, and the old revision still shows up in the version history and can be found in diffs, etc.You can purge a file from the historical record, but it's not pretty; see http://svnbook.red-bean.com/en/1.5/svn.reposadmin.maint.html#svn.reposadmin.maint.filtering - essentially, you have to dump, filter and re-import the repository, which mandates some downtime, which explains why people don't do it unless they absolutely have to.
Admin
The Daily Win Than Failure?
Admin
If that happens can't you just change the passwords?
Admin
Girl.name = "Irish" Girl.wouldIDoHer = on a wooden table
Admin
Admin
We'd have gotten a good story either way }:)
Admin
By the way, that's not a very effective way to compare two "Girl"s. The reason is the same as the reason why we don't use absolute distance to compute the line in a linear regression and use sum of squares of the distances instead.
Admin
My mistake, typo. Didn't try it in the compiler the first time. Chane the variable 'prod' in the if statement to 'n' and all is well.
Admin
He means Darcy in Accounting, not Darcy in Engineering.
Admin
good story, but we need to know who Kendrick and Lauren are and why Dave is obsessed with them
Admin
Methinks and PITA: YHBT (And maybe I've been too. But if I don't post this some pour sod might come away thinking that FTFY means ‘fucked that ** for you’.)
Admin
I think you mean static const bool wouldIDoHer = true;
Admin
TRWTF which nobody seems to have picked up on is needing software to decide which girl is more desirable.
Whatever happened to gut instinct?
Admin
Darcy sounds nice
Admin
Admin
Animal Crackers
"Animal crackers are crackers in the shapes of animals, some brands of which are sweetened. These are usually animals one would see at the zoo or circus, including lions, tigers, bears, and elephants. There is debate about whether or not animal crackers are actually crackers or cookies. They resemble crackers due to the way they are made, with layered dough, but the use of sweetened dough gives them the cookie taste and consistency."
Circus Animal Cookies
I remember circus animal cookies that were similar to animal crackers but covered on one side with hard pink icing. Unfortunately, the only circus animal cookies I've seen lately are these – totally drenched in overly sweet, soft, pink frosting and brightly covered sprinkles.
Admin
Admin
...or intinct at a lower level.
Admin
legs should be of type long. Everyone knows that.
Admin
Kendrick.isDoing(Darcy) == true; Lauren.wants(Kendrick) == true;
Admin
Unit testing....isn't that what he's hoping to accomplish ultimately?
Admin
If managers could code, Dave.cpp is what it would look like.
Admin
@RemyPorter:
You are making a common mistake many programmers make. They over design their code for situations that will never arise. Clearly, this code was designed by Dave and optimized for Dave. To generalize the code for anyone else would be overkill.
Always remember, code to the situation at hand. Generalized code is good for OS APIs and other situations where you can't foresee all the ways it will used. In all other cases, use the programmer's equivalent of Occam's razor, and write just enough code to solve the problem. This is a corollary to the old programming adage: "The easiest code to debug is the code you never write."
These truths are what make Dave's reductionist code brilliant.
Admin
wouldIDoHer should be a function:
bool wouldIDoHer(double score, double bloodAlcoholLevel, unsigned int noOfPeopleWhoWouldKnow) {
//some complex calculations, or just return true; }
Admin
Admin
What a dork, we all know that Girls should be passed by const reference for the comparison!
Admin
Admin
I would use an improved structure instead :)
struct Girl {..... long legs; short rank; long score; char * phone_number; .....};
and here is a sorting routine:
Girl AllGirls[n]; Girl TempGirl; int i=1;
for(i=1;i<=n;i++;){ AllGirls[i].score = Square(AllGirls[i].face) + Square(AllGirls[i].body) + Square(AllGirls[i].legs);
}
i=1;j=1; for (j=1;j<n;j++) while (i<n) do{ if (AllGirls[i+1].score > AllGirls[i].score) TempGirl = AllGirls[i]; AllGirls[i] = AllGirls[i+1]; AllGirls[i+1] = TempGirl; } } //slowest sorting algorithm but it works and I am in a hurry
Have fun !!! :)
Admin
short boobs? i dunno ... maybe long boobs? (eww) float boobs? might be creepy
double boobs -- a real winner! :)
Admin
Now to finish what you started:
string boobs (a string of them?! 20...30+? Nice!)
Admin
it was "short rank" not rack and it is meaning howgood is the girl; the rank represent how good the girl is ;)
but I think "boobs" was a missing attribute so it should of been there with double :)
So the reviewed Girl structure would be: struct Girl { char * name; short face; long body; double boobs; long legs; double rank; short score; char * phone_number; bool wouldIDoHer; };
Have fun coding !!!