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...
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...
12 Responses
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
julian m bucknall said...
Petter: Cool, I'm glad the article helped.
Cheers, Julian
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
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
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.
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
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
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
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>>(...);
}
}
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
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
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