Software Development Fundamentals: (02) Core Programming

Play Software Development Fundamentals: (02) Core Programming

The Discussion

  • User profile image
    Farhadw2000

    Helpful for MTA exam.Smiley I specially liked the example on recursive programming at the end. Very ingenuous. 

  • User profile image
    Brian27

    There is a trend for IT professionals (even very talented ones), to anthropomorphize.  I cringe every time I hear someone say "...the compiler knows..." or "...the application understands...".  I guess they are trying to make a technical subject more accessible - but that fudging of the truth carries risks.

    Processors are more like the pipes and valves of an irrigation system - the water will flow anywhere it's allowed,  A CPU will execute each instruction (opening or closing of valves) as it receives it.  The CPU can neither know nor care, where the instructions came from, or about the intentions of the programmer.

    The apparent sophistication of high level applications is the result of the talent of the programmers who wrote the software for all the intermediate layers of abstraction down to the processor instruction set.  

    Saying that any software "knows" to do the right thing, implies that it "knows" not to do the wrong thing.

    Trusting that software "knows" not to do the wrong thing is dangerous.

     

  • User profile image
    SAh

    While following the instruction, Stack did not function. Any ideal why?
    I used below statements:

    class Program
    {
    static void Main(string[] args)
    {
    stack mystack = new Stack();
    mystack.push("1");
    mystack.push("2");
    mystack.push("3");
    mystack.push("4");
    mystack.push("5");

    Console.WriteLine("my stack number is: " + mystack.Count);
    Console.WriteLine();

    while (mystack > 0) ;
    {
    Object item = mystack.Pop();
    Console.WriteLine("popped" + item.ToString() + "off the stack");
    Console.WriteLine("stack count :" + mystack.Count);
    Console.WriteLine();
    }
    }
    }


  • User profile image
    MilesR
    Very clear instruction. This brief overview of variables and data structures was a great refresher for me.
  • User profile image
    Gerry

    SAh, this is what your code should look like. Notice the capitalization of Stack in the declaration statement. Also note the use of myStack.Count > 0 in the while statement.

    class Program
    {
    static void Main(string[] args)
    {
    Stack myStack = new Stack();

    myStack.Push("1");
    myStack.Push("2");
    myStack.Push("3");
    myStack.Push("4");
    myStack.Push("5");

    Console.WriteLine("My stack number is: " + myStack.Count);
    Console.WriteLine();

    while (myStack.Count > 0)
    {
    Object item = myStack.Pop();
    Console.WriteLine("popped " + item.ToString() + " off the stack.");
    Console.WriteLine("stack count " + myStack.Count);
    Console.WriteLine();
    }
    }
    }

  • User profile image
    Johnathon Eva

    Maybe I'm wrong, but in the slide titled: Variables, Constants, and Data Types I noticed that in the chart under data type 'long' it has it as 9,223,372,036,854,775,808 to 9,223,372,036,854,775,807. It doesn't bare much relevance on the overall instruction, but that first number should definitely be negative.

Add Your 2 Cents