Code Publishing

Being a subscriber [either by email or RSS] to various sites, i get a plethora of handy hints each morning which i archive, either physically or mentally- depending on the juiciness of the hint. Over time, i have noticed that the number of code samples being published daily is increasing. Some are new, some not. Others; interesting twists on old concepts and every once in a while, a real gem. Regardless of their subjective quality, it is encouraging to see the larger developer community thriving and eager to share. Yet, not without it’s a funny little twist.

It’s easy enough to code and it’s also getting harder ๐Ÿ™‚ Gotta love paradoxes. In getting easier to code, it’s getting easier to do the cool stuff that used to take “rocket-scientists” many lines of code and various libraries to get right. It was fragile work and the versions between languages, compilers, linked libraries and even OS’es sometimes, had to be just right. Not so much anymore though. But gettting the fragile stuff right taught you things you didn’t know you needed to know. And on the plus, your application failed fairly quickly [yes, that’s a plus], keeping that feedback loop tight. Now, that feedback tends towards the false-positive.

Applications take longer to fail because the semi-automatic cleanup of resources and layers of abstraction [framework of a framework of a framework] do their best to hide the fragile stuff away. They’re not perfect [yet] but we do rely on them to the point that we can end up writing code with “unknown” consequences [to ourselves that is]. Particularly when we do something outside the majority solution scope. More than it being a problem for us, in our enthusiasm, word is spread too quickly and it becomes a problem for someone else too. Hence an equally growing number of “You did what?!” and support forums ๐Ÿ™‚

And this is where it also gets harder because the framework of the framework of the framework is so overloaded to accommodate every conceivable situation that the volume of required interacting objects increases. And it’s knowing the nuances of each object which is not always easy to do, particularly if you’re not working with it every day. So when your brain hits upon an ingenious little trick, how sure can you be about the assumptions the frameworks below you made about your neat little implementation?

Nonetheless, the ecosystem of sharing we have created thus far is well balanced with a lot of diligent watchers out there making good catches and as enthusiastically sharing the gotchas. It’s keeping that balance in harmony which is interesting as the increasing number of developers communicate their increasing learnings in an increasing technology set within the increasing scope of business possibilities. All this, within the increasing number of mediums in which to communicate…

Of course, the disclaimers about the code not guaranteed to be working in a production environment, yadah yadah yadah, are all good and fine… but you do need to take responsibility for what you publish ๐Ÿ™‚

Categories
Technology

An Assumption Makesรขโ‚ฌยฆ

Assumptions are wonderful. They allow you to fly ahead without needing to fuss over any time-consuming details… until, at least, the assumption fails you. Like the “ref” keyword, for example.

A data type is a value type if it holds the data within its own memory allocation [Eg. numeric types, bool, any struct types]. A reference type contains a pointer to another memory location that holds the data [Eg. String, any class types].

So, when it comes to argument passing in .Net, by default, all value types are passed by, well, value ๐Ÿ™‚ and reference types too are also passed by value. But value in the case of the reference type, is the value of the reference. This little nuance [nuisance, at first] popped up quite late in my project simply because the implemented design didn’t call for any dynamic re-allocating, until one particular test started failing during what was supposed to be routine “refactoring”. I say “supposed to be” because the refactor ended up changing the behaviour hence no longer a refactor… anyhoooo…

My assumption [reference types = raw pointer, ala C++] allowed me to gloss over an entire section of the C# specification. Had i paid any real thought to this little abstraction way back then, i would probably still have forgotten about it when i had to call upon that knowledge for the first time, months later. Or not. At least now i know i won’t *ever* forget about it ๐Ÿ™‚

Any which way, i still think assumptions are good. Even better though if you can change them. And best if you can constantly challenge them or have them challenged. And yes, an assumption can lead you off into the wrong direction, but hey! At least it’s a direction. Could have indulged the specification in depth before hand and told my employer to wait n months while i read all about C#… don’t think that would have worked too well either.

As always, some tempering between the extremes is a refreshing welcome…

Not Responsible

Experience with service providers over the years has taught me one thing and that is that they all share the same common philosophy:
“We are not responsible for the service we provide you”

Telkom, the South African telecommunications monopoly has this in their terms and conditions, amidst a bunch of other CYA [cover your ass]:
“Telkom may provide hyperlinks to websites not controlled by Telkom (“target sites”) and such hyperlinks do not imply any endorsement, agreement on or support of the content, products and/or services of such target sites”

So, more than just not being responsible for the service they provide you, it seems they are not even responsible for their own website ๐Ÿ˜ฎ How many other companies out there do the same? And then we perplex at the breakdown in the fabric of society. It comes as no surprise really when the public examples are so insipid… aaah, but that itself is another discussion.

Vodacom too has it’s fair share of CYA. I’ve had *issues* with the software they provided [there is no alternative] for monitoring data usage. On more than one occassion i’ve been short-changed 80MB-100MB. Their customer care [less] response: The software we provide you cannot be used to reliably track data usage. Again. Another weak and, quite frankly, pathetic excuse- in the sense that is “so miserable as to be ridiculous”.

ADT, a security provider also suffers the symptoms of this modern day lukewarm customer [dis]-orientated behaviour. After waiting outside our house, in the rain, at night, for 45 minutes for their patrol vehicle to respond- we demanded an explanation. That was weeks ago. Still no word after many phone calls. Again, it seems that they are not responsible for the service they provide.

Edgars, yet another clueless organisation, allowed my mom to purchase a gift card for me which had no credit on it ๐Ÿ™‚ Again, that was my problem. What i have had to go through to NOT have this problem resolved, is unreal. The rest of the list is thick with these weak-willed corporations who make it your problem once you’ve signed a deal with them. And read the fine print. You will see that any problem that does arise: eventually becomes yours. Afterall, you made the decision to deal with them, so deal with it ๐Ÿ™‚

‘Cos remember:
“We are not responsible for the service we provide you”

Disclaimer: the author of this blog cannot be held responsible for any thoughts, messages and opinions expressed herein… yeah, riiiight! puhlease ๐Ÿ™‚ imagine that? what would be the point of saying anything if you weren’t held responsible for it?

Software Updates

It’s perhaps appropriate that i should update my blog with a post on Software Updates. Been quite busy with some exciting delivery my side along with getting a new machine mid-iteration, which is a decent distraction: T60 2.4 Duo. VERY Nice machine and overall impressed with, well, just about everything- particularly ThinkVantage. But in getting my machine production-ready, the sheer volume of updates that i had to do was *staggering* [slightly exaggerated] which got me thinking about my Gran…

Approaching 80, she’s actually about 60. She emails and uploads photos from her digi cam and keeps track of her budget using Excel. Not bad for a soon-to-be octogenarian. But how often does she update her PC?

First, there’s the OS updates- in this case: Windows Update. Then there’s the driver updates for anything particular on your machine. Then there’s manufacturer-specific system management updates and that’s before you get to your “third-party” application software updates like anti-virus, for example. And these are not small updates either.

Windows Updates: about 21 in total [many MB] and the machine came preloaded XPSP2.
Driver updates: ATI as an example: 47MB! Thats’ not including updated drivers for fingerprint readers, wireless drivers and yadah yadah.
System Management Software Updates: Yes, ThinkVantage itself needs to be updated before you can use it to check for updates ๐Ÿ™‚
AntiVirus updates: using AVG and that totalled about 15MB from my current installation. Could have used preloaded Symantec but the updates are just as heavy.

Granted, not all these updates are critical- but how grokkable is determining severity levels based on the information presented:

“No, ma’am the ATI update is not critical, but we do recommend it” – or-
“that update for XP 64-bit is optional, so don’t worry about it.” Which means what [to my Gran]?

With all these updates needing to take place, and getting back to my Gran… What happens if i DON’T run these updates regularly? And another thing: WHY are there so many updates?

Is the software just poor quality?
Are all these companies finally adopting Agile and releasing incremental “enhancements” as opposed to fixes? ๐Ÿ™‚
IS QA just getting better at what they do and finding more and more problems?
Are systems become so complex that inter-operability and coding for it is laying a foundation for latent problems?
Is software been pushed out the door because the market has become so aggressive that an incremental release strategy helps keep the company competitive?
All of the above?

Too many questions for a Saturday morning, but i wonder just how many new PC/laptop owners install updates knowingly? And if they don’t know they’re actually updating [preconfigured under the guise of “user-friendliness”] if they notice their bandwidth getting hogged every so often?

…there’s a surgeon doing a remote heart transplant operation and s/he accidently removes the kidney as well because the system software was not configured to update automatically… ๐Ÿ™‚

I think we still got quite a way to go before we can comfortably integrate technology easily into our lives…

Setting Standards

Guy recently referred me to an article on how user’s read the web. It’s implications were poignant when mixed with the motive of acceptance and market share.

We know the most efficient way to consume online information is through the technical process known as “scanning”. From emails to advertising, knowledge to news, online users inundated with information have established a coping mechanism of scanning. As presenters of online education material, do we acquiesce to the the masses and achieve acceptance and market share by presenting radically shortened content? Or do we draw the line and encourage proper reading habits through presenting albeit verbose; accepted educational tautology?

A different discussion, but one closer to this thing called software development; how much of what we do, as a software community at large, results in encouraging bad behaviour?

When you sing, you begin with doh-ray-me, when you code you begin with รขโ‚ฌล“what say ye?รขโ‚ฌย. Indeed, what sayest the project investors? Beginning with the processes we choose to manage and define our project, how much of what we do becomes an AntiPattern? Further, do we aspire to eradicate that strangling weed in future projects. This is not a process-related condition, it’s a human behaviour condition and so it affects the traditional plan-driven, the agile and the anything in between processes.

Language support too has its fair share of nasty accommodations. I recently ended on the guilty side of calling a pure virtual function from the constructor. Oops. Now, in C++, you’re likely to get a nasty dialog box or even better: a compiler warning. With C# and Java though, although not a recommended design [and sometimes classified as unpredictable, depending on whose documentation/interpretation/blog you’re reading], the memory model does allow you to get away with it- and what’s worse: all your tests will pass! ๐Ÿ™‚

Lets look at browser differences and XML data islands. They make life very easy [for simple things]. Building that into a dynamic-content interactive online small-medium enterprise application has great potential for building another BLOB. Granted, anything can become a BLOB if you you don’t manage it properly. In this context, as handy as they are, are not the norm for this project which implies extra process burden in terms of managing it’s lifecycle if included. So without even going into CSS differences, browser standards can breed their own demons. And considering CSS support, IE lets you get away with a lot, but at what cost to your career as a designer?

Database engines suffer the same potential for disaster. There’s a standard which is not always designed for rapid development and then there’s the exception to the standard [eg. self-incrementing fields] which does make development a little easier. Again, at what cost?

Of course, the counter-argument is concept focused on pioneering; trend setting and evolutionary. So you can, as with everything, form an opinion first and then pick your arguments to justify your position. Be that as it may, CheeseOriented debate is quite tiresome.

In your arena you need to decide what’s ultimately detrimental and control that within your area of responsibility. In a largely collaborative software community the decision makers that defend or propose standards determine the greater good. They engineer the breeding ground for the programming quality of the future. No wonder these standards issues are so hotly contested. Regardless of how much is motivated by purity of intent and how much by market share opportunity, we will ultimately be forced to work with the standard of quality we didn’t fight for.

Categories
perspective Technology

Methodology Wars

It is interesting to see the increasingly varied responses to Agile as it waxes and wanes in popularity. From within the ranks of the new order rises a breed of zealots determined to see their ways overthrow the old. The stoics glare down at this revolution with some contempt and evidence of its untrustworthiness. The evidence itself is backed up by their reputation and that should be enough for victory. Yet the new order marches on, and in between, there’s another minority quietly getting on with fusing the gap…

I guess my view of government organisations is influenced by the incompetence of many. As grossly unjust as my opinion is, i am encouraged by many others, and most recently by: Army Simulation Program Balances Agile and Traditional Methods With Success. All this while i’ve been quietly researching on combining the two [motto: to be Agile enough to do Waterfall] and wondering just how this fusion would play out in a larger project?

Rather sweetly actually: OneSAF is a success!

This does pose a bit of a problem for the stoics and zealots though. Who gets too claim this victory? Or will they both ignore this one ๐Ÿ™‚ Or maybe we can expect a new range of books both for and against OneSAF?

Refactoring Agile: How OneSAF Could Bave Been Better.
Traditional DeadWeight: Agile Carries OneSAF.

All i can say is: “Kudos to Mr Parsons, LTC Surdu and the team on some clear thinking!”

Categories
Life perspective

Mother City Riots


Rated as one of the places to visit, Cape Town has just about everything to offer the resident and tourist alike. And all kinds of residents and tourists are catered for; from the dodgy back-alley fix to the deserted beach moonlight stroll, Cape Town offers it all. But that in itself does not make the Mother City special. Just about every international destination has its fair share of glamour and sham. What does make Cape Town beautiful, is “tha mountehn”.

Aaahhh, tha mountehn. No doubt about it, there’s something about that piece of rock which takes the edge off of life and slows the city down to village trot. From sandboarding to surfing, sunsets to riots- Cape Town has it all.

Wait a minute?! Riots?! Yes. Riots. Now, for those who live in Cape Town or have been following its news, the current “Security Strike” has been going on for close to 8 weeks now. The fruit of the last 8 weeks of discussions has been summarised as a “deadlock”. In the meantime, those who choose not to strike get murdered or beaten. Further, while security is not available, gangsters and thugs take advantage of the situation to help themselves. Those who have the ability to put an end to the strike claim helplessness and all the while, they fuel the frustrations and anger which boil and burns until one day…..

No, this is NOT a picture taken during an apartheid South Africa. This is 16 May 2006, 12 years into building a democratic rainbow nation. On one hand:

“Our right to protest is an essential right. Our right to strike is guarenteed in the constitution.”

But does that include the right to murder, set busses on fire, vandalize the city and loot? But make no mistake, those on strike have a legitimate concern which is not being addressed. Their wages have not increased in 12 years?! Although not condoned, is this not just a case of “going postal” on a wide scale? How many of us have felt the frustration of not being heard by INSERT CORPORATION HERE and have wanted to scream, shout and throw a hissy- maybe even beat someone up. Some actually do, but they pay the price for their anti-social behaviour.

However the mayhem and chaos closes, better it stops soon. Unlikely though when the negotiations are conducted in the spirit of power and domination; no real sacrifices and flowering with taunts and poisoned with emotive appeal. An interesting piece of fuel in this fire is demonstrated by some of the placards carried by strikers: “US and EU are anti-poor” and “Down with imperialism”. But that’s another discussion…

Aaahhh, tha mountehn!

Some more riot photos below that were circulating on email. Warning! These are, IMHO, controversial photos and probably best not viewed if you’re a little queasy or are very sensitive to harsh images. Also, i don’t know the context of these photos so don’t even pretend to judge the photos and the incidents or me by these images.
I just find them fascinating from a politically-photographic perspective ‘cos they carry so much power to potentially skew the truth… there are more incriminating photos which i’ve decided to leave out ‘cos they’re just too hectic for this blog…
A B C

Language Appeal

What makes one language more popular than another? Why would a language like ‘C’ be so visible and popular amidst today’s advancing 4th generation languages? Methinks the same reasons why English is such a popular communication language today…

Tear and tear. Look the same but quite different. Tear has more in common, phonetically, with bare while the other is closely related to beer. Hair and hare. Red and read, the past tense of read. Break and its past tense broke, yet brake and braked, as applied to a motor vehicle which came to a sudden stop.

So we have a range of words that break all the rules and it has been said, more than once, that there are more exceptions to the rule than not in the English language. And let’s not even consider the variances in English, which we all assent to being, by and large, English. American English, British English, South African English and then Spanglish and the like.

Yet with all it’s complexities, it’s gaining popularity around the world. One reason [out of many] why it continues to be so popular is because you can do so much with it and still be understood.

I sed tht i’d b l8. w8 4 me. c u sn!

There are times when de-intellectualising a conversation can be welcomed.

In most other languages you can’t even do half of what i’ve just achieved above. Yet, most anyone reading would understand what’s been typed. And for the non-legalistic in us, that’s enuff. And more. It’s a sign that we can explore boundaries of that one human domain of ours which is so sacred and yet so vulgar: communication.

So if a programming language, regardless of its complexities, gives us the freedom to create within itself, it will prove to be popular. Classes, templates [aka. generics], polymorphism, reflection; facilitating the art of creating in order to communicate is of paramount signifigance in terms of a language’s popularity. But it depends on “what” you want to create.

Adressing memory, pointers, embedding assembly; different kinds of creational facilities but again, oriented towards enabling your creative side in effecting communication.

C#, C, C++, Java, php, perl, vb, sql, python, shell, delphi, ruby, fortran, smalltalk, erlang, cobol, tcl… they all remain popular, within their own right, contrary to any “silver bullet” promotions in any one particular language because they continue to provide the programmers with their creativity fix as part of getting the job done. When the language becomes so inhibiting that there is one and only one way to do something, it shall quickly die a welcome death.

“What do you mean i can only ever have one type of Class: sealed?!” ๐Ÿ˜ฎ

Categories
Business perspective

Continuing Education Gaps

Reading through one of Karl Seguin’s blogs on ASP.NET isn’t always the right tool it convinced me more that there is a gap in software education. Not in formal education, but in continuing education.

Computer-science and programming curriculums at tertiary institutions have remained fairly static over the years inline with accommodating their primary objective: concepts. They will use a set of technologies in order to convey those concepts but not often do they specialise in that technology [at least early on in the program] purely for the sake of that technology. That’s where continuing education takes over. You won’t go to university to learn Apache, but you will learn web server concepts. Outside of university, it’s your ability to join the dots between web server and Apache and apply that knowledge [wisdom] that determines your worth.

Formal education has the advantage that concepts don’t change as rapidly as the tools and technologies. It’s continuing education that sit with the task of trying to keep up by providing “expert” education on new technologies. And since this is an ever-changing and time-consuming task, the foundation established by formal education is not taken advantage of. It’s not an objective. That is to say, the language of function [the what] disappears from the curriculum and the course becomes a powerpoint presentation dripping with the language of form [the how].

Considering that business processes and requirements have increased in complexity, programmers are required to know [minimally] “how” to solve these issues. The available toolsets have managed to meet those demands [and some] and assist the solutions, but there is a lot more going on that you need to be aware of, albeit even vaguely. And when you engage in advanced tools to faciliate advanced business needs, the demand that you know what you’re doing and not just how to do it, increases. From managing a web farm to architecting an e-commerce site, knowing how to do it is half the task. When you know what you’re doing, you’re better equipped to handle the esoteric stuff Mr.Murphy is well versed in at throwing your way.

How to distinguish postbacks in ASP.Net seems trivial. Look up the sample code and documentation and without further ado, IsPostback will solve all your problems. But what is a postback? Why do i even need to distinguish it? [you think i’m kidding? :)] What data is riding on a postback? What methods are invoked during a postback? What happens when i have dynamic controls? Knowing a little about the what behind the scenes goes a long way to solving a “but it just doesn’t want to work” scenario. It will also eliminate the many “WT..?!’s” you might come across when reviewing code before releases.

The problem and the solution is shared between both continuing education providers and learners. Learners need to realise that just because InstitutionX gave you a certificate that says you can do the job, it doesn’t mean you can. When you learn “how” to assign directory permissions, or “how” to nest repeaters, keep in mind “what” you are actually doing. To understand the impact of “what” requires you to invest further in your own education. It’ll only make you stronger. Educators don’t have the time/resources available to point out what may seem to be obvious.

Think critically. Remember what you have learned or at least know where to find it when you need it. Be conscious of every line of code you write. Know exactly what you are doing. Write tests! And if you don’t know why it’s breaking, it’s because you probably don’t understand why it was working in the first place… :p

Rules

Rules are meant to be broken, or so the popular expression goes. There’s something about that phrase which strikes a chord of assent within ourselves. There’s also another chord which repels strongly and begs for rules to be followed. As a result, we swing between judgements as to wether or not a rule should be followed or broken depending on circumstance. We confuse this swing with perspective because we have failed to implement a principle concerning rules. And we fail to implement principles because we fail to understand the intent of the rules.

From software processes to religion, politics to social behaviour, there are rules. Divined or ordered, these rules become established within a context and serve as an education for acceptable behaviour. From the start of implementation, two extreme camps set up early to hold the rules in dynamic tension. The legalists and the liberalists. Those who obey, to the letter, and those who don’t.

In the those who don’t obey category, some break rules because there’s another rule which justifies their position. Others break the rules through ignorance and others through a conscious anti-social drive. In the those who do obey rules category, there are also interesting differences.

Some will cross their t’s and dot their i’s so carefully, they end up missing the purpose of the rule itself. The rule itself becomes the end. The reason for the rule’s existence forgotten and not as important as actually keeping the rule. Others will keep the rules steadfastly in the hope that the end will be achieved through the means. The motives for any one position [and this brief list is by no means assuming it’s complete] are numerable and can even be the same motive for different positions. So what are the essentials of the rule?

Before the rule, there was a condition. In order to [usually] discourage the growth of that condition, a rule is established to improve that condition. When that rule starts to be applied outside of that condition, or is contrasted with another rule, more rules are entrenched to further clarify an increasingly complex set of conditions.

So, if we get back to the essence and reason for the rule in the first place, a decision to “break” or follow the rule becomes simpler. It can also take more courage [either way] since it could fly in the face of a traditional interpretation; however wrong that interpretation may be. But challenging rules and breaking them are 2 very different actions that may actually manifest with the same result.

Now that the essence of the rule is defined, a decision needs to be made regarding its worthiness in keeping. But that’s a moral decision based on belief systems and is impacted by who exactly the rule-giver is; and that’s another discussion…