Phew, this lesson took me lots of time to complete. Not because it was hard stuff to learn, but 'cause it was rather boring.
The lessons covered System.IO classes, more specifically Streams. FileStreams, StreamReaders and Writers, MemoryStreams, etc.
Being an active .NET developer for many years now, this lesson had little news under the sun.
Speaking about the sun, studying a lesson without learning too many new features while outside the temperature went above 30° was not really motivating :s
Nevertheless, the lesson spoke about MemoryStream. These babies allow you to build in-memory streams to boost performance and limit the risk of file locks. The BufferedStream was very similar to the MemoryStream.
So, not much news to report I'm afraid. Next lessons will be about Compressing Streams. Rather new to me, so should be more fun to go through.
Sweat, sweat, sweat... ;-)
Thursday, July 31, 2008
Thursday, July 24, 2008
Chapter 2, Lesson 1
Hi there
Chapter 2 is all about I/O, one of the most popular topics amung developers, cause we deal with I/O operations all the time.
A developer who says that he never has to access filesystem, needs to get his facts strait ;-)
The first lesson describes the basics about I/O. FileSystemInfo object, FileInfo, DirectoryInfo and DriveInfo all came to pass. Pretty easy.
Then the Path class was discussed. This is a very handy thing. Every question you may have related to a file system path is in this class. Really worth looking into.
Finally the FileSystemWatcher class was illustrated. This nifty thing makes it possible to monitor a filesystem for changes (like new files/directories, deletes, renames and changes). But watch out, too many changes may cause the watcher to throw an excetion !
Next lesson I will be reading and writing to files. Like I havn't done that before, LOL ;-)
See ya
Chapter 2 is all about I/O, one of the most popular topics amung developers, cause we deal with I/O operations all the time.
A developer who says that he never has to access filesystem, needs to get his facts strait ;-)
The first lesson describes the basics about I/O. FileSystemInfo object, FileInfo, DirectoryInfo and DriveInfo all came to pass. Pretty easy.
Then the Path class was discussed. This is a very handy thing. Every question you may have related to a file system path is in this class. Really worth looking into.
Finally the FileSystemWatcher class was illustrated. This nifty thing makes it possible to monitor a filesystem for changes (like new files/directories, deletes, renames and changes). But watch out, too many changes may cause the watcher to throw an excetion !
Next lesson I will be reading and writing to files. Like I havn't done that before, LOL ;-)
See ya
Saturday, July 19, 2008
Chapter 1, Lesson 4
Hi .NET fans
Today I convered the lesson on Converting Between types.
It was a rather short lesson, so there won't be much to tell.
The lesson covered implicit and explicit converion rules and possibilities.
It also addressed best practices to avoid unnecessary boxing and unboxing which was quite cool.
To elaborate, when you do this: int i = 1; Object o; o = (object) i; you are converting a value type to a reference type, which is boxing. Unboxing is the opposite.
This technique involves overhead and should be avoided whenever possible.
So, this was the last lesson of the 1st chapter. Next time, I'll do the chapter review and the chapter case.
Fortunately for me it's raining cats and dogs, so I won't be demotivated by the sun shining outside. ;-)
Stay tuned...
Today I convered the lesson on Converting Between types.
It was a rather short lesson, so there won't be much to tell.
The lesson covered implicit and explicit converion rules and possibilities.
It also addressed best practices to avoid unnecessary boxing and unboxing which was quite cool.
To elaborate, when you do this: int i = 1; Object o; o = (object) i; you are converting a value type to a reference type, which is boxing. Unboxing is the opposite.
This technique involves overhead and should be avoided whenever possible.
So, this was the last lesson of the 1st chapter. Next time, I'll do the chapter review and the chapter case.
Fortunately for me it's raining cats and dogs, so I won't be demotivated by the sun shining outside. ;-)
Stay tuned...
Thursday, July 17, 2008
Chapter 1, Lesson 3
Hi all, today I stumbled through the third lesson of the training kit and this one was about Constructing Classes.
Phew, I thought, this will be a walk in the park. After all, I have been constructing classes for years. Was I wrong...
First topic: Inheritance. Ok, nothing fancy new here, but always good to brush up that know-how.
Secondly: Interfaces. Still doable. Interfaces are cool to work with. Especially when you can define your own, like I recently did for a project at work. No wonder this topic contained little news for me.
Up next: Partial Classes. Nice to know that you can now split code over multiple source files. It surely cleaned up that Windows Form code behind file ;-)
And then, oh yess: Generics. One of the biggies for the exam, at least according to the kit. This lesson is contributed for the biggest part to Generics, so there must be some thruth in that statement.
Although Generics are still quite abstract in my mind, Generics are all about boosting performance and reducing runtime errors. Can't be bad.
Instead of turning to the Object base type for flexibility, you can now let the consuming code of your class determine the Type.
Personal memo for the exam: Nullable is a Generic Type !
The 4th topic was about Events and using Delegates as EventHandlers, while the 5th and 6th topic talked about Attributes and Type Forwarding.
This last thing was quite new to me. It allows you to move a custom type from one source library to another without requiring client application consuming the first one (the one with the type) to be recompiled. Sort of like a 'I have moved to a new address' note for types. Cool stuff ;-)
To conclude: While doing the labs, I noticed that when you develop on Vista using VS 2008, you get all the benefits of the Aero directly in the Windows Forms. This includes the transparent look and the cool progressbar animations.
Next lesson will teach me everything there is to know about Converting Between Types. Feels like I'm back at collage :D
Stay in touch for more MCTS fun...
Phew, I thought, this will be a walk in the park. After all, I have been constructing classes for years. Was I wrong...
First topic: Inheritance. Ok, nothing fancy new here, but always good to brush up that know-how.
Secondly: Interfaces. Still doable. Interfaces are cool to work with. Especially when you can define your own, like I recently did for a project at work. No wonder this topic contained little news for me.
Up next: Partial Classes. Nice to know that you can now split code over multiple source files. It surely cleaned up that Windows Form code behind file ;-)
And then, oh yess: Generics. One of the biggies for the exam, at least according to the kit. This lesson is contributed for the biggest part to Generics, so there must be some thruth in that statement.
Although Generics are still quite abstract in my mind, Generics are all about boosting performance and reducing runtime errors. Can't be bad.
Instead of turning to the Object base type for flexibility, you can now let the consuming code of your class determine the Type.
Personal memo for the exam: Nullable is a Generic Type !
The 4th topic was about Events and using Delegates as EventHandlers, while the 5th and 6th topic talked about Attributes and Type Forwarding.
This last thing was quite new to me. It allows you to move a custom type from one source library to another without requiring client application consuming the first one (the one with the type) to be recompiled. Sort of like a 'I have moved to a new address' note for types. Cool stuff ;-)
To conclude: While doing the labs, I noticed that when you develop on Vista using VS 2008, you get all the benefits of the Aero directly in the Windows Forms. This includes the transparent look and the cool progressbar animations.
Next lesson will teach me everything there is to know about Converting Between Types. Feels like I'm back at collage :D
Stay in touch for more MCTS fun...
Labels:
Attributes,
Classes,
Delegates,
Events,
Generics,
Inheritance,
Interfaces,
Partial Classes,
Type Forwarding
Monday, July 14, 2008
Chapter 1, Lesson 2
Hi All
Today I learned about the wonderful Reference Types. Hip Hip Huraay ;-)
Good to remember is that Reference Types contain pointers to data stored on the Heap, where Value Types contain their data directly stored on the Stack.
Reference Types are cleaned up by the Garbage Collection, so everything you put in them is by definition garbage ??? Just kidding.
This lesson gave me some good practices and will probably be and eye-opener for many developers when the String and StringBuilder topic is adressed.
After today, I will NEVER concatenate strings again, without using the StringBuider.
We all did (or do) something like this at least ones in our development carreer:
dim a as String = "This "
dim b as String = a & "Is "
dim c as String = b & "a "
dim d as String = c & "test!"
What you most likely didn't know is that the runtime creates 4 variables of String on the Heap and only keeps a reference to the last one. The other 3 have to be cleaned up by, oh yess, the Garbage Collection.
Imagine the performance cost when you concatenate words that span over many lines into a single string. Gulp!
Hail to the StringBuilder class.
In addition to this usefull info, some basic must-knows came across in this lesson. Like Exceptions and Arrays.
Next lesson is all about Creating Classes. Can't wait for that one ;-)
Dim sb as New StringBuilder()
sb.Append("Be")
sb.Append(" seeing")
sb.Append(" ya !")
MessageBox.Show(sb.ToString())
Today I learned about the wonderful Reference Types. Hip Hip Huraay ;-)
Good to remember is that Reference Types contain pointers to data stored on the Heap, where Value Types contain their data directly stored on the Stack.
Reference Types are cleaned up by the Garbage Collection, so everything you put in them is by definition garbage ??? Just kidding.
This lesson gave me some good practices and will probably be and eye-opener for many developers when the String and StringBuilder topic is adressed.
After today, I will NEVER concatenate strings again, without using the StringBuider.
We all did (or do) something like this at least ones in our development carreer:
dim a as String = "This "
dim b as String = a & "Is "
dim c as String = b & "a "
dim d as String = c & "test!"
What you most likely didn't know is that the runtime creates 4 variables of String on the Heap and only keeps a reference to the last one. The other 3 have to be cleaned up by, oh yess, the Garbage Collection.
Imagine the performance cost when you concatenate words that span over many lines into a single string. Gulp!
Hail to the StringBuilder class.
In addition to this usefull info, some basic must-knows came across in this lesson. Like Exceptions and Arrays.
Next lesson is all about Creating Classes. Can't wait for that one ;-)
Dim sb as New StringBuilder()
sb.Append("Be")
sb.Append(" seeing")
sb.Append(" ya !")
MessageBox.Show(sb.ToString())
Sunday, July 13, 2008
Chapter 1, Lesson 1
Hi there.
Today I kicked of the self-paced kit '.NET Framework 2.0 Application Development Foundation'.
Did lesson of the first chapter and learned about Value Types.
Dugh, like I never heard of those before.
Nevertheless, I learned about the wonderfull Nullable keyword. This fantastic addition to 2.0 allows you to declare a variable with the capability or storing Nothing values. Extremely handy for Booleans.
A slightly unusual syntax, but still doable:
Today I kicked of the self-paced kit '.NET Framework 2.0 Application Development Foundation'.
Did lesson of the first chapter and learned about Value Types.
Dugh, like I never heard of those before.
Nevertheless, I learned about the wonderfull Nullable keyword. This fantastic addition to 2.0 allows you to declare a variable with the capability or storing Nothing values. Extremely handy for Booleans.
A slightly unusual syntax, but still doable:
- dim b as Nullable(Of Boolean) = Nothing
When declaring your var like this, members such as HasValue and Value become available.
Super start. First lesson and already learned a usefull new thing. Can't wait for the next lesson about Common Reference Type.
Be seeing ya...
Subscribe to:
Posts (Atom)
