Sunday, October 18, 2015

I'm moving blogging platforms!

I've gotten a few emails asking why I've been so quiet on this blog lately. It often goes months without me posting anything and I've decided that it's time to move. For some reason, Blogger simply isn't cutting it for me anymore and I'd like to consolidate everything in one place.

Facebook is putting a lot of energy into revitalizing their "Notes" application and I really like where they're going with it. So, as of today, I'm going to blog there. All of my notes will be public so you won't need a Facebook account to read them and it will be a pretty frictionless translation. I'll leave this page up until December 1, 2015, then I'm going to redirect www.cajuntechie.com to www.facebook.com/cajuntechie/notes. You don't need to update your bookmarks or anything like that, it will just happen on December 1. Until then, you can visit www.facebook.com/cajuntechie/notes for my latest blogs.

Friday, August 21, 2015

Python on Big Iron: A Challenge for the Future

Python is a fantastic language. It can do just about anything you need, it allows you to write code in a manner that's comfortable for you, and it stays out of your way as much as possible. Over the last few years, I've found myself turning to Python more and more instead of 'traditional' languages like C++, C#, or Java. Python allows me to be more productive than most of these languages, is cross-platforn, and, on modern hardware, it's usually 'fast enough'.

One place where Python falls down hard, however, is on so-called 'Big Iron'. I'm talking about those massively powerful computers used in various industries like the financial, medical, entertainment, and others that require solid, reliable, scalable performance. Mainframes.

While we usually don't think about it, mainframes are still heavily in use around the world. Chances are pretty good that you interact with these beasts every single day and someone is writing code for every single application that runs on them. Unfortunately, that code is not being written in Python. It's written in a variety of other languages like Java, C++, and COBOL, but it's not, almost ever, Python.

Python support on modern mainframes is abysmally shameful. The last time I looked at doing a mainframe project, the latest version of Python I could find was 2.4.1. That's old. Like 2006 old. There's a lot of talk about bringing 2.7 and even the 3.x branches of the language to the IBM mainframe, nobody seems to be making any moves to actually do that (and I'm looking squarely at you, IBM).

Don't get me wrong, I understand that mainframe development is pretty niche. But it's still another mountain that I believe Python should climb and could shine on. It's time our community understands that there's a lot of code being written for the mainframe and we're losing that battle. The mainframe isn't going away anytime soon. In fact, IBM has seen an uptake in sales of its z-Series and OS/390 systems and, as data becomes more and more complex, I suspect the need for large systems is going to increase.

With all the complexity the mainframe brings, opening development to potentially millions of developers by supporting a modern version of Python would benefit both the language itelf and the mainframe vendors themselves. It's an awesome opportunity that I truly hope that both communities focus on in the very near future.

Monday, August 10, 2015

Living the SIP Life: Making and Receiving Calls on the Cheap

Phone bills are crazy these days.  In an industry that hasn't evolved much over the last 20 years, those of us who choose to use traditional telephones (both landline and mobile) are used to paying hundreds and sometimes thousands of dollars a month just to communicate with our customers or our friends. Calling is a huge profit centers for telecommunications providers and an industry where, unfortunately, the consumer often loses.

About a year ago, I decided to try to find a way to lower my phone bill. While I wasn't paying what I thought was a huge amount compared to some of the bills I've seen, I still wanted to see exactly how far I could drive down my costs and still have fairly reliable phone service. For my needs, I don't need to always have phone service but I needed it to be reliable enough to where I didn't have to be paranoid about being stranded somewhere without a way to call for help. My requirements were pretty simple and I felt sure that I could get what I needed easily and for a lot less than I was paying at the time.

For several years, I've played with voice-over-IP calling from my desktop computer using Skype. Voice-over-IP basically uses the Internet to make your calls instead of the traditional telephone network. It allows you to call other people on their PC's, usually for free, and place calls to regular telephone numbers at a reduced cost. It also brings a whole host of features that generally aren't readily available on regular phones like call recording, high quality wideband sound, and the ability to easily control how calls to you are routed. Additionally, if you're making calls to another VoIP user instead of a telephone, you can often enjoy enhanced privacy through the use of strong encryption. All of those features are things that are important to me so I decided to give VoIP a serious try about a year ago,

MY OPTIONS

As you might have already noticed, there are several ways to do VoIP calling. Each of them have their advantages and disadvantages so the first thing I had to do was to decide which route I wanted to go:


SKYPE

My first option was simply to remain with the VoIP system I'd already been using for a few years: Skype. Skype provided very good audio quality, cheap calls, and the ability to call both regular phone numbers for a cheap fee and other Skype users for free. What Skype did not offer was virtually any control over the actual call itself. I couldn't route the call around based on different criteria, I couldn't block certain numbers or forward only certain numbers and, perhaps worst of all, Skype provided no real security for my calls. Yes, they offered casual call encryption but, as we learned from Edward Snowden, that encryption was pretty porous, and could be gotten around. While I'm not exactly exchanging government secrets, I still don't want anyone who isn't part of the call to be able to listen to my call so that, along with other things, quickly made Skype a no-go.


Google Voice / Hangouts

For the last few years, I'd used Google Voice to make calls and receive texts pretty regularly. The service offered a pretty sweet deal: free calling to all of North America, a free incoming phone number, the ability to block and record calls, and call routing options all for free. The trade off?  I would still be feeding data into the Google data pig and the call quality wasn't all that great. Google Voice and Hangouts came very close to the solution I wanted, but didn't quite go all the way. It's still a solution I might recommend to someone completely new to VoIP, just like Skype, but it wasn't right for me. Plus, Google Voice still used my mobile minutes so it wouldn't really help me reduce my bill*.

SIP

SIP has been around for a while and is widely used in the business world. Much like Skype, Google Voice, and other solutions, SIP allows you to do the basics: make and receive calls, send text messages,etc. But the cool thing about SIP is that it is a 'build your perfect solution' type of thing. While I'd deployed SIP solutions for clients in the past, I'd never really used to or even considered it for my own needs.

SIP is a little more complicated than the other solution I'd tried but still not out of reach to normal, non-tech people. The complexity of SIP often comes from the 'roll your own' nature of the solution. When you use Google Voice or Skype or many other calling solutions, the service kind of works like your old phone service: one company provides you both a phone number to receive calls on and handles all of your outbound calls. You really don't get a choice. You can't really tell AT&T, for example, that you want a phone number from them but you'll do your outbound local calling through Sprint.

SIP allows you you to do that.  While you can use one company to handle everything, you don't have to do that. For example, you can go to one company and get an inbound phone number and choose a totally different and unrelated company to handle outbound calling. While it's more complicated, doing it this way has the advantage of not being locked in. For example, if your outbound provider announces a rate hike, you can take your business to another provider who's cheaper and be up and running in a matter of minutes. The same is true with your inbound calls. If your inbound network has a lot of problems, it's trivial to port your number to just about anyone else and leave that provider behind.

Another great thing about SIP is that you're also not bound to a program. If you use Skype, for example, you have to use the Skype program to make Skype calls or receive them. The same is true with Google Hangouts. But with SIP, there are hundreds of programs to choose from. Because SIP is an open standard, anyone can write a compatible program (called a softphone) and make it available to you. You don't even have to use a program at all, in fact. You can purchase inexpensive devices (think: $10) that allow you to connect a regular phone to the Internet and make your SIP calls that way. You can even mix and match. For example, I have a traditional phone connected to my SIP account. But I also have software running on my phone that's also connected to that account. So when someone calls my number, both the phone on my desk rings but so do my mobile phone and tablet. This allows me to answer the call no matter where I am and makes doing that kind of thing amazingly easy.

Of course, we should also talk about features. This is largely provider specific but I chose a provider (Callcentric) that gave me all the call handling options I need. I'm able to route calls to different place based on the number that's calling me, the number they are calling, ,the time of day it is, and a host of other criteria that really allow me to control my calls with a granularity that the traditional phone system would never offer.  Of course, SIP also allows me to call not only phone numbers for a small fee, but other SIP users anywhere in the world on any system (not just Callcentric). That, to me, makes the perfect solution and that's the one I went with. To me, it's heads and tails over Skype, Google Hangouts, and the competition.

MAKING CALLS AND OTHER FEATURES

My next decision came with choosing the company or companies I wanted to use to provide my inbound phone number and my outbound calling. The SIP landscape is literally littered with providers of these services; there are hundreds to choose from all over the world. In the end, I narrowed my choices to three that I think provide the best and most reliable service. Additionally, all three of these service can provide an entire solution (both an inbound phone number in almost any country and outbound, worldwide, calling).

1. VoIP.MS

Voip.MS is a long time provider of SIP services. They've been in the game for a few years and they have a reasonably priced service with good options. They can provide you with a phone number and the ability to call out worldwide and they even allow you to send SMS messages to mobile phone users worldwide. Overall, a pretty decent service that comes highly recommended.

2. Localphone.com

Localphone is a UK based company that offers really basic service: an inbound phone number, outbound calling, and voicemail. That's about it. You can't control a lot about the calls themselves, you can't really route based on a lot of criteria, and their support is often lacking. Their outbound rates are amazing though. For $5 USD a month, you can get 5,000 outbound minutes to the US and Canada. Not a bad deal at all. Unfortunately, because of the problems with tech support, the inability to call PC-to-PC to other SIP users, and a few other things, I don't quite recommend this service as highly as I do the others. If you're looking for a budget deal and don't need a lot of features and tech support though, this might be the service for you.


3. Callcentric.com

Callcentric is a business class VoIP provider. What I mean is that you can reliably set up a business on Callcentric VoIP and never worry about it again. They have a ton of features, great call routing options, voicemail, inbound and outbound calling, the ability to have up to 100 extensions all routed to different places, and even an IVR (the "for accounting, press 1" type of thing). While this might sound like they wouldn't be very useful to a home user, the features can really come in handy sometimes and home users are definitely encouraged to use it.

After narrowing it down to these three providers, I decided to 'roll my own'. No single provider offered everything I wanted (Callcentric came very close but their rates for outbound calling were a little higher than I wanted to pay). In the end, I chose Callcentric for my inbound calling (they provide my phone number and handle all of my call routing) and Voip.MS for my outbound calling (their rates are a penny a minute. I could have gotten cheaper outbound calling. For example, a company called Flowroute offers calling at a tenth of a penny a minute (worth checking out) but, for various reasons (none technical) I chose not to go with them. You might want to though. They are cheap, and rock solid.

With actual call handling done, the last piece of the puzzle was choosing how I was actually going to make and receive calls. That wasn't a difficult choice at all.

  • I needed to be able to make and receive calls on my mobile devices (phone and tablet) when I was not at my computer.
  • I needed to be able to take calls on my computer when I was sitting in front of it.
  • I needed to be able to take calls on a traditional desktop phone I could buy at Walmart or Best Buy.
For mobile calling I tried out a few programs. I use Android devices so I had a lot of choices int he Google Play Store. In the end, I narrowed it down to two of the best: CSipSimple, which was an open source program that had a lot of features and Zoiper, a proprietary software that had even more features and better support.

After trying both for a while, I settled on Zoiper. It's a good program supports encryption, and has a lot of features I like.

I also chose Zoiper for my computer as it works on Windows, Linux, and Mac, (as well as Android and iOS). It was a no brainer. There are a lot of other options for the desktop though so you might want to search out sip desktop programs on Google and try a few before making your final decision.

Lastly for my regular desktop phone needs, I bought a cheap ATA (analog telephone adapter) from Amazon that allowed me to just plug my phone in, answer a few questions (like username and password) and be up and running.  It was cheap, easy to install, and just works.

RESULTS

It's been a little over  year since my experiment began and, I have to say, I'm rather pleased. my total phone bill now is less than $50 a month and I talk a lot. I can take and make calls wherever I am and I have a single phone number for people to reach me.  There have been a few hiccups along the way such as my inbound or outbound provider being down for a few minutes every no and then but, overall, it's been a pretty nice experience.

Will I stick with it? Absolutely. In fact, I'm now looking for  data-only plan so I can get rid of voice costs from my mobile provider altogether. For me, SIP has turned into a great experience with amazing cost savings.

I definitely recommend it. 

Thursday, June 18, 2015

Why we should trust Apple with our data

Earlier this month, Edward Snowden wrote an op-ed piece for the New York Times where he discussed how the world has widely rejected surveillance and how both companies and consumers are starting to understand why privacy matters. People found it interesting that the only company he mentioned by name as trustable was Apple and a lot of folks are wondering how on earth he could trust a company that produces products you can't see exactly what they're doing in your computer or device. Wouldn't it be better to use something like Linux?

I think I understand why he trusts Apple and why they might be as trustable as your friendly Linux distro maker. It comes down to money and reputation.

Unlike companies like Google, Apple's primary goal is to sell you devices and software. They don't care about your data because they aren't really set up in a way that would allow them to monetize it effectively. Everything they do is an effort to increase marketshare and drive more people to use their products. Make no mistake: Apple doesn't particularly care about privacy, not in any meaningful way. But they care about money and selling privacy as a feature, being the only platform that focuses on privacy, it's an awful good way to make more money. People want it and people are willing to pay for it.

Looking at it that way, Apple would be suicidal to push privacy as a feature and still sell us out secretly. The moment that behavior would become public knowledge, there would be absolute hell to pay. Any new customers they get from their huge privacy push would be lost in a few days. More than that, nobody would ever trust them again after such a betrayal.

Overall, I'm starting to trust Apple to get privacy right. They're smart marketers and smart engineers. They are in this fight to win and winning is defined by money and customers. I see no reason not to trust that they will do whatever it takes to get more of both. Privacy is the new hotness.

Monday, May 11, 2015

Why would anyone use Windows on a Raspberry Pi?

For the last few weeks, I've been trying to come up with a reason why anyone would want to use Microsoft Windows for projects on the Raspberry Pi 2. I can't. In fact, the more I think about it, the more it seems like this is just another 'us too' move by Microsoft.

Think about it: you're not going to run the full desktop version of Windows 10 on the Pi. It's simply not powerful enough to do that and have any kind of usable system. That means you're likely going to have to run a command line version of Windows and, really, for the most part, Windows users are terrified of the command line. That alone is going to knock out a good segment of potential users.

Next, let's look at the tinkerers. Those people are generally not afraid to get their hands dirty and mess with the underlying OS, including using the command line. Those people are likely not using Windows for their current projects because it lacks the one thing they crave: control. They're using Linux.

Once upon a time, one could make the argument that the benefit of using Windows on these type projects might be having the ability to code in C#. With the open sourcing of the core .NET framework and the progress open source projects like Mono have made, that's not compelling. Plus, let's be honest, even if you couldn't use .NET, any programmer who's learned C# or any other major programming language could pick up enough Python in a weekend to do most or all of their Pi based project.

No, there just isn't a single reason I can think of to use Windows on the Pi instead of Linux. Microsoft would be better off giving up on Windows on the Pi and focus on making some really compelling add-ons for the device. Like, maybe, bring Kinect to it? Now that would be useful.

Tuesday, March 17, 2015

Defending PHP

Yesterday, the developers of the ownCloud project posted a great blog entry explaining why ownCloud chooses to use PHP instead of one of the 'sexier' languages like Ruby on Rails or Node. Overall, I agree with their defense. There's nothing particularly wrong with PHP, despite what we keep being told by the independent developer elite. Sure, PHP has its quirks and it's got it's fair share of 'gotcha' issues that can bite an unfamiliar developer in the ass, but so does every language including the darlings of Internet development.
language like Ruby on Rails or Node. Overall, I agree with their defense. There's nothing particularly

Bad code isn't produced by programming languages. Bad code is produced by bad programmers. I've seen some absolute monstrosities written in Java, C#, Python, and dozens of other languages by developers who never really took the time to learn their tool because they were too busy chasing the hot new language on the block. Likewise, I've seen some amazingly elegant code written in PHP, written by developers who'd taken the time to learn the language and stick with it instead of jumping around when the elite of the development world start saying their language isn't cool anymore. Those developers get a cursory glance (maybe work through a book in a weekend) and never cozy up to the language to learn its curves.

I'm not saying PHP is perfect - it's certainly not. But no language is perfect. If you talk to any serious developer they can likely name a dozen annoyances about whatever their language of choice is. They keep using that language because they've taken the time to learn it. They know what to expect from the language and have embraced it. PHP developers, the good ones anyway, have done the same.

Want to stop writing bad and kludgey PHP code? Stop being a bad programmer. Take time to learn the language, massage its warts, and embrace its differences. You'd be surprised how much more productive you'll be and how much more elegant your code will become.

Saturday, February 14, 2015

Dear Mr. President: Let's talk about data encryption and the right to privacy

Dear President Obama,

In a recent speech, you said you wanted an open, public, discussion about data encryption. Great! Open, public, discussions between the citizenry and our elected officials are always interesting and useful so let's start to have that discussion. Right now, right here, just you and me.

Mr. President, you're a fairly young man who, I assume, isn't particularly savvy with advanced technology. That's not meant to be a disparaging comment, not all of us are. Some people are good with tech, others fill different roles and don't need to be good with tech. You fall into the latter category. But I bring this fact up because, not being a tech-centric guy, you likely don't remember the 'crypto-wars' of the 1990's. They were a brutal time when the government, much like this government, thought that all manner of crime would run rampant if they didn't have access to secret, encrypted, communications.

The government at the time tried various ways to protect itself from 'the bad guys' having encryption. They tried to say it was a weapon and could not be exported outside of the United States, they tried to convince people to store a copy of their encryption keys with the government 'just in case', and none of that worked. Ultimately, the Clinton administration gave up and encryption became the widespread beast it is today.

You know the weird thing, Mr. President? Online crime didn't skyrocket like the FBI and NSA had predicted, the government didn't 'go dark' where it couldn't enforce laws and catch bad guys. Sure, some bad guys might have used encryption and gone uncaught because of it, but the vast majority of them just didn't care. Most criminals just aren't that smart.

Today, many in our government are making the same arguments that were made in the 1990's. The same claims about law enforcement 'going dark' are being bandied about and the same players are the ones saying it.  Except now they're using scarier words like 'terrorism' and 'protecting the homeland from attack' and 'ISIS'. But the fact of the matter, Mr. Obama, is that criminals still aren't that smart. The vast majority of bad guys still aren't using encryption - or at least aren't using it properly so, really, law enforcement isn't particularly that locked out.

You've recently started talking about how the creators of security and encryption software should build in secret back doors that "only the government" can access when there is a "compelling need". This was actually one of the arguments the government made in the 1990's and here is why that doesn't work (please read this next statement carefully):

There is no way to build a government back door that only the government can access. Once the backdoor is there, it's open to anyone who knows it exist and knows how to open it.

This will include Russia.
This will include China.
This will include run-of-the-mill hackers

Everything that is wrong with the 'let's install a government backdoor' argument can be summed up in the statements above and anyone who knows anything about security knows that the above statement is true.

Now, sir, I understand that you will have some of the best and brightest minds in the industry working to carefully design these theoretical back doors that only the government can access. But, I have to ask, where will you get these mental giants? Will you look to private industry who, by the governments own claims, have lost billions if not trillions of dollars in security breaches involving their systems in the last year alone? If they can't design systems that are secure to protect themselves, how will they protect our secrets when they work for you?

Unfortunately, as you know, government IT isn't the answer either as only a few short years ago the Anonymous collective laid many agencies secrets open to the public and a single contractor was, only two years ago, able to walk out of what is arguably one of the most secure places on earth with over 50,000 documents.

Mr. President, I think it's time you realize what your predecessors eventually did: certain communication will always and should always be locked away from government eyes. A 'pressing need' because of some spectre of fear doesn't justify giving an arguably already overreaching government the power to spy into all our lives, innocent or not.  Our right to privacy can and does extend to corners the government can't see. While this may place certain people in uncomfortable positions and cause some 'darkness', such is the price we pay for freedom.

Will bad guys slip through the cracks? Yes.
Will encryption sometimes bring an investigation to a halt? Yes.

But even with those things being true, our rights stand. Rights are not secured or laid aside by convenience.

So what is the answer then? I would put forth that there is nothing wrong with continued, good-old-fashioned police work. The FBI and NSA have proven that they have a remarkable ability to coordinate investigations into crime using all of the data - and that's still most of the data flowing over the Internet- that isn't encrypted. The FBI still has the ability to break tough cases and obtain convictions even with encryption in place and getting better.  Training is the answer. Better, more technologically focused training. It's as simple as that.   

Mr. President, you are being presented with two opportunities here - two different roads as it were. On one side, you have the ability to stand with the American people and reaffirm the rights that you swore an oath to uphold - without conditions or convenience. On the other, you have the siren call of convenience, increased power, and an ever data hungry intelligence community.

Stop for a moment, take a deep breath, and think about the world you want to live in for the next 50 years, the world you want your wife and daughters to live in. Do you believe they might have things they don't want someone in Washington to know about? Should all of their secrets be laid bare because someone deems it convenient or have a 'compelling reason'?  Do you believe you and your family would be spared from such intrusion? I'd argue that you would be a valid target in some people eyes for it because you were President and 'you know things'. Is that the life you want?

It's certainly not the life I want for you either. I want a world where you can have secrets and you can have privacy. Where everything you say and do isn't subject to the microscope of data analysis. Where your daughters can make inappropriate jokes to their friends and not have to worry that those jokes will come back to haunt them 20 years later.  Maybe even where you could write a saucy love note to your wife and not worry that someone might read it. Nothing to hide, but still private.

I want that for you, Mr. Obama because you as an American - as a human being - deserve that privacy. But so does everyone else. Stand with the American people sir and be the champion we believe you can be. Stand with us as we asset our rights to privacy without conditions, without back doors. You are an American.

Tuesday, February 10, 2015

Google Talk is shutting down. Don't like Hangouts? Here's the solution!

In less than a week, Google will be shutting down its popular instant messaging service called Google Talk. Google Talk was Google's first attempt at building chat services right into your email but they also provided mobile and desktop clients too. Best of all, because they used XMPP (Jabber) on the back end, you weren't limited to talking to only other Google Talk users, you could chat with any user on any system that used XMPP.

Over the last year or two, Google has slowly rolled out its new "Hangouts" application. The idea behind Hangouts is simple: you have the ability to have a continuous conversation that includes pictures, video, and text, with the ability to move between multiple devices during conversations and pick up where you left off. It's a fairly decent system once you get used to it but not everyone needs "continuous conversation" and many people have contacts that aren't Google users. Unfortunately, because Hangouts is its own entity, it does not integrate with other systems. If you want to chat with someone using Hangouts, they have to use Hangouts too.

Thankfully, the same technology that Google is ditching for Hangouts, XMPP, is still widely used and readily available for anyone who might not want to use Hangouts or be too happy about Google's walled-garden approach to chat. A great XMPP server can be set up in less than 30 minutes and for about $5 a month. Best of all, you're not limited to who you can talk to and can chat to your hearts content with anyone on the planet who uses a Jabber service (unfortunately, this no longer includes Google users).

Here is what you will need:

- A $5/month VPS account with DigitalOcean (or a server of your own, if you have it)
- The Prosody XMPP server
- This tutorial
- A domain or subdomain for your server (not stricly required but useful)
- Each user will need a chat program. I recommend Jitsi but there are MANY.

For security, you probably also want to grab an SSL certificate for your service. You can get that from your favorite SSL provider (I recommend NameCheap).

Once you've gotten everything you need together, setting up Prosody is really a 20 minute or less job. Following the tutorial linked above, you'll be up and running and ready to accept user registrations in minutes with a fully secure and rock solid server. Best of all, your conversations truly are private and nothing goes to Google.

A discussion about chat programs:

Many people who've used Google Talk have used third-party tools like Trillian or Miranda to access their accounts. Accessing your new XMPP server is no different. Any chat program that supports XMPP (sometimes called Jabber) will work with your new server. I recommend Jitsi because it offers features such as fully encrypted text, video, and audio chat, that make keeping your conversations secure a breeze. But, really, in the end, the choice is yours. Try out a few programs (Miranda and Trillian should still work too) and see which best suites your organizations needs.

That's it! That wasn't too hard was it? Of course, there's a myriad of things you could do with your new XMPP server if you wanted to but there's nothing saying you can't just use it for awesome and secure chat with friend, coworkers, and family.  If you have any questions, or need help, don't hesitate to contact me and I'll lend a hand if I can.

Until next time!