Is My New Chemistry Program Better Than the Windows Version?

AI Thread Summary
A user has uploaded a new project, mmconv, to SourceForge, inspired by a Windows program used in a lab. The project offers more functionality than the original and operates without a mouse. The user is currently working on adding an install target to the makefile but is facing challenges with the man page directory, as $MANPATH is undefined on their Red Hat 8.0 system. During testing, several bugs were identified, including segmentation faults triggered by specific inputs and memory leaks. Suggestions for fixes include checking for null characters, unusual ASCII characters, and ensuring proper memory management. Additional issues noted involve handling invalid input formats, such as multiple periods in numbers and ensuring only valid characters are accepted for mass. The user has addressed some of the bugs but plans to tackle others later. Feedback from another user, dduardo, has been acknowledged and appreciated.
grady
Messages
65
Reaction score
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
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
 
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.
 
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
 
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.
 
Thread 'ChatGPT Examples, Good and Bad'
I've been experimenting with ChatGPT. Some results are good, some very very bad. I think examples can help expose the properties of this AI. Maybe you can post some of your favorite examples and tell us what they reveal about the properties of this AI. (I had problems with copy/paste of text and formatting, so I'm posting my examples as screen shots. That is a promising start. :smile: But then I provided values V=1, R1=1, R2=2, R3=3 and asked for the value of I. At first, it said...
Sorry if 'Profile Badge' is not the correct term. I have an MS 365 subscription and I've noticed on my Word documents the small circle with my initials in it is sometimes different in colour document to document (it's the circle at the top right of the doc, that, when you hover over it it tells you you're signed in; if you click on it you get a bit more info). Last night I had four docs with a red circle, one with blue. When I closed the blue and opened it again it was red. Today I have 3...
Back
Top