Tuesday, January 12, 2010
Things I hate about my Mac
I find the Mac incomparable with the PC. The Spec of My Mac Book Air is about the Spec of my previously owned PCs I bought 2 years ago but much faster than my last PC with far better Spec. Believe me, you won't be comparing "Apple" to "Apple" comparing the Mac and PC.
I could hear someone whispering "That's cos u were running Windows". Wrong!! I have Windows 7 running on my Mac too and it's Blazing fast.
My conclusion is that I will like to believe this is due to some sluggish defect in the PC design.
Spoken by a recent Mac user ....
However, I hate a few stuffs about my Mac.
1. My MacBook Air has just one USB slot. This is no problem with Mac but on the other hand it is. I could have chosen other model other than the Air you would say, but then I had the option of a USB hub you would also suggest. Wrong! The Mac work's better with powered USB so I could not have my network running and still have my drive on. Solution - Buy a powered USB hub - $35
2. NTFS drives are loaded as readonly. Just wondered why Apply had to make this the default option in Mac. OS X reads NTFS pretty well and should also write if you ask me.
Solution - Include UUID in /etc/fstab file (tiresome and often require restart) or buy a NTFS Manager like Paragon NTFS for mac $40
3. Mac is too pretty. I find it hard to imagine the future of my Mac with faded keyboards and trackpads. Think I need the Wireless keyboard and mouse - mouse I say, I want the Magic Mouse $70+$70 = $140
4. Can't get Mail to work with Exchange Server used in most enterprise. Solution - Buy Mac Entourage bundled with Microsoft Office for Mac. $150
5. Miss Visual Studio So bad. Wish their a version of that the works on the Mac. Mac offers XCode, plus I got Eclipse working (even though they confused on Carbon or Cocoa) and MonoDevelop works great too. Solution is buy CrossOver or Install Windows 7 on your bootcamp and run from VM Fusion with Unity Mode. - average cost - $70 (cross over) + $80 /2 = $75
6. Can't upgrade my MacBook Air RAM beyond 2GB as it has no drive-bays. The RAM is soldered unto the board. I run quite a lot of VMs and 2GB would not be enough. These days my system locks up when I boot up my bootcamp Windows from VM fusion. Solution is buy a Mac Mini and moves task to it. $600
At the end of the day, I have $1040 worth of hatred for my Mac but despite that, I still LOVE IT...
Monday, January 11, 2010
Fixing Ghosted File
On moving files sometimes especially unto a destination NTFS partition, I realised some of the files moved are ghosted. I investigated and discovered this is due to incomplete copy operation. In my situation, the copy process probably did not clean up successfully after the copy. Why will this happen? I already lost files to this previously as I am left with no choice but to delete such files.
This time I had to make sure these files these files are recovered. On googl(e)ing, I learn about undisplayed file attributes of Unix and Mac files. Also learn that tools like RixStep ACP XFiles tools help with controlling such attributes. A single use license cost about $59.
Later I learn about the SetFile tool bundled with the XCode tools. An accompanying GetFileInfo tool will give
$ GetFileInfo [file name]

this is what's shown for Normal files. In my case I had "brok" as type and "MACS" as creator.
This can be corrected by using Send File as below
$ SetFile -c "" -t "" [file name]
Knowing myself not to be able to remember this months down the line, I added this to my .profile file under the unghostfile alias.
SSIS vs Informatica
Trust me, I was quick to recommend SSIS which I am very familiar and very recently just had a laudable success extracting and Migration of Billing Information from a Legacy ENDAN (SQL Server based) application to Singl.eView from Intec.
On further discussion with the vendor, he would prefer the use of Informatica (first time getting to know this). I was able to show him lots of cool features SSIS have to offer.
Afterwards, I decided to know more about Informatica and found this on the net
Informatica does not have an equivalent of SSIS’s UNION component . This is a big problem for what I’m trying to do because a lot of the logs that I’m trying to load are in different folders (to represent the different web servers). Informatica requires 2 pipelines (see #3 below) to extract this data whereas SSIS can just have 2 source adapters in the same data-flow and UNION the data together.
SSIS’s method of loading multiple files (i.e. the "Multiple Flat Files Source Adapter") is a lot better than Informatica's. With Informatica you have to, externally to Informatica, build a list of files to process and then pass that list back into Informatica. To make this dynamic at runtime you would have to shell out to an external process to produce the file list. This is not pleasant – especially compared to SSIS’s very simple method of just specifying “*.log” in the source adapter.
I have a pipeline (built in both SSIS & INFA) that filters out all comment lines from the web logs, extracts all the individual fields (e.g. Timestamp, ClientIP address, URI, Referrer etc...), and inserts into a SQL Server table. The SSIS pipeline is working on ~150000 rows and completes in ~23 seconds. The Informatica method (which uses 2 pipelines cos of #1 above) takes ~45 seconds. Even 1 Informatica pipeline on its own (working on about half the records) took ~27 seconds. Bear in mind also that the SSIS pipeline was run from BIDS and as I have previously mentioned, BIDS places a large overhead on the execution of a package. I would suppose that Informatica does not have the same restriction. In short, SSIS seems a lot quicker!
SSIS’s method of dynamically setting the destination at runtime (i.e. configurations) is a lot better than the Informatica equivalent. With Informatica you have to configure each task to use the dynamic value, and setting up the value itself is a manual process because you have to manually handcraft what is termed a parameter list. SSIS does this using the configuration wizard. Let me say again, EVERY Informatica task that uses an external connection has to have a dynamic configuration set up using this method; with SSIS you do it in one place, on the Connection Manager.
This even has more indept comparison
http://download.microsoft.com/download/1/0/3/103fd39e-3ca4-4db7-a087-1263dc6ed0b1/CompIntTools.pdf
Monday, January 04, 2010
Happy New Year!
Monday, December 14, 2009
Me & My Mac
Tuesday, July 14, 2009
Duplicate Filtering in SSIS
Having being frustrated on lack of duplicate filtering in SSIS, I decided to take a work around, first dump the data in a temporary table and pick it up with "select distinct … “ in the next task. This work around works though but fails in instances that the filter had to be applied on some of the columns selected unlike “select distinct ..” that applies across all the selected columns.
Alas!!! SSIS provides this in the Sort Task and can be applied just as I want it in my project. Simply select the columns you want to filter on as the sort keys and check “Remove rows with duplicate soft values”. Voila! problem solved.
IMHO, I consider the sort task an overkill for this purpose but no other alternative unless the developer will not mind building a dedicated filtering task for SSIS. SQL Central provides samples on how to build SSIS task.
Monday, July 06, 2009
Multipoint Collaborative Application
A client walked up to me after a recent presentation asking how to go about having a collaborative multi-mouse based application. I pulled back a bit before responding, quickly kicking around in my head. What will happen if I got multiple input device (mouse devices) in Windows? It should just work. Notebooks has had this features for years and it just work but then I gotta see what happens if I got more mouse.
Secondly, if it does work, how do I differentiate which device is in control in an application. They both most likely will generate same Windows event. – brain dead lock.
“Ehmm“ I fumbled to respond. “It’s possible but I can’t give you a solution straight up. Can we talk about this again in a couple of weeks.”
I bought an extra USB mouse device (already got a Mogo mouse) on my way home. Connected this up to a notebook and it all worked. All controlled same mouse as expected which left me with the second question. “How do I differentiate this in an application”.
Of course, Google to the rescue. After hours of google(ing) it with B’ing, I came across this article by P. Opdahl from on CodeProject.
It’s quite an interesting Read and done with C++(Not so happy about that, so quick to understand C#, VB and Python these days). I search some more and and more and came across Microsoft Multipoint SDK. How could I have missed this?
SDK is installed with sample application of which I find the Quiz sample most interesting.
The Microsoft Multipoint SDK can be downloaded here. Note: This won’t install on Windows 7 unless maybe you install in XP-Mode. I don’t have Intel-VT so this is no option for me.
More Resources
Thursday, July 02, 2009
Record Value Frequency In SSIS
I blogged last week about a problem on Record Value Frequency in SSIS. I suggested in the blog post on how to go about taking care of this.
“The only way I could see out of this is to write a CLR function to achieve this which I am feeling so lazy to do but still has to be done.”
This I finally had time to do and pasted below is the simple CLR User Defined Functions (UDF)
static readonly Dictionary<SqlString, SqlInt32> myDic = new Dictionary<SqlString, SqlInt32>();
[Microsoft.SqlServer.Server.SqlFunction]
public static SqlString SvSequence(SqlString colValue)
{
SqlInt32 nextValue = 1;
if (myDic.ContainsKey(colValue))
{
myDic[colValue] += 1;
nextValue = myDic[colValue];
}
else
myDic.Add(colValue, 1);
// Put your code here
return nextValue.ToSqlString();
}
[Microsoft.SqlServer.Server.SqlFunction]
public static SqlString RestartSequence()
{
myDic.Clear();
return new SqlString();
}
Notice the readonly used in the static declaration for the dictionary. This is enforced by the compiler for static class member as a requirement. I also had to create a reset function which IMHO is not that cool but I need a way to reset this as the value kept increasing each time the UDF is called.
dbo.RestartSequence ;
select AccountId, dbo.SvSequence(AccountId) from dump
PDC 2009
I have always known that PDC event will be in November but not sure if the date has been fixed. Today, I had to start writing plans for November and realized I have no idea of the actual date.
After some Googling with ‘Bing over the net, found the dates to be from Tuesday, November 17th through Thursday, November 19th. Not so excited that it’s going to be in LA (LAX Convention Centre) again!. Would have preferred some other city like San Francisco or any other cool place Microsoft may think up.
Do join the wave @pdc09 and search for the tag name #pdc09 for the excitement buildup. Also register for the mailing list.
Mike Swanson had so much to say about it in his blog.
Monday, June 29, 2009
Pimp my Notebook

After months of feeling so sorry for my Hp notebook and prayed silently that i can afford a new mac pro. decided to shape it up a bit. Stepped up d RAM to blazing 4G, OS to Win 7, HD to 320GB (7200rpm) and then adorn it with these stickers.
Wednesday, June 24, 2009
Hi Pal!
A dear friend I met at the summit earlier in the year.
He had this as cover of his presentation in China just after the summit. Hi Pal!
Record Value Frequency
First I’d like to quote my recent tweet on this issue
Have always considered SSIS to be extremely flexible but lately found wrong. Nevertheless, yet to find any ETL too that can beat it
I think I may have been wrong to blame this on SSIS but rather on limitations of TSQL itself. My situation is a need to have frequency of a record value indicated in a column as indices as below
Value | SEQNR |
1 | 1 |
2 | 1 |
2 | 2 |
4 | 1 |
4 | 2 |
4 | 3 |
I tried to use Rank() with partition as shown in snippet below but got a different result. Also ‘Bing(ed) this but came up void of a similar issue.
select value, Rank() over (partition by Value order by Value)
This is like to use and inject into SSIS package. Doing this with combination of SSIS task is not quite straightforward.
The only way I could see out of this is to write a CLR function to achieve this which I am feeling so lazy to do but still has to be done.
Monday, June 08, 2009
Ftp’ing files in Folder in SSIS
Recently, I came across a need to copy all csv files generated from an SSIS process to a Unix server. FTP became handy for this purpose. The FTP SSIS task will not work with folder/directories – came up with error message
File Usage type of connection "xxxxxx" should be "FileExists" for operation Send
This error message is quite misleading. The interpretation is that once you the File Connection Manager being used in the FTP task has a property Usage Type and this Usage Type must be set to “File exists”. This automatically limits the usage of the FTP task to files rather than folder/directories.
The solution is to use the Foreach Loop Container task and place the FTP task within it. Literarily, the loop container enumerates all the files and place them in a variable. This variable is then used in the FTP task.
Foreach Loop Container with FTP task embedded
Wednesday, June 03, 2009
Gearing up for TechEd Africa 2009
TechEd Africa 2009 – Potential Lives Here
‘TechEd is in its 10th year and is positioned to be the best yet! As promised, this is your pre-notification that the TechEd Africa 2009 website is now live and open for registration!
Be sure to take advantage of the Super Early Bird offer and forward this invite to your Colleagues and friends’
Be part of the experience. So much to discover. Hundreds of ways to learn.
Dates: 2-5 August 2009
Venue: Albert Luthuli International Convention Centre, Durban
For all Microsoft Tech•Ed registration and event-related questions,
e-mail us at: info@tech-ed.co.za
SUPER EARLY BIRD SPECIAL Offer expires 29th of May 2009 | Who should attend? Any and all technology professionals interested in exploring a broad set of current and upcoming Microsoft technologies, tools, platforms and services |
BOOK NOW. |
Monday, June 01, 2009
Pix from Events
Picture from some of the Developer Events I attended recently. Just thought I should share this.
With Anders Hejlsberg (MVP Summit ‘09)
with Don Box (PDC ‘08)
With Scott Guthrie (Mr. Red Shirt – PDC ‘08)
with Ingo Rammer (PDC ‘08)
with Ken Spann (PDC ‘08)
ADAM on Windows 7
Recently has a need to program authentication for an application using ADAM. This is something I have done in the past so got a good existing code I could leverage on.
Alas! ADAM would not install on Windows 7. I It kept returning “Out of Storage” error!
This has been a known problem in Windows Vista as can be seen in the blog post Shawn Cicoria – CedarLogic, Extemporaneous Mumblings
Tried out these tricks and still got another error message on execution of the adaminstall.exe
Wednesday, May 27, 2009
Visual Studio 2010 Extensions
Tuesday, May 26, 2009
Intel VT not in HP nc6400
Just think it time to check out the Windows 7 XP mode out and after wasting 445MB of my monthly internet Quota to discover that my HP nc6400 most priced notebook will not run XP mode.
Windows 7 XP mode requires Intel VT for hardware assisted Acceleration to run. I exactly don’t know whom to blame, Intel or Microsoft or HP.
Intel for failing to include such feature but of course they got processors with these feature present. HP for choosing to use a processor in a business/performance based device like the nc6400 and finally Microsoft. How in the world should this not just be a boost requirement. Other virtualization applications like VMware don’t make this compulsory so why should this be. I could expect that this works but some performance pain if Intel VT missing rather than an outright failure.
I hope this gets fixed in the final release.
Monday, May 25, 2009
Tuple in C# 4.0
Tuple is defined as a Sequence (or ordered list) of finite length. Other definitions exist but I particularly like to see it as such.
I have been craving for this feature ever since seen in Cw(C-Omega). This is particularly useful when you want to return multiple values from a function/method especially when they are not related enough to want to put then in a class or struct. Some developers like myself result to using multiple out parameters. This gets messy for methods that have return type and so inconsistence in returning values from such methods.
1: var x = DoSomething(out int a, out int b);
The compiler is smart enough to detect when you have unmatched number of arguments
1: var myTuple = new Tuple<int, int, int>(0, 1);
or request for a member beyond it's definition
1: Console.WriteLine(myTuple.Item4);
Tuples in C# 4.0 lacks the ability to get the Length/ Count/Size value even though the underlying interface ITuple specifies this. I guess the C# team pulled this out to prevent us from seeing or using this as an Array or Collections.
In the Beta 1 Release, I tried getting my hands dirty with this and was shocked on a discovery. Something about an error on the eight argument of a tuple being requeired to be ITuple. I searched online for this and came across an interesting Post about infinite Tuple (Tuple with eight parameters in constructor)
1: Tuple<int, int, int, int, int, int, int, int>
http://blog.dynamicprogrammer.com/2009/05/25/TupleANewTypeOnNet40.aspx