The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
I had the same thoughts a few years ago for my son. It has been used a few times - but sadly didn't generate the sustained interest I wanted it to. There were unfortunately other more interesting things on the PC.
I bought a relatively cheap one from a store for about fifty bucks - you could probably get the same off e-bay for less now. My main criticisms are that it is relatively low resolution (probably related to USB-1 at the time) and it is problematic from a driver/support perspective.
If there is any advice I would give - it would be to make sure that the driver side of things is covered.
I know what you are thinking, a programming question in the lounge, what is this outrage?!
But wait! there is no code involve!
In fact I am not interested in code, it's more like a conceptual and rhetorical question.
I wonder what to do about resources in my documents editor.
The problem: I am making this fantasy documents editor.
one can create / edit: image (& icon), (fantasy) maps, text, and tabular data.
- image, map and tabular data can contain images
- text document can contain anything (i.e. text, obviously, but also table, images and map snapshots)
document come standalone. one doesn't make a "project" with multiple assets, like a C# project...
instead one create a map, or create a text document, etc...
(this seems like the right approach, just like one doesn't make "project" with word, excel, power point)
now how do these document reference each other? that's my conundrum...
idea 1: copy each sub-document in current document.
problems 1: document can easily balloon in size, with same subdocument can be added multiple times
problem 2: document can be really small, but a resource, say a background image, can be humongous in size (and repeated in multiple document) and it's hard to make a nice and concise UI to take care of that
idea 2: each resource will be reference by some custom URI
problem 1: uri scheme is difficult. if it's absolute path on disk, what if the user move the folder containing everything? is it's relative, what if the user move only that file or work on a copy in another directory
idea 3: image are copied (too bad for duplicates or big images)(by duplicates I mean I could have 5 small documents becoming 5 big documents because of 1 single huge background image), tabular data are copied in (no biggies), maps are snapshoted (i.e. what is copied: picture of are of interest + 1 or 2 hint path / URL)
problem 1: big image can waste lots space, map do not update live
anyway that's the concept I am thinking about, and wondering how to tackle in the most user friendly and efficient fashion...
Any ideas or tips?
After some though, here is a quicker and better question, perhaps...
To clarify, it's not an algorithm question at all, more like a design question...
Where should I put the stuff? copy or not?
And if I reference (some? all?) how could I reference smartly?
Also, if I reference, obviously the user can move thing around breaking all reference. But how could I improve the user experience so that he will intuitively know what to do to maintain reference?
Decided... I obviously need to pack everything together.. if the files is emailed, the file should still work!
will go with option 3 (copy image, inline table, copy map as a screenshot" + some meta data: position, zoom and hint location)
and I am gonna provide a simple resource management tool.. basically a table with (thumbnail, size and search and replace button), should be ease to make it reusable and should help with size management
If you want something usable that will save much programming time, look at programs like Xara Designer (or their cheaper versions). They even have a 'Cloud' version that appears to tackle everything you are setting out to do.
Or just have a look at their approach, and reverse engineer it with the changes you want.
I'm certain there are other programs out there, that's just one I've used in the past that your post brought to mind.
Can't give you advise about the data structure behind it - I'm guessing it is probably a list of some nature. Might even boil down to a vector of objects, but not trivial to implement.
Create a reference directory that the user specifies per the project? Or they specify the main project file, and it creates a subdirectory under that parent directory named '?Resources' (if my Dos memory is correct, ie, if the project file was called 'MyProject.jnk' a subdir would be created called MyProjectResources, with all of the files referenced placed in it.
Make it so that the references are placed in it by your program, so the files would probably be duplicated on the drive somewhere, but it gives you a sane way to copy the project around. Otherwise you risk going mad, methinks.
That would be my initial approach. Take your pick of others.
Specify a resource (e.g. a file name), defaulting to resources (files) in the same location as the document. Allow for qualification, from the default, by providing a full path (URI) or relative path (to the document). Extra points for allowing a user-chosen default folder/directory (different from the document).
Yeah, makes sense to me...my suggestion may be a bit "anti-KISS" now-a-days. I started in the era of too few bits, so I'm still fighting a tendency towards ill-advised efficiency. I'm getting better at being wasteful (and more productive), but its a constant down-hill battle
Another option I've seen in some drafting programs is 'Pack and Go', where the program gives you the option to pull all of the resources together into a directory (which includes the main work file) so you can zip that directory up and send it to anyone. Until you do that, the resource files are located anywhere, including on the network.
yeah.. I was heading toward approach 3... packing most things by defaults
and, in the case of maps, including an image and a "custom link"
and having a resource list viewer where one can, if one wants, explicitly change the behavior (from embedded to link) and explicitly define the link (hence the user would be aware of dependency, since he created it explicitly)
I'd advise you to avoid XML "solutions", because they increase the required man-hours exponentially, with no measurable gain.
A few alternatives:
-- If you do it in HTML, you can open the page in a browser and "save as mht", which packages the whole page and its local resources into a single archive that reopens the page in a browser when double-clicked. This has the added advantage that you can (but don't have to) use resources on the Internet, which will be retrieved by the browser when the page is opened (so changes and updates are handled painlessly).
-- Single-sourcing (which is the name of the system you want) in MS Word works with scripts that use IncludeText statements, and is easy enough to implement (there should be plenty of information and examples on the web; if not, just ask).
-- If you've got money to burn, get FrameMaker or MadCap Flare.
I wanna be a eunuchs developer! Pass me a bread knife!