Monday, 29 October 2007

.NET User Group 3 - Microsoft PerformancePoint Server 2007

Date: 08/11/2007
Gather at 5:45, starting at 6:00
Catering: Pizza & Drinks
Venue: Olympic Software, 10 Cawley Street, Ellerslie, Auckland

Presented by Adam Cogan (Chief Architect at SSW, MVP)

Microsoft Office PerformancePoint Server 2007 is an integrated performance management application designed to help improve operational and financial performance across all departments and all levels of your organization.

With Office PerformancePoint Server 2007, you can monitor progress, analyse what is driving variances, and plan your business from budgeting to creating management reports. You can have metrics, key performance indicators (KPIs), and reports delivered to every desktop through intuitive scorecards, dashboards, and the easy-to-use 2007 Microsoft Office system environment. A key component of the Microsoft Business Intelligence (BI) offering, Office PerformancePoint Server 2007 can help you understand how performance can align with personal and departmental.
http://www.ssw.com.au/ssw/Products/Training.aspx#MSPerformancePoint

Presented by Adam Cogan
Position: Chief Architect, Microsoft Regional Director
Qualifications: B Bus, JP, MCP, Microsoft MVP (Visual Studio Team System)
Adam Cogan is the Chief Architect at SSW, a Microsoft Certified Partner specializing in Office and .NET Solutions. At SSW, Adam has been developing custom solutions for businesses across a range of industries such as Government, banking, insurance and manufacturing since 1990 for clients such as Microsoft, Quicken, and the Fisheries Research and Development Corporation.

Adam was one of the lead developers behind Australia's first live .NET site - using a version that was pre Beta 1! One of his latest projects was the Smart Tag implementation for Quicken Australia. Adam was also responsible for developing Reporting Services and Exchange Server samples for Microsoft that turned into a hugely popular Exchange Reporting Tool. Adam develops in Microsoft technologies; his favorites being SQL Server 2005, Reporting Services, OLAP, Winforms and Webforms (using Visual Studio .NET 2005 with both VB.NET and C#), Access 2007, Outlook 2007/Exchange Server 2007.

http://www.ssw.com.au/ssw/Employees/EmployeesProfile.aspx?EmpID=AC

Thursday, 25 October 2007

Post-.NET User Group 2 - Policy Injection Application Block

Thanks for coming! This time we have about 25 people, it's around the number we've expected, without some people I've expected to come. I blame the rainy weather and bad traffic.

Mateus Velloso gave us an overview of the Enterprise Library in particular the Policy Injection Application Block. I had an overview from the code camp a month (or two?) ago but this time I get to know a bit more what PIAB can and cannot do.

It's not a my concern whether it is easy or hard to pick up. Personally I think nothing is really hard to learn. I am more concern what can be done and what's the limitation of these libraries, so in the future when i meet a problem i can identify the best practice for it.

Hmm hmm, but comparatively nice stuff up front seems more attractive to me. Andre is going back to Brazil for 7 weeks during Christmas time, so I will have to get speakers for January and February. I will see Nigel Parker's availability for those two months... he will be showing some pretty things up front, hehe...

Thursday, 18 October 2007

Blah 3 - I am not a geek

Yesterday Darryl said I am a geek (yes, a super geek said I am a geek, very unconvincing), I am not a geek.

Here are the premises of my argument:

P1 I can read and write Chinese.

P2 I read a lot of fiction books, in Chinese.

P3 My life blog has 14.7 times more posts than this blog.

P4 I am not that excited whenever Alex show me new C# features.

P5 I buy Marie Claire and Cosmopolitan often, and New Scientist. Never buy any software magazine.

P6 I love Final Fantasy. Can discuss every single one from FFVII to FFXII.

P7 I do Philosophy. Not master/PhD of Software Engineering, or Microsoft Certificate exams.

P8 I watch a lot of cartoons, and read heaps of anime.

P9 When I have free time, I would play FF, Civilization IV, Sims, etc. Not coding.

P10 I have Mr. and Mrs Potato Head on my desk in the office.

P11 I have Haro from Gundam Seed (a pink one) on my desk as well.

P12 In the old mIRC days, I did not write my own scripts.

P13 Never interested in hacking.

P14 I love All Blacks (yes, especially DC).

So in conclusion, I can't be called a geek. If you think this doesn't logically follow, yeah, it doesn't. However because I am not a geek, so I don't care whether it logically follows or not. :P

Tuesday, 16 October 2007

Firefox Add-ons: Firebug 1.0.5

Get FireBug

Firebug homepage

Today Jeff has shown me this tool, I hope I would have known about this earlier, then my development life would be easier.

 

Firebug integrates with Firefox to put a wealth of web development tools at your fingertips while you browse. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page.

 

Just the way you like it

Firebug is always just a keystroke away, but it never gets in your way. You can open Firebug in a separate window, or as a bar at the bottom of your browser. Firebug also gives you fine-grained control over which websites you want to enable it for.

Learn more

 

Inspect and edit HTML

Firebug makes it simple to find HTML elements buried deep in the page. Once you've found what you're looking for, Firebug gives you a wealth of information, and lets you edit the HTML live.

Learn more

 

Tweak CSS to perfection

Firebug's CSS tabs tell you everything you need to know about the styles in your web pages, and if you don't like what it's telling you, you can make changes and see them take effect instantly.

Learn more

 

Visualize CSS metrics

When your CSS boxes aren't lining up correctly it can be difficult to understand why. Let Firebug be your eyes and it will measure and illustrate all the offsets, margins, borders, padding, and sizes for you.

Learn more

 

Monitor network activity

Your pages are taking a long time to load, but why? Did you go crazy and write too much JavaScript? Did you forget to compress your images? Are your ad partner's servers taking a siesta? Firebug breaks it all down for you file-by-file.

Learn more

 

Debug and profile JavaScript

Firebug includes a powerful JavaScript debugger that lets you pause execution at any time and have look at the state of the world. If your code is a little sluggish, use the JavaScript profiler to measure performance and find bottlenecks fast.

Learn more

 

Quickly find errors

When things go wrong, Firebug lets you know immediately and gives you detailed and useful information about errors in JavaScript, CSS, and XML.

Learn more

 

Explore the DOM

The Document Object Model is a great big hierarchy of objects and functions just waiting to be tickled by JavaScript. Firebug helps you find DOM objects quickly and then edit them on the fly.

Learn more

 

Execute JavaScript on the fly

The command line is one of the oldest tools in the programming toolbox. Firebug gives you a good ol' fashioned command line for JavaScript complete with very modern amenities.

Learn more

 

Logging for JavaScript

Having a fancy JavaScript debugger is great, but sometimes the fastest way to find bugs is just to dump as much information to the console as you can. Firebug gives you a set of powerful logging functions that help you get answers fast.

Learn more

Monday, 15 October 2007

.NET User Group 2 - Policy Injection Application Block

Alright, our second .NET User Group meeting is on next Wednesday, 24th Oct 2007!

This time our topic is Policy Injection Application Block.

Presented by Mateus Velloso (Principal Software Architect at Gen-i, MVP)

Ready to pimp your objects?

The Policy Injection Application Block simplifies the separation of business logic from cross cutting concerns (such as logging, validation, exception handling, and authorisation) by letting you define policies and the objects/methods they apply to in a declarative way.

Gather at 5:45, starting at 6:00

Catering: Pizza & Drinks
Door Charge: Free
Parking: Free, just park in Olympic Software’s car park.

Venue
Olympic Software
10 Cawley St
Ellerslie Auckland

Map of venue

If you know anyone who might be interested please tell them about it. Remember it’s an open event so everyone is welcome.

Thursday, 11 October 2007

Button trigger UpdatePanel fails in FireFox

Firefox drove me crazy! I have spend hours to work out why it does not work, and the reason is: it does not have an image url but have alt text (and my Button is an ImageButton).

To demonstrate this, here is an example:

<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<div id="Html" runat="server" Visible="true">
Please submit
</div>

<asp:ImageButton id="SubmitButton" ImageUrl="submit_btn.gif"
onclick="SubmitButton_Click" alt="Submit" runat="server"
OnClientClick="this.style.display='none';"></asp:ImageButton>
<asp:ImageButton id="AmendButton" onclick="AmendButton_Click" alt="Amend"
runat="server" OnClientClick="this.style.display='none';"></asp:ImageButton>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="AmendButton" EventName="Click" />
<asp:AsyncPostBackTrigger ControlID="SubmitButton" EventName="Click" />
</Triggers>
</asp:UpdatePanel>

And the code behind is very simple:

        protected void SubmitButton_Click(object sender, ImageClickEventArgs e)
{
Html.InnerHtml = "Please Amend";
}

protected void AmendButton_Click(object sender, ImageClickEventArgs e)
{
Html.InnerHtml = "Please Submit";
}

The page looks like this:


s


If you click the submit button, it becomes:


a


As expected. However if you click the alt text "Amend", it will refresh the whole page instead of updating just the update panel. Basically I mean it does not work. The only solution is, of coz, give it a valid image!!!


Wasted me several hours! Now I am going home, it's 7:00pm already!

Tuesday, 9 October 2007

First Chance Exception

Andre and Jeff came up with these terms this morning and honestly I have no idea what they mean. The Internet always always have an answer. I found an explanation from David Kline's blog under the topic What is a First Chance Exception?.  The following is quoted from his blog:

What is a First Chance Exception?

Have you ever been debugging an application and seen a message, in the output window, about a "First chance" exception?
Ever wondered:
  • What is a first chance exception?
  • Does a first chance exception mean there is a problem in my code?

What is a first chance exception?
When an application is being debugged, the debugger gets notified whenever an exception is encountered  At this point, the application is suspended and the debugger decides how to handle the exception. The first pass through this mechanism is called a "first chance" exception. Depending on the debugger's configuration, it will either resume the application and pass the exception on or it will leave the application suspended and enter debug mode. If the application handles the exception, it continues to run normally.

In Visual Studio, you may see a message in the output window that looks like this:


A first chance exception of type 'System.ApplicationException' occurred in myapp.exe


In Visual Studio 2005 Beta2, you will see this message anytime a first chance exception is encountered in your application's code.  If you are using Visual Studio .NET 2003, this message is shown if you have configured the debugger to stop when the specific exception type is thrown.

If the application does not handle the exception, the debugger is re-notified. This is known as a "second chance" exception. The debugger again suspends the application and determines how to handle this exception. Typically, debuggers are configured to stop on second chance (unhandled) exceptions and debug mode is entered, allowing you to debug.

Does a first chance exception mean there is a problem in my code?
First chance exception messages most often do not mean there is a problem in the code. For applications / components which handle exceptions gracefully, first chance exception messages let the developer know that an exceptional situation was encountered and was handled.

For code without exception handling, the debugger will receive a second chance exception notification and will stop with a unhandled exception.

Friday, 5 October 2007

C# yield return/break

yield is cool (you may already notice that I basically think everything's cool), the main reason is that it reminds me about Mozart Oz (which has pure logic form of programming style). There is no relationship between them, but one just made me remind the other. It's interesting to see how human's brain categorize stuff. Anyway.

yield is used to provide enumeration over objects or to signal the end of iteration. Here is a basic non-generic example from MSDN, which basically return a list of numbers from n^1 to n^m:

public static IEnumerable Power(int n, int m)
{
int counter = 0;
int result = 1;
while (counter++ < m)
{
result = result * n;
yield return result;
}
}

static void Main()
{
// Display powers of 2 up to the exponent 8:
foreach (int i in Power(2, 8))
{
Console.Write("{0} ", i);
}
}

I have to say this is not interesting at all.


However when we combine the power of yield, generics and predicates, that's where the fun is. I have copied a piece of code from Andre's blog (look at the Extended Enumerable created here): 


public delegate R Func<T, R>(T t);
public static class SequenceOperators
{
public static IEnumerable<R> Select<T, R>
(IEnumerable<T> sequence, Func<T, R> mapping)
{
foreach (T t in sequence)
yield return mapping(t);
}



public static IEnumerable<T> Where<T>
(IEnumerable<T> sequence, Predicate<T> filter)
{
foreach (T t in sequence)
if (filter(t))
yield return t;
}
}

So, how exciting! The Select method takes an IEnumerable<T> and a function which has input param type T  (you know it's not really "T") and return type R (not Civic type R). By passing every t in T into the function, an enumeration of R objects were returned. The Where method takes an IEnumerable<T> and a predicate, and return enumeration of T objects of t in T that match the criteria.


It's so flexible and powerful. :)

Thursday, 4 October 2007

Expression around the Clock

I went to Expression around the Clock this morning with Warner and I am happy that finally I have a chance to meet Nas. The content of August de los Reyes's talk was a bit unexpected, but I am a philosophy student so of course I love it. Two  things really have caught my attention were Seadragon and Photosynth.  I have seen Seadragon before, but not Photosynth. It's very cool, so I tried out the Photosynth tech preview after I got back to the office.

Go to the Photosynth site and have a look. :)

Monday, 1 October 2007

Silverlight project

I am so excited because we have finally started our first small silverlight project. Unfortunately (or fortunately?!) I am not involved in any development. I am only overseeing the project (for my own interest sake), not even managing it. That's cool, more people (girls!) get a chance to expose to the technology. Warner's design for the website is excellent. I love it so much, really can't wait to see the final product.


Since I don't get a chance to do the development part but I am too keen, therefore I have created a super simple silverlight example today after I have setup the development environment for those girls. Well, I am not a designer and I can only draw stickman, so the example site only consists of a moving rectangle and a moving ellipse. Don't expect to much from me, haha.


Will show you all once it's done. :)