Question:
How can someone actually "read" the code of a file? Opening with notepad is a fail...anyone has better method?
Vineetkhan
2011-11-30 18:26:00 UTC
Suppose u have an mp3 file, and u want to get it in form of written source code. I tried to open it with notepad and wordpad, but that really isn't working coz i copied the code from one notepad file and copied it to another notepad, then converted the new notepad file's extension to .mp3....it played but with some disturbances....which means the notepad text wasn't enough to get the written code of a file......anyone knows better method ???? plzzzz telll me
Four answers:
?
2011-11-30 20:03:50 UTC
http://en.wikipedia.org/wiki/Source_code



First, you seems to have some confusion about source code. Source code is text that is written in the syntax (or grammar) of a specific programming language.



Therefore, not all files have source code. Only source code files have source code in them.



Next, you need to understand something about file. Files can be grouped in 2 big families: executable files and data file.



http://en.wikipedia.org/wiki/Executable



Executable files are files that contain instructions encoded in binary machine code, which the computer can directly read and execute. Normally, an executable file has the extension "exe" for Windows system.



http://en.wikipedia.org/wiki/Data_(computing)



Data files, on the other hand, are not readily understood by the computer. Data files stores information, which must be interpreted by a program to be useful. Different data files has different storage method and might require different program to read it.



http://en.wikipedia.org/wiki/MP3#File_structure



In your example, an MP3 file is a data file. It is stored in binary format. It cannot run by itself, and must use another program (an audio player software, which is an executable file, e.g. Winamp) to interpret it's content. And since it is not a type of source file, it has no "written code".



http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Editing_Special_Formats



Copying and pasting the binary interpretation in Notepad does not work, because you're copying the text shown in the notepad, not the actual binary. Some program like Notepad++ has copy and paste binary content.



http://en.wikipedia.org/wiki/Hex_editor



To open/edit a binary file, a better choice is to use a hex editor. A hex editor shows the raw, uninterpreted content of a file. I'm not aware of any program that you can handily modify the content of an mp3 file in it's binary form.



Hope this clears your confusions.
oops
2011-12-01 03:14:47 UTC
Source code is not a term that is used to refer to binary files like mp3. But anyway, what you want is a Hex Editor.



http://en.wikipedia.org/wiki/Hex_editor



As a Windows programmer, I have Visual Studio open most of the time anyway, and it includes a Hex Editor, and that's what I use.
2011-12-01 02:38:42 UTC
Can't use NotePad for file types like .mp3. Try a source code editor:



Source code editors: http://en.wikipedia.org/wiki/List_of_HTML_editors#Source_code_editors

The open source, cross platform, free C++ IDE: http://www.codeblocks.org/



Ron
?
2011-12-01 02:27:10 UTC
Just to let you know, you can make a website from notepad.

You're just using it wrong


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...