Tech Roundup #4: SOPA Blackouts and Info

If you haven’t heard, there are many sites protesting SOPA and PIPA today.  I think the TED talk posted above does a good job of explaining the background behind SOPA/PIPA, and why they are bad ideas.  If you believe that these acts are not the solution, please make yourself heard by contacting your representative and senators.

For more information on these acts and protests, view these links below:

Tech Roundup #3 – SOPA Edition

The big news this week is SOPA, the Stop Online Piracy Act.  In my opinion, this is another example of Congress dabbling in what they don’t understand, only to create the potential for massive censorship and technical issues.

What is SOPA? – For a good overview on SOPA, check out Wikipedia. They have points from both sides of the argument, but there are definitely more points against than for.

Timeline – I recommend The Verge’s timeline to see what has been going on with SOPA so far.  I especially like the public debate article, which shows just how clueless some of these politicians are.  My “favorite” quote is from Rep. Lamar Smith:

“All we are trying to do here is stop online piracy. Now, since when did the opposition get so fierce against this? What could be behind the motives of people or organizations that don’t think stopping online piracy is something that we need to deal with…?” – Way to group technology professionals (that primarily want to avoid technical issues) with pirates. Nice.

Consumer Backlash – GoDaddy withdrew its support of SOPA because of backlash from some big hitters, including Wikipedia.  As if their ads weren’t enough reason to find other hosting providers.

Supporter List – VodkaCranberry from Reddit compiled this list of SOPA supporters. We need to send a message by boycotting companies that support this act. (On an off-topic note, why do shoe companies support this act?)

Bonus non-SOPA story - For an example of how not to conduct business, check out this story from Penny Arcade.  One lesson to learn from this: don’t mess with one of the big hitters in the gaming industry. Why? Because everyone, even mainstream tech media, loves a good PR blunder.

Using Notepad++ to Easily Compile LESS CSS Files

Recently, I decided that I wanted to use LESS to easily generate CSS files, but I also wanted to compile these files before deploying on the web.  To accomplish this, I used Node.JS (with the LESS module) and Notepad++.  Currently, this Node.JS solution is preferred to the old Ruby compiler.  To use this setup, follow the steps below.

Installing Node.JS

To being the process, you will first need to install Node.JS.  This program basically allows you to easily use JavaScript as server-side code.  (This works with LESS because LESS is a JavaScript application.)  To begin the installation, follow these steps:

  1. Download the Node.JS installer.
  2. Run the installer with the default options.
  3. Verify that the node and npm binaries are included in the PATH by opening a command prompt and typing node. You will be given an error message if this is not available. Reboot if you see this error message.
  4. Create a directory for Node.JS modules. (I used C:\Node.JS)  This will be needed to setup your LESS module, and other modules if you choose to examine Node.JS further.

Installing the Node.JS LESS Module

Next, LESS will need to be installed.  If you are not familiar with LESS, please review their site to see the benefits of using this system instead of hard-coding your CSS files.  To install the LESS module, follow these steps:

  1. Open the command prompt.
  2. CD to your Node.JS module directory (created on step 3 above, C:\Node.JS in my case).
  3. Run this command: npm install less
  4. Take note of the lessc cmd file and its location. In my case, it is stored here: C:\Node.JS\node_modules\.bin\lessc.cmd

Create the Run Command Shortcut in Notepad++

Once the lessc.cmd file is installed, we can configure Notepad++ to compile our LESS files into CSS. Follow these steps to map Alt+F5 as a compile shortcut:

  1. Open Notepad++ and create a simple .less file. Make sure to set the encoding type to ANSI to avoid syntax error messages.
  2. Access the Run dialog box in Notepad++ by clicking Run->Run.
  3. Entering the following text into the Run dialog box (including the quotes):
    • "C:\Node.JS\node_modules\.bin\lessc.cmd" -x "$(FULL_CURRENT_PATH)" > "$(CURRENT_DIRECTORY)\$(NAME_PART).css"
    • Be sure to replace C:\Node.JS\node_modules\.bin\lessc.cmd with the location of your lessc.cmd.
    • The -x option tells lessc to output minified CSS.
  4. Click the save button.
  5. Enter a descriptive name, such as LESS Compile.
  6. Select the key combination of your choice. I used ALT+F5.
  7. Test the command on your less file.  If the command worked, you will see a new CSS file in the same directory as your less file.

Other Tweaks

It is possible to tweak this process in other ways if you do not wish to always save the CSS file in the same directory as the LESS file.  For example, you could create your own CMD, BAT, or .NET app to run the less compiler with your own options.  As always, feel free to comment with questions or additions to these steps.

Tech Roundup #2

In this edition of the JTN Tech Roundup:

  • NERD. RAGE. – Joshua Topolsky from The Verge tells it like it is in response to a Galaxy Nexus comment posted on Daring Fireball.  It’s refreshing to see these guys calling each other out, as I think it provides us consumers with better information in the long run.
  • Speaking of Android… – Verizon finally released their version of the Galaxy Nexus this week.  This means that US-based users can take advantage of Verizon’s LTE network.
  • Photoshop Fun – Thanks to Dave Cross and TWiT Photo for turning me on to the Quick Selection Tool in Photoshop.  If you’ve been using the Magic Wand, you will definitely want to use this tool instead.