Getting Started with C++ and C#

"Start where you are, use what you have, do what you can."
- Arthur Ashe

This page provides resources for students needing a quick introduction or refresher for the programming languages C++ and C#. It should also be useful for anyone needing to prepare for interviews for software development positions.

  1. Getting Started with C++

    C++ is an elegant but somewhat complex programming language that is powerful, supporting Structured, Generic, and Object Oriented designs.

    It has facilities for making instances of classes that provide value type behavior, e.g., deep copy and assignment. C++11 has added support for move semantics, enabling construction of perhaps complex data structures in some local scope and efficiently transporting the result to the calling scope. It also supports access and manipulation of memory when needed, allowing direct use of operating system APIs.

    It is widely used in industry for system level programing of frameworks and real-time systems as well as for desktop and Scientific Computing applications.

    C++ has a well engineered standard library that provides strings, I/O streams, template containers, threads and locks, and numerics. It does not provide support for directory and file management, but that is fairly easy to provide using operating system APIs (see C++ FileSystem in Sample Code, below).

    To be effective you need to understand the structure of a C++ class, its constituent parts, and how to package its source code and binaries. The best way to learn that is to look at a lot of well crafted code and to write a lot of code, armed with a modern IDE, up-to-date compiler, and a swift red pencil.

    Here are the first things you need to look at to get started:

    C++ Link Description
    Basic Syntax C++ Survival Guide This document presents the basic language syntax for pointers and references, classes, class relationships, and std::vectors<T>
    classes TestClass
    Str class
    TestClass illustrates the important member functions shared by all C++ classes. Str is a string class. It illustrates how to implement the important parts of a class.
    class relationships Class Relationships
    Class layout
    Illustrates the four class relationships: inheritance, composition, aggregation, and using.
    Standard Template Library (STL) STL containers and iterators STL containers are the basic building blocks for many applications.
    Project #1 will use them.
    FileSystem for Windows FileSystem-Windows Surprisingly the Standard C++ Library provides no facilities for retrieving and using Directory information. You will find this code from the college server offers File, FileInfo, Path, and Directory classes that are about as easy to use as the .Net Framework counterparts.

    After you've become comfortable with the material in the table above, you should look at the links below to help you embark on your C++ journey. I believe you will be well rewarded for the effort you spend here. Beginners may wish to focus on the tutorials, first few code examples, and blog entries.

    Tutorials and References:

    IDEs:

    Videos:

    References:
    Sample Code:

    CSE687 - Object Oriented Design:
  2. Getting Started with C#

    C# is a managed language that is similar to Java, runs in a virtual machine, referred to as the Common Language Runtime (CLR), with garbage collection, exception handling, and reflection. It has a wealth of library resources that provide simple access to almost the entire Windows API.

    You will find C# to be a relatively simple language with a few inconsistances like delgates and Language Integrated Query (LINQ). These are powerful and useful facilities but make the language a bit harder to learn.

    To be effective you need to learn the peculiarities of its reference-based object model. In general you can't expect to make copies of objects and need to be aware of side-effects due to the use of references to objects residing in the managed heap. For example, the assignment operator assignes a reference, not the state of its referenced object.

    You should find these resources useful as you learn the language and its infrastructure. Beginners may wish to focus on the tutorials, first few code examples, and blog entries.

    Tutorials and References:

    IDEs:

    Videos:

    References:
    Sample Code:

    CSE681 - Software Modeling and Analysis:
  3. Getting Started with Asp.Net

    Asp.Net is a powerful facility for creating web applications and services hosted in Internet Information Server (IIS). It supports two rather different programming models for Webforms and Model-View-Controller (MVC) applications.

    Webforms, as the name suggests, are most useful for building form-like applications that hold a collection of controls on a form, usually to provide access to the contents of a database. Each control has both design-time and run-time behaviors. At run-time when a page is loaded the each control will create markup and javascript behaviors which become part of the page's html parse tree and browser rendering.

    Asp.Net MVC applications do not provide a control model but do provide html helpers that make it relatively easy for developers to build useful and interesting views for browser rendering. It encourages a strong separation of control, business modeling and data handling, and presentation.

    The links and examples, below, should help you get started building websites and webservices with Asp.Net and Asp.Net MVC.

    Tutorials:

    IDEs:

    Videos:
    Sample Code:

    References: