• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

What language for this problem?

westrock2000

[H]F Junkie
Joined
Jun 3, 2005
Messages
9,627
I would like to know which language would best solve this problem.

I have a text file that has configuration settings in it. Basically it looks something like this;

Not important information
more not important information

Card.......Slot
1............18
2............23
3............5

The information I need to change is link different slots to the cards. Basically the slot can change to a different number depending on the configuration. The cards are stationary, the slot that it attaches to is what changes. I would like a graphical interface too, preferebely where someone can drag a line from the card to the slot.

I would like the program to read the initial file display that config than allow me to change the config and save it.

This is in WinXP. I am familar with bash scripting and TCL scripting (Unix/Linux) and HTML programming. HTML might work as far as interface is concerned, but I don't know how well it is at saving data directly to disc. I don't want to have a "Save As..." box to open, just write the data in the correct line and format. Because it has to have all that other non important information even though its of no use to this application.

Any ideas as to what language I should look at, maybe Visual Basic? I took that in High School, and it has the GUI aspect, but I don't know how versatile it is. Also a free writer/compiler would be nice :D

Thanks.


EDIT: I read the FAQ and just wanted to say this is not a homework problem. Its has to do with something at work, and I like to learn new stuff and this was a problem that could be improved upon. I just need someone to point me in the right direction because there is so much different languages out there.
 
i'd say nearly any programming language that's worth anything is capable of doing string parsing.

if it's just "run this only on my machine", then you can use any programming language regardless of web-based or client-side only. if you are familiar with visual basic, then look into vb6 or vb.net. if it needs to be web-based and if you are already running xp pro, then you can write an "asp" page that will read/write files. javascript is another option. the "dot net" stuff is really good to work with. others more familiar with the linux/unix world may have some suggestions about languages to try.

i'd say your only limitation is how/where this application needs to be deployed and what languages do you think you can get it done the quickest with.
 
haha, westrock2000 from honda-tech?

as far as the text parsing involved with reading and writing from/to a config file Perl is the most straightforward language. but with the gui aspects it's really whatever you feel more comfortable with. but if you'd like to try to implement the gui in html Perl will be the easiest language to use.

i'm unclear what you're really looking to do though. are we supposed to be visualizing the cards and slots like an actual card game or something? or as abstract data that can be arbitrarily represented by whatever means seems reasonable?

if it's like a card game or actual cards or whatever you'll want something with a full-blown graphical api, like java or flash or something.
 
Given that the OP is familiar with TCL, why not do it in TCL? ActiveState has a TCL distro for windows - I don't know about their TCL specifically, but their Python's top notch & I've heard good things about their Perl.
 
ameoba said:
Given that the OP is familiar with TCL, why not do it in TCL? ActiveState has a TCL distro for windows - I don't know about their TCL specifically, but their Python's top notch & I've heard good things about their Perl.

Good point! I completely forgot that activestate made a Tcl implementation. I'm not sure how easy it is to turn a Tcl file into an exe though... but I don't know how much that matters here either.
 
fluxion said:
haha, westrock2000 from honda-tech?

Ya guilty as charged :D

No this isn't for a game or something, its for a logic tester at work. The "cards" are the actual hardware boards and the "slots" are where they plug into an interface board. When we swap boards around or use different interface boards we have to change this mapping. Currently we have to manually open the TXT file and change it. I would like a GUI version.

Here is basically what I want it to look like.

cardpic.jpg


I would like to be able to drag the line from a card to a slot.

The only stipulation is that since this is in a work enviornment I do not have Admin capabilities so I can't install anything. So I don't know if that eliminates any languages. I can probably copy/paste certain DLL's and stuff though.

If you say that HTML can directly sort data from a txt file and append it to the correct line than that might be a good route because I'm already kinda famaliar with HTML. Not to mention I don't need any special compiler to write HTML. This would also allow me to take it do different places with ease.

Thanks for all the help!
 
Your solution seems extremely difficult to implement. I can't even really begin to think of how to draw lines between objects and somehow link them. I'm relatively new to GUI design though, so maybe yours is a solution...

However, if you do decide against yours maybe a solution similiar to this would be appropriate?

SlotCard.jpg


Just read the text file on startup/load, and just make sure that if you've selected a particular slot, that you remove it from th e pool of available slots to select for that card --- that way you can't have 2 different cards using the same slot.

If you know the maximum number of Cards and Slots, it's really easy to implement. If you don't, you could scan the text file, calculate the number of Cards and Slots, then dynamically add Labels/ComboBox's and maybe throw on a vertical scrollbar so that if there are a lot, you can scroll.

Obviously, there are a lot of different ways you could approach this, and I'm sure there is some flaw in mine that I'm missing, or a much simplier approach/design. But if the purpose is just to organize a text file, and you want a GUI representation...
 
bofkentucky said:
That's easily done as a HTML form with perl or php and a text file as the backend.

definitely the easiest route if you're already proficient in html. the interface would just be a dynamically generated form created from a perl/php script that parses/writes the config file.

you mentioned earlier that you didnt have adminstrative access though? you would likely need admin priveledges to add a perl script to your company webserver's cgi-bin so you might wanna get some authorization before continuing too far down that path.
 
westrock2000 said:
What was that made in?

I did that in C#.NET, but it doesn't really matter what language you do it in as long as you feel comfortable in it.

Plus the fact that you can't install stuff without administrative priveledges may make C#.NET a problem if you don't already have the .NET Framework 1.1 or 2.0 beta installed...although, it's a part of the Windows Update, so there is a good chance that it's already installed.

Although, maybe a WebForm solution would be better considering you already know HTML. I know very little (Read: Absolutely nothing) about webprogramming, so I can't really help you there. :)
 
If you have set positions on the cards and slots on the GUI, it wouldn't be too hard having lines being drawn dynamically. You can use some dragdrop events to determine what card was being drug, and where it was dropped (the slot). Lemme see if I can do a quickie demo. I use VB.NET, which is pretty simple to pick up.
 
Back
Top