0 Comments

Bumped into this a while back, but haven’t got a chance to use it so I sort of forgot about it.  It’s been floating around in the back of my mind.  I found this one pattern to be quite clever in helping with JavaScript function optimizations, especially when doing browser specific code and some other code that might only require a one time hit and sort of cache the result in the function afterward.

The code is as follow:

function A() {    
    //Do some initial calculation of some sort...    
    var returnValue = GetValueFromWebService("...");

    //Rewrite A to actually return the calculated returnValue    
    //and stop going to the web service ever again    
    //In essence, caching the inital returnValue for subsequent calls    
    A = function()  {
        return returnValue;   
    };

    return A();
}

Very neat

0 Comments

Note to self…

When you see this Application event log entry:

Event Type:         Warning 
Event Source:       BizTalk Server 2009 
Event Category:     (1) 
Event ID:           5743 
Date:               6/26/2009 
Time:               8:06:42 PM 
User:               N/A 
Computer:          CSD-Labs 
Description: 
The adapter failed to transmit message going to send port "SAPPortBilling" with URL "sap://CLIENT=999;LANG=EN;@a/99.99.99.99/00?RfcSdkTrace=False&AbapDebug=False". It will be retransmitted after the retry interval specified for this Send Port. Details:"System.ArgumentNullException: Value cannot be null. 
Parameter name: key 
   at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument) 
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) 
   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.CreateChannelFactory[TChannel](IBaseMessage bizTalkMessage) 
   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.InitializeValues(IBaseMessage message) 
   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2..ctor(IBaseMessage message, WcfTransmitter`2 transmitter) 
   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfTransmitter`2.GetClientFromCache(String spid, IBaseMessage message) 
   at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfAsyncBatch`2.BatchWorker(List`1 messages)". 

Make sure you have entered something in the Action part when configuring BizTalk SAP Adapter Send Port.

0 Comments

Been eating and hawking stuffs related to Application Lifecycle Management lately, especially Microsoft Solution Framework, Visual Studio Team System and Team Foundation Server.  During the workshop that I delivered, I often mentioned certain things that seem to be very useful to know.

Amazingly, they all have 3 sides to them.  I’m sure you all have heard about it somewhere during your career as a developer or what not, but nevertheless, I think I’ll share what I’ve learnt and I’m sure you can benefit from this if you don’t already know them.

1. The Iron Triangle of Time, Scope and Cost

IronTriangle-large

Most development project owner will want to control all three sides of this “Iron Triangle” and they sometime can be unreasonable about it.  It’s your job as the development team to educate / reason with the project owner that in all eventually, they realistically can only control two out of three and will have to sacrifice the third to achieve the other two.

So, if the project owner want all the features implemented and at a fixed monetary cost, they will have to compromise on time needed to complete the project. 

If he / she chooses to have the project completed with all the scope specified and within a fixed time (according to their schedule, not what is estimated by the development team), then they will have to pay extra cost (it will be more expensive since you might need to get a more proficient team member or tooling).

fast_good_cheapAnother variation of this triangle is Cheap, Good, and Fast (heard it from Chad Hower in TechEd SEA 2007).  If you want it done Cheap and get it done Fast, then for certain you won’t get a Good product.  If you want it Cheap and Good, then be prepare to wait for it (perhaps due to your cheap labor will need to ramp up on the technology to deliver your product first).  If you want it Good and want it delivered Fast, then be prepared to pay a lot more (it’s not going to be Cheap).

One other note on this, adding more human resources in a middle of an ongoing project will NOT help you speed up the delivery time most of the time since the new resources will need to time to get up to date on the current project situation, technology, etc.  There will be some knowledge transfer time incurred when you do this that will impact the deadline.
In most development project, it is often suggested to cut scope in favor of paying additional cost and time (Cost & Time are fixed, since most of the time it will be a fixed cost contract and the client have certain timeframe in mind).

Amazingly, one promise of Scrum (heard from Jeff Sutherland’s InfoQ Root of Scrum presentation) is the ability to break this triangle and basically offer the project owner the ability to “have the cake and eat it too”, so to speak.  Some people argued whether such thing is really possible or not, but I’ll leave it out to you to decide if it’s true or not.

2. The Three Legged Stool of People, Process and Tool

People Process Tools

There are a lot of factors in play in software development project which are:

  1. Tools
  2. Method & Process (I often think these two are actually one and the same)
  3. People

Each of these three can be viewed as the each leg of the three legged stool.  If any one of them is not present, your stool will certainly become unbalanced and will fall down.

For example, you have the best tool and the best process in the world, but the people doesn’t want to use the tool or the process (too complicated or what not).  Your project will not be successful.  Or you have the best people and the best tool in the world, but your process is a mess, you will also fail, etc.

As one of my mentors said to me, keep them in your pocket and pull them out when you need them :).  I hope you can use these two three sided tools / knowledge to your advantage and success of your project.

0 Comments

On Security Half Ass Done

Where should I begin…  Let’s take Pacific Place Mall in Jakarta for a start.  Recently, I am sure most of us in Jakarta already know about a particular incident in this place where a young lady was murdered inside the mall.  OMG.  This place is one of the high class shopping centre in Jakarta, with expensive security screening and checkpoints clearly visible on the mall entrances (or some of entrances).  So let’s see where the security flaws are…  If you come by car, as you try to enter the parking lot in the basement, the security staff will “search or put a facade of attempting to search” for suspicious things in your car, but as most of us know, this sort of thing if not done properly is just half-ass done and this is the case most of the time.  So say if I have a concealed weapon in a bag which is inside the car, they don’t really going to find them.  Oh but wait… after you park your car in the basement and try to enter the building … There is a security guy at the door, but … he doesn’t do anything.  You can just waltz yourself into the building and go on your merry way.   Another point of entry into the mall is a strip of underground tunnel from Jl. Jendral Sudirman into the mall.  There is a security checkpoint there, but again, I’ve seen enough people going through the checkpoint and causing the alarm to beep, but… no extra security check was performed by the guard.  Of the latest, I’ve seen it in a lot at other places as well.  Totally, totally false sense of security.

On Cause and Effect

In a nearby rich neighborhood from where I live, oh heck, let’s just call it by name, Kebun Jeruk Intercon, one family home was robbed.  The detail is not important.  It just happened to involve a small kid, maid of the house and stranger pretending to know the owner of the house and was granted access into the house by the maid or something like that.  One thing that you should know is that this particular neighborhood connects two major roads (Joglo Raya and Meruya) and a lot traffic is taking advantage of it by passing through the neighborhood to get from one road to the other.  Not long after the incident, the usual passageway through the neighborhood were blocked (at least from Joglo Raya side).  No more traffic can get through from that side.  I’m sure as a community, the neighborhood has put a lot of thought before closing itself to the public, but I don’t think they thought about the effect of such action.  All the traffic, and I mean a lot of it, that used to go through that connecting road now has to be redirected somewhere else.  The problem is, the other supporting roads are just inadequate to receive the new traffic flow and walla, the already hellish traffic area is now becoming more unbearable.  Where it used to be a pretty smooth 10 to 15 minutes ride through Srengseng, now becomes 45 minutes to 1 hour to go through.  And the funny thing is, even though they plugged the main entrance, there are a lot of other ways to get in / out from that complex.  I can think of 2 to 3 already.  And Indonesian being resourceful as we are can’t help but to take advantage of these “jalan tikus” (alternate roads).  The people using these alternate small roads are so many that they are causing more traffic jam in Joglo Raya that is as I said already a hellish road, especially one narrow part of it.  Do the people in Intercon deserve to feel safe?  Of course, they do, but … are they really safe now that they have closed that particular road entrance?  I think not.

What’s the Point?

My point for this rambling is that, in the end, you just can’t depend on other for security.  You have to take it seriously on your own.  Be aware of your surrounding and the lack of security there of.  Be proactive and less reactive.  Knee jerk reaction like in the second story will only cause more problems, if not for you, then for a lot of others and really… in that particular example, it’s not even a complete safety solution.

0 Comments

On Roundabout Sillyness

Who the h*#% invented this useless thing?  At least of every places that I've been to, I've only seen one that actually work properly and that is certainly not in this country (Indonesia).  All the roundabout locally is nothing but a huge trap for traffic jam / slowdown since nobody actually put any sane thought on how to do correct traffic flow for it.  For those who does not know what I'm talking about, roundabout is that circle structure in a middle of a 2 or more ways road intersection.  For example:  Bundaran HI or the one in Kelapa Gading or wherever else you can think of. *sigh*

emoticon

On Silly Road Design or Lack of It

Every day of the week since I got back to Indonesia (let see, counting this year, it would be already 5 years), I have to endure one silly portion of the road that is called Joglo Raya.  Let see, how should I begin...  Okay, imagine a 4 lane (officially) road, 2 going to one direction and 2 going the other direction which suddenly narrow down to 2 freaking lane (1 going one way and one going the other way) which will go on for about 1 km or so and suddenly becoming a broad 4 lane (officially) again. Can you say... BOTTLE-FREAKIN'-NECK???

Combine that with the unruly Jakarta's motorists... remember, I mentioned 4 official lanes... unofficially, it's 6 or 8 freaking lane, meaning you squish 4 lanes of traffic into one that supposed to be only 2 lanes going the same direction.  Can you say LACK OF TRAFFIC-*#$%&-CONTROL & PLANNING???

I don't think I have to say anything more on this subject. *sigh*

emoticon

On Queueing or Lack of It

One thing that I freakin' hate is that people who just don't understand about queueing etiquette.  Surprisingly, I've seen sticker / banner on this topic somewhere (forgot where I've seen it... maybe at the airport, not sure) in big big letters.  Something like ...BUDAYA NGANTRI...  But, apparently Indonesian public or most that I've encountered anyhow are totally foreign to this concept.  This, more than anything is one of the most annoying habit that I found of the local people, especially on the road, but not constrained to one.  Yesterday alone, I've encountered numerous of this, on the road and when queueing for food... say at Es Teler 77 or after church trying to buy a street vendor's food.  *sigh*

emoticon

Are You a Lemming / Cartman Wannabe?

lemmings_by_mirzOh while we are on the topic, how come I get the impression that Indonesian public mentality is similar to those video game characters in Lemmings.  You know... if the one in front is jumping off a cliff the rest will basically follow the one in front.   Plenty of proof of this that you can see every single freakin' day.  Don't believe me?  Just pay attention the motorists on your way to work or back.  One of them will run over a traffic light and about 6 or 10 others will follow closely behind.

COME ON, PEOPLE!! Stop the Cartman - me first and screw you all - mentality (If you don't know what I'm talking about, look up South Park somewhere) already *sigh*