Hungry for more ...


6 replies [Last post]
cbrad
cbrad's picture
Offline
...burning like a watchful eye...I am a moderatorI've been here since the first tree. I am betaMy name if Forest WiBit.Nothing on Earth could stop the coding...A Coding BeautyDriving Ms. ChickyYou maniac! You blew it up! The compiler that is.Halfsies!W007! I watched 10 vids!I don't know when to shut up.We propose a toast! To you!I found a bug so fix it!
Joined: 2011-06-14
Points: 2785

Devoured the current set of videos on C# - can't wait for the next set to be posted.  I'm interested in what "project" you will apply yourselves to at the end of the C# series ...

Not sure if I've divulged this yet, but I"m currently working on a C# project within my company and am almost drowning.  I've had to go back to intro to OOP and ridiculous measures of sketching classes in massive diagrams to try and understand what is going on.

It is with this intro that I ask my questions:

It would be great if you could go into more detail about some complex programs (well, complex to me that is) that involve > 10 classes, forms, output etc.  I find that even though the examples with frogs, flies and chicks make perfect sense, as soon as I get into my project the way it is laid out in VS just gets me tangled.  How do you digest a new bit of code if you are looking at it for hte first time?  How long would it take you to "know" it well?

Any chance of doing something like this in the future (or has it been done in Java? - I skipped over that one ... )

 

__________________

Cheers,

cbrad.)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Kevin
Offline
When things break I did it. I am an admin!Enjoy my soothing baritone.Completionist. I am better than you.My name if Forest WiBit.Nothing on Earth could stop the coding...A Coding BeautyDriving Ms. ChickyYou maniac! You blew it up! The compiler that is.Halfsies!W007! I watched 10 vids!Boot up or shut up!I don't know when to shut up.I'm not a fanboy!
Joined: 2011-03-20
Points: 2570

Hey cbrad! Bryan and I have fired-up the 'ol Camtasia and started recording some more C# content. We worked for about 5 hours last night. I put up one of the lessons we recorded this morning.

We are still considering our lab content for C#. We will take any thoughts you have on what you would like to see. What exactly are you looking for in a project?

cbrad
cbrad's picture
Offline
...burning like a watchful eye...I am a moderatorI've been here since the first tree. I am betaMy name if Forest WiBit.Nothing on Earth could stop the coding...A Coding BeautyDriving Ms. ChickyYou maniac! You blew it up! The compiler that is.Halfsies!W007! I watched 10 vids!I don't know when to shut up.We propose a toast! To you!I found a bug so fix it!
Joined: 2011-06-14
Points: 2785

As I'm worried about incuring the wrath of Wibit The Frog, I've started going through the Java course to try and get more learning in.  I'm hoping there will be more class-level thinking in there.

Now, What project to tackle?  That's a damn good quesiton!  Would it be windows form based?  As I mentioned, I've been working on a small c# app that has a form which instatiates a "model" class and then several classes are called within that.  So any project that has a 3 or 4 level of classes would be useful.  

Ideas (note that I didn't say good ideas):

1) unit converter?  mpg to kph etc? this would be based on a form.

2) something that converts a txt to an xml or xml to txt etc?  Exports entries from a database to a file ?

3) poker (or other) game? (everyone loves games).

4) plugins for something?

These are the most complex things that I can think of at the moment that may have fairly complex structures but are still somewhat simple.

__________________

Cheers,

cbrad.)

cbrad
cbrad's picture
Offline
...burning like a watchful eye...I am a moderatorI've been here since the first tree. I am betaMy name if Forest WiBit.Nothing on Earth could stop the coding...A Coding BeautyDriving Ms. ChickyYou maniac! You blew it up! The compiler that is.Halfsies!W007! I watched 10 vids!I don't know when to shut up.We propose a toast! To you!I found a bug so fix it!
Joined: 2011-06-14
Points: 2785

OK, I've had a think about it and this is where I get confused.  Consider this example - construct our solar system using java/C# etc.  I would offer the following Classes.

PlanetarySystem, Star, Planet, Satelite, Comet

So, any PlanetarySystem object would contain a number of star objects which would have a number of Planet objects and so on we go ... This is an example of how I get caught.  I don't know how to handle these cascading classes in classes.  I know we will create lists of objects but putting this all into code is somewhat daunting to me.  (Part of the reason is that I have no idea what you would do with this type of system!)

For us (humans, frogs, flies, chicks and JavaMonkeys anyway), it would be

PlanetarySystem TheSolarSystem = new PlanetarySystem();

 "TheSolarSystem" (Contains "TheSun")

Star TheSun = new Star();

"TheSun" (Contains Planets - Murcury, Venus, Earth, Mars, Jupiter etc ...)

Planet Earth = new Planet();

"Earth" would contain "TheMoon" (a Satellite object)

Satellite TheMoon = new Satellite();

 

of course, for Jupiter it would be the same PlanetarySystem and Star but Jupiter would contain 66 Satellite objects or however many they think there are right now (Jupiter is a greedy bitch).

Perhaps I'm getting myself confused for no reason but when you have been doing person, employee examples there has not been any need to hold collections of objects which contain collections of objects etc ... 

okay, I'm going to have a little lie-down now ...

 

__________________

Cheers,

cbrad.)

Kevin
Offline
When things break I did it. I am an admin!Enjoy my soothing baritone.Completionist. I am better than you.My name if Forest WiBit.Nothing on Earth could stop the coding...A Coding BeautyDriving Ms. ChickyYou maniac! You blew it up! The compiler that is.Halfsies!W007! I watched 10 vids!Boot up or shut up!I don't know when to shut up.I'm not a fanboy!
Joined: 2011-03-20
Points: 2570

OK, so you want to see an examle where we are managing a collection? On the same line as Person and Employee, what if we did a lab where we create an Organization class that accepts Employees. This can store the employees and provide ways to display them? We could also generate a XML hierarchy tree such as:

static void Main(string[] args)
        {
            Employee TheCeo = new Employee(new Person("The Frog", "WiBit"));
            TheCeo.SetEmployeeId(0);
            TheCeo.SetJobTitle("CEO");

            Employee e1 = new Employee(new Person("Testerson", "Test"));
            e1.SetEmployeeId(1);
            e1.SetJobTitle("Director of East Coast Sales & Marketing");
            e1.SetManager(TheCeo);

            Employee e2 = new Employee(new Person("Mill", "Bill"));
            e2.SetEmployeeId(2);
            e2.SetJobTitle("Director of West Coast Sales & Marketing");
            e2.SetManager(TheCeo);

            Employee e3 = new Employee(new Person("Face", "Harry"));
            e3.SetEmployeeId(3);
            e3.SetJobTitle("Sales Manager");
            e3.SetManager(e1);

            Employee e4 = new Employee(new Person("Fone", "Eye"));
            e4.SetEmployeeId(4);
            e4.SetJobTitle("Marketing Manager");
            e4.SetManager(e1);

            Employee e5 = new Employee(new Person("Droid", "Anne"));
            e5.SetEmployeeId(5);
            e5.SetJobTitle("Sales Manager");
            e5.SetManager(e2);


            Employee e6 = new Employee(new Person("The Fly", "Buzz"));
            e6.SetEmployeeId(6);
            e6.SetJobTitle("Marketing Manager");
            e6.SetManager(e2);

            Organization org = new Organization("WiBit.Net");

            org.Add(TheCeo);
            org.Add(e1);
            org.Add(e2);
            org.Add(e3);
            org.Add(e4);
            org.Add(e5);
            org.Add(e6);

            Console.WriteLine(org.ToXmlString());
        }

The XML output would look like:

<Organization>
	<Name>WiBit.Net</Name>
	<NumEmployees>7</NumEmployees>
	<Employees>
		<Employee>
			<EmployeeId>0</EmployeeId>
			<LastName>The Frog</LastName>
			<FirstName>WiBit</FirstName>
			<JobTitle>CEO</JobTitle>
			<Employees>
				<Employee>
					<EmployeeId>1</EmployeeId>
					<LastName>Testerson</LastName>
					<FirstName>Test</FirstName>
					<JobTitle>Director of East Coast Sales & Marketing</JobTitle>
					<Employees>
						<Employee>
							<EmployeeId>3</EmployeeId>
							<LastName>Face</LastName>
							<FirstName>Harry</FirstName>
							<JobTitle>Sales Manager</JobTitle>
							<Employees>
							</Employees>
						</Employee>
						<Employee>
							<EmployeeId>4</EmployeeId>
							<LastName>Fone</LastName>
							<FirstName>Eye</FirstName>
							<JobTitle>Marketing Manager</JobTitle>
							<Employees>
							</Employees>
						</Employee>
					</Employees>
				</Employee>
				<Employee>
					<EmployeeId>2</EmployeeId>
					<LastName>Mill</LastName>
					<FirstName>Bill</FirstName>
					<JobTitle>Director of West Coast Sales & Marketing</JobTitle>
					<Employees>
						<Employee>
							<EmployeeId>5</EmployeeId>
							<LastName>Droid</LastName>
							<FirstName>Anne</FirstName>
							<JobTitle>Sales Manager</JobTitle>
							<Employees>
							</Employees>
						</Employee>
						<Employee>
							<EmployeeId>6</EmployeeId>
							<LastName>The Fly</LastName>
							<FirstName>Buzz</FirstName>
							<JobTitle>Marketing Manager</JobTitle>
							<Employees>
							</Employees>
						</Employee>
					</Employees>
				</Employee>
			</Employees>
		</Employee>
	</Employees>
</Organization>

What do you think? Not exactly astronomy (which is a hobby of mine), but it fits in the realm of the simple examples we strive for.

cbrad
cbrad's picture
Offline
...burning like a watchful eye...I am a moderatorI've been here since the first tree. I am betaMy name if Forest WiBit.Nothing on Earth could stop the coding...A Coding BeautyDriving Ms. ChickyYou maniac! You blew it up! The compiler that is.Halfsies!W007! I watched 10 vids!I don't know when to shut up.We propose a toast! To you!I found a bug so fix it!
Joined: 2011-06-14
Points: 2785

I like the way you think.  

I guess adding extra levels would be very similar? Employee has a list of "skills"?  It's so bloody easy when you right it out as you've done above.  It makes it so clear.  I think when I start working with disparate (sp?) data being pulled from different places I start to lose the picture in my head.  I liken it to lucid dreaming ... sometimes the harder I try to hold the OOP model of my program in my head the quicker it pops like some sort of cartoon bubble ...

Anyway, yes - the above would be a very nice exmaple!

__________________

Cheers,

cbrad.)

justbrianr
justbrianr's picture
Offline
Joined: 2012-10-20
Points: 0

Guys I agree with cbrad that the C# section can afford to get more video. Were you planning to make any database with C# kind of videos, including ADO.net, LINQ, and/or Lambda expressions??

Last but not least, you have done an amazing job!! Absolutely love the site and thank you!!! for sharing your knowledge. It is helping me so much. You guys are great!!!