HackerU College C# Fundamentals INFO
This post was created in order to assist me during the course of the ‘C# Fundamentals’ course I lecture in Hacker.
This course lasts 13 daily meetings. Each meetings lasts 8 academic hours.
The topics this course covers include the following:
Introduction
C# Basics
Classs
Strings
Arrays
Inheritance
Generics
Delegates
Lambada Expressions
Events
Threads
Exceptions
Operators
LINQ
Threads
Networking
Serialization
Asynchronous Methods
Memory Management
Regular Expressions
You can find the detailed plan of this course at the following URL address:
http://spreadsheets.google.com/pub?key=tCez5yyE8vRZHOeA8bzBMtQ&output=html




























October 28th, 2009 at 1:28 am
[...] זה עתה פירסמתי בבלוג שלי בגירסתו באנגלית פוסט מפורט אשר מלווה את הקורס שאני מעביר בשפת התיכנות #C. ניתן למצוא פוסט זה בכתובת ה-URL הבאה: http://www.lifemichael.com/en/?p=773 [...]
October 30th, 2009 at 10:37 am
Dear Students, This is the first comment I publish referring our C# course. If you encounter a specific topic that isn’t clear and a relevant video clip still wasn’t created please don’t hesitate and let me know. I will prepare one. If you encounter a specific video clip that isn’t understandable please don’t hesitate and place a comment to that clip. I will add annotations accordingly.
Following your remarks and requests in our last meeting I have completed the following:
1. I have just finished the first five chapters in my ‘Israeli C# Book’ available for download at http://www.CSharpBook.co.il. You can download them for free. They cover the main topics the first three meetings cover.
2. I have just added a new sub topic to the oop.pdf presentation. The new sub topic is ‘Indexers’. It is a tiny topic based on Properties. Next meeting I will explain it.
3. I have just added a solution for the ‘Bank Account’ assignment. You can find it online (at the same place where you can find the official slides of our course).
4. I have just completed a short video clip (hebrew) that explains the Preprocessor Directives topic. You can find it at http://www.csharpbook.co.il/wordpress/?p=106. Should you have any questions please place a comment to this post (video) and I will add the required annotations into the video clip it self. If necessary I will explain this topic in our next meeting.
5. I have just completed a short video clip (english) that explains the Type class. You can find it at http://www.youtube.com/watch?v=H1heX8-FcRg. Should you have any questions please place a comment to this video and I will add the required annotations into it. If necessary I will explain this topic in our next meeting.
6. I have just added a solution for the ‘Cube’ exercise. Please make sure to read the remarks it includes.
7. Towards next coming meeting I strongly recommend on watching all OOP and all Inheritance video clips (in Hebrew) you can find at http://www.CSharpBook.co.il. It will make things amazingly simpler on your end.
8. I have just added direct links to the slides as listed in our course’s detailed plan.I added the exact dates of each meeting as well.
9. I have just completed to overview all slides for the first three meetings. All typos were fixed. If you encounter a typo please let me know.
10. I have just started to add more assignments so you could practice at home. In order to access each one of the following URLs make sure that you have successfully logged in to the http://www.abelski.com web site. If a specific assignmnet isn’t clear and you would like an hebrew explanation please let me know and I will prepare one. For those assignmnets I have suspected they might be un clear I have already prepared an hebrew explanation linked from within the assignmnet itself. Most assignments already have online solutions.
Arrays
Pascal Triangle
http://www.abelski.com/moodle/mod/assignment/view.php?id=6512
Simple Numbers Sorting
http://www.abelski.com/moodle/mod/assignment/view.php?id=6275
Array Class Demo
http://www.abelski.com/moodle/mod/assignment/view.php?id=6513
Multiplication Table
http://www.abelski.com/moodle/mod/assignment/view.php?id=6277
Shabat Shalom,
Haim.
November 1st, 2009 at 3:07 pm
אז מה בעצם השעורים?
כל המטלות של topic 5?
November 1st, 2009 at 5:27 pm
בתוכנית של המיון אמורים להשתמש במתודה שממיינת או למיין לבד?
November 2nd, 2009 at 4:32 am
שלום חיים, בוקר טוב
בעצם השיעורים זה משולש פסקל וסידור מספרים
נכון?
צריך להגיש את זה למישהו, לך לטל?
November 2nd, 2009 at 6:45 am
הי חיים,
שאלתי כיוון שלא מצאתי מתודה שממינת מערך אז הפכתי את המערך לרשימה.
האם יש מתודה כזאת שממינת מערך?
תודה,
מילי
November 2nd, 2009 at 7:44 am
כמו כן אני לא מוצאת הסבר שלך על מערכים ומה
msdn
לא הצלחתי להבין את ה
array. creatinstance
במה אפשר להעזר?
תודה
November 2nd, 2009 at 10:52 am
לא הצלחתי לראות אף קליפ
ב http://www.csharpbook.co.il/wordpress/
November 3rd, 2009 at 7:04 am
All video clips are places on the youtube platform. The ones in hebrew are listed at http://www.csharpbook.co.il/wordpress/?page_id=13. According to Youtube stats other people do succeed to see these clips. I recommend to check if you can watch video clips on youtube in general. If you do then there shouldn’t be any problem watching the clips I did. Maybe you need to install flash plugin into your browser…? Please note that I have just added few more exerercises. Solutions for most of them were already added online. Please note that (for now) there is no need to submit your solutions for the exercises. You will get solutions for most assignments.
I have just verified the link for my hebrew explanation about arrays at http://www.CSharpBook.co.il works. Please recheck and if it still doesn’t work make sure to empty your browser cash memory.
I have just added a short clip at http://www.CSharpBook.co.il explaining the exact usage of Array.CreateInstance. Please check it and if you have any questions please leave a comment at that clip (either via youtube or via my blog at http://www.CSharpBook.co.il). I will add the required annotation on that clip accordingly.
Regarding the sort of the int numbers you can find a ready method to use (tip: check Array class). A solution for that assignments has just been added. In general, whenever there is an available method to use please prefer using that method over inventing one (this is the case with sorting an array). This way the code will be simpler to maintain (in the long run).
Towards coming meeting, the most important (on top of every other topic) is getting ready for the inheritance topic. One of the most important topics in your course. I recommend on watching the relevant video clips at http://www.CSharpBook.co.il, http://www.PHPBook.co.il and at http://www.JavaBook.co.il. The principle is the same. The more clips you watch the better understanding you get.
Good Luck!
Haim.
November 3rd, 2009 at 10:47 pm
Dear Students, This comment is written specifically for our third meeting. According to our course plan
this meeting covers the topics ‘strings’ and ‘inheritance’. Please find below the list of
the assignments you should complete for these two topics as well as few more assignments you
should complete for the topics we have already covered in our second meeting: ‘Basics’,
‘Classes’ and ‘Arrays’. Please note that for each one of these topics you can already find
short guides written in hebrew, available at http://www.CSharpBook.co.il.
Basics
Recursive Factorial
http://www.abelski.com/moodle/mod/assignment/view.php?id=6514
Recursive Fibonachi
http://www.abelski.com/moodle/mod/assignment/view.php?id=6515
Objects & Classes
Points Distance
http://www.abelski.com/moodle/mod/assignment/view.php?id=6516
Parallal Lines
http://www.abelski.com/moodle/mod/assignment/view.php?id=6517
Classroom Indexer
http://www.abelski.com/moodle/mod/assignment/view.php?id=6525
Inheritance
Student Class
http://www.abelski.com/moodle/mod/assignment/view.php?id=6280
Student Person Classes
http://www.abelski.com/moodle/mod/assignment/view.php?id=6518
Shapes Assignment
http://www.abelski.com/moodle/mod/assignment/view.php?id=6281
Printable Interface
http://www.abelski.com/moodle/mod/assignment/view.php?id=6282
Beverages Assignment
http://www.abelski.com/moodle/mod/assignment/view.php?id=6283
Points Equality
http://www.abelski.com/moodle/mod/assignment/view.php?id=6524
Arrays
Students Simple Sorting Exercise
http://www.abelski.com/moodle/mod/assignment/view.php?id=6276
Students Comparer Sorting
http://www.abelski.com/moodle/mod/assignment/view.php?id=6527
Circles Comparer Sorting
http://www.abelski.com/moodle/mod/assignment/view.php?id=6528
Strings
Colors Split
http://www.abelski.com/moodle/mod/assignment/view.php?id=6285
PadRight & PadLeft Multiplication Table
http://www.abelski.com/moodle/mod/assignment/view.php?id=6286
My Song Contains
http://www.abelski.com/moodle/mod/assignment/view.php?id=6519
Polyndrom String
http://www.abelski.com/moodle/mod/assignment/view.php?id=6284
String Characters
http://www.abelski.com/moodle/mod/assignment/view.php?id=6520
Continents Order Reverse
http://www.abelski.com/moodle/mod/assignment/view.php?id=6521
Items Prices
http://www.abelski.com/moodle/mod/assignment/view.php?id=6522
Accounts Balance
http://www.abelski.com/moodle/mod/assignment/view.php?id=6523
Simple Calculator
http://www.abelski.com/moodle/mod/assignment/view.php?id=6526
Following our discussion about structs please note that as any other value type when you create a new object from a struct you have previously defined the memory allocated for that new object is taken from the stack memory.
During our discussion about abstract classes we mention the possibility to declare abstract properties. I will prepare a specific assignment for that option so you could become familiar with this possibility. This specific assignment will be added to those assignments you will need to complete in between the 4th and the 5th meetings.
Following our discussion about defining sealed methods I want to clarify that under no circumstances there is no way to redefine a sealed method within the child classes. Once a sealed method is defined it is not possible to override it and it is not possible to hide it by declaring a new version with the ‘new’ keyword.
Following our discussion about naming rules and especially about the naming rules related to new interfaces we define I I recommend you to check Microsoft StyleCop at http://blogs.msdn.com/sourceanalysis/. It is a relatively new tool that was released in March 2008. It assists with keeping our code in accordance with Microsoft official guidelines for code style and consistency. If you visit that page you will find a link to download the detailed rules documentation StyleCop works with. I recommend you to take a look. Among those rules you will find the rule that requires us to start an interface name with the capital ‘I’ letter.
I am working now on preparing two new video clip (in hebrew) that explain various topics. They will be available at http://www.CSharpBook.co.il by the end of the day. One of them explains the Recursion topic. Please note that this specific topic is less important… so make sure you study it only once all other topics are perfectly understood. The other clip explains the Array.Sort method.
Please note the various clips (in english) I have already prepared to explain the following strings related topics: Format Providers, TryParse() method, Parse() method, ToString() method, Equals() method, Format() method, Join() method, Split() method, PadLeft() & PadRight() methods, using the foreach loop with a string and a clip that explains using the various Char static methods. Those clips are already available on youtube or via our online course (check on the right… there are various small clips I prepared… clips hosted on youtube… categorized into small groups, such as: Arrays & Strings, Exceptions Handling, Threads etc).
I have just uplaoded a solution for ‘Simple Students Sorting’ assignment that doesn’t include the usage of generics.
I am afraid that as far as it seems at the moment, I won’t have the required time to complete the CSharpBook.co.il chapters concurrently with the course (as I planned).
Typos in our presentation about Inheritance have just been fixed. The new fixed presentation is online.
Following our discussion about the reason for definning string as final, please note the reason for that is the same reason we know from Java. Optimization.
Good Luck!
Haim.
November 5th, 2009 at 5:39 am
HI HAIM – GOOD MORNING!!!
There is a few mistakes on the Assignments Solutions…
On Arrays topic – The Array Class Demo Exercise is used as a Solutions To:
Objects & Classes Assignments Solutions – Cube Assignment, Points Distance
also on C# Basics Assignments Solutions – Recursive Factorial and Recursive Fibonacci
Notice there is no Solutions for this 4 exc…
Please notify us when it will be fixed…
One Love
cricket
November 5th, 2009 at 7:47 am
Hi Idan, Thanks for letting me know. Everything was fixed. BTW, the Cube assignment was already there… maybe you meant another assignemnt? If so, please let me know. Best, Haim.
November 5th, 2009 at 10:06 am
Hi Haim, Thanks for the quick responde
Same problem with Arrays Assignments Solutions – Simple_Numbers_Sorting_Exercise
one love
cricket
November 5th, 2009 at 10:14 am
I ment before Objects & Classes Assignments Solutions – Parallal_Lines not Cube Assignment…
Same Problem…
November 5th, 2009 at 11:59 am
Fixed. Thanks:)
November 6th, 2009 at 10:21 am
To keep things organized and avoid getting confused, from now on for each meeting we will have a main text block marked in pink, that will list all exercises you should complete following that very specific meeting. The last pink text block (marked above) refers to the third meeting. Please note that I have just completed to update it with various remarks following the questions you had in class.
November 11th, 2009 at 12:26 am
Dear Students,
This comment refers to the fourth meeting of our course. I have just completed to prepare the assignments that you should complete during the period in between the fourth and the fifth meeting. You can find them listed below.
Basics
Hanoi Towers
http://www.abelski.com/moodle/mod/assignment/view.php?id=6531
Recursive Pow
http://www.abelski.com/moodle/mod/assignment/view.php?id=6536
Recursive Multiplication
http://www.abelski.com/moodle/mod/assignment/view.php?id=6537
Decimal To Hexadecimal
http://www.abelski.com/moodle/mod/assignment/view.php?id=6544
Decimal To Binary
http://www.abelski.com/moodle/mod/assignment/view.php?id=6545
Decimal To Octal
http://www.abelski.com/moodle/mod/assignment/view.php?id=6546
Binady To Decimal
http://www.abelski.com/moodle/mod/assignment/view.php?id=6547
Octal To Decimal
http://www.abelski.com/moodle/mod/assignment/view.php?id=6548
Hexadecimal To Decimal
http://www.abelski.com/moodle/mod/assignment/view.php?id=6549
Objects & Classes
Struct Performance
http://www.abelski.com/moodle/mod/assignment/view.php?id=6530
Singletone Pattern
http://www.abelski.com/moodle/mod/assignment/view.php?id=6556
Season Enum
http://www.abelski.com/moodle/mod/assignment/view.php?id=6570
Strings
Music Albums Formatter
http://www.abelski.com/moodle/mod/assignment/view.php?id=6539
Books Formatter
http://www.abelski.com/moodle/mod/assignment/view.php?id=6540
NumberStyles Finance Data
http://www.abelski.com/moodle/mod/assignment/view.php?id=6541
Bongola LaLaLand
http://www.abelski.com/moodle/mod/assignment/view.php?id=6542
Arrays
Library of Books
http://www.abelski.com/moodle/mod/assignment/view.php?id=6533
Classroom of Students
http://www.abelski.com/moodle/mod/assignment/view.php?id=6534
Album of Songs
http://www.abelski.com/moodle/mod/assignment/view.php?id=6535
Backorder Array of Numbers
http://www.abelski.com/moodle/mod/assignment/view.php?id=6543
Inheritance
LCDTV & LCDMonitor Classes
http://www.abelski.com/moodle/mod/assignment/view.php?id=6529
Simple Linked List
http://www.abelski.com/moodle/mod/assignment/view.php?id=6532
Generics
List of Rectangles
http://www.abelski.com/moodle/mod/assignment/view.php?id=6550
List of Circles
http://www.abelski.com/moodle/mod/assignment/view.php?id=6551
List of Points
http://www.abelski.com/moodle/mod/assignment/view.php?id=6552
List of Students
http://www.abelski.com/moodle/mod/assignment/view.php?id=6553
Group Of Students
http://www.abelski.com/moodle/mod/assignment/view.php?id=6554
Group of Shapes
http://www.abelski.com/moodle/mod/assignment/view.php?id=6555
Group of Shapes Only
http://www.abelski.com/moodle/mod/assignment/view.php?id=6557
Group of Persons Only
http://www.abelski.com/moodle/mod/assignment/view.php?id=6558
Group of Persons Extend Group
http://www.abelski.com/moodle/mod/assignment/view.php?id=6559
Delegates
Numeric Calculations
http://www.abelski.com/moodle/mod/assignment/view.php?id=6560
Print Details Delegate
http://www.abelski.com/moodle/mod/assignment/view.php?id=6561
Multicast Numeric Calculations
http://www.abelski.com/moodle/mod/assignment/view.php?id=6562
Anonymous Numeric Calculationg
http://www.abelski.com/moodle/mod/assignment/view.php?id=6563
Multicast Numeric Calculations Short Syntax
http://www.abelski.com/moodle/mod/assignment/view.php?id=6564
Generic Calculations
http://www.abelski.com/moodle/mod/assignment/view.php?id=6565
Lambada Numeric Calculations
http://www.abelski.com/moodle/mod/assignment/view.php?id=6566
Lambada Numeric Calculations Multicasting
http://www.abelski.com/moodle/mod/assignment/view.php?id=6567
Sorting With Delegate
http://www.abelski.com/moodle/mod/assignment/view.php?id=6568
Sorting with Delegate Func
http://www.abelski.com/moodle/mod/assignment/view.php?id=6569
Events
Snow Height Changed
http://www.abelski.com/moodle/mod/assignment/view.php?id=6571
Snow Height Changed Standard Event Pattern
http://www.abelski.com/moodle/mod/assignment/view.php?id=6572
Enjoy,
Haim.
November 13th, 2009 at 5:54 am
EVENTS– 4.2.1. Standard Event Pattern
הדוגמה במצגת ובספר לא מובנת
לא ברור למה צריך ביכלל את המתודה הוירטואלית
OnPriceChanged.
The Property : Price can’n apdate the event
PriceChanged by it’s self ?
November 14th, 2009 at 2:08 am
רק מזכירה לך שהבטחת לעשות קליפ על אלגוריתם של מיון בועות
November 14th, 2009 at 2:39 am
יש טעות בפתרון של התרגיל מיון עם delegate
במקרה שהערך הראשון הוא הכי קטן במערך אבל שאר הערכים אינם ממוינים
המיון נעצר אחרי סבב ההחלפות הראשון והמערך נשאר לא ממוין
November 16th, 2009 at 9:49 am
יש באמת בעיתיות עם התרגיל של סידור המלבנים
ב – delegate
הבעיה היא במשתנה הבוליאני, ככה שאם הוא לא נכנס לסידור של שאר המשתנים הוא יוצא מהלולאה הראשונה
יש בעיה אם הערכים הנוספים יהיו גדולים ולא מסודרים
אחרי הערך הנוכחי
אז הוא יסדר רק עד לערך הנוכחי
דוגממאות להצבה בעיתית
ערכי שטח של 6,3,24,20
1,10,6,3
וכו’ וכו’
November 17th, 2009 at 1:03 pm
there is a mistake on the Assignments Solutions…
On Objects & Classes Assignments Solutions – StructPerformance
In the code You build for struct and class of 100000000 objects instead of 100;
the code is:
PointStruct[] vecStruct = new PointStruct[100000000];
…
PointClass[] vecClass = new PointClass[100000000];
instead of..
PointStruct[] vecStruct = new PointStruct[100];
…
PointClass[] vecClass = new PointClass[100];
it will not compiled…
when you change you can c a diffrance of 2 miliseconds
November 18th, 2009 at 1:37 am
לגבי המתודה OnPriceChanged אפשר כמובן לכתוב קוד שיעבוד היטב גם מבלי להגדיר אותה. במיקרוסופט קיימת המלצה להשתמש ב-pattern המוצג אשר כולל את ההגדרה של המתודה. בכיתה נוכל לעבור יחדיו על הדוגמא ולהסביר כיצד היא עובדת.
November 18th, 2009 at 1:38 am
I have just completed to prepare video clips that explain the following sorting algorithms: Quick Sort, Merge Sort, Bubble Sort & Insert Sort. Due to technical problems we still don’t have them online. Hopefully I will succeed to upload them on youtube during this weekend.
November 18th, 2009 at 1:41 am
Thanks for your attention. Regarding the Struct Performance assignment, I have just fixed the small typo that assignment includes. Regarding the ‘Sorting with Delegate’ assignment, I have mistakenly left the boolean variable from the ‘Bubbles Sort’ algorithm. The solution for ‘Sorting with Delegate’ assignment is based on the ‘Insert Sort’. The boolean varialbe should be part of it. I have just fixed the solution. Please check the video clips (that explain sorting algorithms) I am now placing at http://www.CSharpBook.co.il. Good Luck, Haim.
November 18th, 2009 at 1:43 am
Dear Students, The collection of assignments you should complete following our fifth meeting includes assignments that will take you through topics we haven’t discussed in class. These topics include the ‘Selection Sort’ and the ‘Bubbles Sort’ algorithms. For each one of them you can find more explanations at http://www.WikiPedia.org as well as a short clip at http://www.CSharpBook.co.il that explains bubble sort. Another topic we haven’t discussed in class is the ‘Abstract Factory’ design pattern you will need to implement on your own. There are many resources available on the web that explain it. One of them is the ‘Java Design Pattern’ course you can find at xperato.abelski.com. Though the code in Java it can be implemented the same way in C# as well. Each meeting we will devote its first 15-20 min (till everyone arrive) to overview and answer general questions specifically relevant to the assignments you get. Please come ready with questions you have so we could effectively use our time.
Basics
Recursive Divide
http://www.abelski.com/moodle/mod/assignment/view.php?id=6706
Recursive Residual
http://www.abelski.com/moodle/mod/assignment/view.php?id=6707
Objects & Classes
Train Linked Lists
http://www.abelski.com/moodle/mod/assignment/view.php?id=6709
Library Books Linked Lists
http://www.abelski.com/moodle/mod/assignment/view.php?id=6710
Inheritance
Simple Queue Implementation
http://www.abelski.com/moodle/mod/assignment/view.php?id=6711
Simple Stack Implementation
http://www.abelski.com/moodle/mod/assignment/view.php?id=6714
Engine Abstract Factory Implementation
http://www.abelski.com/moodle/mod/assignment/view.php?id=6708
Arrays
Students Bubbles Sort
http://www.abelski.com/moodle/mod/assignment/view.php?id=6716
Rectangles Bubbles Sort
http://www.abelski.com/moodle/mod/assignment/view.php?id=6717
Simple Numbers Bubbles Sort
http://www.abelski.com/moodle/mod/assignment/view.php?id=6715
Circles Bubbles Sort
http://www.abelski.com/moodle/mod/assignment/view.php?id=6718
Students Selection Sort
http://www.abelski.com/moodle/mod/assignment/view.php?id=6727
Rectangles Selection Sort
http://www.abelski.com/moodle/mod/assignment/view.php?id=6728
Circles Selection Sort
http://www.abelski.com/moodle/mod/assignment/view.php?id=6729
Numbers Selection Sort
http://www.abelski.com/moodle/mod/assignment/view.php?id=6730
Strings
Strings Bubble Sort
http://www.abelski.com/moodle/mod/assignment/view.php?id=6719
Operators
Conditional Operator Bigger Length
http://www.abelski.com/moodle/mod/assignment/view.php?id=6720
Conditional Operator Rectangle Area
http://www.abelski.com/moodle/mod/assignment/view.php?id=6721
How Many Persons
http://www.abelski.com/moodle/mod/assignment/view.php?id=6722
Total Area of All Shapes
http://www.abelski.com/moodle/mod/assignment/view.php?id=6723
Primitive Types Size Of
http://www.abelski.com/moodle/mod/assignment/view.php?id=6724
Rectangle + Operator Overload
http://www.abelski.com/moodle/mod/assignment/view.php?id=6287
Rectangle / Operator Overload
http://www.abelski.com/moodle/mod/assignment/view.php?id=6731
Rectangle Implicit Casting
http://www.abelski.com/moodle/mod/assignment/view.php?id=6288
Circle + Operator Overload
http://www.abelski.com/moodle/mod/assignment/view.php?id=6732
Circle / Operator Overload
http://www.abelski.com/moodle/mod/assignment/view.php?id=6733
Circle Implicit Casting
http://www.abelski.com/moodle/mod/assignment/view.php?id=6734
Account + Operator Overload
http://www.abelski.com/moodle/mod/assignment/view.php?id=6289
Account – Operator Overload
http://www.abelski.com/moodle/mod/assignment/view.php?id=6735
Account Implicit Casting
http://www.abelski.com/moodle/mod/assignment/view.php?id=6736
Cashier Implicit Casting
http://www.abelski.com/moodle/mod/assignment/view.php?id=6740
Generics
Generic Bubble Sort
http://www.abelski.com/moodle/mod/assignment/view.php?id=6725
Delegates
Students Factor
http://www.abelski.com/moodle/mod/assignment/view.php?id=6726
Events
Account Balance Change Standard Pattern
http://www.abelski.com/moodle/mod/assignment/view.php?id=6737
Currency Exchange Rate Change Standard Pattern
http://www.abelski.com/moodle/mod/assignment/view.php?id=6738
Chat Participates Change Standard Pattern
http://www.abelski.com/moodle/mod/assignment/view.php?id=6739
Generics
Generic Queue Implementation
http://www.abelski.com/moodle/mod/assignment/view.php?id=6712
Generic Stack Implementation
http://www.abelski.com/moodle/mod/assignment/view.php?id=6713
Exceptions
The Cashier Exception
http://www.abelski.com/moodle/mod/assignment/view.php?id=6741
The Account Exception
http://www.abelski.com/moodle/mod/assignment/view.php?id=6742
The Account – Operator Exception
http://www.abelski.com/moodle/mod/assignment/view.php?id=6743
The Fraction Exercise
http://www.abelski.com/moodle/mod/assignment/view.php?id=6744
Numeric Base Translation
http://www.abelski.com/moodle/mod/assignment/view.php?id=6745
Bank Account Atomicity Pattern
http://www.abelski.com/moodle/mod/assignment/view.php?id=6746
Students Factor Atomicity Pattern
http://www.abelski.com/moodle/mod/assignment/view.php?id=6747
Language Integrated Query
Simple String Extension Method
http://www.abelski.com/moodle/mod/assignment/view.php?id=4931
Simple Rectangle Extension Method
http://www.abelski.com/moodle/mod/assignment/view.php?id=6748
Simple Circle Extension Method
http://www.abelski.com/moodle/mod/assignment/view.php?id=6749
Simple Student Extension Method
http://www.abelski.com/moodle/mod/assignment/view.php?id=6750
Simple Person Extension Method
http://www.abelski.com/moodle/mod/assignment/view.php?id=6751
Memory Management
Variables Pointers Swap
http://www.abelski.com/moodle/mod/assignment/view.php?id=6753
Reflection
Code Reviewer Custom Attribute
http://www.abelski.com/moodle/mod/assignment/view.php?id=6752
Good Luck!
Haim.
November 18th, 2009 at 4:41 pm
מה, זה כל התרגילים?
:->
לא יודע מאיפה להתחיל…
בטח אני אסיים את זה בשעה…
:->
November 20th, 2009 at 5:02 am
Hi, There is no other way. Practice. Practice. Practice. The same spirit as reflected by Steve Balmer (imagine him saying ‘Develop’, ‘Develop’ and ‘Develop’) at http://www.youtube.com/watch?v=8To-6VIJZRE or maybe you prefer the dancing remix version at http://www.youtube.com/watch?v=DBweJkRBOL0. Please note that I took out many of the assignments that refer to the ‘Language Integrated Query’ topic. I left the ones you can complete following a self study of this topic. We will, in any case, cover this topic in detail during our meetings. Please note that next meeting will be dedicated to the following topics: ‘Collections’, ‘Language Integrated Query’ and ‘Strings’ (covering and explaining everything that still wasn’t covered properly). In addition, please note that those small topics we don’t overview in detail during our meeting are indirectly coverviewed through the assignments you get. It is highly important that you verify your understanding for each one of the assignments you get. Again, there is no other way but hard work. Good Luck! Haim.
November 22nd, 2009 at 3:26 pm
:->
you maked my day with the clip!!!!
November 22nd, 2009 at 4:39 pm
well… you cannot say Microsoft doesn’t have a sense of humor… though it does have some features;)
November 23rd, 2009 at 7:15 am
Hi Haim
On the Exceptions Handling the Solution for The_Account_Minus_Operator_Exception is not the right Solution…
You used the Solution of the Accoun Minus Operator Overload for this one…
Notice that there is not a Solution for this one…
one love!
cricket
November 23rd, 2009 at 8:50 am
לא ברור מה לעשות בתרגילים:
Generic Queue
Generic Stuck
גם לא למדנו את זה וזה לא במצגת של Generic
אנחנו אמורים לחפש באינטרנט או שזו טעות?
אני שואלת מטעמי ניהול זמן…
November 23rd, 2009 at 1:30 pm
Hi, I added the missing solution. Regarding GenericQueue and GenericStack, before you move forward with these two tasks you first need to verify your understanding of the linked list subject. Once that topic is understood, you can move forward with these two assignments. Understanding what exactly is a queue.. and what exactly is a stack.. these is the simplest part. Either you wait for our lesson about collections… or check wikipedia for a the accurate definition of these two data structures. The implementation should be based on a linked list. Good Luck! Haim.
November 24th, 2009 at 8:13 am
בתרגילים של הבייסיק לא הבנתי מה הקשר בין חילוק פשוט לבין ריקורסיה.
November 24th, 2009 at 8:50 am
טוב הסתכלתי בתשובות והבנתי
November 24th, 2009 at 8:51 am
Hi Haim…
I wanted to check if i understand currectly
on the casting overload:
if i have a class that describes an Acount for example
and i have in that class
public static implicit operator double(Cashier A)
{
return A.Balance;
}
in Main
Acount A = new Acount(100);
double B = (double)A
instead of writing //double B = (double)A // i can write //double B = A // and it will do automatic casting
am i right?
November 24th, 2009 at 9:08 am
Hello Again
On the Exceptions Handling the Solution for The_Account_Minus_Operator_Exception still not complete Solution…
You Forgot to write on the main: try and catch
instead of
Account a = new Account(100, 123223);
Account b = new Account(2000, 232121);
Account c = a – b;
Console.WriteLine(c);
should be written
try
{
Account a = new Account(100, 123223);
Account b = new Account(2000, 232121);
Account c = a – b;
Console.WriteLine(c);
}
catch (AccountMinusOperatoException e)
{
Console.WriteLine( e.Message);
}
one love!
cricket
November 24th, 2009 at 10:06 am
Hello Again
On the Exceptions Handling the Solution for Bank Account Atomicity Pattern
he doesnt throw an Exeption for deposit negative amount of money…
You can c the use of finally, but not exception is thorwn…
On class Utils its written
catch(AccountException)
{
ok = false;
}
if you change it to
catch(AccountException e)
{
ok = false;
Console.WriteLine(e.message);
}
you will see also the exception and also the use of finally…
one love!
cricket…
November 24th, 2009 at 10:39 am
Hi Haim
sorry about the nag…
On the Exceptions Handling the Solution for Students Factor Atomicity Pattern
On class Utils in function public static bool DoFactor(Student[] vec, double factor)
לא ברור מדוע רשמת שמחזיר משתנה בולאיני, הרי שום דבר במיין לא מקבל אותו
VOID הוא היה יכול להיות באותה המידה
November 24th, 2009 at 12:38 pm
On The Reflection Assignments Solutions
The Solutions for Simple_Method_Call, Methods_Names, Members_Details, Class_or_Enum_or_Interface will not compiled because its written with Unsafe Code…
I dont Understand what the Reflection talk about…
From what i c its A banch methods on Assemli…
I dont understand the use of them
November 24th, 2009 at 1:28 pm
On Attribute
from what i look – it comes always before the class
I tryed to put it on a Constructor or method – but it will not work – i dont know why…
You can Make Multi Atribute
[AttributeUsage(AttributeTargets.All)] by adding AllowMultiple = true like this
[AttributeUsage(AttributeTargets.All, AllowMultiple = true)], but again its only before the class…
Im not Sure that i Understant it currectly
Its A signture That describe a class?
November 25th, 2009 at 1:39 am
Hello, Regarding Eedan (The Cricket) remark about implicit casting of Account object.. he is right. Eedan understand it correctly. Regarding new attributes, you can define new attributes that can be used with constructors (as well as with many other members’ types) as well. Please check http://msdn.microsoft.com/en-us/library/system.attributetargets.aspx for all options… you can also find few samples. Regarding the solutions that aren’t compiled due to using unsafe code you should change your project properties setting that you want to compile unsafe code.. and it will do the trick. We will overview and answer all questions about Reflection in class. The solution for DoFactor returns boolean value to allow the caller getting an indication whether the factor opertation suceeded… or not. The exercise about implementing the atomicity pattern in Bank Account doesn’t focus on the exception issue. Just on implementing the pattern. Regarding the ‘Account Minus Operator Exception’ assignment, you weren’t asked to catch the exception. (Mili, english please… let’s allow others to enjoy our transparency.. questions.. answers… etc). Best, Haim.
November 25th, 2009 at 1:41 am
Dear Students, The assignments you should complete following our sixth meeting (November 25th) includes assignments that will take you through topics we haven’t discussed in class. These topics include various sorting algorithms. For most of them you can find video clips that explain their work, available at http://www.CSharpBook.co.il. You can find more explanations at http://www.WikiPedia.org. Please note that each meeting we will devote its first 15-20 min (till everyone arrive) to overview and answer general questions specifically relevant to the assignments you get as well as overview and explain topics you have difficulties with. Please come ready with questions so we could effectively use our time. Regarding the ‘Circle Documentation’ assignment please make sure you read about C# documentation visual studio support. You can find a short guide in ‘Basics’ slides (pages 95-100).
Basics
Recursive Pyramid
http://www.abelski.com/moodle/mod/assignment/view.php?id=6868
Circle Documentation
http://www.abelski.com/moodle/mod/assignment/view.php?id=6869
Objects & Classes
Numeric Value Enum
http://www.abelski.com/moodle/mod/assignment/view.php?id=6870
Setting Flagged Enumeration
http://www.abelski.com/moodle/mod/assignment/view.php?id=6871
Inheritance
Simple Binary Tree Implementation
http://www.abelski.com/moodle/mod/assignment/view.php?id=6872
Employees Salary
http://www.abelski.com/moodle/mod/assignment/view.php?id=6873
Arrays
Students Merge Sort
http://www.abelski.com/moodle/mod/assignment/view.php?id=6862
Rectangles Merge Sort
http://www.abelski.com/moodle/mod/assignment/view.php?id=6863
Circles Merge Sort
http://www.abelski.com/moodle/mod/assignment/view.php?id=6864
Students Quick Sort
http://www.abelski.com/moodle/mod/assignment/view.php?id=6865
Rectangles Quick Sort
http://www.abelski.com/moodle/mod/assignment/view.php?id=6866
Circles Quick Sort
http://www.abelski.com/moodle/mod/assignment/view.php?id=6867
Language Integrated Query
Simple Names Length Query
http://www.abelski.com/moodle/mod/assignment/view.php?id=6241
Simple Names Include N Query
http://www.abelski.com/moodle/mod/assignment/view.php?id=6242
Simple Names Include X Query
http://www.abelski.com/moodle/mod/assignment/view.php?id=6243
Contain X Length Bigger Than 4 To Upper Case
http://www.abelski.com/moodle/mod/assignment/view.php?id=6244
First Name Alphabetical
http://www.abelski.com/moodle/mod/assignment/view.php?id=6245
LINQ To Lambada Syntax
http://www.abelski.com/moodle/mod/assignment/view.php?id=6246
Last Name Alphabetical
http://www.abelski.com/moodle/mod/assignment/view.php?id=6247
Smaller Strings
http://www.abelski.com/moodle/mod/assignment/view.php?id=6248
Smaller String Comprehension Syntax
http://www.abelski.com/moodle/mod/assignment/view.php?id=6249
Memory Management
Disposable Linked List
http://www.abelski.com/moodle/mod/assignment/view.php?id=6874
Pointers Linked List
http://www.abelski.com/moodle/mod/assignment/view.php?id=6875
Pointers Stack
http://www.abelski.com/moodle/mod/assignment/view.php?id=6876
Pointers Queue
http://www.abelski.com/moodle/mod/assignment/view.php?id=6877
Array of Pointers
http://www.abelski.com/moodle/mod/assignment/view.php?id=6878
Reflection
Methods Names
http://www.abelski.com/moodle/mod/assignment/view.php?id=6879
Members Names
http://www.abelski.com/moodle/mod/assignment/view.php?id=6880
Simple Method Call
http://www.abelski.com/moodle/mod/assignment/view.php?id=6881
Class or Interface or Enum
http://www.abelski.com/moodle/mod/assignment/view.php?id=6882
Collections
List of Names
http://www.abelski.com/moodle/mod/assignment/view.php?id=6883
The GoCoMoKo Dictionary
http://www.abelski.com/moodle/mod/assignment/view.php?id=6884
Rental Cars
http://www.abelski.com/moodle/mod/assignment/view.php?id=6885
Students Scholarship
http://www.abelski.com/moodle/mod/assignment/view.php?id=6886
Good Luck!
Haim.
November 27th, 2009 at 12:39 am
Dear Friends, Regarding the funny video clips I mentioned in class when referring Java and .NET comparison with Ruby on Rails please check http://www.youtube.com/watch?v=91C7ax0UAAc. These creative developers have created more than a few funny clips. Some of them talk about MVC. Others compare Ruby with other frameworks as .NET and Java EE. Enjoy, Haim.
November 27th, 2009 at 12:49 am
Dear Students, Regarding the ToLookup method and the Lookup data structure, I have just updated the collections slides. Please check page number #76 where you can find both the slid and its node. Please go over that slide after you complete going over the extension methods topic. If you still have any questions about this specific topic please let me know and I will add more explanations into the relevant slide. Please make an effort and try to finalize your understanding of this topic at home. If needed please let me know and I will prepare a dedicated clip. This way, we will have more time in class to go in-depth when going over Linq. Please note that you can find more explanations about defining an extension method at my dedicated clip for that topic. Browsing at http://www.abelski.com (‘C# Fundamentals’ course) you can find on the right a list of video clips categorized in according with the topics our course includes. Among those clips you will find the dedicated clip for the ‘Extension Method’ topic. Good Luck! Haim.
November 27th, 2009 at 12:53 am
Dear Studetns, Regarding the strings format topic, please check the small video clips I prepared about this specific topic. You can find those clips categorized as clips about strings. I have just completed to add few textual annotations that provide additional explanation into these clips. Please make an effort to finalize your understanding of this topic at home so we could have more time dedicated in our next meeting to Linq. Please don’t hesitate and let me know if you have any question referring to something in my slides or my clips and I will add the required annotation or the required explanation into the clip or the slides. Good Luck! Haim.
November 27th, 2009 at 11:22 am
Dear Students, I hope you are doing well having fun working on Java. Please don’t miss the many video clips you can find online on the right side bar of our web site. You can find many clips that explain many topics, including Reflection, LINQ and Lambda Expressions. If you encounter a clip that isn’t understood just place a detailed comment and I will add the required annotation. Good Luck, Haim.
November 28th, 2009 at 3:24 am
Hi Haim. About Array Homework, what do you mean “merege sort” & “quick sort ” Algoritm ?
November 28th, 2009 at 5:18 pm
יש בעיה בפתרון לתרגיל Method Names בנושא Reflection
נסה להריץ את הפתרון ותראה.
Object reference not set to an instance of an object.
November 29th, 2009 at 12:40 am
Hi, It works fine. Just make sure to enter the full qualified name of the class (e.g. System.String). Please english… Best, Haim.
November 29th, 2009 at 12:45 pm
so many ways for sorting, merge, quicksort – each one of them have an algoritem written in wikpidia…
do we realy have to learn so many ways of sorting, its only algoritems…
is this the Purpse of those exc, to understand how to work with algoritems?
or to know more ways for sorting?
not enough the simple sorting and using Icomparable, Icomparer classes…
im guessing that im asking, why to complicate life, when you can not complicate your life? :->
i dont think i will remember all of those ways…
November 30th, 2009 at 10:10 am
Hi Haim
On The Collection, The Lookup exc
Lookup lookup = (Lookup)list.ToLookup(ob => ob.EngineVolume);
I dont Undersrstand what the ob stand for, Is there another way to write it?
I know the Lookup Should get the Engine Volume, but why To write it ob => ob.EngineVolume
what does it mean?
is there another way to get, EngineVolume from the class?
November 30th, 2009 at 12:57 pm
Regarding merge sort, quick sort as well as all other algorithms please check the dedicated video clips at http://www.CSharpBook.co.il. Learning the available sorting algorithms should be at your lowest priority. Please make sure that before you put time on topics we have covered long time ago as well as topics such as sorting and data structure you finalize your understanding for the currently learned topics. Knowing sorting algorithms as well as knowing data structure is less important comparing with the formal topics of our course (those topics for which the official english text book of our course has detailed chapters). You should avoid inventing the wheel.. and use those available classes and methods you already have… either in Java or in C#. Trying to code sorting on your own isn’t a good practice. “why to complicate life, when you can not complicate your life? :->” – Idan, you are right. Nevertheless, knowing algorithms contribute to your basic capabilities dealing with non-standard cases. In the exercise about Lookup, the ‘ob => ob.EngineVolume’ expression represents a function. You actually pass over a function when calling ToLookup. Passing over a function is your way to tell ToLookup what do you want the Lookup object to be composed of. Please go over the sample in our presentation for this topic and if you encounter anything unclear please let me know and I will add the required notes, that will clarify everything. Good Luck! Haim.
November 30th, 2009 at 4:44 pm
Hi Haim, Thank for the Quick responde
I just Didnt Understand why It was written ‘list.ToLookup(ob => ob.EngineVolume)’
instead for example ‘list.ToLookup(EngineVolume)’ cause its already connected to list
I wanted to make sure if its just the sytex using => and ob=>ob. – cause ob is nothing
and also => doesnt make sence – we used it in delegates, when one line was written…
I can say its just a syntex, but i wanted to understand what realy happan there, maybe its not importanat…
one love!
cricket
November 30th, 2009 at 5:30 pm
Hi Haim, There is A problem With the Memory Management, Pointers Stack
The Pointer Head is moving in the stack Nude, When Calling Push = He get The adress of the Nude Object
and The Pointer Nude Get THe adress of the Object Nude Before Him (The First Nude Next Will be Null)
The problem is with POP!
Head remember The Adress Of the Last Nude stack, But cant get his Value – He write that the value is 0 instead
of 890 like it should be and his pointer next that suppose to get him bavk to the NUde Object Before Him – is also 0 instead of the adrees before…
The printout on the screen if you dont use steps is
Dispose() is Executed
Press any key to continue…
Do you c The problem?
November 30th, 2009 at 5:49 pm
Its Realy Wierd, It suppose to work!!!!!
The head->Value should be 890!!!!, I dont Understand…
November 30th, 2009 at 6:11 pm
The Dispose just free the memory?
Do we realy need it when we use classes? cause when there is no reference to an object
he otomaticly get free? What exacly the Dispose do? When we need to use it?
December 1st, 2009 at 1:02 am
Hi Idan, Please note that ToLookup expects to get a delegate. You can pass over to that method anything that will eventually be translated into a delegate (small reminder: the argument you can pass over should eventually be an object of the specified parmeter type, which is a delegate type… the special lambda syntax is one option). Regarding ‘Dispose()’ please check the slides at http://www.abelski.com/courses/csharp/memory.pdf pages 19-29. If any questions remain please post them her and be specific specifying which pages from that slides each question refers to. I will add notes to the relevant slides with explanations for all questions. The ‘Pointers Stack’ solution works fine on my end. I cannot understand your question. Please debug the code. If questions remain I suggest you show it to me in class during the exercises session. Regarding ‘Methods Binding’ as well as all other reflections related topics please check the slides I placed in my youtube channel about C# Reflections. You will find all explanations. Good Luck! Haim.
December 1st, 2009 at 5:14 am
Yeah, I think I understood!!!!
Instead of writing ‘list.ToLookup(ob => ob.EngineVolume)’
I can also write
list.ToLookup(
delegate(Car ob)
{
return ob.EngineVolume;
}
);
The lambada its just a shortcut…
regarding to the The ‘Pointers Stack’ solution, I understand How it works, I can c it…
If i Go step After Step, When He get to the line in Main ‘stack.Pop()’, The Nude* head remeber the
last adress of the Nude Struct – But head->Value is 0 instead of 890 and head->Next is also 0.0000000 instead of the previus adress of the Nude Sturct, so when it will do ‘stack.Pop()’ Again, it stuck… Dont Know why?
Maybe Ill show you in class
thanks for the responde, one love!
cricket
December 1st, 2009 at 6:37 am
Hi Haim,
I don’t understand how come there could be an object from the Type IEnumerable such as in :
IEnumerable bestStudents (p.25 on LINQ’s slides).
Asfar as I understood, IEnumerable is an Interface, and we can’t make objects from Interfaces.
December 2nd, 2009 at 12:22 am
Idan, The Lambda expression is just a shortcut. Regarding the pointers question please show me in class. Mili, I am about to add explanation to your question in that slide. In addition, please note that you indeed cannot create an object from an interface but you can surely have a reference held within a variable its type is an interface. Methods can return a reference that its type is an interface and the object it refers to is an object that was instantiated from a class that implements the interface. Best, Haim.
December 2nd, 2009 at 1:32 am
Dear Students, The collection of assignments you should complete following our seventh meeting includes few assignments that will take you through topics we haven’t discussed in class. For most of them you will find detailed clips and slides at our web site. Should you encounter with any video clip that isn’t clear please post a comment to that clip. Should you enounter any difficulty during your work at home please don’t hesitate and place a comment for this post. The assignments you should complete towards the next coming meeting include the following:
Basics
Primitive Type Compilation Errors
http://www.abelski.com/moodle/mod/assignment/view.php?id=6900
Strings Compilation Errors
http://www.abelski.com/moodle/mod/assignment/view.php?id=6901
Switch Case Compilation Errors
http://www.abelski.com/moodle/mod/assignment/view.php?id=6902
Main Arguments
http://www.abelski.com/moodle/mod/assignment/view.php?id=6903
Pre Compiler Commands
http://www.abelski.com/moodle/mod/assignment/view.php?id=6904
Language Integrated Query
Diet Group LINQ Query
http://www.abelski.com/moodle/mod/assignment/view.php?id=7040
Diet Group LINQ Wrapping Query
http://www.abelski.com/moodle/mod/assignment/view.php?id=7041
Collections
Diet Group BMI
http://www.abelski.com/moodle/mod/assignment/view.php?id=7039
I have rechecked the solutions I placed for StackPointer, PointerQueue and PointerLinkedList. They work fine on my PC. Please stop putting time on these three assignments. This specific topic is beyond the official material of our course and it isn’t an important topic from a practical perspective.
Nevertheless, I would appreciate if you give it a second try and if it still doesn’t work on your end please try to debug it racking after the memory addresses (pointers) and check whether they unexpectedly change. This specific topic is beyond the common coverage we can find in our textbooks and the MSDN doesn’t provide a clear answer as well… so we will need to
check that on our own. On my end I have started to search for answers (if indeed the code executes differently on your computers comparing with mine).
I have just added a short video clip (in hebrew) you can find at http://www.CSharpBook.co.il, that shows how exactly to use your visual studio to create an XML file based on the comments you embed within your code.
I have just added a short video clip (in english) you can find at http://www.abelski.com showing that when getting a Type object that represents a specific type for which we already have a Type object we shall actually get the same reference we got for the first object. Type won’t be redundantly instantiated.
I have just added a short video clip (in english) you find at http://www.abelski.com explaining the Loopup collection through a simple code sample and a small diagram. The code sample is the solution for the ‘Diet Group’ assignment. Therefore, please make sure you watch this clip after solving the assignment (or… after trying to solve it).
Typos in ‘reflection’ and ‘linq’ slides were fixed. The fixed versions are online.
If interested you can find the basic slides (first version) for the ‘Python Fundamentals’ course I am currently working on. That course is shown at abelski site. The ready to use slides are still ‘beta’.
If interested, next week there is a coming meeting of the AlphaGeeks club… you can find more info at http://www.facebook.com/event.php?eid=225839615870. The meeting is free.
Enjoy,
Haim.
December 6th, 2009 at 12:27 pm
Dear Students, Sorry for my delay with posting the assignments you should complete. In the meantime, please use your time effectively going over the thread topic we are going to cover in our coming meeting. It is one of the most difficult topics in our course (if not the most difficult one). Please pay attention to the detailed video clips (in english) you can find about this topic within our ‘C# Fundamentlas’ online course. Good luck, Haim.
December 8th, 2009 at 7:20 am
On Slide of strings page 44, on digit placeholder # – mising a digit
written //132.232 instead of //1321.232
December 8th, 2009 at 7:22 am
page 45 – same…
December 8th, 2009 at 7:45 am
page 112 – instead of (“m,M”) -> (“d,M”)
December 9th, 2009 at 4:39 am
Sorry, My first massege didnt send…
All mean in the Strings Slides: page 44 instead of ‘//132.232′ -> ‘//1321.232′
page 45 – same problem and page 112…
one love!
cricket
December 14th, 2009 at 7:28 am
What???
No HomeWork This Week?
December 14th, 2009 at 8:38 am
On Thread Slides page 42-43 On The Example…
There Is a Loop of Write Banna Function (i<800)
The Main Thread is a Foreground Thread, t1 and t2 are backround Threads
Does t1 Thread will not be alive and doing the loop until i<800 because The main Thread Are finish and his the only one that are foreground?
Because Of That He will get to the stage when i = 17?
December 14th, 2009 at 10:54 am
Question about the “Hou, Miao” Thread pool assignement:
Why it doesn’t work if we don’t use the “Comsole.ReadLine” command? (It only print the words ones).
Also, why we must use (Thread.Sleep) ?? Otherwise it prints out the second word only onec.
Thnx.
December 14th, 2009 at 10:59 am
Never mind – I got it.
December 15th, 2009 at 7:08 am
Thanks Mili, I didnt notice that there was Assinment on the other web…
December 15th, 2009 at 7:49 am
On The Random Numbers Asynchronous Thread Soulotion
On the function ‘public static int[] GenerateUniqueNumbers(int num)’
instead of writing ‘int[] numbers = new int[100];’ need to write ->’int[] numbers = new int[num];’
one love!
cricket
December 15th, 2009 at 9:57 am
Ok I understood The Foreground/backround Threads…
December 15th, 2009 at 9:49 pm
Dear Students, Following our eighth meeting please note that you can find all my dedicated video clips regarding the ‘Threads’ topic online at http://www.lifemichael.com/en/?p=722. Please don’t hesitate and post comments with any quetions you have on your end about the topics we cover. Towards the next coming meeting please complete the following assignments:
Threads
Simple Banana Orange Threads
http://www.abelski.com/moodle/mod/assignment/view.php?id=7050
Generate Unique Random Numbers Join
http://www.abelski.com/moodle/mod/assignment/view.php?id=7051
Hou Hou Miau Miau Threads Pool
http://www.abelski.com/moodle/mod/assignment/view.php?id=7052
Hou Miou Background Thread
http://www.abelski.com/moodle/mod/assignment/view.php?id=7053
Random Numbers Asynchronous Thread
http://www.abelski.com/moodle/mod/assignment/view.php?id=7054
Protected Stack Lock
http://www.abelski.com/moodle/mod/assignment/view.php?id=7055
Protected Stack Monitor
http://www.abelski.com/moodle/mod/assignment/view.php?id=7056
Matrix Join Assignment
http://www.abelski.com/moodle/mod/assignment/view.php?id=7340
Array Sum of Numbers
http://www.abelski.com/moodle/mod/assignment/view.php?id=7341
Language Integrated Query
Simple SQL Linq
http://www.abelski.com/moodle/mod/assignment/view.php?id=7342
For explanation for how to create a new thread that its main method isn’t a static one please check the notes I added to slide num.4 in the ‘Threads’ presentation.
Good Luck!
Haim.
December 15th, 2009 at 9:56 pm
Please note that my small tiny lap top.. the one on which I wrote the remarks and the small questions during the eighth meeting… that tiny small cute Lenovo… was broken. That tiny lap top also had the new assignments I planned to give you following the eighth meeting. So far, the service I get from Lenovo (Israel) is not good. This is the reason for the late post of my pink comment with the assignments you need to complete in between the eight and the ninth meeting. Please consider the assignments in this delayed pink comment as assignment you should complete towards the tenth meeting. I will add few more in a separated pink comment I will prepare in between the ninth and the tenth meetings. If there is any open question from the eighth meeting for which I haven’t placed a reply in my pink comment for the eighth meeting please add a comment accordingly.
December 15th, 2009 at 10:04 pm
Cricket, Thanks for all corrections. I have just completed introducing them all. About comment #69 I don’t understand on what base did you reach the conclusion of (i = 17)? Best, Haim.
December 15th, 2009 at 10:10 pm
I recommend you to take a look at http://www.scala-lang.org. Seems highly promising. It is an open source ‘functional programming’ language that combines the good from Java and C#. In addition, you can integrate code written in Scala as if it was part of a program developed in Java… or in C#. The scala code will be compiled into Java Byte Code (when integrating with Java) and it will be compiled into CLR code (when integrating with C#). You can find my Jump Start guide at http://www.lifemichael.com/en/?p=807. I also recommend you to take a look at Lift (an open source web development framework based on Scala) browsing at http://liftweb.net/. Best, Haim.
December 16th, 2009 at 2:42 am
Dear Students, Regarding the question in class about new implicitly created threads please note that such threads are foreground (by default). Please check the Threads slides p40 for more details as well as the short new video clip at http://bit.ly/70N7YH. Regarding the question raised in class about the two arguments the Semaphore constructor has please check Threads slides p76-p81 as well as the short video clip at http://bit.ly/6NijU7. Regarding the unclear outcome we got when looking for the multi threading in System.Threading.Timer please check the video clip at http://bit.ly/4x8liH. It shows that underneath we indeed enjoy a pool of threads. Nevertheless, having a pool of threads underneath doesn’t necessary mean that each execution will be in a different thread. Following our ninth meeting and towards the next coming meeting please complete the following assignments. Please note that most of these assignments already have solutions. Those that don’t have solutions are the relatively simpler ones. Some of the assignments refer to topics we still haven’t covered in Threads. Topics we will cover in our next meeting. I recommend trying to solve them as well… and if you encounter with difficulties choose to wait for our comming meeting. Please don’t forget about the assignments that were officially given following the previous meeting.
Threads
Anonymous Method Technique
http://www.abelski.com/moodle/mod/assignment/view.php?id=7343
Asynchronous Delegate Matrix
http://www.abelski.com/moodle/mod/assignment/view.php?id=7344
Safe Stack Lock Implementation
http://www.abelski.com/moodle/mod/assignment/view.php?id=7345
Safe Stack Monitor Implementation
http://www.abelski.com/moodle/mod/assignment/view.php?id=7346
Qua Qua Semaphore
http://www.abelski.com/moodle/mod/assignment/view.php?id=7347
Safe Thread Termination
http://www.abelski.com/moodle/mod/assignment/view.php?id=7348
Cashier Threads
http://www.abelski.com/moodle/mod/assignment/view.php?id=7349
Background Numbers Worker
http://www.abelski.com/moodle/mod/assignment/view.php?id=7350
Interlock Sum of Numbers
http://www.abelski.com/moodle/mod/assignment/view.php?id=7351
Magic Number Threads
http://www.abelski.com/moodle/mod/assignment/view.php?id=7352
Good Luck!
Haim.
December 16th, 2009 at 5:26 am
Please check my detailed post about thread in C# at http://www.lifemichael.com/en/?p=722. It includes all clips I created about this topic. If you encounter any unclear explanation or have any questions regarding those clips please place them as a comment within the youtube platform and I will get back to you with additional explanations within the clip itself. Best, Haim.
December 17th, 2009 at 9:16 am
חיים שלום !
תרגיל בית PROTECTED STACK LOCK – תוכל בבקשה לצרף את הפיתרון על מנת שאוכל לבדוק את עצמי
תודה
אלה ירום
December 17th, 2009 at 10:12 am
הי שוב,
בתרגיך ARRAY SUM OF NUMBERS האם הכוונה להפוך את המטודה MultiplyValues לסטטית ולהפעיל אותה ב THREAD?
December 17th, 2009 at 10:55 am
In ArraySumOfNumbers you need to keep the method as it. This is the point of this assignment. Getting you through the option to have a thread based on instance method. Regarding the Protected Stack Lock it is the same exercise we did in class.. the sample I explained on board. Please let me know if you manage to use the solution from class or not.
December 17th, 2009 at 1:34 pm
Hi All, Please do your best trying to understand as much as possible the remaining topics in Threads. Best, Haim.
December 19th, 2009 at 9:58 pm
Dear Students, Regarding the problematic solutions for the pointers related assignments, those that ran OK on my PC and didn’t run OK on yours please take a look at the new updated solution for ‘Pointers Queue’ assignment and let me know if this one runs OK on your PC. On mine it runs OK. If so I will explain the mystery in our next coming meeting. Best, Haim.
December 24th, 2009 at 4:16 am
Dear Students, Please note the clip I prepared (in english) that explains how to work with the StreamWriter class. You can find that clip at http://www.youtube.com/watch?v=XAIN1xnkYkw. If you enjoyed that clips please don’t forget to add your comments and/or give it stars. If any question arise please don’t forget to place a comment to that clip and I will add the required annotation. Please let me know of any other topic in I/O for which you would like to get a clip and I will create one. Next meeting will be dedicated for networking. Please make sure to watch the relevant clips I have prepared for that topic. You can find them all at http://www.lifemichael.com/en/?p=727. If you enjoyed these clips please don’t forget to add your comments and/or give them stars. If any question arise please don’t forget to place a comment and I will add the required annotation. Following the last (10th) meeting please complete the following assignments. Please let me know if you would like to get more assignments and I will create new ones accordingly.
Threads
Local Storage Threads
http://www.abelski.com/moodle/mod/assignment/view.php?id=7434
Buckets of Balls
http://www.abelski.com/moodle/mod/assignment/view.php?id=7435
Files I/O
Backward Copy
http://www.abelski.com/moodle/mod/assignment/view.php?id=7432
Files Names
http://www.abelski.com/moodle/mod/assignment/view.php?id=7433
HTML StreamWriter
http://www.abelski.com/moodle/mod/assignment/view.php?id=7436
December 24th, 2009 at 4:38 am
I have just introduced few small improvements to the Threads slides. The new version is online.
December 25th, 2009 at 3:16 pm
Remember the game I told you about… the one that exceptions were thrown following the unexpected upgrade of the phone’s software… You can find few screenshots of that game at http://www.lifemichael.com/en/?p=1027. The lesson, sometimes there is a place to catch all exceptions of all types on top of the functions stack.
December 31st, 2009 at 5:16 am
Dear Friends, Following our last meeting I have searched for a clear explanation about the differences between the URI, URL and URN terms. The most reliable source that explains these three terms can be found at http://www.w3.org/TR/uri-clarification/. Nevertheless, I doubt if reading it will make things clearer. Understanding the explanation in that document required the understanding of many other terms far beyond the scope we reach in our course. In addition, you should note that this specification was created nearly ten years ago and at that time the expectations were to have the three terms to evolve separately. The outcome wasn’t as expected… and today most people don’t even know about the existence of URN and usually mix between the URI and the URL terms. I reommend on using the URI term. This is the more general one. Using URI avoiding the other two terms will keep you accurate in your work. Please note that networking.pdf slides were just updated. Typos were fixed. I strongly recommend you to ensure that you are using the new slides. Towards the next meeting please complete the following assignments:
Networking
C Sharp Sides
http://www.abelski.com/moodle/mod/assignment/view.php?id=7527
BMI Calculation
http://www.abelski.com/moodle/mod/assignment/view.php?id=7528
Online Checker
http://www.abelski.com/moodle/mod/assignment/view.php?id=7529
BMI Calculation Query String
http://www.abelski.com/moodle/mod/assignment/view.php?id=7530
Multiplication Form Submission
http://www.abelski.com/moodle/mod/assignment/view.php?id=7531
Google Cookies
http://www.abelski.com/moodle/mod/assignment/view.php?id=7532
Classroom Tweets
http://www.abelski.com/moodle/mod/assignment/view.php?id=7533
Finding IP
http://www.abelski.com/moodle/mod/assignment/view.php?id=7534
Mail Client
http://www.abelski.com/moodle/mod/assignment/view.php?id=7535
Simple Client Server
http://www.abelski.com/moodle/mod/assignment/view.php?id=7537
Good Luck!
Haim.
December 31st, 2009 at 5:19 am
Please check my detailed post about C# Networking Capabilities at
http://www.lifemichael.com/en/?p=727. You will find there video clips that explain each and every one of the classes we explained in class. Should you encounter any clip that isn’t clear and/or should you have any question refrerring the explanation in those clips please post a comment specifically to the relevant clip via the youtube platform. I will get back. Good Luck! Haim.
December 31st, 2009 at 7:28 am
Please note that for most of the networking related assignments I haven’t placed solutions. Should you encounter an assignments in this topic that you find difficult and cannot solve please let me know. I will add the relevant solutions. Best, Haim.
January 1st, 2010 at 10:45 am
How to use different languages on cmd ?
For example, printing out all files of a specific Folder when some of them are in Hebrew (or other language).
Thnx,
Milly.
January 1st, 2010 at 12:37 pm
Hi Milly, Prining out in the command line texts other than english might be problematic… your operation system should be capable of showing hebrew in the command line… is it? Please try to type in hebrew in your command line… see if it works… in any case, I assume it should work OK when printing out the texts in a GUI… Please let me know how did it go… Best, Haim.
January 1st, 2010 at 12:38 pm
If you are interested in developing for the android platform please join the group I have just started at http://www.facebook.com/group.php?gid=224781113801. Best, Haim.
January 3rd, 2010 at 4:33 pm
Hi Haim’
Do you plan to put Solutions to Networking and IO chapters?
January 4th, 2010 at 8:14 am
Hi Haim,
I can’t type Hebrew letters in the command line.
January 4th, 2010 at 10:24 am
Hi Haim,
Can you please post a solution to “BMI Calculator”, I don’t understand how to send the parameters to the php page.
Thanx.
January 5th, 2010 at 10:06 pm
Hi All, Regarding the solutions for the networking and the IO chapters I will place solutions for those assignments your found difficult. The assignments you received are very similar to the samples we saw in class. Therefore, if there is an assignment for which you want a solution please let me know. Regarding hebrew letters in the command line… unless your windows installation allows that in general it isn’t possible. Hi Milly, Regarding BMI Calculator solution, you told me you already received it. If you still need it please let me know. Best, Haim.
January 5th, 2010 at 10:08 pm
Please check the slides I places on line for the ‘C# Design Patterns’ course. They include C# code samples for each one of the patterns. Another important resource I have just completed to develop are the slides for the ‘Design Principles’ new course I have just added to the ‘Software Engineering’ category. Enjoy, Haim.
January 6th, 2010 at 2:40 am
Dear Friends, Following the 12th meeting through which we covered the Serialization and the Asynchronous Methods topics I have just prepared a collection of few assignments. Most of them are very similar to the code samples the slides include. For that reason, for most of them I haven’t placed solutions. Should you encounter an assignment for which you feel a solution is needed please let me know and I will prepare one. Please complete the following assignments.
Serialization
Student Serialization
http://www.abelski.com/moodle/mod/assignment/view.php?id=7651
Classroom Serialization
http://www.abelski.com/moodle/mod/assignment/view.php?id=7652
Employee Serialization
http://www.abelski.com/moodle/mod/assignment/view.php?id=7653
Regular Expressions
Email Verification
http://www.abelski.com/moodle/mod/assignment/view.php?id=7654
Phone Number Verification
http://www.abelski.com/moodle/mod/assignment/view.php?id=7655
Good Luck!
Haim.
January 7th, 2010 at 12:28 am
Dear Students, Following our last meeting and the questions that were raised please find the following clarifications: (1) I searched for convention we should follow when choosing the extension for our serialized object file and couldn’t find any. Nevertheless, I recommend to avoid extensions that might imply the wrong impressions (e.g. in the case of a binary file using .txt will confuse us all thinking it is a simple textual file, using .xml will confuse us all thinking it is an xml file). (2) Regarding the OptionalField attribute and assuming the serialized data doesn’t include its value, that marked field will get the default value in accordance with its type. Constructors aren’t relevant in this case. They are ignored. (3) The MatchCollection instantiation is explained in rgx.pdf page 22. (4) The available single letters subsitutues for using the RegexOptions enum values are listed in your book seciton 24.1 table 24-1. (5) The bvailable categories when using \p are listed in your book as well. (6) The ‘#’ special character is used for placing comments within our regular expressin in the following syntax: (?#comment). In ddition, I also introduced all fixings for all typos in the slides we used in class. The fixed slides are online. Good Luck, Haim.