Monday, November 27, 2006

What I Did On My Thanksgiving Vacation...

Like most people, I travel to see my family over the holidays. Seeing as my family lives on the other side of the country, and the departure of America West airlines from Columbus has left me with no direct flight options, and my steadfast refusal to pay $800 - $900 for one round trip coach ticket to Las Vegas, I spend a lot of time during the holiday season sitting in airports for several hours on end.

My Confession

I can’t sleep in airports. In part it’s because I am a bit paranoid of missing my flight when it is called, then having to scramble at the busiest travel time of the year to make other arraignments. I guess I’ve seen “Planes, Trains and Automobiles” too many times. Also, in spite of all the post-911 security measures, I don’t know that I feel secure enough to take a nap without someone “watching my back.” I’m too afraid that when I wake up, I’m going to pick up the wrong knapsack, then the drug dealers, terrorists and CIA will all be chasing me to retrieve it, not believing that I am just a guy who was in the wrong place at the wrong time. OK, I guess I’ve seen too many James Bond movies too.

So, to pass the time I always bring a few books with me. Over my abbreviated Thanksgiving vacation, I had a chance to read two:

Programming Atlas

This is the first (and from what I could find, only) book on Atlas. O’Reilly was touting the “Rough Cut” of this at Tech Ed., and this, I suppose, is the result. All in all, it’s an OK book. Since there have been at least two revs. of Atlas since it hit the presses, the details are a bit dated. A lot of the examples will not work now, and no updates have been posted to the books site. A lot of the underlying “fundamentals” of how Atlas works are there, but it doesn’t go deep enough make up for the lack of practical working examples. Examples are presented in a way that violate almost every “best-practice” in web development, which I understand may be a good idea for the sake of clarity in presenting an example, but never advises the reader where they are deviating from the way things should be done. Not good for “less seasoned” developers who tend to parrot what they read in a book as opposed to applying the knowledge to their own needs.
I also feel the books spends too much time on the JavaScript side of the equation, teaching you how to manipulate Atlas controls via JavaScript while only devoting only a few pages to update panels. Don’t get me wrong, the JavaScript stuff they show is cool, but the way they present the information does not make Atlas seem all that much easier or more useful than good ol’ client-side JavaScript. That’s especially true when you take into account that only 30 pages of an over 300 page book is dedicated to using Atlas with Web Services.
It’s got some cool sections about extending controls and writing Atlas controls on your own. It also had a chapter on using Microsoft’s “Virtual Earth” which made me appreciate how easy to use the Google Maps API really is. Granted, I’ve never actually used Virtual Earth, but if this book is any indication, I doubt I ever will. A chapter on Web Parts also seems kind of thrown together and not all that useful. All in all, you’re better off just sticking to the tutorials Microsoft offers on the Atlas website.

And yes, I know that the offical name is "ASP.NET AJAX." But I just got people used to the terms "AJAX" and "ATLAS" and understanding that they were not always interchangeable. It took weeks! So with certin people at least, I'm going to continue calling it Atlas for the time being. Besides it's easier to say "Atlas" than "ASP.NET AJAX."

HTML Utopia: Designing Without Tables Using CSS

Ahhhh…. Much better. Pretty much any web developer worth their salt has read “The Zeldman Book.” I almost referred to it as “The Orange Book” out of habit, but since the second edition is green I will need to work to break myself of that habit.
Anyway, I’m sure most of you have read it. While I enjoyed the book, and agreed with its premise, I was a little disappointed with a lack of practical “This is how you do it in the real word” type of content. This book does an excellent job of bridging the gap. It starts with an explanation of what web standards are (it even references A List Apart) and why you should use them. It does a great job of explaining the need of accessibility, and gives some pointers on how to achieve this. The “best-practices” of CSS are explained. From there, the book is chock-full of practical CSS knowledge from setting colors and fonts to creating various layouts all without tables. The last third of the book in a series of appendixes that among other goodies has a pretty extensive reference of CSS attributes. The authors do a good job of pointing out where different browsers implement the standard differently, but I notice that no reference was made to the Internet Explorer Bug in their discussion of the “Box Model.” That glaring omission aside, I found this to be one of the best CSS books I’ve ever read, and I wish I had found the first edition of this book a couple years ago.


So, with Thanksgiving gone, I’m getting my reading list for Christmas together. So far, the only thing on it is “The Security Development Lifecycle” by Michael Howard and Steve Lipner. I actually picked this up at Tech Ed, but due to more pressing matters, didn’t start reading it right away. Then I sort of… uh… forgot about it. Hey it happens! I “rediscovered” it during the move, and it is back on the list.

So, if anybody out there has any suggestions, let me know!

Wednesday, November 15, 2006

"Lose Wieght Now, Ask Me How" the Series

Well, people really seemed to like my “lose weight” post and have asked me for some more “detailed” information, which makes sense since the original post was so short. So, I’ll be posting a series of articles on how I lost the weight. You are free to follow along, but just remember that everyone is different, and what worked for me may not be best with you. You should check with a doctor when in doubt.

This is going to be a series of articles. I’m going to start with food. I’m going to cover exercise as well, but not today. I’m probably going to switch back and forth.

Forget what you think you know

When people want to lose weight, instinctively the first thing they try to do is eat less. They cut out in between meal snacks. They even sometimes try to cut out whole meals (like breakfast). That isn’t going to work. As I said in the previous post, your body uses food for energy and to replace dead cells and keep the body healthy. If you limit the amount of food you eat, or how often you eat it in a drastic manner, the body believes it’s starving and will fight back. You will have less energy and your body will start to cannibalize itself to survive, usually starting with the muscles. Which means you’ll lose weight, but not fat. You’ll also be sick and kind of gross looking.

What to Eat

Everything you eat is one of three things, all of which you need;

  • Protein – Meats, eggs, nuts, dairy, etc.

  • Fat – Just what it sounds like

  • Carbohydrates – Everything else.


You need protein because it’s what your body is made of. Without it you will shrivel up and turn to dust! OK, maybe not. But, you will have heath issues since proteins are actually amino acids, which you need too do things you enjoy, like being alive.

You need fats because they are what you body uses to make hormones. They are also used to make healthy skin and hair. So without fat in your diet you will be a cranky person with dry cracked skin and bad hair. But that wont matter because you’ll also be dead. Turns out that there are fat soluble vitamins that you need that can only be absorbed in the presence of fat (more on vitamins later). There are good fats and bad fats. Again, I’ll expand on this later, but for now use canola for high-heat applications, olive oil for cold/no heat applications. Use butter (sparingly) instead of margarine and for now, no deep frying.

Carbohydrates are plant matter, and either come in the form of sugar (the plants energy source) or fiber (the plants structure). Fiber helps you not cry when you go to the bathroom. Nuff said, just eat it. Sugar is used to provide energy. Refined sugar, literally plant sugar that has been refined down to being super-concentrated, make things like table sugar, corn syrup and pretty much anything on an ingredient label that ends with “-ulose.” Refined sugar is bad because it promotes a heavy insulin response (more on why this is bad in a latter post). Natural sugars are found in things like fruit and fruit juices. Starch is sugar, but food generally considered “starchy” like potatoes and corn don’t have as much fiber that fruit does. “Starchier” sugars are also more concentrated than sugars from other plants, so moderation is key.

You do need both types of carbohydrates. The why is a little more complicated than why you need protein and fat, so I’ll save if for when I talk about how metabolism work. For now, try to eat at least two pieces of fruit a day and try to limit the amount of starchy foods. Try to limit foods high in sugar or starch to earlier in the day (I try not to have any after 3:00PM) Try to eat at least four servings of vegetables a day.

OK, I realize I didn’t give too much advice about what specifically to eat. So, without further explanation, here is a sample menu for me for one day:

  • 7:15ish AM (post workout) 2 eggs + 2 egg whites scrambled

  • 10:00 AM – One serving of fruit

  • 12:00 AM - Lunch. Today it was chicken fajitas minus the sour cream, pico de whatever or tortillas. Basically, just the “hot part.” Yes, some people think this is weird. No, I don’t care.

  • 2:00 PM – One serving of low-fat yogurt (plain)

  • 4:00 PM – One protein bar

  • 6:30ish PM – One large salad with olive oil and balsamic vinegar. One (lean) pork chop. One serving steamed broccoli.

  • 9:00is PM (bed time) – One protein shake

During the day, I drink about one gallon of water

By the way, “water” does not mean “diet soda.” It means water.

Friday, November 10, 2006

The Great Pumpkin Question...

Normally, I don't do requests. But Brian <Anzalone> recently suggested I do a post where I discuss the age old question; Street Fighter II vs. Mortal Kombat. But I thought that was a stupid idea, so instead I'm gonna talk about Windows applications vs. Web-based applications.

Definition of Terms
For those non-techies who are still reading, like my parents, Windows applications are applications that you install locally on your computer (your hard drive) and you can run without being connected to the Internet. These are applications like Microsoft Word and Microsoft Excel.

Web-based applications are applications that you used through a web browser. The most popular web application is Google, but others include Mapquest and things like on-line banking websites and bill-pay sites like Check Free.

Which One to Use In One Easy Step
A lot of people who don't develop applications on both sides of the argument think that there is only one answer to the question "Should I make this a Windows application, or a web-based application?" and they are right. But it's not the answer they think. The correct answer is "it depends."

Tale Of the Tape
Windows applications have some definite benefits of Web based applications. From a developer’s side, it can be easier to control the way a user interacts with the user interface in a Windows application. For Web Applications, you're sort of at the mercy of the interaction the user has with the browser. Things like the "Back" button, navigating directly to an address inside the application or simply shutting down the browser in the middle of an operation are all things that the developer and architect have to work around in the "Web World."

Since Windows application run entirely on the desktop and don't generally have to make a bunch of calls, or post backs, to the server, there is the (perception) of speed as well. Technologies like AJAX and ASP.NET AJAX (formerly Atlas) have all but eliminated this advantage however.

Traditionally, user interface design on Windows applications has always been easier; you just put a component on a Winform, set some properties and you're done! Web Applications have been a little more complicated than that; back in the "old days" you used to have to create tables and use those to format you user interface. The other issue had been that not all browsers rendered all controls the same way. Heck, some browsers didn't support certain controls at all! With the growing adoption of Web Standards and the growing use of CSS style sheets to take care of all formatting (leaving HTML to be the keeper of the content) this is another factor that is starting to swing towards Web Applications favor.

To change the whole look of a Web Application you simply change the style sheet. No so with Windows Applications; if you were smart you may have a user interface hierarchy, allowing you to make changes to a few base forms which will propagate through your application. If not, you were visiting EVERY window in your application and changing every control on that window.

“Client side” scripting and validation is one area where Windows applications may still have an upper hand. Javascript has come a long way, but it is still ugly and not a lot of fun to debug. ASP.NET AJAX shows some promise in alleviating this, but it still in it’s infancy in that regard. Windows applications don’t have this issue, your presentation layer is easily accessible, easily automated and easy to debug.
Deployment is a mixed bag. Web applications are easy to deploy. You just put the application on the web server of your choice, send your users a link (or if you’re really snazzy and on top of the whole “Enterprise Computing” thing, you’ll have a portal for the users with a link to your new application) No going to each users machine, installing local components, making sure they have all the prerequisites, installing the application and setting up the database configuration. Now multiply that times about 250. So, in a corporate environment, with a centralized server, Web is clearly the answer for deployment purposes.

For all of Windows deployment headaches though, it’s still easier to write an install package for a home user buying a shrink-wrapped product than have them set up a Web-based application on their computer. Most home users aren’t going to be savvy enough to know if they have IIS or Apache installed, let alone how to configure it.

What to Do, What to Do...
When I am working on an application and I have to make the decision about Windows vs. Web, I ask myself some questions:

  • Is this application going to be deployed in a corporate environment, or shrink-wrapped?
  • Where is my data going to live?
  • How often will the application need to be upgraded?
  • Who is going to support this application?
  • Does this application need to be Section 508 compliant (if you get ANY money from the Federal government, the answer is “yes.”)
  • What kind of machine is it going to be deployed to?
  • What kind of infrastructure am I going to be working with?
  • What kind of security issues am I going to have to deal with?
  • Is the user going to allow cookies and have Javascript turned on?
  • Who is the applications audience?
  • Is the “content” of the application going to be static?
  • What does the client want? (Remembering that the client is NOT always right, but they are always the client)

The way these questions get answered will generally lead you down the correct path. Yeah, some questions are more important than others, but it’s good to have as complete a picture of what’s going on as possible.

Regardless of which avenue you choose, good architecture is important. A lot of bad Web applications have been built by people who thought you could design them to be just like Windows applications. It’s apples and oranges, and each has unique challenges.