How to NOT use LINQ

So, I wrote this code, inspired by a Daily WTF post, which I wanted to make "more efficient":

public static string LastSixDigits(string number)
    return new List<string>(new string[] { number })
        .Where(n => !string.IsNullOrWhiteSpace(n) && n.Length >= 6)
        .Aggregate(string.Empty, (s, c) => s += c);

World Map Resource!

World Map preview

I was sorely disappointed with the lack of labelled, complete world maps available via Google Search and Google Images.

So I found one without labels, and added everything myself. Just used standard Arial, nothing fancy. There were a couple that were difficult to label, so hopefully everything is clear. So, this is a fully bordered, fully labelled Photoshop file of a world map.

Two Chrome icons in Ubuntu 13.10?

As frequent readers will know, I recently triple-booted my new laptop with Ubuntu 13.10 as one of the host operating systems. However, Chrome has been acting up a bit. When I went to start Chrome from the launcher, it would instead start an icon called "Getting Started - Google Chrome" (other people have reported "New Tab" and "Chrome Settings" as their icon label of choice). If you pin this icon, Chrome does not start when clicked; if you pin the other, you'll always have two Chromes in your dock.

Fortunately, there's a way around it. After at least a half hour of various keyword attempts (involving "unity", "Ubuntu", "13.10", "Chrome two icons", etc.), I managed to find a post on AskUbuntu which had a solution.

Stacker - An unofficial Stack Exchange statistics engine


I joined Stack Overflow almost two years ago now, and it's been an invaluable tool for both teaching and learning. Though my activity has declined recently, I've been active on other Stack Exchange sites; most notably, I've been an active participant on the Anime & Manga Stack Exchange, which is currently in beta.

With beta sites, we want to make sure that the site is headed in the right direction. Higher visit counts, more avid users, and all that, so that the site can successfully graduate from beta and become a full-fledged member of the Stack Exchange community.

The Horror of Triple-Booting

I recently bought a Macbook Air, wanting to expand my repertoire with iOS applications. (Despite how much I speak out against Apple, they have two things going for them: build quality and platform awareness; two things which are very hard to pass up as a developer.) However, having used Ubuntu for my schoolwork and also wanting Windows for a future job at Microsoft, I knew that I would struggle to be able to use a Mac without my trusty developers' operating systems.

That left me with one choice: multiple operating systems in a dual- or triple-boot fashion. But I'm ambitious with technology, so I was going all-in on this. I found this LifeHacker tutorial and planned to follow it to the tee, with the addition of a shared partition to transfer files easily between operating systems.

Beware: Android Activity Helpers!

After a long and arduous journey of getting a navigation drawer set up for the redesign of my ChemPal app, I finally completed a wonderful and beautiful hamburger menu that I was greatly happy with.

Because of how I have my app divided up—a main app file (the main activity) and a library full of all the functions and other Fragment and Activity classes—I decided it was important to move all the navigation-drawer-related code (of which there is a fair amount) to a helper class called ViewOwner.

PHP String Concatenation Efficiency

As a coder who picked up on Java and JavaScript string concatenation ("text" + var + "more text"), in PHP I always used "text" . $var . "more text". That may change soon, though, as it seems that embedding variables in string literals is a bit faster.

To test it, I ran this basic stress test (PHP 5.3.13) with $iters = 1000000:

str_ireplace for PHP 4

A substitute for str_ireplace() which I wrote to allow its usage on PHP versions below 5.