123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|593|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Mini Challenges -> Design : A better programming file format

Sat, 12 Feb 2011, 13:30
JL235
Pure ASCII text, that's the standard format for storing 99% of programming languages for about 50 years. Is this really the ultimate? I would hate it if it were.

So here is my challenge, come up with ideas on what would be a better format. For example for a game programming language you could allow people to embed images directly into the text itself, so you can see and edit them there.

Another improvement could be if the documentation you wrote was formatted automatically within the editor, and displayed in a JavaDoc style directly above the appropriate method or class. Then you can have the best of direct source code and pretty-indexed documentation.

What are your ideas?
Sat, 12 Feb 2011, 13:48
Jayenkai
The thing with ascii, though, is it's portability.
Coding on the go, and completely smegging useless as that ideal has actually been, is possible because everything does raw ascii.
In PMC, where everything is in the browser, that's probably where you can fiddle with this the most. Because it's in the browser, if it's working on one system, it'll work on compatibles. Images and text, ways of interacting, they just work, whereas with desktop apps there so much more you need to control.
If a user adds an image, then forgets to copy said image, what would you do? You don't ever have that issue with PMC. In many ways that's a much better form for it.

But I'm not sure if you should push it further. A bit of a hyperlinked text for "load image" maybe... But a thumbnail in the code? That's probably too much.
I say stick to text.

-=-=-
''Load, Next List!''
Sat, 12 Feb 2011, 21:10
Stealth
ASCII is simple and I agree with Jay that we shouldn't try to complicate it. However, I would like to see managing files done away with in future operating systems. Your iPhone doesn't expose files to you, it simply finds your content because the OS stored it in a known place. Your DS doesn't expose game save files in a file browser and it works ingeniously. Mac OS X is kind of moving toward this model with the Mac App Store. They are removing the need to manage application files. I think (and would like) files to be transparent to the user someday. Clicking download on a song should automatically store the file in your music library without you touching it. This will produce a much simplified experience managing files.

Of course, the file system would still exist behind the scenes and power users can browse it much like they use the command line today.

-=-=-
Quit posting and try Google.
Tue, 15 Feb 2011, 15:24
Scherererer
It would be interesting to see some kind of super-file that could store all of the resources in one location. You could probably take a tip from Microsoft's docx, pptx, etc... formats which are really just zip files containing xml in structured folders. So, you could effectively have all your code and header files in one "zip" that holds everything, and then maybe a manifest file of some kind which either dictates compilation order (think cmake, premake) which could be a nice xml formatted file, and then throw any other resources/dependencies in there that you wish. This whole file would just be read in as a single "program code" file, and would automatically build a project, dependencies, etc. based on the manifest file in a generic format. Could be interesting.

-=-=-
YouTube Twitter
Computer Science Series: Logic (pt1) (part 2) (part 3) 2's Complement Mathematics: Basic Differential Calculus
Tue, 15 Feb 2011, 15:51
Jayenkai
That's pretty much how Mac Apps work, though. The "App" is actually a folder, with everything stuffed into it. It's not even zipped!
You double click the "App", it runs the exe. job done.
Java's essentially the same, too.
..
.... Come on Microsoft.. wakey wakey.

-=-=-
''Load, Next List!''
Tue, 15 Feb 2011, 19:27
dna
Wordpress is like that as well.
Wed, 16 Feb 2011, 22:10
mindstorm8191
I think it would be neat to insert images into the text of code, for the purpose of better documentation. I've had instances where I'd like to describe the objective of code using an image, instead of describing it using text.

On the other hand, perhaps a message like "refer to example.jpg in the code folder" might work too. ... But still, it'd look better.

-=-=-
Vesuvius web game
Thu, 17 Feb 2011, 05:51
j\\'ordos
Something like a hyperlink would be better than 'refer to' methinks
Mon, 21 Feb 2011, 20:11
oscar
I think (as jay said) the main reason for plain text is that it just works. If you start introducing things like embedded images & hyperlinks into the mix then you get every language having a single purpose editor.
There'd be no easy way to have things like crimson editor or even VI & emacs able to edit more than a couple of simple source file types.


It's a great idea though. Maybe a better way would be to just have simpler ways of referencing and including external media in existing programming languages (none of this fopen() fread() & fclose() type stuff).