Me, as painted by Modigliani

Members of the School of Psychology at the University of St Andrews in Scotland have made a Face Transformer Java applet which can transform an image of a face by filters, including age, race, and the style of a famous painter.

curious people for a curious america

Our friends at the Internet sketch comedy troupe Curious People for a Curious America have released a video.  Myself and Hottie Mc. Cuteness helped out as extras.

Curious People for a Curious America: Episode 1 from Curious America on Vimeo.

tevas that protect your toes

I am a long-time wearer of the classic teva sport sandel.  I like the confort this style of footwear affords, while remaining versitile.  When it comes to making the case against other sport sandels, such as keens, the argument has been made that tevas don't "protect your toes" from hortizontal collisions.  Well, now teva has come out with a curved front toe design which should help -- and, I still think their are stylish.

 

timbuk2+threadless=awesome

Timbuk2, maker of fantastic messenger bags, has teamed up with t-shirt producer threadless to produce three limited edition bags.

Loss of Time Art Show

My friend the illustrator and photographer Tania Kaufmann is showing her work at the Magnolia Theatre on May 29, 2008.

She recently collaborated with writer P.J. Kryfko on a short story called Amorphous and did the title for David Hopkins' multi-illustrator-contributation comic book Mine All Mine.

 

Lesson Learned: Collaborating on ASP.NET with a CSS designer

For the past 3 weeks, I've been working on a website for car dealers to manage load applications.

The project consists of a designer, a lead developer (me) and two other web developers.  The designer provided us with mock-ups in pdf, and then later started providing html with css and javascript as externally-linked files.  The html contained dummy data, and we happily started incorporating it into the ASP.NET pages which gather data on the server-side, and render on the client-side in something that should approximate the original html mock-ups.  Nothing two complex so far.

I am using masterpages, since the design of the site has a clearly defined template structure, with a menubar, and a footer on every page.

I discovered once I started testing my content pages that some of the elements were not rendering correctly.  The reason was that the designer had applied css styles by element ID, and when ASP.NET controls were rendered on the client-side, they assigned IDs were mangled.

Here's an example to illustrate the problem:

The Designer's Mock-up -- The stylesheet shown below changes the colour of the page background, and adjusts the font of the DIV with id="myelement".

<!-- Default.html -->
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>Designer Mockup - Default Page</title>
    <link rel="Stylesheet" href="default.css" />
</head>
<body>
  <div id="myelement">Hello metafedora!</div>
</body></html> 

 

/* Default.css */ 

body
{
  background-color:Maroon;
}
#myelement
{
  color:White;
  font-family:Verdana,Sans-Serif;
  font-size:large;
}

 

The Developer's Implementation -- Default.master is the masterpage, Default.aspx contains the content, and Default.aspx.cs is the codebehind which sets the text on the div.

<%@ Master CodeBehind="Default.master.cs" Inherits="Site.DefaultMaster" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Developer Implementation - Default Page</title>
    <link rel="Stylesheet" href="default.css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ContentPlaceHolder ID="ContentPlaceHolderMain" runat="server" />
    </div>
    </form>
</body>
</html>

 

 

<%@ Page MasterPageFile="~/Default.Master" CodeBehind="Default.aspx.cs" Inherits="Site.DefaultPage" %>

<asp:Content ContentPlaceHolderID="ContentPlaceHolderMain" runat="server">
    <div id="myelement" runat="server">Hello {0}!</div>
</asp:Content>

 

 

namespace Site
{
    public partial class DefaultPage : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string name = "metafedora";
            this.myelement.InnerText = string.Format(myelement.InnerText, name);
        }
    }
}

 

Here's how the DIV gets rendered when Default.aspx is viewed:

<div id="ctl00_ContentPlaceHolderMain_myelement">Hello metafedora!</div> 

The problem is obvious: ASP.NET has mangled the ID of the DIV, and thus the style specificed for #myelement will not apply, and the text in the DIV doesn't appear as it should.

The designer didn't want to drastically change his HTML, the solution we came up with was too change the CSS to use classes instead of ID's to specify the styles, and adjust all the server-side controls to reference these classes, by either the CLASS attribute, or the Control.CssClass property.  The modified CSS for myelement and DIV from Default.aspx code are below:

.myelement
{
  color:White;
  font-family:Verdana,Sans-Serif;
  font-size:large;
}

<div id="myelement" class="myelement" runat="server">Hello {0}!</div>

So when beginning on a web project using ASP.NET, the designer should avoid using styles that apply by element ID, and opt to style by class or element name.

Dallas Tech Fest worth the drive to Addison

Last weekend I was at the Dallas Tech Fest in Addison.  Overall it was great experience, with a good line-up of speakers, and the best part is that it was free! 

I attended a session on Google Android, the new software stack for mobile devices. The session included overview of Google's goal, along with it's partners in the Open Handset Alliance, is to build the first complete, open, and free mobile platform.  There were also demonstrations of map integration and opengl using java and eclipse.  What I find interesting is that Android platform uses a tool to convert the Java bytecode into DEX, which runs in the register-based Dalvik virtual machine.  So, I'm thinking that there is potential to leavrage c# and the .net framework, here provided that a IL-to-DEX linker could be built.

I also saw Richard Campbell's presentation on scaling ASP.NET Web applications.  This guy is a great speaker, and the topic is timely as the number of users continue to grow on the websites I work on.  Concurently, I'm also reading Scaling Internet Architectures.

Joseph Hill of Novell gave a talk on Mono, the open-source platforms for .NET.  The presentation was about half question-and-answer, which generated some interesting discussions about the direction of the project, timelines, pitfalls and successes of building an open architecture.  The moonlight stuff sounds promising.

 

i love my friends

 

The 7-10 split

I went to watch my friend bowl on Monday night, and I was chatting with a few of the people on his team.

I asked, "so assuming you don't knock down all the pinds on your first throw, which pin configuration is the most tricky to handle?"

Both immediately said, "The 7-10 split".

And it occured to me, that it is likely that they know this from experience.  They've thrown enough balls at enough pin configurations to come to that conclusion.  Alternatively, you could determine the answer by running a simulation under ideal conditions, and considering the proportions of the lane, all possible weight distributions and surfaces of the balls, and reasonable guesses about human physiology.  Instead, other peoples experience gives me the answer without having to revert to scientific rigor, however interesting a process that might be. Its important to remember to stop and consider what others have learned, before proceeding to waste your time.

Honey in your Hand

Jenni ordered these neat individually packaged honey drops from honibe.  You're supposed to use them to sweeten beverages, but we've been eating them like candy! 

Here's what it looks like.

In case you weren't sure, here's how you use it!