Thursday, January 10, 2008

Open Source Bugs Uncovered

Go Open Source!

The neat thing about open source sponsoring is that anyone can invest as much or as little money they want into the effort, whereas in proprietary software, you're stuck with paying the cost of the product and hoping the majority of their customers need the same features as you. Think man hours.

Thursday, January 3, 2008

MD5 and a playstation 3

Now this is an interesting way to use your Playstation 3: for cracking MD5 hashes

Essentially, a single PlayStation 3 performs like a cluster of 30 PCs at the price of only one. In our experience, one chosen-prefix collision can be constructed well within 2 days of computation time, using one PlayStation 3 and a quadcore PC.

Friday, December 21, 2007

Jash is neat

I was using Jash today and I gotta say it's pretty cool.

One of the cool features is the mouseover DOM node selector. Alt+X to enter that mode and Alt+X again to capture whatever node you're mousing over. Then you can access the node via the javascript shell with this.currentNode. Now, that's neat.

For those who had the same issue as me with IE and bookmarklets, create a new bookmark and copy and paste the script below as the URL:

javascript:(function(){document.body.appendChild(document.createElement('script')).src='http://www.billyreisinger.com/jash/source/latest/Jash.js';})();

Thursday, December 20, 2007

IE8 passes acid test

Yay.

Let's hope it's not one of those internal-only-hacked-up-version-for-the-sole-purpose-of-passing-the-acid-test.

Tuesday, December 18, 2007

Jscript 5.7 out for IE

Microsoft recently released a patch for IE 6 which supposedly fixes a number of issues related to garbage collection.

Time to look at those javascript "@cc" conditional comment snippets and make sure they aren't using JScript version to sniff for IE7.

Monday, December 17, 2007

Why I think Knols will flop

So apparently, Google announced a publishing platform called Knol, which is supposedly similar to Wikipedia, in that it is supposed to provide encyclopedia-like information, but giving focus to the authors of each knol.

But without the collaborative effort and the multiple cycles of feedback that make up the core of wikipedia, will knols be as neutral and elaborated as wikipedia? Sure you could make a pretty informative and non-biased knol on ladybugs or potatoes, but what about Java strengths and weaknesses and, for that matter, Bush or Huckabee?

In my opinion, centralizing opinions around authors gives that much more room for incidents like when the Gaia guy bashed AIR, or more recently, when Resig threw a fit over a MooTools presentation.

Add to it that Google plans to add advertising to knols and you have something that scarily resembles the sensationalist tabloid newspaper business model.

Sure, we could argue that the good authors will prevail over the others, but authorities in various fields already blog, and blogs are much more adept at expressing opinions and even a certain degree of entertainment to authors, whereas factual dissertations are much more restrictive and easy targets for scrutiny.

One field where personal knowledge pages are common is the "[insert topic] for dummies", which About.com et al caters to. Thing is, whenever I'm over on those sites, I'm looking for quick answers, not looking to deepen my e-relationships with experienced people in some area where I'm not a guru.

Perhaps knols will be more socially oriented than About.com, but to say that knols will compare to Wikipedia sounds like giving individual authors way too much credit.

Friday, November 2, 2007

position:relative and AJAX quirks in IE

Today I ran into a problem because one of the sites I'm working on was breaking on a AJAX call to refresh the contents of a certain rounded corner box that uses position:relative in its CSS (btw, changing that rule is dangerous since it's used by all of the boxes in the site - which comprise 90% of the structural code)

The problem is that when you want to "refresh" only a certain node in the DOM tree and the height of the content changes, IE has a nice little bug, where it doesn't re-render relatively positioned elements correctly (unless you refresh the page, which beats the point of ajaxing in the first place).

The ideal solution would be to change the CSS, but in this case, it's not feasible, and solutions that require changing the HTML, even if just slightly, as well are out of the question.

Fortunately, there's a hack that solves this problem: just set the element's innerHTML to itself, and this will force the DOM node to redraw itself, as if it was a hard page refresh.

element.innerHTML = element.innerHTML

I'll admit it's not very pretty code, but hey, it works

Tuesday, October 30, 2007

An (almost stupid) idea on an old CSS bug

So I was compiling a list of known CSS bugs during my downtime at work, and one that sorta caught my attention was the one about form elements inheriting margins from parent elements that have layout (which, incidentally, I have never run into myself).

Here's a sample code derived from P.I.E., which will cause a margin of 100px to show to the left of the input element in IE:

.login {background-color:#eee;margin-left:100px;padding:10px;width:30em;}
<form action="ignore">
 <div class="login">
  Username:<br>
  <input type="text"><br>
 </div>
</form>
Now, wouldn't it make more sense to just have done this to begin with?
.login {background-color:#eee;margin-left:100px;padding:10px;width:30em;}
.login label {display:block;}
<form action="ignore">
 <div class="login">
  <label>Username:</label>
  <input type="text">
 </div>
</form>

Tuesday, September 4, 2007

Opera never fails to impress me

Opera 9.5 alpha has been released.

The feature list is quite impressive, ranging from a speed overhaul to the already lightning-fast engine to content-sensitive history searches.

Safari is going to have to work really hard to beat this release.

Wednesday, July 4, 2007

hackless buttons

I wonder why people hack IE without trying to set the background-position first =/

<style>

button {background:url(btn_blue_right_hover.gif) no-repeat 100% center;border:0;overflow:visible;padding:0 20px 0 0;}
button span {background:url(btn_blue_left_hover.gif) no-repeat 0 center;float:left;line-height:50px;padding:0 0 0 20px;white-space:nowrap;}

</style>
<button><span>test lorem ipsum dolor</span></button>

And there we have it. Semantically correct rounded corner buttons using sliding doors, the <button> element, and no hacks.