for(x=bigones=1,pork-=((reuse==”billy”)?1:2),y=novel$olution.lengthOf(); sanity===”norm”;k[reuse][pork+novelSolution[y–]]*=z) ;

Let me start by saying that the Subject title of this post is a ( probably && fairly) legal Javascript statement !

Yesterday I decided to embark on a mission to implement an ‘all anagrams’ web page, using my new found Javascript knowledge. A simple idea- A web page to accept a user input and then produce all the permutations of the provided string.

I don’t really know why I had the urge to do this, Sadomasochism? . Suffice it to say that it’s probably quite difficult for a complete novice to write such an algorithm from scratch, hence I think I wasted a lot of time LOL !

Well, anyway after some deep thought and some great experience with Firebug and Aptana etc. my algo. seemed to be half way there.. however I was still not convinced that my design was correct or was working properly, or that my idea had been implemented correctly. It was a great learning experience though, albeit frustrating in the end !

Eventually I resorted to a Google search, which promptly yielded a JavaScript function for the purpose..

OK I still can not work out how it works but / it does work and it’s free for all to use/
I think the lesson here is that my time is better spent developing skills rather than re-inventing the wheel!

So today I’ve been ploughing through Ebooks, watching gruesome pics of Ex Gaddafi and recovering from a set back… failing to re-invent the wheel !



Leave a Reply

Your email address will not be published. Required fields are marked *