August 15th, 2007

Satire at it’s best

Posted by Jeremy2 in General Musings / Rants

I’ve just come across the company that does the Demotivators again (and purchased a couple of shirts), and they also have some video/audio podcasts that are definitely worth checking out. It’s entitled: Corporate Spin. There is one in particular that I like, which is called “Principles of Organizational Storytelling” which does not only apply to big companies, but to many smaller companies that I have worked for as well. If you don’t get too sick thinking about how your previous (or current) employers have mistreated you, it will probably make you laugh.

Edit: Wow, two in one day. There’s also the ADD list for the programmers. My personal favorite is in the comments: The decapitated chicken method.

June 22nd, 2007

Google Finds Sites in a new way

Posted by Jeremy2 in General Musings / Rants

It seems that Google is now looking up site records themselves or something, because I’ve created a couple of sites lately, and they pull up within the Google index. They do this despite the fact that I have not submitted them to any search engines and have not linked to them from any other site. I’ve looked up the same sites in Yahoo! and MSN, and they are not there at all. I’m starting to think that Google is lowering the bar in who gets indexed, but I am sure that they are keeping it high for those who wish to get a top ranking.

–Update:–

It seems that if Google finds a piece of text (not necessarily a link) that has your URL, then it will index the site. That’s the only conclusion that I can come up with so far, as I have found text with my URLs in them on Google.

June 16th, 2007

Comparison Problem in Ruby

Posted by Jeremy2 in General Musings / Rants

For the past few days I have immersed myself in Ruby on Rails, and for the most part I have been loving every minute of it. However, there was a problem I was having in my code that was driving me nuts. I think I spent nearly four hours on it until I figured out what the problem was, exactly. I had the following bit of code in my model:


def add_attribute_group (the_id)
current_attribute_groups.each do |v|
found = v.attribute_group_id == the_id
break if found
end
if !found && grp = AttributeGroup.find(the_id)
iag = ItemAttributeGroup.new({:attribute_group => grp, :item => self})
current_attribute_groups < < iag
end
end

Rails defines the foreign key ID (in this case attribute_group_id) as a string rather than a number, and so if you try to do a comparison to a number, this will not work! I’ve been spoiled by PHP which treats 3 and “3″ as the same thing. For instance:


$a = '3';
$b = 3;
$a == $b ; //This will return true

However it appears in Ruby:

a = 3
b = '3'
a == b #This will return false

I had to amend this line:

found = v.attribute_group_id == the_id

… to read like this:

found = v.attribute_group_id.to_i == the_id

May 19th, 2007

My Official “I hate Internet Explorer” Post

Posted by Jeremy2 in General Musings / Rants, Browser Bugs

I think it’s about time that I wrote this one down. Perhaps if I got it out of my system I would feel better, but I doubt it. As I am trying to come up with a new design for TuneSmith Central, I am butting my head up against some rather stupid problems in Internet Explorer. I personally call IE the whore of all the earth, though one of my associates likes to call it “Internet Exploder.” Both are rather accurate. Honestly, the only browser that is worse than IE which I have personally come across is Konqueror (a Linux browser that seems to be dropping out in favor of Firefox). Even Safari is better than IE in almost every respect except for dynamic editable HTML content - which has been fixed in the lastest version of the code. IE’s JavaScript interpretation, JScript, still is not standards compliant after all these years. I even came across a bug a couple of days ago for using innerHTML on a select to add options - after searching around on the ‘Net, I found out that this bug has been there since version 5 - almost 10 years and Microsoft has never fixed it. Worse, they’ve known about it for almost as long as the bug has been around. CSS support is better with version 7 than in previous versions, but there are still too many bugs. I can get my designs to look great in Firefox, Opera, and Safari with little coding effort - with IE it is almost always laborious to make things look right. There is almost always a small, non-obvious bug that totally trashes a certain aspect of the layout. I pray for the day when M$ is no longer a monopoly. It took the emergence of Firefox for them to start fixing Internet Exploder, but they still have a long way to go.

Next Page »