Monday, August 25, 2008

Abundant Life?

Everybody wants to have an abundant life. Some people feel that they are entitled more to it than others, but essentially we all want to live abundantly. To each one the standard of abundance may differ, but it almost does not matter. We may be rich or poor, healthy or in sickness, but there is this gnawing thirst to be satisfied and be happy.

Living in abundance means that we are not in need. This does not mean having things in excess or insurmountable things, but simply living happily and satisfactorily.

Throughout the ages humanity has been trying endlessly to find the key to happiness/abundant living. Ranging from psychological manipulation, wealth accumulation, positive thinking movement, secret society, religion, drugs, alcohol, and sex – all are human attempts to make themselves “happy” and living abundantly – and all of them seems to not scratch where it itches, at least for long and permanently. People always invent new ways of doing those thing in a new light, with a new twist, combining recipes, etc – in hope to find the ultimate way (and easy) to find permanent happiness and abundant living.

If we filter down and try to find a silver lining among the approaches that human have tried to find abundance in their lives, typically they are all boiled down to self-centered. In hind sight, this totally makes sense – since we are in need (not abundance) and unhappy, therefore we must strive to satisfy ourselves by finding whatever that will make me happy and satisfy my desires.

To be wholesomely happy then, we need to apply this to all areas of our lives, such as monetary, relationship, technology, food, entertainment, etc. How does this work?
In financial/monetary, we then strive to accumulate money as much as possible, so then we can feel that we are secured and able to buy things that we desire – and therefore resulting in happiness.

In our relationship, we then try to find friends that are not in conflict with us and as much as possible to be compatible. This will reduce tendency to conflict and emotional baggage that will consume our lives mentally and introduce more needs – which leads to unhappiness.

In finding our soul-mate or spouse, we uphold high the compatibility factor, since the more compatible you are, the happier you will be.

It is quite safe to say that we often consider that selfishness is the key to success in attaining abundant life. Our culture certainly says so – with all the movies, reality shows, contests, game shows, video games, music, fashion, commercials, books, and punditry.

Is SELFISHNESS really the KEY to SUCCESS in finding abundant living?
-- read more and comment ...

Tuesday, August 19, 2008

ASP.NET 3.5 ListView Web Control & CSLA

In .NET Framework 3.5, there is this new web control called ListView. ListView has been there in WinForm development for a while, but now it is available for web development. You can think of ListView as like an upgrade to GridView - a super cool upgrade - although GridView is still there. In fact, many of the stuff that ListView has are quite similar to those in GridView.

If you have a DataSet, it is super easy to bind to a ListView - all the available methods will work out of the box. A lot of tutorials on the web are written against this type of example (ListView & DataSet). What if you are using your own collection or list? In this example, I am using a CSLA based list. Hopefully this will be helpful for you in your ASP.NET - CSLA coding endeavor.

Binding
I use a CSLA datasource object. If you are using CSLA in your web project, this should be available for you.

Select the CSLADataSource from the toolbox and drag it into your page/control. You can change its ID and set some properties. Go to the event and implement the onselectobject methods such as this:


protected void CslaDSMyClassList_SelectObject(object sender, Csla.Web.SelectObjectArgs e)
{
e.BusinessObject = GetMyClassList();
}

private Csla.SortedBindingList GetMyClassList()
{
object businessObject = Session[SessionKeys.CurrentObject];
if (businessObject == null || !(businessObject is Csla.SortedBindingList))
{
Csla.SortedBindingList temp = null;
temp = new Csla.SortedBindingList(MyClassList.GetMyClassList());

temp.ApplySort(SortByPropertyName, SortDirection);
businessObject = temp;
Session[SessionKeys.CurrentObject] = businessObject;
}
return (Csla.SortedBindingList)businessObject;
}

Those methods guarantee that your ListView will always binded to a Csla.SortableBindingList holding your list, therefore this will Sort a feasible feature in our ListView with just some simple minimal coding.

Next, select a ListView control in your toolbox and drag it into your page/control. Set the d"Choose Data Source" selection to your CSLADataSource object name. Click on "Configure Data Source" and set the "Business object type" to your CSLA list and that is it! At this point, if you want, you can configure your ListView to show/hide data, put themes, adjust colors, etc.

Insert, Update, and Delete
Since with CSLA list objects you cannot natively call Insert method or Update or Delete (and CSLA by default also does not have a default constructor), you have to implement the event handler for "updating", "inserting" and "deleting". So instead of using the default methods, you will actually use the standard CSLA methods for saving object (.Save()). In inserting, a factory method call New is made and then populate the object using the data mapper and Save() it. In updating, similar process, but instead of New, a call to Get is made, then populate and then Save(). Here is an example for updating (inserting and deleting should be pretty similar).

protected void ListView1_ItemInserting (object sender, ListViewInsertEventArgs e)
{
MyClass myObject = MyClass.GetMyClass((int)(e.Keys[0].ToString()));
Csla.Data.DataMapper.Map(e.NewValues, myObject);
myObject = myObject.Save();
e.Cancel = true;
ListView1.EditIndex = -1;
ReloadList();
}

Sorting
Since Sort does not work automatically like when you are binding a DataSet, so you have to do it a little manually, but it is not bad at all. First, you have to create your button for sorting, either it is a regular button or link button, etc - it does not matter. I use the column header and convert them into link buttons. Secondly, you will need to assign a CommandName and CommandArgument. Here is an example of mine:

Name

Now in the code behind, create a handler for the ItemCommand. You can actually customize your list view with all kinds of command and as along as you have a matching handler in this ItemCommand hook, then you should be good to go. There are several keywords that ListView by default has implemented: "Edit", "Insert", "Sort", "Delete". So apart from that, you can call your command anything you want.

protected void ListView1_ItemCommand (object sender, ListViewCommandEventArgs e)
{
if (e.CommandName == "CSLASort")
{
if (SortByPropertyName == e.CommandArgument.ToString())
{
if (SortDirection == System.ComponentModel.ListSortDirection.Ascending)
SortDirection = System.ComponentModel.ListSortDirection.Descending;
else
SortDirection = System.ComponentModel.ListSortDirection.Ascending;
}
else
{
SortByPropertyName = e.CommandArgument.ToString();
SortDirection = System.ComponentModel.ListSortDirection.Ascending;
}
}
}

SortDirection & SortByPropertyName are just properties of the page/control defined as such:

private string SortByPropertyName
{
get
{
if (ViewState["SortByPropertyName"] == null)
ViewState["SortByPropertyName"] = "FullName";
return (string)ViewState["SortByPropertyName"];
}
set { ViewState["SortByPropertyName"] = value; }
}

private System.ComponentModel.ListSortDirection SortDirection
{
get
{
if (ViewState["SortDirection"] == null)
ViewState["SortDirection"] = System.ComponentModel.ListSortDirection.Ascending;
return (System.ComponentModel.ListSortDirection)ViewState["SortDirection"];
}
set { ViewState["SortDirection"] = value; }
}

There you go. You can read more on ListView here.
-- read more and comment ...

Sunday, August 17, 2008

Indonesian Independence Day (63rd)

August 17th, 1945 - Indonesia declared its independence from the Japanese. Just several days after Hiroshima and Nagasaki were bombed, Japan called a retreat and removed themselves from their colonies, including Indonesia. Indonesian people took their chances and declared independence - where the forming and planning of the declaration itself was full of drama for nationalistic sake!

Here is the short text of the declaration itself:


Kami, bangsa Indonesia, dengan ini menjatakan kemerdekaan Indonesia.

Hal-hal jang mengenai pemindahan kekoeasaan d.l.l., diselenggarakan dengan tjara saksama dan dalam tempo jang sesingkat-singkatnja.

Djakarta, hari 17 boelan 8 tahoen 05

Atas nama bangsa Indonesia

Soekarno - Hatta

Read the short version of the history here.

It is even sweeter this time since Indonesia won gold medal in the Olympic for men's double badminton. We actually got several medals.

It is very tempting to actually disown Indonesia as my motherland, but I believe that I was born and raised in Indonesia for a reason - a divine reason. Indonesia is still my home, even though I have been away for a while. So one of my purpose in staying in US for a while is to absorb as much as possible so that I can use those in my country - as time goes by, the stronger the affections grow.

My vision for now is help other Indonesian Christians so that they have a vision and passion to make impact in their communities for Christ - while trying to bring an impact in the Indonesian community from US, and eventually be able to go home to Indonesia and have a direct involvement and impact over there.
-- read more and comment ...

Thursday, August 14, 2008

New computer

My home computer is old and since we bought a digital camera and a FLIP, disk space recently have started to become an issue. It is an Athlon XP 3200+ with around 200GB of space and 1 GB of RAM. It is old, noisy (since I have to put fans everywhere to cool it) and my case is also falling apart. It is 4 years old ... which in computer age is like decades ... So, I am looking into getting soe more disk space to back up my photos, videos, mps2, and other data - but knowing that it is getting unstable, I decided to go the whole nine yards and build a whole new computer altogether and use my old as a backup.


So, here is my new system (some of these components are recommended by my friend Shawn - so thanks Shawn!):

  • Cooler Master Centurion 5 case
    My old case is small and I still plan to use it to host my old computer to run back up/storage. So getting a new case that is sturdy, flexible, with good air flow, accessible, but not overly expensive is imperative - this case fits all the requirement. Thanks to elpiar to point this out.

  • Corsair CMPSU-520HX
    My MB have been fried twice in the past because of bad/malfunctioning PSU. So this time, I aim to get a decent one and the Corsair has flexibility that allows you to attach/detach cable according to your need. So it is a winner in my book- super recommended.

  • ASUS P5Q
    My friend Shawn who is also building his own system recommended MSI P6N - which is a stellar performer. I choose the ASUS P5Q because of several reasons: more max RAM, faster RAM DDR, more SATA, and my bias toward ASUS - all with the same price as the MSI. Since I am building a machine that will run 64 bit processor, may run VMs, and most of the time is used for image processing, I need god amount or RAM headroom - P5Q allows up to 16GB instead of 8GB.

  • Intel Core 2 Quad Q9300 2.5 GHz
    Last time I got an AMD, I have to put 3 extra fans to cool it down. So, I am going with Intel now. I went with Q9300 instead of Q6600 or Q6700 because of the newer technology (4.5nm) and also since that is the best I can get for the money.

  • G.SKILL 4GB (2 x 2GB) 240-Pin DDR2 SDRAM DDR2 1066 (PC2 8500)
    No brainer here, just the good, reliable, and compatible (this is important) memory according to the MB. I typically don't want to cut corners on RAM, since faulty RAM is really a PITA.

  • WD raptor X WD1500AHFD 150GB 10KRPM SATA
    OVerall, this is probably the killer buy right here. I am super happy with this drive. It is fast, quite and has a transparent cover too! My boot up time is reduced significantly because of this drive.

  • Seagate Barracude 7200.11 500GB 7200 RPM SATA
    Need huge storage to store all my media files? Get this HD. I was thinking about doing RAID etc, but in the end I just bought this HD and run a backup bimonthly to my old 200GB drive. I may get another one of this at some point. Plus this is probably the best bang for the buck HD you can get - $78 for 500GB!

  • Scythe SCNJ-1100P 120mm Sleeve CPU Cooler
    This is a bad-ass heat-sink right here. I don't have to use this since the Q9300 comes with a factory heat-sink. But it just looks awesome and people highly recommend this heat-sink if you are over-clocking the CPU - which I may do. So, I splurge a little here and got the bad-ass heat-sink.

  • SAPPHIRE 100218L Radeon HD 2600XT 512MB 128-bit GDDR3 PCI Express x16 HDCP Ready CrossFire Supported Video Card
    I won't be using this machine for gaming much and most of my games are RTS (like Warcraft III or AoE) - so I won't be needing the super-duper video card, but I do need a video card that can run dual DVI for my monitors. This card seems to be serving purpose - well balanced with power as well as simplicity and cheap ($35) - a good choice!


-- read more and comment ...

Monday, August 4, 2008

How to smoke ribs

Smoking ribs is not easy and I have done it several times now with progressing tastiness. So, hopefully this post will help you when you decided to smoke some ribs. When done right - it is super awesome!


My style is dry rubs and slow moist smoke. Others like wet-rub better, some like baking it in the oven for simplicity/speed, etc. Feel free to take my way and tune it to your liking.
Ingredients:

  • Baby back or loin pork ribs

  • Dry rub spices - you can get these from the store or make your own. I bought several from Sam's Club and combined them to form my own rub

  • BBQ Sauce - I bought mine from Sam's Club and modified it to create a spicy bbq sauce by adding some honey and chipotle tabasco


Tools:
  • A good charcoal grill - mine is like this and something like this would be better.

  • Hickory wood chunks (not chips)

  • Apple wood chips

  • Wood chips metal tray

  • chimney smoker - click here to see photo and video demo of using it

  • Hickory Charcoal - I use Kingsford Hickory charcoal

  • A bucket (13 gallons or larger - large enough to soak the wood chunks)

  • Ribs rack (if needed)

  • Vegetable oil (or any kind of cooking oil)

  • Oven/grill thermometer


Preparation: (do this in order to save time)
  1. Soak wood chunks in water for at least a day - so do this step a day of two before the actuall cooking/smoking

  2. Ribs must be close to room temperature as possible. If yours is frozen, let it thaw to room temperature.

  3. Brush your paper with some cooking oil and use that paper to light up your charcoal in your chimney smoker - and don't touch it again until the charcoal is ready (usually about 10-15 minutes)

  4. Rub the ribs and let rest for about 15 minutes at room temperature

  5. Put charcoal in grill, as far away as possible from where you're going to put the ribs. I usually put my ribs near the grill's chimney and put the charcoal on the other side.

  6. Arrange the charcoal to stay as close to each other as possible (not spread around like regular grilling)



Cooking/Smoking:
  1. Once the charcoal is set, start putting wood chunks on top of charcoal. At this point, you should not need any more charcoal - just keep adding wood chunks to maintain heat and smoke

  2. Don't put your ribs/meat yet. Put your thermometer in the grill at the area where you are going to put the meat and close the grill. After 2-3 minutes, get a reading. If you have somewhere between 160F to 190F, you are doing great. If you have less or more, you want to work up/down to that temperature.

  3. Once you have a consistent temperature, start putting your ribs. On my grill, I only use a half of the cooking surface and leaving the other half open (including the area directly on top of the fire. Since my ribs arrangement will make the ribs closer to the heat cooked faster, I plan to rotate them consistently during the smoking period.

  4. Put apple wood chips in your wood chip metal tray and put it directly on top or near by your heat source/fire. I usually put mine on the rack on top of the fire. This will put more smoke (and also combine apple wood with hickory) but since it is using DRY wood chips, it cannot touch fire directly, but it needs a strong heat source.

  5. Ribs in the grill, put thermometer on top of ribs, and make sure smoke are coming out from your wood chunks and no direct fire touching the ribs.

  6. Every 45 minutes, glaze your ribs with BBQ sauce and rotate them if necessary to ensure even distribution of heat to the ribs. Also replenishing wood chunks to maintain temperature. Check your wood chips, make sure they are not on fire but still smokey.

  7. After 4 hours, you should have a fairly good smoke flavor in your ribs. I usually go 5.5 hours - so at this point, you can proceed to the next step or wait another 1.5 hours. Most of the time, waiting is really worth it ... unless of course you are absolutely really hungry or pressed on time.

  8. Once the smoking is done (4 hours or more), place your ribs on top direct heat in your grill. In my case, I just put the rack back on on the fire side and move my ribs there. Do this for about 2 minutes on each side while glazing them back and forth on each side. Keep doing this for about 3 times to bring your ribs up to temperature.

  9. Next step is to consume your ribs! enjoy!


-- read more and comment ...