<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jason's Computer Science Blog &#187; Miscellaneous</title>
	<atom:link href="http://www.jasonernst.com/category/misc/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jasonernst.com</link>
	<description>By Jason Ernst</description>
	<lastBuildDate>Wed, 25 Jan 2012 14:04:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>OpenGL Console Library for Blackberry Native SDK (Playbook)</title>
		<link>http://www.jasonernst.com/2012/01/24/opengl-console-library-for-blackberry-native-sdk-playbook/</link>
		<comments>http://www.jasonernst.com/2012/01/24/opengl-console-library-for-blackberry-native-sdk-playbook/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 20:41:29 +0000</pubDate>
		<dc:creator>Jason Ernst</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Blackberry]]></category>
		<category><![CDATA[Console]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[Native]]></category>
		<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[Playbook]]></category>
		<category><![CDATA[SDK]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.jasonernst.com/?p=1897</guid>
		<description><![CDATA[Over the break, I decided to try my hand at some Blackberry native SDK programming since I recently got a playbook. I looked around the App World and noticed there weren&#8217;t any telnet/ssh tools available for free (that worked the way I wanted) so I thought this would be a good starter project. However, for [...]]]></description>
			<content:encoded><![CDATA[<p>Over the break, I decided to try my hand at some Blackberry native SDK programming since I recently got a playbook. I looked around the App World and noticed there weren&#8217;t any telnet/ssh tools available for free (that worked the way I wanted) so I thought this would be a good starter project.</p>
<p>However, for the look I wanted, I wanted to maximize the screen space for the console application to show as much text as possible and worked off the hello world example on the SDK webpage. Essentially, the simple &#8220;library&#8221; (note: library is used very loosely here) initializes the display, shows the keyboard and supports some simple output using putch and puts functions that I implemented. It can also show a blinking cursor and user input at a prompt. In case someone else can use the code I have made it available. Check back soon to see the source for the telnet portion of the app I made as well or look for it on the App World.</p>
<p><center>
<div class="image"><a href="http://www.jasonernst.com/wp-content/uploads/2012/01/simple_telnet.png"><img src="http://www.jasonernst.com/wp-content/uploads/2012/01/simple_telnet-300x185.png" alt="Simple Telnet - Example Application" title="Simple Telnet - Example Application" width="300" height="185" class="aligncenter size-medium wp-image-1902" /></a><br/>Simple Telnet &#8211; Example Application using the conosole library</div>
<p></center></p>
<p>In order to use the library, you need to make use of the bbutil.c and bbutil.h files that are included in many of the examples provided by RIM. I have provided them here alongside my own code so that it is easier to follow along. I also provide two more files: glconsole.c and glconsole.h. You just need to #include &#8220;glconsole.h&#8221; in your source in order to use the library. All of the functions available to you are listed in the &#8220;glconsole.h&#8221; file as well. I will go over the important ones in this article.</p>
<p>First is gl_init(). This function initializes the library, the screen, font etc. This function should be called before using anything else in the library. Similarly, gl_cleanup() is used to free memory and should be called before your app is terminated.</p>
<p>After initialization, you may now use the puts and putch functions to display characters to the screen. gl_putch(char c) takes a single character and displays it onto the screen. It can handle newlines which are represented as &#8216;\n&#8217; and tabs which are represented as &#8216;\t&#8217;. Backspaces by user input is handled as a &#8216;\b&#8217; character. This is similar to how people on <a href="http://forum.osdev.org/">The osdev.rg website</a> often handle character output in their custom operating systems. I&#8217;m not sure how it relates with normal c standards, but I imagine it is similar. Eventually I hope to implement a printf() type of function, but at the moment the putch() and puts() functions serve what I am doing well enough. Note: puts() is the same as putch() but instead takes a (char *) ie) a string. The string should also be null-terminated, or it will just continue until it hits a null character. The characters are automatically scrolled when the bottom of the screen is reached. </p>
<p>The only other really important function is gl_render(). This function is what should be called everytime the screen needs to be refreshed. This is usually in a for loop within your main() function in your app.</p>
<p>It is also possible to resize the screen using the gl_resize() function. By default the screen starts at 80X29 which is the maximum size with no virtualkeyboard showing, at the font size I selected. When the keyboard shows up, it fits 80&#215;14. In some sample code I&#8217;ll also show how keyboard input can be handled, how to blink the cursor and how to detect when the keyboard is shown or hidden.</p>
<p>For the rest of this guide, I&#8217;ll assume you are using the QNX Momentix IDE available from RIM&#8217;s developer website. To start, create a new project by going to File->New Blackberry Tablet OS C/C++ Project. Name it whatever you like, click next. Then choose the C language, and empty Application Project. You can now drag the gl_console.c, glconsole.h, bbutil.c and bbutil.h files into the src folder within the IDE to include them. You will probably want to copy the files and not link them when it asks. Before compiling, there are several libaries which must be linked to the project. You can do this by right clicking your project, going to properties. Then go to C/C++ General->Paths and Symbols->Libraries. Here you can add libraries. Each time you add one, be sure to check &#8220;add to all Configurations&#8221; so that you don&#8217;t need to do this again if you change from a device-debug to device-release build. The following libraries should be included:</p>
<ul style="margin-left:30px; margin-bottom: 10px;">
<li>bps</li>
<li>EGL</li>
<li>GLESv1_CM</li>
<li>freetype</li>
<li>png</li>
</ul>
<p>Now that all this is setup, it is possible to start you main() function and use the library. If you like you can right click on your src folder and click &#8220;new file&#8221; and create a main.c file or whatever you like to name it. While this isn&#8217;t the typical way you would include a library into a project, this way lets you edit the library source to your liking in case you want to further extend it. </p>
<p>The following example shows a skeleton of what is required to get the code to display some text:</p>
<div class="snippet"><pre><code>#include &lt;stdlib.h&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* EXIT_FAILURE */
#include &lt;stddef.h&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* NULL */
#include &lt;bps/bps.h&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* BPS_SUCCESS */
#include &lt;bps/screen.h&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* screen_event_get_event() */
#include &lt;bps/navigator.h&gt;&nbsp;&nbsp;/* NAVIGATOR_EXIT */
#include &quot;glconsole.h&quot;

void handleScreenEvent(bps_event_t *event);

int main(int argc, char * argv[])
{
&nbsp;&nbsp;int exit_application = 0;

&nbsp;&nbsp;if(EXIT_SUCCESS != gl_init())
&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;fprintf(stderr, &quot;error init\n&quot;);
&nbsp;&nbsp;&nbsp;&nbsp;return 0;
&nbsp;&nbsp;}

&nbsp;&nbsp;gl_puts(&quot;Hello gl console world!\n&quot;);

&nbsp;&nbsp;for(;;)
&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;bps_event_t *event = NULL;
&nbsp;&nbsp;&nbsp;&nbsp;if (bps_get_event(&amp;event, 0) != BPS_SUCCESS)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return EXIT_FAILURE;

&nbsp;&nbsp;&nbsp;&nbsp;if (event)
&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int domain = bps_event_get_domain(event);

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (domain == screen_get_domain())
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;handleScreenEvent(event);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else if ((domain == navigator_get_domain()) &amp;&amp; (NAVIGATOR_EXIT == bps_event_get_code(event)))
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit_application = 1;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (exit_application)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;gl_render();
&nbsp;&nbsp;}

&nbsp;&nbsp;gl_cleanup();
&nbsp;&nbsp;return 0;
}

void handleScreenEvent(bps_event_t *event)
{
&nbsp;&nbsp;/* do normal event handling here, see other bb examples */
}</code></pre></div>
<p>The key parts are calling gl_init() which initializes the library. Then within the main loop, the gl_render() function should be called which will actually render the text. Finally gl_cleanup() should be called before termination to properly free memory.</p>
<p>In the near future I plan to add some support to handle ansi encoded text (specifically for my telnet application) so that it can display colours and move the cursor around the screen using this standard.</p>
<p>Here are the files:<br />
<a href='http://www.jasonernst.com/wp-content/uploads/2012/01/glconsole.h'>glconsole.h</a><br />
<a href='http://www.jasonernst.com/wp-content/uploads/2012/01/glconsole.c'>glconsole.c</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonernst.com/2012/01/24/opengl-console-library-for-blackberry-native-sdk-playbook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upcoming PhD QE Progress</title>
		<link>http://www.jasonernst.com/2011/07/27/upcoming-phd-qe-progress/</link>
		<comments>http://www.jasonernst.com/2011/07/27/upcoming-phd-qe-progress/#comments</comments>
		<pubDate>Wed, 27 Jul 2011 17:26:38 +0000</pubDate>
		<dc:creator>Jason Ernst</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Wireless Networks]]></category>
		<category><![CDATA[3G]]></category>
		<category><![CDATA[4G]]></category>
		<category><![CDATA[Handover]]></category>
		<category><![CDATA[Heterogeneous]]></category>
		<category><![CDATA[Jason B. Ernst]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Seamless]]></category>
		<category><![CDATA[Wireless]]></category>

		<guid isPermaLink="false">http://www.jasonernst.com/?p=1739</guid>
		<description><![CDATA[So I&#8217;ve been doing my PhD for over two years now, and I haven&#8217;t posted a reflective &#8220;state of the thesis&#8221; post in quite some time, so here it is. I have maxed out my 50 pages (not included ToC and references) for some time now, it&#8217;s just been in the process of revision for [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;ve been doing my PhD for over two years now, and I haven&#8217;t posted a reflective &#8220;state of the thesis&#8221; post in quite some time, so here it is. I have maxed out my 50 pages (not included ToC and references) for some time now, it&#8217;s just been in the process of revision for the last month or so! I have more or less settled on what my research actually is now and am getting a clearer picture of it in my head all the time.</p>
<p>Officially the topic is &#8220;Radio Resource Management for Quality of Service in Heterogeneous Wireless Networks&#8221;. This is quite the mouthful, I know. Really what it boils down to is: Making various wireless technologies (Bluetooth, WiFi, WiMAX, 3G, 4G, &#8230; , etc) seamlessly work together. Many devices are capable of connecting to many of these radio access technologies (RATs), but often it is not <em>seamless</em>. What do I mean by this? Well suppose I am inside a university building, deep in the basement (where they tend to put CS students <img src='http://www.jasonernst.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> ) where there is no mobile reception (3G, 4G etc.). I start downloading a large file, or call someone via wifi. Now I want to walk to my car because it&#8217;s time to go home for the day. Many networks now are not able to handle this, and it is interrupted after you change networks. Furthermore, you often have to manually tell the device you want to leave one network and join another. <em>Seamless</em> means this should all happen without you noticing. This is the focus of my research.</p>
<p>The biggest problem that I am concerned with is called handoff or handover. This is when the switch between RATs occurs. Traditionally, this also occurs when a mobile device switches from one tower to another, and it usually involved predicting the motion of the device along with some other factors for Quality of Service (QoS). For a vertical handover, we may or may not need to predict motion. If the heterogeneous wireless network (HWN) is densely covered, many RATs are available throughout the coverage region (as opposed to a sparsely covered where a given location may have access to one technology at once). In a dense HWN, the problem becomes a multi-criteria question.</p>
<ol>
<li>Which network is most economical for me to connect to?</li>
<li>Which configuration of (network, client) pairs is most profitable for the operator?</li>
<li>Which network is able to provide me with the required QoS?</li>
</ol>
<p>More technical details to follow&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonernst.com/2011/07/27/upcoming-phd-qe-progress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>uShare autostart &#8211; Ubuntu 11.04</title>
		<link>http://www.jasonernst.com/2011/07/17/ushare-autostart-ubuntu-11-04/</link>
		<comments>http://www.jasonernst.com/2011/07/17/ushare-autostart-ubuntu-11-04/#comments</comments>
		<pubDate>Sun, 17 Jul 2011 14:34:29 +0000</pubDate>
		<dc:creator>Jason Ernst</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[autostart]]></category>
		<category><![CDATA[Ubuntu 11.04]]></category>
		<category><![CDATA[ushare]]></category>

		<guid isPermaLink="false">http://www.jasonernst.com/?p=1687</guid>
		<description><![CDATA[Previously, I installed ushare easily on Ubuntu following a process similar to this: https://help.ubuntu.com/community/Xbox360Media I&#8217;ve recently become annoyed that ushare hasn&#8217;t been autostarting in Ubuntu 11.04. I suspect it may have something to do with the fact that I am using the same machine to host vpn so I have a bridged connection br0 as [...]]]></description>
			<content:encoded><![CDATA[<p>Previously, I installed ushare easily on Ubuntu following a process similar to this: <a href="https://help.ubuntu.com/community/Xbox360Media">https://help.ubuntu.com/community/Xbox360Media</a></p>
<p>I&#8217;ve recently become annoyed that ushare hasn&#8217;t been autostarting in Ubuntu 11.04. I suspect it may have something to do with the fact that I am using the same machine to host vpn so I have a bridged connection br0 as my main connection. The default script in /etc/init.d/ushare should be able to autostart, and I have tried adding it to rc.d using variation of this command &#8220;sudo update-rc.d ushare defaults 80&#8243;, however it fails to start. I have no trouble running it manually with the &#8220;/etc/init.d/ushare start&#8221; command however. So I&#8217;m guessing it is just trying to start before the network interfaces come up and failing. The workaround I found tries to solve this by explicitly running after the interface is up. The way to do it, is to add it to the &#8220;/etc/network/interfaces&#8221; file using something called &#8220;post-up&#8221;. Since I wanted to have ushare run after my br0 interface is brought up, I added it like at the bottom of the br0 section, see below:</p>
<div class="snippet"><pre><code>iface br0 inet static
&nbsp;&nbsp;address 192.168.0.198
&nbsp;&nbsp;netmask 255.255.255.0
&nbsp;&nbsp;gateway 192.168.0.1
&nbsp;&nbsp;bridge_ports eth1
&nbsp;&nbsp;post-up /etc/init.d/ushare start
</code></pre></snippet></p>
<p>And, now on restart &#8220;ps ax | grep ushare&#8221; shows the process running. I am also able to connect on my xbox just as before <img src='http://www.jasonernst.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Sources: <a href="http://www.cyberciti.biz/tips/how-do-i-run-firewall-script-as-soon-as-eth0-interface-brings-up.html">http://www.cyberciti.biz/tips/how-do-i-run-firewall-script-as-soon-as-eth0-interface-brings-up.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonernst.com/2011/07/17/ushare-autostart-ubuntu-11-04/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RAID guides for Ubuntu / Linux</title>
		<link>http://www.jasonernst.com/2011/06/24/raid-guides-for-ubuntu-linux/</link>
		<comments>http://www.jasonernst.com/2011/06/24/raid-guides-for-ubuntu-linux/#comments</comments>
		<pubDate>Sat, 25 Jun 2011 01:34:01 +0000</pubDate>
		<dc:creator>Jason Ernst</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Miscellaneous]]></category>

		<guid isPermaLink="false">http://www.jasonernst.com/?p=1654</guid>
		<description><![CDATA[Today I found myself with a degraded RAID array after a power outage last night. (Yes I know UPS would be useful..) One drive had failed and I have a RAID 5 with three drives and one drive failed. Additionally, since there was some extra room, for some reason I had another RAID 1 array [...]]]></description>
			<content:encoded><![CDATA[<p>Today I found myself with a degraded RAID array after a power outage last night. (Yes I know UPS would be useful..) One drive had failed and I have a RAID 5 with three drives and one drive failed. Additionally, since there was some extra room, for some reason I had another RAID 1 array across two of the drives..not sure what I was thinking when I set that up. I found the following guide quite helpful:</p>
<p><a href="http://s3t0.blogspot.com/2011/01/raid-5-setting-on-ubuntu.html">http://s3t0.blogspot.com/2011/01/raid-5-setting-on-ubuntu.html</a></p>
<p>I also made use of the cfdisk tool since I had to create the partitions manually before adding the partitions to the arrays.</p>
<p>Update: Got a UPS for my birthday, so hopefully the weird power troubles my house has been having won&#8217;t be able to kill anymore hard drives <img src='http://www.jasonernst.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonernst.com/2011/06/24/raid-guides-for-ubuntu-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 11.04 &#8211; Latex</title>
		<link>http://www.jasonernst.com/2011/06/08/ubuntu-11-04-latex/</link>
		<comments>http://www.jasonernst.com/2011/06/08/ubuntu-11-04-latex/#comments</comments>
		<pubDate>Wed, 08 Jun 2011 15:29:01 +0000</pubDate>
		<dc:creator>Jason Ernst</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[Latex]]></category>
		<category><![CDATA[Texlive]]></category>
		<category><![CDATA[Ubuntu 11.04]]></category>

		<guid isPermaLink="false">http://www.jasonernst.com/?p=1628</guid>
		<description><![CDATA[Just a quick note to myself really about how to get Latex working the way I want on Ubuntu 11.04 (Texmaker GUI, and some fixes for some errors I was getting). The error that was most troublesome was &#8216;kpathsea: Running mktexmf ptmr7t! I can&#8217;t find file `ptmr7t&#8217;.&#8217; This was fixed with the recommended fonts package. [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick note to myself really about how to get Latex working the way I want on Ubuntu 11.04 (Texmaker GUI, and some fixes for some errors I was getting). The error that was most troublesome was &#8216;kpathsea: Running mktexmf ptmr7t! I can&#8217;t find file `ptmr7t&#8217;.&#8217; This was fixed with the recommended fonts package. I also got an error about an equation style that it didn&#8217;t know. This was fixed with the texlive-science package.</p>
<div class="snippet"><pre><code>sudo apt-get install texlive-latex-base
sudo apt-get install texmaker
sudo apt-get install texlive-fonts-recommended
sudo apt-get install texlive-science</code></pre></div>
<p>Update: I&#8217;ve discovered a tex plugin for gedit, which is kind of cool, if you are interested check out this blog post: <a href="http://blogs.ethz.ch/ubuntu/2007/06/09/gedit-goes-latex-1-gedit-latexplugin/">http://blogs.ethz.ch/ubuntu/2007/06/09/gedit-goes-latex-1-gedit-latexplugin/</a></p>
<p>References:</p>
<ul style="margin-left:25px;">
<li><a href="http://forum.ubuntu-fr.org/viewtopic.php?id=303542">http://forum.ubuntu-fr.org/viewtopic.php?id=303542</a></li>
<li><a href="http://sysad.wordpress.com/2008/11/06/ubuntu-hardy-to-intrepid-upgrade-remnants/">http://sysad.wordpress.com/2008/11/06/ubuntu-hardy-to-intrepid-upgrade-remnants/</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonernst.com/2011/06/08/ubuntu-11-04-latex/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>PHP Tutorial: Replace long link text</title>
		<link>http://www.jasonernst.com/2011/03/22/php-tutorial-replace-long-link-text/</link>
		<comments>http://www.jasonernst.com/2011/03/22/php-tutorial-replace-long-link-text/#comments</comments>
		<pubDate>Tue, 22 Mar 2011 17:07:40 +0000</pubDate>
		<dc:creator>Jason Ernst</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Facebook Status]]></category>
		<category><![CDATA[Link]]></category>
		<category><![CDATA[Long]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Replacement]]></category>
		<category><![CDATA[Text]]></category>
		<category><![CDATA[Tweet]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.jasonernst.com/?p=1549</guid>
		<description><![CDATA[I created this function so that I could have a way of preventing very long non-breaking text links from breaking my web page layout. Paritcularly, this is used in my tweet / facebook section of my homepage. Whenever I posted a link to either of them, when the link URL was too long and could [...]]]></description>
			<content:encoded><![CDATA[<p>I created this function so that I could have a way of preventing very long non-breaking text links from breaking my web page layout. Paritcularly, this is used in my tweet / facebook section of my homepage. Whenever I posted a link to either of them, when the link URL was too long and could not be broken, it would overflow into the next column. Yes of course you could use css to do this, however the methods which are generally used are not valid with CSS2.1, so I came up with a way that programatically parses the link and replaces the text with &#8220;[Link]&#8220;. There are some limitations to this approach. First, since I use a simple solution, there is no way to preserve some information normally in the link such as target, title etc. Second it is being used for tweet and facebook statuses, so it is limited to checking only the first encountered link. It could be expanded to include multiple links, but I have no need for this at the moment so I left it out. <strong>Update:</strong> I noticed that it was also filtering my @links from twitter, so I made a slight change so that it will only shorten if it finds http:// in the url text now. Anyway here is the code:</p>
<div class="snippet"><pre><code>/*
 * Replaces all link-text with &#039;[Link]&#039; so that links which are very long do not break web page layouts
 * Note: some information is lost, such as custom title, target etc.
 * Jason Ernst- 2011
 */
function filter_long_url($content)
{
&nbsp;&nbsp;$startpos = strpos($content, &quot;&lt;a&quot;);
&nbsp;&nbsp;if($startpos !== false)
&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;$midpos = strpos($content, &quot;&gt;&quot;, $startpos);
&nbsp;&nbsp;&nbsp;&nbsp;if($midpos !== false)
&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$endpos = strpos($content, &quot;&lt;/a&gt;&quot;, $midpos);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if($endpos !== false)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$url = substr($content, $midpos+1, ($endpos)-($midpos+1));
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(strpos($url, &quot;http://&quot;)===false)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return $content;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$newcontent = substr($content, 0, $startpos);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$newcontent = $newcontent . &quot;&lt;a href=&#039;$url&#039; title=&#039;View Link&#039; target=&#039;_blank&#039;&gt;[Link]&lt;/a&gt;&quot; . substr($content, $endpos+4);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return $content;
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;else
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return $content;
&nbsp;&nbsp;}
&nbsp;&nbsp;else
&nbsp;&nbsp;&nbsp;&nbsp;return $content;
&nbsp;&nbsp;
&nbsp;&nbsp;return $newcontent;
}</code></pre></div>
<p>If the function gets something with a half-completed <a> tag, it should just return the original content since it is impossible to find the other parts of the tag correctly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonernst.com/2011/03/22/php-tutorial-replace-long-link-text/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some Useful Information for Setting Up Subversion on Ubuntu</title>
		<link>http://www.jasonernst.com/2011/03/07/some-useful-information-for-setting-up-subversion-on-ubuntu/</link>
		<comments>http://www.jasonernst.com/2011/03/07/some-useful-information-for-setting-up-subversion-on-ubuntu/#comments</comments>
		<pubDate>Mon, 07 Mar 2011 16:25:18 +0000</pubDate>
		<dc:creator>Jason Ernst</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Client]]></category>
		<category><![CDATA[Hostmonster]]></category>
		<category><![CDATA[RapidSVN]]></category>
		<category><![CDATA[Revision Control]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Source Control]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[TortoiseSVN]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Version Control]]></category>
		<category><![CDATA[WebSVN]]></category>

		<guid isPermaLink="false">http://www.jasonernst.com/?p=1453</guid>
		<description><![CDATA[Not a tutorial or guide this time, since everyone else seems to have this covered quite well, but thought I&#8217;d collect a few good links together in one place. Hopefully these links will be useful to someone just starting with SVN. For everyone who isn&#8217;t using some type of version control, nows your chance! Ubuntu [...]]]></description>
			<content:encoded><![CDATA[<p>Not a tutorial or guide this time, since everyone else seems to have this covered quite well, but thought I&#8217;d collect a few good links together in one place. Hopefully these links will be useful to someone just starting with SVN. For everyone who isn&#8217;t using some type of <a href="http://en.wikipedia.org/wiki/Revision_control">version control</a>, nows your chance!</p>
<p>Ubuntu tutorial for installation:<br />
<a href="http://danielabrantes.blogspot.com/2010/11/install-subversion-in-ubuntu-1010.html">http://danielabrantes.blogspot.com/2010/11/install-subversion-in-ubuntu-1010.html</a></p>
<p>Beginner HowTo (suited to WordPress plugin devs, but still good to apply to your own setup):<br />
<a href="http://codex.wordpress.org/Using_Subversion">http://codex.wordpress.org/Using_Subversion</a><br />
<a href="http://wordpress.org/extend/plugins/about/svn/">http://wordpress.org/extend/plugins/about/svn/</a></p>
<p>Multi-platform SVN client &#8211; RapidSVN:<br />
I found this client especially useful since it works across platforms and it is lightweight and quick.<br />
<a href="http://rapidsvn.tigris.org/">http://rapidsvn.tigris.org/</a></p>
<div class="image left" style="text-align:center;"><a href="http://www.jasonernst.com/wp-content/uploads/2011/03/rapidsvn.png"><img src="http://www.jasonernst.com/wp-content/uploads/2011/03/rapidsvn-300x165.png" alt="" title="rapidsvn" width="300" height="165" class="aligncenter size-medium wp-image-1467" /></a><br/>RapidSVN Screenshot</div>
<div class="clear">&nbsp;</div>
<p>Popular Windows SVN client &#8211; TortoiseSVN:<br />
This client is useful if you like tight integration with Windows. It shows up in the context menus and is very easy to work with.<br />
<a href="http://tortoisesvn.tigris.org/">http://tortoisesvn.tigris.org/</a></p>
<div class="image left" style="text-align:center;"><a href="http://www.jasonernst.com/wp-content/uploads/2011/03/tortoisesvn.jpg"><img src="http://www.jasonernst.com/wp-content/uploads/2011/03/tortoisesvn-300x225.jpg" alt="" title="tortoisesvn" width="300" height="225" class="aligncenter size-medium wp-image-1468" /></a><br/>TortoiseSVN Screenshot</div>
<div class="clear">&nbsp;</div>
<p>WebSVN:<br />
A more refined web interface to svn, compared with the one provided using the initial setup.<br />
<a href="http://agilior.pt/blogs/pedro.rainho/archive/2010/02/06/11698.aspx">http://agilior.pt/blogs/pedro.rainho/archive/2010/02/06/11698.aspx</a></p>
<div class="image left" style="text-align:center;"><a href="http://www.jasonernst.com/wp-content/uploads/2011/03/websvn.png"><img src="http://www.jasonernst.com/wp-content/uploads/2011/03/websvn-300x96.png" alt="" title="websvn" width="300" height="96" class="aligncenter size-medium wp-image-1466" /></a><br/>WebSVN Screenshot</div>
<div class="clear">&nbsp;</div>
<p>SVN on Hostmonster (or other hosts with blocked svn port, but SSH access):<br />
<a href="http://hostmonsterforum.com/showthread.php?1294-Subversion">http://hostmonsterforum.com/showthread.php?1294-Subversion</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonernst.com/2011/03/07/some-useful-information-for-setting-up-subversion-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sharethis WordPress Plugin &#8211; Invalid XHTML</title>
		<link>http://www.jasonernst.com/2011/02/21/sharethis-wordpress-plugin-invalid-xhtml/</link>
		<comments>http://www.jasonernst.com/2011/02/21/sharethis-wordpress-plugin-invalid-xhtml/#comments</comments>
		<pubDate>Tue, 22 Feb 2011 01:37:05 +0000</pubDate>
		<dc:creator>Jason Ernst</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Invalid XHTML]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Sharethis]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.jasonernst.com/?p=1392</guid>
		<description><![CDATA[Building on my previous post regarding invalid XHTML (Version 1.0 Strict), I have been trying to find out why my site has not been validating. It turns out, the last bit of the problem is the &#8220;Sharethis&#8221; plugin for WordPress. In this plugin, the authors decided to define some custom parameter fields within the &#8216;span&#8217; [...]]]></description>
			<content:encoded><![CDATA[<p>Building on my previous post regarding invalid XHTML (Version 1.0 Strict), I have been trying to find out why my site has not been validating. It turns out, the last bit of the problem is the &#8220;Sharethis&#8221; plugin for WordPress. In this plugin, the authors decided to define some custom parameter fields within the &#8216;span&#8217; tag causing the validation problems. A post <a href="http://getsatisfaction.com/sharethis/topics/attribute_displaytext_is_not_valid_xhtml">here</a> indicates it is for &#8220;simplicity&#8221; for their less technically inclined users. So, this post is to show you how to modify the plugin to get valid XHTML out of it instead.</p>
<p>In the sharethis.php file, the offending lines are here:</p>
<div class="snippet"><pre><code>$tags=&quot;&lt;span class=&#039;st_sharethis&#039; st_title=&#039;&quot;.strip_tags(get_the_title()).&quot;&#039; st_url=&#039;&quot;.get_permalink($post-&gt;ID).&quot;&#039; displayText=&#039;ShareThis&#039;&gt;&lt;/span&gt;&quot;;
$tags.=&quot;&lt;span class=&#039;st_&quot;.$svc.&quot;_vcount&#039; st_title=&#039;{title}&#039; st_url=&#039;{url}&#039; displayText=&#039;share&#039;&gt;&lt;/span&gt;&quot;;</code></pre></div>
<p>And here are the updated lines:</p>
<div class="snippet"><pre><code>$tags=&quot;&lt;span class=&#039;st_sharethis&#039;&gt;&lt;/span&gt;&quot;;
$tags.=&quot;&lt;span class=&#039;st_&quot;.$svc.&quot;_vcount&#039;&gt;&lt;/span&gt;&quot;;</code></pre></div>
<p>In this case, disabling the extra fields means that the &#8220;sharethis&#8221; text and some minor styling disappear from the sharethis button. It seems the easiest way to have compliant XHTML and still a decent looking sharethis button is to use the a custom button style (see this <a href="http://help.sharethis.com/customization/custom-buttons">page</a>).</p>
<p>So the result is this:</p>
<div class="snippet"><pre><code>$tags=&quot;&lt;span class=&#039;st_sharethis_custom&#039;&gt;&lt;a href=&#039;&#039;&gt;ShareThis&lt;/a&gt;&lt;/span&gt;&quot;;
$tags.=&quot;&lt;span class=&#039;st_sharethis_custom&#039;&gt;&lt;a href=&#039;&#039;&gt;ShareThis&lt;/a&gt;&lt;/span&gt;&quot;;</code></pre></div>
<p>The &#8216;ShareThis&#8217; text is enclosed in an &#8220;a&#8221; tag so that we get the mouseover behaviour and link styling that it had previously. Additionally, the css file for your template must be changed. This is what I added to mine to make it work:</p>
<div class="snippet"><code>.st_sharethis_custom { background: url(&quot;img/sharethis.png&quot;) no-repeat scroll left top transparent; padding-left: 18px; padding-top:3px;}</code></div>
<p>You will want to change the url to wherever you have located the sharethis icon, and the padding and margins may need to be adjusted for your own template.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonernst.com/2011/02/21/sharethis-wordpress-plugin-invalid-xhtml/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Twitter Tools &#8211; Plugin update for Valid XHTML</title>
		<link>http://www.jasonernst.com/2011/02/21/twitter-tools-plugin-update-for-valid-xhtml/</link>
		<comments>http://www.jasonernst.com/2011/02/21/twitter-tools-plugin-update-for-valid-xhtml/#comments</comments>
		<pubDate>Mon, 21 Feb 2011 23:22:02 +0000</pubDate>
		<dc:creator>Jason Ernst</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Fix]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.jasonernst.com/?p=1376</guid>
		<description><![CDATA[Today I noticed my site was not generating valid XHTML (for the 1.0 Strict Standard). I isolated some of the problems to the &#8220;Twitter Tools&#8221; plugin for WordPress. The problem is that a couple of parameters are not passed using the correct encoding (The &#38; character is not properly encoded). The changes should be made [...]]]></description>
			<content:encoded><![CDATA[<p>Today I noticed my site was not generating valid XHTML (for the 1.0 Strict Standard). I isolated some of the problems to the <a href="http://crowdfavorite.com/wordpress/plugins/twitter-tools/">&#8220;Twitter Tools&#8221; plugin for WordPress</a>. The problem is that a couple of parameters are not passed using the correct encoding (The &amp; character is not properly encoded). The changes should be made to the &#8220;twitter-tools.php&#8221; file. Here is the original source for a couple of the offending lines:</p>
<div class="snippet"><pre><code>&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&#039;.site_url(&#039;/index.php?ak_action=aktt_css&amp;v=&#039;.AKTT_VERSION).&#039;&quot; /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;&#039;.site_url(&#039;/index.php?ak_action=aktt_js&amp;v=&#039;.AKTT_VERSION).&#039;&quot;&gt;&lt;/script&gt;
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&#039;.admin_url(&#039;index.php?ak_action=aktt_css_admin&amp;v=&#039;.AKTT_VERSION).&#039;&quot; /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;&#039;.admin_url(&#039;index.php?ak_action=aktt_js_admin&amp;v=&#039;.AKTT_VERSION).&#039;&quot;&gt;&lt;/script&gt;</code></pre></div>
<p>And here it is with the changes made (notice the &#8216;&#038;&#8217; is replaced with &#8216;&amp;amp;&#8217;):</p>
<div class="snippet"><pre><code>&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&#039;.site_url(&#039;/index.php?ak_action=aktt_css&amp;amp;v=&#039;.AKTT_VERSION).&#039;&quot; /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;&#039;.site_url(&#039;/index.php?ak_action=aktt_js&amp;amp;v=&#039;.AKTT_VERSION).&#039;&quot;&gt;&lt;/script&gt;
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&#039;.admin_url(&#039;index.php?ak_action=aktt_css_admin&amp;amp;v=&#039;.AKTT_VERSION).&#039;&quot; /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;&#039;.admin_url(&#039;index.php?ak_action=aktt_js_admin&amp;amp;v=&#039;.AKTT_VERSION).&#039;&quot;&gt;&lt;/script&gt;</code></pre></div>
<p>Hope this helps someone <img src='http://www.jasonernst.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonernst.com/2011/02/21/twitter-tools-plugin-update-for-valid-xhtml/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Points to consider for Usage Based Billing (UBB) in Canada</title>
		<link>http://www.jasonernst.com/2011/02/08/points-to-consider-for-usage-based-billing-ubb-in-canada/</link>
		<comments>http://www.jasonernst.com/2011/02/08/points-to-consider-for-usage-based-billing-ubb-in-canada/#comments</comments>
		<pubDate>Tue, 08 Feb 2011 20:23:57 +0000</pubDate>
		<dc:creator>Jason Ernst</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Wireless Networks]]></category>
		<category><![CDATA[2011]]></category>
		<category><![CDATA[Canada]]></category>
		<category><![CDATA[ICC 2010]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[ISP]]></category>
		<category><![CDATA[Price]]></category>
		<category><![CDATA[Service]]></category>
		<category><![CDATA[UBB]]></category>
		<category><![CDATA[Usage Based Billing]]></category>

		<guid isPermaLink="false">http://www.jasonernst.com/?p=1273</guid>
		<description><![CDATA[While I make no claims to understand the economics of the agreements between ISPs for forwarding traffic between each other, the point of this article is to provide a unique perspective since I am a graduate student in the networking field. I also briefly outline some potential techniques that could improve the situation (although none [...]]]></description>
			<content:encoded><![CDATA[<p>While I make no claims to understand the economics of the agreements between ISPs for forwarding traffic between each other, the point of this article is to provide a unique perspective since I am a graduate student in the networking field. I also briefly outline some potential techniques that could improve the situation (although none can really solve the problem of the alleged gap forming between revenue and expense). My personal opinion is against UBB since I believe it is against innovation and will make Canada less competitive. Charging per-byte rates will become far too expensive for many people to use the Internet in the same way as people in other countries (or those people with lots of extra money). It will result in contributing to the gap between have and have-nots where poorer people in the country are excluded from the same access to content and opportunity that others have. I try not to focus on arguing for UBB in this article because there are several existing articles which argue this quite well. (<a href="http://opinion.financialpost.com/2011/02/07/internet-usage-debate-the-real-myths/">Financial Post</a> <a href="http://www.theglobeandmail.com/news/technology/tech-news/ubb-internet/the-public-is-right-to-be-cynical-of-internet-usage-regulators/article1898151/">The Globe and Mail</a>).</p>
<p>In May of 2010, I attended an IEEE conference called the International Communications Conference (ICC 2010) in Capetown, South Africa. This conference is considered the one of the top conferences by the IEEE communications society and is attended by many experts in the communications field. I found one of the keynote speeches by Dr. Steven D. Gray, Head &#038; Vice President Corporate Research, Huawei Technologies to be especially relevant to the current debate in Canada over usage based billing (UBB). The keynote is available free online from the <a href="http://www.comsoc.org/webcasts/view/accelerating-growth-future-services-media-centric-networks">IEEE ComSoc</a> (please note, the keynote I am referencing here starts at about 51 minutes in the presentation). </p>
<p>While the key point about profitability deals with wireless carriers, it may also be relevant to wired network providers. Especially in Canada for the following reasons:</p>
<ol style="margin-left: 20px; margin-bottom: 10px; ">
<li>The vast, sparse country which must be connected</li>
<li>The constant upgrades to equipment required</li>
<li>The limited capabilities of backbone and infrastructure networks &amp; increasing speeds of user connections</li>
<li>Steady growth in traffic from users</li>
</ol>
<h2>1. The vast, sparse country which must be connected</h2>
<p>Compared to other countries in the world, Canada is very sparse. According to a <a href="http://en.wikipedia.org/wiki/List_of_sovereign_states_and_dependent_territories_by_population_density">Wikipedia article surveying population density around the world</a>, Canada places 228 in the world. According to <a href="http://cache.gawker.com/assets/images/gizmodo/2009/10/raw.jpg">this figure</a> (from Gizmodo), Canada ranks 8th in the world for average broadband speeds. Compared with the USA, which ranks 15th (and has a population density almost 10 times higher than Canada), we have less than twice the average speed for roughly the double the cost. Considering our low density and similar geographic size, one would expect we would pay much more.</p>
<div class="image" style="float:left;"><a href="http://www.jasonernst.com/wp-content/uploads/2011/02/connection-map.png"><img src="http://www.jasonernst.com/wp-content/uploads/2011/02/connection-map-300x300.png" alt="" title="connection-map" width="300" height="300" class="aligncenter size-medium wp-image-1285" /></a>
<p style="text-align: center;">Map of the Internet [<a href="http://www.opte.org/maps/">http://www.opte.org/maps/</a>]</p>
</div>
<h2>2. The constant upgrades to equipment required</h2>
<p>The communications industry is constantly evolving as engineers and scientists figure out how to make faster connections or find new ways to communicate (for example, 10 mbps ethernet to 100 mbps to gigabit and beyond), (example 2: Ethernet to fibre optic, or even next generation wireless networks). Every time something new comes out or improvements are made, the companies must put money into making it work with what they already have, deploy new equipment and so forth. Often because the networks are becoming more complex it requires hiring more people to manage them (which may eventually be solved by autonomous networking, but that&#8217;s a different story). </p>
<p>Another example of expense to keep up to date in Canada is Bell Canada. Many people with Bell Internet also have wireless access points provided by Bell. Unfortunately, these access points default to (or in some cases only support) WEP encryption. This encryption is not secure at all and can be broken by your average teenager with instruction off <a href="http://www.youtube.com/watch?v=3seUWVK_Tb0">youtube</a>. However it could be argued in hindsight this type of expense is the company&#8217;s fault.</p>
<p>Furthermore, to increase capacity in the network, it is not as simple as just adding another link between an under-supplied area. Consider a small town where a few people make use of the majority of the connection cause poor performance for the others in the town. This town may be a candidate for increased capacity, but by adding another connection the company does not stand to gain any increase in subscribers and thus may stand to lose money. Now expand this example to larger cities where higher and higher proportions of the population are using more and more of their connection to the point where almost everyone is straining the infrastructure. There are solutions to this type of problem though. Some companies in the US and other places make use of traffic shaping (which while unpopular is a cheaper alternative to the user). Perhaps two types of plans could be put in place, one with traffic shaping and unlimited usage, or one with no traffic shaping and limited usage.</p>
<h2>3. The limited capabilities of backbone and infrastructure networks &amp; increasing speeds of user connections</h2>
<p>One of the problems with the increased cost to the providers is the increased speed of user connections. Allowing users to have faster connections means they can request more information at once. Imagine many people flushing their toilets at the same time where the pipe at the road isnt big enough to handle all of the water at once. This is what has been allowed to happen. The problem is further compounded because it is not as simple as water simply flowing through pipes. At each junction, decisions must be made on the direction of the flow. If too much traffic arrives at once junction, the time it takes to make a decision is slower than the rate new traffic is appearing and big problems happen.</p>
<h2>4. Steady growth in traffic from users</h2>
<p>As can be seen in some of the figures in the ICC keynote, traffic from users is growing exponentially. Unfortunately, the service providers&#8217; revenue is usually growing linearly, so there is eventually a point where it is not profitable for the companies to provide Internet service (assuming the cost to provide exponential traffic grows exponentially). This is the most compelling point for usage based-billing. Unless we can somehow find a way to reduce the growth of data, the only way to retain profitable ISPs is to increase the revenue. </p>
<div class="image" style="float:right;"><a href="http://www.jasonernst.com/wp-content/uploads/2011/02/cisco.jpg"><img src="http://www.jasonernst.com/wp-content/uploads/2011/02/cisco-300x202.jpg" alt="" title="cisco" width="300" height="202" class="aligncenter size-medium wp-image-1289" /></a>
<p style="text-align: center;">Internet growth [<a href="http://www.cisco.com/en/US/solutions/collateral/ns341/ns525/ns537/ns705/ns827/white_paper_c11-481374_ns827_Networking_Solutions_White_Paper.html">Cisco</a>]</p>
</div>
<h2>5. Conflicting interests between user service and shareholders profits &amp; the disconnect between what you get and what is advertised</h2>
<p>This is another important problem with ISPs. Perhaps this is the reason that the infrastructure managed to get into its current state (where it cannot handle everyone making full use of their advertised connections). In order to gain a competitive advantage over competing ISPs, each company often advertises their maximum potential connection speeds. There is never any mention of the network past the point where your house connects to the ISP. Sure if no one else in your neighbourhood is using the connection you might get close to the advertised speed, but as many people know, you often don&#8217;t get close. From the shareholder point of view, you want the company to spend as little as possible on infrastructure. Perhaps it may be necessary the enforce a rule that companies must be able to provide the full advertised speed, regardless of how many other people are on the network. Of course, this would make the Internet much more expensive.</p>
<h2>6. Potential Solutions instead of UBB</h2>
<p>There are many promising technical solutions to some of the problems that are causing the gap between cost and revenue in Internet technologies, however many of them may not make enough of an impact, or are still too premature to cause a difference yet. So in the meantime something must be done.</p>
<p>In the case of providing video services or other multimedia streaming services such as Netflix, LastFM etc. technologies such as multi-casting may be used to deliver common data to a group of users with one packet (in the unicast model, one packet is sent over and over again for every user, even if they are watching the same content).</p>
<p>To reduce the cost of human maintenance and  oversight over the networks, applying autonomic computing techniques to networks so that they can self-manage, self-protect etc. may be beneficial.</p>
<p>Exploiting peer-to-peer, caching and other technologies that reduce communications over the large distances on the Internet may help reduce the cost of delivering traffic on the Internet.</p>
<p>Providing tiered Internet service, where users pay for different service levels may be another model altogether that allows companies to remain competitive without usage based billing. Make traffic that causes high strain on the networks (such as streaming video, real-time traffic etc.) more expensive than traffic that is delay tolerant and has lower requirements (web, email etc.)</p>
<p>Perhaps the government itself should take a more active role in providing Internet infrastructure in Canada if the Internet is seen as another piece of infrastructure like roads, bridges and electricity.</p>
<h2>Concluding remarks</h2>
<p>Of course, there are many assumptions to the case for UBB. The assumption that the cost for service providers is growing exponentially is the biggest and most important. Wired network access doesn&#8217;t have the same problems wireless has (the broadcast, limited bandwidth medium, interference etc.) so the comparisons may not actually be valid. The case becomes complicated by the fact that many ISPs are also in the business of providing wireless service, media services (tv, radio, newspaper etc.) that causes conflicts of interest.</p>
<p>The trouble I have with charging the heaviest users is that everyone seems to be trending towards using more and more traffic. In my own experience with large ISPs I feel like I&#8217;m always getting less for more money (usage caps have been getting lower and lower, yet the bill keeps going up). The advertised speeds of the networks are going up, but the capacity seems to be falling since we can get more faster, but less overall.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonernst.com/2011/02/08/points-to-consider-for-usage-based-billing-ubb-in-canada/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

