Software Geek

March 6, 2008

Is this ethical - Part 2

Filed under: Software


Since the conversation on this topic was interesting, I thought it would be appropriate to add some more information and answer where I stand on the question. After all, I asked the question in my previous blog post, I didn’t answer it.

First , my opening comments as Will and I sat down for the interview. (these come courtesy of Will in an email to me about this subject)

>> WL: Okay. I want to start off actually, this is going to be
>> just a big Q&A, pretty much straight up and everything. So I want to
>> start…
>> MC: This is just for GQ now.
>> WL: Just for GQ, not for Deadspin. No Deadspin stuff, and no
>>… yeah, I have the journalist hat on. And I have the journalist
>> hat on at Deadspin, too, but anyway, let’s… another debate for
>> another time.
>> MC: We won’t call that journalism.
>> WL: Another debate for another time.

So i made it clear that I wanted no association with his blog at all.

Does his writing a piece about me with a link back to the very item that he knew I wanted nothing to do with constitute a lack of ethics ? I think so. It certainly is a major fuck you.

Does making the following comment “Cuban was not amused and spent most of the interview accusing Deadspin of being the Inside Edition of sports. So that was fun.) ” diminish the integrity of the interview itself ? Probably not, but to som (more…)

Playing Multiple Simultaneous Sounds in WPF

Filed under: Software

WPF’s MediaElement makes simple media playback pretty straightforward, but moving beyond the simple scenarios can sometimes raise surprising challenges. For example, I recently saw someone tripped up by the MediaElement when attempting to play several sounds concurrently.

As you’ll see, one solution would have been to use MediaPlayer instead of MediaElement. The difference between these WPF classes is fairly straightforward. MediaPlayer is the class that knows how to play media files – both video and audio. MediaElement is a wrapper around MediaPlayer that provides a simple way to connect it into a visual tree (i.e. a user interface), which in turn lets us hook it into things like the animation system or event triggers.

Live Help Software: Live Chat with Users on your websites. It is FREE !

(Note: do not be misled by the class name. Although WPF and Windows Media Player depend on the same infrastructure for media decoding, the MediaPlayer class is not a wrapper around the Windows Media Player control. While they share codecs, the path by which decoded video gets onto the screen in WPF is significantly different from Windows Media Player.)

How would that get you into trouble when using MediaElement? If it’s a wrapper around MediaPlayer, surely you could use a MediaElement any place a MediaPlayer would work? In fact it’s not always that simple. To see why, we’ll start with a simple example.

One MediaElement

(more…)

Dare Obasanjo on C# Anonymous Types

Filed under: Software

Dare Obasanjo recently wrote a blog entry comparing some language features commonly associated with ‘dynamic’ languages with C# 3.0 equivalents. Towards the end is a section called “Python vs. C# 3.0: Tuples and Dynamic Typing vs. Anonymous Types and Type Inferencing.” In it, he complains that he ended up needing to use nominal types, instead of anonymous types. For example, he wrote:

var vote = new Vote()
{
 Weight = voteFunc(item),
 Item = item,
 FeedTitle = feedTitle
};

This required him to define the Vote class somewhere. He had been hoping to use C#’s anonymous types, which would have removed the need to define the Vote class explicitly, letting him write:

Help Desk Software: for your business. Java Custom Software Soulutions and Service.
var vote =
{
 Weight = voteFunc(item),
 Item = item,
 FeedTitle = feedTitle
};

He couldn’t do this because his code structure prevented the anonymous type flowing to where he needed it. The first part of his code was a loop which added a bunch of these votes to a list which he later wanted to iterate through. The anonymous type was buried in the nested scope of the first loop, and was therefore inaccessible in the second loop. The fundamental problem here is that C# type inference for ‘var’ variables occurs at the point of declaration. The compiler isn’t prepared to wait around and see what you do with the variable – if it can’t infer the type at the point of declaration it gives up with an error.

(more…)

New Assembly, Old .NET (and Vice-Versa)

Filed under: Software


I typically recommend that you build and test your assemblies against the same version of.NET that you will be running them against. That way, you’ll have correct references and avoid surprises from behavior differences between builds.

Older assembly, newer.NET

But, sometimes you don’t run against the same version that you built against. For example, the latest available CLR is the default when interop causes it to be loaded. Or, if the version of the CLR the assembly was built against is not available, the latest version can also be used instead. If there is a compatibility problem with that for your application, you can force the use of a preferred CLR version by using an app.config.

Compatibility

Yes, there are going to be behavior differences between versions - no way around it. It is the.NET team’s goal to be as backwards-compatible as realistically possible between versions. But, some changes are required - new features are added which sometimes require (hopefully minimal) behavior changes in other features. If we were required to never break any app, ever, we wouldn’t be able to fix any bugs or add any features for fear that someone, somewhere relied on the broken behavior in some strange way. As Dll Hell has shown in the past, new versions of components aren’t really compatible. The only guaranteed 100% compatible version is the same one you tested against.

V2+ assembly, older.NET

(more…)

The Exception Model

Filed under: Software


I had
hoped this article would be on changes to the next version of the CLR which
allow it to be hosted inside SQL Server and other “challenging”
environments.  This is more
generally interesting than you might think, because it creates an opportunity
for other processes (i.e. your
processes) to host the CLR with a similar level of integration and control.  This includes control over memory usage,
synchronization, threading (including fibers), extended security models,
assembly storage, and more.

< ?xml:namespace prefix = o ns =
"urn:schemas-microsoft-com:office:office" /> size=2> 

However,
that topic is necessarily related to our next release, and I cannot talk about
deep details of that next release until those details have been publicly
disclosed.  In late October,
Microsoft is holding its PDC and I expect us to disclose many details at that
time.  In fact, I’m signed up to be
a member of a PDC panel on this topic. 
If you work on a database or an application server or a similarly
complicated product that might benefit from hosting the CLR, you may want to
attend.

(more…)

Tips for Installing Silverlight 2 Beta

Filed under: Software

Walking around Mix08 today I had a chance to help a few people with some install issues.  In some cases the installer was asking for VS 2008 media and in other cases it was refusing to install. 

Luckily, Bradley Bartz from the Visual Web Developer team was around to help folks.  He drilled into the cause of the issues he saw and wrote up a very nice blog post listing the common issues and solutions.

Installation Tips for Silverlight Tools Beta 1 for Visual Studio 2008


http://blogs.msdn.com/brada/archive/2008/03/05/tips-for-installing-silverlight-2-beta.aspx

Doing the Deal and Dishing the Dirt

Filed under: Software


I can say without question that this was the most amazing, annoying and difficult deal we have ever done since I bought the Mavs.

The annoyance. One agent who made a truism of the saying that “no good deed goes unpunished”. That said, I have nothing but respect and admiration for Devean George. He told me that he would trust his agent as he had done for the last 10 years and take whatever may with that decision. He had the balls to stick to it. Even with people yelling and screaming at him. That said, as I write this, I really have no clue why the agent made the decision he did.

The dirt. Peter Vescey’s ridiculous assertion that Avery asked me to trade Dirk. Even in the Nellie years where we discussed trading every other player on the roster, Dirk was never mentioned. There has never been a discussion of trading Dirk during my tenure, EVER. Vescey’s source is an out and out liar.

The thing about dealing with the media in this business is that they thrive on rumors and get bored with reality.

For example. Several local media outlets had no interest in sending anyone to New Orleans to cover the All Star game or Dirk’s appearance there. That changed once the trade rumors started. Then all of the sudden, every media person they could find was there. Newscasts led with the rumors. Newspapers speculated and comments on the impact of the rumors if true or not true. There was reporting on rumors about rumors. All of which is fine. I get that and in many m (more…)

OpenJDK 6 early release

Filed under: Software

A very early release of the OpenJDK 6 project is now available for download. This blog post addresses the project’s trajectory to achieve this milestone, as well as some parts that have yet to be integrated.


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

Resizing a Form has always been a pain in the rectum…

Filed under: Software

Think really hard for a second about how layout logic works… Oh, not that hard, you’re starting to smoke. Here, how about I think about it for you and then you can point out where you have a difference of opinion… That works better for me anyway. To start, layouts come in several different formats that will help use discuss the issues at hand. Here are several different formats that I can think of off the top of my head.

  • Fixed or Explicit Layouts - This is the most rigid layout type and it involves placing the controls precisely where you want them on the form and precisely sizing them. The main problem with fixed layouts is that you start to run into trouble as soon as you allow the form to resize. Either you have to augment the explicit layout with some additional code, or simply allow for the controls to stay in their place and forget the fact that your application looks ugly now.
  • Flow Layouts - Flow layouts are a bit more flexible. This is most similar to the way text wraps or flows in either your text editor or an html page. Think of each word as a control, and pretend you are simply trying to fit as many words per line as possible. Flow layouts change position, but not the size of an element. In this manner, if an element fits on the line it goes there, but if it would have to be resized, even if it could be, it won’t. When forms are made extremely wide flow layouts tend to look terrible. Even worse, if the elements are all different sizes then you wind up with a jagged right hand edge. The answer here is justification where the appropriate amount of border space is placed in between so that all controls are flush.
  • Tabular Layouts - These are probably the most often used. They can either be versatile and allow a variable number of columns depending on the row, or fixed, where each row has the same number of columns. Some columns are given a specific size, a percentage size, or allowed to expand to fill the remaining space. The closest equivalent is the html table elements. Tables don’t allow for complex layouts without having a series of place-holder columns. Each place-holder column added allows more and more freedom in placement, but at the same time, the more you add, the closer you are to simply using pixels (pixels are indeed a tabular layout mechanism).
  • Composite Layouts - Composite layouts are based around a hierarchy of nested layout types. At the top level of an application you often have a very specific fixed layout, with perhaps some resizing occuring between the few top-level elements. Outlook is a great example with its various configurable panes or windows. Within the panes more layout occurs. You can custom configure this lower level layout to be whatever you’d like, but it is easiest to support a two or three column tabular layout. Flow layouts are also popular.
(more…)

Never keep your emotions bottled up

Filed under: Software

Last week I was considering the purchase of a piece of
software.  I went to the vendor’s website for pricing.  It wasn’t there. 
Annoyed, I filled out the form so that I could be contacted by one of their sales people.  The
following day I got a response:

Thanks for considering (product
name deleted).  Please write back to me with your phone # or call me at the #
below — we can discuss pricing as I learn about your application and how you
plan to use (product name deleted) for development.

So I sent an email with the following response:

Hi (name deleted),

OK.  Please bear with me for just a
moment while I vent.

Softwre Development for small and middle size companies. World-class software applications.

#ifdef FRUSTRATED_RANT

First, I hate the fact that you
guys don’t put pricing on your website.  I looked up the old version of your
site using archive.org, so I’ve got a ballpark idea of what the pricing was
around six months ago.  Mostly I just want to know if anything has changed.

Second, it’s absurd that when a
customer asks for pricing, you won’t give it to them.  Instead, you answer the
question with a question.  I’m not even the slightest bit interested in telling
you about our application and how we plan to use (product name deleted) for
development.  I just want to know your pricing and your license terms.

(more…)

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