November 13, 2008
@ 10:25 PM

For years now, I've been talking about creating some sort of project centered around music. The main idea was to create a website engine that could be used to easily build websites for musicians. It would contain all of the basic functionality needed by musicians. A few months back, I came up with the name Tremolo and started working on it. I put it on CodePlex, but never published it because I didn't have a lot of time to devote to it.

Recently, I decided to start work on it again and re-created the project on CodePlex. CodePlex has a policy where you have to publish a project after 30 days. After 30 days, I hadn't completed a lot of it but didn't want to restart the project. I figured that no one would find it so it probably wouldn't matter if I didn't have it done.

I checked on the stats today and found that a few people had found it. Apparently, the ASP.NET page on MSDN shows the most recent ASP.NET projects added to CodePlex, including mine.

Tremolo listed on MSDN

I wasn't too pleased to see it since I haven't really got anything working yet. I've mostly been concentrating on creating the basic structure of the project and making sure that the build and setup scripts are running. One of the main goals of the project is to make it very easy to setup and build, and that part of it is done. There are build tasks to setup and migrate the database, run the unit tests and there will eventually be one for deployment as well. Apart from a couple minor issues, I've got NHibernate setup as well.

So, for anyone who may be interested in the project, I'll be posting updates here. I'm hoping to have the business layer completed after this weekend and the UI soon after that. If you've downloaded the project, sorry there's not much there yet :)

If you want to check the project out it's here - http://www.codeplex.com/tremolo.


 
Categories: coding | tremolo

This is something that's been floating around in my head for a while, so I thought I'd write about it. Too often, I've seen a lot of good programmers indulging in really bad web design practices. In this context, I'm mostly talking about how the HTML, CSS, and JavaScript are structured and implemented. Not so much designing the look and feel, but how that look and feel are implemented.

I find that it's particularly bad in the realm of ASP.NET developers (a group of which I am a member), and part of the blame lies with Microsoft. They tried to make web development just like Windows application development and provide the same control-based drag and drop UI experience. It doesn't work generally too well, but that doesn't stop some developers I've seen from crying foul when they can't use the designer. I certainly understand why - it's easy to use and generally works ok. But what the controls generally output isn't optimal HTML. The designer generally output isn't very clean or valid HTML. Good, cross-browser compatible CSS and HTML generally requires manual intervention.

So here's a few things that I that I find useful to keep in mind when working on HTML and CSS.

Don't open the designer

I know that designers are easy to use. I know that if you are doing Win Forms/WPF, it's the way to go. But it's different for the web. Different browsers render out different things and Microsoft has always been primarily concerned only with making sure it works in IE. So it may look fine in Internet Explorer, but there's a distinct possibility it's not going to look right in another browser. Plus, the markup that the Web Controls often emit is less than ideal.

Structure for meaning (don't use tables for layout)

There's been a ton of stuff written about not using tables for layouts (and a lot of disagreements on it), so I won't go into it too much. But - for me - at the heart of the argument is this - your HTML should reflect what it is. If it's a logical section of content, use a div. If it's a title, use a header tag. If it's a paragraph, use paragraph tags. And if it's tabular data, you know what to do...

When it comes to uniquely identifying your elements, use IDs and classes that mean something, that describe the elements that are being styled. It makes it more difficult to track down an issue when you look at a CSS file and see an ID like '#p43234_131', rather than 'header'. Some editors are especially bad about that - I'm looking at you Dreamweaver.

It's important for a few reasons. First, it's a lot easier to maintain when you can quickly identify your elements. Also, it makes it easier to parse. Granted, that's not something that's always done on a regular basis, but you'll be glad if you ever have to screen scrape your own HTML.

Don't repeat yourself

Understand how styles cascade and when to apply classes. Put your styles as high up the tree as possible. If a font is going to be applied to every element on the page, then apply that style to the body. Again, some tools are bad about this and will put the same tags in again and again. You want to put the style into a place where it's going to applied as widely as possible so that you don't have multiple places to manage that style - so you don't repeat yourself when it's unnecessary. Focus on applying as much of the styles as you can in the smallest amount of CSS possible. Just as you group code together so that you can re-use it to in different components in your application, put your CSS in external files that logically group your styles for reuse.

Writing good HTML is a craft. You should structure your HTML as carefully as you would your code, and you'll have a presentation layer that's maintainable and easier to manage. You may never be a great graphic designer like some people are, but you can still create great HTML and CSS.

To close it out, here's a few sites that are good to check out for HTML and CSS


 
Categories: html | css | webdesign

After being a fan for many years - since their first album - I finally saw the Black Crowes last night at the Madison Theatre in Kentucky.  It's a smallish theatre and only holds maybe a few hundred people.  I was very surprised that they were playing there since they usually play much larger places.

The show was general admission and normally - given that I'm 6' 3" - I tend to hang back as I try not to block people behind me.  Not this show. I was about 5 or 6 rows back the whole time. About 20 feet from Chris Robinson and 25 from Rich.  I hate being packed into crowds, but it didn't matter.

The show... best show I've ever seen. They started out playing 3 or 4 songs acoustically (Rich and Chris) and then after a few numbers the whole band kicked in.  They played for a little over 2 hours and did a great variety of material from their second album to their current one, with a few covers thrown in.  There were some great jams as well.  The jam they did at the end of Wiser Time made the hair on my arms stand up. 

I was really stoked that they played Thorn in My Pride, Remedy, Goodbye Daughters of the Revolution and so many other great songs.  I'm really excited to get the recording.  The Crowes tape every show and put them up for sale on Crowesbase.com.

One of the reasons that I'm so enamored with them is that they're a band that really plays. They interact with each other musically and really seem to enjoy it.  When another band member would take a solo, the other band members would pay close attention and play off of them. They're just a great group.

I'm definitely not going to miss them again.  I know that I probably won't ever be that close to the stage again or that I'll see a night like that again, but I'm definitely looking forward to seeing them again.


 
Categories: life | music

August 4, 2008
@ 12:36 PM

If you're a web designer or work on web-based applications, you should really take the A List Apart Survey for people who make websites


 
Categories: coding

I've been spending a lot of time with jQuery lately and have been really digging it. In fact, I'm doing a short grok talk on it for the Dayton .NET Developers Group at the end of this month.

Here's a short snippet I came up with to resize text boxes so that the width of the textbox would be proportional to the maximum number of characters allowed by the maxlength property on the textbox. It's not exact - through trial and error I figured out that 7.3 and 8 work as ratios for maxlength value to the corresponding width. That's based on the font I'm using and the size of the textboxes (smaller ones seem to have a slightly different ratio than larger ones). You'll probably have to tweak those values to get what you need, but it's a start.

$('input[type=text]').each(function() {
    var max_length = $(this).attr('maxlength');
    var multiplier = (max_length > 10) ? 7.3 : 8;
    var w = (max_length * multiplier) + "px";
    $(this).width(w);
});



 
Categories: coding | jquery

Maybe I'm being a little picky here, but DotNetKicks seems like they have been pretty loose with their definition of what constitutes a .NET story.  I like having a feed to the site that aggregates a lot of different .NET topics, but it seems like there's been a lot of tangential sort of stories lately.  I mean stories on JavaScript frameworks, HTML or Windows are ok, but they're really not that focused on .NET. I wonder if it's just a case of people simply kicking stories that they like, regardless of the relevance.

It would be nice if there was a way to downvote some of the stories that weren't really relevant but I realize that opens a whole other can of worms.  I'll continue to support the site, but I may end up dropping it out of my feeds if the trend doesn't change.


 
Categories: coding

July 28, 2008
@ 10:03 PM

Since I'm probably the last programmer on the web to write this post, I figured I'd finally get around to doing it.

How old were you when you started programming?

I dabbled a little bit when I was 10 or 11. My dad - a mechanical engineer - bought an IBM PC Jr. He knew a little C and Basic and I picked up on a few things. I also had some "Choose Your Own Adventure" type books where you had to write little Basic programs in order to progress in the book. For the life of me, I can't remember what they were called though. From there, I remember creating a program called "Froo" (presciently close to foo?) which was a series of ASCII art screens that told a story about an alien.

How did you get started in programming?

I started doing some HTML in college, making a website for my band, Red Earth. It was early enough that the first year I did it, I was viewing the site through a text-based browser. By the time I had graduated college with a secondary education degree, I had decided that it wasn't for me. I got a temp job doing data entry, which led to me a job doing release management. In that context, I was assisting someone who asked if I wanted to try some programming. I took to it pretty well.

What was your first language?

Basic when I was a kid, then a little VBScript/ASP when I started as a job. Perl was really where I cut my teeth though and was my first love.

What was the first real program you wrote?

Some sort of ASP website to display information entered from a VB 6 application.

What languages have you used since you started programming?

Basic, VBScript, Perl, Java, JavaScript, Bash, C#, VB.NET, Ruby, PowerShell

What was your first professional programming gig?

I'd consider my first professional development gig to be when I got a few months into release management, when I started to do a lot of Perl development.

If you knew then what you know now, would you have started programming?

Yes. The major thing I would do different is that I would have gone to school for computer science. I've always felt that I've missed out by not getting formal training. There's no substitute for wanting to learn and taking it upon yourself to discover new ideas, but I would definitely have changed my major if I knew now what I know then.

If there is one thing you learned along the way that you would tell new developers, what would it be?

Don't ever stop learning and trying to improve. This field moves so fast that you need to be aware of what's being discussed and what new ideas are being introduced. You don't want to be a magpie developer, but it's important to try out new things.

What’s the most fun you’ve ever had … programming?

Any time that I can implement a new idea successfully and the HTML renders correctly or the test goes green, I get a kick out of it. I still get a little bit of a thrill when stuff works. It's still a little bit magic to me.

I'd also say that working with Leon was always great. It was easy to get better at programming when I was sitting across the aisle from somebody who has as much passion about development as I do and wanted to learn just as much.


 
Categories: coding | life

July 17, 2008
@ 10:36 PM

I really like this quote from Todd Snider. It pretty well reflects how I feel about writing songs

"Mostly, I just think I'm trying to open my heart and say what's in there, and some days that's 'I love my wife' and some days it’s about the system," he said. "I just try to think of it in terms of sharing my opinion and not that I am educating anybody or trying to change their minds. It’s just an honest representation of where my brain's at. I don’t get to share my opinion because people think I’m smart, I get to share it with them because it rhymes and I know three chords."

from Todd Snider gets Inducted into Songwriter's Hall of Fame and Keeps on Touring

If you haven't checked out his music, you definitely should. He's especially great live. He's one of those guys who spends half the set just talking and telling stories, and it's always really entertaining. He comes around to Canal Street Tavern a lot, but it doesn't look like that's on the schedule any time soon.


 
Categories: music