Hacker News new | past | comments | ask | show | jobs | submit | richcuteguy34's comments login

It's looks very close to Visual Basic to me ... :)


Yes, it is VB6.

I did actually put quite a bit of thought into how I was going to put in the code samples. I elected to use BASIC like syntax because IMHO, this is close to as common denominator as possible and most universally understood (this is not an invite to start a flame war!)

I also elected to start by arrays at 1, rather than 0. The purest in my wanted to use zero, but to make it more universally understood, I elected to use one (because it also relates to the real world and card #1). I think more people will understand it this way.

The other thing I almost did not do (but changed my mind at the last minute), was to in-line the swap function and enumerate all three steps. I almost wrote it with Swap(i,s) function instead. Half of me thinks using a function is easier to understand, the other half likes the in-line for explaining it.

It's not as if the logic is very hard, there's one loop.

I'm curious what others think. Was it hard to understand? I'm always keen to learn more. Could I have explained it easier with the changes above?


As a civilian (i.e. non-programmer) I found the example code understandable. I too am wondering what alternative presentation method the post above yours would suggest.

Nice article.


Coming from python and not knowing VB I found the Do Loop syntax tricky at first. I am used to a loop explaining how long it will run for at the top (similar to the for loop here).

Being pseudocode I found it odd to mix loop syntax. One loop has its conditions at the top and the other at the bottom. I guess that is just taste though.


numbering should start at 0. http://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EW...

He also made comments about using Basic. Seems you made the wrong choices...


Awesome stuff.

Here's another article about this http://www.datagenetics.com/blog/november32012/index.html


This reminds me of one of their earlier posts about Calculus and monsters http://datagenetics.com/blog/october12013/index.html

It's amazing to be reminded about how much math you forget after High School and never need to use again :(


Yes, and also paradoxically the datagenetics article was published in June 2012, and the article you reference is dated March 2014.

Next you are going to claim he stole your idea of a time machine. (Oh and your idea about calculus, and the English language).


I pointed out 6 hours after you did that his referenced article was dated 2 years after the article that he said copied it. You pre-stole my comment!


Nice

Here's a model of chutes and ladder using Markov http://www.datagenetics.com/blog/november12011/index.html

And another for Candyland http://www.datagenetics.com/blog/december12011/index.html


Nice. These articles are great. Very much appreciated.


That's pretty funny. Like the author said, it may not be true, but it's a fun piece of analysis.

I can almost remember doing math like this at school.


Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: