Monthly Archives: August 2015

Lexicographical Permutations

Lexicographical Permutations ProjectEuler problem twenty-four requires finding the millionth lexicographic permutation of the digits 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. If you have not figured out the solution, stop reading and figure it out yourself.  Finding a lexicographical permutation is not very difficult. The existing explanations, that I found, for finding a lexicographical permutation were not very easy to understand. The solution required a bit of research and experimentation but eventually I found a solution. Hopefully, this article will make understanding a Continue reading →

ProjectEuler Hacked

The forces of Ming the Merciless have yet again breached the walls of the ProjectEuler website. Our beloved treasure trove of mathematical puzzles has come under vicious unwarranted attack that must be neutralized and repelled. Keep reading to see how you can help. ProjectEuler Hacked 2 August 2015: ProjectEuler Hacked Sadly it seems that a malicious user has discovered a way to modify the contents of the DB. It is currently unclear how this occurred so in the meantime a decision has been made to Continue reading →

Do it Right the First Time

Wonder why the code you are reading is so hard to understand?  Did you end up in a maintenance situation with multiple functions that have over 2,000 lines of code?  If you have, then welcome to commercial software development world. C-Monster Sighted! Early in my career, I was working on a wholesale lockbox system written in C. Guess how long the main() function was?  Over 3,000 lines of code and most of that code was in if-statements that zigzagged to the right and left to Continue reading →