I’m following Olimex‘s blog for some time, now. Well, I believe since I bought the first products from them, which was in October if I remember right. If you think: ‘Olimex? Never heard of.’ Here is an eight words description: Olimex designs and sells microcontrollers targeted at makers. Others do that to and have a much bigger community around them – especially to mention are Arduino and Raspberry Pi. So what makes them stand out (for me)?
I build my first keyboard with an Arduino Uno (actually two). That’s possibly the best path to take when you are beginning with microcontrollers and electronics tinkering, but there are some things where Arduinos don’t shine. Power consumption, for example. Since I struggled to tune my keyboard for longer battery life, I browsed the web for alternatives. Olimex was mentioned sometimes on different forums, so I headed over and checked their products. Here are some plus points, I experienced so far:
- The products palette is huge. That can be considered a minus point for them, as well.
- The prices are fair.
- They are at the edge off microcontroller development.
- All products I looked at so far can be used in industrial environments.
- In case a product is a clone of something, the clone is always a little better in some way compared to the original and costs less.
- You can order directly, even in small quantities.
There are some things to consider, though. While they are trying to provide decent documentation and building a community, it is still much harder to make progress then in the Arduino world, for example. Another point is, since they are really fast, it happens sometimes, that there are some flaws in the design. They fix those usually quickly and are customer friendly. Haven’t heard any other things, yet.
I don’t have any relationships with Olimex, besides being a customer. Just for clarification.
Actually the topic of this post is a different one and after this lengthy plugging for Olimex, it’s time to address it. Olimex runs an over the weekend programming challenge at their blog. The fourth is actually running. Check it out, if you have any programming experience and fun in solving riddles. For me it’s the first time to participate in their challenge.
For this weekends challenge you have to find the longest isogram in a given text. An isogram is a word where no letter exists more than once. I immediately imagined a solution and hacked it quick and dirty down and send it to them. That was yesterday in the evening, after getting the kids to bed. Now after rethinking my approach I might have missed a thing or two. Here is what I have send them. I shortened the example text.[gist https://gist.github.com/Crenshinibon/5379973]
What about apostrophes? Do they count? Is “Dirk’s” one word with six letters? Or five? My solution makes it a four letters word (Dirk) and an one letter word (s), since the apostrophe becomes a space. What about hyphenation? Do they think the algorithm has to look out for hacked apart words and combine them and count their total length? My solution doesn’t do that. I know, I should have asked those questions before submitting something. But, heh, it’s to late for me now, so stop the accusations.
My algorithm is not as efficient as possible, either. A most efficient solution should go only once, letter by letter through the whole text. Converting the actual letter on the fly to lower case. Well the following might be better, regarding the efficiency.[gist https://gist.github.com/Crenshinibon/5380129]
What do you think? Are their further aspects I didn’t consider?
Here is a solution that takes an URL (e.g. http://fiction.eserver.org/novels/alice_in_wonderland.html) as the command line parameter and finds the longest isogram on the given page:[gist https://gist.github.com/Crenshinibon/5393957]
With my UMTS connection this takes a little more then two seconds for Alice. And for completeness here is a solution that takes a file name as input:[gist https://gist.github.com/Crenshinibon/5394158]
Alice takes 40ms and the Bible around 850ms. I ran those tests on my MacBookPro 13” early 2011.