reading obfuscated code

Just out of curiousity, does reading obfuscated code and deobfuscating it manually improve your Java skills? I was just researching obfuscation and was thinking about that, since it seems like a pretty challenging thing (something to pass the time with ;)
LVL 36
ZylochAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Tommy BraasCommented:
Hmm, if you have too much time on your hands, manually de-obfuscating code might be a 'fun' exercise...;-) For learning/improving Java it would be a pretty bad idea I think!

\t
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tomboshellCommented:
MANUALLY!!!  You simply have too much time on your hands.  The best way to learn is to program, which by your question you have covered.  Have you tried to study the source for some larger projects line TomCat, JUnit, Ant and so on?  Those can be quite instructive, or so I hear...I have not had the time to delve into the source code for those projects.   But it is on my never ending list of things to do if, the imposible happens, and I happen to have time on my hands.

Or if you are in for a challenge look up byte code engeniering.  There are tools to help with that.  At least that sound challenging to me.  
0
cjjcliffordCommented:
Obfuscation generally does unsavory things, from a good-practices perspective, so I would say trying to learn a language, and good-practices of programming in that language, by reading obfuscated code would indeed be a bad idea...

Studying source code is not really a good approach, IMO, unless you are searching for solutions to particular problems - you can easily get bogged down with the volume of code, and miss many fine points, etc! Start programming, start coming across the same problems again and again in your own solutions, and then for these look to source codes to see other solutions, or better yet, have a Google for "patterns" - basically a "pattern" is a description of a common problem, and a good approach to solve this problem (approach, not source code - for examples of solutions go to the better Open Source projects...)
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

cjjcliffordCommented:
sorry, forgot to mention, if you want to try to make reading obsfucated code, run it through one of the many code beautifiers available - this will at least get rid of poor formatting, etc!
You could also run it through a refactoring tool (Eclipse apparently does it very well!)
 
0
MogalManicCommented:
A better way to improve your Java skills is to just take the pubic API of the obfuscated jar and reverse enginerr the classes and API yourself.
0
MogalManicCommented:
I have also used the obfuscated source code to figure out the internals of a JAR so that I could write a wrapper class to implement missing or broken functionalities.
0
lcwidingCommented:
No, manually, or automatically, deobfuscating Java code will not improve your Java skills.

To my mind, one of the main reasons for that is because there are many things obfucators do that are very difficult, if not impossible, to deobfuscate. One of those is replacing final static variables in the code with the actual literal value.

I would stay away from this approach, and instead look into a good book like Better, Faster, Lighter Java or Effective Java.
0
sudhakar_koundinyaCommented:
I believe to improve ourselves in Java Skills

download open source api from sites like Jakara and sorce forge and try investigating on the API what they did.

Regards
Sudhakar
0
ZylochAuthor Commented:
Yep :)

I was just wondering because it sounds like fun :)

Anyways, thanks for all the help. I've gotta go now but be back and accept some of your answers ;)
0
sudhakar_koundinyaCommented:
Split the points between guys whom's answer you think is best.

Regards
Sudhakar
0
sudhakar_koundinyaCommented:
:)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.