The blog of flying mind

March 22, 2008

SIGPLAN Workshop on Undergraduate Programming Language Curriculum

Filed under: Software

Also see: Hello world!

SIGPLAN Workshop on Undergraduate Programming Language Curriculum.

Programming languages play a critical role in computer science by providing a flexible and robust means by which human beings interact with and control computer systems. Programming language design and implementation has advanced significantly in the recent past in response to the increasing pervasiveness of computer science and technology. Unfortunately, higher-education curriculum has not kept pace, and so it does not appropriately reflect the expansive growth and evolution. This lag is a critical challenge because an up-to-date curriculum is essential to prepare a globally competitive workforce, able to generate and to apply new knowledge, and to take the lead in advancing computer science and technology.

The goal of this workshop is to bring together leaders in the field of programming languages with expertise in research, teaching, and industrial use to discuss the role of programming language design, implementation, and application in modern, undergraduate, computer science education. Our objective with this effort is to build a community for these experts to discuss, critically evaluate, and identify the transformational changes needed to best prepare undergraduates to participate in the rapidly changing field of computer science and technology.

In particular, this workshop should provide a forum for the community (1) to evaluate recent changes and likely trends in computing technology and their impact on programming language design, implementation, and application (and vice versa), (2) to discuss the implications of these changes on programming language curricula, and (3) to explore strategies for designing new curricula. For the first task, we will consider trends that include the looming ubiquity of multi-processing systems, the proliferation of domain-specific languages, the increasing diversity of relevant programming languages, infrastructures, and support tools, the growing heterogeneity of device architectures (high-performance computing systems, desktops, game consoles, mobile phones, hand-held devices, etc.), and the increasing complexity of systems (operating, runtime, and application-level). For the second task, we will consider how these trends impact what and how we should be teaching our undergraduates about programming languages. Finally, for the third task, we will explore various tactics for designing new programming language curricula that incorporate the insights from these discussions and yet fit within the constraints of existing undergraduate programs.

(more…)

Using IronPython for Dynamic Expressions.

Filed under: Software

Also see: LINQ - The Uber FindControl

We recently had this question posted to our forums over at LVS :

Dear Forum Experts:

I am looking for very specialized solution:

I have various Items which I store into a table in a Relational DB.
I would like to do a custom calculation, specific for each item at it’s instance. Because the calculation is specific for the item, and items are soo many I wold like to store the calculation formula into a relational DB. The problem is to convert the string of formula into a real programming command and to actually perform the calculation. I do not want to use Excel or additional software in order to gain calculation speed e.g.

ItemID = 5001, ItemSize = “a - b”
ItemID = 5002, ItemSize = “a - 2*b”
ItemID = 5003, ItemSize = “a + b”

So, ItemSize is actually the formula expression that would calculate various instances of a and b variables… I have tryed this:

int a = 10;
int b = 5;

string formula = “a + b” // This comes from ItemSIze of DB,SQL, etc.

int Result = a + b; // This is a second line for test only - hard coded…

int CalcResult = int.Parse(formula); //I wish this was working…

MessageBox.Show(Result.ToString()); // This works…
MessageBox.Show(CalcResult.ToString()); // Never got that far.

The result will be stored in different DB with the instances of a and b.
Could you please post any information on how should I approach this problem.

Thanks a lot.

Several options immediately came to mind: code up a simple expression interpreter, evaluate the expression with dynamic SQL (yuck), use lightweight code gen. Then I remembered this little thing I saw at last years PDC called IronPython. Solving this problem with IronPython was “like butta”.

(more…)

Alexbarn Leaves Microsoft…ARGH!

Filed under: Software

With a farewell quote from the greatest American writer of all time, my friend, neighbor, and idea-mate, Alex Barnett has announced that he is leaving Microsoft and Redmond to join a startup in Utah: Bungee Labs. [Lump_in_throat]. If they had any idea of the potential that Microsoft is losing, with Alex’s departure, Steve would be ranting, Bill would be knocking on Alex and Katia’s door, this evening, and Mary Jo would be working overtime.

Alex who? Alex Barnett is one of the most brilliant “practitioners” of social software, on Earth. Alex lives in the future; he reads, blogs , and tags prolifically in the present; and he routinely conceives of BIG ideas that have or will soon change the way WE discover resources, connect, interact, and collaborate, on the World Wide Web. Alex is the only [other;-)] blogger whose RSS feed I have recommended to every member of my team, Microsoft.com Communities Technologies, and do to practically everyone else I work with with, inside and outside MSFT.

Although Alex and I didn’t really connect until about a year ago (a fact which we both find odd given the proximity of our interests, jobs, and homes) Alex has fast become my singular idea mate. Recently, upon learning that I had yet to read The Singularity is Near , Alex purchased me a copy and delivered it to my doorstep. He’s just that kind of guy.

(more…)

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

Filed under: Software

Also see: I’ve finally settled into my new position on the Internet Explorer team…

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

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

Filed under: Software

Also see: Parsing things you don’t understand

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

Access to old blogs

Filed under: Software

By default, old blogs are truncated from this web site.  If you want to read
old entries that have scrolled off, go to the CATEGORIES section at the right hand
side of the web page.  Select CLR (rss) and you’ll see the full list.


http://blogs.msdn.com/cbrumme/archive/2003/11/10/51572.aspx

From C# to Java: Part 5

Filed under: Software

Also see: Generics and .NET

In the transition from C# 1.0 to C# 2.0, they added
generics.  This was an enormous improvement.  Huge.

(At first I was actually kind of skeptical of generics. 
They reminded me of C++ templates, the use of which I had opposed on several
occasions.  But my 1993 reasons for advocacy against C++ templates really
weren’t relevant to the C# generics in 2005.)

So when I started my recent exploration of Java, one of my
main questions was:  Are the generics in Java 1.5 similar to generics in C#
2.0?

The answer:  Sort of.  Not really.

To be fair, I’ll admit right up front that Java generics are
better than no generics.  I’m using them.  They work just fine in practice for
most situations.

But they’re fundamentally different from C# generics.  In
C#, a generic is implemented at the CLR level.  When you instantiate a
List<T>, at runtime it will generate an implementation of a List which is
specifically for type T.

When TPTB added generics to Java, one of their goals was to
avoid the need for any changes to the VM.  So Java’s generics are implemented
at the compiler level using a technique called “type erasure”.  Basically, the
Java compiler does all the necessary type checking, but then it throws the
parameterized type information away and generates regular collection code. 
This has a few consequences which are rather unfortunate:

  • Since the parameterized type is no longer present in the
    bytecode, reflection doesn’t show it.

  • The compiler inserts all the casts that you would have had
    to write if you were using the non-generic collection class directly.

  • In a generic collection of a primitive type, the
    parameterized type gets boxed.

(more…)

Web Access for Visual Studio Team System

Filed under: Software

Also see: Applied Metamodelling: A Foundation for Language Driven Development

Also see: The Exception Model

Also see: On the Perils of Wikipedia

Also see: Degrees of optimism in projects

Also see: Exception Handling in Running a Business

Also see: LoadFile vs. LoadFrom

Microsoft Distinguished Engineer, Brian Harry follows up on his recent announcement about Microsoft’s acquisition of of devBiz , developers of TeamPlain Web Access for VSTS. Brian heads up our Visual Studio Team Foundation development team, based in Raleigh, NC. Note that TeamPlain is unrelated to Teamprise , which to quote Jim Newkirk , recently ”announced a complimentary license of the Teamprise client suite for anyone wanting to connect to an open source project on CodePlex.”

If you are an existing devBiz customer, I encourage you to think about and weigh in on the following comment, on Brian’s weblog.

Another set of feedback we’ve gotten revolves around the devBiz components products - devMail, devDns and others.  We have removed these products from the market and are unsure what our future plans for them are.  I’ve seen requests that we open source them among other things.  We are considering many options ranging from including them in other products to making the source available in some form - either to existing customers, publicly or otherwise.  We want to make sure that customers feel that they have a good path forward.  We hope to reach a conclusion on a plan in the next few weeks on this issue as well.”

If the VSTS team decides to release some of the products Brian mentions as open source projects, I hope and wouldn’t be

Live Chat (Help Desk) Server Software
Improve performance of customer support with Jerry Messenger. Live Chat Support to your website visitors.

Also see: Sliced Bananas On Opaque Data

Also see: Introducing Microsoft Tagspace

surprised to see them posted on CodePlex , which runs on Visual Studio Team System.
http://blogs.msdn.com/korbyp/archive/2007/04/02/web-access-for-visual-studio-team-system.aspx

Introducing Microsoft Tagspace

Filed under: Software

Also see: Generics and .NET

Also see: AppDomains (”application domains”)

Also see: Exception Handling in Running a Business

Tagspace * is a social bookmarking service for software professionals** that encourages sound sleep and sweet dreams by enabling you to be better informed, better connected, and more productive. The more you use Tagspace, the more you’ll wonder how you survived for so long in the cramped quarters of your Web browser’s Favorites folder.

WARNING: TAGSPACE IS ADDICTIVE. REPEATED USAGE MAY CAUSE INCREASED PRODUCTIVITY.
*Tagspace has been shown to be effective in helping to prevent and reduce memory decay.
**No animals or software engineers were harmed in the making or testing of Tagspace.

For more information about Tagspace, see:

Screencast (direct stream): intro2tagspace.wvx Screencast (on MSN Soapbox): intro2tagspace.wmv Text Overview: Tagspace Beta Refresh Overview
Product Roadmap: Microsoft.Community Today and Tomorrow   (…because this is just the beginning.)
Tagspace: In the News
Subscribe: RSS


http://blogs.msdn.com/korbyp/archive/2007/04/16/introducing-microsoft-tagspace.aspx

VPC 2007 Dual Monitor support

Filed under: Software

I have been trying to find a way to allow you to run Virtual PC 2007 with multiple monitors.  Natively VPC 2007 doesnt support more than 1 monitor, however you can “trick” it by using various techniques that expand the desktop area into a larger virtual desktop.

I tried using the awesome MaxiVista tool which can extend your screen across separate PC’s (think “push” remote desktop), but the new multi-monitor compatibility feature of VPC 2007 (which inexplicably does not add multi-monitor support) made this difficult since it ensures that your desktop recaptures your mouse when you move it outside of the VPC window thus preventing the extended screen from being accessible.

So, instead I tried the Remote Desktop approach mentioned in Steven Harman’s blog post.  

Here is a quick rundown on how it works:

Connect 2 monitors to your PC (more than 2 typically don’t work with this approach).   Make sure to extend your desktop onto the 2nd screen via Display Properties -> Settings.  Then launch Remote Desktop (mstsc.exe) with the “/span” flag:

mstsc /span

Then just use Remote Desktop as usual by specifying your VPC’s computer name in the connection dialog.

(more…)






















Get free blog up and running in minutes with Blogsome
Theme designed by Hadley Wickham