Contact Me

Firstly, if you want to respond to a post, just add a comment.

More informal is Twitter: JMBucknall

Lastly, if you want to keep it private, my email is julianb@boyet.com. And I have good spam blockers...


Posts on similar topics...

Share it: Digg It!  StumbleUpon  Reddit  Del.icio.us  NewsVine  Furl  BlinkList  Ma.gnolia  Technorati

12 Responses

  • Wed 17 Dec 2008
  • 2:49 PM
  •  avatar #1

Petter Mattsson said...

Hi !

I just read one of your earlier posts about a recursive version of the selection sort. I´ve been having a bit of a hard time getting the recursive thinking in to my head, but after reading trough your way of reasoning how to rebuild the sort it just "clicked". So.....thanks!!

//Petter

  • Wed 17 Dec 2008
  • 3:29 PM
  • julian m bucknall avatar #2

julian m bucknall said...

Petter: Cool, I'm glad the article helped.

Cheers, Julian

  • Sun 11 Oct 2009
  • 7:15 AM
  •  avatar #3

Nasser Wahby said...

Hallo their,

I have a question about a book , if you have any book about the data structures for starter.

From the beginning , i mean the beginning sequention and selection , iteration, of cours the book must include a lot of case and the soulations.

And then the rule of pascal, or Delphi , dosn't matter.

Please , and again please if you have any paper work als it be suseful,.

My name is Nasser Wahby

im living in Belgium , so i am wating your replay.

Best Regardes

Nasser

  • Wed 11 Nov 2009
  • 5:33 PM
  •  avatar #4

Mick said...

Hi Julian,

just a quick one to say thanks for an old article and program on ISO 8601 for Week number. I spend more time testing and figuring out why other implementations where not working and stubbled across yours in a small thread in a response to one that didnt work. Nice piece of work and thanks.

On a side note.. I brought Telerix controls into a few client companies that I worked in, a few years ago. At first it worked well but once we tried something not out of the box... duh! I then moved to dev express and we pushed those controls to the limit also. Some cool stuff, modal dialogs on ASP etc ... all great. Yeah ok I coming to the 'But' bit :-) just remember in designing to keep it simple stupid. I did notice after each release that the functionality grew to such a size that it was like learning a hole new programming skill. So if you can in there... keep it simple as the controls are great...

thanks again... Mick

  • Fri 25 Dec 2009
  • 6:17 AM
  •  avatar #5

DoctorGauss said...

Hello, Mr. Bucknall.

I'm from Russia and Yesterday I have buy your book The Tomes of Delphi Algorithms and Data Structures (in translate for russian language). It's fantastic book, thank for your job. I'm begining non-professional programmer and this book very useful for me.

With best wishes!

P.S. Sorry for my bad English.

  • Sat 26 Dec 2009
  • 4:38 AM
  • julian m bucknall avatar #6

julian m bucknall said...

DoctorGauss: Good luck with the book! Glad you like it. I also have a Russian translation of it, although I can't read it. By the way, your English is just fine.

Cheers, Julian

  • Thu 18 Mar 2010
  • 6:25 PM
  •  avatar #7

Dave said...

Hi Julian,

I'm using an older version of your lock free queue and I'm occasionally an NullReferenceException in Dequeue() thrown from the line

item = oldHeadNext.Item;

Is this (http://www.boyet.com/Articles/LockfreeQueue.html) the latest version you've posted? It's newer than the version I used so hopefully the issue I'm experiancing is the thing you fixed.

Regards

Dave

  • Fri 19 Mar 2010
  • 8:17 AM
  • julian m bucknall avatar #8

julian m bucknall said...

Dave: The code shown on that page is pretty much the latest version. However you can get the really 100% up-to-date :) version here: www.boyet.com/.../LockFreeCode.zi

Cheers, Julian

  • Sun 21 Mar 2010
  • 3:02 PM
  •  avatar #9

Dave said...

Hi Julian,

The zip file is the same code which I'm experiancing the exception.

In the code below, oldHeadNext is tested for null if oldHead == oldTail, but not if it isn't. I'm seeing it null inside the else statement, NullReferenceException is thrown from the line where item is assigned oldHeadNext.Item.

if (oldHead == head) {

if (oldHead == oldTail) {

if (oldHeadNext == null) {

return false;

}

SyncMethods.CAS<SingleLinkNode<T>>(...)

}

else {

item = oldHeadNext.Item;

haveAdvancedHead =

SyncMethods.CAS<SingleLinkNode<T>>(...);

}

}

  • Mon 22 Mar 2010
  • 12:01 PM
  • julian m bucknall avatar #10

julian m bucknall said...

Dave: I can't reproduce this at all. I've written a multithreaded app that uses two threads to enqueue, and two to dequeue, and run it on my four-core desktop enqueuing 100,000,000 integers. No problem. I added 4 more dequeuers. No problem.

I've reviewed the code as well, going back to my original source (the Michael and Scott paper). It's good.

So, have you got a reproducible test case? If so, please email me on julianb@boyet.com. I promise to take a look, asap.

Cheers, Julian

  • Mon 22 Mar 2010
  • 2:54 PM
  •  avatar #11

Dave said...

Hi Julian,

I've not been able to reproduce outside the production application (I used ints like you). I'll keep trying, I'm using the lock free queue in a Producer / Consumer scenario. Any number of thread can enque an object but since the source is a WCF MSMQ endpoint generally it always seems be the same thread. There is only ever 1 thread dequeuing.

Regards

Dave

  • Fri 07 May 2010
  • 12:14 AM
  •  avatar #12

caoweimin said...

Hi Julian,

I have read your book-The Tomes of Delphi Algorithms and Data Structures several times. It deserves reading really. Today I test TtdSkipList using 10,000,000 Pointers and I found a bug in TtdSkipList.Add procedure.

// Source begin=================

procedure TtdSkipList.Add(aItem : pointer);

var

i, Level : integer;

NewNode : PskNode;

BeforeNodes : TskNodeArray;

begin

{search for the item and initialize the BeforeNodes array}

if slSearchPrim(aItem, BeforeNodes) then

slError(tdeSkpLstDupItem, 'Add');

{calculate the level for the new node}

Level := 0;

while (Level <= MaxLevel) and (FPRNG.AsDouble < 0.25) do

inc(Level);

{if we've gone beyond the maximum level, save it}

if (Level > MaxLevel) then

inc(FMaxLevel);

//Source end ===============

The last line increment FMaxLevel, so it is possible that FMaxLevel exceed tdcMaxSkipLevels, 12. This situation's probability is very low, but it happened while testing with large data volumn.

Best Regardes

Caoweimin

再次感谢您.

Leave a Response

About Me

I'm Julian M Bucknall, the M because it's my middle initial and because I and the other Julian Bucknall (the movie guy) would like to differentiate ourselves.

I'm a programmer by trade, an actor by ambition, and an algorithms guy by osmosis. I write articles for PCPlus in my spare time, not that there's much of that.

Julian M Bucknall Apart from that, an ex-pat Brit, atheist, microbrew enthusiast, Pet Shop Boys fanboy, slide rule and HP calculator collector, amateur photographer, Altoids muncher.

DevExpress

I'm Chief Technology Officer at Developer Express, a software company that writes some great controls and tools for .NET and Delphi. I'm responsible for the technology oversight and vision of the company.

The OUT Campaign

The OUT Campaign

Validation

Valid XHTML 1.0 Transitional     Valid CSS!

Bottom swirl

Archives

September 2010 (1)
SMTWTFS
« Aug  
1234
567891011
12131415161718
19202122232425
2627282930

Like this Archive Calendar widget? Download it here.

Search

Google ads

My Tweets

Bottom swirl