Welcome to City-Data.com Forum!
U.S. CitiesCity-Data Forum Index
Go Back   City-Data Forum > General Forums > Science and Technology > Computers
 [Register]
Please register to participate in our discussions with 2 million other members - it's free and quick! Some forums can only be seen by registered members. After you create your account, you'll be able to customize options and access all our 15,000 new posts/day with fewer ads.
View detailed profile (Advanced) or search
site with Google Custom Search

Search Forums  (Advanced)
Reply Start New Thread
 
Old 12-31-2010, 04:44 PM
 
3,111 posts, read 8,057,368 times
Reputation: 4274

Advertisements

I have some basic familiarity with writing code, but for web pages only.

How difficult would it be to make a program that would quiz you on words that you enter?

For example, I could enter in the foreign words and the English meaning, and then when the program would run, it would bring up the foreign word, and I would type an answer in English.

SO, am I out of my league, or is this fairly easy?
Reply With Quote Quick reply to this message

 
Old 12-31-2010, 07:33 PM
 
Location: Not far from Fairbanks, AK
20,293 posts, read 37,201,327 times
Reputation: 16397
If you search the Internet, you will find several applications that can translate for you. If you enter a misspelled word, then it probably cant't help you much, but not so if you enter the same misspelled word in a language dictionary. Some of both, translators and dictionaries, are used online, while others you can download and use a home on your computer. Some are free, and some aren't. For example, I use an application called Nisus Writer Pro that can use to type documents in other languages and correct the misspelled words for me as I type. It has several dictionaries, and it can be set so that the English I use transfers to the other language symbols automatically. Some times it confuses me at the beginning, until I become familiar with the keyboard layout

To learn to speak another language, it's hard to beat a system such as the Pimsleur, Rosetta, and others out there. Or anything where you can listen to spoken language and then repeat as you are told what is being said ahead of time. When I was in the military and had to learn another language, I had to take crash courses where I only spoke and listened to that language in the classroom. I could only use English to ask something to the teacher. For example, to clarify something for me, and of course to translate meanings in my mind. After a while you start thinking in the other language, but this takes some time.
Pimsleur Method - Authorized Pimsleur Dealer - Save on Pimsleur

Iuf such a type of programming is not difficult to you, why not getting in touch with the companies that engage in language translators and such? Nothing to lose...right?

Last edited by RayinAK; 12-31-2010 at 07:45 PM..
Reply With Quote Quick reply to this message
 
Old 12-31-2010, 08:00 PM
 
3,111 posts, read 8,057,368 times
Reputation: 4274
Thanks for the response.

I am dong fine with the traditional methods of learning languages, but am more interested in how to make a program that is similar to flashcards. So I could put all the words in a database, and the program would randomly select words to quiz me.

However, I am not familiar with the programming that would accomplish that. That is more or less what I am asking.

I don't know really...I thought it would be kind of cool.
Reply With Quote Quick reply to this message
 
Old 01-01-2011, 04:06 AM
 
Location: Mableton, GA USA (NW Atlanta suburb, 4 miles OTP)
11,334 posts, read 26,094,260 times
Reputation: 3995
Quote:
Originally Posted by DrEarth View Post
I have some basic familiarity with writing code, but for web pages only.

How difficult would it be to make a program that would quiz you on words that you enter?

For example, I could enter in the foreign words and the English meaning, and then when the program would run, it would bring up the foreign word, and I would type an answer in English.

SO, am I out of my league, or is this fairly easy?
That doesn't sound too difficult. Write two little programs ... one to save the foreign and English words to a file of some type, and the other to bring up the foreign words in the previously saved file, ask for input, and then let you know if your answer matches the previously saved answer.

Of course, most of the "difficulty" found in so-called modern programming is in two areas: setting up a development environment to begin with, and learning how to create and manipulate user interfaces.

That's where older microcomputers had an advantage, in my opinion. Most came with a variant of BASIC, and writing a program in many cases was as simple as:

:NEW PROGRAM
:10 PRINT "THIS IS A NEW PROGRAM. W00T!"
:20 GOTO 10
:SAVE
:RUN PROGRAM

You could write such a program in a simple text environment using a language like Perl, python, BASIC, REXX, or something. There are lots of choices, and most are free.

What environment do you want your program to run in? Windows? Linux? On a web site? Something else?
Reply With Quote Quick reply to this message
 
Old 01-01-2011, 12:59 PM
 
Location: SCW, AZ
8,324 posts, read 13,459,826 times
Reputation: 8000
Quote:
Originally Posted by DrEarth View Post
Thanks for the response.

I am dong fine with the traditional methods of learning languages, but am more interested in how to make a program that is similar to flashcards. So I could put all the words in a database, and the program would randomly select words to quiz me.

However, I am not familiar with the programming that would accomplish that. That is more or less what I am asking.

I don't know really...I thought it would be kind of cool.
What RCsteiner said is accurate, what you really need to learn is a moderate level of a scripting language such as VBScript, PowerShell, Pearl or Ruby to accomplish what you were asking for in your last post.
Scripting language use a syntax that is a lot more similar to plain English language and a simple IF...THEN...ELSE type command alone could help you accomplish this task. To break it down; you create a script and define the value (answer) for an object (which will be displayed in a question form to the user). Let's say the value (answer) is "ANSWER", and let's assume the question is "a word that would be the outcome of a question". The script will ask the question and wait for user's input (for user to type in the answer).
IF the user types "answer" THEN the script would return "correct!"
for any other responses, the script will resort to the value stated with the ELSE, (for example) "incorrect, please try again".

If the above example satisfies what you were trying to accomplish, then in a Windows environment, you could use VBScript or even better PowerShell v2. For more operating system independent purposes, Ruby or Pearl might be more suitable. All of them are freely available from the Internet along with tons of tutorials and guides to help you without even purchasing a single book.

Again, I am not a programmer by any means, merely a casual script guy at best.

Hope it helps!
Reply With Quote Quick reply to this message
 
Old 01-01-2011, 02:09 PM
 
3,111 posts, read 8,057,368 times
Reputation: 4274
Thanks guys! That helped a lot. I will look into some of scripts you recommended.

I don't learn things unless I do it, so I thought this would be a cool project to try out.
Reply With Quote Quick reply to this message
 
Old 01-01-2011, 06:15 PM
 
41,813 posts, read 51,074,696 times
Reputation: 17865
Since you're already familiar with HTML and probably forms I'd suggest looking into using PHP.

First downalod and install XAMPP, this will allow you te excecute PHP and also sets up MySQL.

There is great primer here that uses an address book on how to set up PHP script to insert and update data in MySQL database:

PHP/MySQL Tutorial - Part 1

One thing to note is that has no security so you can't use it on live site.

You can modify the address book example for easy insertion to create your database of words. From there you would need to create a script to to randomly pull one row which wouldn't be hard. A quick search brings up this example:

Selecting random record from MySQL database table. ~ Blog ~ Akinas


PHP manual can be found here. PHP: PHP Manual - Manual
Reply With Quote Quick reply to this message
 
Old 01-01-2011, 10:46 PM
 
23,602 posts, read 70,446,439 times
Reputation: 49277
IMO, such a program is super-easy in the old Basic syntax, but I would have a multiple choice answer rather than having the user type and possibly mis-spell an answer in English.

QUESTION1LABEL:
PRINT "Voulez vous coucher avec moi?"
PRINT "1. Are you on the couch?"
PRINT "2. Are you crouching?"
PRINT "3. Would you like to go to bed with me?"
PRINT "4. None of the above."
PRINT " "
PRINT "Select one"
PRINT " "
DO UNTIL
INKEY$ > "0" AND INKEY$ < "5"
LOOP

Answer$ = INKEY$
CorrectAnswer$ = "3"
IF Answer$ = CorrectAnswer$ THEN
PRINT "Correct!"
ELSE
PRINT "Incorrect!"
END IF

QUESTION2LABEL:
...and so on.

Questions and possible responses can be held in arrays, with random answers for the incorrect ones. That means the stuff under the first label doesn't need to be repeated, only called as a routine or subroutine.
Reply With Quote Quick reply to this message
 
Old 01-04-2011, 12:23 AM
 
1,496 posts, read 2,439,566 times
Reputation: 754
Learning in practice, this is a good method...
Reply With Quote Quick reply to this message
 
Old 01-04-2011, 02:46 PM
 
Location: Mableton, GA USA (NW Atlanta suburb, 4 miles OTP)
11,334 posts, read 26,094,260 times
Reputation: 3995
Quote:
Originally Posted by paladinking View Post
Learning in practice, this is a good method...
It sticks, especially when you mess up and have to rewrite things 100 times.

Programming is fun! See?

http://xkcd.com/353/

Last edited by rcsteiner; 01-04-2011 at 03:10 PM..
Reply With Quote Quick reply to this message
Please register to post and access all features of our very popular forum. It is free and quick. Over $68,000 in prizes has already been given out to active posters on our forum. Additional giveaways are planned.

Detailed information about all U.S. cities, counties, and zip codes on our site: City-data.com.


Reply
Please update this thread with any new information or opinions. This open thread is still read by thousands of people, so we encourage all additional points of view.

Quick Reply
Message:


Over $104,000 in prizes was already given out to active posters on our forum and additional giveaways are planned!

Go Back   City-Data Forum > General Forums > Science and Technology > Computers

All times are GMT -6. The time now is 01:17 AM.

© 2005-2024, Advameg, Inc. · Please obey Forum Rules · Terms of Use and Privacy Policy · Bug Bounty

City-Data.com - Contact Us - Archive 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37 - Top