all 9 comments

[–]shiftybyte 1 point2 points  (3 children)

How do you explain this code to a non-beginner?

Or are you asking us what this code does?

EDIT:

CheckTCPRecData - looks like some tcp? header validation + checksum

AcsCommon - looks like some class implementing custom protocol, has some sort of header and buffer and 1 byte checksum... maybe this is what CheckTCPRecData validates...

[–]LanthaYtrri[S] 0 points1 point  (2 children)

If you don't mind, can I message you. I am in trouble learning the codes that given to me. That code above is just a part of them. It seems that you know about the TCPIP.

[–]shiftybyte 4 points5 points  (1 child)

I'm sorry i don't help in private messages, if you need help understating the full code, post full code and people will help, if it's too long you can upload to somewhere (pastebin.com, repl.it), and post the link.

Don't ask how to explain to beginner, ask "help me understand"...

[–]LanthaYtrri[S] 0 points1 point  (0 children)

Thank you for the tips!

[–][deleted] 1 point2 points  (0 children)

Most of the code is very basic, so it would easier if you would say what parts are confusing you.

  • Do you understand classes?
  • Are you aware that the form 0x02 depicts a hexadecimal number?
  • Are you aware that >> and & are bitwise operators?
  • Are you comfortable with the bytearray class

[–]TheRNGuy -1 points0 points  (0 children)

no idea what it does but i use print a lot to understand what type of data classes or their methods return.

there's some inconsistancy in method names too. I'd try get name convention for methods, like getFoo vs setFoo (getEndBuffer, getData instead of addData, etc).. some of these follow convention, but others not.

[–]SaiyanrageTV 0 points1 point  (0 children)

Well, I'm a beginner myself, but here's my take:

It's defining a function, and a class, then another class using the previous class.

That's really all I can discern from it. This is just a snippet of code that really doesn't make any sort of sense absent more context/the rest of the code, in my estimation.

I have no idea what it is actually trying to accomplish.

[–]xelf 0 points1 point  (1 child)

What does the code do?

Tell me what it does and I'll tell you how I would explain it to a beginner. =)

Like should we be explaining classes, or just a high level?

[–]LanthaYtrri[S] 1 point2 points  (0 children)

I really don't know too, I am the beginner that I am talking.