Tuesday, August 22, 2006

David doesn't get it

{

David Pogue, tech writer for the New York Times claims (follow up here) that perhaps the reason that there are so many Wintel vs Mac computers in corporate America are because IT folks just want to keep their jobs and the viruses, spyware, and a defective Microsoft operating system help them. A corporate environment with Macs and fewer issues would, according to his logic, result in less work, a smaller budget, and a smaller IT staff.

But Pogue is missing a big aspect of the corporate world: what Visual Basic was historically, and what the .NET Framework is today. Corporate environments are filled with throwaway programs that are very specialized towards people's business needs. Without an environment like that (with serious investment) on Macs, that sort of shift is not possible. It harks back to Balmer's "Developers, Developers, Developers!"

Web applications are removing this disparity between operating systems, but I wonder if Apple sees developers as tightly bound in their corporate strategy as Microsoft does. Because they don't, and don't understand corporate software, it lends itself to the chasm between Apple computer and the business user.

ps. I'm aware of Filemaker and Xcode, I just don't think they are as good. As a thought experiment, compare how much Apple bets on these with how much Microsoft bets on Visual Studio and .NET.

}

Saturday, August 19, 2006

Ruby $LOAD_PATH Watir

{

On and off I've been messing around trying to get Watir to work on my machine. The gem installed properly based on the instructions given to simple go to the command line and use the following:

gem install watir

But when I tried to execute a simple test I got the following:

uninitialized constant Watir
./watir.rb:6
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'
C:/CODE06/RubyStart/WatirTest.rb:7
./watir.rb:6: uninitialized constant Watir (NameError)
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'
from C:/CODE06/RubyStart/WatirTest.rb:7

It seemed like an environment variable was not properly referencing the library but when I hunted for it I saw no environment variables. I ran the unit tests for Watir and it seemed to have installed correctly but I noticed the following at the beginning of each:

$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__

Smells like a path the the library so I investigated with:

puts $LOAD_PATH

which shows me the following:

c:/ruby/lib/ruby/site_ruby/1.8
c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt
c:/ruby/lib/ruby/site_ruby
c:/ruby/lib/ruby/1.8
c:/ruby/lib/ruby/1.8/i386-mswin32

In order to get the script working I just hacked the $LOAD_PATH to include a hardcoded reference to my Watir libraries:

$LOAD_PATH.unshift 'c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1'

From there I was set with the following simple script:

require 'watir'

include Watir

ie = Watir::IE.new
ie.goto("http://www.t3rse.com")

I'll dig into this - I haven't had the patience to sit down with a Ruby book just yet (anyone have ideas?) but if anyone has a similar problem running Watir, here is a hack to get you started if this is a hit on your Google search.

}

Friday, August 18, 2006

Podcasts to invoke musing, mulling

{

I love a good podcast. I started as a very regular listener on IT Conversations and have since drifted around looking for quality material. IT Conversations started with a lot of good content but it seems as though of late its drifted into MBA type material which is a bit vague for me; I prefer good technical podcasts.

Some places I've found myself consistently happy:
1. Hanselminutes - great coverage of the .NET universe along with other technical topics such as Syndication, SCRUM, and the like.
2. Software Engineering Radio - I am working at restraining myself of cultural stereotypes but the SE Radio crew are very, very concise. They have a much better depth of coverage than other technical podcasts
3. .NET Rocks - good show with an excellent track record. Sometimes just a touch too long, but I've always liked DNR.

I've listened to a few podcasts from WebDevRadio. Much of what I heard was good, and I like how it takes me out of the exclusively .NET universe a bit.

From IT Conversations, my favorites up to this point included Steve McConnel, Joel Spolsky, Philip Greenspun, Will Wright, and Paul Graham.

Although Venture Voice isn't really that interesting to me, Jason Freid and Joel Spolsky have some good interviews there as well.

In the "lost podcast" genre - David Heinemeier Hansson of 37 Signals had a great talk at Carson Workshops where he talks about the basic philosophy of Ruby on Rails. I don't see a link to it but if you find it, it's good. Simon Incutio took some great notes that will give you a good idea of what was said.

Well, there are a lot of podcasts out there; too many for me to get to. These are most of the ones I keep going back to and finding gems.

Peter Seale has a much more comprehensive listing here. I'm looking forward to going through his list, it would be nice to make a website that kept a nice listing of such podcasts. Not necessarily aggregated, but something maintained by a more trusted curator.

}

Thursday, August 17, 2006

Kiko Lessons

{

I posted yesterday about the speculation going on about their folding. Here it is from the proverbial horse's mouth.

}

Wednesday, August 16, 2006

Small Teams, Better Software

{

Via Raganwald, there is a small post on how smaller teams make better software. There is a nice balance between the need for methodology and the idea that people matter most. Agile thinking indeed.

}

Kiko, Down For the Count But...

{

... will they get up? Buzz is all around since the Y-Combinated Kiko is folding and being auctioned off. I was interested in what looked like a blog post retrospective of the whole thing until I realized it was just someone speculating, not the kids from Kiko writing about what happened.

Truth be told even though web calendars are interesting software, I really don't use them. I used Kiko a few times just to see how it worked and was impressed with what it seemed to take programmatically. And that's how I judge the whole thing - as a technical achievement, not as a sales person's way of making a lot of money even though they may have hoped for that side effect.

Now if I had $50,000 and a lot of motivation I'd get that source code and make a calendar component for .NET - the last one I worked with was no fun at all. And of course I know nothing about being profitable; it would be an interesting project is all.

}

Saturday, August 12, 2006

Yegge's Kingdom of Nouns

{

I'm late to the party once again; I discovered Steve Yegge just recently and ran across his essay "Execution in the Kingdom of Noungs." Yegge is a great writer and I can see why the essay recieved a lot of attention. Yegge basically asserts that Java is a kingdom of nouns; a language which focuses on things (objects) which he parallels as "nouns" over actions which he parallels as "verbs." This leads to a lot of verbose monstrositities in code and is, in his opinion, a bad thing compared to languages where verbs are parallel or even more first class than nouns - from which we get references to functional languages and the nirvana of LISP.

I remember learning java many years ago coming from the black sheep of all programming languages, Visual Basic. When I got to programming user interfaces with AWT and SWING, I remember being mesmerized by the sheer weight of it. In Visual Basic, one would double click on a button and the tool would create an event procedure that looked like this:

Sub MyButton_Click()
'code here
End Sub

I made the assumption that the tool was abstracting details away for me, but it was simple, intuitive, and effective.

In Java, I learned that to write an event handler I needed to implement an interface with a different class or override a method from an anonymous instance of a class that implemented the event handling interface. At first it seemed cool to throw all the terms around: "listener interface, anonymous instance... " but I had trouble stitching it all together cohesively by hand. It's been a while but I remember liking the idea of keeping a separate class to do my event handling rather than using an anonymous one but running into the trickiness of making references to data in the UI class where the event was being triggered.

I thought this was just a matter of tools; if I got the right IDE I would be able to nail the issue. But the IDEs I used tended to do things differently; I'm digging into memory here but I remember liking Borland's JBuilder for development and disliking how it used Borland helper classes for event handling to try to clean things up.

I think Yegge could have driven his point home about nouns if he'd focused entirely on event handling. To handle an event you need to know about two nouns: the listener interface and the class that implements that interface for you wherein you are given an opportunity to write your code.

I remember getting finally to go to training in Java (after I'd taught myself most of what I'd eventually know) and asking about that. People looked at me with the condescending "complexity is cool" look that usually sends Visual Basic programmers back to their environments to be productive.

And I can see some niceties of the extra nouns in Java. Building even more layers of abstraction is easier (e.g. handling many events with the same class implementing the listener interface) -

It's been a long time but I may be returning to the Java world; I made need to get Java certification for academic reasons. It will be interesting to study the language again with these thoughts in mind.

}

Monday, August 07, 2006

Joel, MapReduce, Javascript Closures, Flanagan

{

Older news is that Joel posted an excellent essay called Can Your Language Do This? where he walks through some of the basics of passing function references around in Javascript. I'll beat my old drum and say that Javascript is an intricate, powerful language.

The timing for the article is great because I'd just recently used function references as an approach to handling some client side script that needed to be synchronous. In the application we use a popup window that is launched in javascript and then based on some input from the user we pass back information to the page so that it can know how to proceed. The problem with this approach, however, is that a popup window is a disjointed entity from the page it popped up from and the thread that invokes the popup will not wait for the user to close the window before continuing with the rest of the javascript. My solution was simple: pass a callback function to the popup and use that to make sure the user interaction was finished before proceeding with the parent page's code.

Another essay I managed to finish over the weekend that runs along the javascript and functions as datatypes is Javascript Closures For Dummies by Morris Johns. Concise with beautiful typography.

One final thing: David Flanagan has a 5th edition of his Javascript book coming out from O'Reilly this month. I'm excited to see what his treatment of the latest developments such as Ajax will be. It will be painful to be buying that book for the third time, but if I get even a piece of the mileage I got out of the 4th edition, it will be well worth it.

}

Scott Gives Open Source, Step by Step

{

I've been wanting over the last few days to post Scott Hanselman's step by step tutorial on how to contribute to the DasBlog open source project. This weekend I had a chance to go over it, albeit without duplicating the steps - I'll do that soon enough.

It's always seemed a little sad to me that those of us working primarily with Microsoft development tools aren't as given to collaborating on anything that is either outside the scope of normal work or commercial effort. It's been a goal of mine to contribute to an open source project for a while and it's nice to get this little push in getting that done.

I did download DasBlog around TechEd time to study the structure of the application. It didn't quite install as easily as the *.vbs the readme file discusses but it was a simple permissions issue that I resolved by resetting server extensions on the virtual directory. At the time the NUnit 1.x binary was also unavailable so I had to remove the test projects in order to get it to compile.

Before I start writing patches, however, it will be important for me to have a proper understanding of the application's purpose, design, and implementation. I'm hopeful that my contributions while "dogfooding" will be more meaningful.

}

Step by step start to WPF

{

Posted by Snowball. I'm posting it for some future date when I have time to poke around...

}

Wednesday, August 02, 2006

Google Code vs SourceForge

{

Comparison is made here. The use of Subversion on Google Code makes it appealing to me since I was planning to use Subversion for my home brewed projects anyway.

}

Linus on Visual Basic, Norvig on Javascript, Heinemeier Hansson on taste

{

Courtesy of John Lam - some of the greater fish in the sea of programming answered some questions on Sztywny Blog:

Sometimes you don't know whether a compliment is a compliment. Linus Torvalds says Visual Basic did more for programming than object orientation.

For example, I personally believe that "Visual Basic" did more for programming than "Object-Oriented Languages" did. Yet people laugh at VB and say it’s a bad language, and they’ve been talking about OO languages for decades.

And no, Visual Basic wasn’t a great language, but I think the easy DB interfaces in VB were fundmantally more important than object orientation is, for example.
Peter Norvig, yes that Peter Norvig at Google thinks he needs to keep improving his Javascript. It always annoys me when people think they know javascript - not that it's unknowable, but knowing how to do alerts and toggle DIV visibility is for kids.

David Heinemeier Hansson gives the answers I would expect from him, especially espousing "values" as standing between good and mediocre programmers. For a long time I've been wanting to blog about his talk at Carson Workshops concerning "beautiful code."

The whole round table interview is interesting.

}

Monday, July 31, 2006

Slick Domain Search

{

Via a friend of mine, White African, InstantDomainSearch.

}

Thursday, July 27, 2006

Subversion

{

An excellent online book covering the software.

}

Google Code

{

Wow, this is an interesting development: Google Code is an online project hosting/collaboration site. I'm sure they wouldn't describe it as an "answer" to Microsoft's own new project hosting/collaboration site, Codeplex, but the timing is interesting. The question that begs itself is "whatever was wrong with our old friend, Sourceforge?"

}

Wednesday, July 26, 2006

Generics + Bad Idea Jeans

{

I can't get the Bad Idea Jeans SNL sketch out of my head, but I'm not sure I trust myself. At the request of a coworker, I wrote the following to show how a generic Dictionary could be returned from a method with underlying types for key/value stated ahead of time:




public static Dictionary<X, G> BuildDictionary<X, G>(string cmd, string keyColumn, string valColumn) {
Dictionary<X, G> myDictionary = new Dictionary<X, G>();
SqlDataReader rd = new SqlCommand(cmd, GetConnection()).ExecuteReader();
while (rd.Read()) {
myDictionary.Add((X)rd[keyColumn], (G)rd[valColumn]); // ? good idea?
}
rd.Close();
return myDictionary;
}




It leverages generics to define the returned dictionary so that a call could be made like this:




Dictionary<int, int> data = DBDictionary.BuildDictionary<int, int>("myproc", "key", "val");




Perhaps I'm paranoid, or I've been burned too much, or I'm not scared of a little type dynamism, but this seems like a Bad Idea. The big reason, of course, is the casting that goes on in the method:

myDictionary.Add((X)reader["someField"], (G)reader["someField"]);

Reasons for my anxiety?
1. What if the underlying field has a change of type? You won't know until runtime when things blow up.
2. Maintenance if underlying field type does, in fact, change. If being type specific is avoided, you can gracefully accept these changes without a recompile. Even if your lookup (what's in the dictionary) is used, if it's passed to a SqlCommand as a parameter (which is the way I normally do it), the reference it expects is to an object type as in:

SqlParameter para = new SqlParameter("@Foo", objectRef);

3. I'm not afraid of strings. Over time I've been more reluctant to convert things, especially numbers. For example, if a numeric value is passed in the querystring, like:

http://myserv/Page.aspx?custId=101

Why should we convert custId to a numer if it's going to be passed to a parameter (see code above)? Another scenario is when some underlying value is going to end up in a textbox. I do not fear the string, just the Convert.ToXXYYZZ code I'd have to type out if I did want to be "type safe."

But some may feel differently, especially the ones who think that if something in the database changes you may want to intentionally have your code break so that you're aware of it. That's the only idea besides premature optimization that I can use to justify this approach...

}

Powershell Password Gen vs Hobbitwerk:::pwd

{

Scott Hanselman just posted an example of a password generator in powershell. Very cool, and reminding me of Hobbitwerk:::pwd. His script, however, is 7 lines of clean code.

Speaking of Hobbitwerk:::pwd, I'm surprised by how useful it's become not only for myself but for a lot of the people I showed it to. It's nice when a guy who's used to writing Me-ware makes something that other people leverage too.

}

Tuesday, July 25, 2006

Reddit Expansion

{

I'm cheering for Paul Graham's Reddit minions. The Reddit concept is brilliant, and now it's spawning into some really interesting variations (have I got them all?):

  1. Reddit Reddit
  2. Joel on Software Reddit
  3. Slate Reddit
  4. NY Times Reddit

All of which are now subscribed now on my aggregator. It would be interesting to see the original Reddit code, which was written in LISP.

}

Jean Paul Understands

{

After listening to the .NET Rocks podcast he was on covering Test Driven Development, I glanced at his blog and saw this post/rant against declarative databinding. Since the Visual Basic 5 Form Data Wizard, a lot of this automated stuff has remained beyond my liking. Well, actually that VB 5 Form Data wizard did work out really well once: I had a meeting with a client and nothing to show so it bailed me out that time...

Here are my big problems with declarative databinding:
1. When does it happen?
I have no idea based on the demos. You set things up at design time and run the app after which you're supposed to smile and think that it's cool, but databinding for me in the "real world" never seems to happen that way. Sometimes binding is conditional or based on circumstances that can only be evaluated programmatically. Not only that, but sometimes I'm binding many many things (think 10 dropdown lists) and don't want a data source control for each one.

2. Embed SQL statements in the ASP.NET Page?
Never, ever, ever. Usually stuff like this is tucked in the business layer with a stored procedure. I like the idea of object data sources, but it seems like a lot of work for the small stuff, like lookup values.

3. It's never that simple.
Like the last project I worked on, in which some fields displayed in a grid were too long, so I had to iterate bound data and make tooltips. Or the column that's an encoded link based on some data outside of the grid. Or the column that displays various images based on some criteria (think: sometimes a PDF icon, sometimes a Word doc icon, and so on).

Don't get me wrong at all: databinding is good and I use it every day. Declarative databinding, however, has never proved useful to me.

}

Say Hello

{


bdos equ 0005H ; BDOS entry point
start: mvi c,9 ; BDOS function: output string
lxi d,msg$ ; address of msg
call bdos
ret ; return to CCP

msg$: db 'Hello, world!$'
end start


Oh, that's just me saying "Hello World" in assembler. There's a massive list of the program to begin programs over at Wikipedia.

}

Love For Apple

{

Leander Kahney gushes about the little things that are so well designed in Mac software. I agree in the sense that it's small things you'd have never thought of that clinch software. I disagree that this can be applied to all Mac software; I am just now coming back from a session with ProTools, powerful software to be sure, but filled with lots of hidden menus, features, and quirks.

Nothing makes me happy like good software, especially in the moments when it's obvious that something I want to do has really had some thought applied to it. Printing in gmail, for example. Multiple tabs in Firefox. The ! shortcuts for searching in yahoo. iTunes burning an audio file that's too big across multiple CDs. Oh, and the smart playlists on iTunes too. I should make a list someday...

}

Monday, July 24, 2006

OSCON

{

Thought of the day from the work desk: I'd rather be at OSCON in Portland.

}

The Design of Data

{

First spotted on the Scott Guthrie blog, there's a library of database schema models here. The world owes you, Barry Williams.

Of course, most of the schemas are more like design sketches; I seem to live in a world where strange business rules seem to retard any design of elegance when it comes to data.

}

Sunday, July 23, 2006

Java Weekend

{

The secret's already been partially out that I'm attempting to return to school to study Computer Science. Part of the requirements for the school I'm trying to attend is a program of some sort written in Java along with a personal statement. I submitted a ported variation of a program I wrote a while back in C# as a response to this blog entry. My program applies a Haar transform on an image file.

It's been a while since I've used Java. I downloaded and used Eclipse as my IDE, and that was a great experience - I'm curious to know if the GUI development parts of Eclipse are well developed.

Working in Java, after all this time in C#, was a bit strange. There are the small arbitrary things, like camelCase for methods rather than PascalCase, and then there are the bigger things, like doing type conversion (in .NET I just use Convert.ToXXYYZZ (e.g. Convert.ToInt32, Convert.ToDouble, and so on... )), and then there are the massive things like trying to emit an image file to disk. In C# this is very trivial. In Java, it's painful enough that doing a search on Google will yield all kinds of Bitmap implementations that people have written to make up for a lack of support in the language.

Speaking of which, the program took about 2 hours to port but for these lines:

File output = new File(filePath);
ImageIO.write(myBufferedImage,"bmp", output);


The kept succeeding only in writing an empty bmp file. I didn't stop to figure out the debugger in Eclipse (wouldn't have mattered if I did), but couldn't for the life of me get to the root of the issue.

I used to think Javadoc comments were such a beautiful thing until I began searching Google for ImageIO.write examples. Apparently everyone has taken it upon themselves to have a copy of the Javadoc online with redundant information. And the Javadoc itself has no clear information about the method either, especially for cases like mine where it succeeds, over and over again, at creating nothing. (Why not use an enumerated type for the format parameter of the write method if it's going to be limited?)

After a few hours I'm at the video game point of debugging (just trying different things) and ran it with the following:

File output = new File(filePath);
ImageIO.write(myBufferedImage,"jpg", output);

Lo and behold, a file is created on my machine. And it sort of clears up for me that the write method's format is limited out of the box ( I think, but did not confirm) to jpg / gif / png formats. I'm guessing at a disdain for "bmp" as a Windows specific format or something of that nature pushing ImageIO to exclude it in its base support. Although there may be ways around this (I saw a class called ImageWriter which may have had those capabilities) it makes me really wonder.

I think it also shows a difference between Microsoft and other companies. At Microsoft, they'll spend extraordinary efforts for a guy like me on a weekend like this to be able to write:

Bitmap bmp = new Bitmap();
// do stuff
bmp.Save("pathToFile.bmp");

We could all write our own implementations of a Bitmap helper class, but IMHO, I'd rather be thinking about other things like perfecting the transform.

}

Wednesday, July 19, 2006

Monad vs. Unix Grey Beards

{

An interesting post from the Monad folks (make sure you read the comments) on a look at syntactical differences between Monad vs. Korn Shell.

}

Agile Perlcast

{

The latest Perlcast features Andy Hunt, one of the Pragmatic Programmers, talking about Agile Programming. Although my use of perl in a professional context is limited, Perlcast is one of my favorite developer podcasts in no small part to its host, Josh McAdams -

The following are discussed:

1. Pair programming
Andy gives an analogy of a driver and navigator. Interesting, but I have to admit the whole pair thing has never quite had appeal for me. At least, not as the "navigator."

2. Learning sessions
Andy recommends company learning sessions in the middle of the week (my own company does it on Friday). It's a good idea since the beginning of the week is catch up usually, and by the end a lot of people have checked out. I do like the fact that on Friday, however, there is a bit more of a relaxed atmosphere in the office, making the learning sessions double as a sort of group bonding where the developers can hang out and not feel too much stress.

3. On keeping up with what's current
Focus on awareness, not necessarily depth. It's impossible to know about absolutely everything going on, but keep your radar going and understand the big picture meaning of what's new. Easily said, but I will admit to frequent moments like today: feeling utterly overwhelmed by the amount of useful information that's out there. And no time to process the little I get a handle on from time to time.

4. Estimation
Andy's gotten companies to go with incremental estimates of time for projects. This is a great idea, but as Andy seemed to concede, it's sometimes hard to get a client to look at things that way. Because budgeting for a project is usually based on a proposal, and the proposal must take into account the entire scope of work, I wonder at a good angle from which to introduce this... maybe with shorter cycles up front. Unfortunately, the beginning of a project is usually a lot of design work and may not involve a ton of demonstrated progress. Hm...

5. Testing
Wow - this was the best part of the podcast. Andy goes through a bunch of acronyms to use to remember the different ways to approach unit testing. I'm not usually one for acronyms, but in this case I think it can't hurt. He recommends as much test code as production code... a really tough sell since I don't think any of the clients I've worked with run numbers on bug fixing costs. Because of that what's important to budget both time and financially is the "development" cycle and whatever is left over before the magic deadline must be applied to bugs.
But here's where I take it: the half/half production/test code thing is about the effort a developer makes to test and have automated unit tests available for their code. And, from a guy who's spent the last many days almost exclusively fixing bugs, I'd rather invest in test cases than bug fixes. I'll have to strategize on having lots of shiny things to throw at the client in order to demonstrate progress but somehow pace development so that much more is invested in unit testing.

6. SCRUM
Andy finishes with some talk about SCRUM as a lightweight development process. I'll have to read into that a bit; it seems to formalize some of the things that I've done in the past but it seems like a magical ideal that is very difficult to be disciplined with in real life. For example, quick meetings at the beginning of each day tend to expand in the amount of time they take. A lot of the time, if there's something that is really involved (like it's going to take a few days or weeks to develop) I prefer to just get to work and get into my code since mornings are one of the more productive times of day for me.
One thing we've done on my current project is have an email sent out that lists what everyone is working on, seems like a good compromise.

7. Write readable code
'nuff said.

8. Some OO design commentary, bleeds into contracts, encapsulation.

9. Architects should code.
I think Joel said it all when he wrote about Architecture Astronauts. Another funny article I recently refound online a humorous essay about UML Fever.

}

Monday, July 17, 2006

Monad

{

The most recent Hanselminutes podcast is the second in discussing MONAD, or the new windows command shell. I decided to listen to the first one, published in late March during the commute and got my quote of the day:

Scott:
"comparing Monad to ... bash or any of the Unix shells is the difference between shooting a bullet and throwing it."

Tomorrow I'll listen to part two.

}

Enterprise Architect (Sparx Systems)

{

I'm not one for exhibit halls; even the "swag" is sometimes not worth having to talk to the sales people. At TechEd, I did happen upon the Sparx Systems booth and after a brief exchange with the Australian guy who was manning the booth and who was definitely a developer (takes one to know one), I became interested in their Enterprise Architect software.

UML modelling for $200? Most of the tools I know of are the Rational "don't even bother if you're not a large government" scale. It supports code generation for many languages: Java, Python, PHP, Delphi, as well as the Microsoft staples, C++, C#, and VB.NET. Wow, now I'm really interested. More? It generates Xml Schema as well.

It's all really interesting since certain people (who I'll avoid mentioning on the blog since it will sound redundant) have me really interested in Model Driven Architecture and the idea of modelling and coming up with contracts and then generating code.

I am using the trial version now (arg! I installed it a few weeks ago but only started using it seriously over the weekend which gives me 10 more days left to work with it) and find myself really comfortable with the interface and functionality. I used the documentation to see how enumerations worked and that was a snap. I generated C# code which worked quite well.

The last thing I did was to post on Joel on Software to see if anyone had had any bad experiences and it seemed like everyone said nice things.

Now I am working up the courage to ask the boss to buy it. I can anticipate two questions:
1. Why not Visio?
me: not as light weight, code generation is a bit clunky, adding new types doesn't work as well, not as many diagrams supported, no XML Schema generation support that I know of...

2. Why not Class Diagrams in Visual Studio 2005?
me: Even more light weight than Visio.

Update: I am now a licensee of Enterprise Architect. Life is good!

}

Sunday, July 16, 2006

Perl is dying

{

According to this article from "Anonymous Monk." I'd remain anonymous too if I made the claim since people tend to get passionate when it comes to Perl.

My personal reaction is this: I like Perl, and I'd love to use it more, but I've only experienced evidence that supports his arguments as I've been dinking around in Perl over the last few years.

Update: Interestingly enough, the direct link is now dishing out 403 errors. I doubt the perl community would actively censor anything so I'll assume it's a glitch with the url I used. But, as the Keymaker says: "Always another way..."

}

Saturday, July 15, 2006

Grok the Functional

{

"Functional Programming" is a term I've been long accustomed to hearing and generalizing about, but whoever is at the end of defmarco has done a great job in this essay of unpacking the basics of Functional Programming for those of us who never encountered it in an academic setting. I found it referenced via John Lam.

The essay sweeps through the logic and ideas of Plato, the geniuses at Princeton who started thinking in lambda expressions, and John McCarthy's innovation at MIT of LISP. From there a case is made for the benefits of Functional Programming along the following lines:

1. Unit Testing
2. Debugging
3. Concurrency
4. Hot Code Deployment
5. Machine Assisted Proofs and Optimizations

The latter part of the essay is defmarco explaining the basics of Functional Programming. Even though the essay is "for the rest of us" I admit that the differing style from what I'm used to in impatrive style did require frequent stopping and mulling. But it's well written and very accessible in its explanation of some of the fundamentals:

1. High Order Functions - functions operating on other functions
2. Currying - reusing functions by assignment
3. Lazy Evaluation - evaluation as needed
4. Infinite Data Structures - based on functions
5. Continuations - like the stack, but oh so powerful
6. Pattern Matching - functions match calls based on parameter values matching
7. Closures - state management function to function

Great essay, well worth the time and effort.

}

Wednesday, July 12, 2006

?? Operator - I'm late to the party

{

I shouldn't have glossed over those "new features" ReadMe files for .NET 2.0. Today I found the ?? operator which is probably going to get me into even more trouble than my use of ?: with other developers.

In short, you can test for a null and return an alternative like so:

string test = (myObject ?? "");

Fritz Onion posted about its use with the ViewState some months ago. I'm sorry I missed it then...

}

Does Scott Hanselman Sleep?

{

His level of productivity is frightening; every time I try to relax and watch TV I get a mental picture of him furiously spitting code, or working on his next book, or presentation, or whatever. But he exposes at least one secret an online presentation: know your tools and customize to avoid wasting time.

This presentation is about tools to enhance developer productivity.

On his site he's got a great list here.

I wonder if anyone has documented the old DOS commands / techniques for those of us whose digital life was born in the Windows era. I'll have to look around -

}

Tuesday, July 11, 2006

Saturday, July 08, 2006

Martin Fowler at RailsConf 2006

{

You can watch the entire keynote here, many a good thought. Some interesting thoughts:

1. Ruby on Rails, as an opinionated framework with limited focus is good.
2. Fast development cycles are good, better than Big Design Up Front.
3. People think in the mistaken trade off of quick & dirty (VB, PHP) and "enterprise." Just because something was done quickly doesn't mean it's dirty.
4. Keep programmers and customers in close quarters, combine with quick release cycles and allow for observation of how software is used. (I love this idea, I learn *so* much when I watch people use the software I've written for them).
5. Disdain for libraries (and I read along with that unnecessary abstraction) with several jokes about java.util.Calendar
6. Ruby the language is essential for Rails.
7. Postmodern Programming: embrace inconsistencies, cobbled together world and realize software is the same way giving the example of Unix.

I found myself agreeing with Martin, blow for blow most of the time.

}

Meeting Sahil and Ambrose, Becoming Famous

{

The Saturday night before TechEd I noticed a gathering online - the "Party with Palermo" - organized by C# MVP Jeffrey Palermo. This was courtesy of Google so I didn't have a personal connection with any of the players there other than knowing they were some of the higher profile attendees.

The first person I got to meet was Sahil Malik; I have his ADO.NET 2.0 book from Apress but didn't make the connection at the time. I wish I had although it's probably a good thing since I'd have pestered him with more than a few questions. But Sahil did the courtesy of talking to me a little bit about Concurrency - expanding the notion in my mind from just database locking mechanisms and settings to the statefulness of objects and their interaction in the .NET Framework. Sahil was very courteous.

After Sahil excused himself I noticed a guy wearing an Infragistics shirt and, completely forgetting myself, pounced upon my opportunity to dialogue with a representative of a company I've blessed and cursed in the same breath.

Almost forgetting to introduce myself I began firing off comments - the shortened version of which is that Infragistics makes powerful stuff but leaves gaps in documentation, and that the dark, voodoo magic that is left on an ASP.NET page in the form of cryptic javascript is quite disconcerting - perhaps before I learned that I had met Ambrose Little, another C# MVP who had only just started at Infragistics as a technical evangelist of sorts.

Ambrose played it well, allowing me to get my frustrations off my chest asking questions like "what do you think we can do better?", and then pausing for my excited bursts of opinion. My excited babble only continued when I discovered he was presenting on the Microsoft Enterprise Library. I asked him what he thought of it, really, as a very large layer of abstraction of other libraries (which themselves are layers of abstraction), and he gave a neutral response along the lines of it depending on the developer and their approach. I've met many people and I've got to think hard of a person who was able to deftly answer questions while choosing not to really commit a strong opinion, as well as steer an encounter like ours into therapeutic venting rather than debate or contention. I didn't go to his session about the the Enterprise Library but I'm really looking forward to the TechEd DVD when I can get a real sense of his thoughts and what he presented upon.

During my excited conversation I noticed a picture taker and now these moments are recorded for posterity on an offshoot of the Atlanta .NET Regular Guys website. They were taken by Heidi Schwartz whose husband Brendon is a developer actively involved in the INETA organization.

Sahil's blog is here, Ambrose writes a blog here, and Brendon contributes to a blog here.

}

Thursday, July 06, 2006

TDD is like flossing

{

Everyone knows they should be flossing as well as writing their tests first. They've heard of the tools like NUnit, but they just don't do it. Take it from a guy who got drilled for several hours recently because of cavities between the teeth: it's not worth it.

On a serious note, I'm spending most of my time in my current project on bug fixing. I know that leveraging unit tests and a tool like NUnit will not only make me more productive, but also trim the amount of time I spend like today fixing bugs (all day long).

The big question is how to apply that to a web application. Many of the examples given for tests in NUnit really lend themselves to libraries (DLLs) and not to Web Forms with postback cycles.

I haven't had much time to dig into it, but pretty soon I'll have to roll up my sleeves and do a comparison of the new Visual Studio Team System test capabilities and NUnit. The NUnit people blogged a comparison but I'd like to have a look for myself. My leanings would probably be toward NUnit for simplicity, less overhead, and availability, but I'll withhold judgement until I've had a chance to get dirty.

}

Thursday, June 29, 2006

Emitting Code, Mind Your Language

{

Caught sight of a post over at Jeff Atwood's Coding Horror blog in which he demonstrates some of the clunkiness of using object libraries while coding. His example is as follows:

Let's say you wanted to generate and render this XML fragment:

<status code="1"><data><usergroup id="usr"></data>

He then shows the 17 or so lines of code it takes to do it with System.Xml objects and shows an alternative with Response.Write and a String formatter:

string s = @"<status code=""><data><usergroup id=""></data>";
Response.Write(String.Format(s, myCode, myUserGroup));

What he was getting at seemed fairly intuitive but a firestorm erupted over his berating those who considered the use of Response.Write and other more terse approaches over object models as second class or "dreadful citizenry."

Of course the big pitfall of his example is that it can be easily broken if the variables used in a Response.Write approach to generating xml contain unescaped or "bad" charactes. The object proponents jumped on this and hammered at how stuff like this works for a "trivial" example but it leaves an aweful exposure for "real world" applications. I'm always annoyed by that word "trivial" because those that use it tend to abuse it for the sake of complexity and overengineering. On the other hand, if you look at my previous post, I'm no stranger to bad characters and encoding issues (trust me, the pain has been dealt!). But I think what this discussion points to is something that is near and dear to my heart: language itself.

It didn't take long for a Ruby coder to point out that generating something like this in Ruby, using the libraries was as simple as:

builder = Builder::XmlMarkup.new(:target=>STDOUT, :indent=>2)
builder.person { |b| b.name("Jim"); b.phone("555-1234") }

Which generates:

<person>
<name>Jim</name>
<phone>555-1234</phone>
</person>

And along came a Perl programmer who shows the original example as:

$x = XML('status', [code => 1],
['data', [],
['usergroup', [id => "usr"]]]);

I share Jeff's frustration in the heavily object oriented approach to doing things with traditional .NET libraries - but I think it points to two things: first, the libraries we get sometimes are a clunky "one size fits all" offering that leave the developer writing a lot of line noise for a simple result, and second that while the language itself may not be the initial culprit (I think the two shorter examples above could be duplicated in C#, for example) the thinking one acquires from their language, libraries, and best practices is why System.Xml makes some developers think that 17 lines of code is the best for a "trivial" example of generating some xml.

This is why language is so interesting to me: the way you think is overwhelmingly influenced by how you express yourself.

Where does that discussion leave me? Wanting to know more about Ruby and work on my fluency in Perl. I may have to write that C#, but I want more flexibility in thinking.

}

Wednesday, June 28, 2006

Querystring Drama

{

Apparently it's older news - a security feature from ASP.NET 1.1 that protects the webserver from "dangerous" querystrings that throws exceptions for illegal characters like angle brackets and so on.

We happened upon it when trying to pass information from a VB6 application to a web app by putting together a querystring and appending it to the target page like so:

http://foo/bar.aspx?id=29oeiu&0209&wweoi9239

The garbled bit after the ? was assembled by doing a little bit of shifting of character codes. It doesn't really qualify as encryption but it seems daunting enough for the casual user and there's really not enough text for a persistent person to find much of a pattern. Unfortunately as you happily shift those ascii codes you run into the "<" and other characters that ASP.NET 1.1+ is not happy about. It makes the case for doing proper encoding but even true URL encoding (done by putting a "%" with the upper and lower 4 bits in the character byte encoded as hex) will not absolve the developer of the application server's squeamishness. For example, the URL encoded value for the left angle bracket, "<", is %3c. For the right angle bracket, ">" it is %3e. So if you think that you might get away with a URL that should be http://foo/bar.aspx?start=<&tag=h1&end=> by formating it as http://foo/bar.aspx?start=%3c&tag=h1&end=%3e you will be sorely disappointed. Sorely.

My colleague and I then thought we'd be a little clever - okay it was my [bad] idea - and just use a constant character for one of the angle brackets but this also fell short since it's not just angle brackets that are considered dangerous.

So what was the fix? Step one is to leverage the might of Google and search on the error message. Then we discovered an attribute to the page processing directive that turns this feature off - it was almost too easy:

ValidatePageRequest="false"

Of course this puts the burden of securing the querystring on the developer but there are a few perks: first is that it only applies to the single page when placed as a directive. The second is that the vulnerability is squarely on the developer leveraging the querystring for some back end command functionality. That's easy to narrow into some clean validation logic.

}

Tuesday, June 27, 2006

Starting Ruby

{

John Lam's RubyCLR project piqued my interest even before I saw him at TechEd. Today was my first step to getting started, here were my steps.

1. Played a bit with a free online Ruby interpreter.
2. Got the single click installer for my own machine.
3. Read a bit of documentation.
4. Then discovered Komodo, the IDE I originally bought for Perl stuff supports Ruby and has an interpreter. Very, very cool.

Next step: language fundamentals.

}

Thursday, June 22, 2006

Mac Twit

{

Seth Stevenson at Slate on Apple's new ad campaign writes:

"Mr. Mac comes off as a smug little twit, who just happens to carry around a newspaper that has a great review of himself inside."
}

Safari Redesigned

{

I'm a rabid Safari user. I think they built their whole business plan for me personally... okay, that might be a bit arrogant but at least I know I'm not alone in my rampant desire for technical books and my need to constantly keep an updated library for the problems/platforms at hand.

Initial thoughts:

1. They've done a great job segmenting the pages to load in pieces so browsing through books is much faster. There seems to be heave leverage of Ajax involved in that process.
2. Search is much, much better. Autocomplete when you enter search terms, faster response time, and a slider control that lets you sort by popularity or by relevancy. Very, very cool.
3. Expand / Contract left navigation (table of contents, search results)
4. Printing is better - instead a popup it's a link to a page with just content. The javascript to automate printing is still there but it doesn't automatically close the browser window when complete which is nice.

I'm sure there are other improvements but getting search and printing to work better for a site offering online books is key.

Just put Ruby in a Nutshell on my bookshelf, preparation for RubyCLR.

}

Wednesday, June 21, 2006

Virtual Earth

{

I'm not sure what day I'm on as far as TechEd coverage (a lot to swallow!) but the next session I see notes for was called "Location Solutions with Virtual Earth." It was a tour of Virtual Earth and how to write applications using the javascript library they expose in the Virtual Earth SDK.

You can get an idea of what Virtual Earth looks like by going to the site: http://local.live.com

The SDK is also quite simple; it consists of referencing some javascript libraries and using a DIV to position the mapped content. For example, to get the basics, just view source on this page.

The Virtual Earth API has the following features, per the presentation:

  • User Navigation
  • Mapping Imagery
  • "Bird's Eye" views
  • Pushpins
  • Find Places/Addresses
  • Directions/Routing
  • Polylines
  • Collections of GeoRSS

For each of these features there is an interactive SDK that generates example code so that you can follow along for your own application. *Very cool*.

I did have a few issues with timing and synchronous processing; in other words sometimes the wait time for processing one command seemed to cancel out a command that directly followed it. In my case I was trying to do a search for "Sioux Falls, SD" and then follow it with a ZoomIn method like so:

map.FindLocation('Sioux Falls, SD');
map.SetMapStyle(VEMapStyle.Hybrid);
map.ZoomIn();

I'll dig around a bit - my idea for a helpful little location solution is a map of Sioux Falls and all the coffee shops along with their attributes: how good the coffee is, whether WiFi is free, and the general atmosphere.

I'm also planning to dink around with the Google Maps API to see how it stacks up.

}

Monday, June 19, 2006

BillG Review

{

Joel Spolsky writes about being reviewed by Bill Gates himself. Self congratulatory, but good nevertheless...

}

Sunday, June 18, 2006

Pragmatic Architecture

{

Cathi Gero and Ted Neward had a session on what they call "pragmatic architecture" - the fuzzy definition of which was architecture that maintains ideals until the consequences outweigh them.

It was interesting to get this high level at TechEd; most of the sessions I went to were very technical where this was a balance between philosophy and a general approach to developing software.

One of the first thing they went after was the recent infatuation people on the architectural level have had with "design patterns." According to them, a cut and paste approach to design patterns is not the path to success - and although I haven't immersed myself in the design patterns world, I doubt it's proponents probably leave some room for flexibility in implementation.

According to Cathi and Ted, the goals of a software architect were twofold:
1. Functional Requirements (Business needs, raw functionality)
2. Non-functional Requirements (the "ities": scalability, maintainability, extensibility, and so on)

Their approach in being pragmatic about architecture was to leverage a vocabulary, not as a means to accomplish the goals of software architecture, but as a lexicon for strategies and tactics in accomplishing those two main goals. They covered what they called the 6 elements of architecture and examples of approaches (patterns?) that lend themselves to the software of the solution.

Here are the 6 architectural "elements:"

1. Communication
2. Presentation (the front end)
3. State Management (how the data are stored)
4. Processing
5. Resource Management
6. Tools

For each of the 6 they presented examples of what we see with most modern software. Under Communication, for example, they listed what they call as a "three part tuple:"

1. Transport
TCP, UDP, other network protocols
2. Exchange
Data can be exchanged using request/response, asynchronous, fire and forget, amongst others
3. Format
XML, Text, JSON, Binary, and so on.

Presentation has to do with the interface for the user. Some examples given here were Console, Graphical Interface, and Markup.

The State Model to apply in the application in pragmatic language is either durable (available always) or transient (available only certain times). Another consideration for State Management is the "shape" of the data: objects, relational, heirarchical, etc... Finally when considering the State Model there was the notion of where the data was: client, server, elsewhere...

Processing used in the application, some examples of implementation they gave were: Procedural, Imperative, Concurrent, Parallel, and Transactional. On the processing side, however, some higher level descriptions of approaches included: Divide and Conquer, Recursive, Event based, Shared Queue, amongst others.

Resource Management had to do with persistence of data and configuration. Some styles discussed for this was locator / registry, discovery, injected, and a very sophisticated term for "hard coding" called a priori.

Tools to consider in being pragmatic could be the programming language, development environment, frameworks, code generation, amongst others.

I'm not sure if this stuff originated with Cathi and Ted, but it's very useful in coming up with a high level picture of how software will work. Although most of what I've worked with recently fits under the umbrella of "web application" it would be very useful to approach new projects with this catalog and the set of approaches beneath each item in mind.

This entire session is available as a webcast, and I'd recommend it to anyone who is involved in software development, even if they don't think of themselves as architects. There is always a point when I'm reading or listening to high level stuff like this where I begin to wonder if it really matters but when it is kept concrete like this the distinction between architecture as high level thinking that has to be done anyway, and architecture as romantic "rah rah" for the higher ups is very clear.

Ted's blog seems fairly alive but Cathi's blog has not been updated for a while.

}

LINQ, deeper

{

My Tuesday morning session was with Luca Bolognese, lead program manager on LINQ, covering a slightly different flavor than what Pablo Castro was demonstrating with ADO.NET vNext on Monday morning. Luca’s Italian accent was charming, but it was even more exciting to see what LINQ does on a deeper level.

He started by showing a classical problem that LINQ solves. Imagine a collection of integers which you need to filter out based on a certain criteria, something like:

int[] nums = {2,3,5,7,11};

It’s usually done with some kind of iteration in the form of:

int[] nums = { 2,3,5,7,11};

List<int> selected = new List<int>();

for (int i = 0; i <>

if (nums[i] > 4) {

selected.Add(nums[i]);

}

}

// selected represents my values

I write code like that on a daily basis, it seems. In LINQ, queries become a “first class” member of the language and operate on anything that implements the IEnumerable interface. A problem like the above can be solved without line noise and iteration:

int[] nums = {2,3,5,7,11};

var selected = from i in nums

where i > 4

select i;

From the perspective of someone who writes the iteration + selection stuff every day, I think that LINQ is going to have a big impact on my code. But this is just the beginning. Luca then showed how LINQ is split out to target several different forms of data structures:

  1. LINQ to Objects (Anything implementing IEnumerable, collections etc… )
  2. LINQ enabled ADO.NET (mapping database structures to objects and then querying off of them)
  3. LINQ to XML

The first example above is a typical LINQ to Objects scenario where filtering, querying, or manipulation can be applied to a collection that supports IEnumerable. Being able to do this sort of manipulation on HashTables, DictionaryEntries, and so on is the type of power that I demonstrated above.

In a LINQ enabled ADO.NET scenario, you can take an object that is mapped to some entity in your database and query off of it. I don’t recall the exact demonstration, but an example would be querying a collection of “customer” objects based on some filter:

var topcustomers = from customer in customers

where customer.orderCount > 10

select {customer.id, customer.fullName};

I’ve heard a lot about ORM ever since my friend Aaron started talking about Hibernate (some time ago) but what catapults this over the typical ORM scenario is that the functionality is built into language and not abstracted through method calls. I’ve been a bit lukewarm to the notion since it seemed like a lot of work up front and because this type of abstraction where objects can represent data and provide some manipulative capacity is already built in the DataSet/DataTable model. However two things make LINQ enabled ADO.NET a little different: first, the IDE facilitates the mappings that are made through an “EDM” diagram and mapping providers that give a lot of flexibility in connecting to the datastore, secondly the developer wields a lot of control over how the mapping works and how things are updated – the queries, the stored procedures, all data access still belongs to you and not to some “tool.”

Finally the LINQ enabled XML is powerful – it exposes XML data to yet another format of “query” besides XQuery and XPath. There is also the ability to work with the hierarchical structure that XML documents sometimes expose as collections within collections. The LINQ processing, with a bit of instruction, can also be instructed how to retrieve content (depth first traversal, and so on).

Luca’s blog seems to have died, but for some interesting tidbits, it’s here. Maybe with a few hits it can start up again?

}

Wednesday, June 14, 2006

Python and Ruby with .NET

{

An amazing session with Mahesh Prakriya and John Lam came on Monday night. Mahesh was covering the IronPython efforts for .NET and John came to talk about Ruby. It was refreshing to see the smaller number of developers practically using .NET but for whom language mattered.

Mahesh gave a history of Python support in the CLR and made a case for dynamic languages within .NET. His examples were pretty cool, especially when he started with a few examples of Python:

2 + 2 (room is quiet)
22**64 (room is quiet - David is amazed at the response in milliseconds)

He also showed a powerful implementation of a Matlab / Mathematica type tool written in Python for .NET.

John's part of the talk was also very good - he has written a bridge between Ruby and the CLR. John was fairly funny and expressive and his demos of Ruby and the CLR were fairly good in giving a picture of what he was tring to do.

John's blog is here, Mahesh doesn't blog but a search on Google shows him in a few places. I'm going to be downloading Iron Python and RubyCLR in the next month or so. Not completely sure, but it seems that here is where one can find RubyCLR.

}

ADO.NET vNext at TechEd

{

One of the best talks of this week was Pablo Castro's Monday session covering some of the new features of ADO.NET. Having used some form of data access library from Microsoft for a while, the changes he showed were fairly dramatic, and they will really impact on a fundamental level how programmers think about data access when it becomes widely available.

The general direction from Microsoft seems to be giving more modelling capabilities to developers to manage in an application space. The original step in this direction was ADO.NET from which we can model on the application level using a DataSet and it's associated classes. But the features in ADO.NET vNext - and I hesitate on superlatives - are an unparalleled shift (in my short life as a developer) in what we do for data access.

The rational behind my claim of this being as big a change is that it is no longer limited to the object model or some IDE-fu that Microsoft implements in Visual Studio. This change is a part of the language with which we express ourselves when talking to the database. My rational is LINQ.

LINQ is simply understood by unpacking the acronym: language integrated query. From a syntactical point of view in ADO.NET we can obtain a reference to the database and retrieve a collection of objects that represent what's inside.

I think this is a huge revelation - something that goes well beyond even the Object Relational stuff I hear about from time to time simply because it's not just objects, it's syntax.

Around LINQ as a syntactical approach to getting data from the database is the ability to create what is now called an EDM diagram which is essentially a mapping of the database to the class types that will be used to represent the internals. The EDM diagram can be manipulated so that you can do trivial things such as changing a column name reference in the object versus what's in the database, to complex things such as consolidating content from tables in order to avoid SQL JOIN expressions.

On keynote night the topic of Microsoft "innovation" came up and based on what was delivered, it didn't seem as though there was much in the way of newness to Microsoft's portfolio. But LINQ in all it's forms - for xml, for databases, and for that which implements IEnumerable, this is an innovation indeed.

I'm definitely staying tuned to the LINQ project and the Microsoft Data Access blog.

}

Tuesday, June 13, 2006

Rob Relyea on WPF

{

The timelag on posts is due to several 4 hour nights in succession while partaking in the festivities at TechEd. Here is a quick recap of Monday.

First session was WPF presented by Rob Reylea. WPF seems to be coming together more and more; Rob demonstrated new controls and old controls with new features: the listbox is quite a standout – textboxes that support spellchecking, controls having the ability to embed any other controls (button in a button). Another new feature is in the ability to do screen layout: flow layout, grid layout, and others besides the traditional absolute layout most WinForms developers are used to. Databinding in WPF is also quite improved, and learned from the web world: there is a repeater type approach to it now possible as well as functionality in the new listbox control. Vectors, fonts – there was a lot to the presentation. Rob has a blog, so it’s something to watch as the WPF things consolidate more.

After the session was finished I asked Rob whether they were watching other projects like Mozilla’s XUL/XPFE stuff since, in my own thinking, they were similar in approach. He was a bit dismissive here in the sense that he didn’t see why WPF and XPFE should be compared. Since we didn’t have the same assumptions, I withdrew the question although here is my own thinking:

  1. XAML is like XUL, both are a special markup for describing presentation.
  2. XPCOM provides hooks into the operating system functionality, making the client thick just the way that Windows Vista is going to have a special understanding and capability with XAML and the code associated with WPF applications.

There are some big differences for sure: XPFE uses javascript and CSS, WPF does not. XPFE relies on RDF, and I’m not sure that they’ll be any configuration involved in WPF applications since the runtime should handle much of that for the developer. I am not sure about this. Another set of differences are the vectors and rendering of WPF - XPFE does not, to my knowledge, have an equivalent. However, the basis for my assumption was that they both attempt at solving similar problems - extend the web aware application to the desktop to give it a more "client app" functionality and feel. Leverage better controls and have more flexibility than HTML/DHTML and so on. And yes, this is from the perspective of WPF/e - the use in web based applications.

There is much to learn, and much to be seen of WPF, I’ll stay tuned to Rob’s and other blogs that follow the development.

}

TechEd Keynote

{

I’d been looking forward to the keynote for a while since I found out that Ray Ozzie was going to be speaking. Unfortunately his piece of things was quite small – I imagine I wasn’t the only person disappointed by this. The meaning of the keynote was the general direction and strategy of Microsoft and how we “IT people” fit into that.

It made me think a lot of Macintosh ads and how differentiated the corporate strategies of Microsoft and Apple differ. Microsoft has taken the rather difficult (and not necessarily sexy (in a geek sense)) undertaking of “people-centric” software for business. The idea is to make people more productive in an organizational setting with software.

This reminds me of Paul Graham’s evocation of young people to pick hard problems to work on. The word “hard” is subject to semantic lashing but in this case, the idea of making people work better together is a very difficult problem, especially because it’s difficult to do without reinventing the wheel and causing new problems with current fixes.

Although it’s not explicitly stated, it seems that Microsoft’s approach here is not to “innovate” necessarily, but to commoditize new technologies that are proving themselves and package them for masses at all levels: masses in systems administration, masses in development, and, of course, the “mass” of society.

One other thing about Ozzie’s keynote: there is now a conversation about “smart client” applications which represent something that I began to suspect when I first installed Google Earth: the possibility of leveraging a thick client that was intensely web aware. Of course this notion has been around for a long time – yes, I do play MMOs on occasion – but now a technology like that could possibly be commoditized by Microsoft moving developers away from the traditional web based application to a more controlled, powerful “experience” the developer can produce. Web applications still have their place but essentially the XAML WPF/e notion. Kind of cool in the sense that fewer “fix the back button” types of issues in an internal web based application are possible but also a bit sinister since this is a big move away from “standards” to the proprietary, Windows choke-hold environment.

Lots of other thoughts, and some larger context as TechEd gets underway.

}

Thursday, June 08, 2006

Thinking Atlas

{

One thing I'm very interested in hearing about at TechEd is going to be the Microsoft Atlas framework. Ajax is haute couture and Atlas seems to be at the center of Microsoft's strategy. On my current project I took a look at using Atlas but never really "got" the benefits of the technology. The declarative side of things seems to be designed for the IDE, and without the IDE here it's a bit of a non-intuitive hassle to hand code things out. The second thing that made me leary was the direction Atlas took towards web services. The tasks I needed to perform were very simple and I shuddered when I thought about how much overhead there would be, say, for a webservice whose only job was to send me a filtered list of things for a dropdown. In the end I used my own XmlHttp and a bit of POX (I love that acronym, "Plain Old XML") to send things back and forth. Also courtesy of the O'Reilly Ajax Hacks book I got a handle on JSON and how awesome it is when it comes to sending things from the server and handling it with client side javascript.

Today I listened to Ken Alstad interviewed on .NET Rocks concerning Atlas and it confirmed my suspicions on Atlas leveraging web services and how easy it was to "bind" data from the server using javascript.

It's interesting that there seem to be two directions here - looking on the open source side of things, Prototype seems to be generating quite a buzz. I ran into Prototype in December courtesy of 24 ways and it took about 35 minutes to really "get" it. Prototype is getting mixed in with a lot of JSON and other javascript libraries and techniques for some pretty cool stuff like script.aculo.us.

On the Microsoft side we're waiting for Atlas to become standardized, complete, (marketable?). It's declarative, more IDE friendly it seems, and at least for me, less intuitive.

Anyway, part of the problem might be my ability to understand it and see where I can leverage it so I'm going to be in Jeff Prosise's session on Atlas at TechEd. A few questions I'm thinking of are as follows:

1. How to control when data is bound, doing filtering and other operations using javsacript.
2. Will Atlas play well with JSON? Not JSON being shoehorned into some Atlas app, but more like the ability to return JSON style strings from the server.
3. What sort of IDE interface can we expect with Atlas's release? Can we expect any improvements to javascript editing in Visual Studio as a result?

... I'm sure there are more, and I'm sure that after the session I'll have a much clearer picture of Atlas and it's future in web apps for Microsoft developers. I am pretty sure we made the right choice on the current project, but a year from now I could be singing praises for Atlas.

}

Tuesday, June 06, 2006

Code as Design: Implications for Architects

{

I've just got to Jack W. Reeves thoughts on Code as Design in his seminal article originally in the now defunct C++ Journal, and now republished on developer.*. I really liked his thoughts and although I can't necessarily say it's been something intuitively sitting in the back of my mind, its implications are definitely something I've thought for a very long time.

The basic premise of his article is stated early: final source code is the real software design. From the source code design specification, a compiler and linker do the manufacturing work to implement the software from what one could term the design document of source code. He continues to discuss some implications of this that are well thought out and, from my experience, very true.

A great thing about the article is the return to the notion of engineering and software development being treated together. These days I see a lot of writing about how the words software and engineering could never go together, but as Reeves shows, there is a very real relationship between disciplines especially if we think of our code as a design document.

But the real implication for me, beyond the ones stated by Reeves, has to do with the title "Software Architect" - which I happen to hold (not overly meaningful, by the way - everyone at my company is a "Software Architect"). People with the title, who wield Visio, Use Cases, and management-speak exclusively, aren't the real architects of the system. Of course these tools are very useful, and of course general direction is always necessary for a project, but for the notion of a real "Software Architect" one has to stay close to the code - close to the actual design document - to really shape the manufacturing process. Although staying close doesn't mean, to me, writing every line of code oneself, it means understanding and being a part of the process of making it.

}

Monday, June 05, 2006

TechEd 2006

{

I'm very, very excited to be going to Microsoft's TechEd conference this year with my boss. Now I'm counting down the days - we leave for Boston on June 10, and the conference runs from June 11 - 16. The first conference I was able to talk my way into going to was VBITS 2000, and as I think back upon my years training and consulting for my previous employer, that was among the best.

I got to rub shoulders with some pretty amazing people, and learned many valuable lessons. I'll never forget sheepishly asking Aaron Skonnard what he thought of XML Data Islands in IE 5, or Bill Vaughn's theatrics (and knowledge) of data access.

I think my approach and goals at the conference may be a little different from some people who are looking forward to a week off to fraternize and network. I'm hoping to learn as much as possible since I'm not sure when next I'll get the opportunity to go to a conference on my employer's expense.

The biggest trick is going to be separating the Fire & Motion from the sessions that will give me knowledge and direction for the work I do on a daily basis. Of course it's good to be aware of what's upcoming, but I've always been really reluctant to spend much of an investment in something that is subject to change. Beyond that I usually prefer to wait when adopting something for a little while (let others be the bug testers) so that also pits me against things that are a bit too futuristic.

With that said, here is my schedule for the week. There are a few things I'd like to see this year (list is totally subject to change, like, on a minute by minute basis):

1. More ASP.NET 2.0
Deeper on the new features, Personalization API, Web Parts, Internals

2. XML / XQuery / LINQ
Some ideas on where these are in the pipeline so I can start using them on projects

3. Workflow
I have DVDs of the last TechEd, and this came up a bit. I'm interested again on seeing an angle to take on this tool.

4. Sharepoint and Biztalk
I signed up for a few sessions but this is the part where I get leary; I'm not sure when the 2007 versions will be out and about. I know there are many, many opportunities to use the current versions of these products and would probably benefit from seeing that kind of stuff right away. But I'm hoping to glean and perhaps get a few tidbits to stay ahead of the curve when the new versions are released.

5. Team System
We are using it in house, so I need to understand it - I also want to get an accurate picture of how Team System can be leveraged by small teams. Most descriptions (and the pricing!) seems to put it in the "enterprise" category but most of what I've worked on in the past, and probably for the forseeable future will be software projects with less than 20 people involved.

6. IIS 7
I use IIS every day, and it's been like an old friend since the early versions. I'd like to see where the product is headed, and how its path meets with ASP.NET 2.0 and all the other pieces of web application development.

7. Architecture Talks
I signed up for a few that will hopefully be interesting and useful. I'd also like to get a better handle on SOA, "contracts," and the like. Distributed architecture makes a lot of sense to me, but I'm a bit wary of the architecture astronauts when it comes to enterprise application architectures - I try to translate that stuff into what I do on a daily basis (enterprise app for a publicly traded company of 5000+ employees) and still sometimes miss the mark. Perhaps I'll get a chance to meet some people in this environment as well who I can maintain contact with.

I'm hoping that I'll be able to change sessions as well during the conference. I'm fairly pleased with what I have, but the flexibility would be nice.

As the week progresses I'll hopefully write down some things I'll be hoping to answer, as well as some pre-conference reading.

TechEd 2006, here I come!

}

Dino says...

{

I think it was a bit of a rub off from me liking Francesco Balena after being very impressed with him at my first tech conference, VBITS 2000 in San Francisco, but Dino Esposito is another of those intensly smart Italian programmers living right on the edge of that Microsoft technology curve.

Anyhow, Dino, in response to lots of developers like myself, wanting to get better wrote the following:

"Some people here at the conference asked what I feel to recommend to do NOW. Pretty easy job.

I do recommend to learn as much as possible about ASP.NET 2.0 internals. For example: handlers, modules, providers, lifecycle, script-oriented API around the Page class. To learn as much as possible about best practices for control development.

In this regard, I wrote quite a few articles for the ASP.NET DevCenter in the past months to form a sort of crashcourse on control development. "
That's some great advice and it exposes a few personal areas that could see growth.

}

Friday, June 02, 2006

How good are you?

{

In my teaching years I'd often run into people who thought they understood things that they really didn't. Today, spreading like a fire I found a series of "do you know" posts that measured levels of understanding in three technologies most people think they understand: HTML, Javascript, and CSS.

Of course a personal evaluation leaves one open to questions but I think I'm doing okay level-wise. I wasn't at the top in any of the posts, but just a notch below.

When it comes to technologies, even those that I use on a daily basis (like the above) I'm always loathe to say I have a maximum level of knowledge because I am well aware of those who sit on the top of the food chain in whatever areas of knowlege it might be: I'm no Eric Meyer when it comes to CSS, I'm no Thomas Fuchs when it comes to javascript, and although I know much of what there is to know about HTML, I haven't spent (what I consider to be a waste of) time navigating differences in rendering on different browsers and standards support unless it's been a big problem on a project.

Well, here's to all of us who are still learning...

}