romainguy / kotlin-explorer

Desktop tool to quickly explore disassembled Kotlin code.
Apache License 2.0
732 stars 20 forks source link

Getting started: should we call "Decompile" "Compile"? #15

Closed mhansen closed 2 months ago

mhansen commented 3 months ago

Hi, just logging an experience report. As before, I'm keen to get the rest of my team using this, but I encountered a little confusion getting started, so I thought it might be worth sharing this speed bump.

I started Kotlin Explorer and wasn't sure what to do. I found in the macOS menu there was a "Decompile" option. At first, I thought this meant that I'd paste in some Assembly or dex and it'd turn it back into Kotlin? Like IntelliJ's decompiler which turns dex into java: https://www.jetbrains.com/help/idea/decompiler.html. I saw that the text field is editable for the assembly. Because compilation is normally from a higher-level language to a lower-level language, and decompilation vice-versa.

Now I suppose that printing assembly to text counts as a (slightly) higher level language than machine code!

Took me a bit of thinking to realise that it means, well, compile the kotlin to dex, decompile the dex to text, compile the dex to machine code, decompile the machine code to assembly.

I understand it now. But I propose that it might be easier for newbies to understand if we called this 'Compile' rather than 'Decompile'?

mhansen commented 3 months ago

Or perhaps we should call the option 'Disassemble'? I still think "Compile" name fits a little better, given the user-controllable input is high-level Kotlin code, the output lower-level code.

romainguy commented 3 months ago

It was originally called Disassemble but I switched to Decompile for a good reason I can't remember now. Compile isn't right either.

romainguy commented 2 months ago

It's now called "Compile & Disassemble"

mhansen commented 2 months ago

Thanks, I think that makes a lot of sense!

On Fri, 19 Apr 2024 at 22:52, Romain Guy @.***> wrote:

It's now called "Compile & Disassemble"

— Reply to this email directly, view it on GitHub https://github.com/romainguy/kotlin-explorer/issues/15#issuecomment-2066514442, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAZYONNLGYWC7HZNZUBGX3Y6EHRHAVCNFSM6AAAAABFUXNITCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRWGUYTINBUGI . You are receiving this because you authored the thread.Message ID: @.***>