Följande sessioner om Oslo tittade jag på:
TL23 A Lap around "Oslo"
TL27 "Oslo": The Language (M)
TL18 "Oslo": Customizing and Extending the Visual Design Experience (Q)
TL28 "Oslo": Repository and Models
Och trots min envishet, så är jag inte så säker på att jag blev så mycket klokare av det. Javisst, om du har behov av att skapa en DSL, så blir detta nog M-delen ett rent lätt och bra sätt. Men det är en bit kvar till att jag tror att det blir "The Way" att bygga applikationer, Q som det visuella verktyget heter är byggt på Oslo-sättet, och är fullt customizerbart för att användas som visuellt verktyg för din egen app, för att lyckas med det bör du nog ha varit med i teamet som byggde Q. Oslo är bara en CTP på ett ambitiöst halvårsgammalt projekt. Spännande, titta gärna, men det är långt kvar till något färdigt.
En del av tanken bakom Oslo projektet är att applikationer som SharePoint och Microsoft Dynamics ska "out of the repository business".
onsdag, november 05, 2008
Mer från PDC; TL51 Research: Contract Checking and Automated Test Generation with Pex
Denhär sessionen var kanon, jag missade ett par minuter i början, och har inte Spec# helt aktuellt, men som jag fattade det är Contract Checking-delen det som kommer in i C#4.0 från spec#, mycket trevligt, det kan ju aldrig skada att få ytterligare en möjlighet att uttrycka sina intentioner. men precis som t ex när man skriver unittester så är det viktigt att välja rätt saker att styra upp betendet kring, annars kan det snärja dig längre fram.
Sen kommer PEX som ett imponerande extra verktyg. Det hjälper dig att kolla om du under alla omständigheter håller vad du lovar i både kontrakt och asserts. Jag tvivlar på att jag kommer att använda PEX dagligen, men i en del sammanhang kan det absolut vara till hjälp.
Sessionen som helhet rekommenderas varmt.
Sen kommer PEX som ett imponerande extra verktyg. Det hjälper dig att kolla om du under alla omständigheter håller vad du lovar i både kontrakt och asserts. Jag tvivlar på att jag kommer att använda PEX dagligen, men i en del sammanhang kan det absolut vara till hjälp.
Sessionen som helhet rekommenderas varmt.
Mer från PDC; PC54 Mono and .NET
Den här sessionen gav en underhållande inblick i nuvarande status för Monoprojektet. Bl a annat visade Miguel features som Anders Hejlsberg förhandsvisade för C# 5.0, och som han då kallade compiler as a service. Som eval i JavaScript.
Mer från PDC; TL58 Research: Concurrency Analysis Platform and Tools for Finding Concurrency Bugs
Har en stund över innan det mer intensiva valvakandet börjar i New York, så jag skriver några korta rader om ytterligare saker som fångade mitt intresse lite extra på PDC. Som en hjälp att söka i djungeln av sessioner.
Concurrency Analysis Platform and Tools for Finding Concurrency Bugs, rekommenderas varmt, hjälp för att hitta concurrency buggar genom att köra ditt testprogram med olika schedulering av trådarna i förhållande till varandra. Något som är mycket svårt att få fram på egen hand, ger dessutom möjlighet att debug'a den kombination som framkallade ett fallerat testfall. Både för native kod och för .NET.
Hmm, jag gör så att jag beskriver en session per post.
Concurrency Analysis Platform and Tools for Finding Concurrency Bugs, rekommenderas varmt, hjälp för att hitta concurrency buggar genom att köra ditt testprogram med olika schedulering av trådarna i förhållande till varandra. Något som är mycket svårt att få fram på egen hand, ger dessutom möjlighet att debug'a den kombination som framkallade ett fallerat testfall. Både för native kod och för .NET.
Hmm, jag gör så att jag beskriver en session per post.
tisdag, oktober 28, 2008
PDC 08 keynote tisdag
Massor av spännande saker visades, jag rapar upp ett litet urval av det som råkade fastna:
Som gammal MFC-programmerare blir man ju lite sugen på att skapa en ny MFC-app o se hur det ser ut med den nya ribbonskontrollen...
Släpps idag bl a en ribbonkontroll till WPF. Och en VisualStateManager, så man kan hantera visual state på samma sätt som i Silverlight.
Fortsätter om en stund, dax att rusa till nästa session.
Som gammal MFC-programmerare blir man ju lite sugen på att skapa en ny MFC-app o se hur det ser ut med den nya ribbonskontrollen...
Släpps idag bl a en ribbonkontroll till WPF. Och en VisualStateManager, så man kan hantera visual state på samma sätt som i Silverlight.
Fortsätter om en stund, dax att rusa till nästa session.
C# 4.0
Från PDC08 måndagen
Anders Hejlsberg höll en bra session om nyheterna i C# 4.0.
Jag tar och sliter ut min favorit från det han sa:
Dynamic den nya statiska typen i C# 4.0, fantastiskt trevlig i många sammanhang. Som object, men man kan anropa alla tänkbara metoder på den, det kompilerar, sen kan det naturligvis bli runtimefel. På så sätt kan man slipper en massa casts. Men man får o andra sidan ingen intellisence.
Med detta kommer en rad olika bindings mot olika språk. Mot .NET objekt så används .NET bindingen, som via reflection anropar invoke på metoden, alltså inget magiskt nytt, men snyggare och renare syntax.
Det finns även bindings mot COM, IronRuby, JavaScript, IronPython, så nu plötsligt blir det samma rena syntax oavsett språk :o)
dynamic game = GetGame(); //Game kan vara ett COM-objekt eller t ex ett
game.Play(); // JavaScripts-objekt
Anders Hejlsberg höll en bra session om nyheterna i C# 4.0.
Jag tar och sliter ut min favorit från det han sa:
Dynamic den nya statiska typen i C# 4.0, fantastiskt trevlig i många sammanhang. Som object, men man kan anropa alla tänkbara metoder på den, det kompilerar, sen kan det naturligvis bli runtimefel. På så sätt kan man slipper en massa casts. Men man får o andra sidan ingen intellisence.
Med detta kommer en rad olika bindings mot olika språk. Mot .NET objekt så används .NET bindingen, som via reflection anropar invoke på metoden, alltså inget magiskt nytt, men snyggare och renare syntax.
Det finns även bindings mot COM, IronRuby, JavaScript, IronPython, så nu plötsligt blir det samma rena syntax oavsett språk :o)
dynamic game = GetGame(); //Game kan vara ett COM-objekt eller t ex ett
game.Play(); // JavaScripts-objekt
måndag, oktober 27, 2008
Nyheter i .NETs typsystem
Första vanliga sessionen på PDC, en usel presentation, men ett intressant ämne. Det handlade om att bädda in interface i det konsumerande assemblyt. Om man som i talarens exempel ska automatisera excel via COM-interrop så är interropassemblyt 1,2 MB, men med den nya kompilatorswitchen slipper man deploya det stora interropassemblyt utan får istället en kopia av de lilla man använder i sitt eget assembly. I hans lilla exempel blev det 2 kB. Så det var nummer ett: inbäddning av typer. Den andra delen var typekvivalens eller type equivalence. Detta gör att om interfacet ändras så kan man ändå använda de gemensamma delarna. Gissningsvis har detta även kommit för att bättre kunna stödja dynamiska språk, walks like duke, sounds like a duke, it must be a duke...
Sammanfattningsvis, mycket kortfattat, så får vi verktyg för att hantera system där klient- och server-kod utvecklas och deployas oberoende av varandra. Trevligt. BTW, på keynoten annonserade Microsoft sin nya serviceplattform, Azure, men det kan ni säkert läsa om någon annanstans.
Sammanfattningsvis, mycket kortfattat, så får vi verktyg för att hantera system där klient- och server-kod utvecklas och deployas oberoende av varandra. Trevligt. BTW, på keynoten annonserade Microsoft sin nya serviceplattform, Azure, men det kan ni säkert läsa om någon annanstans.
First day of PDC
OK now I have finished the pre conference. This was about WCF. Juval Löwy tried to convince us that we should use WCF for all classes, that WCF is not about communication, but it's the new way of programming. Interesting. Ron Jacobs finished with some demos about how easy it is to make RESTful services with WCF 3.5.
onsdag, augusti 13, 2008
PDC and TestAutomationFx
Great, I'm going to PDC this fall :o)
BTW, the user interface toolkit integrated in Visual Studio that I mentioned before, is now released, TestAutomationFx, test it.
lördag, maj 17, 2008
NUnit runners with memory leak, and the solution
I found amazingly few references to people having problem with the NUnit test runners. We came to a point where the the NUnit test runners consumed over one gigabyte of memory and the same tests run from Resharpers test runner from inside Visual Studio would only consume about 250 megabyte of memory. I also found that the memory was not released between assemblies if you run a NUnit project file with multiple assemblies.
The problem was that a reference to each TestFixture decorated class was kept in the result even if it was unnecessary. Or to be more specific, the Fixture part of the result released it's reference to the tested Fixture class after TestFixtureTearDown, but the TestMethod in the result kept a reference to the very same Fixture...To find out about this I used a nice memory profiler, SciTech's .NET Memory Profiler
I posted a patch to the NUnit project on SourceForge. With this patch the nunit-console test runner use about the same amount of memory as the Resharper one, and I suppose this would be the case for the GUI one too, since this was a change in the core.
The problem was that a reference to each TestFixture decorated class was kept in the result even if it was unnecessary. Or to be more specific, the Fixture part of the result released it's reference to the tested Fixture class after TestFixtureTearDown, but the TestMethod in the result kept a reference to the very same Fixture...To find out about this I used a nice memory profiler, SciTech's .NET Memory Profiler
I posted a patch to the NUnit project on SourceForge. With this patch the nunit-console test runner use about the same amount of memory as the Resharper one, and I suppose this would be the case for the GUI one too, since this was a change in the core.
Etiketter:
.NET,
English,
OpenSource,
Tools
måndag, februari 25, 2008
Nice, smart and simple GUI testing
If you would like to test your windows GUI, try this Test Automation Fx.
You will get a new project in Visual Studio 2005 and 2008 and a designer to create your test project.
Then you record some clicks in your application to test. The designer generates C# or VB.NET code.
You can run the test to verify that your application behaves ;o)
It's nice that the output is .NET code so we can make adjustment if we need to. And even better, the recorded clicks doesn't only use stupid coordinates, but it identifies and finds buttons by name :o) So it could handle some changes without breaking the tests.
It works for both native and .NET applications.
It's a beta, but definitely worth looking at.
You will get a new project in Visual Studio 2005 and 2008 and a designer to create your test project.
Then you record some clicks in your application to test. The designer generates C# or VB.NET code.
You can run the test to verify that your application behaves ;o)
It's nice that the output is .NET code so we can make adjustment if we need to. And even better, the recorded clicks doesn't only use stupid coordinates, but it identifies and finds buttons by name :o) So it could handle some changes without breaking the tests.
It works for both native and .NET applications.
It's a beta, but definitely worth looking at.
tisdag, januari 08, 2008
The old find in files error
Sometimes when I try FindInFiles in Visual Studio, I can get this error:
"No files were found to look in.Find was stopped in progress." in Visual Studio 2003, 2005 and now also in 2008
...the solution is to press Control + Scroll Lock.
I used to believe VisualAssist had something to do with it, but in VS 2008 I only use ReSharper, so I suppose Visual Studio itself is the problem?
"No files were found to look in.Find was stopped in progress." in Visual Studio 2003, 2005 and now also in 2008
...the solution is to press Control + Scroll Lock.
I used to believe VisualAssist had something to do with it, but in VS 2008 I only use ReSharper, so I suppose Visual Studio itself is the problem?
onsdag, november 07, 2007
Switch between VS 2005 and VS 2008
I have made two small scripts that make it possible to develop using Visual Studio 2008 Beta 2 in a group using Visual Studio 2005.
And I'm sure these scrips could be very usefull if you want to make some other batch search replace on some files.
Surely my scrips don't cover all solution files but I'm sure you could modify them to cover your solutions.
As a base I use RxFind a regular expression search and replace, command line tool I found at CodePlex. To make it more usefull for this case I made a couple of small modifications.
I added the possiblity to take the search and replace expressions from an input file. This makes it easier to handle line breaks and "-characters in the expressions. When you avoid a few of the escape characters, it is much easier to read.
Use it like this.
* If my script and your modifications work you should be able to work like this, using subversion/cvs terminology:
10 Checkout
15 run to2008.bat
20 Use the project in VS 2008
30 Make updates and so on
40 Run to2005.bat build and run the tests (I do this from the command line)
50 commit
60 Goto 15 ;o)
BTW The script are made for C# but could probably be modified for VB very easily, if there are some real VB-hacker out there...
If you have spaces in your solution file name or in the path where you put your tool, you would have to add a few "" in the batch file, but since i didn't need it. I leave it as an exercise for the reader.
One of the benefits I get out of this is that I can avoid conflicts between my favorite VS add in for C++(Visual Assist) which I use in VS 2005 and my favorite/current VS add in for C# (ReSharper) that I use in VS 2008.
Download scripts
Download updated source for RxFind
And I'm sure these scrips could be very usefull if you want to make some other batch search replace on some files.
Surely my scrips don't cover all solution files but I'm sure you could modify them to cover your solutions.
As a base I use RxFind a regular expression search and replace, command line tool I found at CodePlex. To make it more usefull for this case I made a couple of small modifications.
I added the possiblity to take the search and replace expressions from an input file. This makes it easier to handle line breaks and "-characters in the expressions. When you avoid a few of the escape characters, it is much easier to read.
Use it like this.
- Modify the file name and path in the first rows of the batch files.
- Open your Visual Studio 2005 solution that should be under version control., in Visual Studio 2008 (Beta 2)
- Let the conversion wizard do it's job.
- Let your version control system show which files where modified
- Try to run: "first time to2005.bat"
- In the ideal world the solution should now not contain any modifications and it should be possible to open it in VS 2005 like before.
- Run to2008.bat, it should now be possible to open the solution in VS 2008.
- Run to2005.bat, if there are some modifications you want to commit, do so.
* If my script and your modifications work you should be able to work like this, using subversion/cvs terminology:
10 Checkout
15 run to2008.bat
20 Use the project in VS 2008
30 Make updates and so on
40 Run to2005.bat build and run the tests (I do this from the command line)
50 commit
60 Goto 15 ;o)
BTW The script are made for C# but could probably be modified for VB very easily, if there are some real VB-hacker out there...
If you have spaces in your solution file name or in the path where you put your tool, you would have to add a few "" in the batch file, but since i didn't need it. I leave it as an exercise for the reader.
One of the benefits I get out of this is that I can avoid conflicts between my favorite VS add in for C++(Visual Assist) which I use in VS 2005 and my favorite/current VS add in for C# (ReSharper) that I use in VS 2008.
Download scripts
Download updated source for RxFind
lördag, oktober 06, 2007
Silverlight
I rebuilt my CCTray for XPS with the latest code from subversion so now it works connecting through .NET remoting (original CCTray). It should use much less of the continous integration server resources than if you and all of you co-developers connect through http. Uppdate: New .NET XPS LightFX SDK
And I would like to mention that me and Truls will hold a Silverlight seminar in Göteborg, Linköping and Stockholm November 8 and 9. We have already done it twice in Malmö. See Dotway.se for more info.
And BTW don't miss Øredev
And I would like to mention that me and Truls will hold a Silverlight seminar in Göteborg, Linköping and Stockholm November 8 and 9. We have already done it twice in Malmö. See Dotway.se for more info.
And BTW don't miss Øredev
onsdag, maj 23, 2007
Update for CCTray for XPS
I found a little bug in the last version of my CCTray version for XPS. The LEDs were shut off during build. So I updated the files. You can download them from the same place:New .NET XPS LightFX SDK
fredag, maj 18, 2007
New .NET XPS LightFX SDK
Dell has released a new version of their XPS LightFX SDK. This version includes different dll's for Windows XP / Vista and their 32- and 64-bit versions. I have improved my managed wrapper, to support not only the SetEffect function, but also SetLEDSettings. I didn't care about backward compatibility, but changed the way you use the wrapper to be more simple.
This XPS thing is a Dell laptop model, I use a XPS M1710.
If you run the LedsExample program please copy the correct version of GamingSDK.dll to the folder, I added the Vista 32-bit version.
Download my wrapper: .NET XPS LightFX SDK
I made a simple hard coded version of CCTray(binary), which shows the summary build status on the XPS LED's. My XPS for CCTray patch(source)
Howto use the managed wrapper:
using Björn.Carlsson.XPSLeds;
namespace Leds
{
public partial class Form1 : Form
{
XPSLeds m_XPSLeds;
LED_USER_SETTINGS m_Settings;
public Form1()
{
InitializeComponent();
m_XPSLeds = new XPSLeds();
FormClosing += Form1_FormClosing;
}
void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
m_XPSLeds.Close();
}
private void btnSet_Click(object sender, EventArgs e)
{
m_Settings.Intensity = LED_INTENSITY.MAX;
m_Settings.Zone1 = LED_COLOR.KUNZITE;
m_Settings.Zone2 = LED_COLOR.PERIDOT;
m_Settings.Zone3 = LED_COLOR.TANZANITE;
m_Settings.ColorTouchPad = LED_COLOR_TOUCHPAD.RUBY;
m_XPSLeds.SetLEDSettings(m_Settings, false);
}
}
This XPS thing is a Dell laptop model, I use a XPS M1710.
If you run the LedsExample program please copy the correct version of GamingSDK.dll to the folder, I added the Vista 32-bit version.
Download my wrapper: .NET XPS LightFX SDK
I made a simple hard coded version of CCTray(binary), which shows the summary build status on the XPS LED's. My XPS for CCTray patch(source)
Howto use the managed wrapper:
using Björn.Carlsson.XPSLeds;
namespace Leds
{
public partial class Form1 : Form
{
XPSLeds m_XPSLeds;
LED_USER_SETTINGS m_Settings;
public Form1()
{
InitializeComponent();
m_XPSLeds = new XPSLeds();
FormClosing += Form1_FormClosing;
}
void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
m_XPSLeds.Close();
}
private void btnSet_Click(object sender, EventArgs e)
{
m_Settings.Intensity = LED_INTENSITY.MAX;
m_Settings.Zone1 = LED_COLOR.KUNZITE;
m_Settings.Zone2 = LED_COLOR.PERIDOT;
m_Settings.Zone3 = LED_COLOR.TANZANITE;
m_Settings.ColorTouchPad = LED_COLOR_TOUCHPAD.RUBY;
m_XPSLeds.SetLEDSettings(m_Settings, false);
}
}
söndag, maj 06, 2007
Mono - Silverlight
I have signed up to two Google groups and one mail list today, with the intent to join the development of a Mono version of Silverlight with the cool name: Moonlight.
For a "Windows developer" like myself it would feel much more familiar to start develop a web application using what I call Silverlight .NET (Silverlight 1.1 Alpha with a CLR), than to use the more traditional web application frameworks. It's more or less just like building a WPF application. You even have isolated storage.
Why should I contribute to the Moonlight development:
For a "Windows developer" like myself it would feel much more familiar to start develop a web application using what I call Silverlight .NET (Silverlight 1.1 Alpha with a CLR), than to use the more traditional web application frameworks. It's more or less just like building a WPF application. You even have isolated storage.
Why should I contribute to the Moonlight development:
- I really like the WPF design,
- The world needs Silverlight for Linux.
- I am curios to, how the collaboration in such an ambitious open source project as Mono works.
- What better way to really learn the fundamentals of WPF?
Etiketter:
.NET,
.NET Silverlight,
English,
MIX07,
Mono,
Moonlight,
OpenSource
måndag, april 30, 2007
Mindblowing at MIX07 - Silverlight .NET
Today Microsoft releases Silverlight 1.1 Alpha with a full CLR inside the browser, cross platform. They also releases a open source version of Ruby called IronRuby, should be released at Codeplex. But I have not found it yet. Scott also promised Silverlight for Mobile devices. Downloads and stuff at: silverlight.net
fredag, april 06, 2007
Partition and Burn
I was about to shrink my old XP partition. And I have read about a free partitioning program GPartedLiveCD, but first I confused it with GNU Parted the difference is that GParted adds a GUI.
There are instructions to boot GParted from an USB stick, but that didn't work at the first try. And I didn't want to spend hours rebooting to get it working. So I decided to make a LiveCD instead. I have not installed any CD burning program in Vista, since the operating system should be able to handle it on it's own. But how to burn an iso image?
I found a really small and nice download (378 kB) - ISO Recorder.
That adds a context menu command for ISO files that starts a simple wizard too burn the image.
Since the partition I shrunk, was the startup one, I was not suprised when I had to put in the installation disk to make a repair to make Vista boot again. I did physically move the Vista partition. And after the quick repair of the boot info, it worked fine.
There are instructions to boot GParted from an USB stick, but that didn't work at the first try. And I didn't want to spend hours rebooting to get it working. So I decided to make a LiveCD instead. I have not installed any CD burning program in Vista, since the operating system should be able to handle it on it's own. But how to burn an iso image?
I found a really small and nice download (378 kB) - ISO Recorder.
That adds a context menu command for ISO files that starts a simple wizard too burn the image.
Since the partition I shrunk, was the startup one, I was not suprised when I had to put in the installation disk to make a repair to make Vista boot again. I did physically move the Vista partition. And after the quick repair of the boot info, it worked fine.
måndag, mars 26, 2007
Office eller OpenOffice
Att nu leva utan Office? Försöker ju använda det så lite som möjligt, så det borde väl inte vara så svårt? Installerade OpenOffice igår och avinstallerade Office 2007 idag. Redan innan jag avinstallerade Office, började jag känna av lite problem. Satt på ett möte och diskuterade ett Word-dokument, jag hade öppnat det i OpenOffice - det visades ganska ok. Men någon av sidorna blev något längre, så jag hade inte samma radbrytning som de andra. De hänvisade till en sida och jag satt och bläddrade lite desperat fram och tillbaka.
Men på eftermiddagen råkade någon på .NET Rocks! nämna viewers för Office-dokument, inget nytt, men jag hade inte tänkt på dem.
Så nu har jag installerat:
Min egen produktion i dokumentväg blir ju förstås ifrån OpenOffice och kanske i de flesta fallen som PDF:er för bästa möjliga flyttbarhet. PDF:er som givetvis bör läsas med Foxit-reader så mycket snabbare än orginalbesten. Men ett problem kvarstår, kunden jag jobbar åt använder Microsoft Exchange Server, och vad jag har lyckats hitta, så finns det bara ett alternativ till Outlook här, och det är Novell Evolution. Evolution är fämst avsett för Linux men finns även för Windows. Men än så länge bara för XP. Och pigg på att installera som jag är, så kör jag givetvis Vista sen länge.
Men på eftermiddagen råkade någon på .NET Rocks! nämna viewers för Office-dokument, inget nytt, men jag hade inte tänkt på dem.
Så nu har jag installerat:
- Powerpoint Viewer 2003 (främst för fredagskul)
- Word Viewer 2003
- Excel Viewer 2003
- FileFormatConverters för Office 2007
Min egen produktion i dokumentväg blir ju förstås ifrån OpenOffice och kanske i de flesta fallen som PDF:er för bästa möjliga flyttbarhet. PDF:er som givetvis bör läsas med Foxit-reader så mycket snabbare än orginalbesten. Men ett problem kvarstår, kunden jag jobbar åt använder Microsoft Exchange Server, och vad jag har lyckats hitta, så finns det bara ett alternativ till Outlook här, och det är Novell Evolution. Evolution är fämst avsett för Linux men finns även för Windows. Men än så länge bara för XP. Och pigg på att installera som jag är, så kör jag givetvis Vista sen länge.
Etiketter:
Office,
OpenOffice,
Svenska,
Tools
Prenumerera på:
Inlägg (Atom)
