The 'Secret' to a Hit Song Title

Last weekend, I came up with this idea as a result of pondering on the thought that the highest-grossing tier of the music industry is really just a concentrated circle-jerk of a dozen or so artists. And the music is almost always formulaic and cliché. (But that's nothing we didn't know already...right?)

The Idea showed it's face when I heard two different songs on the radio, back-to-back that coincidentally had Nicki Minaj in both of them; One solo song and one song by another artist featuring her.

I realized that these artists are so commonplace that you could just mix and match any of them, throw a cliché buzzword here and there, and you'd have a realistic-sounding top-40 song. So I took this idea and turned it into a website: Hit Song

Basically, what it does is use a bit of javascript to randomly pick pair of artists, give them a catchy song title, and bam! There's the next radio hit. I found it amusing that the resulting song names ended up being more convincing than I had originally expected.

I used HTML5 Boilerplate and was pleased with the results. Check out that responsiveness!

Make sure you share your best song combinations!

If you traveled back in time to 1975 equipped with a modern laptop...

I was running errands this afternoon and came up with a very interesting hypothetical scenario. It could never happen in real life, but the way you respond to it can say alot about who you are as a coder and as a person in general. There's no right or wrong way to answer it.

I originally intended to post this question to HN, but I couldn't find the perfect way to ask in under 80 characters, so I figured I'd ask here on my blog instead:

If you traveled back in time to 1975 equipped with a modern laptop loaded with a development environment of your choice, what's the first thing you'd do?

discuss on HN, /r/programming

( picture credit goes to Charles P Daly )

Adding a red notification icon next to your menu button on Wordpress

A notification icon, remniscient of the facebook alert, right next to a menu button. There doesn't appear to be a plugin for this yet, unfortunately, and since I don't have the time to invest in making one, I'll do a quick runthrough of how you can do this to your wordpress site. All you have to do is add a bit of CSS to your page.

StackOverflow user Titus generously provided us with a good CSS snippet for this icon on this post, so I took that and made a slightly modified version so that it works best on newer browsers. You can add this CSS in several ways. One is through the 'Extra CSS' area on your Wordpress via a Theme Customization Option, but you can also achieve this with a simple plugin.

here's the CSS:

 #noti_Container {  
   position:relative;   /* This is crucial for the absolutely positioned element */  
 /*  border:1px solid blue; This is just to show you where the container ends */  
 .noti_bubble {  
   position:absolute;  /* This breaks the div from the normal HTML document. */  
   top: -6px;  
   padding:1px 2px 1px 2px;  
   background-color:red; /* you could use a background image if you'd like as well */  
   /* The following is CSS3, but isn't crucial for this technique to work. */  
   /* Keep in mind that if a browser doesn't support CSS3, it's fine! They just won't have rounded borders and won't have a box shadow effect. */  
   /* You can always use a background image to produce the same effect if you want to, and you can use both together so browsers without CSS3 still have the rounded/shadow look. */  
   box-shadow:1px 1px 1px gray;  

Once that's in place, go to the Appearance -> Menus section of your WP admin page and select the page you want to add the icon to. Drag it over to your Custom menu if you haven't done so yet, then under 'CSS Classes (Optional) ', put noti_Container. You have now set the stage for the icon. Now let's add it.

In that same Menu button editing window, append (don't replace) this code to your Navigation Label:

 <div class="noti_bubble">new</div>  

For example, if you want to highlight your Blog button, You'll put this:

Blog <div class="noti_bubble">new</div>  

Save your settings and refresh your page. Tada! enjoy your fancy alert icon.

If you ever want to remove it, you simply remove the <div class ...</div> from your Navigation Label field.

Not too bad, although a plugin would be nice. but hey, it's possible!

'Hacker News 2' App No Longer Loads Comments

You just need to update the app. From the release notes:


hotfix for broken comments page due to some changes HN made. The reply functionality is temporarily disabled until it gets fixed. Other than that, let me know if you see any other problems. Also thanks to @pkillian the search page works again.

More info here.


Linux Mint 16 on Dell Inspiron e1505 - Fixing the wireless adapter

First things first, update your system:

sudo apt-get install update

Now check your network adapters with:

$ inxi -N
Card-1: Broadcom BCM4401-B0 100Base-TX driver: b44

Card-2: Broadcom BCM4311 802.11b/g WLAN driver: b43-pci-bridge

Your wireless adapter is the WLAN card. In this case, I have the Broadcom BCM4311 driver. The driver that comes with the system is no good for this laptop. You'll have to remove it and install a different driver. Try running this command to remove it:

$ sudo apt-get remove --purge bcmwl-kernel-source

If theres no driver in the system whatsever, I had some success with installing it, then removing it immediately afterwards:

$ sudo apt-get install bcmwl-kernel-source
$ sudo apt-get remove --purge bcmwl-kernel-source

At this point, you shouldn't have any wireless driver on your computer. If that's the case, great, let's install the alternate driver:

$ sudo apt-get install linux-firmware-nonfree

When that's finished, load the module with:

$ sudo modprobe b43

If you want it to load everytime you restart, do this:

$ sudo su
# echo "b43" >> /etc/modules

Now restart your computer and BAM! Look what you did, smartypants. now you don't have to sit on the floor next to your router to get your porn. nice job!