Monday, December 14, 2009

Me & My Mac

Just got a Mac. It's been quite a while since I have been longing to get a Mac which resulted in saving up money and spending it before getting to the Macbook Pro 17" target and all assorted. Finally settled for a MacBook Air and it's such a beautiful machine.


Such a great leap from my previous HP crap and even though the mac cost a lot more, it's worth every dime. I can go and on on features and cool stuff.

The good side, I don't have to be separated from my Windows, it's got an intel processor so I installed Windows 7 on it too.

Tuesday, July 14, 2009

Some old Pix

Some very old pix of me and mi pals at Telnet Basement working with SoftWorks Limited.

telnet

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.

image 

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.

image

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

Microsoft Multipoint Blog

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

PDC09 Logo

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.
That should get d Mac off my mind 4 some months hopefully till apple rethinks its pricing.

Wednesday, June 24, 2009

Hi Pal!

A dear friend I met at the summit earlier in the year.

summit pix

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





ValueSEQNR
11
21
22
41
42
43



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.



image 
Foreach Loop Container with FTP task embedded



image


Loop Container configuration



image


FTP task configuration

Wednesday, June 03, 2009

Gearing up for TechEd Africa 2009

TechEd Africa 2009 – Potential Lives Here

http://www.microsoft.com/southafrica/invitations/2009/may/teched/images/TechEd_header.jpg

‘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

http://www.microsoft.com/southafrica/invitations/2009/may/teched/images/TechEd_superearly-01.gif http://www.microsoft.com/southafrica/invitations/2009/may/teched/images/TechEd_whoshould-01.gif
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

 

http://www.microsoft.com/southafrica/invitations/2009/may/teched/images/TechEd_register-01.gif http://www.microsoft.com/southafrica/invitations/2009/may/teched/images/TechEd_forward-01.gif
BOOK
NOW.

FORWARD
TO FRIEND.

Monday, June 01, 2009

Pix from Events

Picture from some of the Developer Events I attended recently. Just thought I should share this.

DSC00562

With Anders Hejlsberg (MVP Summit ‘09)

 CIMG0026

with Don Box (PDC ‘08)

 CIMG0018

With Scott Guthrie (Mr. Red Shirt – PDC ‘08)

 Picture 009

with Ingo Rammer (PDC ‘08)

CIMG0143

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!

image

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

image image

Wednesday, May 27, 2009

Visual Studio 2010 Extensions

Using the Visual Studio 2010 Extension Manager. So far, I found these extensions useful

extensions

I guess the plan to use WPF for Visual Studio development is beginning to pay off. I still miss GhostDoc though :)

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

Friday, May 22, 2009

Implicitly Type Local Variable & Multiple Declarators

It is perfectly legal in C# to have declarations written this

int x, y;
which with initialized values is
int x= 5, y=6;

Alas, the C# compiler rejects this
var x=5, y=6;

This is because the C# Compiler does not allow multiple declarators on the var keyword. I wondered where this is not allowed and if you ask me so much restrictions on the use of the var keyword (can't use as method return type or method arguments).

A recent mail from Eric Lippert clarifies this. His reasons for why this feature was made illegal was that of removal of confusion. In his own words

object M() {}
string N() {}
var x = M(), y = N();
about fifty percent of people thought that the “obvious” meaning was
object x = M();
string y = N();
That is, the “obvious” meaning is “split the two apart and do them separately”.
About fifty percent thought that the “obvious” meaning was
object x = M(), y = N();
That is, “find the thing that you could replace the ‘var’ with and pretend it was there”.
No matter which we picked, half our users would think that we did it wrong. So we cut that feature.  A “var” declaration can only have one variable declared

Tuesday, May 19, 2009

Visual Studio 2010 and .NET FX 4 Beta 1 ships


The Beta 1 version of Visual Studio 2010 and .Net 4.0 shipped to MSDN download subscribers early yesterday. It can be downloaded here.

I have already downloaded it and the first test performed is co-existence with my VS 2008 and so far no problem yet with the little test I have done on it.

Friday, May 15, 2009

Imagine Cup (Nigeria) '09

The Nigeria final of the Imagine Cup competition ended yesterday with Team X emerging the winner. The competition was quite keen and winnings was just by a slight margin.

I was particularly impressed with Team X for their presentation and having a cool extensible application. The judging criteria allowed extensibility just 10% but the fact that they are the only one with extensible application left a great impression on the judges mind.

In terms of Innovations, the first runner-up team (Team Indwell) has that even though they not handed the plaque.

The winning team still has a lot to do and tie up quite some nuts before the appear in Egypt though. Interestingly, they were the winner at last year's event too. Somebody gotta do that but Team Indwell almost did except they got big ideas but little work done.



Tuesday, April 14, 2009

Lessons on WPF

Ever since the release of WPF, I have had no chance of running a live project on it. I have done quite a lot of mini testing of some of it's cool features but never a live application. 
Recently, a client requested for a small File Generation application in an attempt to drop their current legacy file generation application. These files are later sent to suppliers messages based Ordering systems. 

I quickly seized the opportunity to try out my WPF skills. What first hit me is it's immaturity compared to what can be achieved with WinForms but alas, there are work-arounds like ability to host WinForms which I took advantage of on the Report Viewer and also the Grid control from the WPF toolkit. Did not like the fact that I had to install .Net Framework 3.5 SP1 for this to work. Client do not like the idea of having to make them install this.

Styling the application is light years ahead of what could be achieved on WinForms. Got that done in a giffe and could imagine the amount of owner drawn stuff I had to do in WinForms to achieve the quality of UI.

I will say the experience was great and itching to redo some of my cool WinForms apps in WPF but won't unless a client is gonna pay for it :)

Wednesday, March 25, 2009

ResolverOne - IronPython Spreadsheet



   I met Michael Foord (the kind of guy that runs Windows on MacPro. He also wrote a book IronPython in Action still in print by Manning ) recently and he was so passionate about what he's been doing in the IronPython  Space. He has this cool programmable spreadsheet application dubbed ResolverOne . Believe me, this will make you never want to touch VBA. 

A  similar implementation was demoed at Mix09 by John Lam (the IronRuby guy) with Silverlight 3 - this I learnt came with deep multimedia capability and can run out of the browser sandbox to run on the GPU.  ResolverOne is a pretty cool implementation of spreadsheet and I am yet to imagine the bound of it's limitation. You could actually do anything imaginable about spreadsheet. I have revved this since the summit and still amazed how easy to import any existing python library and use user custom functions/libraries. 

Monday, March 02, 2009

MVP Summit Update!

Arrived at the Seattle on March 1, after a very long flight and airport waiting. Checking my Lagos local time, I realized I had been awake for over 29 hours. That's crazy. My head was heavy, I was quick-tempered too.

Finally checked in to The Westin Hotel around 1am Seattle local time. Replied mails and other web stuff for another hour and went to Bed.

My room mate is a great guy - Joel Hebert. He happens to be a ASP/ASP.Net MVP and that was cool and can you believe it, he already has a solution hosted on Microsoft Azure. I find that very cool too.

The next morning (March 1st) was rather dull at first, woke up around 8am and showered quickly. Went to the Washington State CC for registration and had breakfast just around there and attended the MVP2MVP Sessions.

Quite a lot of brilliant presentations from the guys which I will discuss later in my blog post after the event and lots of pictures too.

Monday, February 23, 2009

Gearing up for the Summit!

Gearing up for the upcoming MVP Summit! Cool that I will be able to attend this year's edition. Almost always saddled with so much around this time of year that I will have to bust plans of attending at the last minute! Breaking up the ginx this year! I should hope that's a good sign.

This year is particularly different, not only my decision to attend crippled by saddled workload, also the global financial crisis is dealing a good blow and the unexplainable diving of the Nigerian Naira against the USD. But I still gotta attend all the same.

So much I am hoping to gain this year apart from the Great View of Seattle from Top floors of The Westin Seattle. Another great opportunity to relate with the C# team apart from the mail relationship at Private Newsgroup and the C# Insiders and much more.

I am also hoping to meet the Channel 9 Team (probably they may feature me in one of their videos). and much more ..

Thursday, February 05, 2009

.Net and Java Inteoperability

I recently was saddled with the task of developing a component for a Telecoms (GSM) company. This is a company that has huge investment in Java-based applications on Sun Solaris boxes. The requirement of the component warrants a need to connect my ASP.Net based application to an existing connection pooling java-based socket application.

Immediately, interoperability comes to mind. Which is best? Some of the thots that came to mind are

- Use JNBridge (license cost)
- use a message based intermediary (MSMQ - requires modification of Java component which not allowed)
There is a whole lot of options in this space which I will not want to go into in this blog

- IKVM.Net (read all about this but not sure it works)

Other constraint is I had budget constraint that knocks off JNBridge and also not allowed to modify the service component as some other production applications depends on it. Whick left me with IKVM.Net.

First, I wrote a Java client application that uses this service, compiled and tested it well, then I use IKVM to generate a .Net dll off this java class file and Voila!, task got done!. It's no trouble getting this into my ASP.Net bin folder.


> javac SVClient
> ikvmc SVClient -target:library


Refer to IKVM.Net tutorial

The great thing about IKVM is that it works without any dependency to the original java class file. It's a complete conversion of the java code.

I got curious a bit and opened the dll in Red Gate's .Net Reflector and learned a lot on what underlying code.

Wednesday, February 04, 2009

Google Cloud

Spent half the entire day cranking at a Silverlight application and just when I got fedup with work for the entire day, I decided to get my hands dirty with the Google App Engine alt="Powered by Google App Engine" />. I have read quite a bit about it but scared of investing in a learning curve coupled with the fact that I am not going to be writing a c# code.

It is python! thats something I love too though I have experience in IronPython just then I stumbled on this you-tube video and it's a cool starter. Simply follow the installation instruction provided by Google and with that video you are set for an Hello World experience.

Thursday, January 29, 2009

Back to work!

Compliments of the new year! Just getting back to work after weeks of vacation with family that unavoidable ate up the whole January for me.

So great to be back home and wonders if I still remember a what a Hello World program in C# may look like (lol! won't get that bad).