Published by

Comments

# re: Data Structures and Algorithms book

Look forward to reading it.

Sunday, July 27, 2008 2:37 PM by OmegaSupreme

# re: Data Structures and Algorithms book

I sure hope it does!

Sunday, July 27, 2008 3:24 PM by Granville Barnett

# re: Data Structures and Algorithms book

Hmm.. interesting .. look forward to reading

Monday, July 28, 2008 1:56 AM by Muhammad Qasim Pasta

# Dew Drop - July 28, 2008 | Alvin Ashcraft's Morning Dew

Pingback from  Dew Drop - July 28, 2008 | Alvin Ashcraft's Morning Dew

# re: Partial classes - they have only one real use, right?

One of the larger places I used partial classes is for extending proxy's generated via wsdl.exe for Web Service's.  Much of the time you need to extend the set of properties/methods on these proxy's.

A simple example, is that the old way which wsdl.exe worked is that it would only emit fields, not properties.  And you can only databind to properties.  So in this case we used to have to extend the partial class with the list of fields needed for binding...

Tuesday, July 29, 2008 11:44 AM by Rob Chartier

# re: Partial classes - they have only one real use, right?

I use partial classes when I use xsdgen to generate classes from xml files, I add methods to a partial class for it.

Tuesday, July 29, 2008 12:59 PM by Rick Ratayczak

# re: Partial classes - they have only one real use, right?

Recently I was working with an open source framework.  There was a class that didn't have a method I wanted, so I added it using partial classes.  This might be what MSDN had in mind, working with code that you don't own.

Tuesday, July 29, 2008 1:06 PM by Scott Hoggarth

# re: Partial classes - they have only one real use, right?

@Scott - good point, I had not thought of that. Would if have not been better to derive from that class though you wanted to extend? assuming it was not sealed of course.

I'm still pretty unconvinced that people do use partial classes inline with that 1st point on MSDN. Seems to be pretty much designer exclusive.

Tuesday, July 29, 2008 2:09 PM by Granville Barnett

# re: Partial classes - they have only one real use, right?

I have found partial classes very useful of late. While refactoring some classes I find it a lot easier to put deprecated code in a separate physical file, which allows me to navigate and focus on the good stuff a lot more easily.

Tuesday, July 29, 2008 4:07 PM by Guy Harwood

# re: Partial classes - they have only one real use, right?

@Guy - that actually sounds like a pretty clean solution to that sort of thing, I may have to *borrow* that idea sometime in the future.

Tuesday, July 29, 2008 4:27 PM by Granville Barnett

# re: Partial classes - they have only one real use, right?

According to our Coding standards document ... a class/file should not be more than 1500 lines.... so we use partial classes in order to manage our codes;

Wednesday, July 30, 2008 3:22 AM by Muhammad Qasim Pasta

# Dew Drop - July 30, 2008 | Alvin Ashcraft's Morning Dew

Pingback from  Dew Drop - July 30, 2008 | Alvin Ashcraft's Morning Dew

Wednesday, July 30, 2008 7:07 AM by Dew Drop - July 30, 2008 | Alvin Ashcraft's Morning Dew

# re: Partial classes - they have only one real use, right?

I actually found a nice use for partial classes.

On some of my larger objects, I use partial classes to separate static methods from instance methods.

I like doing that a lot better than using Regions, which I really can't stand.

I haven't tried it, but I imagine that for very large classes, separate files could be created for properties, constructor, methods, statics, etc.

Bottom line is that I love having the option.  Partial classes were a nice idea.

Wednesday, July 30, 2008 10:44 AM by Speednet

# re: Partial classes - they have only one real use, right?

I've seen partial classes used to separate out static methods sometimes for organization purposes (as it is a better option than regions). One example of this is the Rhino.Commons.Util.With class:

rhino-tools.svn.sourceforge.net/.../With

Saturday, August 02, 2008 1:00 PM by Bill

# Dew Drop - August 4, 2008 | Alvin Ashcraft's Morning Dew

Pingback from  Dew Drop - August 4, 2008 | Alvin Ashcraft's Morning Dew

# re: My Visual Studio vNext wish list

I'd like to add another thing... for asp.net developers it would be nice to have a more robust FTP built in. The one in the current version leaves alot to be desired. For instance, half the time when I try to just select a whole folder and upload it, it will create the folder on the remote site and then not upload any of the files inside of it. As it stands now, I end up using a second program to handle FTP.

Monday, August 04, 2008 8:51 AM by Jeff Turner

# re: My Visual Studio vNext wish list

@Jeff - totally agree. In fact I think I used the FTP in VS2005 a few times and came across the same problem so I swiftly moved to a 3rd party FTP app.

To be fair to the web guys the new stuff in VS2008 is leeps and bounds better than the VS2005 equivalents. I know this is largely down to Expression Web being thrown in there, buthte JavaScript intellisense is a plus as well. I *think* in VS2008 SP1 there are some further enhancements to the JS intellisense but off the top of my head I can't remember.

Monday, August 04, 2008 10:25 AM by Granville Barnett

# Hang on! I've been mentioned on This Week on C9!

I think I'm almost famous. I'm mentioned 10:47 - 12:25. The mentioning was in response to my

Saturday, August 09, 2008 1:39 PM by Granville Barnett

# Hang on! I've been mentioned on This Week on C9!

I think I'm almost famous. I'm mentioned 10:47 - 12:25. The mentioning was in response to my

Saturday, August 09, 2008 2:37 PM by Community Blogs

# re: Partial classes - they have only one real use, right?

It's because M$ Visual Source Safe doesn't have good support for merging patches.  It's designed for checkout to block all other attempts to checkout.

Thursday, August 14, 2008 11:45 AM by Paul

# re: My Visual Studio vNext wish list

collaborative editing a la subethaedit and eclipse

Tuesday, August 19, 2008 2:23 AM by richb

# re: My Visual Studio vNext wish list

I saw a video actually on Google videos on YouTube the other day on the Eclipse collab stuff. Not made up my mind on the real-time collab stuff while you code, but I think it would be very useful for code reviews, etc.

Tuesday, August 19, 2008 4:11 AM by Granville Barnett

# Design Patterns - Part 2 published

In the first part we looked at the strategy pattern, in part 2 of this design patterns series we take

Friday, August 22, 2008 5:43 PM by Granville Barnett

# Design Patterns - Part 2 published

In the first part we looked at the strategy pattern, in part 2 of this design patterns series we take

Friday, August 22, 2008 5:52 PM by Community Blogs

# Data Structures and Algorithms Book First Preview

I think it’s quite a long while since Granville Barnett and Luca Del Tongo started their work on writing

Wednesday, August 27, 2008 1:21 PM by Community Blogs

# re: Data Structures and Algorithms book (free) first preview available!

If you need a fibonacci heap implementation, let me know (via email). I'm working on my own algorithm lib (bsd licensed, out this fall), but I think we are in the same boat that we want others to use algorithms which are discovered by very smart people sometimes decades ago, so the more spread these algorithms are, the better. :)

Wednesday, August 27, 2008 1:36 PM by Frans Bouma

# re: Data Structures and Algorithms book (free) first preview available!

@Frans - Duly noted. Will follow this up via email.

Wednesday, August 27, 2008 4:49 PM by Granville Barnett

# Reflective Perspective - Chris Alcock » The Morning Brew #167

Pingback from  Reflective Perspective - Chris Alcock  » The Morning Brew #167

# re: Data Structures and Algorithms book (free) first preview available!

Great news:

here is my "spreading of the word" :)

codeclimber.net.nz/.../data-structure-and-algorithms-ebook.aspx

Thursday, August 28, 2008 2:10 AM by Simone

# re: Data Structures and Algorithms book (free) first preview available!

Thanks Simone ;-)

Thursday, August 28, 2008 5:26 AM by Granville Barnett

# Dew Drop - August 28, 2008 | Alvin Ashcraft's Morning Dew

Pingback from  Dew Drop - August 28, 2008 | Alvin Ashcraft's Morning Dew

Thursday, August 28, 2008 7:59 AM by Dew Drop - August 28, 2008 | Alvin Ashcraft's Morning Dew

# re: Data Structures and Algorithms book (free) first preview available!

@Granville: you're welcome

Thursday, August 28, 2008 11:32 AM by Simone

# re: DSA book on 'This Week on C9'

It would be great if you reviewed so-called Cartesian Tree (Randomized Binary Search Tree, Treap). It allows to implement easily self-balanced tree without rotations but only through split/merge operations which are performed recursively in a simple manner.

Another good structure to include is Fenwick Tree (Bit indexed tree).

Thanks for the book!

Saturday, August 30, 2008 8:45 AM by Vadim

# re: DSA book on 'This Week on C9'

Noted. Thanks for the suggestions Vadim.

Saturday, August 30, 2008 6:51 PM by Granville Barnett

# re: Data Structures and Algorithms book

please send datastructure book

Monday, September 01, 2008 7:42 AM by behailu

# re: Design Patterns - Part 1 published

Thanks a lot for covering these design pattern. As only thoese who have experienced the subject can really explain the howto stuff. Thanks. Any plan for covering other patterns such as decorator and singleton.

Tuesday, September 02, 2008 3:26 AM by Sam Irwin

# re: Design Patterns - Part 1 published

@Sam - I'll note them down as patterns to maybe write about. Thanks.

Tuesday, September 02, 2008 5:17 AM by Granville Barnett

# re: Data Structures and Algorithms book (free) first preview available!

The content of the book looks really good.  Are you planning to add graph? Also, I think it's better to add a sample code (just one language C#) in the book as well.  I know it's going to be bulky.

Wednesday, September 03, 2008 7:50 AM by John Jabot

# re: Data Structures and Algorithms book (free) first preview available!

We are only using pseudocode I'm afraid. The decision was made a while back and I think it is best.

Wednesday, September 03, 2008 8:01 AM by Granville Barnett

# re: Data Structures and Algorithms book (free) first preview available!

Your use of the fibonacci series in the recursive versus iterative section can do with some extension and connection to your "Big Oh" discussion - the naive recursive version is O(n*n) in execution time, but you can not only rewrite it as iterative (for O(n) time), you can rewrite it as recursive with O(n) time if the return value carries F(n) and F(n-1), and you can further write it as iterative using matrix multiplication for O(lgN) time, or using floating point in O(1) time (assuming that pow(x,n) is O(1)).

Cheers,

Alun.

~~~~

Thursday, September 04, 2008 12:03 PM by Alun Jones

# re: Data Structures and Algorithms book (free) first preview available!

@Alun - there are many ways we can write the fib series. We made the decision to use the version already implemented as its clearer than the versions that are a little faster. Also we don't see it as a *critical* algorithm. Its purely there for coverage, nothing more.

Thursday, September 04, 2008 12:11 PM by Granville Barnett

# Dew Drop - September 12, 2008 | Alvin Ashcraft's Morning Dew

Pingback from  Dew Drop - September 12, 2008 | Alvin Ashcraft's Morning Dew

Friday, September 12, 2008 8:45 AM by Dew Drop - September 12, 2008 | Alvin Ashcraft's Morning Dew

# re: Experiment: Using a dark theme in VS for a week

Let us know how it goes. I've tried the dark colors before (Rob's) but I didn't like it for the first 5min I tried it so I dismissed them and haven't tried it again. I probably needed to let my eyes get used to the new dark colors first.

What I did instead is changed the background color a very light green while keeping all the other colors the same. The following combination is what i used.

Hue: 76

Sat: 240

Lum: 231

Red: 238

Green: 255

Blue: 236

Saturday, September 20, 2008 9:23 AM by Chris

# re: Experiment: Using a dark theme in VS for a week

@Chris - Understandable. I must say though a light green background?! Sounds a bit exotic!

Saturday, September 20, 2008 9:52 AM by Granville Barnett

# re: Experiment: Using a dark theme in VS for a week

It's a long time I use a dark theme in VS and other IDE. It's real convenient and often I ask myself why nobody else use this combination... Do you remember when any monitor was green on dark?

Sunday, September 21, 2008 2:27 AM by Leonardo

# re: Experiment: Using a dark theme in VS for a week

@Leonardo - Unfortunately I do remember. Back then it was at school on RM machines.

The major problem I have is that using a dark theme isn't consistent with other content you view, e.g. you have VS open using a dark theme and look at MSDN - flicking between the dark and light isn't that good for the eyes I imagine.

Sunday, September 21, 2008 6:07 AM by Granville Barnett

# re: Experiment: Using a dark theme in VS for a week

Indeed it's a matter of habit... When I look at anything but the code I feel right having the usual "something-on-white" with the smaller visible font dimension, but when I'm focused on the code I feel really easy using a dark background; moreover my font is Fixedsys, no way to use anything else and I found my workmates they are easy too when they work on my machine, but me, I have a lot of trouble when I use their settings... Keep the dark theme and in a couple of days you will not be able to go back. By the way... Never used glasses in 20 years of coding, maybe for that reason, or maybe I'm a lucky man ;)

Sunday, September 21, 2008 2:45 PM by Leonardo

# re: Experiment: Using a dark theme in VS for a week

If you wanted to experiment with different color settings for your themes, I have written a theme generator for Visual Studio. You import 3 colors and a contrast value and it outputs a vssettings file (it runs completely on the web and lets you preview before downloading)

frickinsweet.com/.../Theme.mvc.aspx

Monday, September 22, 2008 7:48 AM by Ryan Lanciaux

# re: Experiment: Using a dark theme in VS for a week

@Leonardo - Maybe its me but the switching between the light and dark just hits me as being too different. I think I prefer the dark on light. As for glasses I don't wear them either for the computer, but I do need them for long distance(short sighted).

@Ryan - Thanks for the link. I actually saw that a few weeks back I believe.

Monday, September 22, 2008 10:53 AM by Granville Barnett

# re: Design Patterns - Part 4 published

Excellent article! very well written, I thought, however, you could improve your thread safe version by adding an additional check before locking the resource. If the s_instance variable is already set there would be no reason to lock the object. In effect a double check.

if (s_instance == null)

{

  lock (s_syncLock)  

  {  

      if (s_instance == null)  

     {  

        s_instance = new PrimeMinister();  

     }

  }

}

return s_instance;

cheers!

Wednesday, September 24, 2008 8:56 AM by Mark D

# re: Design Patterns - Part 4 published

Thanks Mark. Personally I prefer the version provided at the end - the lock-free one.

Glad you enjoyed it ;-)

Wednesday, September 24, 2008 10:04 AM by Granville Barnett

# Results: Using a dark theme in VS for a week

As I mentioned several days ago I’ve been seeing if a dark theme in VS would help my eyes a little. The

Friday, September 26, 2008 12:20 PM by Granville Barnett

# Results: Using a dark theme in VS for a week

As I mentioned several days ago I’ve been seeing if a dark theme in VS would help my eyes a little. The

Friday, September 26, 2008 1:36 PM by Community Blogs

# re: Results: Using a dark theme in VS for a week

I also found this:

"Green: A good all-purpose lens color, green provides a fair amount of contrast in low light conditions and reduces eye strain in bright conditions."

Source: www.athleticoptics.com/tips.asp

Friday, September 26, 2008 3:21 PM by Chris

# re: Results: Using a dark theme in VS for a week

Sorry. One last more I found on Green. Note: My color green is a very light green. Like an off white but with a green tint.

"Have you ever seen the default wallpaper of a Windows 95 installation? That horrendous, disgusting, depressing shade of gray-green that, for years, went mocked and scorned by many?... I have used for the longest period at a time....Interestingly enough, I have also noticed a great reduction in eye strain."

Source: www.oreillynet.com/.../that_depressing_shade_of_green.html

Friday, September 26, 2008 3:27 PM by Chris

# re: Results: Using a dark theme in VS for a week

@Chris - I'm just going to stick with white for the time being. Thanks for the links though. The O'Reilly post was interesting. I haven't seen that shade of green for years. Depressing would probably have been the label I would have associated with that shade of green as well. Thanks ;-)

Friday, September 26, 2008 5:29 PM by Granville Barnett

# re: Results: Using a dark theme in VS for a week

Hi ,

I was using the dark theme and found that it will increase eye strain. Now i am using www.codinghorror.com/.../exported-font-and-colors-for-jeff-atwood-sept-19.zip and it reduces my eye strain.

Saturday, September 27, 2008 12:50 AM by Shiju Varghese

# re: Results: Using a dark theme in VS for a week

@Shiju - I saw those themes a while ago, didn't do much for me. I should have said that I use the colouring that R# provides rather than the defaults in VS. Same for VA with C++.

Saturday, September 27, 2008 5:45 AM by Granville Barnett

# re: Results: Using a dark theme in VS for a week

What I'd really like is to be able to specify themes per-solution.

Mainly so that I can instantly see which branch of my product I'm working on - bug fixing on the production branch or new features on the development branch.

Is this possible?

Saturday, September 27, 2008 6:56 AM by Joe

# re: Results: Using a dark theme in VS for a week

@Joe - I've never heard of it being possible, at least not with VS out of the box.

Saturday, September 27, 2008 9:09 AM by Granville Barnett

# re: Results: Using a dark theme in VS for a week

I like a darker background; I've switched to a dark gray (not black) a while back. Since then I had to work with the default VS colors a few times and it felt like looking in the sun.

If your eyes strain easily taking some lutein supplements can help.

Saturday, September 27, 2008 6:12 PM by Peter

# re: Results: Using a dark theme in VS for a week

@Peter - Thanks, I'll keep that in mind.

Saturday, September 27, 2008 6:26 PM by Granville Barnett

# Dew Drop – September 30, 2008 (Evening Edition) | Alvin Ashcraft's Morning Dew

Pingback from  Dew Drop – September 30, 2008 (Evening Edition) | Alvin Ashcraft's Morning Dew

# re: Design Patterns – Part 5 published

I want to address you a personally "Thank you" for this series of articles. I am very interested about design patterns and how they can help building a great infrastructure and your articles couldn't be more helpful.

Thank you, and keep it up!

Best regards,

Costin

Thursday, October 09, 2008 4:41 AM by Costin

# re: Design Patterns – Part 5 published

@Costin - no problems, I'm just glad someone finds them useful! ;-)

Thursday, October 09, 2008 5:51 AM by Granville Barnett

# re: Code Contracts – my opinion on them anyway...

I agree. I'd definitely like to see it included in pre/post/invariant keywords like in Spec#, but for the time being, this is better than nothing.

QUT HIGH FIVE

Monday, November 10, 2008 7:28 PM by TraumaPony

# Dew Drop - November 11, 2008 | Alvin Ashcraft's Morning Dew

Pingback from  Dew Drop - November 11, 2008 | Alvin Ashcraft's Morning Dew

Tuesday, November 11, 2008 7:42 AM by Dew Drop - November 11, 2008 | Alvin Ashcraft's Morning Dew

# re: Data Structures and Algorithms book (free) first preview available!

Thanks 4 provide Data structures and Algorithms ebook

Tuesday, December 09, 2008 4:22 AM by Deepak Kumar

# Reflective Perspective - Chris Alcock » The Morning Brew #248

Pingback from  Reflective Perspective - Chris Alcock  » The Morning Brew #248

# Arjan`s World » LINKBLOG for December 19, 2008

Pingback from  Arjan`s World    » LINKBLOG for December 19, 2008

Friday, December 19, 2008 9:16 AM by Arjan`s World » LINKBLOG for December 19, 2008

# Dew Drop - December 19, 2008 | Alvin Ashcraft's Morning Dew

Pingback from  Dew Drop - December 19, 2008 | Alvin Ashcraft's Morning Dew

# Dew Drop - December 22, 2008 | Alvin Ashcraft's Morning Dew

Pingback from  Dew Drop - December 22, 2008 | Alvin Ashcraft's Morning Dew

# re: Data Structures and Algorithms book flying out (again!)

Chapter 5: Sets; Intersection

While traversing the smallerset, there is no need to check if the smallerset contains the item.  That is already known, or it would not have been found during the traversal.  Syntax adjusted to use what this form allows.

1) algorithm Intersection(set1, set2)

2) Pre: set1, and set2 not 1 emptySet

3) intersection, smallerSet and largerSet are sets

3) Post: An intersection of set1, and set2 has been created

4) if set1.Count < set2.Count

5) smallerSet is set1

6) largerSet is set2

7) else

8) smallerSet is set2

9) largerSet is set1

10) end if

11) foreach item in smallerSet

12) if largerSet.Contains(item)

13) intersection.Add(item)

14) end if

15) end foreach

16) return intersection

17) end Intersection

Alternative,

1) algorithm Intersection(set1, set2)

2) Pre: set1, and set2 not 1 emptySet

3) intersection is a set

3) Post: An intersection of set1, and set2 has been created

4) if set1.Count < set2.Count

5) foreach item in set1

6) if set2.Contains(item)

7) intersection.Add(item)

8) end if

9) end foreach

10) else

11) foreach item in set2

12) if set1.Contains(item)

13) intersection.Add(item)

14) end if

15) end foreach

16) end if

17) return intersection

18) end Intersection

Tuesday, December 23, 2008 3:46 PM by Phil Duby

# Data Structures and Algorithms

I had a peek through Jon Skeet’s blog this morning at a free eBook called Data Structures and Algorithms by Granville Barnett and Luca Del Tongo. The book is clear and presents the usual linked lists, trees, sets structures in a concise yet precise

Wednesday, December 24, 2008 4:22 AM by Think Before Coding

# re: Data Structures and Algorithms book flying out (again!)

Hi Phil,

I'll recheck the algorithm when I have some time (which is hard to find these days).

Thanks.

Wednesday, December 24, 2008 5:32 AM by Granville Barnett

# Dew Drop - January 7, 2009 | Alvin Ashcraft's Morning Dew

Pingback from  Dew Drop - January 7, 2009 | Alvin Ashcraft's Morning Dew

Wednesday, January 07, 2009 9:14 AM by Dew Drop - January 7, 2009 | Alvin Ashcraft's Morning Dew

# re: Data Structures and Algorithms book flying out (again!)

Hi,

Where can you download the source code for the book?

Thanks

Wednesday, January 07, 2009 12:43 PM by newbie

# re: Data Structures and Algorithms book flying out (again!)

Hi newbie (although I has a feeling thats not your name ;-)),

All the source code for the book is the book itself. The examples given can be translated relatively friction free to your respective imperative language of choice. However, if you want an implementation then we have one on offer in the DSA CodePlex project - http://codeplex.com/dsa which is all done in C#.

HTH

Wednesday, January 07, 2009 9:54 PM by Granville Barnett

# heh..

nice, really nice!

Thursday, April 16, 2009 10:13 PM by DesFlestetymn

# re: Shared Source CLI (aka Rotor) on Vista

Sadly, I can report that I corresponded directly with one of the authors of the Rotor book and he confirmed that it has gone the way of the dodo.  He referred to it as a an example of the Law of 2 Feet in action...nobody cared enough about Rotor to keep it alive, so it died.  Sigh.  On the bright side, they just announced the .NET 4.0 Micro Framework will be released under GNU...so it's not all doom and gloom...  

Monday, November 23, 2009 8:09 PM by Brian Hartung