Programming Skills Page
We aim to enhance your software development skills and programming skills. This page is going to provide beginner software developers with best practices and tasks to do before they start thinking about large projects.
Note that the goal of this page is not to teach you how to program or write code, but it highlights some points and challenges you may face when you are working on a real project. We C# programming language with visual studio (2012 or 2010 are the preferred version) |
Recommended books |
Before you start
Make sure to review the following topics before you start the practices:
1. General review on how to create classes and forms. 2. Functions and callings: Call by reference & call by value. 3. Loops: for loop, while loop. 4. Conditions: if statements, switch/case. 5. Data structures: Array, List, Dictionary. 6. Object oriented topics: Interfaces, Classes, Inheritance ... 7. Tool box: you should have a good idea about how to use the basic tools (Buttons, Text Box, Radio button, Check box ... etc) More advanced tools like DataGridView, ComboBox. A general understanding is just needed for the moment. Later on, more advanced topics will be required while reading and thinking about the practices or before starting an advanced task. Once you finish the review and feel you are ready then you can start with the tasks below one by one. |
Practice 1: Sorting
The task is to create a function to sort an array in the opposite direction in two ways.
ex: the array is start from 0 - 100 (0, 1, 2, 3 ...) the output will be (100, 99, 98, 97, ...)
Hint: Make it simple.
ex: the array is start from 0 - 100 (0, 1, 2, 3 ...) the output will be (100, 99, 98, 97, ...)
Hint: Make it simple.
Practice 2: Understanding Threads
This task seems to be simple, but actually understanding this task could help in creating complex functions to deal with the GUI.
The task: create a loop to count from 1 - 10000. You should Update a label on a Form with your counter while you are running the program in the debug mode (F5).
Hint:
* Make it simple.
* Think about threads.
* Use delegate function to update control.
The task: create a loop to count from 1 - 10000. You should Update a label on a Form with your counter while you are running the program in the debug mode (F5).
Hint:
* Make it simple.
* Think about threads.
* Use delegate function to update control.
Practice 3: Generalization
The Task: Create a delegate function to update the text of any control. This function should be used when updating the text of any control using thread.This delegate function should be general such that it takes the target control as parameter in addition to the text value.
Call the function using thread in debug mode.
Call the function using thread in debug mode.
Practice 4: Generalization, Threads and Delegates
The Task:
* Create a form with two labels.
* Create two functions, each function should update one label text, one in ascending order (0-10000) and the other in descending order (10000-0). the two functions should start by pressing a button on the form. Each function should be handled by one separate thread.
* Create one delegate function to update the two labels (one general function for both controls).
* Create a form with two labels.
* Create two functions, each function should update one label text, one in ascending order (0-10000) and the other in descending order (10000-0). the two functions should start by pressing a button on the form. Each function should be handled by one separate thread.
* Create one delegate function to update the two labels (one general function for both controls).