Check out my chemistry program

In summary, the author uploaded a project to SourceForge and found some bugs. He also discussed some of the problems he ran into with the program.
  • #1
grady
70
2
I just uploaded a project to sourceforge. I got the idea from a windows program that I used in the lab this semester. The program is simple, but it still does more than the windows program I had to use (yay), and you don't have to use a mouse. The project is at http://sourceforge.net/projects/mmconv/

I still need to put an install target in the makefile, but I haven't figured out how to get the system's man page directory. I hear it should be $MANPATH, but $MANPATH isn't defined on my RH 8.0 system so I'm still looking into it.
 
Computer science news on Phys.org
  • #2
We're Sorry.
The SourceForge.net Website is currently down for maintenance.
We will be back shortly

O, well. Maybe tommorrow.

About the man pages, have you tried doing man man
 
  • #3
Just playing around with the program a little here are some bugs I found:

1. Seg Fault when '?' is entered
Hint: Simply check if \0 is the next character in the string. If it is, error, else proceed to error check some more

2. Seg Fault when F1-F4 are pressed
Hint: Check for unusual ascii characters

3. Seg Fault when return is pressed with no input.
Hint: Check to see if there is anything in the string before processing it.

4. Memory Leaks Galore
Hint: Walkthrough program with debugger and make sure you free everything you allocate. Use an app like memprof to help you deduce which function the memory leak is coming from.

5. Integer/Float overflow
Hint: If you don't want to bother with large numbers, atleast warn the user and don't print out wrong answers.

6. Any number of periods accepted anywhere in the formula
Hint: Check for multiple periods within numbers. Also check for stray periods

Look what I did:

compound > H.H...
mass (g) > ...
H : nan g
H : nan g

7. Characters Accpeted for Mass
Hint: Check your string to make sure the characters are between '0' and '9'

8. Multiple Instances of Element Printed
Hint: Flag the elements you've already printed out, so you don't repeat them.
 
  • #4
9) Your allowed to type a question mark followed by the element. It puts everyone on one line if you do.

compound > ?HI
mass H (g) > 2
mass I (g) > 3
H 1.000000 I 0.011914
Total mass (g): 5.000000
 
  • #5
Ok, I fixed 1-4. 5 I'll fix later. 6&7 I'm not worried about right now, but I didn't know that was there so thanks for pointing them out and I'll fix them when i have some more time. 8 is a feature, and I prettied up the output of ? so 9 is "fixed". Thanks for all of the input, dduardo.
 

1. What is your chemistry program about?

Our chemistry program is designed to provide a comprehensive understanding of the fundamental principles and theories of chemistry. It covers topics such as atomic structure, chemical bonding, reactions, and more.

2. Who is your chemistry program designed for?

Our chemistry program is designed for both students and professionals who are interested in gaining a deeper understanding of chemistry. It can be beneficial for those studying chemistry in school or looking to enhance their knowledge for career purposes.

3. What makes your chemistry program stand out?

Our chemistry program uses a combination of interactive lessons, real-world examples, and hands-on experiments to make the learning experience engaging and practical. We also have a team of experienced scientists who have designed the program and are available to answer any questions.

4. Is your chemistry program suitable for beginners?

Yes, our chemistry program is suitable for beginners. It starts with the basics and gradually progresses to more advanced topics, making it accessible for those with little to no prior knowledge of chemistry.

5. Can I try your chemistry program before purchasing it?

Yes, we offer a free trial of our chemistry program so you can get a feel for the content and teaching style before committing to a purchase. Simply sign up for the trial on our website to get started.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
893
Replies
4
Views
1K
  • Computing and Technology
Replies
18
Views
1K
  • STEM Academic Advising
Replies
4
Views
820
  • Computing and Technology
Replies
5
Views
2K
  • STEM Academic Advising
Replies
3
Views
925
Replies
1
Views
814
  • Computing and Technology
Replies
25
Views
3K
  • STEM Academic Advising
Replies
4
Views
2K
Replies
2
Views
881
Back
Top