Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Sep 6th, 2005, 11:28 PM   #1
raspberryh
Newbie
 
raspberryh's Avatar
 
Join Date: Sep 2005
Location: Orlando, FL
Posts: 2
Rep Power: 0 raspberryh is on a distinguished road
ucf cs student has some questions

Hi, I am Heather Cash, a Computer Science student at UCF. I am doing a presentation on Program Correctness in my Topics in Computer Science class. I would like to bring some real-world examples into our class to make the presentation more interesting. The field of programming you are in could possibly be one that many students in my class are interested in, so hearing about how important program correctness is in your particular field and what you do to ensure program correctness could be very valuable to them.
For this reason, I have come up with some questions that I hope some of you will take some time to answer. I would REALLY appreciate it!
Thanks!
PS: I know some of these questions can be lengthy, and there are a lot of questions. You don't, by any means, need to answer them all. Even if you just answer one or a few, it is still greatly appreciated!

1. What kind of programming do you do? (in terms of, what kind of algorithms do you write? what language do you code in? do you do more of algorithm design, or software design? what types of algorithms/software specifically have you coded/do you code?)

2. How do you ensure that your program/algorithm is correct? (do you do any type of formal proof? test cases? how do you choose your test cases? how do you ensure that these test cases cover the cases that will ultimately come into play when your algorithm/program is used?)

3. To what degree do you ensure that your program/algorithm is correct? (is it correct according to specific inputs, or a range of inputs, or expected inputs, inputs according to program specifications, or all possible inputs?)

4. Please give an example (or more than one example!) where a program or algorithm you wrote was not fully correct. Did this cause any type of serious problem? How did you find out that it wasn't correct? How did you fix it?

5. Please give some reasons why program correctness is very important in your field. (for example, if you program an artificial heart, the person might die if you have an error in your program!)

6. What advice do you offer to a student who is thinking about going into your field, as far as program correctness is concerned? How much error checking should he/she expect to do? Is program correctness a life/death, or in any other way a really big deal in your field of programming?

7. How can someone in your field prevent program errors while he/she is still in the process of designing his/her algorithm? Or, while he/she is still in the process of coding up the program?

8. Do you do any collaboration in writing software or algorithms? If so, how do you prevent errors and ensure program correctness when working in a team?

9. Any other comments/case studies/stories you may have are greatly appreciated!


Thanks soooo much for your time!!!
raspberryh is offline   Reply With Quote
Old Sep 7th, 2005, 10:10 AM   #2
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,467
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
Hello Heather, welcome to the forums...

All: Sorry for the long post, no other way to really respond to it and keep the readability... Mods feel free to trim it.

1. What kind of programming do you do? (in terms of, what kind of algorithms do you write? what language do you code in? do you do more of algorithm design, or software design? what types of algorithms/software specifically have you coded/do you code?)

- Client / Server programming, database, cryptography, compression, parallel processing, distributed computing, artificial intelligence, data warehousing, decision support systems, robotics, navigation, educational enhancement, authentication, directory services.

2. How do you ensure that your program/algorithm is correct? (do you do any type of formal proof? test cases? how do you choose your test cases? how do you ensure that these test cases cover the cases that will ultimately come into play when your algorithm/program is used?)

- No formalities, in short... I think like the user. Enter in faulty data on purpose. Try to break the system by any and all means necessary.

3. To what degree do you ensure that your program/algorithm is correct? (is it correct according to specific inputs, or a range of inputs, or expected inputs, inputs according to program specifications, or all possible inputs?)

- Inputs of all possible ranges, usually exceeding the program specifications.

4. Please give an example (or more than one example!) where a program or algorithm you wrote was not fully correct. Did this cause any type of serious problem? How did you find out that it wasn't correct? How did you fix it?

- Writing an encryption algorithm that was a derivative of 3DES... when not correct, remote machines cannot interact with the master server, causing communication between labs to fail. Found out because transactions were piling up and errors were returned in the logs. Spent a few hours debugging and ended up adding one line of code to rotate the string two positions.

5. Please give some reasons why program correctness is very important in your field. (for example, if you program an artificial heart, the person might die if you have an error in your program!)

- If a programmer that is employed by an airline writes faulty programs for reservations, there will be a lot of irate customers to deal with, worse yet... if the autopilot fails, the plane has a potential to drop from the sky.

6. What advice do you offer to a student who is thinking about going into your field, as far as program correctness is concerned? How much error checking should he/she expect to do? Is program correctness a life/death, or in any other way a really big deal in your field of programming?

- In general, an incorrect program is a useless program. It either meets the specs or doesn't. 10% of your time will be writing code, 90% will be debugging.

7. How can someone in your field prevent program errors while he/she is still in the process of designing his/her algorithm? Or, while he/she is still in the process of coding up the program?

- There is no one way to safeguard against program errors. Make extensive use of error handlers and exit gracefully in the event of failure if you are unable to recover the process.

8. Do you do any collaboration in writing software or algorithms? If so, how do you prevent errors and ensure program correctness when working in a team?

- Typically, the algorithm is at my discretion, although it is used by a team. I provide the team with a basic list of functions associated with the algorithm and provide comments in the code. Often times, extensive documentation follows more complex applications.

9. Any other comments/case studies/stories you may have are greatly appreciated!

- When working for the government be prepared for politics. If your way may seem to be the right and most logical way to do something, chances are there are twenty reasons it can't be done that way and none of them have technical factors involved, just mere opinions and policy.
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Sep 7th, 2005, 10:20 AM   #3
Polyphemus_
Expert Programmer
 
Polyphemus_'s Avatar
 
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4 Polyphemus_ is on a distinguished road
Welcome to the forums

1. What kind of programming do you do? (in terms of, what kind of algorithms do you write? what language do you code in? do you do more of algorithm design, or software design? what types of algorithms/software specifically have you coded/do you code?)

- I code mostly in C, and sometimes in C++. I'm mostly working on my own OS, but since yesterday i'm doing playing a bit with neural networks.


2. How do you ensure that your program/algorithm is correct? (do you do any type of formal proof? test cases? how do you choose your test cases? how do you ensure that these test cases cover the cases that will ultimately come into play when your algorithm/program is used?)

- just by testing it, like IR typing in wrong data, and check it handles it OK.


3. To what degree do you ensure that your program/algorithm is correct? (is it correct according to specific inputs, or a range of inputs, or expected inputs, inputs according to program specifications, or all possible inputs?)

- mostly specific inputs, and a few random inputs.

4. Please give an example (or more than one example!) where a program or algorithm you wrote was not fully correct. Did this cause any type of serious problem? How did you find out that it wasn't correct? How did you fix it?

- can't really remember one


5. Please give some reasons why program correctness is very important in your field. (for example, if you program an artificial heart, the person might die if you have an error in your program!)

- when an OS crashes, in most cases the whole system crashes


6. What advice do you offer to a student who is thinking about going into your field, as far as program correctness is concerned? How much error checking should he/she expect to do? Is program correctness a life/death, or in any other way a really big deal in your field of programming?

- program correctness is important, structuring it well so you can make it easy modulable when you reach that step.


7. How can someone in your field prevent program errors while he/she is still in the process of designing his/her algorithm? Or, while he/she is still in the process of coding up the program?

- use a debug intel emulator, and write informative exception handlers. also, write fast-to-use debugcode


8. Do you do any collaboration in writing software or algorithms? If so, how do you prevent errors and ensure program correctness when working in a team?

- don't get this one :o


9. Any other comments/case studies/stories you may have are greatly appreciated!

-
Polyphemus_ is offline   Reply With Quote
Old Sep 7th, 2005, 11:26 AM   #4
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
Quote:

Originally Posted by raspberryh

1. What kind of programming do you do?



I do mostly web and application design. I also write scripts for our servers here at work :-)

Quote:

Originally Posted by raspberryh

2. How do you ensure that your program/algorithm is correct?



I test the shit out of it, then i hand it to one of the dumber users (read: monkeys) around here and see if they can break it. I usually get them to write down every little thing that they hate/break and hand it to me.

Quote:

Originally Posted by raspberryh

3. To what degree do you ensure that your program/algorithm is correct?



When i am doing the testing, i generally put in input that i know is wrong, just to see if i have my error catching up to par. Then i start inputing correct input, just to see if the functions/objects/whatever are working the way that i want. After that, like i said before is up to the user to break. Then i push a updated version :-)

Quote:

Originally Posted by raspberryh

4. Please give an example (or more than one example!) where a program or algorithm you wrote was not fully correct.



I wrote a inventory program once for our yard (sells railway ties, lumber, fencing etc..), it was designed to have the data input in real time. The user only inputed once a month and then wondered why the transaction dates where wrong (he really should have RTFM). Thus, when he generated reports for the managers all the dates were wrong. I solved it by talking to the user and explaining why there was a need for real time data, and why he should quit being lazy. After that it worked fine.

Quote:

Originally Posted by raspberryh

5. Please give some reasons why program correctness is very important in your field.



Correctness of data is the main reason. If you don't know where you've been, how can you know if your going in the right direction? ie: if you advertise a sale for fencing in winter vs. in the summer. i realize that's a pretty stupid example and it should be just common sense, but you get the picture.

Quote:

Originally Posted by raspberryh

6. What advice do you offer to a student who is thinking about going into your field, as far as program correctness is concerned?



Write code that is easy to read. You should be able to read it like your reading the newspaper. Comment the crap out of it. It makes things much easier in the long run. Think i used the word read enough?




Quote:

Originally Posted by raspberryh

7. How can someone in your field prevent program errors while he/she is still in the process of designing his/her algorithm?



Like i said above, make your code readable and lots of comments. Also, always assume the user that your giving the software to, is as smart as a rock and that his/her computer is the most broken chunk of crap out there. Cover all angles of input, even if you know said input is hard to screw up.

Quote:

Originally Posted by raspberryh

8. Do you do any collaboration in writing software or algorithms?



Not at the moment, i used to be part of the IM project here on PFO, but i didn't have the time to donate. Also i no longer have the Internet at home (something i am changing in the near future).

Quote:

Originally Posted by raspberryh

9. Any other comments/case studies/stories you may have are greatly appreciated!



N/A


Welcome to the forums! I suggest that you stick around we have a great community here :-)

The reason that i say that is because from time to time we get people coming here asking questions like this one and leave after they get enough answers. Kinda pisses me off.

Ether way, enjoy your stay :-)

BTW i like your binary clock on your site :-)
__________________
Profanity is the one language that all programmers understand.

Check out my Blog <---updated Nov 30 2007!
Pizentios is offline   Reply With Quote
Old Sep 7th, 2005, 12:52 PM   #5
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Alright, this looks like fun.

1. What kind of programming do you do?
I write software. When I can be arsed. Recently I've been working on database-driven websites - they're a lot easier, and they pay.

2. How do you ensure that your program/algorithm is correct?
Same as everyone else. I do my best to try and break it. Then I give it to a mate and tell him to do the same thing. Then I give it to the user and tell them to email me if they find any errors. I always get the bug fixed the same day.

3. To what degree do you ensure that your program/algorithm is correct?
I spend a good hour or three trying to bugger the bastard.

4. Please give an example (or more than one example!) where a program or algorithm you wrote was not fully correct.
I can't think of one right now, so here's some filler. Last year my computing class project was a stock database system for a turkey farmer. I wrote the database myself. When I finished it, I decided it sucked and rewrote it. And then did it again. If something's not perfect, it should be.

5. Please give some reasons why program correctness is very important in your field.
I don't get paid if it's broken.

6. What advice do you offer to a student who is thinking about going into your field, as far as program correctness is concerned?
Most of your time will be spent fixing bugs. It's no biggie - it's actually quite fun if you look at it the right way.

7. How can someone in your field prevent program errors while he/she is still in the process of designing his/her algorithm?
As Piz said, comment the hell out of your code. Structure it so it's easy to read. Plan it first - that's why my project database (mentioned earlier) needed rewrites. Every now and again, read through your code, looking for obvious bugs. If you ever find a bug, make a note of what you were doing, drop everything, and fix it.

8. Do you do any collaboration in writing software or algorithms? If so, how do you prevent errors and ensure program correctness when working in a team?
I worked in a team of three writing one site (biggest job I've ever done). If something broke and it wasn't my fault, I bitched at the guy responsible until he fixed it and made sure it never happened again. If it was my fault, I would dive straight into the code and blast the sucker.

9. Any other comments/case studies/stories you may have are greatly appreciated!
Led Zeppelin rock. Oh, and so do these forums. Stick around, and you'll learn loads. I know I have.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Sep 7th, 2005, 1:12 PM   #6
Dizzutch
Professional Programmer
 
Dizzutch's Avatar
 
Join Date: Dec 2004
Location: Worcester, MA
Posts: 441
Rep Power: 4 Dizzutch is on a distinguished road
Send a message via ICQ to Dizzutch Send a message via AIM to Dizzutch Send a message via MSN to Dizzutch Send a message via Yahoo to Dizzutch
1. What kind of programming do you do? (in terms of, what kind of algorithms do you write? what language do you code in? do you do more of algorithm design, or software design? what types of algorithms/software specifically have you coded/do you code?)
I mostly cde for my self, since my current job does not include any R&D. I do a lot of web-apps and linux scripts, but am also known to pull gcc out of the closet once in a while. If i really want a fun project I usually grab OpenGL, and do something like that. I tend to do a lot of algorithm design, software design and focus on efficiency.

2. How do you ensure that your program/algorithm is correct? (do you do any type of formal proof? test cases? how do you choose your test cases? how do you ensure that these test cases cover the cases that will ultimately come into play when your algorithm/program is used?)
If it works the way I want it to work, and it does what I intended it to do. Lately I've gotten into using test suites, but only if I need to test a lot of cases.

3. To what degree do you ensure that your program/algorithm is correct? (is it correct according to specific inputs, or a range of inputs, or expected inputs, inputs according to program specifications, or all possible inputs?)
See #2. If it works. Once in a blue-moon I do some freelance programming, in which case I make sure the customer is satisfied before I complete the project.

4. Please give an example (or more than one example!) where a program or algorithm you wrote was not fully correct. Did this cause any type of serious problem? How did you find out that it wasn't correct? How did you fix it?
My professor gave me a B. I missed a couple test cases, for which my program didn't happen to work. It was some assembly code that calculated the square root of a number.

5. Please give some reasons why program correctness is very important in your field. (for example, if you program an artificial heart, the person might die if you have an error in your program!)
Gotta keep the customer happy, customers = work = money

6. What advice do you offer to a student who is thinking about going into your field, as far as program correctness is concerned? How much error checking should he/she expect to do? Is program correctness a life/death, or in any other way a really big deal in your field of programming?
You are expected to deliver a program complient with the specifications given. Follow the instructions/design to the best of your abilities.

7. How can someone in your field prevent program errors while he/she is still in the process of designing his/her algorithm? Or, while he/she is still in the process of coding up the program?
Work carefully, plan out your programs, don't dive right into coding.

8. Do you do any collaboration in writing software or algorithms? If so, how do you prevent errors and ensure program correctness when working in a team?
Design a test suite/test checklist for every step of the way, and don't continue until all is done.

9. Any other comments/case studies/stories you may have are greatly appreciated!
I learned a lot from taking a Software Engineering class, we split up in groups where one group designed, one group wrote, one group tested. It was a great experience, look into a class like that if it's offered.
__________________
naked pictures of you | PFO F@H stats
Dizzutch is offline   Reply With Quote
Old Sep 8th, 2005, 7:50 AM   #7
raspberryh
Newbie
 
raspberryh's Avatar
 
Join Date: Sep 2005
Location: Orlando, FL
Posts: 2
Rep Power: 0 raspberryh is on a distinguished road
Talking Wow Thanks!!!

Wow, thanks SO MUCH guys! Your responses are awesome!!!

Pizentios was really funny

Infinite Recursion I love your name! That's so cool that you do robotics and navigation and stuff. And compression sounds cool too!
I want to hopefully get into image processing. Like, I'd LOVE to work for Photoshop or something, programming those filters for the images.

Oh yeah Pizientos thanks for the compliment about my binary clock on my site! I also have a binary clock at work on my desk (my brother gave it to me) and I am the only programmer at work, they all think I am sooo weird

Well I will definitely stick around, this is soooo cool to be able to talk to all these programmers. Freaking awesome! The people in my classes don't really talk to me too much so I don't get to talk to people about programming that much. And you guys are like, REAL programmers. That's sooo cool.

Hey do any of you guys know about Language Theory?
http://en.wikipedia.org/wiki/Formal_languages

I took a class on it last semester and it is amazing, I freaking love it. I'm going to take the graduate course in the spring. But I don't really know how I could ever use it in the real world after I graduate? Maybe someone here knows?

Well anyways, thanks so much for your replies! You guys are SOOOO nice

Heather

PS: my speech is going to be awesome because of you guys... thanks so much!!!
raspberryh is offline   Reply With Quote
Old Sep 8th, 2005, 8:33 AM   #8
Dizzutch
Professional Programmer
 
Dizzutch's Avatar
 
Join Date: Dec 2004
Location: Worcester, MA
Posts: 441
Rep Power: 4 Dizzutch is on a distinguished road
Send a message via ICQ to Dizzutch Send a message via AIM to Dizzutch Send a message via MSN to Dizzutch Send a message via Yahoo to Dizzutch
Hey, no problem, if you ever have any other questions, or just want to contribute to the community on this forum, stick around, we could use an extra hand controlling these ADD ridden kids like Ooble once in a while.. (j/k)
__________________
naked pictures of you | PFO F@H stats
Dizzutch is offline   Reply With Quote
Old Sep 8th, 2005, 9:44 AM   #9
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,467
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
Thanks. The Infinite Recursion problems that I encountered while writing code back in college kept me up for hours debugging... so I decided to go with it as an alias. "The Missing Semicolon" sounded too odd, but it was also a pain in the ass. Hah.

I just took a look at your site, and noticed the binary clock also... its cool, I'm going to have to put it on my site too! Maybe adding the date in binary would be an interesting project. I didn't talk to any of my classmates unless they were asking me a question, for the most part I viewed them as compeititors, kinda regret that now... but the forums compensate for the missed interaction with like minded people. Its definitely difficult being the only programmer around the workplace... we have a rare mindset. Luckily enough, in my current position, the building is filled with computer scientists, computer engineers, software engineers, sci vis specialists, and occasionally management. So, whenever I feel like an odd ball, I come back to work and look at the others. lol.

I took a senior level course when I was in college (I think it was around 2002 or 2003)... It was titled: "Compiler Design and Language Theory". I only remember bits and pieces about it. You may not have a use for it much after you graduate, unless you become a research scientist or something similar for some R&D company. Most companies, it seems, lean towards applications instead of theory... I suppose that is where the money is for them. But of course, the code monkeys like the theory more.

Glad you are sticking around... good to have you aboard. Good luck on your presentation... if you do Powerpoint slides or something, post them up... I'd be interested in seeing how you tried to convey the ideas.
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Sep 8th, 2005, 10:50 AM   #10
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
Quote:
Originally Posted by raspberryh
I want to hopefully get into image processing. Like, I'd LOVE to work for Photoshop or something, programming those filters for the images.
You could get into it now if you wanted :-) You could join up on the GIMP OSS project! That would give you some experience :-)

Quote:
Originally Posted by raspberryh
Well I will definitely stick around, this is soooo cool to be able to talk to all these programmers. Freaking awesome! The people in my classes don't really talk to me too much so I don't get to talk to people about programming that much. And you guys are like, REAL programmers. That's sooo cool.
Glad to hear that you've not been scared off yet :-) The community here is great, i have never had so much fun on a forum. Also, most of the members here aren't pricks, so it helps out.

BTW, we have a irc channel if you feel like chatting to us "geeks" it's at: irc.freenode.net and the room is #programmingforums
__________________
Profanity is the one language that all programmers understand.

Check out my Blog <---updated Nov 30 2007!
Pizentios is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:04 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC