Closed ghost closed 11 years ago
Do you care to improve it then? The code needs to be complicated because the protocol and functions are. Maybe you should teach me then, because clearly after years of java development I'm not yet up to your standards. Instead of saying it's shit give specific examples.
I'm going to ignore you from now on because you are clearly an arrogant arsehole who has no idea what he is doing. If you had actually worked in a professional dev environment you would know size does not matter.Bungee itself is about 200kb. All the libraries are for the use of plugins, I don't even use some. The first working bungee had no libraries and was 60kb, doesn't matter. Saying it's big doesn't mean it's bad, I've worked with enterprise servers that are 100mb+. you haven't even stated what you mean by overloaded, surely not method inheritance. Just because you aren't skilled enough to fully comprehend my code doesn't mean it's bad.
Good day to you
I know BB code.
considering all you say is "THIS CODE SUCKS" "MY CODE IS GOOD" and the fact you cant properly speak english makes me believe you came here for the purpose of trolling.
:+1: @necrodoom
I like, how you rage.
I am not raging at all, I am merely expressing my disbelief that someone such as yourself can come along and call my code terrible, without providing specific examples of how or why it is terrible.
It's more funny, when you say, that you worked with enterprise servers.
Can you please explain why that is funny? I don't see how real world development in a professional environment is funny.
If you want see good code, look on netty. This guys write simple and so good code.
You must be a very good judge of the code quality of netty, see your recent ticket: https://github.com/netty/netty/issues/1691. Furthermore I believe in your ticket you posted a piece of code pertaining to a game server proxy, to which all you do is forward received messages - and you think that achievement is anything comparable to what exists here in Bungee.
Ofcourse, not only size matters.
Size doesn't matter at all. Its not like we are writing so that our programs fit on punchcards and vacuum tubes. The libraries are there so that developers like that of Netty can produce better code for us that we do not have to maintain.
I wrote same API for server and i use only snakeyaml.
No, its not the same API. Take for example the fact that I include MySQL and SQLite libraries in Bungee. These are not used by Bungee, and take up several megabytes by themself, however they are included so that developers may create plugins making use of these libraries, without packaging them repeatedly in their own jars.
I am aren't skilled enough? 2 years in java and more i work
You have one small Bukkit plugin on GitHub, and your only other contributions are a bug report (more like a help me please) to Netty, and this ticket.
more i understand how bad write mojang and others.
All you seem to do is understand how bad my code is, and how bad 'others' code is. In this case my own code. As a Java developer of two years, it seems that all you can do is say other peoples code is good or bad, and provide no real basis for it. If you want to continue this discussion with me, please provide specific examples and code snippets of where my code is bad, and what can be done to improve it, and I will kindly take it into consideration.
/me dims the light for cinema atmosphere*
You talk about bad code and your awesomely much better coded programs. Its useless trying to demonstrate your cleverness without responding to md-5's posts with a bit of seriousness... -.-
@ensirius it sounds like you do not understand the purpose of bungee.
Bungee is NOT a SIMPLE proxy, it is designed, so that to the Minecraft client, it is completely transparent that they are connecting to multiple servers.
It allows for clients to change servers, without kicking them, without dropping them, without client-side modifications, as well as adding an API, so things like multi-server chat and player-lists can continue to function.
@ryantheleach i all correctly understand ;)
lol
@ensirius Then perhaps stop saying that your program is the same and is just as complex, when it's quite clear that it is not. ;)
All my work are in private repositors. This code are from server to client. I currently dont need modify or do other stuff with packets from server. As i sayed, whole code are overloaded and for my personal usage, i rewrited it from 0 (This not means, i just cut out parts, which i just dont need) This thinks happens all time. I rewrited currently almost all except client. Maybe, my attitude more negative to mojang than you (Collisions Logic <3). Actually the packets do need to be modified, the entity IDs must be remapped to the original ones, otherwise strange behaviour may occur, and additionally you probably want to be able to provide APIs for stuff like chat and proxy side commands.
Since you won't point out where my code is bad, I'll point out where yours is: coming soon
tl;dr @ensirius doesn't know what he's talking about and gets called out on it. Then trys to maintain damage control but fails badly.
lol 10/10 issue
This is just a small insight attempting to enlighten you about the comparatively poor quality of your publicly released code. Before attempting to attack the code of others, and claim many years of Java programming experience, I suggested you conduct a review of your own code and take this into account. If you have any disagreements about the comments I have made I suggest you bring them up with me. Additionally I suggest that you perform a small review similar to this one, on some of the classes present in my projects such as BungeeCord, so that I may get a better idea of what exactly is overloaded and bad. Thanks for your time in reading and considering this review. md_5
Wow, If only getting free code reviews was this easy all the time.
Came here a bit too late, will eat popcorn anyway.
Umm no, now you're just denying stuff.
Also, I don't see how @md-5 's 'code review' can be crap, when it's written in proper english, by somebody who's been coding Java for 2+ years, and has published many successful plugins...
2) Provided code review crap. 3) Still, my code are better.
Can you please back up those two statements. I backed up mine with a code review, now back up both of yours.
This is pure gold, you still have yet to prove that your masterrace code is best code. Yet you have the audacity to call something that multiple people worked hard on bad when you're not giving us anything to compare it against.
If your code is so much better, then why did you remove your plugin from github? Surely if your code is better you would leave it.
@ensirius you are my hero.
You put him in place with your cold hard calculated facts. You provided examples of your code explaining how his is inferior.
You provided a case where we could do nothing other then admit @md-5 needed to go back to school.
No wait. Nvrm. You just hid all your code and screamed he is a noob.
@ensirius
Since you love the size of code so much, how about we have a code off? Smallest Minecraft server which responds to server list pings and kicks the player when they try to join wins. Jar must be executable with Java -jar myjarhere.jar Are you interested?
@ensirius My mum is calling me to dinner. So you win this time!1!!11ONE
@md-5 lets try.
This is going to be beautiful.
_
I think he went to bed.
@ensirius He spoke about it in the CookieSlap development channel, pretty sure he finished it already.
Yeah, he finished it about 5 minutes after he last posted here, and it works.
top lel.
/me bookmarked @ensirius, you've made my summer.
Wow, @ensirius is giving SirSengir a run for his money for most retarded modder award.
I liked your code review @md-5 :)
That code review made me change half my code... At least it's better now.
This made me moist.
@ensirius is my idol
I hope one day to write terrible code just like him.
I lost ;_;
@md-5 The server list ping and kick reply can be the same, right? They're both 0xFF
Looks like @ensirius lost.
FYI, for(;;){
is shorter than while(true){
, and you can throws Exception
instead of doing the try catch.
See lib's below response for some basic simplification.
does MCSignOnDoor Count/Lose as well? https://forums.bukkit.org/threads/admin-mcsignondoor-1-9-so-your-server-can-say-gone-fishin-back-in-five.8814/
@ensirius stop post
Since the 0xFF
response is a kick packet, I say that this meets the requirements. Without the s
variable, it only works once, due to the socket not being closed. Thus, we can't fit the network on 1 line. Thanks to @ammaraskar for tips.
import java.net.*;
//thanks to ammar2 for initializer, and suggestion for base64 instead of hex
//md_5, i think this is somewhat of a recode of fakemcserver
//packets are still strings <3
class c {
static {
try {
ServerSocket s = new ServerSocket(25565);
for (;;)
new java.io.DataOutputStream(s.accept().getOutputStream()).write(javax.xml.bind.DatatypeConverter.parseBase64Binary("/wAGAEgAaQCnADAApwAxADA="));
} catch (Exception e) {
}
}
}
<ammar2> it will error at the end complaining about not having a main method but it will work
Minified:
import java.net.*;class c{static{try{ServerSocket s=new ServerSocket(25565);for(;;)new java.io.DataOutputStream(s.accept().getOutputStream()).write(javax.xml.bind.DatatypeConverter.parseBase64Binary("/wAGAEgAaQCnADAApwAxADA="));}catch(Exception e){}}}
Use /wAQAKcAMQAAADYAMQAAADEALgA1AAAAaABpAAAAMAAAADE=
for the Base64 to have a modern protocol.
@ensirius Why'd you remove it?
@ensirius or maybe it has to do with your incompetence. stop posting.
lol
lel
@md-5 should just accept defeat at this point @ensirius has shown himself to be the better coder compared to md-5's shit code
Artistic depiction of this issue:
@ensirius
@ensirius tell me more o master of code. while you're at it, stop posting.
At precisely 513 bytes when compiled (557 uncompiled), this is the best I can do:
.class S
.super java/lang/Object
.method public static main([Ljava/lang/String;)V
.limit stack 3
new java/net/ServerSocket
dup
sipush 25565
invokespecial java/net/ServerSocket/<init>(I)V
astore_0
l:
aload_0
invokevirtual java/net/ServerSocket/accept()Ljava/net/Socket;
invokevirtual java/net/Socket/getOutputStream()Ljava/io/OutputStream;
ldc "/wAGAEgAaQCnADAApwAxADA="
invokestatic javax/xml/bind/DatatypeConverter/parseBase64Binary(Ljava/lang/String;)[B
invokevirtual java/io/OutputStream/write([B)V
goto l
.end method
@md-5 proved that he is good and i was wrong.