Old 23-04-2008   #1 (permalink)
Monster Member
 
iskra's Avatar
 
Join Date: May 2006
Location: Melbourne, Victoria
Age: 19
Posts: 4,189
Rep Power: 7
Send a message via MSN to iskra Send a message via Skype™ to iskra
Default C# - Software Development BORED

BORED AS ****

Really Don't like coding so boring. Deff not picking it next semester.

Making some shtty calc function

Code:
private void calcButton_Click(object sender, EventArgs e)
        {
            float n1, n2, n3; // Defines n1 n stuff

           

            n1 = float.Parse(textBox1.Text);
            n2 = float.Parse(textBox2.Text);
            n3 = float.Parse(textBox3.Text);

            string add;
            add = n1.ToString()+ "+" + n2.ToString() + "+";
            add += n3.ToString() + "=" + DoSum(n1,n2,n3).ToString();
            
            calcLabel1.Text = add;

            string times;
            times = n1.ToString() + "x" + n2.ToString() + "x";
            times += n3.ToString() + "=" + DoProduct(n1, n2, n3).ToString();

            calcLabel2.Text = times;

            string min;
            min = "min = " + DoMin(n1, n2, n3).ToString();

            calcLabel3.Text = min;

            string max;
            max = "max = " + DoMax(n1, n2, n3).ToString();

            calcLabel4.Text = max;
        }



        private float DoSum(float p1, float p2, float p3)

        {
            return p1 + p2 + p3;
        }


        private float DoProduct(float p1, float p2, float p3)
        {
            return p1 * p2 * p3;
        }

        private float DoMin (float p1, float p2, float p3)
        {
            return System.Math.Min(p1, System.Math.Min(p2, p3));
        }


        private float DoMax(float p1, float p2, float p3)
        {
            return System.Math.Max(p1, System.Math.Max(p2,p3));
        }

        private void exitButton_Click(object sender, EventArgs e)
        {
            this.Close();
        }
__________________
Dripskii: You shot like 20 bullets at me.
Lap: Yeah, but they where one-at-a time.
iskra is offline   Reply With Quote
Old 23-04-2008   #2 (permalink)
Monster Member
 
FuRbY*'s Avatar
 
Join Date: Dec 2006
Location: the immunity syndicate
Age: 30
Posts: 2,998
Rep Power: 5
Default

rofl software developers. the dumb****s of the IT industry
FuRbY* is offline   Reply With Quote
Old 23-04-2008   #3 (permalink)
Pro Member
 
empske's Avatar
 
Join Date: Jan 2007
Location: ZULU
Age: 17
Posts: 6,719
Rep Power: 0
Default

There _is_ a C++ forum...

__________________

odin : atleast i didnt join gotgames in 2009

C:\Documents and Settings\Admin\Desktop\DdudFACE.png
empske is offline   Reply With Quote
Old 23-04-2008   #4 (permalink)
Monster Member
 
CoFfeX's Avatar
 
Join Date: Jun 2006
Age: 20
Posts: 2,371
Rep Power: 5
Send a message via MSN to CoFfeX
Default

What possible reason would you want to do that for... Or is it one of those "we're going to teach you how to do stuff by boring the **** out of you" tasks.
__________________
Bork bork bork!
CoFfeX is offline   Reply With Quote
Old 23-04-2008   #5 (permalink)
Monster Member
 
iskra's Avatar
 
Join Date: May 2006
Location: Melbourne, Victoria
Age: 19
Posts: 4,189
Rep Power: 7
Send a message via MSN to iskra Send a message via Skype™ to iskra
Default

Quote:
Originally Posted by CoFfeX View Post
What possible reason would you want to do that for... Or is it one of those "we're going to teach you how to do stuff by boring the **** out of you" tasks.
yep that 1... They even said at the beginning u prob wouldnt do it this way but um ur going to anyways...

They dont even bother making up **** for why we need to do stuff just tell us this is what u are going to make.

Not even a simple case study or a purpose...
__________________
Dripskii: You shot like 20 bullets at me.
Lap: Yeah, but they where one-at-a time.
iskra is offline   Reply With Quote
Old 24-04-2008   #6 (permalink)
ivo
GotGames Moderator
 
ivo's Avatar
 
Join Date: Jun 2006
Location: Vic
Posts: 2,060
Rep Power: 5
Default

Its basically because you need to know how to do basic coding well. Really well. There's unfortunately no other reason.

Unless you want to metaphorically dive into the deep end of the pool, and flounder and struggle and fail.

Try doing your own projects. Like tic tac toe with some AI or something.

Also why not use doSum(params int[] n), to have a more general method as well?
And did they tell you to use floats instead of doubles? (better accuracy with doubles)
__________________


"If you wanna get it through their head, talk to them ragely" - fakeh

Last edited by ivo; 24-04-2008 at 08:58 AM..
ivo is offline   Reply With Quote
Old 24-04-2008   #7 (permalink)
Contributing Member
 
Join Date: Jun 2006
Posts: 607
Rep Power: 3
Default

So?

Then do their boring ****, get it out of the way quickly (if it is boring for you it should be pretty trivial), then work on your own ****.

Fact is, you may think it boring, but consider this.

If you never did any of this, which forces you to do simple operations how would you learn things like overflow, integer overflow, comparing floats/doubles etc.


btw, how do _you think_ you compare floats?
__________________
92% of teens have moved on to rap. If you are part of the 8% who still listen to real music, copy and paste this into your signature.
Khaless is offline   Reply With Quote
Old 24-04-2008   #8 (permalink)
ivo
GotGames Moderator
 
ivo's Avatar
 
Join Date: Jun 2006
Location: Vic
Posts: 2,060
Rep Power: 5
Default

PICK ME! PICK ME!

Well you take....




nah won't tell.
__________________


"If you wanna get it through their head, talk to them ragely" - fakeh
ivo is offline   Reply With Quote
Old 28-04-2008   #9 (permalink)
Monster Member
 
iskra's Avatar
 
Join Date: May 2006
Location: Melbourne, Victoria
Age: 19
Posts: 4,189
Rep Power: 7
Send a message via MSN to iskra Send a message via Skype™ to iskra
Default

Quote:
Originally Posted by Khaless View Post
So?

Then do their boring ****, get it out of the way quickly (if it is boring for you it should be pretty trivial), then work on your own ****.

Fact is, you may think it boring, but consider this.

If you never did any of this, which forces you to do simple operations how would you learn things like overflow, integer overflow, comparing floats/doubles etc.


btw, how do _you think_ you compare floats?
Yeah I understand why i am doing all the base stuff first but to be honest, I have never liked writing anything in code. Just really not my thing, I more picked it so later on in IT when i work with Programers I no what they are talking about n stuff.

Still not sure if i am going to continue it. Prob just leave it up to Khaless and ivo :P.

I made A shell game for assignment 1 (would get code but in mac os atm not xp for visual) But basicly it had a lot of If statements around which i new i could prob just call it instead of copy pasting, just had no idea how to do that.
__________________
Dripskii: You shot like 20 bullets at me.
Lap: Yeah, but they where one-at-a time.
iskra is offline   Reply With Quote
Old 28-04-2008   #10 (permalink)
ivo
GotGames Moderator
 
ivo's Avatar
 
Join Date: Jun 2006
Location: Vic
Posts: 2,060
Rep Power: 5
Default

Programming can has the capacity to be as deadly boring as your history lessons.

But IMO outweighed easily by the times you're trying to create a new algorithm and then get it after 1000 edits, or sorting out your huge bundle of objects and functions, or finally getting the effect that you want, or everything works and you now have a cool executable which does stuff, not just sit there and get marked by a teacher, or finally getting things to communicate, and the list goes on.

Did you know a new space rocket once blew up because the trajectories could no longer be calculated accurately enough in single precision, which had worked fine for the previous ones.

And some anti-missile missiles in the gulf war had to be reset every few days or else rounding errors would cause them to miss their targets by 100's of metres? (they discovered this after one failed to destroy a scud aimed at an American base)
__________________


"If you wanna get it through their head, talk to them ragely" - fakeh

Last edited by ivo; 28-04-2008 at 10:33 PM..
ivo is offline   Reply With Quote
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT +10. The time now is 06:34 AM.


Powered by vBulletin® Version 3.7.5
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0