Any programmers care to answer some questions from a newbie?

beatniks3

Senior member
Apr 14, 2000
598
0
0
Hello. I am what you would call a hardware-only kind of computer guy. I need some general guidance with a program I want to design. I am an English Major writing a senior thesis on the Cut-up method of William Burroughs and Brion Gysin. In summary, this was an artistic method that they started to work with in 1959 that took the montage of painting and applied it to text. They randomly cut-up text from a variety of sources and combined these fragments back together by chance. Burroughs believed that the cut-up method liberated the WORD from all its pre-defined, and thus, controlling uses. Anyways, I would be happy to answer anyone?s questions, just post them or send along a PM. I want to design a program that will take a certain amount of text (be it a sentence, a paragraph, or a whole book) and rearrange this text based on some kind of system of perimeters and do two things with this data: display it in a window on the screen and save it to the harddrive for eventual cd-r back-up. I say I want a system of parameters because I want there to be many possible ways to manipulate and show the text. My little experience with Java Programming has taught me that as text is stored as a numerical variable, this shouldn?t be very hard (in theory) to do. Where should I start? Is this something that I should try and do myself or should/could I find someone to do this for me? Thanks for reading and please post whatever comes to mind!
 

element

Diamond Member
Oct 9, 1999
4,635
0
0
Is this something that I should try and do myself or should/could I find someone to do this for me?

If you knew how to do it you'd have already started I presume. But on the other hand you can always learn something new (if you have the time)

that took the montage of painting and applied it to text. They randomly cut-up text from a variety of sources and combined these fragments back together by chance

What is a montage? Is the text painted or is the text the painting?

I want to design a program that will take a certain amount of text (be it a sentence, a paragraph, or a whole book) and rearrange this text based on some kind of system of perimeters

In the program you want, will the text have painting on it or just plain text?
 

beatniks3

Senior member
Apr 14, 2000
598
0
0
thanks element for the post. You are right, if I could do it, I would have started it already. I was just wondering if it is realistic to start something like this with little to no programming experience. As for your questions...1.) the montage is the artistic process of combining different parts of paintings into one painting. If you have ever seen someone take different magizine pictures and glue them together, that is called a photo-montage. 2.) In the program I want, the text will be sent through some kind of random number generator that shifts the texts position based on this random number.

anyone else? please?
 

kranky

Elite Member
Oct 9, 1999
21,019
156
106
I don't think it would be very hard to do (easy for me to say, I know.)

The hard part might be lining up the many pieces of text you want to manipulate. Once you have that, your program would have some fairly simple (I presume) options that define how you manipulate the text. Then all you have to do is output it.

I'm not familiar with how they specifically used it, but if you are mirroring their efforts it can't be that hard. I guess the user could input how many total words they want, and within the program you just randomly select some number of your source text pieces, randomly pick a starting word in each piece, randomly select X number of words from each, then string it all together.

I think you could do it, and you'd learn something in the process.
 

Ameesh

Lifer
Apr 3, 2001
23,686
1
0
yeah it shouldnt be too difficult to write, Text in java is stored as unicode characters ie 2 bytes or 16 bits, you can easily have a program that reads in a text passage and displays each word in a random position on the screen, have a random word be placed on a pre determind position on the screen is a little harder because you have to have a good way of saying what the pre defind locations are, ie if you want to say have an article from Cosmo magazine jumbled up and placed on the screen in the shape of the mona lisa the hard part would be telling the program what the mona lisa looks like. not too difficult but at least a few days work. if you must do it in java, then you can use the AWT to help with the drawing.
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0
That wouldn't be that difficult, really. I'd say you could do it with Java's AWT, or Swing. If you're going for a non-Java solution, you could very easily do it in VB using native methods, or with C or C++ using the win32 api's GDI.

If you do have very little experience in Java, I'd say it would probably be a stretch for you to complete it yourself. Only you can be the judge of that...

[edit]With all the lag in my reply, Ameesh beat me to it.[/edit]
 

Ameesh

Lifer
Apr 3, 2001
23,686
1
0


<< That wouldn't be that difficult, really. I'd say you could do it with Java's AWT, or Swing. If you're going for a non-Java solution, you could very easily do it in VB using native methods, or with C or C++ using the win32 api's GDI.

If you do have very little experience in Java, I'd say it would probably be a stretch for you to complete it yourself. Only you can be the judge of that...

[edit]With all the lag in my reply, Ameesh beat me to it.[/edit]
>>





HAHA :D :p
 

Jzero

Lifer
Oct 10, 1999
18,834
1
0


<< you do have very little experience in Java, I'd say it would probably be a stretch for you to complete it yourself. Only you can be the judge of that... >>



Given enough time, you'll figure it out eventually, but if you're hard-pressed, you could probably throw it together easily in VB. Maybe even store the words in an access database....

Heck....if you did it in Java, you could probably make a cute little web interface for it....
 

Ameesh

Lifer
Apr 3, 2001
23,686
1
0


<<

<< you do have very little experience in Java, I'd say it would probably be a stretch for you to complete it yourself. Only you can be the judge of that... >>



Given enough time, you'll figure it out eventually, but if you're hard-pressed, you could probably throw it together easily in VB. Maybe even store the words in an access database....

Heck....if you did it in Java, you could probably make a cute little web interface for it....
>>



dont go making it more complicated for him, a text file is fine, he already said they're gonna be jumbled any way. he doesnt need a db for this.
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0
Depending on how complex you want the rendering of the text on the window, this could be extremely simple. If you want to make it random, you could easily take a file as input, convert the buffer into an array by splitting on a word boundary (a space, newline, etc. Or, in a regular expression, \s). You could then randomly access elements in the array (chances for overlap, but you could eliminate that if need be) between 0 and the upper bound. For each random element, you could simply draw the text with random x,y coords within the bounds of the window.

You could apply the above to almost any language, some more easily than others.
 

Jzero

Lifer
Oct 10, 1999
18,834
1
0


<<

<<

<< you do have very little experience in Java, I'd say it would probably be a stretch for you to complete it yourself. Only you can be the judge of that... >>



Given enough time, you'll figure it out eventually, but if you're hard-pressed, you could probably throw it together easily in VB. Maybe even store the words in an access database....

Heck....if you did it in Java, you could probably make a cute little web interface for it....
>>



dont go making it more complicated for him, a text file is fine, he already said they're gonna be jumbled any way. he doesnt need a db for this.
>>



Oh well. I guess I think it's easier to have a db with a numeric primary key associated with each word list and then just start selecting words based on a random number and throwing them up.
OTOH you could just read word-by-word into an array and fire out words based on a random index in the array.
You're right, that's probably simpler.
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0


<< Oh well. I guess I think it's easier to have a db with a numeric primary key associated with each word list and then just start selecting words based on a random number and throwing them up. >>



If he's a "newbie", I doubt he has experience with JDBC/ODBC/ADO/else. Also, I think choosing random words isn't really his goal. I believe he wants to take words from a document and use them as the "canvas", as it conveys an original point.
 

telstar1

Golden Member
Feb 14, 2001
1,206
0
0
Remember how computers were designed to make our lives easier? (That, and to organize people's recipies). Now this poor guy is learning Java or VB in order to rearrange some words where previously he would've just been able to break out a pair of scissors and a glue stick.

Ah ... progress...
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0


<< Remember how computers were designed to make our lives easier? (That, and to organize people's recipies). Now this poor guy is learning Java or VB in order to rearrange some words where previously he would've just been able to break out a pair of scissors and a glue stick. >>



He is taking a real-world idea and applying it to the computer, not the other way around. It's absurd to think that any system could accomodate everything in the real-world. Remember, computers only have the ability to make things easier because hardware and software engineers make it so :)
 

beatniks3

Senior member
Apr 14, 2000
598
0
0


<< Remember how computers were designed to make our lives easier? (That, and to organize people's recipies). Now this poor guy is learning Java or VB in order to rearrange some words where previously he would've just been able to break out a pair of scissors and a glue stick.

Ah ... progress...
>>



LMAO...that is what the cut-up technique was... Burroughs and Gysin, they would cut into newspapers, books, etc. at completely random points with exacto knifes and used the resulting fragments however they could to form new dialogue or narrative or poetry. I have been being a bit vague on purpose so as to see what you guys would come up with on your own. I have taken one college level Java class and we did do a simple project that dealt with encrypting/decrypting text files. You guys/gals are really great...and I apologize if it sounded like I want to make pictures out of the text...I would just need it neat and readable...

here is an example of the web-based cut-up machine: link

I have used this before to make my own poetry and for ideas but there are not enough options for what I want to do. I also would need the program so I didn't always have to be connected to the net. I imagine that the program would take the input text and make an array with it. From there you basically have a set of numbers that you could rearrange however you wanted. There is a level of complexity this could reach that it never could with paper and scissors...maybe I should figure out how to do myself so I can better understand how to mess with the WORDS.

Oh and it is really that obvious that I am an English Major? (ducks his head in case someone throws something ;)
 

Jzero

Lifer
Oct 10, 1999
18,834
1
0


<<

<< Oh well. I guess I think it's easier to have a db with a numeric primary key associated with each word list and then just start selecting words based on a random number and throwing them up. >>



If he's a "newbie", I doubt he has experience with JDBC/ODBC/ADO/else. Also, I think choosing random words isn't really his goal. I believe he wants to take words from a document and use them as the "canvas", as it conveys an original point.
>>



Doing a db I meant to be exclusively with Access and VB since the two integrate very well. He wants to choose words from a document, and it would be about as easy to import a document into the database as it would to read the document into an array....possibly easier.
But only in VB since almost all the stuff is pre-written.

Do the fragments have to make sense?
 

beatniks3

Senior member
Apr 14, 2000
598
0
0
Do the fragments have to make sense?

No, they don't have to and when they do (by chance) it is almost magical...it is these chance combinations that Burroughs was so interested in because it gave his work new (unintentional) direction. I am really glad you asked this essential question. The fact that alot of it will be meaningless is why it would be nice to have a cool user interface that would display the text as it was created so that you could copy the useable text into an open word document or something. The reader would make sense of the cut-up.

I like the sound of your database idea because I can see this project running on large amounts of text files at the same time...
 

Jzero

Lifer
Oct 10, 1999
18,834
1
0


<< No, they don't have to and when they do (by chance) it is almost magical...it is these chance combinations that Burroughs was so interested in because it gave his work new (unintentional) direction. I am really glad you asked this essential question. The fact that alot of it will be meaningless is why it would be nice to have a cool user interface that would display the text as it was created so that you could copy the useable text into an open word document or something. The reader would make sense of the cut-up. >>


Actually....that's pretty friggin cool....



<< I like the sound of your database idea because I can see this project running on large amounts of text files at the same time... >>


I dunno....I'm on the fence about the database method. Decartes is quite right that it could complicate the issue in a lot of ways...I guess you could try it one way and if it seems to be a pain, try it the other...
If it's something that you have until May or June to work on, you have time to do it right, and if it's something you'll want to continue to develop and refine even after the project is finished, you'll want to do it right from the get-go....otherwise you find yourself rewriting shoddy things you wrote before....

 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,705
4,663
75
Are you looking for something like one of these? Specifically, I imagine the PERL Travesty implementation could be easily fitted to your needs, if one of the others is not already what you need.
 

beatniks3

Senior member
Apr 14, 2000
598
0
0
thanks for the link, Ken_g6, I'll have to look at those programs closer at home tonight...

Actually....that's pretty friggin cool....

For those of you interested in this topic, I suggest you read either The Third Mind or Minutes to Go by Burroughs/Gysin. They are both fairly rare books but your university library should have at least one of them.

anymore questions? ideas?
 

element

Diamond Member
Oct 9, 1999
4,635
0
0


<< Oh and it is really that obvious that I am an English Major? (ducks his head in case someone throws something >>



Boo! get off the stage! *throws a small pocket dictionary*

just kiddin ;)

This reminds me of one time when I saw a program that took random words and made sentences out of them.

It had sentence structure rules like: "proper_noun verbs a adjective object at proper_noun2"

then it would have random words for each type of word for example

proper_noun: Beatnik, Anand .... etc.
verbs: throws, wails, launches...etc.
adjective: big, small, huge, tiny ...etc.
object: book, keyboard, paino, rock ...etc.
proper_noun2: element, kranky, ameesh, ...etc

So it would produce a sentance like:
Beatnik throws a big book at element.

except i made a very simple one but this program had more complex stuff also like adverbs, prepositions, you name it. And lots of varied sentence structures. It was pretty cool. The sentences were each correct and made sense this way individually, but there was no storyline, so overall it would just be a bunch of random sentences. But it beats having just random words which make less sense usually, (unless as you stated you get really lucky)

Wish i still had that program. but it shouldn't be too hard to make if you know how to organize the sentence structures up right. Being an english major i would think you would. or you could just look at regular text and determine what the sentence structures are.

The programming itself is just a matter of substituting 1 string for another, easiest done in VB or similar, with C being a little more involved but still relatively straight forward. I don't know Java so i don't know how easy/difficult it would be in that case.

BTW a and at were random too but i forgot what those are called, are they prepositions?

edit: i meant proper noun rather than pronoun, pronouns are words like ``I,'' ``you,'' ``she,'' ``he,'' ``it,'' ``we,'' ``you,'' ``they.''
this program had those in there too. But my example is a simple one.
 

beatniks3

Senior member
Apr 14, 2000
598
0
0
o.k. been a while since I posted in this thread. Maybe the bump will generate more interest in this topic. So after thinking about what I need done (in terms of programming), I think maybe the right word to use would be permutation. Could someone make an easy program that produces all possible purmutations of an input text file? For example: The text file "THE DOG IS BLACK" would return
BLACK IS DOG THE
THE BLACK DOG IS
IS THE BLACK DOG
THE IS DOG BLACK, etc. The artist Gysin that I mentioned earlier experimented with doing this back in the day with the ancient computers. Now to extend this idea, would it be possible to do the same thing except instead of using single words, you used whole sentences? For example: The text file with 4 sentences (1,2,3,4) would return
1234
2341
3412
4123, etc. Would it be possible to make the program do the same thing with paragraphs? For example: The text file with 3 paragraphs (1,2,3) would return
123
231
321, etc.

Please help! No contribution will go unwasted! thanks, beatniks3

edited:spelling mistake!
 

beatniks3

Senior member
Apr 14, 2000
598
0
0
thanks for the replies! I understand what you all have suggested but I don't really have the real-world experience to just sit down and do it...would it be possible to take the source code from here and change/alter it to fit my needs? (remembering that what I want is all permutations (either by word, by sentence, or by paragraph). What software would I need to do this? I am trying to do this TODAY so if anyone has any advice, feel free to PM me or reply here...thanks...