Daily WTF

Keep the fun and games in here for now please :-)
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Daily WTF

Post by Fred »

karsten wrote:Very nice indeed. equals() anyone?
I said that too, but it works in C# (it's not java) ... still though... boolean or enum!!! come on!

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Daily WTF

Post by Fred »

Also from the same code base :

171 line long for loop!!

:-)
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Daily WTF

Post by Fred »

I linked a mate to this thread and he had been involved in setting up an off shore dev centre for his company which later put him out of a job. His comment :
Spiky wrote:> ha! mind you, on topic actually- at <company> after a YEAR, one of the two
> female developers actually asked her team leader what a boolean was!
Classic.

That wasn't India either! It was Prague.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Daily WTF

Post by Fred »

Interlude :

Code: Select all

if(blnTrueOrFalse == true){
      otherBooleanVariable = false;
}
if(blnTrueOrFalse == false){
      otherBooleanVariable = true;
}
That is ten types of wrong!

use else
just check the boolean, not compare it with true/false
just assign it straight to the output var with or without notting
use a name that means positive for positive, not the equiv of maybe

jesus, these guys are ROUGH...

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
AbeFM
Post Whore!
Posts: 629
Joined: Sat Feb 16, 2008 12:11 am
Location: Sunny San Diego
Contact:

Re: What HiFi humiliation and QUAD discussion

Post by AbeFM »

this is why you don't even want to be jewish anymore: http://www.cnn.com/2008/US/12/26/hanukk ... rss_latest


Then I found out, we have it easy:
http://www.cnn.com/2008/CRIME/12/26/san ... pstoryview
User avatar
AbeFM
Post Whore!
Posts: 629
Joined: Sat Feb 16, 2008 12:11 am
Location: Sunny San Diego
Contact:

Re: Daily WTF

Post by AbeFM »

User avatar
sry_not4sale
LQFP144 - On Top Of The Game
Posts: 568
Joined: Mon Mar 31, 2008 12:47 am
Location: New Zealand, land of the long white burnout
Contact:

Re: Daily WTF

Post by sry_not4sale »

Fred wrote:

Code: Select all

if (session.getRecord().getId() == 11) { //do something }
Hahaha I do that all the time :oops:



Working on a government project at work... using the horrible beast named Oracle... (their management's decision, not ours).
Had to hack the entire codebase of our project to use a single space " " instead of an empty string, as Oracle treats an empty string as null!!!!!!!!!!!
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Daily WTF

Post by Fred »

I blame you :-P

http://commons.apache.org/lang/api/org/ ... ng.String)

I hope you are joking about the hard coding thing... If 11 signifies some specific record there must be some other unique aspect to it that you can identify it by instead.

Seriously though, doing things like treating null and empty the same is pretty important.

Also, as much as it isn't open source, oracle doesn't face any competition from mysql for serious sized stuff. Postgres is supposed to be decent, but oracle still has some advantages. Yes, they've been enterprising me at work ;-)

Right, enough off topic, that bike was seriously insane.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
sry_not4sale
LQFP144 - On Top Of The Game
Posts: 568
Joined: Mon Mar 31, 2008 12:47 am
Location: New Zealand, land of the long white burnout
Contact:

Re: Daily WTF

Post by sry_not4sale »

I meant the comment lol

Code: Select all

// do something here

We use postgres for huge sites here at work. The biggest hurdle with postgres is it is horribly configured "out of the box". Outperforms oracle to no end on a large php website.
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Daily WTF

Post by Fred »

Define huge? Some of this financial junk in the banks is on a massive scale and they really care about the real time nature of it because if you are 0.0003ms late for a buy you may dip out and lose millions etc. So they put the boxs in buildings on the main trunks of the net. Not some random building that's bottle necked as is ;-) I know postgres is good, and I can't remember why it's not as good in some respects, but there were some points, maybe they weren't performance points at all. There were some things though.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
Post Reply