browse by category or date

Hady Mirza

I know this is not ‘news’ anymore, its soooo yesterday …. 😀 But I still have the itch to write why is it Hady Mirza won the first (considering this unexpected result, the last ? :P) Asian Idol. An itch must be scratched, and this is my scratches.

I watched the final showdown of Asian Idol at home accompanied by most of my flatmates. As expected, most of us were rooting to Mike Mohede (the Indonesian Idol). A minority (one person :P) was rooting for Vietnam’s Phuong Vy (sexyness was very likely was the most driving factor :D). But all of us was wow-ed by Malaysia’s Jaclyn Victor, she sang really, really good. We all agreed that the top three would be Mike Mohede, Jaclyn Victor and Philippine’s Mau Marcelo. Although we, as Indonesian, have a certain degree of animosity towards Malaysia (Malingsia? :P), we would still be happy should Jaclyn won the contest as she is a really good singer with amazing voice.

But life is unfair and Hady won the contest :P. So how did Hady Mirza managed to beat the better singers? Allow me to propose a few scenarios:

  1. The rule of valid vote was to select two Finalists. But it is very likely most people didn’t vote for the best and 2nd best. Instead, they will vote for their best singer and other finalist which is not in the top three (Phuong, Hady and Abhijeet). For example, although I rooted for Mike, I will not vote for Mike and Jaclyn, but I will vote for Mike and Hady. So imagine if the Indonesians voted for Mike and Hady. The Philippines voted for Mau and Hady. The Vietnamese voted for Phuong and Hady, etc. In the end, Hady will have the biggest total of votes.
  2. Most voters are female. And they want to have an Idol who is good-looking (read- not fat), and not married. Only Hady Mirza satisfy these two requirements 😛 (I know have a karma burn for this.. but there you go)
  3. Hady is the only Muslim in the competition. There is a chance that he was voted for that particular reason. Maybe yes, maybe no, I just don’t know 😀

I have other theories, ehm.. I mean conspiracy-theories but I don’t think they worth mentioning here and considering you need to wear some sort of hat, a tinfoil one, before you can understand the theory (something to do with intercepting the SMSes and manipulate the content of SMSes).

So those are my theories (theory no. 3 is credit to my Flatmates). Which one do you think the most possible to happen? Or do you have your own theory?

About Hardono

Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.

Now that I have switched to Ubuntu Linux, I need a programming language where I can program simple GUI applications for fun (and profit?). I could have use C# using MonoDevelop, but I choose Python instead. It was more sentimental choice because the name Python was more connected to Monty Python (Nudge..Nudge..Wink..Wink anyone?) than to the a species of snake.

What I need now is a small GUI program which strip out all the dashes and white spaces and automatically copy the cleaned string to Clipboard. I used wxGlade to design the GUI and Eric as the editor for my first Python script.

wxGlade in action
If you are used to Visual Studio, designing your Form using wxGlade will be quite tricky. It will not straight forward just by drag-and-drop. You need to create containers first before you can put any Textboxes, Labels or Buttons. You will not able to position the Controls freely as the layout will depend heavily on the Containers.

Once satisfied with the layout, you then generate the XML file and the Python’s source code.

#!/usr/bin/env python
    def __set_properties(self):
        self.SetTitle("DashRemover")

    def __do_layout(self):
        sizer_1 = wx.BoxSizer(wx.VERTICAL)
        grid_sizer_1 = wx.GridSizer(3, 3, 0, 0)
        grid_sizer_1.Add(self.text_ctrl_1, 0, 0, 0)
        sizer_1.Add(grid_sizer_1, 1, wx.EXPAND, 0)
        self.SetSizer(sizer_1)
        sizer_1.Fit(self)
        self.Layout()

    def textEvt_Handler(self, event): 
        # the Clipboard class that will help you interact with the 
        # GNOME/KDE/Windows clipboard
        if wx.TheClipboard.Open():     #This is a must!
            #remove any dashes or empty spaces
            cleandata = self.text_ctrl_1.Value.strip().replace('-','')
            cleandata = cleandata.replace(' ', '')
            self.text_ctrl_1.Value = cleandata            
            wx.TheClipboard.Clear()
            wx.TheClipboard.SetData(wx.TextDataObject(cleandata))
            wx.TheClipboard.Close()
        event.Skip()

if __name__ == "__main__":
    app = wx.PySimpleApp(0)
    wx.InitAllImageHandlers()
    frame_1 = fmDashRemover(None, -1, "")
    app.SetTopWindow(frame_1)
    frame_1.Show()
    app.MainLoop()

About Hardono

Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.

Possibly relevant:

With the current trend of SOI (Service Oriented Architecture), it is very common for Web Application to use Web Service in their back-end. Since the back-end processing is implemented as a Web Service, the Front-End (UI Layer) must convert the data into XML-text before sending it for processing.

This conversion from a data-type to xml text, then back to its original data-type, will introduce a pitfall that will plunge many developers into a runtime error. Learning from my past mistakes, I come up with these points that hopefully will save you from experiencing a runtime error (read, an unpleasant call from your customer explaining the problem):

  1. Always check your data before conversion. VB.Net has these functions to help you: IsDBNull(), IsNothing(), IsNumeric(). Use them wisely.
  2. Always initialize a variable before assigning a value.
  3. Try-Catch is there not for nothing.

To illustrate above points, I’ll make a few examples here:

Bad Code:

  Dim i as Integer
  i = Cint(myDataSet.Tables("MyTable").Row(0).("MyValue"))
  ProcessMyVariable(i)

Better Code:

  Dim i as Integer = 0
  If IsNumeric(myDataSet.Tables("MyTable").Row(0).("MyValue")) Then  
      i = Cint(myDataSet.Tables("MyTable").Row(0).("MyValue"))
  End If
  ProcessMyVariable(i)

Best Code:

  Dim i as Integer = 0
  Try
      If myDataset.Tables.Contains("MyTable") Then
          If myDataSet.Tables("MyTable").Rows.Count > 0 Then
              If IsNumeric(myDataSet.Tables("MyTable").Row(0).("MyValue")) Then  
                  i = Cint(myDataSet.Tables("MyTable").Row(0).("MyValue"))
              End If
          End If 
      End If 
  Catch e as Exception
  End Try
  ProcessMyVariable(i)

Care to add more?

About Hardono

Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.