Just so your aware, its not really bad practice to do what you did, its to the point where you should consider which is more readable as the time saved is on the NS scale, not MS.
Just so your aware, its not really bad practice to do what you did, its to the point where you should consider which is more readable as the time saved is on the NS scale, not MS.
The difference in time is irrelevant in this case, the fact is you shouldn't have extra code that serves no point of being there.
It's like saying:
Code:
if (radioStations > 5)
Volume = 100;
else if (RadioStations < 5)
Volume = 0;
else
Volume = 0;
the else if statement is totally useless, It's still nanoseconds saved by removing either the else or the else if, but its the same result removing one of the other, its bad practice...
And in that case i agree with you, but in Kiyono's case even your return false isnt required as that is the last line in the method, unless of course it returns bool, but then i would prefer Kiyono's.
Having if/else rather than simply an if has no bearings on performance, and is entirely down to readability, i would not consider what Kiyono wrote to be bad practice and would challenge you to find an example where removing else return false and just having return false is considered good practice.
No offence but you dont work in the industry, so you saying its considered bad practice has no relevance to me, so unless you can find examples of it then Kiyono is free to do whichever they are most comfortable with, especially given it has no bearings on performance.
Removing a if/else is like removing 2-3 cycles and clocked a 2-3GHz, it represents nothing.
Between the two.
Code:
if (path.EndsWith(".dbc"))
return true;
else
return false;
I would use this:
Code:
if (path.EndsWith(".dbc"))
return true;
return false;
But, the best thing would be:
Code:
return path.EndsWith(".dbc");
Actually, in the industry using or not the else is not so important. But, we shouldn't have multiple return statement. In C#, it can be less important due to the memory management. In C/C++, it is less recommended due to the complex memory management (it can cause memory leak). Also, it's harder to debug. In case of little check at the start of the function, it's not important. But, later it's not recommended. Anyway, in this case, it's not a problem to have multiple return statement, but, we can write the function in one line and possibly, make it inline in C/C++ to avoid useless call that will slow of a few cycle
And in that case i agree with you, but in Kiyono's case even your return false isnt required as that is the last line in the method, unless of course it returns bool, but then i would prefer Kiyono's.
Having if/else rather than simply an if has no bearings on performance, and is entirely down to readability, i would not consider what Kiyono wrote to be bad practice and would challenge you to find an example where removing else return false and just having return false is considered good practice.
No offence but you dont work in the industry, so you saying its considered bad practice has no relevance to me, so unless you can find examples of it then Kiyono is free to do whichever they are most comfortable with, especially given it has no bearings on performance.
I do not work in the coding industry, and I never wanted it to be, of course Kiyono is free todo what he wants.
Let's put it this way; In my opinion what he did was bad coding practice. with that its not a global fact but simply my opinion, ok?
Just wondering if anyone is able to make this work on 3DEffect, 3DEffectObj and 3dtexture for the newest tq patch, fiddled around for a couple hours using multiple diff variations of the CO2_CORE_DLL x64 and x86 and every time editing 3DEffect makes all the effects in-game disappear (go off-screen, you can still see trails of weapons go to the top left corner of the screen)
sure.
1. open convertor
2. drag and drop dbc file over the text box of the convertor
3. click convert
4. edit file
5. drag and drop text file over the text box of the convertor
6. click convert
sure.
1. open convertor
2. drag and drop dbc file over the text box of the convertor
3. click convert
4. edit file
5. drag and drop text file over the text box of the convertor
6. click convert
[Release] DBC Converter Source 12/13/2012 - CO2 Exploits, Hacks & Tools - 21 Replies Right, the majority of this works, however i decided in the end that it would just be best to dump the source of the project here and people can make changes and modify it as they need to.
To start off you will need some .dbc files to decode to .txt files, and then you can convert them back again. Make sure you update the Count at the top of the file if you make changes, and ensure that the layout is correct, if something is placed in the wrong place or missing, then it wont work, this is...
[Release].php SQL zu XML Converter 06/14/2012 - Metin2 PServer Guides & Strategies - 8 Replies Hey ho,
ich hab mir mal die Mühe gemacht *hust* und habe einen .php Script erstellt, mit welchem man Items & Monster ( item_proto & mob_proto ) aus der Datenbank in das XML Format umwandelt.
Wozu man das braucht?
Wenn ihr "locale_name" habt:
[Release]DDS-Converter 01/20/2011 - Metin2 PServer Guides & Strategies - 22 Replies Hey ich habe heute mal mein Desktop aufgeräumt :P und da fand ich plötzlich eine komische Datei. Aufeinmal stellte sich raus das es ein DDS-Converter war. Er wandelt DDS Dateien in jpg und png dateien um.
Da das für manche Client´s nützlich ist dachte ich ich stell es mal hier rein.
Virustotal Screen
http://img3.fotos-hochladen.net/uploads/virrustot al0t16k9zq.png
Screen vom Programm
http://img3.fotos-hochladen.net/uploads/programmn gw8demb.png
MfG Fun-Zocker
[RELEASE] DDS converter 08/18/2009 - EO PServer Guides & Releases - 9 Replies Well, because this is a tool, i post it here and not on another section :bandit:
People were complaining they cant open or edit a dds file..
This tool, can convert the dds file to jpg,png,bmp,tga
and it can convert "to" dds :handsdown: