Live Chat Programs

March 21, 2008

Java Concurrency, another series on its issues

Filed under: Live Chat software

Previously in the blog section at TSS we presented a series on the issues related to Java concurrency, continuing with what is definitely a topic of interest given the emerging processor architectures in the industry, we present this post covering yet another series on the issues of Java concurrency.

Also see: LINQ - The Uber FindControl


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

Generating WPF Content with LINQ

Filed under: Live Chat software

Also see: Bloggers in the Mavs Locker Room ?

Mike Taulty recently posted an example showing how to use LINQ to generate a graph in XAML.

He uses the new XML literal syntax in VB.NET. Since C# doesn’t get that feature, an exact conversion to C# would be relatively verbose. So, score one to VB.NET? Not so fast. I wanted to show an alternative approach that works as well in C# as it does in VB.NET.

You don’t need to go via XAML for this sort of thing at all. Perhaps the most important thing to grasp about XAML in WPF is that anything you can do with XAML, you can also do with code. Here’s a LINQ example based on Mike’s program, but which bypasses the XAML completely:

public Window1()
{
 List<Point> data = new List<Point>();
 int width = 8 * 96;
 int height = 6 * 96;
	
 for (double i = 0; i < (Math.PI * 2); i += (Math.PI / 50))
 {
 data.Add(new Point(i, Math.Sin(i)));
 }
	
 this.Content = new Grid
 {
 Width = width, Height = height,
 Background = Brushes.Black,
 Children =
 {
 new Polyline
 {
 Stroke = Brushes.White,
 Stretch = Stretch.Fill,
 StrokeThickness = 2,
 Points = new PointCollection(
 from p in data
 select new Point(p.X, p.Y))
 }
 }
 };
}

(more…)

Chicago geek dinner 11/22

Filed under: Live Chat software


Also see: Simplifying Web Service development with JSR-181

When: Wednesday, November 22nd, 2006
Where: Rock Bottom @ State & Grand
When: 6PM

Last day to get out before the entire Midwest descends on our fair city for the holiday shopping season.

Bear down!
http://weblogs.asp.net/jkey/archive/2006/11/20/chicago-geek-dinner-11-22.aspx

Mix 08 Sessions Published

Filed under: Live Chat software


Also see: Solving big business problems in our little toolbox application. A use case for Project Distributor.

The great folks here running Mix have done a excellent job getting the videos for the Mix session up already! 

Check them out at : 

http://sessions.visitmix.com/

 

 

Check out my session on Building an Ajax Application from scratch..   It was an all demo, no slides sort of talk , so it really stands out in the listing ;-)


http://blogs.msdn.com/brada/archive/2008/03/07/mix-08-sessions-published.aspx

Dare Obasanjo on C# Anonymous Types

Filed under: Live Chat software


Also see: Mix08 Session Overview: Building Great AJAX Applications from Scratch Using ASP.NET 3.5 and Visual Studio 2008

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:

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…)

From C# to Java: Part 3

Filed under: Live Chat software


Also see: Avoid DevPath

Until about 2002 I had a broad disdain for most IDEs.  I
just felt they were too pushy.  They were always trying to take control
over my build system or the layout of my source tree.  If I’m going to give
those things up, I want something in return.  For a long time, the tradeoff
never seemed fair.  THINK C on the Macintosh was one of the only IDE products I
actually liked.

Visual Studio.NET 2002 was the first Windows IDE that won
me over.  I still use vi or emacs almost every day, but I’ll admit that I now use
Visual Studio more.

Last year I switched to Visual Studio 2005, and I love it. 
This is a product that is so perfect I worry about its next release.  Now that
Visual Studio 2008 is out, I’ll probably give it a try at some point soon.  But
Visual Studio 2005 is sort of like “if it works, don’t mess with it”.  The last
thing I want is for them to screw it up, and I can’t really imagine how
it could be better.

I guess when it comes to IDEs, I’m just not very
imaginative.  :-)

I started using Eclipse a few weeks ago, and now I
understand a bit more about where Visual Studio has room to improve.  I think
Eclipse is amazing, and I’ve barely scratched the surface.

So anyway, here are a couple of my current favorite Eclipse
features:

Constant Builds

When I first installed Eclipse, the very first thing I did
was look for the menu item to start a build.  When I didn’t find one, I assumed
that the Eclipse menu system must be too cluttered and counterintuitive.  How
could they make such a frequently-used command so hard to find?

(more…)

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