Software Geek

March 26, 2008

Versioning/Deploying Unmanaged Files

Filed under: Software

Also see: Important changes to the BASE element for IE 7

Also see: Blogging and Newspapers, a Lesson in How Not to Brand and Market

Also see: Chris Sells

An unmanaged dll can be wrapped in a managed assembly by adding it as a file of a multi-module assembly. Then, it can be deployed and versioned in the same way as managed assemblies. (So, that assembly could contain nothing but metadata and unmanaged code - no managed code, if you prefer. It can also contain multiple unmanaged files in the same assembly.)

If your compiler does not support this directly, you can get this to work by adding that file as a linked managed resource. For example, see Visual Studio’s /linkresource option (if using it for command line compiling).

This is useful in the case where DllImport() is used to access a function in that file. That call should be updated with the new assembly’s info. For example, in the place of “unmanagedfile.dll”, change it to include the display name like this: “unmanagedfile.dll, managedassembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089″.

If that unmanaged file needs to be loaded by LoadLibrary() outside of DllImport(), however, it will need to follow the rules of LoadLibrary(), like the usual unmanaged file use outside the CLR. (See Junfeng’s blog for an extra tip regarding that when using v2.)


http://blogs.msdn.com/suzcook/archive/2004/10/28/versioning-deploying-unmanaged-files.aspx

Quick attempt at a validating roman numeral parser… Lots of gotchas.

Filed under: Software

Also see: Why Yahoo should say Yes to MicroSoft

Also see: Help John Baez and Mike Stay!

Got asked about a roman numeral parser during an interview. I have to say that I don’t mind when the process of obtaining employment plays into my strengths. The process was quite similar to a previous process where I wrote a spoken numerics converter. Not only that, there were many similar qualities to my int parsing routines. With that in mind I think I did fairly well. The goal at the time was to produce a routine to validate numbers up to roman numeral 30 or XXX. Didn’t take long, but in the end, I had left out many different validation techniques. I really wanted to revisit the problem since I had the code correctly written in my mind. Check the algorithms out, they should handle just about anything you can throw at them at this point. If you find issues, please feel free to submit your problems, since I’d love to solidfy things a bit more. Apparently roman numeral parsing has great application in reading dates.

Roman Numeral Parsing: Code Only: Bidirectional roman numeral parsing. [EDIT: Added alternate parsing routines and performance fixes]
Integer to Spoken Numerics: Code-Only: int/long/double conversion to Spoken Numerics
Phone Number to Words: Trying my hand at the old Phone number to Words teaser project!
Integer Parsing: DWC.Algorithms.NumberUtilities


http://weblogs.asp.net/justin_rogers/archive/2004/10/24/247032.aspx

March 25, 2008

VS.NET Macro To Group and Sort Your Using Statements

Filed under: Software

Also see: Access to old blogs

I try to follow a coding standard for organizing my using statements. System.* goes at the top and then other namespaces grouped together like this:

 using System;
 using System.Collections.Generic;
 using System.Configuration;
 using System.Data;
 using System.Data.SqlClient;
 using System.Web;
 using System.Web.Script.Services;
 using System.Web.Services;
 using System.Web.Services.Protocols;
	
 using Microsoft;
 using Microsoft.CSharp;
	
 using MyCompany;
 using MyCompany.Web;

(more…)

Sliced Bananas On Opaque Data

Filed under: Software

Also see: When Will Foreign Ownership of US Sports Teams Start ?

Also see: Sometimes, it’s the small things..

Also see: Microformats are like RFID tags for the Web

Sliced bananas on opaque data (The expression lemma). Ralf Lämmel and Ondrej Rypacek.

Algebraic data types and catamorphisms (folds) play a central role in functional programming as they allow programmers to define recursive data structures and operations on them uniformly by structural recursion. Likewise, in object-oriented (OO) programming, recursive hierarchies of object types with virtual methods play a central role for the same reason. There is a semantical correspondence between these two situations which we reveal and formalize categorically. To this end, we assume a coalgebraic model of OO programming with functional objects. In practical terms, the development prepares for refactorings that turn sufficiently disciplined functional folds into OO programs of a designated shape (and v.v.).

I haven’t even glanced at the paper yet, but it looks extremely interesting, and it’s directly related to some recent discussion. This blog post from Ondrej is also relevant.


http://lambda-the-ultimate.org/node/2709

Is this the best NBA season ever ?

Filed under: Software

Also see: YouTube Tries to Get Legal

Also see: DevWeek 2008 Cross Platform Silverlight Demos

I haven’t done the research to find out when the last time 7 games separated one conference’s top 10 teams, all with a winning record and playing good basketball this late in the season. It hasn’t happened in the 8 years I have owned the Mavs.

This year is shaping up to be a crazy one. A 5 or 6 game losing streak and any of the 4 teams who have had the best record in the west over the past month could find themselves out of the playoffs.

This scenario is not lost on players or fans. The feel in arenas lately have been very playoff like. You can feel the energy as fans know what is at stake. Players are looking at the standings and paying far closer attention to game by game results of division and conference teams. They know what is at stake with every game.

This season, at least in the Western Conference, no one is going to ask the question of whether the regular season is important. For the remainder of this season, EVERY game is important. Every team will have their up and down streaks simply because its going to be hard to play playoff quality basketball for 40 games. Back to back games in the West are going to be brutal.

The playoffs to make the playoffs has started and it doesn’t look like any team will get a breather between now and when their season ends.

That will make this the Best NBA Season Ever !

Live Person Software: Just one single click and your website visitors are getting into instant message chatting with you.

Also see: TransparentProxy

Also see: Bloggers in the Mavs Locker Room ?

Also see: YouTube Tries to Get Legal

Also see: Load(AssemblyName)

Also see: Natural Sorting in C#

Also see: Publishing: Good reviews, bad reviews, and hurting oooh so many feelings.

Also see: TransparentProxy

Also see: Avoid DevPath

Also see: A Quick Fix for the Validator SetFocusOnError Bug

Also see: DevWeek 2008 Cross Platform Silverlight Demos

2px; font-size: 1px; border: 0; margin: 0; padding: 0;”>
Permalink  | Email this  | Linking Blogs  | Comments

http://www.blogmaverick.com/2008/01/28/is-this-the-best-nba-season-ever/

JSR-294 Superpackages

Filed under: Software

Superpackages are slated to be a big part of Java 7. Learn what they are and how they will influence the packaging model which has been used in Java since its inception.

Also see: IDE Day in Genoa, Italy


http://feeds.feedburner.com/~r/techtarget/tsscom/blogs/~3/256890355/thread.tss

Single source code base for Silverlight and WPF solutions

Filed under: Software

At Mix08 , several people asked me about the possibility of creating a single source base for both WPF and Silverlight.  The scenario folks had in mind was to provide a reach solution with Silverlight that hits *ALL* possible users while also offering a really rich solutions for some users on full WPF (.NET Framework 3.0 or 3.5). 

This is a clear benefit of the Microsoft Ux platform.. We have worked hard to get a smooth continuum between WPF and Silverlight… Basically if it works in Silverlight you should be pretty sure it will work on WPF. 

I was chatting David Anson (one of the developers of the Silverlight 2 controls) and he mentioned that the shipping versions of ListBox and ScrollViewer were written this way!   That is right, to test out the continuum message, David built ListBox and ScrollViewer for Silverlight in such a way that the run (and past unit tests) on both WPF and Silverlight.  

Now, in and of itself, this is not all that interesting, because WPF already has a ListBox and ScrollViewer, but it does serve as a nice test case to demonstrate how you can build controls and applications that work on both Silverlight and WPF. 

Because we shipped the source and unit tests for the Silverlight controls, you can check this out yourself ! 

In addition, David did a nice blog detailing the work he did and why and posted the test project you can try out as well. 

On a related note, be sure to check out the final step of ScottGu’s Silverlight 2 tutorial…  Notice how easy it is for him to make a WPF application out of it.

(more…)

The NCAA and the Hoosiers

Filed under: Software

Also see: Silverlight 2 DataGrid walk-through posted

Ok, so I was pissed to see Coach Sampson bought out. I completely understand that the rules are the rules and he violated them. I can’t even argue that the punishment doesn’t fit the crime. Coach Sampson appears to be a repeat offender. What I have a problem with is the NCAA and this situation is emblematic of exactly what is wrong with the organization.

The NCAA is an organization that supposedly prides itself on making sure that athletes are students and attend college with the intent to be students. What the NCAA fails to understand, IMHO, is that often students attend college with a specific goal or dream in mind. It may be to graduate and become an accountant, a musician, an artist, a teacher and any number of other professions. Every student who goes to school, post high school is given every opportunity and encouraged to maximize their effort and optimize their resources to achieve their goals. Unless of course they happen to attend a school that is a member of the NCAA and their goal is to be a professional athlete. In those cases, the NCAA does everything it can to make sure that the athlete is not a typical or traditional student.

For these student athletes, rather than doing every thing possible to excel in their chosen field, they face rules and restrictions that are exceeded in quantity and complexity only by the US Tax Code.

One summer I visited Indiana and there were some players working out and playing on the Assembly Hall court. After watching a few minutes, I walked in the h (more…)

March 24, 2008

Silverlight and WPF Control Developer Huddle at Mix08

Filed under: Software

Also see: Yes, it does mean everything

Also see: Silverlight 2 DataGrid walk-through posted

Also see: TransparentProxy

I just  ran into Ted Glaza from Ajax Control toolkit and Silverlight Controls fame and he is getting some of the control developers together (3rd parties, Microsoft as well as in house) to talk about building controls for WPF and Silverlight. 

We will have some folks there are are building the current set of controls that ship in the box for Silverlight and WPF from and I hope some folks from Telerik, ComponentOne, and Infragistics. 

Ted tells me we will meet up in a few tables in the center of the dining room here at Mix tomorrow (Friday) at during the lunch break.

Anyone is welcome be there if you can!


http://blogs.msdn.com/brada/archive/2008/03/06/silverlight-and-wpf-control-developer-huddle-at-mix08.aspx

The 2 Technology Magazines You Should Read

Filed under: Software

Also see: Publishing: Good reviews, bad reviews, and hurting oooh so many feelings.

Also see: Introducing Microsoft Tagspace

Also see: Startup, Shutdown and related matters

I read a ton. Online, magazines, newspapers. I troll the newsstands for new magazines just trying to see if there is something out there Im missing.

I also get asked all the time what magazines that I do read. I’m not going to go through the list, but I’m going to list two that are must reading for anyone who has an interest in technology. Why ? Because they often cover in technical detail just how 99pct of the bandwidth available to the home is managed, planned and maintained.

It’s amazing to me how all the “internet pundits” truly have no understanding that 98pct of the bandwidth to most people’s homes is not allocated to the internet, its allocated to everything else digital and analog and managed quite differently than the internet bandwidth that you receive. Not understanding the difference between the two (internet and non) pretty much eliminates your ability to understand the future of broadband technology to the home.

To help the uninformed, I decided to share my 2 faves:
Communications Technology

ScreenPlays

These are the 2 magazines that I save every issue of and that I get excited to learn something new.

check em out

Permalink  | Email this  | Linking Blogs  | Comments

http://www.blogmaverick.com/2008/02/27/the-2-technology-magazines-you-should-read/

Get free blog up and running in minutes with Blogsome
Theme designed by Jay of onefinejay.com