Photo Credit: Chris Harrison

Photo Credit: Lush.i.ous

Photo Credit: h.wren

Photo Credit: emdot


Archive for April, 2008

Apr26

Should CSS Hacks Be Used?

Simple answer: No.

Point of CSS Hacks

CSS Hacks are quite useful.  IE interprets the box model differently than Firefox and sometimes requires different CSS styling to achieve comparative results to Firefox.  To pass CSS styles to IE only CSS bugs were discovered that allowed designers the ability to keep all their CSS code in one CSS file, but target a specific browser for bits of code.

This made it easy to pass IE styles to make it display properly.  The most famous and most widely used of the CSS Hacks is the * html hack.  By placing * html before the selector in your CSS you could target IE specifically with whatever styles it contained.  This was done because Firefox would skip right over the statement, but IE would read and apply it.  Although it was a pain to have to fix IE, CSS Hacks at least made our job as designers easier.

But then IE7 was released.

IE7 didn’t require the same styles that IE6 needed because Microsoft upgraded IE’s CSS standard compliance.  Thus all your * html styles that once fixed IE6 could be breaking IE7.  Combine this with the fact that IE7 seems to randomly choose when to follow * html styles, which in my experience has only been about 50% of the time, and you have a big problem.

Since then newer hacks have been found to target IE7, but they are flimsy at best.

So what’s the answer?  How can we insure that our styles for IE reach the proper browser and proper version?  Unfortunitly it now requires conditional logic to detect the browser used and feed it either a style tag or a CSS file.

CSS Conditional Logic

Using CSS Conditional Logic you can now target not only IE, but also specific versions of IE.  This is useful when IE 6 needs different code than IE 7.  You can read more about CSS Conditional Logic on Microsoft’s site.  Conditional Logic allows for greater control of your CSS styles.  It allows you to know 100% that your styles are reaching the exact browser you intended.

The downside of Conditional Logic is from a maintenance point of view.  In the span of fixing each browser you may find yourself now using three or more CSS files.  The usefulness of CSS Hacks was that it allowed you to keep all styles together.  Conditional Logic requires some styles to be on its own, either on the page or in a separate CSS file.

Which way is the best?

The fact that CSS Hacks can sometimes be skipped by the intended browser is a deal breaker in my eyes.  If I need a style to be applied to IE 7, I don’t want it to only work 75% of the time.  In my experience CSS Hacks simply can’t offer a 100% track record.  I’ve used them in the past and have had them fail far to many times.  CSS Conditional Logic offers a 100% guarantee that your browser specific styles will be picked up and used,  and when you’re working on big websites, a 100% guarantee is exactly what you want.

Apr15

My PPC Linux Questions

Thanks to everyone who posted in response to my post A Summary of my Linux Experiment. Because of all the ideas y’all gave me I’ve decided to give Linux another try.  I’ve got a second computer than I’ll experiment with until I’m sure Linux is ready to be my full time OS.

Before I dive back in I have a three questions.  Seeing as how y’all had so many great ideas last time, I’ll ask them here and hope for the same amount of enthusiasm.

  • On a PPC machine, has anyone gotten gnash or swfdec to work?  In what distro?
  • On a PPC machine, has anyone gotten Exaile to work?  In what distro?
  • On a PPC machine, has anyone getten Awn to work?  In what distro?

Based on the answers to these questions I’ll decided which distro to begin with.  My hope is to find a distro that will work with all three, but I’ll take two  out of three if need be.

My fear is that some of these programs simply won’t work on a PPC machine.  I hope I’m wrong and one of you can tell me how to get it done.

Apr12

A summary of my Linux experiment

So about a week ago I decided to try Linux again. I thought enough time had passed since my earlier trials that things might have matured enough for me to give it another shot. I attempted to be as subjective as possible. I wanted to view this not as a move away from OS X, but as a move towards Linux.

I expected hurdles would line my way. My machine isn’t cutting edge. My machine is a PPC, which would limit my choices. I would have to give up some of the creature comforts I’ve come accustomed to. I had all of these hurdles in my head before hand, but I didn’t know how big these hurdles actually were.

My Requirements

I have a few basic requirements for my OS. They aren’t anything extraordinary, but they can cause some extra work for certain distros. Some distros restrict proprietary software from their systems, some are more open to software developers, some make it easy to install new software, some make it harder.

My primary requirement for an OS is MP3 support. Plain and simple I want to listen to music. I listen to over 100 songs a day at work, and I expect no less from my home computer. Some distros passed this requirement with flying colors and out-of-the-box would play my music collection. Other distros required me to install MP3 support before listening, and other distros wouldn’t play anything even after I installed their ‘mp3 support library’.

Another requirement I have is easy access to new software. There are a lot of new tools popping up on the internet these days and I want my OS to be able to communicate with them. Twitter is a prime example of this. Under OS X I have numerous options to post to my Twitter account. In Linux I found nothing. I was forced to visit the website to post.

There are numerous other items that have the same story. It seemed that Linux didn’t have any options, or they made the available options hard to find, or their options were subpar.

Polish and shine

It seemed that everything I attempted to do in Linux either took too long to accomplish or would result in me being disappointed. A prime example of this was my attempts to install a music jukebox program. Amarok came preinstalled on some distros, but it either didn’t play music or wouldn’t load. I searched around and found a nice application called Exaile. So I attempted to install this application on each and every distro I tried. And each time it would either fail to load or would crash after showing the splash image. I never got it loaded on any of the distros I tried. Why show me an application in the software repository if it doesn’t work? Why show me an applications that I can’t install?

Flash Support

I know I’ve harked on this numerous times, but it needs repeating. PPC, which includes all older Apple computers, has not flash support! I’ll say that again. There is not flash support for PPC computers in Linux. There is an attempt to create an open source alternative, gnash, but it would never install for me. Again, why offer software that doesn’t work?

Conclusion

In my Linux experiement I tried out Debian, Fedora, Gentoo, OpenSUSE, Ubuntu, and YellowDog. Each had their up and downs, except for Fedora which rebooted into a kernal panic after installation. But the one thing they all had in common was the feeling they gave me. Each and every distro made me feel like I was an outsider, like I had somehow beaten the system and escaped from The Matrix. I liked that feeling. They also made me feel like The Matrix was more complete. I felt like I was giving up usefulness simply to live outside of the box.

None of the distros satisfied me. They all failed on many levels and left me wondering why I was doing this? Why was I choosing to have less options? Why was I choosing to give up features? It didn’t make any sense, so I’m now back in OS X. I’m listening to my music, watching flash videos, installing applications without having to first locate and install obscure dependencies.

I hope the Linux experience on a PC is more enjoyable. From what I gather the difference of Linux on a PC and Linux on a PPC can be likened to iTunes on a Mac and iTunes on a PC. It shines on one platform, and crumbles on another.

I hope to one day be a Linux user, but that day isn’t today. Perhaps one day I’ll build a PC machine and install Linux on it, but it better play my MP3 files.

Apr09

Proper Inline Styles Usage

CSS is an amazing tool. It not only makes your HTML easier to read, but also quicker to update. Instead of having to change tags in multiple locations, CSS allows you to make one update and have it effect numerous elements on multiple pages. That is a power that straight HTML simply can’t offer.

But with the good comes the bad. Inline styles allow you to add CSS directly to a HTML tag thus saving you the effort of adding styles to the CSS file. The logic is this will keep you from having to edit two files at a time. You can edit your file and immediately see the results. No need to edit a second file to add styles. Easy right?

While this may sound like the way to go, it is not the best solution for a few reasons.

It negates the purpose of CSS

The point of using CSS in conjunction with HTML is to separate content from design. This keeps your code clean, concise, and easily maintained. It allows you to focus your HTML on meeting standards instead of looking good on the viewer. If you add inline styles to your code you create a maintenance problem right off the bat. Inline styles are the primary focus of the browser, so if you ever want to update the style that you coded inline, you will have to visit that page and update it. If you did this on multiple pages then you will have to open each of them and update them one by one. You might as well have used a font tag, you’re getting the same results.

Inline styles are served to all browsers

You can specify which CSS files a browser will receive. If you want IE6 to receive a different CSS file than Firefox, you have that capability. This is often used to fix display bugs that only affect certain browsers. The difference in the box model between Firefox and IE is a prime example of why the capability to specify CSS files is so important. Inline styles, on the other hand, have no such capability. What you code inline will be applied to all browsers. Not only will it be served to all browsers, but it will also be the most important style the browser sees. So no matter what your CSS file specifies for your tag, what ever is written inline will override it.

Print Style will pick up inline styles

Another unwanted result of using inline styles is that your Print Styles will be overridden by inline styles. So your page may look fine with your inline style when served to the screen, but when printed your inline styles could cause problems. CSS allows you to specify a specific CSS file for print. You can adjust all elements exactly like you do for screen viewing, but the style sheet will only be applied when printed. Inline styles give no such option. Regardless of medium, whether it be screen, mobile, or print, your inline styles will remain.

Inline styles gives you a taste of the power of CSS and the effect it can have on elements, but why go only half way? Why code inline styles only to copy and paste them to the CSS file in the end? Why not do things correct from the get go? The power of CSS mixed with HTML is enormous! You should use it to its maximum potential. You’ll save yourself a lot of time and headaches in the long run. Plus you will make designers like me happy because I won’t have to come back later and fix it.

Apr06

Last Minute Linux Reprieve

The story so far:

I was just about to ditch Linux and go back to OS X when the work Debian entered my head. I know they are one of the major distros and checked to see if they have a PPC version, which they do. I figred anything was worth a try at this point, so I download, burned, and installed Debian.

The installation process already bested other distros I tried, it didn’t crash! I used the netinstall version, so once it was installed I had to add a few optional extras to the mix, like audio. How perfect that the one thing I want most in an OS was the first thing that didn’t work in Debian. I did some searching on google and saw a few library names that needed to be installed, so I loaded the Package Manager and installed them, but alas, no music. After more searching on Google I found there was a config script I need to run, so I ran it and it made the music work! Why didn’t it tell me to run that config 3 hours ago?

So that’s where I am now. I’m in Debian and I have audio. The only snags I’ve hit are the additionial programs I want to install. Exaile wasn’t in the package manager, so I downloaded the source and compiled it. The icon appeared in the audio section of the Application menu, but again it did nothing but take up space.

Almost the same story with gnash, except I could never feed it the depencencies it seemed to want. It kept screaming for a library I confirmed was installed.

Hopefully Debian will be the one for me. It seems to offer the programs I want with the speed I require. It seems, at least for the time being, that I may be OS X free.

Next up I’m going to summarize my Linux experience. What I like, what I hate, what works, what doesn’t.

Apr05

Last Bit of Linux Fun

For all of you following along at home here’s the latest in my quest to install Linux on my Mac, but first some catch up for the late comers.

So after being let down by Yellow Dog I decided to give a few other distros a chance to impress me. First I wanted to try Fedora. I read that Yellow Dog is a derivative of Fedora, so I though it would be an easy transition. I downloaded the install DVD and went through the steps with ease. No problems at all for a change. That is until I tried to reboot after installation was complete. Fedora rebooted into a Kernel Panic and would restart in 180 seconds. Awesome! Two hours of installation and setup to have two sentences in white text on a black background. Totally worth the effort!

Needless to say Fedora left a bad taste in my mouth, so I left the computer alone for a while. Once I felt the machine had ample time to cool off from all the crashing I decided to try installing openSUSE. So I downloaded and burned the ISO and rebooted.

Right off the bat we were at odds. The installation program told me that I would have to use the text installation because the graphics installation fail to load, or because I have less than 96mb of RAM. Knowing I have 768mb of RAM I’m betting it just failed to load. But it was cool, the text installation process was fine with me. I set everything up and rebooted. Then came the package installation process, again the text version. Half way through it crashed and locked up the system. So I rebooted and tried again, but this time it was different. This time the graphic installation loaded. I guess I missed the point where I installed additional RAM in my computer prior to rebooting, but I did once black out and when I awoke a young Asten Kutcher was holding a knife in the kitchen.

So I again went through the second installation step and it went just fine. Rebooted and I was in openSUSE baby, yeah! First on my list, play an MP3. Amarok comes pre-installed, so that was my goto. It loaded up and even opened the MP3 file. I clicked the play button and heard…nothing. It didn’t play my MP3. It didn’t even play the welcome message it comes with. I tested the sound card config, and the test music played perfect, but it was a long shot from my Misfits I wanted to be listening to.

So how about Exaile? Can I install that and use it to play my MP3s? Nope. After messing with the rpm and failing to get YaST to be able to get all the dependencies, even after adding every package repository on the internet, I gave up. It’s obvious that it’s simply not going to work. I suppose xmms will work, but it still doesn’t have the extra functions I want, which is why I wanted Exaile in the first place.

Why can’t I get a Linux distro that works? Why must it be so difficult? I want Linux, I want it to work, I want to be able to use it everyday, but it’s become clear to me that I simply can’t have it all. Perhaps OS X is the only choice for PPC Macs. Perhaps Linux simply wasn’t meant to be run on G4 Macs. Perhaps I’m destined to have to deal with the bloated 10.5 OS from Apple forever on this machine, which sucks. I had hoped for a better outcome here, but it looks like come Monday I’ll be back in OS X listening to my MP3 files and watching flash videos again.

Apr03

I’m in Linux

Okay, so after yesturday’s dreadful Linux experience, I can now say I’m in Linux and it’s usable! Yellow Dog Linux is now installed and working…sorta well.

Once I figured out the file size problem, I used my wife’s laptop to re-download and re-burn the ISO and it installed just fine. I then went ahead and began the program installation process, which is where Yellow Dog took a turn for the worse I’m afraid.

First of all, getting anything to play an mp3 was a nightmare. All the included music players laughed at my request of an mp3 file, even after I used the codec installer to install “Everything you’ll need to play mp3 files.”

So I installed yumex and looked around at the media players that have built in last.fm support, since I’m such a last.fm freak. Two looked very good. Exaile and Listen. Both looked promising. Both installed. Both didn’t work. Exaile would display a pretty splash screen, but nothing more would happen. Listen would load with a window full of errors telling me that a lot of things went wrong and again that I was a fool for thinking I could play an mp3 file.

At this point I’m at a loss of words. Not even vlc would play my single mp3 file. My poor The Lemon Pipers - Green Tambourine mp3. It seemed it would lead a life of never being enjoyed. But there was one old standby that I was keeping in my back pocket, xmms.

So after uninstalling all the broken programs, and eating some angel hair pasta, I installed xmms, the xmms mp3 plugin, and the xmms audioscrobbler plugin. Xmms didn’t disappoint. In a few short moments I had the sweet sounds of 60’s psychedelic pop rock, and I had my last.fm account to prove it.

Now if only the E17 window manager would push off crashing long enough to allow me to use the system I’d be in business. It seems the every time I do something to the menu or add an applet or remove a program e17 crashes. The crash window says that it shouldn’t happen, but I’m beginning to think they use the same window and text for “crash messages” and “everything went fine messages.”

So what’s next? I’m in Linux, but the cool programs I’m seeing aren’t working, the window manager is crapping out every time I use something, and I’ve already moved the desktop icons off the screen somehow and have no idea how to get them back. Is the answer a different distro? Perhaps Opensuse is a better fit for me, or Fedora, which Yellow Dog is a derivative of. I don’t want to end this post on a negative, so enjoy the happy music.

Apr02

My Linux Experience Thus Far

So far Linux has not been kind to me. I attempted to install Ubuntu 7.10, which is now community driven since PPC was abandoned by the Ubuntu folks, but ran into problems. Mainly, it wouldn’t run the Live DVD. It pretended to load this and flash that, but end the end all my eyes were given were a single underscore to stare at forever and ever. But I had a backup plan, my old Ubuntu install disc that I previously used to install Linux on this computer.

I booted to said older disc and installed no problem. But once it loaded there was a problem. Turns out that the install disc is from a 2005 release and is no longer supported, thus I can’t install anything on the machine. Perfect. So I searched around for other PPC Linux distros and decided on Yellow Dog. In my now out dated Ubuntu I downloaded and burned the ISO and attempted to reboot to it. No go. Less happened than when I tried to run the new Ubuntu Live disc.

So after some searching I believe I’ve discovered the problem. It seems that the ISO files are over a file size limit that this older Ubuntu install has. So when I downloaded and burned the Yellow Dog ISO it was only half of the actual file. No wonder it didn’t work. I was attempted to install half an OS, kind of like Windows.

So that’s where I am. I’m in Linux, but can’t use it. Luckily the laptop still has OS X on it, so I’m re-downloading the Yellow Dog ISO and will try again with it.

Anyone out there use Yellow Dog before? How about OpenSUSE or Fedora? How do you like it? How would you say it compares to Ubuntu, a sad question I know but it’s the only distro I have any experience with.