Let’s say you were coding up program that required a number of base 24, how would you go about it? Think now of how you would do it in your own programming language. No really… think about it and think about the resulting type. You’re returning a string right? Depending on your programming language, you might have gone for the approach of assuming a base 10 input, then using division and the remainder operator to go through a dictionary of strings a,b,c,A,B,C. The type of the result is a string which is cumbersome to work with. For example, how would you add 1 to it? I’m guessing you’d have to convert it back to base 10, add one, then reconvert. In my opinion that is a lot of (too much) hassle.

Well how about we think a little differently… Continue reading »

© 2011 athe.la blog Suffusion theme by Sayontan Sinha