the unnecessary dumbhead-coding thread
category: general [glöplog]
lemme start like this:
value += -1;
or:
for ( i=0; i<1; i++)
{
return 0;
}
( this thread is intended to make you imagine how dumb (new) ( maybe 5-years-old &| (AndOr) microsoft- ) coders could get/be/are ! )
value += -1;
or:
for ( i=0; i<1; i++)
{
return 0;
}
( this thread is intended to make you imagine how dumb (new) ( maybe 5-years-old &| (AndOr) microsoft- ) coders could get/be/are ! )
for (i=0;i>LOL;i++) {
echo "php is a LOL by itself."
}
echo "php is a LOL by itself."
}
Quote:
"We need NOPs.
Lots of NOPs!"
one mo...
c64 ( f.e. ) is not dumbhead-coding...
...NOPs are really necessary there ! :) and they only eat up 1cycle anyway !
without NOPs you would have had BASIC-only_Games forever on c64 i guess ;)
c64 ( f.e. ) is not dumbhead-coding...
...NOPs are really necessary there ! :) and they only eat up 1cycle anyway !
without NOPs you would have had BASIC-only_Games forever on c64 i guess ;)
wat
get a life c0c00n...
or team up with optimus
or team up with optimus
a guy at our company asked me to look over his code and give him a hint as to why it didn't perform as expected.
when i sat down next to him and could not set a breakpoint in the code bit in question, i recompiled the whole project just to find out that the compiler generated "dead code detected" warnings all over the place.
when i asked him about this he told me that those were just warnings which get tolerated by the compiler and therefore he didn't care they were there... dumbass
when i sat down next to him and could not set a breakpoint in the code bit in question, i recompiled the whole project just to find out that the compiler generated "dead code detected" warnings all over the place.
when i asked him about this he told me that those were just warnings which get tolerated by the compiler and therefore he didn't care they were there... dumbass
Yesterday I tried to open a screen in freebasic and I didn't remember the command in fbgfx lib. I found out somewhere and wrote it and for an hour I was begging why the fuck it didn't open a screen. I just mistyped my screen_width variable to screen_widht and couldn't see that for an hour :)
also (i read that more often than you might think):
void some_function(void)
{
int b;
...
...
...
if(b == 0)
{
...
}
}
let alone the forgotten initialization issue, the best justification the responsible coder gave to me was that he "checked in debug and that it got initialized properly anyway", so he figured he didn't have to do anything about it.
void some_function(void)
{
int b;
...
...
...
if(b == 0)
{
...
}
}
let alone the forgotten initialization issue, the best justification the responsible coder gave to me was that he "checked in debug and that it got initialized properly anyway", so he figured he didn't have to do anything about it.
More than code, I'm afraid with logic. A guy at a company I used to work at, once made a form for a db/accounting application.
First, he put the Euro/Peseta conversion (it was that time) in a variable (just in case it changed? ;-) )... but that was not the worst part, only the obvious.
A few months later, the visual design of the program had to be changed (change in colors and stuff), and suddenly all forms made by this guy stopped working.
Upon further inspection of the code, he was checking "read only" component status using the background color (this was Delphi VCL btw).
Go figure :)
First, he put the Euro/Peseta conversion (it was that time) in a variable (just in case it changed? ;-) )... but that was not the worst part, only the obvious.
A few months later, the visual design of the program had to be changed (change in colors and stuff), and suddenly all forms made by this guy stopped working.
Upon further inspection of the code, he was checking "read only" component status using the background color (this was Delphi VCL btw).
Go figure :)
Quote:
Yesterday I tried to open a screen in freebasic and I didn't remember the command in fbgfx lib. I found out somewhere and wrote it and for an hour I was begging why the fuck it didn't open a screen. I just mistyped my screen_width variable to screen_widht and couldn't see that for an hour :)
that's why coding with -lang deprecated is so bad for you.
if(a=b)
yeah,stijn...if it looped 4.294.967.295 times, it´ll get 0 again !
so booze forever @BP
so booze forever @BP
cOcOOn:
In C integer overflow of signed ints is undefined. The compiler is free to remove the entire loop-control and replace it with a infinite loop.
Not that it makes a difference though.
In C integer overflow of signed ints is undefined. The compiler is free to remove the entire loop-control and replace it with a infinite loop.
Not that it makes a difference though.
thanx for info tho...me dumbhead-coder, haha...really didn´t know this.
This pearl is from moebius, very cool 256B intro.
Code:
00000031 D944F4 fld dword [si-0xc]
00000034 D9FB fsincos
00000036 D9E8 fld1
00000038 D87CF4 fdivr dword [si-0xc]
0000003B D9FB fsincos
please explain
fld1
fdivr dword [si-0xc]
=>
[si-0xc]/1
=>
[si-0xc]
So without having looked at the full source code I guess he was padding his executable in a less-obvious way.
fdivr dword [si-0xc]
=>
[si-0xc]/1
=>
[si-0xc]
So without having looked at the full source code I guess he was padding his executable in a less-obvious way.
it's fdivr, not fdiv. that's definitely no padding :)
Quote:
and they only eat up 1cycle anyway
i can tell that you are drunken, even pc coders know that there are no 1 cycle instructions on the 6510 :)
ryg, if it was fdiv, I wouldn't post it here. Look also at original commented source:
Code:
and think about fdivr/fsincos cycles. Just an example that even great coder can make some nonsense mess.fld dword [si-12] ; s
fsincos ; sin(s) cos(s)
fld1 ; 1 s sin(s) cos(s)
fdivr dword [si-12]
fsincos ; sin(s/2) cos(s/2) cos(s) sin(s)
blala, i'm a pc coder, and i never understood why nops exist. maybe now is a great moment to elaborate?
Skrebbel : as an Outline org, you MUST know what Nop were used for ;)
sorry :-( :-(