Friday, June 11, 2010

IPhone 4's Great New Camera... What is a backlit sensor?

The new iPhone 4 has a great new backlit camera sensor. Most people don't understand why this is nice so I wrote up this little description for the TII Podcast I listen to. A major factor in my recent camcorder purchase was the backlit camera sensor of the Sony camcorders. This sensor severely reduces graininess in lower light situations making it a must have for me.

Here's how it works. Light sensor pixels are not very reliable at low levels of brightness so the camera turns on the backlight to make sure this doesn't happen. Of course this makes the whole scene uniformly brighter, but the camera uses an algorithm to darken it back down again when the light is on so that you don't notice the difference.

This is a very smart implementation of the technique used in the movies for years to get around the same problems with film cameras. When the crew of a movie films a night scene they don't really film it in the dark. Instead they film it on a well lighted set and darken it in post production avoiding the graininess that comes from low light filming.

Just thought this was interesting.

Monday, April 26, 2010

Simplest JQuery ToolTips

Well I think I may have developed the simplest tooltips possible using JQuery. Everything out there seemed too fancy and took too much space, so I just whipped up something super simple. All you need is the amazing JQuery library, this javascript method:

$(document).ready(function(){enableTooltips(verticalOffset, horizontalOffset)}) // Set these values how you like, I used 35, 0

function enableTooltips(topOffset, leftOffset)
{
$('[tooltipText]').bind(
{
mouseover: function() {
if ($('#tooltip').length == 0)
$('body').append('
')
var o = $(this).offset()
o.top += topOffset;o.left += leftOffset
$('#tooltip').css(o).html($(this).attr('tooltipText'))
.stop(true).animate({n:0},1000).fadeTo(300,1)
.animate({n:0},5000).fadeTo(500,0)
},
mouseout: function() {
$('#tooltip').stop(true).animate({nothing:0},500).fadeTo(500,0)
}
});
}

And some css like this:

#tooltip {
font:normal 12px Verdanna, Arial, Helvetica, sans-serif;
position: absolute;
z-index: 1000;
border: 1px solid #111;
background-color: #eee;
padding: 2px;
opacity: 0;
filter:alpha(opacity=0);
}

On the items you want tooltips just put a tooltipText property like this:

<input type="submit" src="ButtonHome.gif" tooltiptext="Go to home">

and you win! JQuery is amazing!

Friday, April 23, 2010

The Apple Flash battle is similar to the USB and Floppy transition

Just a short note today as an iPhone user.

It is painful that Apple has booted Flash out of their phone, and as a user it causes me to suffer a bit, but I think change has to hurt. This is just Apple's thing. They like to force innovation to happen, which has made a crucial difference in consumer electronics and software over the years.

Intel invented USB, but could not get it implemented in Windows computers. I was very irritated when Apple tossed their PS2 like serial ports on all their machines but... I think it did have the needed effect of accelerating USB adoption.

They did the same thing with the floppy transition, when they dropped the drives from all their stuff. It was a bit painful for a while but thumb drives and writable CDs came along quickly and solved that.

Apple is irritating people with this, BUT it is absolutely having the effect of making HTML 5 a reality just as it did with USB, and the floppy. Even Microsoft has put very good support in IE 9. I don't think this would have happened nearly as quickly without the iPhone thing, and as a web engineer I appreciate the push.

I must keep my iPhone jailbroken thanks to stupid Apple limitations, but on most things I thank Apple for making me suffer for a bit. Without them we might still be using DOS.

Friday, January 8, 2010

JSTL is Old Fashioned But Cool

I am not afraid to say that I really like JSTL. It may be old fashioned, but it gets the job done very nicely. Is it just me, or do many of these new frameworks just seem like they don't buy you all that much. Anyway I created this post to shove my favorite JSTL expressions/hacks, toolkits etc. I'll just keep editing it to add more as I think of them/find new ones.

---

Quickly get the current year from JSTL (and jsp)

<jsp:usebean id="now" class="java.util.Date">
<c:set var="year" scope="page" value="${now.year+1900}">

---

I really like the displaytag library. So simple and powerful (especially for internal crud pages).

http://displaytag.sf.net

---

Why does CSS suck so bad? They forget basic things like allowing URLs to break in a table so the table formatting doesn't get thrown out. Here is a snipped to stick hidden breaks in a url so that it will wrap (oh, and still escape xml).... Argh!

${fn:replace(fn:escapeXml(variablename),"/","/")}

Monday, November 23, 2009

New Moon Gets It Right And Rakes In The Dough

Hi there whoever may be reading this. I've been really happy to hear of New Moon's success. Stephenie Meyer really seems like a great person, and I love to see her succeed. The thing that has really surprised me is how much she and the no-name production company Summit Entertainment is succeeding this time. In case you didn't know the movie made $275 million dollars in the first weekend. Third to Dark Knight and Spider Man 3 in it's opening weekend in the US. Top opening ever in China. Amazing.

I mean, put this in perspective. Today Disney announced that Johnny Depp has agreed to take 35 million to reprise his role as Captain Jack. Dark Knight and Spider Man 3 cost around 250 million each to make. New Moon is competing against these movies and cost only 50 million to make. They are making a killing.

Why does this movie succeed where so many others fail, and at such a tiny cost? Well, I can think of 3 reasons that probably have something to do with it:
  1. They are relatively clean. Devoid of crass language, potty humor, and overt sex.
  2. They target women. 80% of the tickets were sold to women this weekend. Let's face it, women are rarely targeted effectively with the blockbuster movies. Hollywood usually puts much more effort into men.
  3. They target the fans! Less people are excited about the Harry Potter movies because the people who love the books (a HUGE number of their viewers) hate the destruction of the stories that happens in the movies. The twilight movies (and the books for that matter) are designed to please the fans! What a revolutionary concept! This makes me wonder what would've happend if the Harry Potter movies had gone after the book fan base. Would they be up there in the top 3 too?
Anyway, I was happy to be one of the men in the 20% this weekend. Sure the movie was a bit cheesy, sure it would be nice if Edward smiled once in a while, sure Jacob could show off his chest a bit less... ;-) But I really enjoyed watching it with my wife. I am happy to see a movie that compliments the book, one that is produced outside the hollywood mainstream, and one that is changing the rules of what movies can succeed in a big way.

I am sure that this will not go unnoticed by Hollywood, and that we are going to see a ton of copycat movies coming out soon that I will have to sit through... Chick flicks are back in vogue, and I may even like it.... Maybe....

Tuesday, November 3, 2009

Halloween 2009

Well we survived another crazy Halloween season. This year in haunt news:

  1. Bought a brand new projector with money from our DVD and music sales. A Panasonic PT-AE3000U which is the one I have been planning to purchase for a few years (at least the older model). It is a very nice full HD projector, and looked great on my house. We watched Johnny Depp in "Secret Window" last night, and it looked great. OK movie by the way. Johnny Depp can make anything fresh.
  2. Remixed the whole haunt to 1080p HD. That took most of my time for haunt enhancement this year, but it was worth it. When watching the haunt everyone kept saying "____ is new this year right?" I just kept saying, "no, it was there before, you just couldn't see it ;-)". Hooray for HD! Only problem is that with the 16x9 aspect I had to put the projector further away from my house. I also had to lower it to let me get the sidewalk and the top of the house. This is very unfortunate because people's shadows were much more obvious. Don't know the solution to that one though because any farther back and I will have to cut down my neighbors trees just like I did mine ;-).
  3. Built a huge 16 foot projection tower to put my new projector in. I opted to make it out of 3" ABS so the projection box can go up and down like on a flag pole. It worked all right after some battling. Of course it is also nice that ABS is black. Because of the new tower I was able to put the projector whatever height I wanted in the middle of my neighbors yard without having to use the fence for support. Very cool... Very large galvanized pipe stakes holding that baby there... Hope I can get them out.
  4. Worked on some new segments for the haunt, but didn't finish in time. Tried them out at the end of the night on family and friends and they were a hit.... Next year!!
  5. Got a nice write up in the Taylorsville/Kearns newspaper that got a lot of nice comments. You can read it here: Bates Haunt in Local Newspaper

The video is still in progress. I taped it with my kind brother in law's professional HD camera, so it should look good... Unfortunately I used the P2 compression so he has to convert it to something useable for me.

I thought you might be interested in some stats on my Adobe Premiere project. It may be the most complex Premiere project ever (probably cause no one else is stupid enough to do a show this complex in Premiere ;-) ). I really need to port it to After Effects.
  • 43 Video Sequences
  • 287 Video Tracks
  • 2422 Layered Video Filters
  • 4729 Positioning Keyframes
Not sure how long it takes to render because it crashes Premiere unless prerender most of the sequences. If I start from scratch and combine the time for all the individual builds it adds up to 6+6+4+2+5+3+5 = 31 hours. Fortunately the final mix is only 5 hours, so if I am making only minor tweaks at the top level, I can render it overnight.

Hope you all had a Happy Halloween!!!

Sunday, September 27, 2009

Wow, it has been a while. Deck of death!

So earlier this summer I decided to take on a large deck with wrap around stairs. We opted to go with Trex Brasilia with their new hidden fastener system because it is a nice dark red without the cheesy grain of normal Trex. The vote is still out as to wether this was a good choice or not. Trex is cool, but it is scarier to work with then wood because there is no sand-out-the-bad-spots, and I am not sure how it will hold up eventually. I have had to be very careful not to scuff or scratch the boards too much, and that kind of scares me. Due to the 30' of wrap around step, I have still not finished the project, but should this week.

Some things I have learned are below:
  • After framing your deck, immediately start on the decking. Otherwise pressure treated wood warps like crazy when it dries without the influence of the decking, and then you have to work hard to get stuff to line up again.
  • Overbuild your deck structure. Do not come close to maxing the spans of your chosen wood because decks should not have spring at all.
  • Be extremely careful when making stringers. I had to make around 28 for my stairs and inaccuracies in my stringers have made things much harder then they should have been.
  • Stringers warp horribly, so get your decking on quick. (see the first gotcha)
  • Galvanized pipe works great as simple foundation stakes. You can cut it with a metal cutting blade, and drill holes in it with normal bits. Then screw it right on to your wood.
There are some pictures in the More Summer 2009 flickr collection.