When you're reading through a class, look at the attributes and behaviors that it has (methods + fields). For methods, take mental note of the method name, it's input parameters, and it's return type. If you don't know the method name (because it's obfuscated), then sometimes you can get this information by looking at the input, output, and implementation.
Take this partially obfuscated method as an example:
public double f(double d0, double d1, double d2)
{
double d3 = this.locX - d0;
double d4 = this.locY - d1;
double d5 = this.locZ - d2;
return MathHelper.sqrt(d3 * d3 + d4 * d4 + d5 * d5);
}
It accepts three doubles, returns a double, but the telling part is the mathematical equation: square-root of a-squared plus b-squared plus c-squared: That's distance!
Now, you'll want to refactor f()
to distance()
. Decypher the easy ones first. Once you have more and more of the puzzle solved, it'll give hints into the harder to decypher areas.
My favorite trick is control+F. That's the search function. And you can use to search entire projects too (not just individual files). How do you even know what to search for, you ask ? Well, by using the application or library in some way... it'll give you hints as to what to search for. First, you have a general idea of what particular feature you wanna look for. Then, if you've used the project even just a little bit, you can get more specific clues to narrow your search.
For example, I'm working on a project now that I've inherited from an inactive author (an open-source Minecraft plugin with 418 files and 46k lines of code). And we had a user open a ticket: "What is the permission node to use join signs ?" Heck, I have no idea. And the documentation didn't mention it either. No sweat, control+F to the rescue. (My weapon of choice).
One of the things you can't always 100% decypher is the question of their design: "Why did they design it like this ?" One can only speculate.