My first program 29 replies

Please wait...

KeMiKaL

THE forum Mac user.

50 XP

2nd October 2006

0 Uploads

1,070 Posts

0 Threads

#1 11 years ago

Well, I don't really think this should go in the Tech Discussion area because it's just an executable that I've released - forgive me if this is in the wrong place.

I've finally moved onto VB coding, from HTML, JScript and Basic/Fortran.

Here's my first program - took me about 1.5 hours to get working, without any use of tutorials, internet or books. I want to learn it well so I limit my usage of resources.

Simple Calculator v2.0 It's a calculator - and it's simple!

Please download it and give it a try - I'd like to hear some feedback.

The file is attached, simply download the file then unZip it using WinZip or WinRar.

The folder contains only the .exe - Simple Calculator

I can assure you that this isn't a virus, but you should scan every file you download...

I'm looking for any suggestions for the Calculator, or any bugs you can find for it.

This is the first 1.5 hours I've ever spent doing VB so be nice when commenting :)

Newer versions will be released, and I'll hopefully keep this thread up-to-date with the newer versions. Each version will have new features and will look better etc...

I'm very grateful to all who try this program, and to all who comment!

Thanks ~Andy




Who_Flung_Poo?

No I don't know who did.

50 XP

4th November 2003

0 Uploads

5,360 Posts

0 Threads

#2 11 years ago

Apparently your calculator doesn't like pie.




Shadowfire67

All your base are belong to us

50 XP

3rd February 2004

0 Uploads

596 Posts

0 Threads

#3 11 years ago

Pretty good. I think you should work on the interface though, kinda like the calculator that comes with Windows, buttons and stuff.




HairySheep

I train sheep to cage fight!!

50 XP

8th January 2006

0 Uploads

3,252 Posts

0 Threads

#4 11 years ago

downloaded, extracted, opened the extracted file, got this error message

Spoiler: Show
untitled.jpg



Rookie VIP Member

128,030 XP

3rd May 2005

0 Uploads

11,953 Posts

0 Threads

#5 11 years ago

Not bad for a first try - very basic, but not bad. Some constructive criticism:

  • You definitely need to implement input validation - that way, whenever someone enters an invalid value (for example, a string instead of an integer or floating-point number), it'll ask them nicely to try again instead of crashing horribly.
  • Rework the interface. Try and visualize a standard calculator, instead of mucking around with drop-down menus. Another tip would be to have the product of the sum to become equal to the first value of a new sum, just as with a real calculator. Saves time.

As it happens I coded a scientific calculator from scratch for my last bit of college coursework. I don't have the binaries anymore, and I can't access the college backup since I'm no longer a student (although come to think of it, I may have put it on my laptop somewhere), but you can have an example screenshot I had floating around:

calcuc6.png

It can do all the basic functions of a scientific calculator, as well as integer and modular division, conversion between decimal, hexadecimal and binary, calculate the mean, median, mode and range of a number sequence, display the lowest and highest numbers in a sequence, calculate the lower, upper and inter-quartile ranges in a sequence, calculate the standard deviation of a set of numbers and convert any number to standard index form. Later versions of the program also had the option to generate a histogram from a number sequence; unfortunately that's probably lost in the depths of virtual oblivion by now.




KeMiKaL

THE forum Mac user.

50 XP

2nd October 2006

0 Uploads

1,070 Posts

0 Threads

#6 11 years ago

dark sith200;4035370Pretty good. I think you should work on the interface though, kinda like the calculator that comes with Windows, buttons and stuff.[/quote]

Yea, that will be in v3.0, got 2.1 through to 2.9 to go first - then the interface will be redesigned.

Who_Flung_PooApparently your calculator doesn't like pie.[/quote]

Not yet - it will enjoy pie in 2.1 I promise, thanks for bringing that up :)

[quote=HairySheep;4035379]downloaded, extracted, opened the extracted file, got this error message

Seems to work for everyone else :rolleyes:

[quote=Rookie;4035462]Not bad for a first try - very basic, but not bad. Some constructive criticism:

  • You definitely need to implement input validation - that way, whenever someone enters an invalid value (for example, a string instead of an integer or floating-point number), it'll ask them nicely to try again instead of crashing horribly.
  • Rework the interface. Try and visualize a standard calculator, instead of mucking around with drop-down menus. Another tip would be to have the product of the sum to become equal to the first value of a new sum, just as with a real calculator. Saves time.

As it happens I coded a scientific calculator from scratch for my last bit of college coursework. I don't have the binaries anymore, and I can't access the college backup since I'm no longer a student (although come to think of it, I may have put it on my laptop somewhere), but you can have an example screenshot I had floating around:

It can do all the basic functions of a scientific calculator, as well as integer and modular division, conversion between decimal, hexadecimal and binary, calculate the mean, median, mode and range of a number sequence, display the lowest and highest numbers in a sequence, calculate the lower, upper and inter-quartile ranges in a sequence, calculate the standard deviation of a set of numbers and convert any number to standard index form. Later versions of the program also had the option to generate a histogram from a number sequence; unfortunately that's probably lost in the depths of virtual oblivion by now.

Thanks, I'll take that into account in the next build - this was only my first 90 minutes of VB coding so give me a chance to get used to it :D

That's a very impressive program you got there. Nice work.

Thanks for all the feedback, it's much appreciated.




Huffardo

Arrrr!

48,770 XP

29th November 2003

0 Uploads

4,632 Posts

0 Threads

#7 11 years ago

Nothing wrong with VB, it is easy to create graphical programs for Windows with and was fun to mess with as a kid, but why not make something more interesting than a simple calculator whilst at it?

HairySheep;4035379downloaded, extracted, opened the extracted file, got this error message
Spoiler: Show
untitled.jpg

Seconded...




Dalt

Also known as general_mario

50 XP

7th November 2007

0 Uploads

338 Posts

0 Threads

#8 11 years ago
HairySheep;4035379downloaded, extracted, opened the extracted file, got this error message
Spoiler: Show
untitled.jpg

same error here




foo_fighter

King Of Rock

50 XP

12th November 2007

0 Uploads

51 Posts

0 Threads

#9 11 years ago

Pretty good for your first program. =p




KeMiKaL

THE forum Mac user.

50 XP

2nd October 2006

0 Uploads

1,070 Posts

0 Threads

#10 11 years ago

Huffardo;4036148Nothing wrong with VB, it is easy to create graphical programs for Windows with and was fun to mess with as a kid, but why not make something more interesting than a simple calculator whilst at it?

Seconded...[/QUOTE]

[QUOTE=Dalt;4036193]same error here

Odd that it works for some people - but not for others?

Reason for making a calculator - it's linked with my college work. I'm going to be making a program of my own alongside the college work - but I haven't yet started on it.

I'll keep the calculator updated in this thread so you can try the new versions - I'd appreciate the feedback.