Pages

Monday, November 15, 2010

Snow Season 2010 Rookie Report

This year was my first year Snowboarding. Managed to get up the mountain 5 times, and Snowplanet twice.

I learnt some of the basic skills: falling leaf, stopping, linking turns. I even decided to buy my own set of gear: gloves, pants, jackets, helmet, goggles, boots, snowboard, bindings. Below I will make a few suggestions to anyone out there who wants to start snowboarding, and get their own gear.

Learn How To Snowboard


  1. First you want to be prepared and have appropriate gear. You don't need all the proper stuff, especially if you're not sure whether you'll be doing it again. I went in some sports track pants, a down jacket, and a beanie. I rented the board, boots and bindings, which is a pretty standard thing to do and fairly affordable ($45 on the mountain and $25 at the bottom). The one thing I did buy though, were the gloves. I bought a cheap pair for $20 will do. You just gotta make sure your stuff is water proof.

  2. The next thing to consider as you go up the mountain is a lesson, either from the instructors, or a nice friend.

  3. Now the first thing you gotta figure out is whether you are regular or goofy. I knew I was regular from my skateboarding days, but its up to you to experiment. The best way is to see which foot you lead with if you were to run and slide along the ground. If its your left foot, you're regular, if its your right, you're goofy.

  4. When you get on your board, you're gonna want to learn to travel around with one foot in the bindings. This is how snowboards get around the lifts and things.

  5. Then its time to learn the falling leaf, which involves balancing on the board and traveling down the mountain with the board perpendicular to the way you are traveling. Get practice on both heelside and toeside. When going down front first (and with your back to the top of the mountain), its called heelside as you lift your toes and balance on your heel. Toeside is when you balance facing up the mountain, balancing on your toes. As you get more confident, try leaning left and right to follow a "falling leaf" path.

  6. Now its time to learn to turn. The hardest thing I had to get used to here was leaning forward and keeping my weight on my front foot. I had the tendency (as many beginners do) to lean back which doesn't give you enough control. To turn from heelside to toe side, shift your weight forward and rotate around until your weight is on your toes. This should swing your board including your back foot such that you will now be facing the other way, going down the mountain toeside. To go from toe to heel, do the same but rotate the other way.

  7. After getting used to turning, try linking the turns from left to right to form an "S" path down the mountain.

  8. And thats it! well thats all I learnt. Next season I'll be practicing my switching, and traversing the mountain fakie. I also want to learn ollies and rails.

Buying gear


  • Snowboarding gear can be expensive, especially the latest gear. With everything combined, and the cost of travel/accommodation, snowboard can be expensive.

  • If you want to get everything, expect to pay some $1000+ for new gear. Thats assuming $600 on board, boots, bindings, and the rest on clothes. Thats very good new gear, but last seasons, or on discount pricing. Expect to pay double that if you get it at the start of the season. You can make heavy savings by buying second hand. You might be able to get a complete package (board boots bindings) for under $150-$200, and spend around $200-$300 on the rest of your clothes.

  • The two most important pieces of equipment are boots and gloves. No matter what kind of snowboard or bindings you have, if your boots suck, so will you. Boots that fit and are comfortable go a long way towards your snowboarding experience so don't go cheap here. Chose from a descent brand, and try them on a shops to get a feel for them. Then try and buy them online where it might be cheaper. As for gloves, get some good waterproof ones. Having wet and cold hands can make you seriously miserable. I found a good cheap pair of Gore-tex gloves ($50). Gore-tex is a fabric that guarantees to keep you dry, and from my experience, it has lived up to its hype.

  • Board and Bindings. There are a tonne of manufacturers and brands out there, and a lot of different types of boards. Do some research, if you can try some and demos, rentals, shops and see what style you like. If I could chose my next board, it would be a Bataleon.

  • Getting goggles is not absolutely necessary, but its good for keeping wind and snow out, and does work better than sunnies by themselves.

Thursday, November 4, 2010

C# Email Helper for sending out HTML Emails with data

Summary


The following article contains code to send data via a dictionary to a Mail Helper which builds an html email based on an Email template defined by a user control.

Premise


At work, I have had to build websites which send out html emails. We already had some code which loaded a user control into an html writer, which gave a html string to be placed in the html body for sending .Net mail. I wanted to abstract the logic out so that I could reuse it in any of my projects without having to modify all the parameters etc.

Essentially the things that were different were the HTML template, and the data to be bound to the template. Everything else; the building, the sending all had the same logic.

The Code


First we have the MailHelper class, which will build and send the email. We pass in the path of the email template, and basic email parameters such as to, from and subject. The dictionary is a string object pair for convenience. Use the string as a key to reference your objects similar to a ViewState or ViewModel.

Then you will see the EmailControl class which extends UserControl. We want to place a method there for setting the key value pairs. And then we want all Email templates to extend from this class.


public static class MailHelper
    {

        public static void SendEmail(string controlPath, 
                                     string to, 
                                     string from, 
                                     string subject, 
                                     Dictionary<string, object> keyValuePairs)
        {
            var body = GenerateContactEmailBody(controlPath, keyValuePairs);
 
            var officeMessage = new MailMessage(from, to)
            {
                Subject = subject,
                IsBodyHtml = true,
                Body = body
            };
 
            var client = new SmtpClient();
 
            client.Send(officeMessage);
        }
 
        private static string GenerateContactEmailBody(string path, 
                                  Dictionary<string, object> keyValuePairs)
        {
            Page pageHolder = new Page();
            var emailControl = (EmailControl)pageHolder.LoadControl(path);
            emailControl.SetKeyValuePairs(keyValuePairs);
            var writer = new StringWriter(CultureInfo.CurrentCulture);
            emailControl.RenderControl(new Html32TextWriter(writer));
            return writer.ToString();
        }
    }
 
    public class EmailControl : System.Web.UI.UserControl
    {
        public virtual void SetKeyValuePairs(Dictionary<string,object> value)
        {
            throw new NotImplementedException();
        }
    }

So now we can create a new HTML Email template. Create a new UserControl, make this extend EmailControl instead of extending UserControl directly. Then override the SetKeyValuePairs method. In my example below, I have a ContactUs email template where I accept values for Name, Email, Telephone, and Question. These are all strings but could have been other objects.

Then in my ascx file, I create the html template as per a design, and bind the properties where they are needed. The override for RenderControl is needed when we generate the html in the MailHelper.

public partial class ContactUs : EmailControl
    {
 
        public override void SetKeyValuePairs(Dictionary<string, object> value)
        {
            Name = value["Name"].ToString();
            Email = value["Email"].ToString();
            Telephone = value["Telephone"].ToString();
            Question = value["Question"].ToString();
        }
 
 
        public string Name { get; set; }
 
        public string Email { get; set; }
 
        public string Telephone { get; set; }
 
        public string Question { get; set; }
 
        public override void RenderControl(HtmlTextWriter writer)
        {
            DataBind();
            base.RenderControl(writer);
        }
    }

Finally, the bit of code which I call on my page which actually calls the MailHelper and sends out the email.

var kvp = new Dictionary<string, object>();
            kvp.Add("Name", name);
            kvp.Add("Email", email);
            kvp.Add("Telephone", telephone);
            kvp.Add("Question", question);
 
            var to = ConfigurationManager.AppSettings["ContactTo"];
            var from = ConfigurationManager.AppSettings["ContactFrom"];
            var subject = ConfigurationManager.AppSettings["ContactSubject"];
 
            MailHelper.SendEmail("~/ContactUs.ascx", to, from, subject, kvp);

Sunday, October 17, 2010

C# Random Password Generator

This blog post has moved to my new blog, you are about to be redirected...




In an earlier post, I wrote a Random Password Generator class intended for anyone interested to plug into their application.

Following some input I received, I have refactored the code a bit:

using System;
using System.Security.Cryptography;


namespace Security
{

    public class RandomPasswordGenerator
    {
        // Define default password length.
        private static int DEFAULT_PASSWORD_LENGTH = 8;

        //No characters that are confusing: i, I, l, L, o, O, 0, 1, u, v

        public static string PASSWORD_CHARS_ALPHA = 
                                "abcdefghjkmnpqrstwxyzABCDEFGHJKMNPQRSTWXYZ";
        public static string PASSWORD_CHARS_NUMERIC = "23456789";
        public static string PASSWORD_CHARS_SPECIAL = "*$-+?_&=!%{}/";
        public static string PASSWORD_CHARS_ALPHANUMERIC = 
                                PASSWORD_CHARS_ALPHA + PASSWORD_CHARS_NUMERIC;
        public static string PASSWORD_CHARS_ALL = 
                                PASSWORD_CHARS_ALPHANUMERIC + PASSWORD_CHARS_SPECIAL;
        
        //These overloads are only necesary in versions of .NET below 4.0
        #region Overloads

        /// 
        /// Generates a random password with the default length.
        /// 
        /// Randomly generated password.
        public static string Generate()
        {
            return Generate(DEFAULT_PASSWORD_LENGTH,
                            PASSWORD_CHARS_ALL);
        }

        /// 
        /// Generates a random password with the default length.
        /// 
        /// Randomly generated password.
        public static string Generate(string passwordChars)
        {
            return Generate(DEFAULT_PASSWORD_LENGTH, 
                            passwordChars);
        }

        /// 
        /// Generates a random password with the default length.
        /// 
        /// Randomly generated password.
        public static string Generate(int passwordLength)
        {
            return Generate(passwordLength,
                            PASSWORD_CHARS_ALL);
        }

        /// 
        /// Generates a random password.
        /// 
        /// Randomly generated password.
        public static string Generate(int passwordLength,
                                      string passwordChars)
        {
            return GeneratePassword(passwordLength, 
                                    passwordChars);
        }

        #endregion


        /// 
        /// Generates the password.
        /// 
        /// 
        private static string GeneratePassword(int passwordLength,
                                               string passwordCharacters)
        {
            if (passwordLength < 0) 
                throw new ArgumentOutOfRangeException("Password Length");

            if (string.IsNullOrEmpty(passwordCharacters)) 
                throw new ArgumentOutOfRangeException("Password Characters");
            
            var password = new char[passwordLength];

            var random = GetRandom();

            for (int i = 0; i < passwordLength; i++)
                password[i] = passwordCharacters[
                                          random.Next(passwordCharacters.Length)];

            return new string(password);
        }



        

        /// 
        /// Gets a random object with a real random seed
        /// 
        /// 
        private static Random GetRandom()
        {
            // Use a 4-byte array to fill it with random bytes and convert it then
            // to an integer value.
            byte[] randomBytes = new byte[4];

            // Generate 4 random bytes.
            new RNGCryptoServiceProvider().GetBytes(randomBytes);

            // Convert 4 bytes into a 32-bit integer value.
            int seed = (randomBytes[0] & 0x7f) << 24 |
                        randomBytes[1] << 16 |
                        randomBytes[2] << 8 |
                        randomBytes[3];

            // Now, this is real randomization.
            return new Random(seed);
        }


    }
}


Thursday, September 30, 2010

What are TFS Labels for?

Just some interesting reading in the following links:

http://iworkonsoftware.blogspot.com/2010/04/tfs-labels.html

http://www.notionsolutions.com/notionmedia/articles/Pages/VirtuesandPitfallsoftheTFSLabel.aspx

How do you use TFS Labels?

Thursday, September 9, 2010

C# ASP.NET CheckBoxList selecting items on OnDataBinding doesn't work, set it on OnDataBound instead

When I try to bind some objects to a CheckBoxList in the OnDataBinding method, it never seems to select it when I tell it to do so:

protected override void OnDataBinding(EventArgs e)
 {
    base.OnDataBinding(e);
 
    chkBxLstProducts.DataSource = Product.GetAll();
    chkBxLstProducts.DataBind();
 
    foreach (var item in chkBxLstProducts.Items.Cast())
    {
         item.Selected = ((ICollection)FieldValue).Cast()
                         .Any(p => p.ProductId == Convert.ToInt32(item.Value));
    }
 }

 

When I move the selection code into the OnDataBound method, it works:

protected override void OnDataBinding(EventArgs e)
 {
    base.OnDataBinding(e);
    
    chkBxLstProducts.DataSource = Product.GetAll();
    chkBxLstProducts.DataBind();
 }

 protected void OnDataBound(object sender, EventArgs e)
 {
    foreach (var item in chkBxLstProducts.Items.Cast())
    {
        item.Selected = ((ICollection)FieldValue).Cast()
                        .Any(p => p.ProductId == Convert.ToInt32(item.Value));
    }
 }


I’m not 100% sure, but I think it’s because the OnDataBinding event occurs before the CheckBoxList is rendered. So after it’s rendered, everything is wiped clean and we lose the selection. Selecting items after OnDataBound ensures it gets rendered.

Tuesday, September 7, 2010

C# Random Password Generator

Below is a class for you to plug into your projects.

It generates random passwords by using actual random seed and omits those pesky letters that look similar to one another.

You can reuse the class by passing in options such as password length and the different characters you want to include. And since its the source code, you can extend/adapt it to your needs.

Enjoy

This blog post has moved to my new blog, you are about to be redirected...



using System;
using System.Security.Cryptography;
 
 
namespace Security
{
    public enum RandomPasswordOptions
    {
        Alpha = 1,
        Numeric = 2,
        AlphaNumeric = Alpha + Numeric,
        AlphaNumericSpecial = 4
    }
 
    public class RandomPasswordGenerator
    {
        // Define default password length.
        private static int DEFAULT_PASSWORD_LENGTH = 8;
 
        //No characters that are confusing: i, I, l, L, o, O, 0, 1, u, v
 
        private static string PASSWORD_CHARS_Alpha = 
                                   "abcdefghjkmnpqrstwxyzABCDEFGHJKMNPQRSTWXYZ";
        private static string PASSWORD_CHARS_NUMERIC = "23456789";
        private static string PASSWORD_CHARS_SPECIAL = "*$-+?_&=!%{}/";
 
        #region Overloads
 
        /// 
        /// Generates a random password with the default length.
        /// 
        /// Randomly generated password.
        public static string Generate()
        {
            return Generate(DEFAULT_PASSWORD_LENGTH, 
                            RandomPasswordOptions.AlphaNumericSpecial);
        }
 
        /// 
        /// Generates a random password with the default length.
        /// 
        /// Randomly generated password.
        public static string Generate(RandomPasswordOptions option)
        {
            return Generate(DEFAULT_PASSWORD_LENGTH, option);
        }
 
        /// 
        /// Generates a random password with the default length.
        /// 
        /// Randomly generated password.
        public static string Generate(int passwordLength)
        {
            return Generate(DEFAULT_PASSWORD_LENGTH, 
                            RandomPasswordOptions.AlphaNumericSpecial);
        }
 
        /// 
        /// Generates a random password.
        /// 
        /// Randomly generated password.
        public static string Generate(int passwordLength, 
                                      RandomPasswordOptions option)
        {
            return GeneratePassword(passwordLength, option);
        }
 
        #endregion
 
 
        /// 
        /// Generates the password.
        /// 
        /// 
        private static string GeneratePassword(int passwordLength, 
                                               RandomPasswordOptions option)
        {
            if (passwordLength < 0) return null;
 
            var passwordChars = GetCharacters(option);
 
            if (string.IsNullOrEmpty(passwordChars)) return null;
 
            var password = new char[passwordLength];
 
            var random = GetRandom();
 
            for (int i = 0; i < passwordLength; i++)
            {
                var index = random.Next(passwordChars.Length);
                var passwordChar = passwordChars[index];
 
                password[i] = passwordChar;
            }
 
            return new string(password);
        }
 
 
 
        /// 
        /// Gets the characters selected by the option
        /// 
        /// 
        private static string GetCharacters(RandomPasswordOptions option)
        {
            switch (option)
            {
                case RandomPasswordOptions.Alpha:
                    return PASSWORD_CHARS_Alpha;
                case RandomPasswordOptions.Numeric:
                    return PASSWORD_CHARS_NUMERIC;
                case RandomPasswordOptions.AlphaNumeric:
                    return PASSWORD_CHARS_Alpha + PASSWORD_CHARS_NUMERIC;
                case RandomPasswordOptions.AlphaNumericSpecial:
                    return PASSWORD_CHARS_Alpha + PASSWORD_CHARS_NUMERIC + 
                                 PASSWORD_CHARS_SPECIAL;
                default:
                    break;
            }
            return string.Empty;
        }
        
        /// 
        /// Gets a random object with a real random seed
        /// 
        /// 
        private static Random GetRandom()
        {
            // Use a 4-byte array to fill it with random bytes and convert it then
            // to an integer value.
            byte[] randomBytes = new byte[4];
 
            // Generate 4 random bytes.
            RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider();
            rng.GetBytes(randomBytes);
 
            // Convert 4 bytes into a 32-bit integer value.
            int seed = (randomBytes[0] & 0x7f) << 24 |
                        randomBytes[1] << 16 |
                        randomBytes[2] << 8 |
                        randomBytes[3];
 
            // Now, this is real randomization.
            return new Random(seed);
        }
 
 
    }
}

Thursday, August 12, 2010

Priorities

God doesn't demand I accomplish great things, He demands I strive for excellent relationships.

He doesn't care that I create great Software, but achieve great relationships.

Thursday, August 5, 2010

Browser Testing in IE 5,6,7,8

I found a neat little tool for doing browser testing on all the IE browsers.

http://www.my-debugbar.com/wiki/IETester/HomePage

You can easily open sites in each of the browsers in individual tabs. I needed to use this after trying out the IE Collection and my computer wouldn't run it because of some malware. compatibility

Monday, August 2, 2010

CSS Gradient that works cross browsers

Found this site very interesting.

http://www.webdesignerwall.com/tutorials/cross-browser-css-gradient/

Sunday, July 25, 2010

Funny iPhone 4 Ad





My New Phone: Nokia X6


So I recently bought a new phone, the Nokia X6 and wanted to share with you why I bought it and how I feel about the phone so far. Before this one, I had an old Samsung which was 2G. So this is my first smart phone and runs 3G (3.5G if you want to get technical).

The main candidates I had were Nokia X6, Google Nexus One and HTC Desire. The iPhone 3GS was not in the running because of its price being similar to the Desire, but not having as good specs. And I also just don't like the way Apple runs your life with iTunes.

So why didn't I get the Nexus One or Desire? The main factor was price. These two phones are priced between $800-$1000 depending on where you get them. And my personal opinion is that the Android OS is just not quite mature enough to warrant such a high price. With Google continuing their success of the Chrome OS, I can forsee that in a few years time, Chrome and Android will overlap and mobile phones will be much more like laptops. But back to today, its still a little way off.

The Nokia X6 won because I was able to get it from Gadgets Online for $560, and the phone comes with Ovi Maps, Nokia's free GPS Navigation software. It is by far the best GPS Navigation software available due it being completely free. You get access to all the maps of the world, plenty of different voices and languages - you can even record your own voice. Currently Google Maps navigation doesn't allow turn-by-turn navigation in New Zealand, and you have to be Online to access it. Ovi Maps has both online and offline modes - just download the maps while your on wifi.

I have to admit, the rest of the phone's features are average for a smart phone, nothing spectacular. Not quite as friendly as the iphone or android devices, but at the same time, those features aren't really worth the premium of $400-$500 extra.

So if GPS Navigation is a big thing, and your on a tight budget, Nokia phones are the way to go. And I would recomend the X6. It will take some time to get used to it coming from a non-smart-non-touch-screen phone, but I got there after a few days. But if you have money to burn, get the Nexus One, and spend another $120 for a GPS Navigation software that gives you offline maps. The Nexus One beats the Desire because it will get all the updates from Google, especially the upcoming and highly anticipated Android 3.0 which might just kill the iPhone...

Tuesday, July 13, 2010

.NET Deploy Multiple Assemblies (DLL) to the GAC

If you have too many assemblies you need to deploy to the GAC, and you can't drag and drop due to administrative rights, you can go through the Visual Studio Command Prompt.

Run Visual Studio Command Prompt in Administrator mode.

Change directory to the folder containing all the assemblies - its easy to just copy all the DLLs you need into some new folder and point it there.

Run the following:

FOR %1 IN (*) DO Gacutil /i %1

Saturday, July 10, 2010

Go Spain!

Although I love the Netherlands, and even though Spain beat my beloved Germany... if Spain wins the World Cup, New Zealand will be the ONLY unbeaten team.  Imagine that.

Friday, July 9, 2010

New Look Miami Heat: Dwyane Wade, Chris Bosh, LeBron James

I never thought it would have been possible, to see half the Eastern All-Star team on a single team.  But all basketball fans would have fantasized about this for their team no doubt.  Even I wanted to see it.  But now they are the team to beat and its looking grim for all other teams, in particular Orlando who are in the same division.

If two of them joined Chicago, the Bulls would have been immensely strong - but only one could have reach a max deal.  In Miami, it looks like they are getting 3 Franchise Superstars at the beginning of their prime.  I hope they don't get many players otherwise they are going to dominate too much and hog all the championships.

PS Check out all the hate for LeBron in Cleveland now... LOL

Friday, July 2, 2010

Looking back on my time at Olympic

I'll be starting my new job at ICE Interactive next week, but first I'd like to look back at the last chapter of my life at Olympic Software.

Prologue

I applied for a position at Olympic after being told about it by a fellow Software Engineering graduate, Wendy, who was my Part 3 Project Partner. They wanted to offer her a position but she had already found another one, and so that opened an opportunity for me. And after an interview involving "the supermarket question" I got the job!

I then worked 2 weeks over the summer developing a neat little lottery application before starting officially in January 2009. I also introduced my good friend Alex to Olympic, and so I was really excited to have a fellow classmate on board.

Day 1

My desk on my first day, you can see the beginning of the gadgets.


I went through a Helping Clients Succeed course, which is about "Peeling the Onion" and getting to the root of the problem, not just accepting what the customer is saying.

Also in my first week, Dinuka was leaving for Australia and André had already left for Europe.

BrainDump

Worked for a few months on BrainDump with Alex. There were a few late nights just chugging along with the never-ending stream of issues. Was a fun first project though!

Pedro showed up as Darth Vader. Apparently coding with the Force was quite productive.


SharePoint and OlympicCare

Started working with Stephen (the SharePoint Guru I might add) on Oly-Care, Olympic's client portal for communicating and sharing knowledge with our customers, including the support process. Went through most of what WSS 3 had to offer from setup and installation to developing web parts (mostly using the Smart part though) and administering pages and users.

Round the Bays

There was a big push to get everyone in the office ready for Round the Bays. In 2009 we had a fair turnout of around 10. But in 2010 we had a whopping 20! We went for Running Bunch twice a week, even though there weren't too many most of the time.



ITM and QV

My last projects were Projects for the above clients. Gained lots more experience in development :) Got experience with Test Driven Development, learnt some MVC.NET, some .NET forms web development, played around with JQuery, Javascript, CSS, and did some Win Forms development.

Joseph's Great Wall of Coke

Joseph drinks some 3-4 cans of coke a day, and after 3 odd years had accumulated quite a collection. He took them down to build a wall on his last day. Then proceeded to bust it down.



Final Words

I really hope that I have had some impact on the company or the team I worked with. Perhaps brought up morale when it was low, or just made people laugh when there was nothing to smile about. If nothing else, I have left my CubeeCraft guys there :D

Tuesday, June 22, 2010

Braces Off!

Yessss can finally chew gum again!!!!11

Wednesday, June 16, 2010

Can't Touch This - All Whites draw Slovakia

Check out this video which shows the two goals...

Tuesday, June 15, 2010

The craziest play in the NBA Finals I've ever seen

Garnett inbounding to Paul Pierce, with an NFL catch followed by a great pass to Rondo, who somehow catches the ball which is behind him while going full speed for the layup.

Sunday, June 13, 2010

Apple Introduces Revolutionary New Laptop With No Keyboard

Mac Book Wheel
Check out the video here...



PS this is actually quite old, but dug this up cos its so funny

Thursday, June 3, 2010

My Power is made Perfect in Weakness

Ever had the feeling of inadequacy? Ever felt that you just weren't good enough. I sure have. I would ask myself "What If I can't do what is expected of me?". Every now and again, a challenge comes around which you feel so completely powerless, so overcome, there is just no way out.

But He said to me, “My grace is sufficient for you, for my power is made perfect in weakness.” Therefore I will boast all the more gladly of my weaknesses, so that the power of Christ may rest upon me. - 2 Corr 12:9

Sunday, May 30, 2010

Why the Orlando Magic lost

On paper, this team has what it takes to beat everyone. Dwight Howard, Jameer Nelson, Vince Carter, Rashard Lewis. You have J.J. Reddick, Gortat, Pietrus off an incredibly deep bench. Most other teams are just 6 or 7 players deep. Boston is deeper than most and that probably negated the Magic's advantage there.

But the biggest failure was the Magic's desire and heart. Although there was plenty to be found in Howard and Nelson, the rest just didn't have it. In particular Lewis and Carter shot the ball terribly, didn't play hustle defense, and just weren't aggressive and show that desire to win at all cost. These two guys are singled out because they are slashers who can get to the foul line, they have talent and skills, and they have huge contracts.

I don't know if these guys can change their attitude, they haven't in the many years they've been in the league. Orlando needs to bring in someone with that desire to win. I wonder if we can make any moves this off-season with the huge free agents in the market. Perhaps a sign and trade to bring in Dwayne Wade?

Friday, May 21, 2010

Another Unmagical Night

Could it be that this year isn't Orlando's year? Dwight Howard and Jameer Nelson had a superb game. Vince Carter missed a couple of crucial free throws, and hasn't been able to dominate the game like we need him to. But its Rashard Lewis' magic disappearance act that has put the Magic on the brink. Usually he's unguardable with Dwight inside and Shard outside, but Boston has been able to defend Superman one-on-one and that means the Magic shooters don't get the open looks they are used to.

Give Boston credit, they are playing championship ball and look ready to take on the Lakers. I wouldn't mind such a finals rematch, the Magic don't deserve to make the finals the way they have been playing and thats just too bad. We need the whole team to step up, but its on Howard to lead and really dominate more than his usual dominate self. He needs to play so well (40pt 30rb 10bs) that the Cs have no choice but to tripple team him, and then... the shooters will be free to work their Magic. Otherwise, see you in November.

Tuesday, May 18, 2010

Planning a trip to the Gold Coast - yes its really happening!

So who wants to go? 7 nights in a 5-star hotel $959 pp inc flights! Travel date around August, September, October. Who's keen?


For more details see Flight Centre

The deal is in Q1 Resort and Spa, one of the best hotels in Gold Coast, the tallest residential tower with great views of the beach. Located right in the heart of Surfers Paradise too! So real close to the shops and food places, and of course the beach.

LeBron disrespects ball boy at Bulls game

Deliberately making him pick up his clothes from the floor...

We Are LeBron Video

Give Cleveland credit for trying...

We Are LeBron Video

Monday, May 17, 2010

Saturday, May 15, 2010

LeBron almost has a Quadruple Double, the Celtics Cavaliers series that wasn't, and Magic Predictions

LeBron's numbers; 27 points, 19 rebounds, 10 assists and 9 turnovers, in what could be his last ever game in Cleveland. What is sad about this whole thing isn't just that Mike Brown was a terrible coach - even though thats why they lost, but rather because James quit on this team, and is all but gone this free agency.

Boston won the series 4-2 but it wasn't really that close. After the first 4 games, the series tied 2-2, but the Celtics had played better 3 games to 1. The last 2 games when James had quit, the Cavs really had no chance. The Cavs coach couldn't get their rotations right, their defense was poor, and the bench really sucked.

But give the Celtics credit, they are experienced and they really fight to the last breadth. Plus Rondo is playing the ball of his life. Looking forward to the next series when the Magic face off against the Celtics. Last year, the Magic won in 7 games including a game 7 away win in the Garden. But Garnett was out that year and so was Nelson. The Magic played better in the series and probably could have won in 6. This year, we'll see if Howard can still dominate inside with Garnett added in the line up, and see if Rondo's emergence is affected by Nelson's return. The Magic bench will be a deciding factor as well, with so many players capable of putting up numbers and holding their own with the starters resting.

Magic in 6

Tuesday, May 11, 2010

Orlando is back in the Eastern Conference Finals

Whats impressive about the Magic's 4 game sweep of the Hawks is not so much the sweep, but the fact that all 4 games were blow out wins by an average of 20 something points. The final game was much closer, with the Magic unable to blow them out completely, but "only" winning winning by 14 points decided with 2 minutes to play.

Bring on the winner of the Cavs Celtics series. I want Orlando to play the best, and then we can say we beat the best. I'm predicting the Celtics in 7, with the bottom line being the coaching. The Cavs have a lot of great talent as shown when they are playing great. But their wild inconsistency must be a result of bad coaching. Imagine how good LeBron would be if he played on a team with a good coach, heck even if the Cavs had a better coach, who could get more out of Mo Williams, Jamison, Shaq...

Go Magic!

Monday, May 10, 2010

Ironing Man: The Movie

Check out this professional looking video...

Sunday, May 9, 2010

3M Mother's Day @ Whitcoulls Queen St

See video here...

Friday, May 7, 2010

How important is Vinsanity to the Magic?

With the 2nd game of the Orlando Atlanta series done, we move to Atlanta for game 3 where the Magic will be truly tested for the first time this playoffs. VC has definitely shown his importance with clutch plays especially in the 4th, and opening up the court with his all round skill. He was definitely an improvement over Turkoglu considering his play this season.

Go Magic!

A video tribute to Vince Carter...

Wednesday, May 5, 2010

Monday, May 3, 2010

The Case for Christ

Lee Strobel, an ex-atheist, tells his story about how his investigation of the evidence led him to become a Christian.

I read the book and this video is a very good summary especially for people who can't be bothered reading.

Recommended for Christians and non-Christians seeking an answer to the question: Is the Bible historically accurate? and was Jesus really the Son of God, or just a good and wise teacher?


Sunday, May 2, 2010

Why did God give us the Law?

No, God did not give us the law to restrict us, and to keep us from doing bad things.

Most people would have heard or read the Ten Commandments, and know at least a little of what the Law is. Most religions try to preach that we keep this moral Law, and we can get to Heaven. But the Bible tells us no one can keep it, and every mouth will be silenced.

Romans 3:19-28

19Now we know that whatever the law says, it says to those who are under the law, so that every mouth may be silenced and the whole world held accountable to God. 20Therefore no one will be declared righteous in his sight by observing the law; rather, through the law we become conscious of sin.

The Bible says that God gave the Law in order to show the whole world, that they have sinned and their actions are held accountable to God. God knew that no one would be able to keep the Law, and so He did not give the Law so that we might keep it, but rather so we will know what sin is.

We enter judgement not because of the Law, but because of who God is. He is a perfect and righteous God who cannot live with Sin, its just physically and logically impossible.

So let us focus not on keeping the Law, but on justification by faith through Jesus alone.

Saturday, May 1, 2010

Visual Studio Box Selection for Multi-Line Editing

Apparently this has been in Visual Studio 2008, but in 2010, this is greatly enhanced. Check out the video, this is awesome.

Thursday, April 29, 2010

South Beach Miami on a typical winter day


I wish I were in Miami...

Monday, April 26, 2010

C# Improve Responsiveness in Real Time Searching

When you have real-time searching (searching as you type) you will inevitably get a performance hit because each letter you type will trigger a search which usually retrieves data from the database or at best a cache.

One solution is to add a delay and not search until the user has stopped searching for say 500ms.

//declare the timer
private Timer _searchQueueTimer;

...

//Initialize the timer in the constructor
_searchQueueTimer = new Timer();
_searchQueueTimer.Interval = 10;
_searchQueueTimer.Enabled = true;
_searchQueueTimer.Tick += new EventHandler(_searchQueueTimer_Tick);

...

/// 
/// Add the search string to a Queue
/// 
private string _currentSearchItem;
private string _queuedSearchItem;
private DateTime _queuedSearchTime;
public void Search(string search)
{
    if (search.Trim().Length > 0)
    {
        _queuedSearchTime = DateTime.Now;
        _currentSearchItem = search.Trim();
        _queuedSearchItem = _currentSearchItem;
    }
}

/// 
/// Delay the search while user is still typing 
/// before performing the actual search
/// 
private void _searchQueueTimer_Tick(object sender, EventArgs e)
{
    // Time in milliseconds to wait before initiating the search
    const int queueTime = 500;
    if (_queuedSearchItem != null 
     && DateTime.Now.Subtract(_queuedSearchTime).TotalMilliseconds >= queueTime)
        {
            Cursor = Cursors.WaitCursor;//Provide feedback to users
            DoSearch();
            Cursor = Cursors.Default;
        }
}

/// Some psudo code for the method which actually does the search
/// Removes the queued search text from the queue
private Results DoSearch()
{
      if (string.IsNullOrEmpty(_queuedSearchItem))
          return list;

      _queuedSearchItem = null;
      SearchDB();

      return results;
}

Saturday, April 24, 2010

Taiwan's Susan Boyle

Monday, April 19, 2010

NBA Playoffs 2010: The first round

Lakers vs Thunder

The Oklahoma Thunder are in the playoffs for the first time since their move from Seattle (Supersonics), and with Kevin Durant leading the way, they are hoping to gain some experience before becoming an elite team in the years to come.  But its still Laker time.  Ron Artest is playing Dennis Rodman like defense, keeping KD shooting under 30%.  Bryant is also a great defender, plus they have two 7 footers.  I don't see anyone out west beating them beside Dallas.

Magic vs Bobcats

Howard's first game into the playoffs and he was frustrated by the Bobcat's front line.  He's not going to have a bad game every game, but it was great to see Jameer Nelson step up, scoring 36 pts 4 rebs 6 assists.  Lewi, Pietrus and Reddick had solid games and it was enough for a win even with VC playing badly.  I think the Magic will bounce back from this bad performance and play better as the playoffs go along, which is scary considering how deep they are.  Its no secret I'm vouching for a Magic Lakers finals rematch with the Magic finally winning that championship.

This still has Orlando fans angry...



Celtics vs Heat

I don't really care who wins this series, winner goes on to play Cleveland who will eventually make it through to the conference finals anyway.  I really like Paul Pierce, and I really like Dwayne Wade, so I'm just sitting back and enjoying an intense defensive series.


And just for fun... NBA's Record for most 3 pts by a team, staring the Orlando Magic...

WPF Problem Loading Designer

If your designer view is having problem loading, its probably because you have some code-behind in the constructor of your xaml form or user control. Add the following;

if (!System.ComponentModel.DesignerProperties.GetIsInDesignMode(this))
{
     // Code which causes the designer to fail
     // Stick this using segment inside the contructor 
     // code-behind and encapsulate all extra code
     // You may also need to add it to any initialize
     // or form load method if you have added extra code
}

Sunday, April 18, 2010

Selling some work out equipment

In order to make room for my new bench press - which has a lateral pull down, I'm going to sell my previous bench press and some dumbbell weights. If anyone is interested, come visit my trade me listings.

If these don't get sold I'll consider lowering the price. If anyone is interested - and if there aren't any existing bids, I'll do mates rates for these.

Hyper Extension Bench Press with Leg Extension

20KG Dumbbells

Saturday, April 17, 2010

What's your first thought of Cyclists while driving?

My Favourite (Active) NBA Players

1. Dwight Howard.  Best player on my favourite team.  He's also the best centre in the league, has a great attitude towards the game, is a Christian, and also likes Superman!

2. Dwayne Wade. In the years that Orlando didn't make the playoffs while Dwight was still young and up n coming, I followed Wade and Miami and their championship run.  His skill and talent is great but his determination won him the ring.

3. Paul Pierce.  I just love his playing style, since I also play Small Forward, The Truth is the player I want to play like.  A complete player that can shoot, penetrate, pass and defend.

4. Tim Duncan.  He almost became a Magic back when T-Mac and Grant Hill joined Orlando and what a team that would be.  He played with David Robinson and clearly gets a lot of values from him.  An unselfish player that dominates the game with fundamentals, and the only all world superstar that accepts lower pay so that his team can sign more and better players.

5. Vince Carter.  This spot just goes to VC because he joined the Magic this year.  He no longer commands the highlight reels with his dunks, but still a top swing man.

Honorable Mentions: Kevin Garnett, Ron Artest, Chris Paul, Brandon Roy

Friday, April 16, 2010

Beware of the Flying Fox - If you are male...

NZ Herald Article about a man who got his private part stuck in a flying fox...

Read full article here...

Thursday, April 15, 2010

Separating the Sheep from the Goats: Matthew 25:31-46

Recently, I got together with my friends from Jesus for the Homeless, and we discussed our goals and vision for the group, as well as a strategy going forward.

We drew on the passage from Matt 25:31-46.

For those interested, here is a transcript of our study:


Separating the Sheep from the Goats: Matthew 25:31-46

Our group is called Jesus for the Homeless.  What I like about this name is that it has Jesus in it.  You see, the whole reason this group got together was because of Jesus.  A bunch of guys were reading the bible one day, and saw how Jesus loved the poor and the downtrodden, the widows and the fatherless.  They realized they could not claim to love and follow Jesus without helping the poor.

Our Homeless nights have been running for some 6 months now, and I feel it is important to come back to scripture and think about our goals and vision for the group.  Why are we doing this? and what is the goal we are trying to reach?

I would like to open to a verse in Matthew, which I hope to be our group's defining passage.

Matt 25:40 - "The King will answer and say to them, 'Truly I say to you, to the extent that you did it to one of these brothers of mine, even the least of them, you did it to me.'"

This verse comes from a segment in the book of Matthew, where Jesus is speaking of the Judgement.  The separating of the sheep from the goats.  

Let us firstly read the entire passage.  [Reading of Mathew 25:31-46]

Firstly, who is the Judge?  The King, the son of man, Jesus Christ himself.

Next, who will be judged?  The passage says Jesus, will gather all the nations.  Everyone, Christians, non-Christians alike will be gathered together and judged.  And He is going to separate them like a shepherd separates sheep from goats. 

So who gets to inherit the kingdom?  The sheep.

And why do the sheep inherit the kingdom?  Lets read v 35 to 40 again.

Mat 25:35  For I was hungry, and you gave Me something to eat; I was thristy and you gave Me something to drink; I was a stranger and you invited Me in;
Mat 25:36  Naked, and you clothed me; I was sick, and you visited me; I was in prison, and you came to Me.
Mat 25:37  Then the righteous will answer him, 'Lord, when did we see you hungry, and feed you? or thirsty, and give you something to drink?
Mat 25:38  And when did we see you a stranger, and invite you in? or naked, and clothed you?
Mat 25:39  Or when saw we thee sick, or in prison, and came unto thee?
Mat 25:40  And the King shall answer and say to them, 'Truly I say to you, to the extent that you did it to one of these brothers of mine, even the least of them, you did it to me'.

Who are these brothers Jesus talks about?  There are scholars who says Jesus is refering to the Jews, or to fellow Christians.  But this question is similar to "who is my neighbour" which a lawyer asked Him in Luke 10:29.  The point is not who you should help, but how.  Serving others without expecting a reward.  These acts of compasion are not things we need gifts or skills in order to perform.  They are simple acts of kindness which anyone can do.

Sheep and Goat look similar and often grazed together.  Jesus is using this picture of sheep and goats to describe His people among the rest of the people; unbelievers and pretenders.

Jesus says the sheep who inherit the kingdom will be those who show compassion to the needy.  

Now, don't get me wrong here, it is not by our actions and goodness that gets us to heaven, these actions are just the fruit of following Jesus.    If we love and follow Jesus, we will feed the hungry and visit the sick.  What separates us from unbelievers and pretenders, is not just our actions, but our intentions and our reasons.  And when we show kindness and compassion to our brothers, without thinking of the reward, even to the least of them, we do it to the Lord himself.

So back to our group; Jesus for the Homeless. 

Why do we do it?  Because we love and follow Jesus. 
How should we do it?  We treat everyone with love and respect as if they were the Lord Himself.
What do we need? Anyone who is interested in helping the poor.  There are lots of ways you can help, but whats important is that desire to help.

Saturday, April 10, 2010

Tuesday, April 6, 2010

Saturday, April 3, 2010

The Sabbath: A shadow of Christ

I would like to share of a recent study I did of the sabbath and how it gave me a completely new perspective on rest, and ultimately how it pointed toward Jesus.

What is the Sabbath?  Christians often think of it as the day of rest, in particularly abstain from work usually done on Sunday.  The Jewish Sabbath was on the seventh day - Saturday, and in fact the 4th commandment from God given by Moses was to remember the Sabbath and to keep it Holy.  There are some people such as the Seventh Day Adventists who claim that we are not really Christians unless we also observe the Sabbath on the Saturday, reasoning that the Pope or Constantine shifted the Sabbath from Saturday to Sunday and as such we worship false gods or idols.

So to understand the origin of the Sabbath, we must look at its first occurance in the Bible - Genesis 2:1-3.  This was the seventh day of creation, God had finished the work He had done in creation and He rested.  So the main thing we can learn about the Sabbath was that it is about rest.  The word rest occurs twice here, and the hebrew word is שׁבת (shâbath).  What does rest mean?  Clearly in this context, rest is not the kind of thing you do when you are tired, God does not get tired.  Rather the word means to "desist from exertion" or "cease from effort".  God rested because He finished a particular effort, his work in creation.

The next thing we notice is that the seventh day is different to all the other days.  In each of the other six days, the day ended with "there was evening and there was morning...".  I believe this eludes to the idea that the Sabbath is not tied to a particular day.  We are never told that God ever stopped resting from His creation work.  His last and final work in creation was creating Man, and He is still to this day, resting, from His "creation" work.  But God is active and working today.  In John 5:17, Jesus' answer to the Pharisees charge of working on the Sabbath, was that He was doing the will of the Father, and that God never ceases from the work of mercy and compassion.  This Sabbath which God has entered, is still continuing today, and is not limited to any particular day, but is concerned with rest from effort.

Now we compare this true Sabbath, this rest, to the Jewish Sabbath which was given to the people of Israel by Moses.  I would like to quickly make a point here that my view is that the entire old testament, is filled with Shadows or Types or Symbols which pointed towards Jesus Christ, the Passover Lamb, burnt offerings, the Tabernacle, the High Priest, the Ark, all of these look forward to the one who would fulfill these.  Let us turn to Colossians 2:16-17.
Col 2:16  Let no man therefore judge you in meat, or in drink, or in respect of an holyday, or of the new moon, or of the sabbath.

Col 2:17  Which are a shadow of things to come; but the body is of Christ.  
Paul is telling us here that many of the Jewish laws, traditions, ceremonies were a shadow of things to come, pointing towards Jesus who ultimately fulfilled all these things.  We no longer need sacrifice animals because Jesus offered Himself as the passover lamb to God once and for all.  We are also told that Jesus fulfilled the Sabbath, and so claims that we are not Christians unless we observe the Sabbath on Saturday are as absurd as needing to sacrifice animals at the alter.  The Jewish weekly Sabbath occurred on Saturday.  We go to Church on Sunday because that is the Lord's Day, the day of resurrection.  This day has nothing to do with the Jewish Sabbath, its not a day of rest, its not the Sabbath.

When Jesus died and rose again, Christians stopped observing the Sabbath on Saturday, and began observing the Lord's day on Sunday.  So the weekly Sabbath was fulfilled when Jesus died and rose again.  We no longer need to observe such a day as a day of rest.  We can now experience the true Sabbath through Jesus.  Turn to Hebrews 4:8-10.
8 For if Joshua had given them rest, then He would not afterward have spoken of another day. 9 There remains therefore a rest for the people of God. 10 For he who has entered His rest has himself also ceased from his works as God did from His.
The book of Hebrews is all about how the old testament prophesies are fulfilled in Jesus Christ, and I think this passage is telling us how to experience that true Sabbath, the rest for the people of God.  We can enter God's rest by ceasing from our works as God also ceased from His.

Matthew 11:28-30
28"Come to Me, all who are weary and heavy-laden, and I will give you rest.
 29"Take My yoke upon you and learn from Me, for I am gentle and humble in heart, and you will find rest for your souls.
 30"For My yoke is easy and My burden is light."
A yoke would have been something Jesus built as a carpenter.  A yoke is a piece of wood which was put onto oxen in order to pull a load.  But a yoke would almost always fit two oxen, as the two would work together.  When Jesus refers to putting on His yoke, He is saying He will work with us, by His strength.  Not by our efforts but His.  We are to rest from our work, doing things our own way, and do things under His strength.  That is what Paul meant when He said "It is no longer I who lives but Christ lives in me".  The oxen under yoke is no longer able to do his own will, but only the will of his master.  The same is true when we put on Jesus' yoke, we are no longer able to do own thing, but only the will of the Lord.

Jesus said "Come to me, and I will give you rest".  So many of us Christians or not alike are unsatisfied with life.  We don't find happiness in our relationships, our jobs, our material wealth.  We don't have peace in our souls.  The true Sabbath is to rest from our own efforts, and allow God to work in us.  We are to put on Jesus' yoke and He will give us rest.


Further Reading:
In Hebrews 4, it mentions the Israelites led by Moses, and how they were not able to enter the Promised Land.  It was ultimately Joshua who brought them in.  Read the book of Joshua and notice where it says the Israelites will find rest in the land.  The book of Joshua is about conquering the land of Cannan, crossing the Jordan.  How does this parallel with the book of Ephesians, a book about life after becoming a Christian?

Friday, April 2, 2010

Happy Easter!

Edypository 2.5 is here - thanks to a comment by Jacqui saying my blog had the .Net MVC blue, I changed the skin again.

Friday, March 26, 2010

Thursday, March 25, 2010

Code Snippets are Here!

If any of you follow any code that I write, well now they are nicely formatted as code snippets!

Click here to install Syntax Highlighting onto your web site.

Tuesday, March 23, 2010

What does God think about Gambling?

In my last blog post, I stated that there was no difference between gambling in a casino, and speculating in the stock market.  By that I meant that both are considered gambling.  Both require taking (usually high) risk to gain wealth quickly.  Speculating in stocks is gambling.  Even if you argue it requires extensive research, and perhaps skill, but so does the game of poker or black jack.

I personally dislike gambling, and leaving things to chance.  Which is why for the question "What does God think about Gambling?" I needed to do a bit of research.  And the bible doesn't speak specifically of Gambling, as it didn't speak specifically of the Stock Exchange.  But it does speak a lot about money.  In my previous article I already quoted several places in scriptures that warned against the love of money and encouraged the good stewardship of money which comes from God and is given to us to look after.  And in a way, he is testing us, to see what we do with it (see Matt 25:14-30).

And so although you can make the very valid case that gambling is not a sin, because you can gamble for its own sake and enjoyment, and not for money's sake, in reality this is far from the truth.  In practice, people only go to gamble for the chance of making money quickly, and money is the driving force.  Factor in the many people addicted to it, who are often in the low income brackets.  Because of this, I think Christians ought to discourage gambling.

What then is the difference between investing and speculating (and gambling)?.

Investing in the stock market is investing in business ownership.  When you buy stocks, you buy part ownership of the company.  The stock market was initially created for a market to raise capital, for businesses.  It would be good if there were no speculators, but that would be near impossible to ban.  So when we buy stocks, we ought to be buying stocks from companies we believe we want to be a part of, companies we think that are producing goods and services which are beneficial to the world.  Yes I believe even stock investors have a social responsibility, to invest in socially responsible companies, not just ones making a lot of money. The point of investing in the stock market is not only a means of wealth generation, but a way of investing in our country's (world's) economy.  Market forces are what drives this capitalist world, Supply and Demand, and we are that demand.  Making choices on what companies to invest in, is similar to our shopping habits and consumer behavior.  Do we invest in a company that supports child slave labour?  Do we consume these products?  This is something I need to take a look at in my own life.

And finally, wealth creation.  What does the bible say about making money?  I've mentioned already that the love of money is the root of all kinds of evil.  God cares about why you are making money.  Are your motives for investing in the stock market driven by personal wealth?  And God cares about how you are making money.  The bible's model for creating wealth is in Proverbs 13:11:
Wealth obtained by fraud dwindles, but the one who gathers by labor increases it - Proverbs 13:11
We are to earn wealth by working for it honestly.  Would God be pleased if you stole money from a bank to give to the poor?  No.  He would never ask you to commit sin even if it were for a good cause.  God doesn't need your money.  Our all powerful God never compromises.  There is never a good reason to cheat or break the law, even if it seems like its the only way, or if it is for a good cause.
Keep your life free from love of money, and be content with what you have, for he has said, "I will never leave you nor forsake you." - Hebrews 13:5

Friday, March 19, 2010

What does God think about a Christian Stock Investor?


To the question of whether a Christian can invest in the stock market, my quick answer would be yes.  Read on for the difference between saving and hoarding.

This is the first article in the series to investigate what I believe God thinks about certain professions.  Firstly, what might be challenging about investing in the stock market?  What is the difference between gambling in the casino, and speculating in the stock market?  Nothing.  But what is the difference between speculating and investing?  There is a huge difference.  Companies need capital operate and listing on the stock market is one way to raise funds.  We won't go into the Christian businessman in this article, and we won't go into gambling either.  But investing in stocks is a way to invest in a company and its operations.  To decide whether a company is worth investing in must be decided upon on a case by case basis.  Some people will not invest in casinos, weapons manufacturers, non-fair trade, multinationals which hire child laborers, alcohol manufacturers.  I also think many of those are bad, but its sometimes hard to draw the line, what about companies which support, supply or trade with those businesses?  What about businesses which are supported by those businesses?

What then is the difference between hoarding money and saving?  The bible warns against the hoarding of money, since money is a material wealth, which we cannot take with us when we die.  We are to save money and be good stewards of money.  When we save money, it must be for some purpose; saving for our retirement, to give to the Church, to give to overseas aid, to give to the poor, to save for our children's education.  All these things are good things to do, encouraged by the bible.  The hoarding of money, is when we accumulate wealth for the sake of it.  We keep it because we love looking at our bank balance getting bigger.  Remember money is not evil, it is the love of money which is evil.

Are there any examples of investors in the bible?  Since the stock exchange did not exist in biblical times, it is quite difficult to find an equivalent.  But the bible does have a lot to say about money.  We should be good stewards of our money, meaning we must look after every cent, and not let any of it go to waste.  All our money comes from God, in fact all money and wealth belongs to God, and is given to us for safekeeping.  We are to look after the Lord's wealth.  Part of this means being generous and giving to the poor.
Matt 19:21  Jesus said unto him, If thou wilt be perfect, go and sell that thou hast, and give to the poor, and thou shalt have treasure in heaven: and come and follow me. 
Jesus told the rich young man to sell all that he had and give to the poor.  The wealth that we are given is not ours in the first place, we are to let Jesus dictate what we are to do with it, most of the time that involves helping others less fortunate than us.  Proverbs 3:9-10 tells us we are to honor God with our wealth.

Prov 3:9  Honour the LORD with thy substance, and with the firstfruits of all thine increase: 
Prov 3:10  So shall thy barns be filled with plenty, and thy presses shall burst out with new wine. 
Proverbs 28 tells us not to try and "get rich quick".

Prov 28:20  A faithful man shall abound with blessings: but he that maketh haste to be rich shall not be innocent. 
And much of the bible warns against putting our trust in worldly possessions such as money.
1Tim 6:17  Charge them that are rich in this world, that they be not highminded, nor trust in uncertain riches, but in the living God, who giveth us richly all things to enjoy
And finally, the parable of the talents.  Matt 25:14-30, Jesus tells us that we should invest our money in a way that reaps the greatest return, to the best of our abilities.  This means putting effort into learning about interest rates and term deposits.  We must learn about the stock market, and foreign exchange for the best place to invest our money.  Perhaps even looking at property investment and real estate.  If God has given you an intelligent mind, which by the time you read this, you likely have, I think its not good enough to settle with storing your money in the bank and being a 'good saver' simply by not spending.  We must looking into options with greater return.  We are looking after the LORD's wealth, he has given us Talents, and we are show Him what we have done given the mind and skills He has given us.