Moving to VoIP with voip.ms

So a few weeks ago Rogers sent a letter saying that my Internet and Home Phone services were going up $2 per month beginning in March.  Not a huge increase, but then it made me realize I’d be paying nearly $50 a month for my landline, which I don’t use all that much (and I use the prepaid cellphone even less).  I looked into possibly replacing both the landline and the prepaid cellphone by a smartphone with some “decent” plan (and coverage, for when I visit family), but no one company had anything that really satisfied me (Koodo Mobile was the closest).  That was still a rather expensive proposition for something I knew I wouldn’t use all that much (and I’m not interested in becoming one of those cyberzombies that walk around head down, their eyes glued to their smartphone).

I decided to take a second look at VoIP.  That’s a technology I’ve been staying away from because I wasn’t too keen on relying on the Internet connection being up all the time. But then again, in nearly six years I don’t think my connection has been down six hours – not while I was at home anyway.  Also my nephew has a MagicJack, which is probably as simple as it gets as far as VoIP goes – just plug it into a computer’s USB port.  I don’t like the sound quality when I talk to him over that line, but reading various comments on VoIP forums, it seems like it could be an issue with his Internet connection – he does live in a “rural” area and maybe that connection just doesn’t have the speed that we get in the city.

So I started doing some extensive research on the various services.  A lot of the big ones such as Vonage and Primus charge quite a bit for VoIP – say around $30/month (this varies).  Some lesser-known services could be as low as $9.95 assuming you pay for a year in advance, but the reviews weren’t so great.  That’s when I started running into “pay-as-you-go” VoIP providers and realized this was probably the best alternative for a light phone user like me.

I ended up choosing voip.ms, a company based in Montreal and has been around for almost four years (which is rather long in the VoIP world). Some of the reasons for choosing them were that they were one of very few VoIP providers that had overwhelmingly positive reviews over at DSLReports.com, that they are based in Canada (though they charge in U.S. dollars, like most of the smaller guys), the feature set is also quite extensive – way too much to discuss here. This is also a “Bring Your Own Device” provider in that you don’t/can’t buy the hardware from them (unlike guys like Vonage and MagicJack, etc who force you to use their locked-in hardware), so I was free to buy the VoIP ATA of my choosing. And of course the prices are pretty good: $0.99/month for the phone number, $1.50/month for e911, and then after that it’s only the minutes I use. Depending on various factors (incoming, outgoing, value vs. premium routing), the price goes from about half a cent per minute to a little over a cent. Assuming you have to pay about a cent a minute, that’s roughly $10 for 1000 minutes. I normally don’t go anywhere near that. So I estimate that my monthly cost will go down to anywhere between $4 and $6, depending on how chatty I get on a given month. ;)

I first signed up on the service – for free – and ran an echo test using a softphone. The quality was crystal clear. The next day I went out and bought a Cisco Linksys PAP2T-NA ATA. 45 minutes later I was making my first phone call, and that includes upgrading the firmware, fishing for that extra phone I knew I had somewhere, and adding funds to my voip.ms account.

A week later, after testing it for a few days, I requested a port of my existing phone number. This took a week (normal delay – this can take up to four weeks if whatever company currently “owns” your phone number decides to take its time). The day of the port the phone was down for a few hours while it was being transferred between providers. Later in the day I cancelled my Home Phone with Rogers (thank you Rogers for not annoying me with the “30 day service cancellation notice”), which brought my monthly Rogers bill down by nearly half. That’s a significant amount of cash.

voip.ms is a more “techie-oriented” provider (at the moment anyway – they’re working on making things more user-friendly) than guys like Vonage or Primus, though quite frankly, with the PAP2T setup instructions on their wiki, all I had to do was follow the instructions to the letter and everything worked right away. So even though I found all the terminology and options intimidating at first, I could almost have done set this up with my eyes closed.

Obviously I can’t guarantee – and I am not saying – that voip.ms is the best VoIP provider out there. I haven’t had any experience with the other providers. But between the ease of getting things running and not having to wait for some hardware in the mail, the pricing and features, this is an excellent deal. I’ve had to contact their support a few times, not for problems but for questions and clarifications, and I always got a reply back very quickly even when I set the ticket priority to “Low”. I even got a few replies after their official technical support hours on a Saturday. And of course so far the call quality has been excellent; the persons I talked to said it sounded the same or even better than my landline. So now I can save money to cover for whatever else will be going up in price. :)

Posted in Uncategorized | Leave a comment

Visual Studio 2010 a year later

So last April I posted about how much the default help system in Visual Studio 2010 sucks.  I mentioned H3Viewer as an alternative, but back then it wasn’t all that great.  It has improved a lot since and has become a very viable alternative.  Check it out @ http://mshcmigrate.helpmvp.com/viewer

I only started using VS2010 seriously last December when we converted our project to it (and .NET 4.0) at work.  Since we like pain, we also upgrade from CSLA 3.0 to CSLA 4.1, which is no mean feat.  But at least now the technology is more future-proof… For 6 months or so. :)   I was hoping for some speed improvements in VS2010, but unfortunately it’s at least as slow as 2008, and slower in some areas.  Still, there are enough usability improvements to make up for it – including the ability to make floating editor windows and a some good improvements in the editor.  There’s also an impressive amount of third-party add-ons, most of them free, that make the beast even more powerful.  I’ll post about a few of my favorites soon…  Anyway, like most software out there, I’ve barely touched the surface.

But a few minutes ago I said I was going to learn Python, so how about I stop typing and go do just that. ;)

Posted in Visual Studio 2010 | Leave a comment

So… I don’t like snakes…

…But I’ve been hearing people rave about Python for a while, so I’ve decide to give it a try and see what all the fuss is about.  I just put a good introductory book on my Kindle DX.  Time to sit down and check out the basic stuff and then start having some fun.  Or not. :)

Posted in Uncategorized | Leave a comment

The help system in Visual Studio 2010 sucks!

I finally got a chance to play a little bit with Visual Studio 2010 while I was setting up the Mercurial source control system on my PC, and while I found a few cool improvements in the user interface, I was disgusted by how useless the help system has become.  What were they thinking at Microsoft?  The help system uses the default browser (in my case Firefox – you’ll never pay me enough to use IE), and gone are things such as the very useful index feature.  All you get is a Search feature that returns everything and nothing, without any hint as to where it was found.  Try searching for something that’s in multiple namespaces and/or languages.  Horrible!  Also it opens a new tab in the browser every time I press F1.  Wow…  They could at least have used VS2010′s internal browser – after all if you paste the help URL in there, it’s able to display it.

Apparently this will be fixed in SP1.  Hey, that’s not any time soon!  There are a couple of alternatives that aren’t quite up to the challenge, but may help fill the gap in the meantime:

H3Viewer: http://mshcmigrate.helpmvp.com/viewer

HelpViewerKeywordIndex: http://visualstudiogallery.msdn.microsoft.com/en-US/4af86641-a302-4edf-9853-007bcc670b30

Both are kind of slow and do not seem to work with context-sensitive help (if they do, I haven’t found how yet.)  Even with their drawbacks, they seem more useful than the abomination Microsoft delivered to us.  The Visual Studio help system started going down the drain with Visual Studio 2005 (it was great in 2003), but the 2010 system has to be a joke.  Maybe they originally planned for an April 1 release…

Posted in Visual Studio 2010 | Leave a comment

Visualizing GUIDs in the Visual Studio 2008 debugger

The application I’m currently developing at work makes extensive use of GUIDs.  If you’ve debugged Visual BASIC code in Visual Studio, you’ve probably noticed that it doesn’t display GUID values when watching a variables:

VS 2008 Watch Window showing a GUID as empty

Not very useful, is it?  I’ve heard that GUIDs display fine when debugging C#, but I haven’t tried (I’m lazy.)

A few weeks ago I ran into a blog that explained how to write a very basic visualizer to address this problem. Unfortunately I didn’t keep the link and have yet to remember the search text I used to get there – so somewhere somebody is not getting due credit for this post.  I’m pretty sure it was on a Microsoft blog.  Either way, I’ll update this post if I ever find it again – for now, let it just be known that I did not come up with this technique by myself. ;)

Writing the Visualizer

  1. To create the visualizer, create a new Visual BASIC Class Library and call it “GuidVisualizer” (or whatever name you prefer.)
  2. Replace the generated class declaration with this code:
    <Assembly: DebuggerDisplay("{ToString}", Target:=GetType(Guid))>
    Public Class GuidVisualizer
    
    End Class
    
  3. Compile the library

Copy and try the Visualizer DLL

  1. Copy the generated DLL to My Documents\Visual Studio 2008\Visualizers
  2. Start Visual Studio 2008.  Using the sample example as above, the GUID is now displayedGUID displayed correctly in the VS 2008 watch window

The watch window still obsesses on the “empty” if you keep expanding the value, but at least now you can see the real value.

Posted in Visual Studio 2008 | 1 Comment

GUIDs in Oracle

We’re starting a new project at work and we’ve decided to use GUIDs as unique identifiers in the tables.  Now, if your database server is SQL Server, this is no big deal: You simply choose the uniqueidentifier column type and you’re in business.  You can read and write that from .NET, use it in ad hoc SELECT statements, etc…

Oracle GUIDs don’t have much to do with the ones from Microsoft software, so let’s not go there.  I started looking for a solution on the Internet and boy, did I see just about every possible solution out there, including storing it as a 37 character string.  Call me crazy, but I wasn’t about to use this as a primary key.

Eventually I found a short post in a lengthy discussion, almost missed it actually, and the solution couldn’t have been simpler.  So here it is.  In this article I’ll explain how to use .NET GUIDs with Oracle, with a few short code samples.  Hopefully it’ll result in some people not wasting as much time on this as I did.

Oracle Data Type for GUIDs

There is no GUID or uniqueidentifier type in Oracle, so what do you use to store a .NET GUID? (If you don’t want to store it as a string, that is.)  A .NET GUID can be passed to Oracle as a 16-byte byte array, so the most efficient (at least I think so) data type is RAW(16).

Writing and reading GUIDs from .NET

You’ll have to convert your .NET GUID to pass it to Oracle.  This is simple, since the GUID class has a ToByteArray method.  This is some Visual BASIC sample code that creates a new GUID and puts it in an outbound parameter – in this example I use the syntax from the Oracle .NET Data Provider, but I’ve also done this using the Microsoft .NET Provider for Oracle, the Microsoft ODBC driver for Oracle, and Oracle’s own ODBC provider.

‘ Create a new GUID
Dim newguid As Guid = Guid.NewGuid

‘ Parameter settings
Dim empid As OracleParameter = _
cmd.Parameters.Add (“in_empid”, OracleDbType.Raw)
empid.Direction = ParameterDirection.Input
empid.Value = newguid.ToByteArray

Pretty simple, isn’t it?  Of course, if you look at the result in the Oracle table, it won’t look like a GUID, but just a string of bytes – the content of the byte array. You can SELECT on that value by enclosing the content of the RAW(16) field in single quotes (a string), and using the HEXTORAW() function.  That’s almost as good as selecting a GUID in SQL Server. :)

Reading the GUID back into .NET is quite straightforward as well.  In the code below, dr is a DataReader, and the GUID is the first value returned in the row (hence the reference to the 0 index in GetOracleBinary).  The code displays the GUID on the console:

Console.WriteLine(“GUID read from Oracle table: ” & _
New Guid(CType(dr.GetOracleBinary(0), _
Byte())).ToString)

A little bit cramped, but here’s what’s going on:

  1. We get the content of the RAW(16) field using GetOracleBinary
  2. We cast the value to a Byte array
  3. We create a new GUID object from that Byte array

That’s all there is to it!

Posted in .NET Databases | 1 Comment