Jump to content

  • Log In with Google      Sign In   
  • Create Account


keeping a variable between 2 values


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 lsandini   Members   -  Reputation: 100

Like
0Likes
Like

Posted 09 April 2012 - 01:54 PM

Hello,

Absolutely no programming skills here, but just getting into MVBE2010. I am not sure that this is the correct tool for me, but I guess what I need can be done in VB with very little help.

I have a variable whose value is x at time zero, and events that increase or decrease the variable's value for a determined amount of time. Think for example of a vehicle trying to stay in the middle of a road and being pushed left and right, or someone trying to keep a blood sugar level of 5 (mmol/l) while eating, running and taking insulin...

This little program needs to run in real-time, with the variable value being updated continuously or regularly, every second or every minute. The various events will act on the main variable for seconds, minutes or hours...

The GUI can be a single window, with the value of the main variable, and push buttons for triggering the various events. Some push to the right, some to the left.

Since i have no knowledge of other languages, would you suggest something else than VB ? I could use a little help here.

Thanks, Lorenzo

Sponsor:

#2 Jebbs   Members   -  Reputation: 276

Like
0Likes
Like

Posted 09 April 2012 - 02:02 PM

I would suggest you take some time and actually get familiar with the language you ultimately choose.

You can do just as many things in VB as any other language, but in my opinion it isn't as easy to work with as say, C# or Java, especially for someone with no programming experience.

If you plan to only do windows development I'd suggest C# as it is a great language to learn programming with and there are tons of tutorials for many things, and you still get access to all of the windows form stuff that you have in VB.

Taking some time to actually learn can make a lot of difference!

#3 scrap   Members   -  Reputation: 140

Like
0Likes
Like

Posted 09 April 2012 - 08:47 PM

this is true. also the more you learn, you may not be able to write as much, but you understand more then you think , which means you can check open source programs thru out the internet and borrow code. its how im learning how to do certian things i want with C# using MVS.

#4 Tom KQT   Members   -  Reputation: 1504

Like
0Likes
Like

Posted 10 April 2012 - 03:38 AM

You can do just as many things in VB as any other language, but in my opinion it isn't as easy to work with as say, C# or Java, especially for someone with no programming experience.

I would say the exact opposite. In my opinion, VB is much better for people with no programming experience, because its syntax is more similar to "human speech" and it doesn't bother you so much with strict using of semicolons and { }.

#5 Bacterius   Crossbones+   -  Reputation: 8158

Like
0Likes
Like

Posted 10 April 2012 - 04:12 AM

I would say the exact opposite. In my opinion, VB is much better for people with no programming experience, because its syntax is more similar to "human speech" and it doesn't bother you so much with strict using of semicolons and { }.

You should probably use Pascal then if you are looking for a readable language. Any language with a general begin-end construct has my vote. VB vs C# is arguable however. The C# (as well as Java's, which I always found retardedly verbose) syntax is quite unforgiving towards people starting in programming, but it does have quite a few language features (not talking about libraries here) which make it easier to perform actions that are not immediately obvious in different languages. Think Python and the array slicing notation.

Anyway, at the OP's level it hardly matters, you can pick any language and starting learning with it. Unless you are actually switching paradigms then different languages are merely different syntaxes. All the programming concepts carry over painlessly.

The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.

 

- Pessimal Algorithms and Simplexity Analysis


#6 Tom KQT   Members   -  Reputation: 1504

Like
0Likes
Like

Posted 10 April 2012 - 04:42 AM

You should probably use Pascal then if you are looking for a readable language.

Pascal? That's IMHO very bad language for beginners, I've never understood why it's used at schools so much. It's wordy similarly to Basic, while also using semicolons with afaik different rules than in C (I haven't used Pascal for more than 10 years and even then it was only at one semester, I had to find some code on the internet now).
Semicolons may look easy and straight-forward, but I remember that most of my university schoolmates (with 0 programming experiences) were fighting not with what is a for loop, how does conditional statement work etc., but with which line should end with a semicolon and which not.

Basic is also easier as far as = is concerned (as in math it works both as assignment and comparison).

But you are right, it doesn't really matter for the OP. And language choice is not really important, changing languages is quite easy. What's difficult in programming are algorithms, libraries etc., not syntax.

#7 lsandini   Members   -  Reputation: 100

Like
0Likes
Like

Posted 12 April 2012 - 02:03 PM

Thank you for your answers. I took a bit of advice here and there, since obviously I won't be coding myself. My coders want to do ti in HTML5 and Java, so we'll see.

Lorenzo




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS