Connecting to a Cisco VPN with OpenConnect on a Chromebook without Crouton

Chromebooks are an affordable alternative to Windows and Apple products

I have been looking at a Toshiba Chromebook 2 with Full HD screen for the last few months. The $300 price tag, my dying home laptop, and the good reviews convinced me to finally take the plunge and purchase it as a laptop for home use.

If you, like myself, have a Cisco VPN at work, you might find out that you can’t connect the Chromebook to your VPN. From what our network engineer found out it’s basically just some XAUTH mismatch. If you
don’t know what that is, the basic take away is - you can’t connect without having additional software, OpenConnect. But how to run it in a Chromebook?

Read More

Premature optimization

In my many years as a software developer, this is one phrase which I have heard over and over:

"Don't optimize your software prematurely."

I have no idea where the phrase came from. I know that most software is shit because people don't know any better. And generalities like this encourage people to write bad software. I will try to list a few things that I think make up a good developer culture.

Read More

Outlook 2010 + GMail IMAP

I was loosing my shit over the last few days where I tried to track down an encoding issue in the emails being sent out for a client. The problematic client was Outlook 2010. If the email was sent to the exchange account, the contents were just fine, displaying the special UTF-8 characters. If it was sent to GMail, it was also fine in the browser. But having the account added via IMAP to Outlook 2010 displayed the email contents with garbled special characters in the client (utf-8 encoded characters displayed in a windows-1250 character set).

Read More

PHP Comparisons

If there is something every developer (not just PHP) should know, it's when to use a strict equality operator. Interestingly enough, using empty() in PHP has exact behavior as checking loose equality with `== false`.

This whole thing was inspired (and partially ripped off of) the JavaScript Equality Table. The design caught my eye, more than anything. I'm kinda wishing most if not all languages would have this kind of basic reference.

In fact, I find it to be a very useful way to document operators. I'm always kicking myself in the head when I go read some lua code which doesn't use "!=", but uses "~=", and then there's other software where the '~' character doesn't mean negation but regular expression (perl =~, nginx regex locations). It's the little things.

I think that CS knowledge is transferable from one language to the next. If you learn Java or PHP or any other arbitrary languages, you are not locked in to that language - you might have difficulty migrating to C# or LUA or Python, but you can take your logic with you. Your code might not be at the same high standard as your primary language, but it's function will be.

Outperforming MySQL by hand

There is this SQL table, right?

This is the part where you knowingly nod and prepare yourself for a long story about how a database is as good as the person designing it. Let's call this table an access log. For the sake of argument, let's also say it's 30GB in size, has a 100 million rows, and only has an auto_increment PK ID field. Your task is, should you choose to accept it, to retrieve the last hour of entries in this log table.

Read More