Tom Opgenorth's Test Driven Development Presentation

By James at February 19, 2008 11:15
Filed Under: Inland Empire .NET UG

Here is Tom Opgenorth's Test Driven Development presentation to the Inland Empire .NET User's Group given on February 19, 2008 

TDDIntro.ppt (4.06 mb)

James 

Bubble 2.0 in perpetuity?

By James at December 17, 2007 19:50
Filed Under:

This video is a hoot, but got taken down from all the sites which were playing it. Hopefully it will live in perpetuity here. 

James

My Che Guevara hat

By James at December 17, 2007 19:25
Filed Under: Life in General, Miscellaneous

I've always had an independent streak. I don't know if it's because I was raised by two, loving democrats in the midst of the '60's turmoil or not, but I've never felt comfortable in playing by the rules. I also love hats. Strange but I like hats; baseball caps, fedoras, bowlers, driving caps, trucker hats. I'd love to wear one of those big, ostrich feathered hats the three musketeers wore. I have a big collection of ball caps that I usually wear on the weekend, but have never gotten around to actually buying something different.

But now that Carmina is in my life, and with all the goodness that comes from that, I decided to change my look. A few weeks ago, we were on our way down to Carlsbad to see my dad in his annual gig as a professional Santa Claus and we stopped off to do a little Christmas shopping. As it was "black friday" and the stores had all their sales on, we stumbled across a black, wool, Kangol cap. I wasn't too keen on it, but my Carmina said I looked handsome wearing it and insisted I buy it. So, I decided to go for it. And of course, since I'm somewhat of a rebel, I immediately decided to wear it backwards....Carmina immediately commented that I looked like an Artistic Sandinista. Ricki said I looked like Che.

I love this cap. I wear it all the time, and have gotten tons of comments on it. Members at the user group (especially the VS 2008 Load Fest), in meetings at work, and even from people on the street. And, you know, it keeps my head warm too.

So tell me what you think? Am I cool or what?

My apologies to my fellow .NET User Group Leads... Art Villa, Mike Vincent, Woody Pewitt, Reza Mandani, that weird guy in the green metal suit, and the others...

The Red Stick Ramblers - Right Key, Wrong Keyhole - Grand Texas

Visual Studio 2008 Launch Fest - December 5th, 2007

By James at November 21, 2007 07:45
Filed Under:
**********************************
Dinner: $25.00
Visual Studio: $500.00 (perhaps)
A Visual Studio 2008 Launch Fest at Microsoft, complete with food, drink and prizes: Priceless
**********************************
Microsoft, actually Woody Pewitt, is hosting a Visual Studio 2008 "Launch Fest" on Wednesday, December 5th 2007 from 5:30pm to 9:30pm + at the Microsoft Irvine offices.

So, you're probably asking, why would I want to go to Irvine on a Wendesday evening? Well, let me tell you.

  1. We will be loading Visual Studio 2008 Professional (Evaluation) on laptops and towers.
  2. Everyone who comes will get a NFR copy of Visual Studio 2008 Professional mailed to them after the event.
  3. An on-site competition to show off in 5 minutes or less, what your favourite thing about VS 2008 is.
  4. A Guitar Hero tournament.
  5. Top notch (meaning NO PIZZA!) food and drinks.
  6. Giveaways (Can anyone say XBox and Zune?).


Space is limited to the first 200 registrants. Sign up here: http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032360759&culture=en-US

Microsoft (Woody) is doing this to thank all the So Cal developers by giving them their own copy of VS 2008 before everyone else. Plus, by getting the bits in our hands before everyone else, Microsoft is hoping to get some cool, software out there to show off at the "official" launch in February 2008. Rumour has it that those with the coolest, most kickin' applications will be invited on stage to show it off.

How's that?

I will be heading down early to help out Woody with logistics. If anyone would like to join me and lend a hand, send me an email.

Thanks,
James

BTW, if you have never been to the Microsoft Irvine offices, you really should go to this event, especially with what Woody has planned for us. This is an opportunity that you will remember for quite a long time.

J

Latest crazy song in my head Jennifer Lopez - Como Ama Una Mujer - Porqué Te Marchas

The "Code Trip"

By James at November 20, 2007 07:36
Filed Under: Web Development, Inland Empire .NET UG, Microsoft

One of my Microsoft DE friends, Tim Heuer, came up with a great idea a while back, and just formally announced it today... the "Code Trip". What he's gonna do is gather up all the other Microsoft Western State DEs, strap them into a Winnebago, and hit the road, traveling to cities, towns, villages, and trailer parks, west of the Rockies to see what cool stuff developers are doing with Microsoft products.

codetrip-sign-144Personally, I think this idea just rocks, in fact I even told Tim I would be a roadie, but (ahem) I never heard back. C'est la vie, water under the bridge and all that. :)

Anyway, check out thecodetrip.com to sign up for the RSS feeds, make some suggestions, tell Tim what you think of this crazy idea....

Yo Tim! How about a stop in the Inland Empire?

James

Latest crazy song in my head Liquid Soul - Evolution - Action Jackson

Streamlining my Javascript some more...

By James at November 14, 2007 06:23
Filed Under: Web Development, Ajax and Javascript
I've been working on updating the MyUCR project at work. I'm always amazed at how much I learn, looking at my code from a year ago gives me shudders, compared to what I know now. For instance, here's a snippet of an Ajax call from last year:
var url = "ajax.aspx?getSingleMsg="+msgID + "&msgTypeID=" + getMessageType();
var xhrReq = xhrRequest("text");
xhrReq.open("GET", url, true);
xhrReq.onreadystatechange = function()
{
if(xhrReq.readyState == 4 && xhrReq.status == 200)
{
DisplaySingleMsg(xhrReq.responseText, getMessageType())
};
}
sendRequest(xhrReq);

 

Yikes! That's a heck of a lot of lines to write and maintain. I love using jQuery, but hadn't really gotten into its Ajax events. I wish I had done so earlier. Now the same code looks like this:

var url = "ajax.aspx?getSingleMsg="+msgID + "&msgTypeID=" + getMessageType();
$.get(url, function(xhr){DisplaySingleMsg(xhr, getMessageType());});

Sweet!

James

Latest crazy song in my head Les Boukakes - Bledi - L'Alawi

Sean Dillingham's Presentation "Designing Usable Interfaces"

By James at November 13, 2007 11:10
Filed Under: Inland Empire .NET UG
Here is Sean Dillingham's presentation, "Designing Usable Interfaces" given to the Inland Empire .NET User's Group on November 13, 2007

Designing Usable Interfaces.pptx (9.71 mb)

James 

"Legalizing" my music

By James at November 12, 2007 14:26
Filed Under: Life in General

I was a follower of Napster, then LimeWire. But now that I'm older I thought "perhaps I should be legal on my music?" I have an eMusic account (which I love), and have occasionally downloaded music from iTunes (which I hate...no customer support).

I decided that I would start to convert my music collection to a "legal" one and had heard about Amazon's MP3 downloads. I usually go with eMusic, but since they're mainly independent, they don't have some of the tracks I want to convert.  

I also listen to NPR (National Public Radio) religiously. The other day was a piece on the Latin Grammy's, and how Juan Luis Guerra stole the show. So, I went to Amazon and downloaded the album. It wasn't until later that evening that I discovered the first track "Medicine for My Soul" and "La Llave De Mi Corazon" were the same. So I navigated Amazon for Customer Service, found their "Please enter your phone number" page and called it. After talking with someone in Bangalore for a couple of minutes, she realized she needed to get me to the MP3 department. I had a nice conversation with "Brandon" in the MP3 Customer Service department, who actually checked each track, decided that they were yes the same, and gave me a credit. He also said he'd "personally take responsibility" for letting me know when the bug had been fixed and let me know when the correct track was ready to download. Now, that's customer service.

Thanks Amazon!

James

Looking for white elephants

By James at November 09, 2007 14:39
Filed Under:

I wanted to add the Live Messenger plugin to my BlogEngine.NET blog and could get it working when running either in Cassini or IIS 6/7. However when I posted the changed files to my hosting server, it wasn't working. I had previously built a custom template for BE, and had problems with custom Javascript being linked correctly. I ended up adding the JS links to the bottom of the master page with the following code:

<script type="text/javascript" src="<%=Request.ApplicationPath %>/themes/<%=BlogSettings.Instance.Theme%>/jquery.js"></script>

That worked fine and I was stumped why my new JS code wasn't working.

It was only until I did the most simplest of things, "View Source" did I see that the source of the javascript file was now

"//themes/duringlunch/jquery.js"

I don't know why this happened. I hadn't changed the source of BE. Perhaps it was a setting change on the hosting server, I don't know.

What I ended up doing was moving the javascript files to the "js" main folder of BE and now all is good.

BTW, if you want to IM me via Messenger, just click on the "Instant Message James" link in the sidebar, and you're good to go.

James

Streamlining the JSON Serialization

By James at November 01, 2007 03:26
Filed Under: Web Development, Ajax and Javascript

For a while now I have been using the Newtwonsoft.Json dll to generate my JSON objects. The documentation is pretty sparse and I had to do a lot of experimentation to figure out the best way to do it. I ended up with this base code.

myUCR_DepartmentsTableAdapters.MyUCR_DepartmentsTableAdapter deptTA = new myUCR_DepartmentsTableAdapters.MyUCR_DepartmentsTableAdapter();
myUCR_Departments.MyUCR_DepartmentsDataTable deptDT = new myUCR_Departments.MyUCR_DepartmentsDataTable();
deptTA.FillDepts(deptDT);
StringWriter sw = new StringWriter();
JsonWriter writer = new JsonWriter(sw);
writer.WriteStartArray();

foreach (myUCR_Departments.MyUCR_DepartmentsRow deptRow in deptDT)
{
   writer.WriteStartObject();
   writer.WritePropertyName("deptID"); writer.WriteValue(deptRow.deptID.ToString());
   writer.WritePropertyName("dept"); writer.WriteValue(deptRow.department.ToString().Trim());
   writer.WriteEndObject();           
}
writer.WriteEndArray();
writer.Flush();
Response.Write(sw.GetStringBuilder().ToString());

 As you can see, that's a lot of code to serialize a simple datatable.

I wanted to find an easier way, so started browsing around. Googling for "JSON DataTable Serialization", I came across this article "A DataTable Serializer for ASP.NET AJAX" at denydotnet.com. What he did was to extend the JavaScriptConverter found in System.Web.Script.Serialization to serialize a DataTable. I looked through his code and decided to implement it.

Now here's how I do my serialization:

        MyUCR_LoginTableAdapter ta = new MyUCR_LoginTableAdapter();
        DataTable dt = ta.GetByTesting();
        JavaScriptSerializer toJSON = new JavaScriptSerializer();
        toJSON.RegisterConverters(new JavaScriptConverter[]{new JavaScriptDataTableConverter()});
        Response.Write(toJSON.Serialize(dt));

And what rocks is the object names are mapped to the column names in the database.

Cool

James

 

About the author

James James is a five time and current Microsoft MVP in Client App Development, a Telerik Insider, a past Director on the INETA North America Board, a husband and dad, and has been developing software since the early days of Laser Discs and HyperCard stacks. As the Founder and President of the Inland Empire .NET User's Group, he has fondly watched it grow from a twice-a-month, early Saturday morning group of five in 2003, to a robust and rambunctious gathering of all types and sizes of .NET developers.

James loves to dig deep into the latest cutting edge technologies - sometimes with spectacular disasters - and spread the word about the latest and greatest bits, getting people excited about developing web sites and applications on the .NET platform, and using the best tools for the job. He tries to blog as often as he can, but usually gets distracted by EF, LINQ, MVC, ASP, SQL, XML, and most other types of acronyms. To keep calm James plays a mean Djembe and tries to practice his violin. You can follow him on twitter at @latringo.

And as usual, the comments, suggestions, writings and rants are my own, and really shouldn't reflect the opinions of my employer. That is, unless it really does.

James Twitter Feed

Recent Comments

Comment RSS

Month List