You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One thing that have irritated me with the code coverage tool in
15
-
Visual Studio 2005-8 is that you can't exclude things from the code
16
-
coverage result.
14
+
One thing that have irritated me with the code coverage tool in Visual Studio 2005-8 is that you can't exclude things from the code coverage result.
17
15
18
-
For example - in VB.NET the MySettings-class is generated for each
19
-
assembly that is created. The code in it is automatically generated and
20
-
you shouldn't change it (it even says so in a comment from the tool...).
21
-
However it is counted when the code coverage result is calculated.
16
+
For example - in VB.NET the MySettings-class is generated for each assembly that is created. The code in it is automatically generated and you shouldn't change it (it even says so in a comment from the tool...). However it is counted when the code coverage result is calculated.
22
17
23
18
The same thing applies for proxy-classes to web services for example.
24
19
25
-
This gives an incorrect picture on how much of *your* code that is
26
-
tested. But now I've found an attribute that might help:
20
+
This gives an incorrect picture on how much of *your* code that is tested. But now I've found an attribute that might help:
27
21
28
-
<debuggernonusercode()>
22
+
```xml
23
+
<debuggerNonUserCode()>
24
+
```
29
25
30
-
This attribute tells the compiler that the code that is decorated with
31
-
the attribute is not written by the user and should not be step into
32
-
during debugging sessions. So when the testing tool encounters the
33
-
attribute it will simply not "count" the rows with the attribute.
26
+
This attribute tells the compiler that the code that is decorated with the attribute is not written by the user and should not be step into during debugging sessions. So when the testing tool encounters the attribute it will simply not "count" the rows with the attribute.
34
27
35
-
Works like a charm. Watch out though - since the attribute applies for
36
-
debugging also you will not be able to step into the code. For the
37
-
examples I've counted (MySetting and proxy classes) that is normally not
38
-
a problem, but if you need to you might want to reconsider.
28
+
Works like a charm. Watch out though - since the attribute applies for debugging also you will not be able to step into the code. For the examples I've counted (MySetting and proxy classes) that is normally not a problem, but if you need to you might want to reconsider.
It's that great time of the year when the best brass band competition in
14
-
world takes place - the European Brass Band Championships. Historically
15
-
this is where the best bands plays at the very highest level. This year
16
-
the event takes place in Norway, in Stavanger.
17
-
18
-
We Swedes are of course strengthen by the win of
19
-
[WindCorp](http://www.windcorpbrassband.se/) in
20
-
[Grenland](http://www.4barsrest.com/news/detail.asp?id=7708), which from
21
-
what I understand was a great display from the band. We've come to
22
-
expect nothing less from that great band.
23
-
24
-
The Swedish band competing in Stavanger is [Stockholm Brass
25
-
Band](http://www.stockholmbrass.se/). I wish them all the best and
26
-
really hope that they can impress the judges - they sure have all the
27
-
potential to do so. I'll be keeping my thumbs crossed all weekend.
28
-
29
-
So how will it all go down? The test piece is quite modern and not very
30
-
"brass bandy". So that will probably promote that type of bands (like
31
-
Stockholm and Oberoesterreich Brass Band). Of course that all comes down
32
-
to what the judges is listening for. But from what I understand the
33
-
judges also are not brass band people.
34
-
35
-
The own choice is another story - here the standard brass band
36
-
pyrotechnics will be promoted and hence the original brass band sound
37
-
(like Cory and Willebroek) could very well go to the top.
13
+
It's that great time of the year when the best brass band competition in world takes place - the European Brass Band Championships. Historically this is where the best bands plays at the very highest level. This year the event takes place in Norway, in Stavanger.
14
+
15
+
We Swedes are of course strengthen by the win of [WindCorp](http://www.windcorpbrassband.se/) in [Grenland](http://www.4barsrest.com/news/detail.asp?id=7708), which from what I understand was a great display from the band. We've come to expect nothing less from that great band.
16
+
17
+
The Swedish band competing in Stavanger is [Stockholm Brass Band](http://www.stockholmbrass.se/). I wish them all the best and really hope that they can impress the judges - they sure have all the potential to do so. I'll be keeping my thumbs crossed all weekend.
18
+
19
+
So how will it all go down? The test piece is quite modern and not very "brass bandy". So that will probably promote that type of bands (like Stockholm and Oberoesterreich Brass Band). Of course that all comes down to what the judges is listening for. But from what I understand the judges also are not brass band people.
20
+
21
+
The own choice is another story - here the standard brass band pyrotechnics will be promoted and hence the original brass band sound (like Cory and Willebroek) could very well go to the top.
38
22
39
23
So all in all its about balancing the two styles. So here is my guess:
40
24
@@ -44,6 +28,4 @@ So all in all its about balancing the two styles. So here is my guess:
44
28
4.[Cory](http://www.buyasyouviewcoryband.co.uk/)
45
29
5.[Stockholm](http://www.stockholmbrass.se/)
46
30
47
-
Being a bit patriotic for the last thing I still think it is a
48
-
possibility. I wish all the bands good luck (as if the all read this :))
49
-
but most of all Stockholm Brass Band.
31
+
Being a bit patriotic for the last thing I still think it is a possibility. I wish all the bands good luck (as if the all read this :)) but most of all Stockholm Brass Band.
The European is now to an end and some shocking results was
14
-
delivered.... Here is the [complete
15
-
results](http://www.4barsrest.com/news/detail.asp?id=7753), where you
16
-
can note that the Oberoesterreich Brass Band were placed 10/11 which is
17
-
really strange since they got some raving reviews.
13
+
The European is now to an end and some shocking results was delivered.... Here is the [complete results](http://www.4barsrest.com/news/detail.asp?id=7753), where you can note that the Oberoesterreich Brass Band were placed 10/11 which is really strange since they got some raving reviews.
18
14
19
-
For our [Swedish contender](http://www.stockholmbrass.se/) things didn't
20
-
work out to well. I think that the approach to a competition is shown
21
-
very clear with the results. For band - with a lot of amateurs, like
[Willebroek](http://www.brassbandwillebroek.be/) - it's life and death
25
-
stuff. For bands with mostly pros things aren't as serious. And then you
26
-
don't win any competitions against the other group. A 9 place for
27
-
Stockholm Brass Band may have been a correct adjudication.
15
+
For our [Swedish contender](http://www.stockholmbrass.se/) things didn't work out to well. I think that the approach to a competition is shown very clear with the results. For band - with a lot of amateurs, like [Stavanger](http://www.stavanger-brassband.no/english/index.htm), [Cory](http://www.buyasyouviewcoryband.co.uk/) or [Willebroek](http://www.brassbandwillebroek.be/) - it's life and death stuff. For bands with mostly pros things aren't as serious. And then you don't win any competitions against the other group. A 9 place for Stockholm Brass Band may have been a correct adjudication.
had the right three top bands, but not in the right order. I am not a
32
-
big fan of [Cory](http://www.buyasyouviewcoryband.co.uk/) but apparently
33
-
they kicked some serious butt in both events. Well done and well
34
-
deserved then.
17
+
And for me things went quite well. [My predictions](https://www.marcusoft.net/2008/04/2008-european-championships-my.html) had the right three top bands, but not in the right order. I am not a big fan of [Cory](http://www.buyasyouviewcoryband.co.uk/) but apparently they kicked some serious butt in both events. Well done and well deserved then.
35
18
36
-
I always hope for the Norwegians to do well since I have a lot of
I always hope for the Norwegians to do well since I have a lot of friends there. Not this time (either?) for [Stavanger](http://www.stavanger-brassband.no/english/index.htm). Well, there is always next year.
The last couple of days (well actually for my parts it's more like
15
-
months or years) we have been discussion the management of dynamic
16
-
controls in ASP.NET pages. In my experience this is a very common
17
-
scenario and I haven't still found a great way to handling it.
14
+
The last couple of days (well actually for my parts it's more like months or years) we have been discussion the management of dynamic controls in ASP.NET pages. In my experience this is a very common scenario and I haven't still found a great way to handling it.
18
15
19
-
To explain better I'll just a very simple fictive scenario; imagine that
20
-
a page has a button "Create new control". Next to the button is a
21
-
textbox in which you can type the typename of the control to create
22
-
(CheckBox, TextBox etc.). When you click the button the control, of the
23
-
right type, is created.
16
+
To explain better I'll just a very simple fictive scenario; imagine that a page has a button "Create new control". Next to the button is a textbox in which you can type the typename of the control to create (CheckBox, TextBox etc.). When you click the button the control, of the right type, is created.
24
17
25
-
Now for the "hard" part. Below the created control is another button
26
-
"What was entered?". When that button is clicked the code should, of
27
-
course, read the content of the dynamically created control and print
28
-
the value that was entered.
18
+
Now for the "hard" part. Below the created control is another button "What was entered?". When that button is clicked the code should, of course, read the content of the dynamically created control and print the value that was entered.
29
19
30
-
Pretty simple, eh? Well it's not so simple as it first seems... Not for
31
-
me anyway. And I still haven't seen a great solution to this problem.
20
+
Pretty simple, eh? Well it's not so simple as it first seems... Not for me anyway. And I still haven't seen a great solution to this problem.
32
21
33
-
The problem has to do with that the controls have to be recreated on the
34
-
page before they are read in the code-behind of the "What was
35
-
entered?"-button. In this [great
36
-
article](http://aspnet.4guysfromrolla.com/articles/092904-1.aspx) Scott
37
-
Mitchell tells us that the best place to do so is in the
38
-
Page_Init-event. This event is fired really early in the page lifecycle,
39
-
before Page_Load and all the click-events.
22
+
The problem has to do with that the controls have to be recreated on the page before they are read in the code-behind of the "What was entered?"-button. In this [great article](http://aspnet.4guysfromrolla.com/articles/092904-1.aspx) Scott Mitchell tells us that the best place to do so is in the Page_Init-event. This event is fired really early in the page lifecycle, before Page_Load and all the click-events.
40
23
41
-
It might be that the article is based upon a old framework, but in [this
42
-
article](http://msdn.microsoft.com/en-us/library/ms178472.aspx) from
43
-
Microsoft the Page_PreInit (fired even earlier) is suggested as the best
44
-
place to re-create dynamic controls.
24
+
It might be that the article is based upon a old framework, but in [this article](http://msdn.microsoft.com/en-us/library/ms178472.aspx) from Microsoft the Page_PreInit (fired even earlier) is suggested as the best place to re-create dynamic controls.
45
25
46
-
I found myself thinking; "Hey it's all the same to me - I can't create
47
-
the controls until I am in the button-click-event since that's when I
48
-
know the data (the controltype the user entered) that the GUI-creation
49
-
is based on can be access.".
26
+
I found myself thinking; "Hey it's all the same to me - I can't create the controls until I am in the button-click-event since that's when I know the data (the control type the user entered) that the GUI-creation is based on can be access.".
50
27
51
-
This is the dilemma that I so often found myself or team-mates in. The
52
-
question "But they doesn't exists yet" has been uttered more times than
53
-
I care to think about.
28
+
This is the dilemma that I so often found myself or team-mates in. The question "But they doesn't exists yet" has been uttered more times than I care to think about.
54
29
55
-
The solution we came up with ([Jens Andersson](http://www.shmup.net/)
56
-
actually) is to store the data that the GUI is based on in
57
-
state-variable - Session, Hidden field or something else. Then you can
58
-
re-create the GUI in those early stages (PreInit, Init or Load - doesn't
59
-
seem to matter for this simple case) based on the data stored in the
60
-
state.
30
+
The solution we came up with ([Jens Andersson](http://www.shmup.net/) actually) is to store the data that the GUI is based on in state-variable - Session, Hidden field or something else. Then you can re-create the GUI in those early stages (PreInit, Init or Load - doesn't seem to matter for this simple case) based on the data stored in the state.
61
31
62
-
For me the big aha-experience was that the GUI only needs to be
63
-
RE-created. That is when the GUI first is created, in the "Create new
64
-
control"-click event you set the data, the GUI is based on, in session.
65
-
On all subsequent postbacks the dynamic GUI can be RE-created in the
66
-
early stages of the page lifecycle.
32
+
For me the big aha-experience was that the GUI only needs to be RE-created. That is when the GUI first is created, in the "Create new control"-click event you set the data, the GUI is based on, in session. On all subsequent post-backs the dynamic GUI can be RE-created in the early stages of the page lifecycle.
67
33
68
34
Thanks to all been involved in this solution. I have been pondering over
69
35
this for at least two years. If anyone want to see the example in code
My thoughts on the subject are that these are some excellent quidelines
21
-
and a vision of a code quality that you might never reach. Also as the
22
-
blogger suggests, it might be a good way to force people to move away
23
-
from procedural coding - as for example when upgrading from VB6 to
24
-
VB.NET.
18
+
My thoughts on the subject are that these are some excellent guide-lines and a vision of a code quality that you might never reach. Also as the blogger suggests, it might be a good way to force people to move away from procedural coding - as for example when upgrading from VB6 to VB.NET.
25
19
26
-
I have not followed all of these in my current project (it would lead to
27
-
a loo-ot of classes and assemblies) but having them nailed to the wall
28
-
has given my an opportunity to learn and use some of the guidelines. And
29
-
lo, and behold - my design was better and my code more readable.
20
+
I have not followed all of these in my current project (it would lead to a loo-ot of classes and assemblies) but having them nailed to the wall has given my an opportunity to learn and use some of the guidelines. And lo, and behold - my design was better and my code more readable.
30
21
31
-
He might be onto something here, the good Brikenstock...
22
+
He might be onto something here, the good Birkenstock...
Copy file name to clipboardExpand all lines: _posts/2008-05-23-shortcuts.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ Anyone who has worked with me know that I love shortcuts (that is keyboard short
16
16
17
17
Here is a list of some of them - I haven't seen some them before and other ones are loved friends of mine: <http://www.dev102.com/2008/05/06/11-more-visual-studio-shortcuts-you-should-know/>
18
18
19
-
**UPDATED** That short-cut site contained some other really useful stuff also:
19
+
**[UPDATED]** That short-cut site contained some other really useful stuff also:
Copy file name to clipboardExpand all lines: _posts/2008-05-26-visual-studio-2008-intellisense-not.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,6 @@ Just now the Intellisense stopped working in Visual Studio 2008. Scared me a lot
16
16
17
17
But Richard Fennell had the solution and that helped me to evade that situation. Here is the solution: <http://blogs.blackmarble.co.uk/blogs/rfennell/archive/2007/12/01/intellisense-not-working-in-visual-studio-2008.aspx>
18
18
19
-
**UPDATED**
19
+
**[UPDATED]**
20
20
21
21
As it turns out this was only part of the solution. The real problem was the integration with ReSharper - [here is how to solve it.](https://www.marcusoft.net/2008/06/resharper-and-messed-up-intellisense.html)
Let me at the start of the post first say that I love [ReSharper](http://www.jetbrains.com/resharper/index.html). It is by far the best refactoring support that can be found for VB.NET. I haven't yet used it for C# but are told but [esteemed colleague](http://blogg.joakimsunden.se/) that it rocks.
15
15
16
-
But... (there is always a but isn't it?) it [messes up the Intellisense in my Visual Studio](https://www.marcusoft.net/2008/05/visual-studio-2008-intellisense-not.html). The same colleague (kudos to Jocke) tipped me on how to solve it and here it is;
16
+
But... (there is always a but isn't it?) it [messes up the Intellisense in my Visual Studio](https://www.marcusoft.net/2008/05/visual-studio-2008-intellisense-not.html). The same colleague (kudos to Joakim) tipped me on how to solve it and here it is;
17
17
18
18
Open the options for ReSharper and choose `Intellisense->General->Use Visual Studio`. This will not give you as much support for "Smart Completion" but I'll take that over missing Intellisense everyday in the week, and twice on Sundays.
0 commit comments