Categories
Business Rants Technology

PAYE

UPDATE: 3 July 2008
Updated code to reflect more recent tax tables (2009)

When I was asked to estimate PAYE on a gross monthly salary, i hauled out the calculator and started chipping away, according to the SARS Tax Tables. Not being a tax consultant or looking at various structured packages, the first stab is mostly always a straightforward estimate without investigating further deductions. While doing this, the math-programmer inside me went… “Mmmm. Calculator. Boring. Ruby. Smile”

Turns out, it’s a simple little script; a useful little snippet and, bonus, i migrated some more learning onto Ruby. An aside; there’s definitely something about the difference in speed and endurance of learning between my brain versus my hands. You know the feeling. You can forget a password mentally, but let your fingers do the talking… And utilising muscle memory as an aid is just one of the many senses you can draw on…

Back to the snippet. Not too much interesting going on in terms of code. I chose a multidimensional array for storing the tax table. First used a hash, found it was overkill, reverted. Also did a classic switch in the beginning, to determine which “bracket” your pay falls into, but then figured a straightforward loop works just as well. This was an interesting break in habits from C# however.

In C#, looping through an array would be: for(int ii=0;ii<array.length-1;ii++)
I did the same in Ruby, transliterated the code, first time round: for ii in 0..array.length-1
But then, the knowledge of the “times” method changed my thinking completely: 6.times { |ii| … }
There are, afterall, one of 6 tax brackets you are likely to fall in (for all positive salaries)

And that’s where it hit me: the uncomfortable (more about that later) shift away from a corporate-sponsored, statically typed, IDE-integrated, certificate-oriented, compilable(?) programming language into a community-driven, dynamic scripting language is underpinned by these sudden ferocious rushes of freedom. Too much freedom? Certainly, too much to what i’m accustomed to sometimes.

Why’s that uncomfortable? Well, MSDN, VS, MS communities and the framework tell you how to code- to a large extent. They dictate the patterns, the constructs, the idioms; in short, they impose a very definite way of doing things. And it’s a big abstraction layer, forever changing (but not really) and giving you tons of resources to make your coding easier. This is good. Books, online help, built-in help, IDEs, intellisense… and more of all the good stuff. Don’t get me wrong, these things made me very productive and i’m grateful for that. But then you break away from that.

You gotta search for help (no nicely packaged MSDN DVD delivered to your door). You gotta scratch under the hood. You have to engage with community blogs and real people in a virtual world. You are forced to read opinions. You are stripped to the only the most simple of tools- a plain text editor. On a coding level, you are forced to remember namespaces, method names, variable names, libraries… no more intellisense to rely on. And this is where it was difficult. No more crutches to help me be more productive. I had to start thinking- for real now- and remembering stuff. And then i got scared: what if the “community” changed something and i didn’t know about it- or worse, didn’t agree with it? And I didn’t get an email with an updated change delivered to me automatically via updates or DVD? Hang on! Is that really the way it’s supposed to be? Have i become that lazy? Oops.

And all i was doing was having some fun, writing a little script to calculate PAYE so that next time someone asks me, i save myself a little more time.

Btw, the Source Code is here, if you’re interested.

Categories
Technology

Mac

Finally. It has arrived. After some time of deliberating, this once MS-only geek, turned and ran for the cover of open source operating systems; but not happy to just stay there, went one step further and has now immersed himself into the world of Mac 🙂

Afterall, i was tired of hearing the debates all the time; and to a large extent, i couldn’t really care which OS is best, since “best” is a loaded term and sparks off quasi-religious wars amongst the zealots; so i decided to live my opinions out, if i had any. And i definitely have some now.

My early comments can be summed in one thought which continuously bumps against the inside of my skull as i discover some new joy lurking under the hood of UI: “how on earth did i ever compute without a mac?”

Categories
Rants Technology

Clamour of Petty Kings

We have some serious issues facing our world today. Heck, in South Africa, the land of opportunity, we have more serious issues than we sometimes care to face up to. Tackling real issues is hard work. So, what’s the alternative?

Stop the press! Houston, we have a problem! In fact, call Heather Brenner out of retirement! Google does not display a link to it’s privacy statement on the home page. God forbid!

Something so serious demanded the attention of the world media (and my blog :sigh:), along with a host of, ahem, clamour, of petty kings. Good thing they were watching because if Google manage to continue getting away this kind of arrogant in-your-face lawlessness, who knows what cheecky and utterly ludicrious cheap shot they might plan to get away with next? :p

Categories
Business Technology

Ding

That’s roughly equivalent to the sound of the resonating chord which struck me this morning.

But today’s revolutionaries are sheep in wolves’ clothing. They’re lost in the economically meaningless, in the utterly trivial, in the strategically banal: mostly, they’re cutting deals with one another to…try and sell more ads. That is, when they’re not too busy partying.

Oh, if it weren’t so true. The rest of the article, is soul-searching and uncomfortably challenging because it has that “truth bites” edge to it. It’s also filled with quotable quotes, not for the purpose of quoting, but for serving as reminders when you get enough chance to breathe and realize exactly what it is you are doing.

That is to say, it serves, at the bare minimum, as a reality control against going too far in one direction; but only if it failed to catalyze something deeper within you.

Categories
Business Technology

Investing in the Learning Curve

We have a concept of what the learning curve represents, and unfortunately, the same thing can represent 2 opposite concepts. What makes more sense to me is looking at a learning curve from a classical labour cost perspective and more keenly towards labour productivity. In this sense, the learning curve is interpreted, broadly, as: the more you work with something, the more productive (cheaper, better, faster, more knowledgeable) you become. And one can recognise that sentiment when it’s expressed variously with respect to success, specialization, expertise, productivity, quality or minimizing costs. So where’s the investment?

Programming technology changes rapidly, and sometimes to the detriment of programming and business, sometimes not, but also to the advantage of progress and for the sake of technology itself. But changes are also forced to be incremental in order to be successfully adopted, since any radical departure will result in a prohibitively expensive learning curve where the economic costs outweigh the advantages of the change. Similarly, you also cannot force change too frequently, even if it’s small enough, since you never get to break even or realise a profit from the previous change. I think this last point might also be reflected in the current developer attitudes towards the “next big Microsoft thing” and the ubiquitous jading of old hats. Everyone seems to hanging five for a bit before moving forward. Or maybe Douglas Adam’s theory is kicking in?

At the same time though, you need to keep moving forward. So where do you invest your next generation of development so as to minimize the costs of the learning curve if you want to remain marketable and competitive across:
* web development
* mobile application development
* backend systems
* any platform (platform agnostic)

C++, C, C#, VB, Perl, PHP, Python, Ruby… ?

All these languages have their pro’s and con’s and more importantly, costs. As an example, I recently looked at Symbian C++ development, and the learning curve is relatively expensive. The idioms alone take time to get to grips with, so although you got a very powerful API, C++ on Windows desktop, or legacy ATL knowledge is not easily transferrable to a Symbian C++ development effort. Possible, but no as easy as say, being able to use a standard framework and language, with the same idioms, on both (all) platforms. That would be the ultimate prize (for me).

And it doesn’t have to be the same language. Case in point, i’m currently using Monorail (.NET web development) and RoR (other web development) concurrently on different projects and i’m enjoying the benefit of being able to work in a predictable (hence productive) manner switching between the two, relatively seamlessly. Whereas, switching between asp.net webform development and RoR, as an example would not be feasible. The traditional 30% context switch overhead would double.

So if you’re faced with “what to learn next”, take a closer look at the learning curve and where you can (need to) apply that knowledge in the future, in order to remain competitive- whether globally, or within your own department. Maybe it’s stating the obvious, but it’s surprising just how un-obvious the obvious can become when there are a lot of flashing lights going off all the time. So it’s not always about the language or the technology, but also a lot about the “way” in which things are done; which, by nature, is usually a little more sublime to spot since it’s hiding in plain sight 😉