PDA

View Full Version : Does this flow chart make sense?



swoll1980
August 4th, 2009, 02:48 AM
never mind it won't let me upload the .vsd

slavik
August 4th, 2009, 03:00 AM
I gotta ask, what language was that in?

Arquis
August 4th, 2009, 03:05 AM
Isn't .vsd a visio file? How can you read it on Linux? Ooo?

wojox
August 4th, 2009, 03:07 AM
Must have wine? Microsoft Office right.

swoll1980
August 4th, 2009, 03:38 AM
I gotta ask, what language was that in?

pseudo-code. I can't figure out how to use tab on the forums, so there were no indentations.

swoll1980
August 4th, 2009, 03:40 AM
Isn't .vsd a visio file? How can you read it on Linux? Ooo?


Must have wine? Microsoft Office right.

I just use Windows for Visio, and some other apps. I hate wine with a passion.

Add: After some research; I guess there may be a tool that opens .vsd files in Linux called vsdviewer.

Slim Odds
August 4th, 2009, 03:42 AM
I hate wine with a passion.

Why? What's wrong with it?

swoll1980
August 4th, 2009, 04:00 AM
Why? What's wrong with it?

I don't want to get a whole debate about it going. Lets just say it's a matter of opinion, and "I don't like it" is mine, and leave it at that.

Slim Odds
August 4th, 2009, 04:17 AM
I don't want to get a whole debate about it going. Lets just say it's a matter of opinion, and "I don't like it" is mine, and leave it at that.

Just askin'

No need to get all defensive......

over and out!

Can+~
August 4th, 2009, 04:24 AM
How about a screenshot?

swoll1980
August 4th, 2009, 05:01 AM
How about a screenshot?

How about print to pdf? I should have thought about that earlier. :oops:

swoll1980
August 4th, 2009, 05:07 AM
Just askin'

No need to get all defensive......

over and out!

No offense to you. I'm sorry that came off wrong. I just don't want to start some kind of flame war that's all.

Sockerdrickan
August 4th, 2009, 01:25 PM
Does this pie chart make sense?

http://tommcmahon.typepad.com/photos/uncategorized/2007/03/26/pacmanppt.gif

issih
August 4th, 2009, 01:55 PM
I think it should function...but its not terribly efficient.

You could have one function to calculate the price of all items, and just pass in the name and price, the burg, fries etc methods are all very similar, make them use the same code.

You should use a switch not a load of if/else ifs in the main loop.

The rest is just about style, personally I'd make it so that you add your prices to a total initialised at zero, rather than having separate prices for fries and so on, some of which may be zero, if you are wanting an audit trail (or receipt system) your approach may be useful, but I'd still do it differently.

Hope that helps

N.B. personally I'd do it with objects, but that just cos I like them :)

swoll1980
August 4th, 2009, 11:22 PM
I think it should function...but its not terribly efficient.

You could have one function to calculate the price of all items, and just pass in the name and price, the burg, fries etc methods are all very similar, make them use the same code.

You should use a switch not a load of if/else ifs in the main loop.



Yeah those are good ideas. I'm still extremely new at this stuff, so often I find inefficient ways to do things. I'm glad you guys are here to help out though. It makes learning this stuff way easier.

Can+~
August 5th, 2009, 12:04 AM
Could be coded as a closure for example (I'm guessing you're doing python because of the previous posts)


new_item = lambda price: lambda quantity: quantity*price

fries = new_item(0.79)
print fries(3)

An object is fine too.

swoll1980
August 5th, 2009, 02:16 AM
Could be coded as a closure for example (I'm guessing you're doing python because of the previous posts)


new_item = lambda price: lambda quantity: quantity*price

fries = new_item(0.79)
print fries(3)

An object is fine too.

I will look into that further to see exactly how that would work. Thanks for the tip.