Bert Sarens · Dec 7, 2017 go to post

It is not that the task was so difficult, for me it was more that debugging it was very complicated.
That and understanding the assignment was not easy for me toady.
 

Bert Sarens · Dec 6, 2017 go to post

Oke,
The guys on the leaderboard are pretty insane.

I got up 2 mornings at 6am. (Thats when it starts for me.)
Started programming but being done and making no mistakes in 10 minutes or less to get on the leaderboard is just nuts.

Bert Sarens · Dec 6, 2017 go to post

I implemented a simple hash function for it. I just created a new word from all the letters in alphabetical order.
If it's the same word. tadaaa. Code is found in my bitbucket above.

Bert Sarens · Dec 3, 2017 go to post

Not getting up at 5 am here either.

But seeing different solutions in cache is worth it.

Bert Sarens · Dec 3, 2017 go to post

Where is Danny when you need him? I guess he got a bit tired by doing 2016 one :) 

Bert Sarens · Dec 2, 2017 go to post

I joined it :)

 

PS.: you can have multiple private leaderboards, in case you wonder.

Bert Sarens · Sep 21, 2016 go to post

The argumentless-For  is the worst in showing intent of the code.

A quit statement can be anywhere in the code. There is no clear definition as to where to put the condition for ending the loop.

What is wrong with a while that shows clear intent:

struct = $ORDER(TABEL(""),1,data)
while (struct'="") {
  s struct = $ORDER(TABEL(struct),1,data)
}

Bert Sarens · Sep 20, 2016 go to post

I don't like the fact that u use for loops to traverse a global.
In most programming languages for loops are for when you know the number of iterations needed in advance.

 

see quote below straight from stackoverflow:   http://stackoverflow.com/a/2950945

The main difference between the for's and the while's is a matter of pragmatics: we usually use for when there is a known number of iterations, and use while constructs when the number of iterations in not known in advance. The while vs do ... while issue is also of pragmatics, the second executes the instructions once at start, and afterwards it behaves just like the simple while.

Bert Sarens · Jul 3, 2016 go to post

I don't think the above code proves anything.

The first time you run trough it it gets cached, so the second time is bound to be faster.
Try to run another 2 full runs and another 2 zn runs and you should see they are way closer.