Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Visual Basic 6

  • 01-11-2005 11:46pm
    #1
    Registered Users, Registered Users 2 Posts: 9,258 ✭✭✭


    Ok, so I know Visual Basic can hardly be considered a true programming language but for my current college project I just need to know one thing as endless googling hasn't given me the answer.

    Currently I have a program that's reading integers from a text file so that the numbers stay constant when the program starts and finishes (we haven't learned how to integreate Databases into our programs yet).

    Anyways at present I have it reading the text file by typing out the full path to the file as it doesn't except just the file name. Is there a way to just get it to read from the textfile of the directory that the form (uncompiled) is currently in?

    Cheers.


Comments

  • Closed Accounts Posts: 2,639 ✭✭✭Laguna


    I doubt it's a spam bot, probably just a funny-guy...

    In answer to your question, I don't think there is a way to refer to the textfile you're talking about with giving an absolute path on the form startup. Someone correct me if I'm wrong, but the only way I could use relative paths in VB when I used to program in it ,was through the use of a common dialog (i.e. .ShowOpen) and literally having to navigate to and select the file you were after (even then, this is at runtime not startup of the program).

    Yeah I'm pretty sure to be honest that absolute paths have to be used when referring to a file at startup as otherwise maybe you could try a reference string that simply says textfile.txt, as it is in the same directory after all


  • Registered Users, Registered Users 2 Posts: 7,987 ✭✭✭Trampas


    Achilles wrote:
    Ok, so I know Visual Basic can hardly be considered a true programming language but for my current college project I just need to know one thing as endless googling hasn't given me the answer.

    Currently I have a program that's reading integers from a text file so that the numbers stay constant when the program starts and finishes (we haven't learned how to integreate Databases into our programs yet).

    Anyways at present I have it reading the text file by typing out the full path to the file as it doesn't except just the file name. Is there a way to just get it to read from the textfile of the directory that the form (uncompiled) is currently in?

    Cheers.

    Typical college student comment about Visual Basic not a programming language.

    All they ever teach you in college is a drop a text box here and button there.

    Its a powerful language when you get to learn (5 years work experience)

    Anyway rant over.

    Post up your code as makes it easier for people to look at what you have done and then can guide you to what you have done wrong to what you should do right. Comment ou code also so you explain what you intend to do here.

    You will get a quicker response.


  • Registered Users, Registered Users 2 Posts: 9,258 ✭✭✭MrVestek


    Ok then, that's extremelly retarded. My lecturer told me that there was a way to do it but he couldn't remember at the time, and with having a week off I haven't had a chance to talk to him yet. He told me to look it up on the net but I can't find anything inr elation to it.

    *edit*

    I don't have the code with me at present as I'm not on my home pc. Anyways I'd prefer not to anyways as there are other guys in my class who were given this exact assignment and I don't want them stealing my code. All I need to know is, how to get it to open, read from, and write to a text file without having to give the full filename path, ie telling it to just use the directory it's in. Say for instances I wanted to read 5 variables from a text file which are numbers seperated by a , like this:

    23, 4, 5, 17, 6

    I can currently do that by telling it:
    Open as #1 "C:\blah\variables.txt"

    But surely there's a way to get it to open variables.txt from within the same folder as the form.


  • Closed Accounts Posts: 2,639 ✭✭✭Laguna


    Yeah post your code up here and my old brain noodle will work better (as I am only recalling VB off of the top of my head here)


    EDIT: Have to agree with Trampas here, what I learnt in college of VB was absolute piss compared to what you learn the language can do yourself/in work. It has the ability to completely control the windows environment and you can make powerful applications in it.


  • Registered Users, Registered Users 2 Posts: 9,258 ✭✭✭MrVestek


    Tell ya what, I'll pm the code to you when I can to keep prying eyes away, ok? By the by the program is only like 70% complete so if you spot any other errors ignore them as I wanna fix them myself.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 640 ✭✭✭Kernel32




  • Closed Accounts Posts: 2,639 ✭✭✭Laguna


    Kernel32 wrote:


    That's not a helpful comment, I think the charter should say something about posts saying RTFM/unhelpful comments? (if it doesn't already).

    Besides, I had a look at the link, it provides no answer to the mans question, it's not even close. So in future if you're going to shove something in someones face, make sure it's the right information..


  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    Laguna wrote:
    That's not a helpful comment, I think the charter should say something about posts saying RTFM/unhelpful comments? (if it doesn't already).

    I believe the charter tells you to RTFM first.

    Hes not really explaining his issue very well, although the link does help AFAIR the app object is set to the location of the EXE on runtime.


  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    Achilles wrote:
    Ok, so I know Visual Basic can hardly be considered a true programming language...

    Way to go to insult everyone who can help you. Anyway, my vb6 is a little rusty but something along the lines of this (which is what kernel32 was suggesting) should give you an idea:
    dim filePath as string
    
    filePath = app.path & "\" & "doyourownhomeworkinfuture.txt"
    


  • Registered Users, Registered Users 2 Posts: 7,987 ✭✭✭Trampas


    I have done something like this before in work where I read a text file but the information was on a line by line and the printed of the results into another text file

    Names have been changed

    ' Input file ...
    Open "C:\In.txt" For Input As #1

    ' Output file ...
    Open "C:\Out.txt" For Output As #2

    'Here takes in the string from the text file
    Line Input #1, strIn

    'Here outputs the string to text file
    Print #2, strOut

    Infuture post your code as we will be easier for people to respond


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 640 ✭✭✭Kernel32


    Laguna wrote:
    That's not a helpful comment, I think the charter should say something about posts saying RTFM/unhelpful comments? (if it doesn't already).

    Besides, I had a look at the link, it provides no answer to the mans question, it's not even close. So in future if you're going to shove something in someones face, make sure it's the right information..
    From the charter in reference to homework questions:
    Replies may direct the student to the answer, but not post the answer outright. This should help people learn to code, and not how to plagiarise.
    Achilles wrote:
    Is there a way to just get it to read from the textfile of the directory that the form (uncompiled) is currently in?
    From the help file:
    For the App object, Path specifies the path of the project .VBP file when running the application from the development environment or the path of the .exe file when running the application as an executable file.

    As I said before, RTFM and I stand by it. If you slam on the language but then can't be bothered to read the help file then what type of response would be expected?


  • Closed Accounts Posts: 2,639 ✭✭✭Laguna


    Fair enough, I'm always wrong when it comes to my opinion on Boards anyway.


  • Registered Users, Registered Users 2 Posts: 9,258 ✭✭✭MrVestek


    Jesus christ I never should have posted here in the first place. Any time anybody asks for help you always pick apart every little thing that the user asks.

    The program we were asked to create is a Vending Machine Simulation Program. I've explained what I'm trying to do as best as I can. Basically I'm looking to input 5 variables into 5 seperate text files that are retreaved from a text file, do this like so:
    Open "M:\College\CP2\Visual Basic\Vending Machine Project\stock.txt" For Input As #1
    Input #1, CokeStock, DietCokeStock, FantaStock, LiltStock, SpriteStock
    Close #1
    txtCokeQuantity.Text = CokeStock
    txtDietCokeQuantity.Text = DietCokeStock
    txtFantaQuantity.Text = FantaStock
    txtLiltQuantity.Text = LiltStock
    txtSpriteQuantity.Text = SpriteStock
    

    As you can see, for it to work I have to give it the full path of the directory, which in this case is my pen drive. The problem I will have later is if I want to work on it on a college PC or when I submit it on a floppy discs, the paths won't be correct and I can be damned if i'm changing all the file paths (the above aint the only instance in my program of where code is read from a text file) if I'm changing all of the paths manually. If I do something along the lines of this:
    Open "stock.txt" For Input As #1
    Input #1, CokeStock, DietCokeStock, FantaStock, LiltStock, SpriteStock
    Close #1
    txtCokeQuantity.Text = CokeStock
    txtDietCokeQuantity.Text = DietCokeStock
    txtFantaQuantity.Text = FantaStock
    txtLiltQuantity.Text = LiltStock
    txtSpriteQuantity.Text = SpriteStock
    

    Then it doesn't work. So how do I get it to read the variables from a text file?


  • Registered Users, Registered Users 2 Posts: 640 ✭✭✭Kernel32


    Achilles wrote:
    Jesus christ I never should have posted here in the first place. Any time anybody asks for help you always pick apart every little thing that the user asks.
    Did you actually read any of the replies?

    I pointed you to the help file entry that solved the problem.

    Hobbes went one step further and supplied a line of code. I'm not sure what more is needed?


  • Registered Users, Registered Users 2 Posts: 7,987 ✭✭✭Trampas


    Achilles wrote:
    Jesus christ I never should have posted here in the first place. Any time anybody asks for help you always pick apart every little thing that the user asks.

    The program we were asked to create is a Vending Machine Simulation Program. I've explained what I'm trying to do as best as I can. Basically I'm looking to input 5 variables into 5 seperate text files that are retreaved from a text file, do this like so:
    Open "M:\College\CP2\Visual Basic\Vending Machine Project\stock.txt" For Input As #1
    Input #1, CokeStock, DietCokeStock, FantaStock, LiltStock, SpriteStock
    Close #1
    txtCokeQuantity.Text = CokeStock
    txtDietCokeQuantity.Text = DietCokeStock
    txtFantaQuantity.Text = FantaStock
    txtLiltQuantity.Text = LiltStock
    txtSpriteQuantity.Text = SpriteStock
    

    As you can see, for it to work I have to give it the full path of the directory, which in this case is my pen drive. The problem I will have later is if I want to work on it on a college PC or when I submit it on a floppy discs, the paths won't be correct and I can be damned if i'm changing all the file paths (the above aint the only instance in my program of where code is read from a text file) if I'm changing all of the paths manually. If I do something along the lines of this:
    Open "stock.txt" For Input As #1
    Input #1, CokeStock, DietCokeStock, FantaStock, LiltStock, SpriteStock
    Close #1
    txtCokeQuantity.Text = CokeStock
    txtDietCokeQuantity.Text = DietCokeStock
    txtFantaQuantity.Text = FantaStock
    txtLiltQuantity.Text = LiltStock
    txtSpriteQuantity.Text = SpriteStock
    

    Then it doesn't work. So how do I get it to read the variables from a text file?

    1. create a registry file which means you can change it between networks. Get it working locally on C drive before you go deep into folder. Google it

    2. You should have enough now to google it to get further with the Input # as this is part of VB and not a thing we made up.

    3. Go with 1 var first before trying to do 5

    Finally i think college lectures teaching student who know nothing about programming teach them rubbish.


  • Registered Users, Registered Users 2 Posts: 15,443 ✭✭✭✭bonkey


    Achilles wrote:
    But surely there's a way to get it to open variables.txt from within the same folder as the form.

    No, there isn't.

    There is a way to open it from the same location/folder as the compiled .exe, but - as has been pointed out - when working in Debug mode this will look for the file in the same location as where the .vbp is stored.

    IN either case, this may be the same folder as "the form" (by which I can only assume you mean the .frm), but that would fall into the category of "programming by coincidence" in my book.

    Why not look at the FileOpen Dialog, and simply get the user to select the file they want to read the values from? Or use a .INI file with the app?

    jc


  • Registered Users, Registered Users 2 Posts: 9,258 ✭✭✭MrVestek


    bonkey wrote:
    No, there isn't.

    There is a way to open it from the same location/folder as the compiled .exe, but - as has been pointed out - when working in Debug mode this will look for the file in the same location as where the .vbp is stored.

    IN either case, this may be the same folder as "the form" (by which I can only assume you mean the .frm), but that would fall into the category of "programming by coincidence" in my book.

    Why not look at the FileOpen Dialog, and simply get the user to select the file they want to read the values from? Or use a .INI file with the app?

    jc
    That's exactly what I need, a way to read the variables from the same directory that the .vbp project is stored, and when the .exe is compiled, to read them from the same directory. We're on the right track now, so how is it done?


  • Closed Accounts Posts: 3,357 ✭✭✭Beano


    Evil Phil has already posted what you need above.


  • Registered Users, Registered Users 2 Posts: 9,258 ✭✭✭MrVestek


    Ahh yes, sorry.

    So I'd just do something like:
    Open as #1 filePath = app.path & "\" & "coins.txt"
    

    Would that work?


  • Closed Accounts Posts: 3,357 ✭✭✭Beano


    sin é


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 9,258 ✭✭✭MrVestek


    Beano wrote:
    sin é
    Cheers guys thanks for the help.


  • Registered Users, Registered Users 2 Posts: 2,781 ✭✭✭amen


    I can be damned if i'm changing all the file paths (the above aint the only instance in my program of where code is read from a text file) if I'm changing all of the paths manually
    you should have a common function for opening files that accepts a path/file name and does the open/close read etc
    that way you only have to change code in one place
    if the same code is in more than 1 place you have done something wrong!


  • Registered Users, Registered Users 2 Posts: 4,003 ✭✭✭rsynnott


    Laguna wrote:
    That's not a helpful comment, I think the charter should say something about posts saying RTFM/unhelpful comments? (if it doesn't already).

    It does indeed; it encourages them for trivial questions such as this.
    Laguna wrote:
    Besides, I had a look at the link, it provides no answer to the mans question, it's not even close.

    Yes it does...
    Trampas wrote:
    Typical college student comment about Visual Basic not a programming language.

    Of course it's a programming language. However, so is INTERCAL.

    Incidentally, I hadn't realised it was taught in colleges. *shudder*


  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    Kernel32 wrote:
    Hobbes went one step further and supplied a line of code. I'm not sure what more is needed?

    That was Evil Phil, not me. :)


  • Registered Users, Registered Users 2 Posts: 4,142 ✭✭✭TempestSabre


    Newbie ques always make people grumpy...:D

    Coding requires you to be very precise about that you say and do. It also requires that you read very carefully all the instructions and help files, as porgrammers are often not very verbose (wordy) when explaining or describing things. Since if something is obvious to them, they often assume its obvious to everyone else. This is especially difficult if you are a newbie thats not used to reading carefully. I have a habit of scan/speed reading things, and its a bad habit for coders. Another habit of coders is to only look at, and answer the question thats been asked. Whereas often the question being asked isn't fully formed due to lack of knowledge of the poster. A good coder looks beyond the question, to see if the question being asked is the right question. I think theres should be a few more rules in this forum.

    1) Newbies, RTFM very carefully and slowly, you might have missed something.
    2) If you don't have the patience for newbie ques, don't post in reply.
    3) Don't be pedantic, without explaining why. (A concise answer and RTFM isn't helpful IMO).

    Of course this is kinda in the FAQs and Charter: READ BEFORE POSTING but its kinda longwinded.

    Mind you if you don't want newbie questions in the forum, you should change the forum name to Advanced Programming or similar. Scare newbies away. Just a thought. :cool:


  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    I think a newbie programming forum would be a great idea, it would require more *ahem* tolerance on our part - we all had to learn after all :)


  • Registered Users, Registered Users 2 Posts: 640 ✭✭✭Kernel32


    I don't see the problem. My original response was framed within the philosophy of the homework sticky. The original poster indicated this was a college project. The sticky says to not supply code. My reply had no code except a pointer to the help file where the answer could be found. I was then accused of being unhelpful, bizarre to say the least.

    Now at the risk of being seen as an angry old coder, any response beyond the pointer to the help file and maybe a quick one line explanation is doing a disservice to the original poster. At some point the poster well join the workforce and for simple questions like that they will not get any help from senior developers beyond what I provided. If they persisted in ignoring the response as they did here they would soon find themselves looking for a new job. I realize he or she is in college but its all part of learning and it will make them better in the long run.

    I like to see newbie questions. They often start interesting discussions that go beyond the orginal question.


  • Closed Accounts Posts: 2,639 ✭✭✭Laguna


    OK now, let me see if I've got this right..


    This is the Programming forum... yes?

    Why is it taboo/forbidden for people (especially 'newbies') to ask Programming questions?

    Anytime anyone ever asks a question that has a *hint* of a college assignment from it, you're all down their throat deeming yourselves to have carte blanche to pick apart everything and anything they say as you're all uber-L33t HaxxorZ. They should change the name of the forum for it to be more applicable, perhaps to 10010101010101010, to indicate your sheer superiority by communicating via binary.


  • Registered Users, Registered Users 2 Posts: 4,003 ✭✭✭rsynnott


    Any question which can be trivially answered through use of Google or a bit of common sense should not be answered here.

    Bear in mind that ultimately, you may one day end up debugging these peoples' code. With that in mind, it is surely better that they actually learn things, no?


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 15,443 ✭✭✭✭bonkey


    Laguna wrote:
    OK now, let me see if I've got this right..


    This is the Programming forum... yes?

    Why is it taboo/forbidden for people (especially 'newbies') to ask Programming questions?

    Its not. Its taboo to be asking questions where the asking and/or subsequent follow-up suggests that you're trying to leech an answer rather than be pointed in the right direction.

    K32 pointed a link to an article discussing the Path property, which mentioned (at the very least) the App object. It was accompanied by an almost-standard programmer-to-programmer comment of RTFM.

    Your response was that it wasn't helpful and didn't give the right answer anyway. The point is that it gave all the pointers one needed to either answer the question directly, or find the answer in short order.

    If you don't see that as helpful, instead preferring that some other programmer hand you the code being asked for, I would humbly suggest you are in the wrong profession.
    Anytime anyone ever asks a question that has a *hint* of a college assignment from it, you're all down their throat deeming yourselves to have carte blanche to pick apart everything and anything they say
    Bear in mind that most of the programmers you're deriding managed to get through college when there was no WWW at hand to supply a handy forum of people to regurgitate knowledge.

    We had to bribe the guys a year in front of us with beer n stuff ;)

    And even then, it involved ridicule.

    One of the greatest skills programmers develop is how to find solutions to problems. While your in college or elsewhere, it may seem that getting other people to tell you what you're missing is a valid way of doing this. In the real world, you'll find that changes.

    Programmers who solve problems by asking other programmers what the solution is....well....ask yourself why you'd hire such a question asker, and not another "question answerer".

    As a result, you'll generally find that programmers who are helping other programmers will not hand over a solution...just a means to find it. If you can find your solution given a pointer, then hopefully your knowledge of where and how to look for pointers will improve and you'll ask less often. You may even understand more of the entire area around which your question was based, rather than just the specific answer to your question.

    K32's link gave the information to solve the problem, plus general information about Path properties. To get the full complete answer, you'd also have to learn a bit (and have the opportunity to learn more) about the App object. So a lot of learning, which would along the way answer the question being asked. Is that not a fair trade?

    If you're response is "that doesn't answer my question, please help", then generally there'd better be a "because..." added at the end to show that you've looked at the pointer and figured out why its wrong.

    Yes, programmers with experience are probably too harsh on beginners. But there's mostly a reason. Give a programmer a hint that you want a spoon-fed answer rather than a pointer....well....just pray you never, ever have to work with or be interviewed for a job by said programmer.

    If the only things beginners learn from such harshness is to be more self-reliant, and to learn how better to find answers from scratch or from pointers....thats worth more than any high grades we can help them obtain by handing them their homework.

    jc


  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    rsynnott wrote:
    Any question which can be trivially answered through use of Google or a bit of common sense should not be answered here.
    In fairness using App.Path in this way is not really something that can easily be Googled. Where the OP went wrong is, as has been pointed out, by insulting the people he was seeking help from - not too bright.

    As for his lecturer not knowing 'off hand' - well, if he did know, he'd probably have a real job.


  • Registered Users, Registered Users 2 Posts: 15,443 ✭✭✭✭bonkey


    Where the OP went wrong is, as has been pointed out, by insulting the people he was seeking help from - not too bright.

    To be fair, the thread seems to be more continuing on Laguna's high-horsedness than the OP's initial gaffe when referring to VB.

    And to be fair to the OP, if he/she is doing it in college, and is being made learn VB as a subject (instead of something kule n secksy like Java, C++, or anything webby), I can kinda understand the comment. I don't agree with it, but if I was to spend my days correcting everyone who makes false assumptions about VB....

    The way I look at it...no matter how good a programmer the OP turns out to be, if he/she doesn't like VB, thats one less bod to compete with in that market when I choose to work in it. Why would I encourage them to do otherwise?

    Hmm...that gives me an idea.

    Please Achilles. Ignore these clowns. VB is a toy language, and no-one writes real applications in it. Take Laguna's example, and choose a different field. I'd recommend something web-releated, as long as its not back-end enterprise-level systems. Or games programming. I hear thats a growth industry, (and uses computer languages so real you won't believe they're not butter). Oh - and avoid project management like the plague too. No-one serious will want it.

    :)

    jc


  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    bonkey wrote:
    Please Achilles. Ignore these clowns. VB is a toy language, and no-one writes real applications in it.

    It was a toy language 10 years ago prehaps. But there certainly real-world applications made in it. People tend to only notice that is done in VB when the developer makes a complete Pigs ear of the UI design (they should give classes in that).

    Java has this same problem of people spouting "Its not a real language" based on how version 1.0/1.1(MS) worked.

    Other then that, your second post back is spot on. Should almost go into the charter. :)


  • Registered Users, Registered Users 2 Posts: 15,443 ✭✭✭✭bonkey


    Hobbes wrote:
    It was a toy language 10 years ago prehaps.

    I think you missed the implication of this bit, Hobbes:

    if he/she doesn't like VB, thats one less bod to compete with in that market when I choose to work in it. Why would I encourage them to do otherwise?

    Either that or this week's flavour of humour doesn't translate so well in writing.
    Other then that, your second post back is spot on. Should almost go into the charter. :)

    Shux. Thankee sir.


  • Registered Users, Registered Users 2 Posts: 3,548 ✭✭✭Draupnir


    I like when I hear students insult VB, it makes me feel a great sense of job security.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 9,258 ✭✭✭MrVestek


    Well this thread has certainly spiraled out of all control, perhaps we should Wiki it under the great VB debate. Anyways I retract my comment about VB seeing as it caused so much fuss, and I am currently learning Java here in college too, although it has a much steeper learning curve than VB. VB in my eyes is almost too user friendly, hence the 'inspiration' behind my original comment.

    That said tho the Java teacher is straight out of college herself and can barely explain the bloody language to us. I'm one of about... 2 people in the class that actually understand what's going on. Guess the old rule of 'there are only 2 types of people in this world... those who understand binary...' applies here.


  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    Achilles wrote:
    VB in my eyes is almost too user friendly, hence the 'inspiration' behind my original comment.
    There are numerous complaints that I could make about VB, such as the fact that it’s inflexible in its handling of memory, is not really designed for multi-threading easily and less said about arrays in VB the better. However, it is the language to use in some projects and not in others; dependant on the platform used, functionality required and business constraints. Simple as that - anything else is nothing more than a mixture of fashion and bluff.

    However being too user friendly is a new one on me. Do you mean it is not strict enough on data types or has an easy to use IDE?
    That said tho the Java teacher is straight out of college herself and can barely explain the bloody language to us.
    I refer you to my earlier comment on this.


  • Registered Users, Registered Users 2 Posts: 4,003 ✭✭✭rsynnott


    However being too user friendly is a new one on me. Do you mean it is not strict enough on data types or has an easy to use IDE?

    VB (especially pre-.NET) makes it quite easy for frighteningly stupid people to write programs which at first glance look okay. This is not a good thing; such programs are invariably broken.

    Drag and drop database design is possibly the silliest idea in computing history.

    And no, it is certainly NOT strict enough on data types. 'variants', indeed! (PHP and similar have the same problem).

    "On Error Resume Next"? What were they THINKING of?!

    The fabulous Verity Stob sums up some of the issues here: http://www.ddj.com/documents/s=1503/ddj0001vs/jan00.htm

    All that said, it is of course perfectly possible to program well in VB. (A few issues remain, particularly the portability and runtime issues)


  • Registered Users, Registered Users 2 Posts: 15,443 ✭✭✭✭bonkey


    rsynnott wrote:
    VB (especially pre-.NET) makes it quite easy for frighteningly stupid people to write programs which at first glance look okay. This is not a good thing; such programs are invariably broken.

    To be honest, I don't think VB is in any way unique in that regard.

    In my experience, the biggest problem users have had with VB apps has been the UI.

    Up to Version 3, VB was more-or-less at the cutting edge of the whole idea of Drag-n-Drop UI-building scene. The downside of this was that it meant people could build UIs without learning how to do so. This was bad - I lost track of how often in teh early-to-mid 90s I had variations of the following conversation...
    me: Why did you add those frames-within-frames-within-frames, and why are you using purple, green and pink for frame-titles.

    developer: Coz it looks nice. Its boring when you make an application look like a boring, ordinary windows application.

    Of course, now that web-design has caught the "anything goes, and the less standard the better" bug, people may not see this as a bad thing any more....but that point is that it destroyed VBs reputation at the time. People looked at these shocking-looking apps, discovered that even when functional the code quality was as high as the UI-quality....and decided that it was the language's fault for letting some idiot produce something vile.

    Post-VB3, the biggest problem has been that MS are doing their damndest to keep VB in the "Windows 95 Look-and-Feel" groove. To do most of the by-now-standard things like graded shading, "Outlook-style" toolbars...hell....even proper XP-themed checkboxes and stuff.....you need to go find third-party add-ons.

    So now, even though the language has matured somewhat...it still manages to produce ugly apps really well, and allows idiots to produce them relatively simply.

    If you know what you're doing, you can write some serious stuff in VB. PULSE, if memory serves, is primarily a VB application. Thats not where the problem is.

    The problem is that VB gets you up and running far before you should be even considering anything more than crawling, people get ahead of themselves, and the language gets blamed for letting them.

    jc


  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    Yeah, Pulse is VB6.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 640 ✭✭✭Kernel32


    VB3 to VB6 which was what I used to do the bulk of my development up until .Net Beta 1 put many thousands of dollars, pounds and euros into my bank account. No matter how much I didn't like working with it sometimes it will always have a special place in my heart.


  • Registered Users, Registered Users 2 Posts: 4,003 ✭✭✭rsynnott


    Kernel32 wrote:
    VB3 to VB6 which was what I used to do the bulk of my development up until .Net Beta 1 put many thousands of dollars, pounds and euros into my bank account. No matter how much I didn't like working with it sometimes it will always have a special place in my heart.

    I have a somewhat similar feeling about PHP.


Advertisement