Thursday, July 12, 2007

Why are Ruby Applications So Elegant?

I’ve had a bad case of Mac/Ruby envy lately.  I’ll post more on the Mac thoughts later, this post is about Ruby on Rails.

If you don’t know what RoR is, then maybe you should go to the website and take a look.

Tadalist1

I keep seeing these Ruby applications that are so simple, elegant, and useful.  Take tadalist for example.  This is a painfully simple application but it works the way I want it to and it’s always available.

I use tadalist more than I use Outlook’s todo list interface.

It’s just so much cleaner, it’s always available, and it doesn’t get in your way.

Maybe this is due to the “ruby way” of thinking.  I have seen countless applications written in JSP or ASP.NET that just look like someone vomited html all over the page.  Where are all of the interaction designers in the .NET space?

Another Ruby application that I have seen that I think is incredibly useful and elegant is Basecamp.  This is a project management utility that is basically the Anti-Microsoft Project.  They took all of the things that they didn’t like about Project and built Basecamp, stripping down tons of features to boil down into the a simple, useful project collaboration application.  Check out the screenshot to see what I mean.  The interface is slick, and it has everything you need to know, right there.

Basecamp1I used this to collaborate on a small project and found it to be incredibly intuitive.

It isn’t intuitive because it was written in Rails.  It is intuitive because the people behind it are brilliant.  And these particular brilliant people swear by Rails.

Every time I try to use Project to get a hold of the overall picture of my current project I get lost, and I don’t see much value in that beast of an application.

Thoughtworks is jumping in as well into the ruby space.  In a recent interview with Martin Fowler, he claimed that somewhere around 60% of their consulting work is in Ruby now.  60%!  I find that very hard to ignore.  Check out their newest online application for managing agile projects:  it’s called Mingle, and it looks awesome.

Mingle

I’ve found 2 more ruby examples that I am really keen on:  Warehouse and Lighthouse.

Warehouse1Warehouse2

Warehouse is a subversion repository browser with a slick interface.  It’s only 30 bucks, too!

 

 

Lighthouse looks even cooler.  It’s a bug tracking application that integrates with subversion and email.  I’d really like to take this application for a spin.

Lighthouse
 
These applications do share a common interface style, but that doesn’t exactly mean it’s a bad thing.  The design of these applications is simple, polished, and actually pleasing to look at.  Try to think about those things with Team Foundation Server and see if you get the same feeling.
 
This raises the question, Why are Ruby Applications so Elegant?  Well, not all are… but the majority are.  
 
I’d say, some major factors are:
  • The typical ruby developer is also a Mac user.
    • the typical Mac user appreciates design.
  • The mantra of “less is more” radiates from the language (Ruby), the web framework (Rails), and the interface.

I’m really jealous of the work that some of these folks are doing.  This is contributing to my Mac Envy, which I will post on later.

Am I just becoming a fan-boy?  What do you think? 

Tags: , ,
Tuesday, July 10, 2007

dasBlog Theme Contest - Deadline Extended

I’ve gotten a number of requests for this, so I’ve decided to extend the deadline for the dasBlog Theme Contest until July 22nd, 2007.  That gives 2 full weekends before the themes are due.

As a reminder, there is a $100 shiny Amazon gift card with your name on it if you can submit a slick-looking theme that impresses us more than the rest.  So far the response has been lower than expected, which means your chances of winning are better!

Creating a theme is easy.  It takes about 2 hours to get a fully working theme when you get used to the macros and the page layout, and maybe a few more to make sure that the site looks good in all major browsers.

I’ve also received a number of similar questions, so I’ll answer them here:

The rules for the contest state ‘no licensed material’ — does that mean I can’t use images under GPL, BSD, or Creative Commons?

No.  I wrote that more as a CYA requirement.  Basically as long as there are no restrictions in distributing the artifacts along with dasBlog we’re OK with it.  Just be sure to ask permission where warranted and always give credit.

I love the ________ theme from WordPress|MovableType|blogger|Subtext.  Can I just port that?

Absolutely!  As long as you follow the rule above, we’d love to see some familiar professional themes on dasBlog.

I don’t have a .NET environment to test out dasBlog… can I still participate?

I will help out as much as I can.  If you can provide me with a solid HTML template with all of the required pieces in place, I will try to help out getting it on dasBlog.

 

Any other questions?

See you at the Oklahoma City Code Camp

I’ll be at the Oklahoma City Code Camp on July 27th, 2007.

They’ve got a great speaker line-up and I’m truly excited to meet some people that I have only read or talked to over email.

On the speaker list:

I don’t know where I’m staying yet, but I think there will be a group discount somewhere.  If you’re going to attend, drop me a line and let me know what your agenda is.  See you there!

Sunday, July 08, 2007

Introducing Lizard Lounge for DasBlog

 Introducing my submission for the dasBlog Theme Contest(Even though I can't win, I thought it would be fun to submit an entry)

The theme is called Lizard Lounge.  This theme was inspired by the lighbox2 home page.

I'd love to hear what you think!  Let me know in the comments!Lizard_lounge

You can download the theme here:
File Attachment: LizardLounge.zip (43 KB)

Just unzip it into your themes directory and let me know if you have any issues.

Tags: ,
Tuesday, July 03, 2007

dasBlog Theme Contest!

In an effort to get some more good quality themes ready for the next release of dasBlog, I’m going to host a little contest.

Introducing...

The dasBlog Theme Contest

The idea is simple.  Submit a new dasBlog theme, created by you, using valid XHTML and CSS.  Entries should be original and should be zipped up and sent to me at subdigital_AT_gmail_DOT_com.

Are you ready for the prize?  How about …

A $100 (US) Amazon Gift Card !

The rules:

  • Mockups do not count.  They have to be either running online in dasBlog or submit the relevant files so that I can install them on a test blog.
  • Hint:  we respect valid XHTML and CSS.  Don’t abuse tables!
  • Multiple entries may be sumitted by the same person
  • Entries must be submitted to me no later than Midnight, July 12th. (That doesn’t leave much time!) The deadline has been extended to July 22nd, 2007.  Get started!
  • Send them to my email address (above) with the subject line dasBlog Theme Contest Submission
  • No licensed material on the theme — all images and artifacts must be made by you or publicly available
  • By submitting  you agree to allow us to package the theme along with dasBlog, if we so desire
  • You are allowed to place a small link at the bottom of the page identifying you or company, but no logos
  • The dasBlog team will judge the designs and the winner will be announced July 16th July 25th.

 The prize for this contest has been donated by Scott Hanselman and myself.

So how do I create a theme?

Creating a theme is simple!  The best way to learn is to open up one of the existing themes and take a look.  The basic structure of a theme is this:

Inside of your dasBlog directory there is a themes folder:

Blog_theme1

Each theme that you want to create (or install) goes in its own folder.  dasBlog ships with over 20 themes currently, so there are a lot to choose from as a starting point.  If you open the directory and take a look, you’ll see a folder for each.

Blog_theme2

Let’s take a look at mono.

Inside of the specific theme’s folder you’ll find all artifacts for the theme.  Any images, css, or template files go in here.

As you can see, there isn’t much to it…

Blog_theme3

 Notice the theme.manifest file here.  This is just a text file telling dasBlog that this folder is a theme and mono is its name.

Blog_theme4

You also have the opportunity to add named images, but you don’t have to do that if you don’t want to.

The next thing I want to open up are the 3 template files:

  • homeTemplate.blogtemplate – this is the main site layout.  This will be the most complicated template.
  • dayTemplate.blogtemplate – each day there are zero or more posts, usually with a date header at the top, but possibly other groupings by day.  This template will be rendered once per day (as long as there are posts on that day).
  • itemTemplate.blogtemplate – this is the post template.  Included is the template for the entire comments structure.

I will show the homeTemplate right here, just to give you an idea of what it’s like to edit the themes.

Blog_theme5

Most of this is standard XHTML, however you’ll notice the macro tags marked with <% %>.  These will be picked up by the renderer and replaced with whatever the macro calls for.  For example, to tell dasBlog to output your administration bar at a certain location, you’d write <% newtelliigence.adminBar()%>.

For a complete list of dasBlog macros, check John Forsythe’s page on macros:  http://www.jforsythe.com/jforsythe/projects/dasBlogMacros.html

That’s enough of an introduction to get you started, so….

Good Luck!

Thursday, June 28, 2007

10 Steps to Win the Family IT Guy Award

I’m sure that most of my readers are the “Family IT” people to their relatives.  You know, the kind of person that gets regular phone calls from parents, aunts, uncles, cousins, brothers, sisters, grandparents, kids, etc.

I have filled that role since I was probably 13.  Most of the time I would just get annoyed, but now, in my infinite maturity (), I have fully accepted this responsibility.  Here are the 10 steps you (and I) should take to win the Family IT Guy award…  come on, you know you want it!

Family_it_guy

Step 1:  Get a Good Backup Strategy

It starts with a backup strategy.  I have a 500GB Western Digital My Book that takes images of my home PCs and stores them.  This pretty much works, except when my house burns down I have nothing.  My wife has about 45 GB worth of family photos and digital scrapbooking material.  It would be catastrophic to lose all that stuff.  It’s irreplaceable.  Other data that is important to backup are digital scans of driver’s licenses, social security cards, birth certificates, tax forms, etc.

So I setup both of our computers (mine and my wife’s) on Carbonite online backup.  Carbonite installs a little background process that will backup your files behind the scenes.  It’s less than $50/year and you can store unlimited data.  Your data is encrypted and uploaded and you can pull it down at any time.

It also installs a little explorer overlay icon that shows you a blue, green, or yellow dot.  Green means backed up, so your family knows they’re safe.

Step 2:  Keep Spare Parts Around

I can’t begin to count how many times a family member has asked me for a network cable, or a sound card, or a network card, or just about any other piece of hardware that a computer needs.  Since I do a lot of tinkering with computer hardware, I tend to have a lot of spare parts.

Your uncle will appreciate not having to order a new sound card for $15 at the local computer shop or (gasp!) online at newegg.

Step 3:  Keep a Digital Toolbelt on you – A 2GB USB Drive

I have a copy of every tool from SysInternals on my USB Key. They are invaluable when digging deep into Windows problems.

I also put portable apps such as Firefox Portable my thumb drive.  This allows me to run a better browser when nothing but IE 6 is installed.

Also grab a copy of ClamWin Antivirus Portable (or regular version) or another free AV program.  You never know when you’ll have a cousin jump out of the bushes and ask you to clean their laptop.

Keeping a thumb drive on you will make it a lot easier to use a family member’s computer.  The last thing you want to do is have to come back later with the right tools!

For a good list of essential tools, check out Scott Hanselman’s Ultimate Tools List.

Step 4:  Setup Family Email

We’re all tired of email addresses like JRod44222354@aol.com. (Apologies if that is your email address.)  I recently setup scheirman.com as my family domain name and gave most of my relatives their own email address.  Most of them were pretty excited to have a firstname@lastname.com email address.  Of course if your last name is Smith, then you’ll have to get creative.

To host the email I’m using Google Apps for Your Domain and it works like a charm.  Not only do you get all the goodness of GMail, but you get a personal email address as well!  Their interface is slick and easy to use.

Step 5:  Advise on New Computer Purchases

Don’t let your Grandmother buy that new computer from the neigbor kid down the street.  If you see your cousin walk into the Sony Style store at the mall with an armload of cash, stop her

Computers are cheap.  Unless you want a high-end gaming rig or a video processing machine, your standard Dell fare will do you just fine, and often times under $600.  It comes with a warranty, which saves you a headache for at least a year .

Step 6:  Get a Remote Access Plan

When your sister calls you from Montana and says she needs help adding a user to her computer, be ready.  With some good remote access software it can be painless to just take control and do it for her.

FogCreek Copilot is supposed to be good.  Joel Spolsky’s company Fog Creek Software wrote it and I have heard good reviews.  It’s very cheap for about an hour of use and “it just works.”

Crossloop_screenshot_small

CrossLoop is a tool I just tried out the other day, and it also “just works.”  You and your relative can download this in less than a minute, run it, and be connected even behind firewalls.  Best of all, it’s free!

I used this the other day when I was helping my wife upload some files to her blog with an FTP client.  I didn’t have much time and it was a bit difficult to explain over the phone, so I told her to download the client, click “Host” and then read me the number on the screen. 

That’s all it took!

 

 

Step 7:  Don’t Get Annoyed

PC Enthusiasts frequently whine and moan about having to help their relatives about how to use the computer.  It’s easy for us because we use it everyday.  Many non-techies perceive computer gurus like they do auto mechanics or lawyers.  We don’t want this kind of image!

The next time you walk up to your computer, take a look at how many buttons there are.  What if your Grandmother sat down for the first time to use a PC?  It is incredibly intimidating and complicated.  How did you react when you first got a virus? 

Cut your family some slack.  Be Patient.

Step 8:  Spread the word. 

Get your peeps using Firefox instead of Internet Explorer.  Tell them the wonders of GMail.  Explain to them that there’s more than the MSN home page.  Getting the word out is the only way you can ever expect people to see the light.

When someone forwards you an email with a taseless joke or a reason why you should thank the heavens for waking up in the morning, only in ALL CAPS… politely inform them of internet etiquette.  Don’t just push the SPAM button.

I bought my dad a copy of the Lifehacker book for Christmas last year.  He loved it.  It’s full of useful tools and tricks to make your computer work for you.  He’s a computer guy, mind you… but not the typical person who would read www.lifehacker.com on a daily basis (though now he proabably does).

Step 9:  Find a Protogé

You can’t do this stuff forever.  Look at the younger folks in your family that can help take the throne.  Tell them, “One day….  this will all be yours…”

Be a mentor about good computer usage and troubleshooting.  Don’t be stingy with The Badge.  Pass it on.

Step 10:  Let Your Family Know Your Other Interests

I enjoy playing guitar, swimming, grilling food with family, playing board games, reading books, watching movies and addicting TV shows.  If all you talk about is World of Warcraft, people are going to think you are weird.  Let your family know that you are at least a tad normal, and that you do enjoy sunlight once in a while.

 

So there you have it, there are my 10 steps to becoming a good Family IT Guy.  A lot of my Family IT Guy inspiration comes from Scott Hanselman, who seems to have all this down pretty darn good.  I hope his family knows how good they have it.

Friday, June 22, 2007

Run as Administrator on Vista to Fix Weird Program Issues

I’ve been running Vista for about 6 months now, and I really like it.  There are a lot of issues that I have run into, but some of the minor ones are easy to fix.

For example, I downloaded e-texteditor which is like TextMate for Windows.  It uses Cygwin for some advanced features, so when you try to use then (like Alt-Shift-Comma for auto-wrapping html brackets and closing tags on a word) — E goes to install Cygwin.  Under Vista, clicking on “Install” does nothing.

E - a TextMate clone for Windows

The solution is to Run as Administrator.  A lot of programs out there aren’t testing on Vista so they don’t realize that many of the features require elevated access, and if they silently suppress the issue, the user never knows what’s going wrong.  It’s the fault of the application, not Vista.

SQL Management Studio Express does this to me as well.  I always have to run that program as Administrator.

Tuesday, June 19, 2007

Reflection and Inheritance with Generics

I was working on some SubSonic entities today and I wanted to access some of the properties of the generated classes, not knowing which database objects will exist.

Basically I wanted to write a utility method that would pull out all of the ActiveRecord<T> types in a given assembly.

This was my first attempt:

public static Type[] GetActiveRecordTypes(Assembly assembly)
{
	List<Type> types = new List<Type>();
	foreach (Type type in assembly.GetTypes())
	{
		if(type.IsSubClassOf( typeof(ActiveRecord<__WHAT_GOES_HERE_?__>) )
			types.Add(type);
	}
	return types.ToArray();
}

The part in bold is where I got stuck. Sticking in type there doesn't work. It won't compile.  I wouldn't let that stop me, so I created a temporary solution like this:

if(type.BaseType.Name.Contains("ActiveRecord")) { ... }

This works, but it's a hack and it's brittle. I asked a few friends and Gary DeReese came to my rescue with the following code:

  Type baseType = type.BaseType;
  if(baseType.IsGenericType && 
	baseType.GetGenericType() == typeof(ActiveRecord<>) &&
	baseType.GetGenericParameter()[0] == type) { ... }

It's good to have smart friends you can reach out to in times like this where you just aren't thinking about the problem the way the framework wants you to. Thanks Gary!

Monday, June 18, 2007

VSTS Db Pro - Which Database Project?

I installed Visual Studio Team Edition for Database Professionals the other day and I was about to create my first DB Pro project.

Check out the New Project dialog box.  This is with VSTS Developer, and DB Pro installed:

Image001

and…

Image002

Seeing as how I never used the standard database project in Visual Studio before, I couldn’t tell which one I was supposed to choose. 

It turns out that you need to pick the one in the 2nd screenshot, the Microsoft SQL Server project. 

Wasn’t very intuitive which project to choose.

Tags: ,

ASP.NET Essentials - The Label

After talking to developers for a few days about basic HTML and ASP.NET topics, I find that I always focus on the Label control.

More specifically, I’m talking about the <label> tag in HTML.  What does this tag do?  Why should we care, when we can just write the text before an input control on the page?

For starters, the label has semantic meaning.  The <label> tag gives meaning to a textbox or a dropdown.  If you were blind and browsing using a screen reader, you’d appreciate the little semantic tidbits that give you an easier browser experience.

Another benefit is that we can select and style the label easily, making the transition to table-less forms so much easier.

A third and possibly more useful benefit is that the mouse stays as a pointer, and clicking on the text sets the focus to the corresponding control.

The usage in standard HTML is like this:

<label for='user_name'>User Name:</label>
<input type='text' id='user_name' />

This results in the following example:

(notice how the mouse cursor stays as a pointer, instead of the standard text cursor)

If you were a reasonable person, you’d think that the <asp:label> control would render as an HTML <label>, but you’d be wrong.  ASP.NET renders a standard <asp:label> as a <span>.  ASP.NET 2.0 fixed this, however you have to specify the AssociatedControlID property to change the rendering behavior.

This leads me to another point that I’d like to make with the Label control.  Often times we just want a static label, like in the example above.  If we use the <asp:label> then we’ll have a server-side component as well and a viewstate hit.

Label_render

We certainly don’t need viewstate in this scenario,  Often times we just neglect these things until they are a problem. 

I can hear you say it now… “but Ben, you can disable Viewstate by specifying EnableViewState=’false’ “…  I know you can.  But it’s too easy to just leave it as is.  There’s also an easy alternative.

You can accomplish the same rendering without the viewstate issue by just typing this:

<label for='<%= txtUsername.ClientID %>'>User Name:</label>

This will render the same way, but also ensure that we get the generated ID of the control that we are associating with.  This will not have any server-side component or any correlation to ViewState, and it is actually less characters to type.

Hope you find this information useful!

Loans - Credit Card - Mortgages - Scottsdale Landscaping