LESS: How to Build Kick-Ass Websites Even Faster (Part 1 – What is LESS, and how do I get it?)

Recently at work, we decided to switch some more of our sites over to using LESS. Because some people have not yet had any experience using LESS, I decided to put together a tutorial on using it, and I figured, why not post it here, too?

In this, part 1 of my LESSon (get it? Lame, I know), we’ll go over what LESS actually is, and how to get it working on your site.

Continue reading

Why (and How) I Use Sublime Text

Once upon a time, I was a fresh website developer. Like most beginners, I started with the ubiquitous Dreamweaver (Version 4!), and surprisingly it wasn’t a pirated version – my dad had bought a copy long ago. I learned HTML both by reading books and using the WYSIWYG editor then switching to code view to see what Dreamweaver thought the code should be. I eventually learned, however, that not only are table-based layouts out of date, so is Dreamweaver.

When I grew out of Dreamweaver into fully code mode, I first switched to Notepad++. It was free, and it was simple. I stuck with it as long as I was working on Windows. This came to a screeching halt, however, when I started working at Quicken Loans – welcome to the world of development on a Mac.

Continue reading

Keep it Classy

One of the most-forgotten best practices in CSS is reusing your code when your elements aren’t exactly the same. Let’s take these two buttons as an example. We have two very similar buttons, the only difference is the background color.

Blue…

class=”blueButton”

…and orange.

class=”orangeButton”

Let’s look at the CSS that it took to get us here.

.blueButton {
    color: #ffffff;
    padding: 10px;
    -webkit-border-radius: 15px;
    -moz-border-radius: 15px;
    text-decoration: none;
    background: #5169e0;
}
.orangeButton {
    color: #ffffff;
    padding: 10px;
    -webkit-border-radius: 15px;
    -moz-border-radius: 15px;
    text-decoration: none;
    background: #dea652;
}

You’ll notice that the styles for both classes are almost exactly the same, except for the background declaration.

This might not be a big problem if you’re running a small blog, or if you never ever plan to change the design of your buttons. But what if you want to suddenly go through and change the border-radius on all your buttons? You need to go find each and every declaration of a new button in the CSS, and hope you don’t miss one. Or just do something like this

.button {
    color: #ffffff;
    padding: 10px;
    -webkit-border-radius: 15px;
    -moz-border-radius: 15px;
    text-decoration: none;
}
.blue {
    background: #5169e0;
}
.orange {
    background: #dea652;
}

class=”blue button”

class=”orange button”

The buttons look exactly the same, but from a developer perspective, it is far easier to maintain.

How to unlock the Sprint Galaxy Nexus bootloader and avoid the “waiting for device” bug

I got my new Galaxy Nexus today, finally. Of course, the first thing I went to do was unlock the bootloader so I could have a proper (read: rooted) Android device. I ran into a couple of hiccups along the way, however, that didn’t seem to be common for the older Verizon version.

This is the error I was getting once I got to step 10 (which wasn’t step 10 at the time) of this guide. If this looks familiar, and this is where you’re stuck, then you will need to continue from step 8.

This guide assumes that you’re using Windows 7.

Step 1) Download the Sprint Galaxy Nexus 4G LTE drivers (Direct link to the exe on Samsung’s site. Do not download the Verizon version). It’s a normal installer, so double-click and follow instructions as usual.

Step 2) Turn on USB Debugging on your Galaxy Nexus by going to Settings > Developer Options > USB Debugging (See screenshot to the right).

Step 3) Download the Android SDK (to get ADB). If you’ve never installed the SDK before, follow the directions on CyanogenMod’s wiki.

Step 4) Download fastboot.exe (Alternate download) and save it to C:android-sdk-windowsplatform-tools

Step 5) Plug your phone into your computer.

Step 6) Hold Shift and Right click in C:android-sdk-windowsplatform-tools and choose “Open Command Window Here“.

Step 7) In the command window type:  adb reboot bootloader. This will restart your phone into the bootloader (see photo to the right). If you get “error more than one device and emulator”, try restarting your phone and doing step 7 again.

Step 8) Your computer will attempt to reinstall drivers for the phone. If it fails, follow these directions.

Step 8a) Go into your device manager. You should see, under “Other Devices”, something like “Android Device 1.0″ – if it doesn’t show up, you might need to reboot your computer.

Step 8b) Right-click on the device and click “Update Driver Software…”

Step 8c) Click “Browse my computer for driver software” and then “Let me pick from a list of device drivers on my computer”

Step 8d) Leave “Show compatible hardware” checked, and “Samsung Android ADB Interface” should show up under “Samsung”. If it shows up multiple times, click the first one (if this doesn’t work you might have to go through and pick the next one down on the list until it figures out which one it wants).

Step 8e) Click next, click “ok” on the warning that says that the driver might not be compatible, and wait for the driver to install. It should tell you the driver was installed correctly. If it was not, you might need to repeat step 8d.

Step 8f) Unplug your phone and reboot your computer. Once you rebooted, plug your phone back in and wait to see if it connects successfully. Your phone should still be in bootloader mode. If not, repeat step 7.

Step 9) Go back into C:android-sdk-windowsplatform-tools and reopen command window (as in Step 6).

Step 10) Type: fastboot oem unlock. The window will say “waiting for device” so be patient. Do not press the start button on your phone.

Step 11) Your screen should show something like the screenshot to the right. Use the volume keys to choose “Yes”, then press the power button to continue.

Step 12) Congratulations! Your bootloader is unlocked. Unplug the USB cable.

Step 14) Use the power button to select Start to reboot your device.

Step 15) If the phone loops during boot, do not remove the battery. You may need to wait for the device to do a factory wipe before it boots.