Tuesday, March 15, 2005

The Algorithm Structure Design Space in Parallel Programming

The Algorithm Structure Design Space in Parallel Programming

The first phase of designing a parallel algorithm consists of analyzing the problem to identify exploitable concurrency, usually by using the patterns of the Finding Concurrency design space. The output from the Finding Concurrency design space is a decomposition of the problem into design elements:

  • A task decomposition that identifies tasks that can execute concurrently

  • A data decomposition that identifies data local to each task

  • A way of grouping tasks and ordering the groups to satisfy temporal constraints

  • An analysis of dependencies among tasks


This chapter will help you, the algorithm designer, to leave the parallel algorithm design abstract enough to support portability while ensuring that it can eventually be implemented effectively for the parallel systems on which it will be executed.

Monday, March 14, 2005

Zeta 1.0

BeOS has been dead for almost 4 years or more. Yellowtab took up the mandate and carried on it's legacy. Now, Zeta 1.0 is out. Check it out at http://yellowtab.com

Other news on reliving BeOS, probably my most favourite OSes in my life, OpenBeOS or now named Haiku-OS is the opensourced implementation of the recreation of BeOS. This is how wonderful BeOS is. Perfect and powerful in it's own being.

For those OS hackers, please consider helping out Haiku-OS. Long Live BeOS.

More CSS?!? Oh no...

To re-iterate my growing love for CSS, here again are some links (some which I've posted before) to get good resources.

Why tables for layout is stupid: problems defined, solutions offered
http://www.hotdesign.com/seybold/index.html

css Zen Garden: The Beauty in CSS Design
http://www.csszengarden.com/

css-discuss Wiki
http://css-discuss.incutio.com/
The css-discuss Wiki is a companion to the CssDiscussList mailing list.

meyerweb.com
http://www.meyerweb.com/

A List Apart: Alternative Style: Working With Alternate Style Sheets
http://www.alistapart.com/articles/alternate/

A List Apart: CSS Design: Taming Lists
http://www.alistapart.com/articles/taminglists/

WebDeveloper.com: Advanced HTML, CSS, and DHTML
http://www.webdeveloper.com/advhtml/

glish.com : CSS layout techniques
http://www.glish.com/css/

CSS, Accesibility and Standards Links
http://www.dezwozhere.com/links.html

The W3C CSS Validation Service
http://jigsaw.w3.org/css-validator/

SitePoint
http://www.sitepoint.com/
Quite a number of articles & forum discussions regarding design, layout, css, etc.

CssCreator
http://www.csscreator.com/
Good forums for CSS discussions

Cracking Wi-Fi Protected Access (WPA)

Cracking Wi-Fi Protected Access (WPA) Part 1

Cracking Wi-Fi Protected Access (WPA) Part 2

Good read. Don't tell anyone I told you about this. Hee! Anyway it's quite a difficult thing to understand unless you've done lots of packet h*cking before.

Disclaimer:
I'm not responsible for whatever damage might come from you learning from those links.

The Wordlist Project

The Wordlist Project

I won't talk much about this. It's just for my reference. Wonderful list. Fantastic for *ahem*. Enough said. Those of you who knows what to do with it, use it. Any other links to other similar sites would be much appreciated.

Sunday, March 13, 2005

Microsoft Learning 2nd Shot Exam Offer

http://www.microsoft.com/learning/mcp/offers/2ndshot/

Give yourself the best chance for success with an extra opportunity to pass any Microsoft IT Pro or Developer certification exam. Sign up now, and if you don't pass the first time around you can retake it free.

Website Statistics - AXS Visitor Tracking

AXS Visitor Tracking

AXS records visits to your web page and processes those records into meaningful graphs and database listings. The scripts tell you where visitors are coming from, charts their flow through your site, and tells you which links they follow when leaving. In addition, the scripts record visitors' server name, IP address, type of web browser, and time of visit.

It is based on Perl.

This is something I want to set up on the SgDotNet website.

ASP.NET and Struts: Web Application Architectures

ASP.NET and Struts: Web Application Architectures

Summary:
Learn about the similarities and differences between ASP.NET on the .NET Framework and Struts on Java 2 Enterprise Edition; and the features that each provides to solve common developer problems. Learn about the advantages and disadvantages of each, and the utility that they bring to next-generation Web development.

My Take:
Struts was the revolution in J2EE. Struts seperated design from logic using the MVC model. Struts was the next best thing for J2EE other than JBoss. Struts is the Controller.

But then came about ASP.NET. :)

Professional C#, 2nd Edition: Graphics with GDI+

Professional C#, 2nd Edition: Graphics with GDI+
The sample book chapter shows you how to interact directly with users in C#, displaying information on the screen and accepting user input. You'll draw lines and simple shapes, images from bitmap and other image files, and text.
By Scott Allen, Ollie Cornes, Steve Danielson, Jay Glynn, Zach Greenvoss, Burton Harvey, Jerod Moemeka, Christian Nagel, Simon Robinson, Morgan Skinner, and Karli Watson

http://accessvbsql.advisor.com/doc/13649

Thursday, March 10, 2005

C# Game/Graphics Engines

Just looking back at my old love of game development, I'm here to recommend some good game and graphic engines that's free and opensourced, which are all very good stuff. Naturally, that works with C#, but not confined to Managed DirectX. Did I mention they are also cross-platform?

Axiom3D - Game Engine that's based on OGRE, a C++ graphics engine. It uses Managed DirectX and Managed OpenGL.

Personally I'ved worked with Axiom3D before to create some demoscenes and mini-games. It's a wonderful piece of work. But the interface changed quite alot since the last time I played with it. It has a lot of new stuff, like new physics and UI engine.

RealmForge GDK - Game Development Kit that's also opensource.

I haven't used this before, but I heard from recommendations it's quite extensive and complete, eventhough it's just v0.6 and not a full v1.0 yet. If I'm not wrong, it includes a scripting engine too. Not too sure.

Purple# - Game Engine that's coded in C#. It's a shader driven 3d engine for .NET.

Neither have I used this before. I'm not too sure how good it is, but it's another engine coded for the .NET platform. Not much to comment on this, but I heard it's good.

That's that. As you can see, I don't have much experience with game development on the .NET framework, but I feel there is potential for it. It's definitely much faster than working in Java.

For more information, do check out this fantastic website.

www.gamedev.net

I frequent there last time, until I realise game development just didn't make money here in Singapore. Anyway it's still my passion to create a wonderful game where people can enjoy.

Cheerios.

Scholarships for University and more on CS 1.0

I think this might be my first non-technical post. I'm desperate to find scholarships or someone to sponsor me to go University, if I get into the University I want.

For those who already know, I've applied for University of Toronto and University of Waterloo, to the Computer Science program. Apparently, one of my family member is having an operation today, and that operation costs quite a far bit of money. Therefore, as you should already guess, my funds for university is much diminished.

I've looked at quite a few scholarships, and most of them require 3 A level distinctions, or S-Papers, which is quite apparent that I don't have those. I'm currently holding a Diploma in Computer Engineering from Ngee Ann Polytechnic, and it's only a B average (or so my counselor at the Canadian Education Centre says). Furthermore, for those who doesn't know, I'm very active in SgDotNet and currently am an MVP - Visual Developer C#.

So, now the big thing. Where do I find scholarships? I've checked up BrightSparks but like I said, most of them require quite exceptional results.

Oh well. Anyway, enough of lamenting. Here's something I'd like to share with you guys who's playing around with Community Server 1.0. The conversion tool from Asp.net forums 2.0.1 to CS 1.0 is released by external sources. Here's the link.

http://www.communityserver.org/forums/475923/ShowPost.aspx

There's a fix for the Anonymous users here.

http://www.communityserver.org/forums/476239/ShowPost.aspx

Links for converting from nGallery to CS 1.0.

http://www.communityserver.org/forums/2/476157/ShowPost.aspx

Community Server has also released their "documentation" which is a wiki. Check it out here.

http://docs.communityserver.org

Oh yes, did I mention SgDotNet is going to do migration? :) Yes that's right. That's why I posted all these links here. And you think it's for you. Haha! This blog is for me to remember things, not for you! Just joking. *wink*

Other cool stuff is this very cool Content Management System (CMS) that is actually quite good. It's XHTML and CSS compliant. It's called WordPress. And it's totally done in PHP. Very good stuff. I'm wondering if CS 1.0 and DNN 3.0 is XHTML and CSS compliant. Even if it's XHTML 1.0 Transitional, that's pretty good already, in my opinion. Check WordPress out. They have a demo site setup here. http://www.opensourcecms.com/

Is that enough information? Or is it not enough?

Interesting news. It seems that MVPs are going on revolt because Microsoft is stopping development on VB6.

http://rblevin.blogspot.com/2005/03/microsoft-mvps-revolt.html

That's all folks for today.

Sunday, March 06, 2005

Emails ALL GONE!!!!

For those who have sent me emails since 05/03/2005 onwards, please re-send. My emails all went down the /dev/null.

Apparently the problem was this.

http://support.microsoft.com/kb/842293

Fixed it. Now everything works. But I lost 2 days worth of emails. Sorry to everyone. Please resend emails to me. Thanks. That includes Jason, Ken, Kitkai, Howard.

Thanks alot for the inconvenience. I'll be sending you guys emails to request you guys to resend to me.

Saturday, March 05, 2005

More on Small Business Server 2003

Here are a few links that would help with deploying your SBS 2003 to your network.

Migrating from a Peer-to-Peer Network to a Windows Small Business Server 2003 Network

Getting Started Guide

Connecting Mobile and Remote Users

These are a few documents which helped me greatly in planning and deploying SBS 2003 into my current small network.

I'm still having that tingly sensation of how wonderful SBS is. Hehe!!!

Friday, March 04, 2005

Exchange Server 2003 and Small Business Server 2003

Let me first say, Exchange Server alone sucks. It's too damn difficult to configure, and requires alot of registry editing and doesn't have POP3 connector to download emails into exchange accounts.

I was trying to get Exchange Server 2003 working on my Windows 2003 Server for the past few days, and with some effort it worked. It takes almost 5 to 10 mins to shutdown the Exchange Server and reboot, and doesn't have anything to guide you through. You'll definitely have to be very good with your knowledge of Exchange Server 2003 to be able to set it up. Not for someone like me who knows nuts about infrastructure.

The purpose of setting up Exchange Server 2003 was to have a central repository of my emails, contacts, appointments all at my home server, and able to sync with my notebook, any web-enabled device, and at home. Right now I've problems trying to keep everything in sync manually, which reduces my productivity that requires me to go home to read my emails, and recopying mails from my notebook to my desktop.

Let me stress again, Exchange Server 2003 is NOT for dummies like me who wants to do advance stuff like that.

Let me stop lamenting on Exchange Server 2003. Then I decided, what the heck, why don't I just re-format and install Small Business Server 2003 instead. I must say, SBS 2003 is one of the easiest and the most effortless setting up ever. Although installation takes a few hours (I took almost 6 hours to install and configure everything), after all that long wait, everything appears as a wizard. They have wizards for almost everything. And a very intuitive System Manager, with everything I need to configure at my fingertips. They have this TO-DO thingy after installation that tells you what you need to configure, and they have wizards for everything.

And did I mention they have a wizard to set up your POP3 connector? It's so simple and effortless. They included a POP3 connector into the Exchange Server. You just have to key in your pop server, username and password, and where the mails will go into. And of course the frequency of checking your pop server.

Simply wonderful. I also love the Certificate Wizard where they help you to create a self-signed certificate for you. You're able to replace the name to your internet fqdn, instead of the intranet name which I seem to be creating ALWAYS. Like I said, I'm a infra dummy.

Furthermore, it takes only a 1-2 mins to reboot, much much faster than Exchange Server 2003 stand alone on Windows 2003.

Did I mention they have a wizard that helps you set up your AD and lan and everything else?

It's good stuff. I recommend it to everyone who's setting up a business, especially a SOHO, which is quite popular in Singapore.

Alrighty, enough praising. It rocks.

Monday, February 21, 2005

Boo - New .NET Language

http://boo.codehaus.org/

Something I found yesterday. Quite an interesting language that's very dynamic. Here's the description of it.

Boo is a new object oriented statically typed programming language for the Common Language Infrastructure with a python inspired syntax and a special focus on language and compiler extensibility.

Do check it out.

CS-Script - The C# Script Engine

Something I came across that's quite interesting.

http://www.members.optusnet.com.au/~olegshilo/

CS-Script. Looks good. Wonder if it can be done for websites, instead of using javascript? :)

Friday, February 18, 2005

Non-Rectangular Windows Forms Part 2

I figured nobody could answer my question. Therefore, I solved it myself.

Basically what I did was to use the form's Region property. This Region property selects the region in which it is to display.

Problem, how am I gonna find out the region of an irregular shape? Simple. Parse each pixel bit by bit to check for your transparency key. If it is not transparent, create a graphics path of 1 pixel to create your region. I got the idea from here.

http://weblogs.asp.net/cumpsd/articles/79878.aspx

The code is as follows.

public static Region ConvertFromTransparentBitmap(Bitmap imageRegion, Color transparentColor) {
// First we get the dimensions of our image
GraphicsUnit aPixel = GraphicsUnit.Pixel;
RectangleF imageBoundsF = imageRegion.GetBounds(ref aPixel);
int imageWidth = Convert.ToInt32(imageBoundsF.Width);
int imageHeight = Convert.ToInt32(imageBoundsF.Height);

// This will be the path for our Region
GraphicsPath regionPath = new GraphicsPath();

// We loop over every line in our image, and every pixel per line
for (int intY = 0; intY < imageHeight; intY++) {
for (int intX = 0; intX < imageWidth; intX++) {
if (imageRegion.GetPixel(intX, intY) != transparentColor) {
// We have to see this pixel!
regionPath.AddRectangle(new Rectangle(intX, intY, 1, 1));
}
}
}


Region formRegion = new Region(regionPath);
regionPath.Dispose();
return formRegion;
} /* ConvertFromTransparentBitmap */


But that took 12 secs to load up. So I did it the opposite way, since I have more visible part than transparent. If the pixel matches your transparency key, create the graphics path then. And I did an exclude. Like this.

public static Region ConvertFromTransparentBitmap(Bitmap imageRegion, Color transparentColor) {
// First we get the dimensions of our image
GraphicsUnit aPixel = GraphicsUnit.Pixel;
RectangleF imageBoundsF = imageRegion.GetBounds(ref aPixel);
int imageWidth = Convert.ToInt32(imageBoundsF.Width);
int imageHeight = Convert.ToInt32(imageBoundsF.Height);

// Create an arraylist to store the rectangles
ArrayList rectArray = new ArrayList();

// This will be the path for our Region
GraphicsPath regionPath = new GraphicsPath();

// We loop over every line in our image, and every pixel per line
for (int intY = 0; intY < imageHeight; intY++) {
for (int intX = 0; intX < imageWidth; intX++) {
//Color c = imageRegion.GetPixel(intX, intY);
if (imageRegion.GetPixel(intX, intY) == transparentColor) {
// We have to see this pixel!
//regionPath.AddRectangle(new Rectangle(intX, intY, 1, 1));
// Add a rectangle to the array
rectArray.Add(new Rectangle(intX, intY, 1, 1));
}
}
}

Rectangle[] rectList = new Rectangle[rectArray.Count];

// Now we convert the ArrayList into an array of Rectangles
for(int i=0; i < rectArray.Count; i++) {
rectList = (Rectangle)rectArray;
}

regionPath.AddRectangles(rectList);
Region formRegion = new Region(regionPath);

// we need to create a region which encompasses the entire form
Region fullRegion = new Region(new Rectangle(0, 0, imageRegion.Width, imageRegion.Height));

// we do a simple exclude those parts that intersect
fullRegion.Exclude(formRegion);

formRegion.Dispose();
regionPath.Dispose();
return fullRegion;
} /* ConvertFromTransparentBitmap */

Basically this alternate way speed up the entire loading process down to 4 secs. Of course together with DoubleBuffering on, and using the 32bit-enabled transparency code up there, I was able to create one ultra fast and smooth irregular window, without any flicker to the controls within.

A faster way to speed up the loading process, which I haven't tried yet, is to create the array of points to the graphics path. Meaning you'll have to pre-generate the points first, put it in an array, and use it in a GraphicsPath object. This will speed everything up to the second, theoretically speaking.

This method is called inline masking. If those of you have done low-level graphics and trying to accelerate graphics and transparency, this is how the old school does it.

If anyone has any suggestions whereby how to make it work another way, please post here.

Non-Rectangular Windows Forms

Yo, now a problem from me. I tried to search for it, without any success.

http://www.thecodeproject.com/csharp/nonRectangularForm.asp

I'm trying to create a non-rectangular windows form. Currently it's quite easy if the person uses 24bit and below resolution, you just assign your background image and set your transparencykey. But who uses 24bit and below nowadays? We all use 32bit.

That article above explains to you how to get it done. The modification I made was to make it happen in OnPaintBackground event instead of OnPaint event, because if it was OnPaint event, the controls will flicker and you can see what's behind the form.

So now, the problem is, it still flickers and is very slow. To solve this flickering, you must implement double buffering. But when I set the styles to do double buffering, the transparency of the background is ignored.

Question. How can I achieve double buffering which the background transparency still intact?

Here's the code for reference

protected override void OnPaintBackground(PaintEventArgs e)
{
base.OnPaintBackground(e);
this.SuspendLayout();

// First we create a graphics object using the PiantEventArgs e that will use the
// form
Graphics grfx = e.Graphics;
// Make Antialiasing which avoid stepped look for circular path and curves you
// may use the SmoothingMode.AntiAlias
grfx.SmoothingMode = SmoothingMode.None;
grfx.DrawImage(this.background, this.frmRectangle);

this.ResumeLayout();
}

Setting the styles I'm sure you guys should know. How to I apply transparency over here?

Thursday, February 17, 2005

Thoughts on Integrating DNN 3.0 + CS 1.0

I've been playing around with both applications, and been thinking about how to merge these 2 wonderful applications together.

There are a few ways of doing it.

1. Rewriting the Membership/Role/etc providers and having both applications use the same providers. Then merging of the memberships would be needed, into 1 table. But I'm pondering how can it be done.

2. Writing a DNN module that interfaces with CS 1.0, stripping CS apart into different modules, i.e. Forums module, Blog module, Gallery module and so on. But CS dependencies on HttpContext is alot.

3. Stripping DNN apart and make it part of CS 1.0. I think that's the intention of CS, since I saw an empty web dll, which means the intention of having a Community Server - Web.

4. Quick hack. Sync between the databases and cookies. Which is what most people are doing now.

Personally, I think point 3 would be wonderful to try it out. What do you guys think? Which way is better?

Wednesday, February 16, 2005

DotNetNuke 3.0 & CS 1.0

I just realised something interesting. Both applications are sharing the same MachineValidationKeys. That means that they are preparing to be able to merge and interop with each other.

This is good news.