David Lohmeyer's Blog

Font sizing in CSS: em vs. px vs. rem

I've been looking for ways to simplify my CSS development constantly.  I recently made the switch to using Compass/SASS full time in all of my projects due to its simplicity and more importantly the fact that you can create a base template for all of the wild CSS3 effects that require 5 different lines for each browser.

Low carb day 90: 43 pounds lost and my favorite low carb foods

As I mentioned in my December 11 blog post about how I'd lost 30 pounds, I've been dropping weight.  Today (day 90) I'm down 43 pounds total.  I started out at 235 pounds and now sit at 192.  This is nearly the lightest I've been in 13 years (I got down to 190 in high school).  Other than that one time I've been heavier than this since I was about 12 or so.  I've never been able to get rid of the gut, which is now in my sights thanks to low carb.  And it all happened in just 3 months.

Drupal vs. Joomla at ITWorld

ITWorld has a new article up about Joomla vs. Drupal and contains viewpoints of different developers.  I was asked by the author to give some insight on using either CMS so I'm in there around page two.  It's an interesting article because it's not from the perspective of one person and seems to cover many bases.

Using Drupal Webform submission data

The Webform Drupal module is an amazing thing.  It lets you build all sorts of amazing forms.  Combined with jQuery you can construct dynamic forms that improve user quality of life.  However, Webform's export features are extremely limited.  You can get a run-of-the-mill exported CSV with every component includes with the generic field name.  What if you want or require a different format or a variable number of submissions only?  It seems like the only real solution right now is to write your own app or module that reads Webform's data.

Quickly upgrade Drupal core: only different files

Here's a handy commandline snippet that will help you upgrade Drupal core (for example, 6.19 to 6.20) without having to replace everything.  It will only update the files that have changed.

Disabling the backspace key on a page with jQuery

I had an issue with a multi-page form recently where Internet Explorer would go back a page immediately upon hitting the backspace key.  If you accidentally do this while not in a text field you'll lose your form data.  Other browsers actually ask you if you want to resend data when you go back.  The solution was to disable the backspace key on my form page.  I accomplished this with the following Javascript (requires jQuery):

Redirect webform submissions to a dynamic URL in Drupal 6

If you need a way to redirect webform submissions to a dynamic URL in Drupal 6, using the Webform PHP module can work well with Webform 3.x.  I recommend only using post processing conditionals on select fields if possible with Webform PHP since you need to enable the permission to "use PHP for additional processing" for users who submit webforms (typically anonymous).

Here's the process:

Thoughts on programming languages

I've been expanding my programming language base lately.  Being a web developer, I don't have an immediate need to learn other languages.  However, learning them seems to pass time and it doesn't seem like a worthless endeavor.  Who knows, being the one who creates the next "killer app" could be worth it.  Here's an overview of some of the languages I've been experimenting with:

Using PuTTY to manage your SSH logins in Windows

This may be something you already do if you're a web developer or have anything to do with Unix but I figured it'd be a decent reference for someone just starting out.  PuTTY is your SSH client for Windows which stores login information to remote servers.  It makes it so you don't have to do things via a regular command prompt manually every time you need shell access.

What you need

JQuery Dropdown Menu Styling in Drupal

DrupalSN posted a nice guide to styling exposed View dropdown menus with a JQuery plugin and some stylish CSS.  The guide there worked perfectly except for the step where he hid the submit button.  I changed this:

.views-exposed-form label,
.jquery_dropdown_page .views-exposed-form .form-submit {
  display: none;
}

to this: