Rodney's profileRodster on the WebPhotosBlogGuestbookMore Tools Help

Blog


    September 01

    Moving my space

    I'm moving my online site to http://rodster.lanesystems.com/lifeonline/default.aspx   :)
    February 24

    Dining at TasteAsia

     

    DSC_0119

    DSC_0114 DSC_0107 DSC_0107

    I had a chance to dine at TasteAsia with a few friends courtesy of  Janette Toral of Digital Filipino and Emil of YesPayments (thank you YesPayments for paying the bill! :))   It was just a gathering that Janette organized for the club members who were there during the eServices Expo but for sure everyone had fun!  the food is great and the beer was just cold enough.

    It was a surprise to me that such a place exists at the north end of the SM Mall of Asia.  It was long walk from the SMX convention center (which is the far other end of the area) but it was worth it.

    I've been told that TasteAsia is a favorite among Manila bloggers and I wouldn't be surprised why.  The place is relaxing amidst its located at the Mall of Asia, the food was surprisingly ok, and of course nothing beats a good company of friends.  This place is recommendable to groups who'd just like to hang out and chill.

    February 23

    PSITE: On Windows Mobile

    DSC_0155 DSC_0158DSC_0139

    DSC_0140 DSC_0097 DSC_0146

    I spoke at the Ateneo de Davao University last Friday(Feb 20, 2009), sharing to educators from all over Davao Region on Windows Mobile Programming.   I shared with them how they can take advantage in custom projects the hardware that's built into windows mobile like the camera, sms, gps, and so on.

    I did get several questions after on training, which I don't do, but I hope this can be a start to promote Windows Mobile development into the academe or at least have sparked the interest of educators for mobility programming.

    Joining eServices Expo

    DSC_0064 DSC_0058 DSC_0062 DSC_0075 DSC_0081 DSC_0086

    The eServices expo last Feb 9 and 10 was a successful event.  eServices Expo showcases the different IT and IT enabled outsourcing companies with conferences discussing the state of the outsourcing industry as well as future directions and opportunities.

    I went there to share a space with Janette Toral's SEO booth and spent time at the Davao booth from time to time.  I did not officially join the Davao booth this time but was there to support them and helped as needed.   

    The event was successful.   My good friend, a "dabawenyo" as he calls himself,  and an excellent writer of Adobe books, Mr. Ted Padova, thinks that though of the global financial crisis that outsourcing should be the choice for the foreign businesses to do to cut costs, sustain, and the Philippines is able to meet these requirements.  

    The event invited several foreign companies to do business matching with Philippine based providers.  I was fortunate to meet a few of them and I keeping my finger's crossed to have some potential business realized soon.

    Congratulations to CITEM for a successful event and more power to eServices expo 2010!

    Web RampUp

    image

    I'd like to extend this invitation to everyone to join us at the Web Ramp UP.   Microsoft will be showcasing Silveright, Azure, and other exciting technologies.    I'll also be one of the speaker presenting Windows Mobile development.   See you there!

    November 20

    Microsoft Developer Event in Davao

    DSC_0056 DSC_0031 DSC_0021

    Yesterday (Nov 19, 2008) we had a Microsoft developer event in Davao City.   More than 50 participants came and I’m honored to be able to share and present some new stuff on software development.

    The two sessions were about Windows Mobile Development and ASP.NET Dynamic Data.

    A good article regarding yesterday’s event can be found at the ITTalks.NET

    Attendees can download the slides:  Windows Mobile and Dynamic Data.

    November 14

    Internet Explorer 6 in Windows Mobile

    One of the limited applications bundled in Windows Mobile is Pocket IE.   The websites and web applications accessed via Pocket IE has to be built for Pocket IE; with limited scripting functionality and should conform to the mobile device display.   Finally, Microsoft is releasing an enhanced version of Pocket IE called Internet Explorer Mobile 6 (IEM6).

    IEM6 is based on the desktop Internet Explorer with features like;

    • Desktop rendering engine.  You can now display web pages on the Windows Mobile with the same look, feel, and user experience as you see on a Windows Desktop!
    • Support for Flash (using Flash Lite)
    • Enhanced scripting (Jscript 5.7, finally!) and same scripting engine as IE8 – ability to run browser based scripts that before was only possible for the desktop and won’t work on the Windows Mobile device.
    • AJAX sites supported!
    • Touch and gesture control

    IEM6 now supports the following:

    • HTML 4.01
    • XHTML 1 and XHTML 1.1 (partial)
    • XHTML Mobile Profile (20011029)
    • CSS 2.1 (partial) and CSS 3 (limited)
    • DOM 1 (full), DOM 2 (partial), DOM 3 (limited)
    • ECMAScript 3rd Edition

    IEM6 still allows you to display pages, as mobile web pages, same as the previous release but the huge improvement is the ability to render the site that’s the same desktop and have all the features of the site available.  

    IEM6 returns the following user agent settings (for developers, on detecting the type of browser accessing the site):

    • If on desktop view, the browser returns Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
    • If on mobile view, the browser returns Mozilla/4.0 (compatible; MSIE 6.0; Window CE; IEMobile 8.12; MSIEMobile 6.0)

    Mobile services integration.  Since most Windows Mobile devices are now integrated with a phone (Windows Mobile Professional and Windows Mobile Standard), you can access the phone services like send email messages, send sms messages, and make phone calls via IEM6.

    Here’s a screenshot of IEM6 accessing youtube.com

    image image

    Developers can now download Windows Mobile 6.1.4 emulator images to try out and develop for IEM6.  The URL for downloading the emulator images is available from http://www.microsoft.com/downloads/details.aspx?FamilyId=1A7A6B52-F89E-4354-84CE-5D19C204498A&displaylang=en

    The support for ActiveX is still limited and ActiveX components has to be installed on the mobile device separately (no cab download and install support yet).  This is still a big limitation of the browser.  However, the AJAX support has extended the use of the Windows Mobile device and makes Windows Mobile a real alternative to browsing and accessing web sites and web applications with the same user experience as the desktop.

    The release of IEM6 on WM devices is scheduled before the end of 2008.  Expect newer devices soon with IEM6 built-in!

    November 09

    Microsoft Developer Events: Manila and Davao

    I’m invited to speak on two events;  one in Manila (Nov 17 at the Carlos P. Romulo Auditorium, Podium 4,  RCBC Plaza, Ayala Avenue) and in Davao (Nov 19, at the Grand Menseng Hotel, Pichon St).   I’d like to invite everyone to attend these developer activities.   I’m speaking about Windows Mobile 6 development both in Manila and in Davao and on ASP.NET Dynamic Data as my second session in Davao.

    I hope to see you there!  Cheers!

    clip_image002

    clip_image004 clip_image006

    Ø Developing Windows Mobile Applications

    This session focuses on Windows Mobile development using the Windows Mobile 6 SDK, .NET Compact Framework, and SQL Server Compact Edition.   The session covers the SDK tools, integration to Pocket Outlook, and developing data centric Windows Mobile software.  Technical demonstrations  includes using  Visual Studio 2008 and .NET Compact Framework, programming SMS applications and taking advantage of SQL Server Compact Edition.

    clip_image007

    clip_image008

    Ø ASP.NET Dynamic Data

     

    ASP.NET Dynamic Data, part of .NET 3.5 SP1, enables developers to create CRUD (create, read, update, and delete) functionality into an ASP.NET application using re-usable and customizable components.  ASP.NET Dynamic Data brings a major usability in rapid application development and enables developers to quickly build a functional data-driven application.

    Speaker:

    Rodney C. Jao

    Microsoft MVP for Device Application Development

    https://mvp.support.microsoft.com/profile/Rodney.Jao

    clip_image009

     

         19th November 2008         

         1:00 PM - 5:00 PM         

         Grand Men Seng Hotel Davao

    Free admission. Snacks will be served. Online pre-registration is required.

    REGISTER NOW 8

    You may paste this URL into your browser to register: http://www.clicktoattend.com/?id=133307 . For inquiries, call 032-2387090 or email v-chteop@microsoft.com. Check out More Events hosted by Microsoft Southern Philippines

    clip_image010

    clip_image001
    October 30

    Have you seen Minority Report?

    image

    When Tom Cruise showed how he can move documents by hand on a virtual reality surface was a big hit for the movie Minority Report and looks like a technology that’s possible for a decade further.  Hollywood did a good job on showing what to expect next. I’m always a fan of sci fi movies. 

    Well, I stumbled on a very cool stuff from Microsoft…  an open source SDK called Touchless that enables developers to build applications that will do more or less the same thing showed in the movie or maybe this is good start for the same technology.

    Touchless uses your webcam as an input device and uses contrasting colors as your pointing device.   As shown in the screenshot above, I played around the demo and rotating a map with a yellow and pink plastic covers as controls.

    I can imagine tons of possibilities with this technology and best of all, no new additional hardware!    You can create photo and image editing app on a virtual space, you can put document side by side with your hands (look ma no mouse!), drag documents away, and much much more.

    I’m excited to see where applications will go with this technology.  Time for me to think of some applications for this also!

    The Touchless SDK can be downloaded from http://www.codeplex.com/touchless

    October 20

    Windows Mobile Programming: EPCGEN2

    DSC_0004  DSC_0006

    I’m working with Intermec, Psion, and Symbol hardware and devices in doing programming for requirements on mobile data collection and automatic identification technologies.  My focus lately has been on EPCGEN2 RFID tag integration (which is still rare and new in the industry) but has high acceptance in the airline and military segments.

    A little backgrounder, most of the RFID tags deployed today are those just being used for the unique id (sometimes called Tag ID or TID) that it contains.  It’s good for identifying items instead of using barcodes as the reader will identify the item by its proximity to the reader instead of manually facing the label to the reader.   RFID tags, by its name, uses Radio Frequency as means to communicate with the reader.   Around the tag is an antenna that receives Radio transmissions from the reader and that signal is enough to power the tag and be able to transmit its contents.  We see this at bookstores (that square thing they remove when you buy books) or at garments shops (where they remove a round thick plastic during checkout) but most uses are just for anti-theft or for identifying the item being bought.

    EPCGEN2 tags are similar but these have read/write memory areas instead of just having a unique ID.   The ECPGEN2 tag have user memory area that can be written to and be read from. An example of an EPCGEN2 tag is the one from UPM (image above).  These tags have different user memory sizes; the UPM sample above has 512bits of user memory and another type of EPCGEN2 tag from Fujitsu has 64KBits of user memory.   It simply looks like any sticker label and if you can see that tiny black thing in the middle of the sticker, that is the RFID chip.

    Imagine the ability to store an item’s brand, serial number, expiry, and information on location transfers being part of a label instead of just the unique ID that still requires to query a database to get the rest of the data.

    A typical EPCGEN2 tag has four memory structure:

    Membank 0: usually used for passwords to protect the tag
    Membank 1:Contains the EPC or UII or a little read/write area
    Membank 2: Contains the unique TID
    and Membank 3:contains the user area and the size of this area is dependent on the type of label

    Note: not all EPCGEN2 tags have a Membank 3.   The User Memory feature is new and this is what this article is all about. 

    But though of the user memory, it’s still not much data you can put in.  But definitely this is a good start.  What I do to save memory space is to write data using 6bit ascii instead of 8bit ascii and allows me to write more characters.  The trade-off is that the other applications reading the tag should also read it as 6bit.

    There are many uses of this technology and I can think of an unlimited requirements that can take advantage of EPCGen2 tags.  With this technology, we now have the ability to query the history of a product and that data is part of the label that can be scanned instead of just knowing its item code and not requiring access to a database anymore to get the rest of the data.

    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!