SpigotMC / BungeeCord

BungeeCord, the 6th in a generation of server portal suites. Efficiently proxies and maintains connections and transport between multiple Minecraft servers.
https://www.spigotmc.org/go/bungeecord
Other
1.58k stars 1.11k forks source link

IMHO #545

Closed ghost closed 11 years ago

ghost commented 11 years ago

@md-5 proved that he is good and i was wrong.

hqdefault

md-5 commented 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.

md-5 commented 11 years ago

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

LaxWasHere commented 11 years ago

I know BB code.

necrodoom commented 11 years ago

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.

fpigerre commented 11 years ago

:+1: @necrodoom

md-5 commented 11 years ago

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.

Homie20006 commented 11 years ago

/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... -.-

ryantheleach commented 11 years ago

@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.

ghost commented 11 years ago

@ryantheleach i all correctly understand ;)

ammaraskar commented 11 years ago

lol

andrewphorn commented 11 years ago

@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. ;)

md-5 commented 11 years ago

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

corin12355 commented 11 years ago

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. DAMAGE CONTROL

lol 10/10 issue

md-5 commented 11 years ago
Code Review of enLogger (https://github.com/Ensemplix/enLogger/)

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

ryantheleach commented 11 years ago

Wow, If only getting free code reviews was this easy all the time.

corin12355 commented 11 years ago

ruined

lazertester commented 11 years ago

Came here a bit too late, will eat popcorn anyway.

fpigerre commented 11 years ago

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...

md-5 commented 11 years ago

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.

corin12355 commented 11 years ago

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.

BearWoolley commented 11 years ago

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.

libraryaddict commented 11 years ago

@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.

corin12355 commented 11 years ago

@ensirius You

md-5 commented 11 years ago

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?

libraryaddict commented 11 years ago

@ensirius My mum is calling me to dinner. So you win this time!1!!11ONE

ghost commented 11 years ago

@md-5 lets try.

corin12355 commented 11 years ago

This is going to be beautiful.

TheReverend403 commented 11 years ago

dis gon be good_

libraryaddict commented 11 years ago

I think he went to bed.

corin12355 commented 11 years ago

@ensirius He spoke about it in the CookieSlap development channel, pretty sure he finished it already.

TheReverend403 commented 11 years ago

Yeah, he finished it about 5 minutes after he last posted here, and it works.

top lel.

columb commented 11 years ago

/me bookmarked @ensirius, you've made my summer.

nvx commented 11 years ago

Wow, @ensirius is giving SirSengir a run for his money for most retarded modder award.

I liked your code review @md-5 :)

CrypticStorm commented 11 years ago

That code review made me change half my code... At least it's better now.

zSwayz commented 11 years ago

This made me moist.

andrewphorn commented 11 years ago

@ensirius is my idol

I hope one day to write terrible code just like him.

vemacs commented 11 years ago

I lost ;_;

@md-5 The server list ping and kick reply can be the same, right? They're both 0xFF

vemacs commented 11 years ago

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.

libraryaddict commented 11 years ago

http://paste.md-5.net/tomixedomo.tex

ryantheleach commented 11 years ago

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/

andrewphorn commented 11 years ago

@ensirius stop post

vemacs commented 11 years ago

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?

andrewphorn commented 11 years ago

@ensirius or maybe it has to do with your incompetence. stop posting.

ammaraskar commented 11 years ago

lol

vemacs commented 11 years ago

lel

ammaraskar commented 11 years ago

@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:

treestompz commented 11 years ago

@ensirius

libraryaddict commented 11 years ago

url

andrewphorn commented 11 years ago

@ensirius tell me more o master of code. while you're at it, stop posting.

md-5 commented 11 years ago

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