<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title>improve.ro</title>
  <link href="http://improve.ro//atom.xml" rel="self"/>
  <link href="http://improve.ro//"/>
  <updated>2012-04-16T13:40:27+03:00</updated>
  <id>http://improve.ro//</id>
  <author>
    <name>Alex Ciminian</name>
    
  </author>

  
  <entry>
    <title>Should IE7 Mobile (Still) Be Supported?</title>
    <link href="http://improve.ro//2012/04/should-ie7-mobile-still-be-supported/"/>
    <updated>2012-04-10T22:02:00+03:00</updated>
    <id>http://improve.ro//2012/04/should-ie7-mobile-still-be-supported</id>
    <content type="html">&lt;p&gt;Among the variety of mobile platforms available today, one that gets its fair share of media coverage is the Windows Phone platform. I've only used it for about a week last year (on an &lt;a href=&quot;http://www.htc.com/uk/smartphones/htc-hd7/&quot;&gt;HTC HD7&lt;/a&gt;) and I can't say it's  bad, although I suffered a bit being primarily exposed to Android before using it. The point I'm trying to make is that Windows Phone 7 doesn't matter in the long run and that it's harmful to take IE7 Mobile into account when developing a mobile website or webapp.&lt;/p&gt;

&lt;p&gt;Although StatCounter is &lt;a href=&quot;http://blog.wapreview.com/9157/&quot;&gt;not the most accurate&lt;/a&gt; source for mobile stats, it &lt;a href=&quot;http://gs.statcounter.com/#mobile_browser-ww-monthly-201103-201203&quot;&gt;clearly shows&lt;/a&gt; that IE Mobile is not a force to be taken into consideration. It is not a feature phone, to say that it has JavaScript disabled  and doesn't get tracked by metrics scripts. Other studies also show that it just doesn't have enough &lt;a href=&quot;http://blog.nielsen.com/nielsenwire/consumer/more-us-consumers-choosing-smartphones-as-apple-closes-the-gap-on-android/&quot;&gt;market share&lt;/a&gt; compared to its competitors.&lt;/p&gt;

&lt;p&gt;So, it's pretty clear that Microsoft missed out on the start of the smartphone boom, but they certainly have the capacity to gain users (especially in the case of &lt;a href=&quot;http://techcrunch.com/2012/01/05/microsoft-nokia-smartphone-division-unit/&quot;&gt;a Nokia takeover&lt;/a&gt;). Even in this case, IE7 Mobile &lt;em&gt;will not grow&lt;/em&gt;. All &lt;a href=&quot;http://www.nokia.com/us-en/products/phone/lumia900/specifications/&quot;&gt;new released Windows Phones&lt;/a&gt; ship with &lt;a href=&quot;http://www.microsoft.com/windowsphone/en-us/howto/wp7/start/whats-new-in-windows-phone.aspx&quot;&gt;WP 7.5&lt;/a&gt; that comes with an IE that &lt;a href=&quot;http://en.wikipedia.org/wiki/Internet_Explorer_Mobile#Internet_Explorer_Mobile_9&quot;&gt;has its rendering engine based on IE 9&lt;/a&gt; as the default browser. It's almost impossible to downgrade, although I don't imagine why anyone would want to do that.&lt;/p&gt;

&lt;p&gt;Also, Microsoft allows existing WP 7 users to &lt;a href=&quot;http://www.microsoft.com/windowsphone/en-us/howto/wp7/basics/phone-updates.aspx&quot;&gt;upgrade to 7.5&lt;/a&gt; so existing users could get the new IE without having to change their device. And even if they did have to, users change their phones &lt;a href=&quot;http://www.phonearena.com/news/How-often-do-you-change-your-phone-Poll-Results_id24668&quot;&gt;a lot more often&lt;/a&gt; than they change their computers. This means that the meager slice of the market the IE7 Mobile has will be gone in no time.&lt;/p&gt;

&lt;p&gt;I won't rant against IE and all its wrongs in this post. Probably every web developer on the internet has done that at one point. What I am trying to say is that supporting a non-standards compliant browser with dismal market share and practically no prospect for growth is a waste of money.&lt;/p&gt;

&lt;p&gt;If you do decide to drop IE support you'll end up with an improved baseline for development that is closer to the standards of today's web development ecosystem. Major sites are &lt;a href=&quot;http://venturebeat.com/2011/12/30/facebook-timeline-ie7/&quot;&gt;dropping IE7 support on desktop&lt;/a&gt;, where it's market share is more significant. If they can afford to do that, considering their traffic, it's hard to believe that it won't be more profitable for you to do this.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Mobile Analytics on Top Trafficked Sites</title>
    <link href="http://improve.ro//2012/01/mobile-analytics-on-top-trafficked-sites/"/>
    <updated>2012-01-29T23:16:00+02:00</updated>
    <id>http://improve.ro//2012/01/mobile-analytics-on-top-trafficked-sites</id>
    <content type="html">&lt;p&gt;This is a short analysis on how web analytics are implemented across a few top trafficked websites. Part of them were picked from the &lt;a href=&quot;http://www.alexa.com/topsites/category/Top/Shopping&quot;&gt;Alexa rakings for shopping websites&lt;/a&gt; and some are the homes of popular tech giants.&lt;/p&gt;

&lt;p&gt;I tested this in Mozilla Firefox with a spoofed iPhone 3 user-agent (via the &lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/user-agent-switcher/&quot;&gt;User-Agent Switcher&lt;/a&gt; plugin). The drawback of this method is that for sites using feature detection and client-side redirection versus redirection based on the UA string I would still be getting the desktop site. That being said, I didn't find any of the sites to have this behavior.&lt;/p&gt;

&lt;p&gt;Also, I didn't check all of them with a featured phone UA. I only did this for sites that had clues to different enhanced/featured implementations in their URL structure. The only one that had this, from the sites I tested was Groupon.&lt;/p&gt;

&lt;p&gt;I used &lt;a href=&quot;http://getfirebug.com&quot;&gt;Firebug&lt;/a&gt; to check the requests being made and the size of the scripts. I also used the online JS Beautifier and the closure-compiler interface to swing back and forth between minified and unminified scripts.&lt;/p&gt;

&lt;p&gt;I tried the domain of the companies directly (i.e., canon.com) and I did not navigate deeper into the site structure for any of the tested websites. It may be possible that some sites who reported to not have a mobile optimized site to simply not redirect to it when accessing them directly.&lt;/p&gt;

&lt;!-- more --&gt;


&lt;p&gt;&lt;a href=&quot;http://www.amazon.com/gp/aw/h.html/190-2635517-0125555&quot; title=&quot;Amazon Mobile&quot;&gt;Amazon&lt;/a&gt; uses inline JavaScript to build the URL of an analytics beacon. The code is minified and the total size (including script, noscript, img and a div tag) is 5KB. This comes to about 2KB gzipped.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://hp.mobileweb.ebay.com/home&quot; title=&quot;eBay Mobile&quot;&gt;eBay&lt;/a&gt; and &lt;a href=&quot;http://mobile.walmart.com/&quot; title=&quot;Walmart Mobile&quot;&gt;Walmart&lt;/a&gt; do not seem to have any form of analytics code sent on the client side. Probably some form of tracking is done on the server, it being transparent to the client.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://m.bestbuy.com/m/e/&quot; title=&quot;BestBuy Mobile&quot;&gt;BestBuy&lt;/a&gt; directly embeds an Omniture beacon in the page. There is no extra JavaScript to download and execute. It also has an embedded Atlas beacon image.&lt;/p&gt;

&lt;p&gt;Groupon has separate sites for &lt;a href=&quot;http://touch.groupon.com/&quot; title=&quot;Groupon for smart phones&quot;&gt;enhanced&lt;/a&gt; and &lt;a href=&quot;http://m.groupon.com&quot; title=&quot;Groupon for dumb phones&quot;&gt;featured&lt;/a&gt; devices. They both use &lt;a href=&quot;https://d1ros97qkrwjf5.cloudfront.net/30/eum/rum.js&quot;&gt;rum.js&lt;/a&gt;, a 3KB script that generates a beacon URL for Google Analytics.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://m.ikea.com/&quot; title=&quot;IKEA Mobile&quot;&gt;IKEA&lt;/a&gt; has its analytics code bundled inside &lt;a href=&quot;http://m.ikea.com/irmw-resources/js/ikea.mobile.min.js&quot; title=&quot;IKEA mobile script&quot;&gt;it's 50KB (zipped) JavaScript file&lt;/a&gt;. The size of the analytics code is 67KB minified which becomes 22KB gzipped.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://sites.target.com/site/en/spot/mobile.jsp&quot; title=&quot;Target Mobile&quot;&gt;Target&lt;/a&gt; uses Omniture for tracking and includes &lt;a href=&quot;http://sites.target.com/js/mobile_omniture.js&quot;&gt;a 47KB (17KB gzipped) JavaScript&lt;/a&gt; in the page. An interesting fact is that their analytics script is more than twice as large &lt;a href=&quot;http://sites.target.com/js/mobile_main.js&quot; title=&quot;Target Mobile Javascript&quot;&gt;as their JavaScript&lt;/a&gt;, which is only 7.5KB zipped.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.newegg.com/&quot; title=&quot;newegg mobile&quot;&gt;Newegg&lt;/a&gt; uses &lt;a href=&quot;http://coremetrics.com/&quot;&gt;IBM Coremetrics&lt;/a&gt; and embeds a beacon image directly in the page.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://m.dell.com/mt/www.dell.com&quot; title=&quot;Dell Mobile&quot;&gt;Dell&lt;/a&gt; also uses Omniture and downloads a 50KB (19KB gzipped) JavaScript.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://m.ibm.com/us/en/&quot; title=&quot;IBM Mobile&quot;&gt;IBM&lt;/a&gt; sends a beacon to unica.com. The beacon URL is built by a &lt;a href=&quot;http://www.ibm.com/common/stats/stats.js&quot; title=&quot;IBM Metrics Script&quot;&gt;downloaded JavaScript file&lt;/a&gt;. The file size is 18.6KB minified (6.8KB gzipped).&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://m.microsoft.com&quot; title=&quot;Microsoft Mobile&quot;&gt;Microsoft&lt;/a&gt; uses a directly embedded beacon image that hits &lt;a href=&quot;http://webtrends.com/&quot; title=&quot;webtrends&quot;&gt;webtrends.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Apple, SAP, Canon, Asus, Toshiba, Fujitsu and Acer do not serve optimized content for mobile - or at least I was not able to find their mobile site given the methods described in the beginning.&lt;/p&gt;

&lt;script type=&quot;text/javascript&quot; src=&quot;http://www.google.com/jsapi&quot;&gt;&lt;/script&gt;


&lt;script type=&quot;text/javascript&quot;&gt;
  google.load('visualization', '1', {packages: ['corechart']});
&lt;/script&gt;




&lt;script type=&quot;text/javascript&quot;&gt;
  function drawVisualization() {
    // Create and populate the data table.
    var data = new google.visualization.DataTable();
    var raw_data = [
      ['IKEA', 67, 22],
      ['HP', 53, 20],
      ['Dell', 50, 19],
      ['Target', 47, 17],
      ['IBM', 18.6, 6.8],
      ['Groupon', 9, 3],
      ['Amazon', 5, 2],
      ['eBay', 0, 0],
      ['Walmart', 0, 0],
      ['Newegg', 0, 0],
      ['Microsoft', 0, 0]
    ];
    
    var types = ['Uncompressed', 'Compressed'];
                    
    data.addColumn('string', 'Year');
    for (var i = 0; i  &lt; raw_data.length; ++i) {
      data.addColumn('number', raw_data[i][0]);    
    }
    
    data.addRows(types.length);
  
    for (var j = 0; j &lt; types.length; ++j) {    
      data.setValue(j, 0, types[j].toString());    
    }
    for (var i = 0; i  &lt; raw_data.length; ++i) {
      for (var j = 1; j  &lt; raw_data[i].length; ++j) {
        data.setValue(j-1, i+1, raw_data[i][j]);    
      }
    }
    
    // Create and draw the visualization.
    new google.visualization.ColumnChart(document.getElementById('visualization')).
        draw(data,
             {
               title:&quot;Size of Mobile Metrics Code&quot;, 
               width: 800, height: 400,
               vAxis: {
                 format: '#.##KB',
                 baseline: -2,
                 minValue: 0,
                 viewWindow: { min: -2 }
               }
             }
        );
  }
  

  google.setOnLoadCallback(drawVisualization);
&lt;/script&gt;




&lt;div id=&quot;visualization&quot; style=&quot;width: 800px; height: 400px;&quot;&gt;&lt;/div&gt;


&lt;p&gt;I posted the code used to generate the chart in a &lt;a href=&quot;https://gist.github.com/1704731&quot;&gt;gist&lt;/a&gt;. Feel free to update/correct it.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>SVN 1.7 Quickstart Guide for Windows</title>
    <link href="http://improve.ro//2012/01/svn-1.7-quickstart-guide-for-windows/"/>
    <updated>2012-01-09T00:39:00+02:00</updated>
    <id>http://improve.ro//2012/01/svn-1.7-quickstart-guide-for-windows</id>
    <content type="html">&lt;p&gt;At work we use SVN for version control, so I need to be able to connect to the repository from my Windows machine. After reinstalling my system, I remembered what a pain it was to have the whole client/plugins/libraries/certificate stuff set up. &lt;em&gt;Especially&lt;/em&gt; if you try SVN 1.7. It's working copy format is incompatible with previous versions, so you'll have to have every client using this particular version (as a bonus feature for using 1.7, you get to &lt;a href=&quot;http://subversion.apache.org/faq.html#case-change&quot;&gt;change the case of a filename in one step on Windows&lt;/a&gt; :).&lt;/p&gt;

&lt;p&gt;My main use cases for SVN are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;trying out stuff on the command line. I want to have the &lt;code&gt;svn&lt;/code&gt; commands available for scripting too, just in case I want to automate something.&lt;/li&gt;
&lt;li&gt;handling versioning straight from my IDE (in this case, Eclipse)&lt;/li&gt;
&lt;li&gt;provide Apache Maven with the right svn capabilities so that its versioning plugins work.&lt;/li&gt;
&lt;li&gt;having to checkout a repository on disk. I'm not really confortable in the Windows shell so I end up doing this from Windows Explorer most of the time.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The architecture of these solutions on Windows is a bit convoluted, so I'll take a shot at explaining how they interact with each other and how you should configure them. Also, there are some annoyances if you need to use certificates to authenticate yourself (&lt;code&gt;https&lt;/code&gt;) but there are some tips here that help.&lt;/p&gt;

&lt;!-- more --&gt;


&lt;h2&gt;Having SVN available in the command line&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://tortoisesvn.net/&quot; title=&quot;TortoiseSVN&quot;&gt;TortoiseSVN&lt;/a&gt; comes with its own CLI binaries (optional on install, available in the &lt;code&gt;\bin\&lt;/code&gt; folder of the installation). You can also install &lt;a href=&quot;http://www.sliksvn.com/en/download&quot; title=&quot;SilkSVN&quot;&gt;SilkSVN&lt;/a&gt; which works pretty good and supports a lot of other projects. I currently run SilkSVN 1.7.2.&lt;/p&gt;

&lt;h2&gt;Having SVN work with Java applications&lt;/h2&gt;

&lt;p&gt;There are two main plugins for SVN in Eclipse - Subclipse and Subversive. I have only used Subclipse and I'm pretty satisfied - functionally it covers all I need and performance-wise I don't think Subversive could be much better given how slow Eclipse is as a whole.&lt;/p&gt;

&lt;p&gt;First of all, if you're running with SVN 1.7 you need Subclipse 1.8. It's not available through the Eclipse Marketplace so you have to add &lt;a href=&quot;http://subclipse.tigris.org/update_1.8.x&quot; title=&quot;Subclipse download site&quot;&gt;the download site&lt;/a&gt; manually.&lt;/p&gt;

&lt;p&gt;The Subclipse project does not have its own svn implementation. It either uses &lt;a href=&quot;http://en.wikipedia.org/wiki/SVNKit&quot; title=&quot;SVNKit&quot;&gt;SVNKit&lt;/a&gt; (a Java client implementation) or JavaHL. More information about both is in &lt;a href=&quot;http://svnbook.red-bean.com/en/1.7/svn.developer.usingapi.html&quot; title=&quot;JavaHL vs SVNKit&quot;&gt;the SVN book&lt;/a&gt;. I prefer to use JavaHL (currently version 1.7.2).&lt;/p&gt;

&lt;p&gt;Then comes the problem with certificates. Subclipse will keep asking for your certificate and passphrase unless you tell it otherwise. The dialog box in Eclipse doesn't have any 'remember' checkbox and I couldn't find anything in the &lt;code&gt;Preferences&lt;/code&gt; menu related to this. To make it work, you need to change the configuration for the underlying svn client. You can find that in &lt;code&gt;C:\Users\{username}\AppData\Roaming\Subversion&lt;/code&gt;: &lt;code&gt;config&lt;/code&gt; and &lt;code&gt;servers&lt;/code&gt; files. Here's my current configuration:&lt;/p&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ssl-client-cert-prompt = yes
ssl-client-cert-file = &amp;lt;path-to-file&amp;gt; # example: C:\cert\me.pfx
store-ssl-client-cert-pp = yes
store-ssl-client-cert-pp-plaintext = no
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;I first got the impression that &lt;code&gt;ssl-authority-files&lt;/code&gt; should be the path list for the certificates I'm trying to send to the server and I lost a bit of time trying to debug the error it gave me. That property is for accepted server certificates and not for the client certificates you want to send out.&lt;/p&gt;

&lt;p&gt;Maven also needs SVN connectors if you want to have it manage version control. Unfortunately, if you've checked out your project with 1.7, the working copy format is different and Maven cannot use it. You get the following error (Maven 2.2):&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;svn: The path '[...]' appears to be part of a Subversion 1.7 or greater working copy. Please upgrade your Subversion client to use this working copy.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;You can circumvent this by referencing SVNKit 1.7 as a dependency in all of your plugins. You need to have the tmatesoft repositories listed in your pom file (&lt;a href=&quot;http://maven.tmatesoft.com/content/repositories/snapshots/&quot; title=&quot;tmatesoft snapshot repository&quot;&gt;snapshots&lt;/a&gt;, &lt;a href=&quot;http://maven.tmatesoft.com/content/repositories/releases/&quot; title=&quot;tmatesoft release repository&quot;&gt;releases&lt;/a&gt; and you have to add the following dependency to any plugin that's using SVN:&lt;/p&gt;

&lt;p&gt;``` xml&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;dependencies&amp;gt;
    &amp;lt;dependency&amp;gt;
        &amp;lt;groupId&amp;gt;org.tmatesoft.svnkit&amp;lt;/groupId&amp;gt;
        &amp;lt;artifactId&amp;gt;svnkit&amp;lt;/artifactId&amp;gt;
        &amp;lt;version&amp;gt;1.7.0-SNAPSHOT&amp;lt;/version&amp;gt; &amp;lt;!-- or svnkit:1.7.0-alpha1 --&amp;gt;
    &amp;lt;/dependency&amp;gt;
&amp;lt;/dependencies&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;h2&gt;Having SVN integrated with Windows Explorer&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://tortoisesvn.net/&quot; title=&quot;TortoiseSVN&quot;&gt;TortoiseSVN&lt;/a&gt; is the best pick. I use 1.7.3 for 64bit systems and it worked out of the box, no tweaking needed.&lt;/p&gt;

&lt;p&gt;The only problem encountered with Tortoise was a bunch of popups popped up :) after I installed my ActivClient smartcard manager (I use it for VPN authentication). Even if I gave Tortoise the path to my certificate, it would still ask for the smartcard 20-30 times before it would start any operation. This goes away if you add a key to your registry. More information in this &lt;a href=&quot;http://code.google.com/p/tortoisesvn/issues/detail?id=119&quot; title=&quot;Tortoise SVN Issue 119&quot;&gt;bug report&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;OpenSSL is built with CAPI enabled. In that build, OpenSSL opens the crypto-API certificate store without showing an UI to find out if there's a matching certificate it can use.
Some smartcard software don't respect the non-UI flag and pop up a dialog asking the user to insert the smartcard into the reading device. That dialog is very annoying.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;This wraps it up, you should have SVN 1.7 working on Windows in all cases.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Mobile Browsers and PDF Files</title>
    <link href="http://improve.ro//2011/09/mobile-browsers-and-pdf-files/"/>
    <updated>2011-09-01T00:39:00+03:00</updated>
    <id>http://improve.ro//2011/09/mobile-browsers-and-pdf-files</id>
    <content type="html">&lt;p&gt;Troubleshooting a PDF download tool, I was surprised to find out that some mobile browsers behave unexpectedly when trying to directly access a PDF resource through HTTP. While it was pretty obvious that they are lightweight and do not have PDF viewing plugins embedded as their desktop counterparts, even downloading the resource was behaving strangely in some of them.&lt;/p&gt;

&lt;p&gt;I tested on my Samsung Galaxy S (GTi9000), a Palm Pre Plus, a Blackberry Torch (9800) and an iPhone 4. All browsers are WebKit based. The test case was pretty simple - download a PDF file from my domain. The PDF was ~200KB in size, to keep the tests quick.&lt;/p&gt;

&lt;p&gt;To debug the actual HTTP traffic of the devices, I interposed Fiddler as a reverse proxy between my domain and them. This way, I was able to log all the headers and content of all the HTTP requests and responses made.&lt;/p&gt;

&lt;p&gt;Let's start with the responses, the server was not configured in any way to serve PDFs, so it gave the same response regardless of the request headers it received.&lt;/p&gt;

&lt;!-- more --&gt;


&lt;p&gt;```&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;HTTP/1.1 200 OK
Date: Tue, 02 Aug 2011 09:18:05 GMT
Accept-Ranges: bytes
ETag: &quot;2f257-4e36a6c5-0&quot;
Last-Modified: Mon, 01 Aug 2011 13:14:45 GMT
Content-Type: application/pdf
Content-Length: 193111
Connection: Keep-Alive
Age: 13251
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;The caching headers are automatically inserted by the server, but they did not seem to affect the devices since the content was being downloaded for every request.&lt;/p&gt;

&lt;p&gt;Now for the interesting part: besides the iPhone browser, all others make &lt;em&gt;two requests&lt;/em&gt; for the file, which means the content is downloaded twice!&lt;/p&gt;

&lt;p&gt;The BlackBerry first sends a complete request and then repeats it identically:&lt;/p&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;GET /a.pdf HTTP/1.1
Host: improve.ro
Connection: keep-alive
User-Agent: Mozilla/5.0 (BlackBerry; U; BlackBerry 9800; en-GB) AppleWebKit/534.1+ (KHTML, like Gecko) Version/6.0.0.246 Mobile Safari/534.1+
Accept: text/html,application/xhtml+xml,application/xml,*/*;q=0.5
Accept-Language: en-GB,en;q=0.5
Accept-Encoding: gzip,deflate
x-wap-profile: &quot;http://www.blackberry.net/go/mobile/profiles/uaprof/9800_80211g/6.0.0.rdf&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;GET /a.pdf HTTP/1.1
Host: improve.ro
Connection: keep-alive
User-Agent: Mozilla/5.0 (BlackBerry; U; BlackBerry 9800; en-GB) AppleWebKit/534.1+ (KHTML, like Gecko) Version/6.0.0.246 Mobile Safari/534.1+
Accept: text/html,application/xhtml+xml,application/xml,*/*;q=0.5
Accept-Language: en-GB,en;q=0.5
Accept-Encoding: gzip,deflate
x-wap-profile: &quot;http://www.blackberry.net/go/mobile/profiles/uaprof/9800_80211g/6.0.0.rdf&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;The Samsung Galaxy S browser sends a complete request, then a stripped down version of it:&lt;/p&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;GET /a.pdf HTTP/1.1
Host: improve.ro
Connection: keep-alive
Accept-Encoding: gzip
Accept-Language: en-US
x-wap-profile: http://wap.samsungmobile.com/uaprof/GT-i9000.xml
User-Agent: Mozilla/5.0 (Linux; U; Android 2.2.1; en-us; GT-I9000 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
Cookie: ASP.NET_SessionId=p2k2g4rv1f3eily0gifmimwf
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Charset: utf-8, iso-8859-1, utf-16, *;q=0.7
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;GET /a.pdf HTTP/1.1
Cookie: ASP.NET_SessionId=p2k2g4rv1f3eily0gifmimwf
Host: improve.ro
Connection: Keep-Alive
User-Agent: Mozilla/5.0 (Linux; U; Android 2.2.1; en-us; GT-I9000 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;The Palm Pre Plus behaves similarly with the Galaxy, only it doesn't even send a &lt;code&gt;User-Agent&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;GET /a.pdf HTTP/1.1
Host: improve.ro
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (webOS/1.4.2; U; en-US) AppleWebKit/532.2 (KHTML, like Gecko) Version/1.0 Safari/532.2 Pre/1.1
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
X-Palm-Carrier: c001-01
accept-charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;GET /a.pdf HTTP/1.1
Host: improve.ro
Accept: */*
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;This is the only request the iPhone made.&lt;/p&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;GET /hp/a.pdf HTTP/1.1
Host: improve.ro
User-Agent: Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_4 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8K2 Safari/6533.18.5
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: keep-alive
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;Weird!&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Using LessCSS in Your Ant Builds</title>
    <link href="http://improve.ro//2011/02/using-lesscss-in-your-ant-builds/"/>
    <updated>2011-02-27T22:22:18+02:00</updated>
    <id>http://improve.ro//2011/02/using-lesscss-in-your-ant-builds</id>
    <content type="html">&lt;p&gt;I created a fork of the &lt;a href=&quot;http://www.asual.com/blog/lesscss/2009/11/05/less-for-java.html&quot;&gt;Java flavoured&lt;/a&gt; port of &lt;a href=&quot;http://lesscss.org/&quot;&gt;LessCSS&lt;/a&gt; to enable including it in an Ant build processes. You can find the &lt;a href=&quot;https://github.com/cimi/lesscss-engine&quot;&gt;source on GitHub&lt;/a&gt;. The reason I needed to do this and not use the &lt;a href=&quot;https://github.com/asual/lesscss-servlet&quot;&gt;servlet&lt;/a&gt; to build them on the fly (and cache them, of course :) is because one of the envrionments I'm using is a CMS setup that imposes a lot of constraints on how you organize your resources. For the moment, generating the files on my development machine and uploading them manually in the CMS seemed the better option, as &lt;a href=&quot;http://news.ycombinator.com/item?id=2146580&quot;&gt;CSS explosion&lt;/a&gt; was iminent :).There wasn't much to modify, I just added a class that implements the Task interface from Ant. You can alias it in your buildfile like this:&lt;/p&gt;

&lt;p&gt;``` xml&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;target name=&quot;build.css&quot;&amp;gt;
    &amp;lt;taskdef name=&quot;lesscss&quot; classname=&quot;com.asual.lesscss.LessEngineTask&quot; classpathref=&quot;build.aux&quot; /&amp;gt;
    &amp;lt;property name=&quot;css.dir&quot; value=&quot;[your_css_dir]&quot; /&amp;gt;
    &amp;lt;lesscss input=&quot;${css.dir}/[less1]&quot; output=&quot;${css.dir}/[css1]&quot; /&amp;gt;
    &amp;lt;lesscss input=&quot;${css.dir}/[less2]&quot; output=&quot;${css.dir}/[css2]&quot; /&amp;gt;
&amp;lt;/target&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;The classpath reference must contain at least Mozilla Rhino (js-1.6R7.jar) and the Apache Commons Logging library.You can integrate this with Eclipse by adding your buildfile to the Ant view. When you double-click the build.css task, the final CSS files get generated. If you have auto-refresh enabled in Eclipse, you can see your updates immediately, even if your server is running.To build the project you need to have Maven installed. If you don't/can't want to do that, you can &lt;a href=&quot;https://github.com/downloads/cimi/lesscss-engine/lesscss-engine-1.0.41.jar&quot;&gt;download a prebuilt one&lt;/a&gt;. I plan to add compression support for this, using the YUICompressor, as it is implemented in the servlet version of the Java port.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Proxy settings with HTTPClient and Spring</title>
    <link href="http://improve.ro//2010/10/proxy-settings-with-httpclient-and-spring/"/>
    <updated>2010-10-30T21:16:06+03:00</updated>
    <id>http://improve.ro//2010/10/proxy-settings-with-httpclient-and-spring</id>
    <content type="html">&lt;p&gt;Since I didn't find any example on the Web on how to do this, I'll give it a go here and try to explain things a bit. I'm going to treat the particular case of using &lt;a href=&quot;http://hc.apache.org/httpcomponents-client-ga/index.html&quot;&gt;HTTPClient&lt;/a&gt; and &lt;a href=&quot;http://www.springsource.org/&quot;&gt;Spring&lt;/a&gt;. For changing the proxy value in the JRE, see the official documentation on &lt;a href=&quot;http://java.sun.com/javase/6/docs/technotes/guides/net/proxies.html&quot;&gt;Java Networking and Proxies&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;From the &lt;a href=&quot;http://hc.apache.org/httpcomponents-client-ga/tutorial/html/connmgmt.html#d4e540&quot;&gt;documentation&lt;/a&gt;, we see that in order to set up a proxy for requests made through HTTPClient you have three options: specifying it directly, getting it from the JRE or implementing a custom RoutePlanner to have complete control over the HTTP route computation.&lt;/p&gt;

&lt;!-- more --&gt;


&lt;p&gt;To specify it explicitly, you need to change a parameter in the HTTPClient configuration:&lt;/p&gt;

&lt;p&gt;``` java&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;DefaultHttpClient httpclient = new DefaultHttpClient();
HttpHost proxy = new HttpHost(&quot;someproxy&quot;, 8080);
httpclient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;We need to have an HttpHost object that contains the proxy information. To take advantage of Spring's dependency injection, you can rely on the configuration files to create that object. You can define a proxy bean like this:&lt;/p&gt;

&lt;p&gt;``` xml&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;bean id=&quot;proxy&quot; class=&quot;org.apache.http.HttpHost&quot;&amp;gt;
    &amp;lt;constructor-arg value=&quot;[host-name]&quot; /&amp;gt;
    &amp;lt;constructor-arg value=&quot;[port]&quot; /&amp;gt;
&amp;lt;/bean&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;And then, use dependency injection to link it to the classes that need it:&lt;/p&gt;

&lt;p&gt;``` xml&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;bean id=&quot;yahooGeocodingService&quot; class=&quot;YahooGeocodingService&quot;&amp;gt;
    &amp;lt;constructor-arg ref=&quot;proxy&quot; /&amp;gt;
    &amp;lt;!-- [...] --&amp;gt;
&amp;lt;/bean&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;``` java&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;public class YahooGeocodingService {    
    // [...]    
    public YahooGeocodingService(HttpHost proxy, ...) {        
        this.proxy = proxy;    
    }    
    // [...]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;If the proxy bean definition is missing, &lt;em&gt;null&lt;/em&gt; will be passed as an argument to the constructor. By creating a wrapper for HTTP requests we can selectively apply the proxy, based on if it was set or not:&lt;/p&gt;

&lt;p&gt;``` java&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;private static HttpClient enableProxy(HttpClient httpclient, HttpHost proxy, URI target) {
    // if the request is for localhost or no proxy host was passed do not set it
    if ((target.getHost().equalsIgnoreCase(&quot;localhost&quot;)) || (proxy == null))
        return httpclient;
    // set the proxy
    httpclient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
    return httpclient;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;So now, in the method where you actually want to do the request, you just have to add one line if you want proxy support for the HttpClient object you've created:&lt;/p&gt;

&lt;p&gt;``` java&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Utils.enableProxy(httpClient, this.proxy, target)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;```&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Rotating Rectangles</title>
    <link href="http://improve.ro//2010/08/rotating-rectangles/"/>
    <updated>2010-08-17T14:21:23+03:00</updated>
    <id>http://improve.ro//2010/08/rotating-rectangles</id>
    <content type="html">&lt;p&gt;Working on the &lt;a href=&quot;http://maps48.sourceforge.net/&quot; title=&quot;Maps48&quot;&gt;maps48 project&lt;/a&gt;, one of the problems that needed solving was calculating the amount of map space needed to be retrieved to allow rotating the map without introducing any blank space in the viewport. As you can see from the diagram below what we actually need is to get the rotated rectangle's horizontal and vertical projection as the new width and height.The black border represents the viewport. If we were to only have an image the size of the viewport and rotate it, we'd end up with something like the orange rectangle. Notice the blank spaces in the viewport :). The solution is to resize (or import a larger bit of the map, in our case) the image - the pink rectangle - so that when rotated it fills up the viewport entirely, as does the green rectangle.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://improve.ro/wp-content/uploads/2010/08/rectangles.png&quot;&gt;&lt;img src=&quot;http://improve.ro/wp-content/uploads/2010/08/rectangles.png&quot; title=&quot;Rotating rectangles problem description&quot; alt=&quot;Problem description&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This can be easily achieved through some basic trigonometry. The key to this are two angles: alpha, the angle the rectangle was rotated by and beta, the angle the diagonal makes with the width.&lt;/p&gt;

&lt;!-- more --&gt;


&lt;p&gt;&lt;a href=&quot;http://improve.ro/wp-content/uploads/2010/08/rectangles-2.png&quot;&gt;&lt;img src=&quot;http://improve.ro/wp-content/uploads/2010/08/rectangles-2.png&quot; title=&quot;Problem diagram&quot; alt=&quot;Problem diagram&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First,  I determine the angle the diagonal makes with the baseline (the rectangle's width):&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://improve.ro/wp-content/uploads/2010/08/CodeCogsEqn-1.png&quot;&gt;&lt;img src=&quot;http://improve.ro/wp-content/uploads/2010/08/CodeCogsEqn-1.png&quot; title=&quot;Equation 1&quot; alt=&quot;Equation 1&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, we know that:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://improve.ro/wp-content/uploads/2010/08/rot-height-1.png&quot;&gt;&lt;img src=&quot;http://improve.ro/wp-content/uploads/2010/08/rot-height-1.png&quot; title=&quot;Equation 2&quot; alt=&quot;Equation 2&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This way we can determine the new height. The new width can be determined in the same way:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://improve.ro/wp-content/uploads/2010/08/CodeCogsEqn-2.png&quot;&gt;&lt;img src=&quot;http://improve.ro/wp-content/uploads/2010/08/CodeCogsEqn-2.png&quot; title=&quot;Equation 3&quot; alt=&quot;Equation 3&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And here's a translation of this in JavaScript:&lt;/p&gt;

&lt;div&gt;
  &lt;pre&gt;
    &lt;code class='javascript'&gt;function getRotatedDimensions(width, height, rot) {
    // rotation angle in radians
    var alpha = rot * Math.PI / 180;
    // the angle made by the diagonal and the width in radians
    var beta = Math.atan(height / width);
    // diagonal length
    var diagonal = Math.sqrt(width * width + height * height);
    var newHeight = Math.sin(alpha + beta) * diagonal;
    var newWidth = Math.cos(beta - alpha) * diagonal;
    return { &amp;quot;width&amp;quot;: newWidth, &amp;quot;height&amp;quot;: newHeight };
}&lt;/code&gt;
  &lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;This was inspired by &lt;a href=&quot;https://beradrian.wordpress.com/&quot; title=&quot;Adrian Ber&quot;&gt;Adrian&lt;/a&gt;'s post about &lt;a href=&quot;https://beradrian.wordpress.com/2010/08/02/overlapping-rectangles/&quot; title=&quot;Overlapping Rectangles&quot;&gt;overlapping rectangles&lt;/a&gt;. The graphics above were generated with Photoshop and the formulas were built using the excellent &lt;a href=&quot;http://www.codecogs.com/latex/eqneditor.php&quot; title=&quot;Equation Editor&quot;&gt;CodeCogs online Equation Editor&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Weblogic Encoding Issue</title>
    <link href="http://improve.ro//2010/08/weblogic-encoding-issue/"/>
    <updated>2010-08-12T14:28:43+03:00</updated>
    <id>http://improve.ro//2010/08/weblogic-encoding-issue</id>
    <content type="html">&lt;p&gt;Trying to deploy some RSS feeds as .jspx views on a &lt;a href=&quot;http://en.wikipedia.org/wiki/Oracle_WebLogic_Server&quot; title=&quot;Oracle WebLogic&quot;&gt;WebLogic 10 server&lt;/a&gt;, I noticed that it mangled all UTF-8 output. This was part of a Spring MVC web-application. The problem was that on my local development server (Apache Tomcat 6.0) everything rendered fine, but on the WebLogic server all non-ANSI characters were not outputted correctly.&lt;/p&gt;

&lt;p&gt;In Firefox, I saw something like: &lt;code&gt;&amp;lt;summary&amp;gt;Formaci�n&amp;lt;/summary&amp;gt;&lt;/code&gt;. The byte sequence for the strange character was &lt;code&gt;0xEF 0xBF 0xBD&lt;/code&gt; and I seemed to get that for all UTF-8 chars that I was supposed to receive in the tests I was conducting (á, ó, í). I checked the content-type and encoding in Firebug and it seemed ok (&lt;code&gt;Content-Type: application/xhtml+xml; charset=UTF-8&lt;/code&gt;).I later found out that &lt;code&gt;�&lt;/code&gt; is the &lt;a href=&quot;http://www.fileformat.info/info/unicode/char/fffd/index.htm&quot;&gt;Unicode Replacement Character U+FFFD&lt;/a&gt; and that the problem was probably caused by the fact that the server, although told to output UTF-8, sent out ISO-8859-1.&lt;/p&gt;

&lt;!-- more --&gt;


&lt;p&gt;The fix came from my .jspx files, more specifically the page directive tag. What surprised me was the fact that the &lt;strong&gt;order of attributes&lt;/strong&gt; in the .jspx page directive matters! Initially I had this:&lt;/p&gt;

&lt;p&gt;``` xml&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;jsp:directive.page pageEncoding=&quot;utf-8&quot; contentType=&quot;application/xhtml+xml&quot; /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;This doesn't work, because you also need to specify the charset in the contentType attribute:&lt;/p&gt;

&lt;p&gt;``` xml&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;jsp:directive.page contentType=&quot;application/xhtml+xml; charset=UTF-8&quot; pageEncoding=&quot;UTF-8&quot; /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;The above line works and determines the correct encoding. But, to my surprise, if you switch the order of attributes &lt;strong&gt;it doesn't work:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;``` xml&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;jsp:directive.page pageEncoding=&quot;UTF-8&quot; contentType=&quot;application/xhtml+xml; charset=UTF-8&quot; /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;```&lt;/p&gt;

&lt;p&gt;I don't know where this is coming from, but, in my opinion it's a bug in WebLogic. I'll open a bug-report.You can also find details about this issue on my &lt;a href=&quot;http://stackoverflow.com/questions/3317711/encoding-errors-in-jspx&quot; title=&quot;StackOverflow: Encoding errors in .jspx&quot;&gt;Stackoverflow post&lt;/a&gt;. Thanks to &lt;a href=&quot;http://balusc.blogspot.com/&quot; title=&quot;The BalusC Code&quot;&gt;BalusC&lt;/a&gt; for the help.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Huawei and the VPN Saga</title>
    <link href="http://improve.ro//2010/07/huawei-and-the-vpn-saga/"/>
    <updated>2010-07-30T11:09:31+03:00</updated>
    <id>http://improve.ro//2010/07/huawei-and-the-vpn-saga</id>
    <content type="html">&lt;p&gt;After a horrendous experience, usually I feel the need to share my findings with the world. Other unhappy souls shouldn't go through what I've gone through yesterday.My company offers the possibility of working remotely, by connecting to its VPN. I have a USB dongle with my certificates and also a preinstalled software that manages the VPN connection. I travel fairly often to my hometown, Braşov. This week was no exception, I decided to work remotely for a couple of days.&lt;/p&gt;

&lt;p&gt;In Bucharest I have no issues connecting to the VPN from home, I've done it quite a few times. The first surprise came to me when I realized that, although I have the same ISP (&lt;a href=&quot;http://www.romtelecom.ro/personal/internet/&quot;&gt;Clicknet&lt;/a&gt;, Romanian DSL provider), in Braşov my VPN connection failed. Moreover, when I tried to connect to it, I'd lose internet connectivity for about a minute.  I first thought it's a port forwarding issue, although it seemed strange that an ISP would have different port forwarding policies in different cities. Also, I couldn't explain the connection loss. After being on the phone with &quot;technical&quot; support for about an hour, passed around by 4 or 5 people, trying to explain to most of them what VPN means, I finally got a straight answer from one of them: they aren't blocking any ports, anywhere. I took a closer look at the modem/router's behavior and then I noticed something. Whenever I tried to connect to the VPN, my router would reset (!) itself.&lt;/p&gt;

&lt;!-- more --&gt;


&lt;p&gt;I have a &lt;a href=&quot;http://www.huawei.com/products/terminal/products/view.do?id=121&quot;&gt;Huawei SmartAX MT882&lt;/a&gt; ADSL terminal supplied by the ISP. In Bucharest I have a Linksys wireless router with ADSL support bundled. I tried googling the problem for a while but finally I gave in and decided to buy a 3G modem, I was considering this option for some time now. I went to the &lt;a href=&quot;http://www.vodafone.ro/&quot;&gt;Vodafone&lt;/a&gt; store and got a mobile internet subscription. I received a Huawei K3765 HSPA USB Stick; I went home and installed it. The installation process was extremely smooth; the stick already has its software bundled in it and it's almost auto-installing. In a couple of minutes I was connected to the VPN and everything was working fine. After about six hours of continuous connectivity, the 3G modem decided to stop working, right before I was trying to do a server push. I thought that it had overheated or something (it was extremely hot), so I restarted my PC and left the modem to cool down for a few minutes. When I plugged it back in, Windows failed to recognize it, as did the Mobile Connect application. I spent the next couple of hours trying to sort this out. I uninstalled the Mobile Connect Software, removed the USB entries for the modem from the registry, removed it from the Windows modem list and from device manager, waiting for Windows to re-detect it. Guess what, it didn't. Googling wasn't much help, most of the questions we're on Vodafone forums and the their quality (as the quality of the responses) was poor to say the least. Also, I found that in some situations, the Vodafone experts' policy is to &quot;Hey , I've sent you a PM regarding this issue&quot;. WTF, you idiots! Other people have problems too and we're supposed to be living the age of ubiquitous information, not sending private messages on crappy forums. I then spent an enchanting half-hour on hold with Vodafone support. I just wanted to see if it's a common issue for the modems to stop working, I was hoping the issue was not coming from my computer. Support was useless, no surprise there, so I decided to go to a Vodafone shop so they could test my modem and eventually replace it with a working one. Sadly, I discovered that the issue was coming from my computer. They tried my modem on one of the laptops they had on display and it worked. I decided to go over to a friend's house to finish the updates I needed to finish. I also tested the modem on his computer and it also worked.&lt;/p&gt;

&lt;p&gt;When I came back home, later in the evening, I started thinking about what could be causing the problem, but I couldn't come up with any solution. My work-supplied laptop is running Windows XP and is bundled with tons of 'enterprise software' that make it run slower than PC's made in the early 2000's. Really. I'm not joking. I was so angry that I decided to purge my system of anything that I didn't need, regardless if it's &quot;policy&quot; or whatever.I started with the anti-virus software, McAfee Enterprise Suite. I never understood why anyone would need anti-virus software, assuming he's at least a bit computer savvy and doesn't download warez daily. It turns out that uninstalling McAfee is an adventure. I had to remove about three or four of their products from the Windows Add/Remove programs list. I couldn't remove the McAfee Agent, because it threw an &quot;in-use&quot; error when I tried to do that. If I restarted the system, the agent would reinstall what I'd previously removed. Swell. Eventually, I found out that the solution is to remove the McAfee common framework. It's located in Program Files/McAfee/Common Framework and you need to run: &lt;code&gt;frminst.exe /forceuninstall&lt;/code&gt;. After removing it, I ran their &lt;a href=&quot;http://service.mcafee.com/FAQDocument.aspx?id=TS100507&quot;&gt;Consumer Products Removal tool&lt;/a&gt; and after a reboot I was McAfee free. After removing the anti-virus, my 3G modem started working again. Damn.&lt;/p&gt;

&lt;p&gt;So, &quot;I've learned something today&quot; aka conclusions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Huawei, el-cheapo of networking devices, has a long way to go.&lt;/li&gt;
&lt;li&gt;McAffee is a piece of crap. I suspect all antivirus software is.&lt;/li&gt;
&lt;li&gt;I really, truly, hate Windows, Microsoft and the people that use the term 'enterprise' to hide incompetence.&lt;/li&gt;
&lt;li&gt;Technical support is mostly useless for advanced issues, so why pay for it? (read the last point again, too)&lt;/li&gt;
&lt;li&gt;I want a Mac :).&lt;/li&gt;
&lt;/ul&gt;

</content>
  </entry>
  
</feed>

