visualizing c# .net in a grid environment

40
Visualizing C# .NET in a Grid Environment Getting young girls interested in Computer Science and other mathematical based fields Melea Lann Williams University of North Carolina Wilmington

Upload: ashton-villarreal

Post on 04-Jan-2016

16 views

Category:

Documents


1 download

DESCRIPTION

Visualizing C# .NET in a Grid Environment. Getting young girls interested in Computer Science and other mathematical based fields. Melea Lann Williams University of North Carolina Wilmington. Table of Contents. Background Info - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Visualizing C# .NET in a Grid Environment

Visualizing C# .NET in a Grid Environment

Getting young girls interested in Computer Science and other

mathematical based fields

Melea Lann Williams

University of North Carolina Wilmington

Page 2: Visualizing C# .NET in a Grid Environment

Table of Contents

• Background Info• “The Real World” … Incorporating

Internships into the learning environment• Master’s Thesis … “The Doll Idea” …

getting young girls interested• Beginning C# … Code and Samples• WPF … Windows Presentation

Foundation• .NET

Page 3: Visualizing C# .NET in a Grid Environment

Background Information

Page 4: Visualizing C# .NET in a Grid Environment

Mayan Math

• Three symbols

Shell = “Complete” or “zero”

Stick = 5

Bean = 1

Page 5: Visualizing C# .NET in a Grid Environment

Mayan Math Example

20 2 (400) * 2

20 1 (20) * 15

20 0 (1) * 8

800

300

8

Total:

1108

Page 6: Visualizing C# .NET in a Grid Environment

Internships

“Life in the Real World”

Page 7: Visualizing C# .NET in a Grid Environment

Reasons to do an Internship

• Applying general computer science concepts, learned in classroom, in the real world.

• Gain experience Experience = better pay

• Get ideas for masters thesisMore exposure = better ideas

• Learn what type of work environment suits your needs and personality type.

Page 8: Visualizing C# .NET in a Grid Environment

Things Learned

• C#, Visual Basic, Team Foundation Server

• Documentation Procedures … which is a lot, for the Nuclear Industry.

• Help File System Implementation

• Software Testing Implementation

• Learn / re-learn Chemistry Concepts and Nuclear Engineering Concepts

Page 9: Visualizing C# .NET in a Grid Environment

Thank God for VPN!

Page 10: Visualizing C# .NET in a Grid Environment

The “Baby Doll” Idea

Getting young girls interested in Computer Science and other

related fields.

Page 11: Visualizing C# .NET in a Grid Environment

Current Problem

• Most current dolls have everything already done.

• Most other programming related toys do not include the younger girl audience.– Including more familiar role playing games.

• Most current toys for younger girls do not include many building concepts

• More needed research about women in Computer Engineering

Page 12: Visualizing C# .NET in a Grid Environment

Solution

• Build a physical doll that interfaces with a computer through USB port.

• The doll will be able to imitate human behavior

• The gui interface will be designed with the intention of “ease of use” for girls between the ages of 5 – 11.

• Multiple dolls will be able to interact with each other through grid computing

Page 13: Visualizing C# .NET in a Grid Environment

Problems In Solution

• Security issues --- three to four levels of security issues

• It takes a ton of motors and controls to simulate human behavior.

• The weight of the doll.

• Child choosing what the doll would look like.

• The amount of modeling work involved.

Page 14: Visualizing C# .NET in a Grid Environment

Solutions to Problems

• Scale down the scope.– Doll doesn’t have to completely mimic

human behavior, instead, choose just a few things.

– In order to save modeling time, and for the actual doll to match what is seen on the screen, versatility of how the doll looks will have to be scratched.

– Grid Security limits and boundaries.

Page 15: Visualizing C# .NET in a Grid Environment

How to Implement

• At first, I had decided to use NXT robots to do the initial making of the doll … this part has been scratched for now.

• Gather more data on women currently in the industry through polling and questionnaires, etc.

• Use proprietary software (Microsoft) to eliminate possible integration problems.

Page 16: Visualizing C# .NET in a Grid Environment

How to implement (con.)

• Use NGrid as a way to interface between .NET and grid environment.

• C# will be used for the code.

Page 17: Visualizing C# .NET in a Grid Environment

C #

Background, Code, and Examples

Page 18: Visualizing C# .NET in a Grid Environment

Why C#?

• Since Java was developed first, C# has had the advantage to capitalize upon the weaknesses of Java.

• The ability to easily incorporate .NET components and convert to web services.

• Works very well with XML

• Ability to reference many different programs of multiple file formats.

Page 19: Visualizing C# .NET in a Grid Environment

So, why not Java?

The differences:

• C# allows restricted use of pointers.

• C# permits low-level access to machine resources.

• C# allows for user defined value types by using keyword “struct”.

• Primitive types can define methods without separate wrapper class.

Page 20: Visualizing C# .NET in a Grid Environment

So, why not Java? (con.)

Ex: Integer.toString(100); //java100.ToString();// C#• C# arrays correspond to an object in the

Array class, whereas, in Java, each array corresponds to a direct subclass of the object class.

• C# supports both true multidimensional arrays, along with jagged arrays. (example next slide)

Page 21: Visualizing C# .NET in a Grid Environment

Multi-Dimensional Array

Example:int[,] myArray = new int[4,2]; // makes an

array of 4 rows, 2 columnsThree dimensional array example:int[,,] myArray = new int [4,2,3];• Downside --- even though this has it’s

benefits, it can get confusing… sometimes, it’s easier to use jagged arrays.

Page 22: Visualizing C# .NET in a Grid Environment

So, why not Java?

• C# allows for partial classes. Partial classes means that the class definition can be split across multiple source files. (there is nothing like this in Java, and can be confusing)

(example on next 3 slides)

Page 23: Visualizing C# .NET in a Grid Environment

So, why not Java? (con.)

using System; 

partial class XY { 

  int x;    public int X {     get { return x; }     set { x = value; }   } }

Page 24: Visualizing C# .NET in a Grid Environment

So, why not Java?

partial class XY { 

  int y;    public int Y {     get { return y; }     set { y = value; }   } }

 

Page 25: Visualizing C# .NET in a Grid Environment

So, why not Java?

class MainClass { 

  public static void Main() {     XY xy = new XY();       Console.WriteLine(xy.X + "," + xy.Y);   } }

Page 26: Visualizing C# .NET in a Grid Environment

Orthogonal or not?

There are 503 pages in Word format of language specifications!

• It is orthogonal in nature … just extremely complex.

• On a good note … tons of tutorials on the internet.

Page 27: Visualizing C# .NET in a Grid Environment

Screenshot Hello World

Page 28: Visualizing C# .NET in a Grid Environment
Page 29: Visualizing C# .NET in a Grid Environment

Source Code Hello Worldusing System.Collections.Generic;using System.Linq;using System.Text;

namespace TextHello{ class Program { static void Main(string[] args) { System.Console.WriteLine("Hello World"); } }}

Page 30: Visualizing C# .NET in a Grid Environment

Output Hello World

Page 31: Visualizing C# .NET in a Grid Environment

Windows Presentation Foundation

• Graphical subsystem used within .NET applications

• Uses XAML mark-up language (Microsoft version of XML)

• Provides a consistent programming model by separating the user interface and the business logic (supposedly)

Page 32: Visualizing C# .NET in a Grid Environment
Page 33: Visualizing C# .NET in a Grid Environment
Page 34: Visualizing C# .NET in a Grid Environment
Page 35: Visualizing C# .NET in a Grid Environment

WPF Hello XAML<Window x:Class="WPFHello.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Hello" Height="130" Width="297" Loaded="Window_Loaded"> <Grid> <Label Height="28" Margin="13,12,126,0" Name="label1" VerticalAlignment="Top" FontSize="12">Please enter your name:</Label> <TextBox Height="28" Margin="22,36,115,0" Name="userName" VerticalAlignment="Top" /> <Button Height="28" HorizontalAlignment="Right" Margin="0,36,23,0" Name="ok" VerticalAlignment="Top" Width="57" Click="ok_Click">OK</Button> </Grid></Window>

Page 36: Visualizing C# .NET in a Grid Environment

C# code for WPF Hellousing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows;using System.Windows.Controls;using System.Windows.Data;using System.Windows.Documents;using System.Windows.Input;using System.Windows.Media;using System.Windows.Media.Imaging;using System.Windows.Navigation;using System.Windows.Shapes;

Page 37: Visualizing C# .NET in a Grid Environment

namespace WPFHello{ /// <summary> /// Interaction logic for Window1.xaml /// </summary> public partial class Window1 : Window { public Window1() { InitializeComponent(); }

private void Window_Loaded(object sender, RoutedEventArgs e) {

}

private void ok_Click(object sender, RoutedEventArgs e) { MessageBox.Show("Hello " + userName.Text); } }}

Page 38: Visualizing C# .NET in a Grid Environment
Page 39: Visualizing C# .NET in a Grid Environment

Conclusion

• Why is it important to learn Microsoft products / C#? … because large U.S. based business uses Microsoft.

• There are many similarities between C# and Java syntax wise, however, there is a large difference between the structure and functionality of the language.

Page 40: Visualizing C# .NET in a Grid Environment

References

• http://en.wikipedia.org/wiki/Comparison_of_C_Sharp_and_Java#Generics

• http://www.java2s.com/Tutorial/CSharp/0140__Class/0580__Partial-Class.htm

• http://msdn.microsoft.com/en-us/library/ms173156.aspx

• Microsoft Visual C# 2008 Step by Step

John Sharp