Tigraine

Daniel Hoelbling-Inzko talks about programming

First steps with Ubiquity

Ok, I was bored and so I looked a bit into the Ubiquity author tutorials. The result is a pretty simple command that searches WoWhead for the given noun.

I don't think it's really ready yet. Live previews would be cool.
Still, you can grab it here if you have Ubiquity.

Download: WoWhead Search command
(please bear with the page, it's just a placeholder)

Visual Studio and .NET 3.5 SP1 released

Ok, this is old news to some. But mainly because the beta has been around for quite some time and Scott Guthrie didn't make an official announcement on this.
So, although it slipped my attention (some Download Notification letter brought it to my attention), you should definitely check out the SP1.

It's more than just the usual bugfix SP1 that came out of Redmond this time. The feature list is pretty impressive, and they incorporated RTM versions of Astoria and Entity Framework!

For the feature list of the Visual Studio SP1 (source):

      • Improved WPF designers
      • SQL Server 2008 support
      • ADO.NET Entity Designer
      • Visual Basic and Visual C++ components and tools (including an MFC-based Office 2007 style ‘Ribbon’)
      • Visual Studio Team System Team Foundation Server (TFS) addresses customer feedback on version control usability and performance, email integration with work item tracking and full support for hosting on SQL Server 2008
      • Richer JavaScript support, enhanced AJAX and data tools, and Web site deployment improvements

And the features of .NET Framework 3.5 SP1:

  • Performance increases between 20-45% for WPF-based applications – without having to change any code
  • WCF improvements that give developers more control over the way they access data and services
  • Streamlined installation experience for client applications
  • Improvements in the area of data platform, such as the ADO.NET Entity Framework, ADO.NET Data Services and support for SQL Server 2008’s new features

So, I've been using the beta for some time now, and can't live without it any more. Go and get SP1, it really delivers on many things (like the C# background compiler in Visual Studio):

Visual Studio 2008 Service Pack 1 and .NET Framework 3.5 SP1 Download

Btw: you don't need to download .NET 3.5 SP1 if you're already installing VS2008 SP1. The VS2008 SP1 setup installed .NET 3.5 with it.

Filed under net, internet

Inline Styles aren't all that evil

Everyone who did some web stuff and had to do some HTML had fun with the style="" tag.
It's the simplest way to change the appearance of something and also very intuitive (right at the point where you want the change to happen). So, everyone of us is sometimes hacking some style="" stuff from time to time ;).

You usually continue to do so until the whole thing backlashes and you have absolutely unreadable code because every <div> tag is 3 lines long and you can't distinguish between style and markup.
So, that's the point where we all learned: Inline Styles are evil!

Now, while reading some RSS feeds today I discovered that inline styles aren't completely useless nowadays. Especially in times of RSS content syndication, sometimes it's very important to attach the style to the markup, so your markup remains readable at the external source.
Most RSS readers don't strip the inline CSS markup, and you may very well use this to format your feed accordingly. E.g. images that should be floated don't look good in a feed reader if they break the article they should illustrate, so attaching the "float: left; margin-right: 10px;" isn't too obscuring, but helps your readers a lot.

So, although inline styles really contradicts the DRY principle, sometimes it's cool to use them for syndication reasons.

Filed under programmierung, internet

Precompiled deployment in ASP.NET

The usual deployment of as ASP.NET web app is just a basic FTP upload of everything you have in your solution. The whole aspx and aspx.cs stuff that you can then edit and change on the server.

All the source (except for class libraries) is fully available and visible on the server, so if your customer is like mine you're destined to see some self-patched applications appear over time.

This doesn't only hurt revenue, but it also brings some serious version issues when you get tasked with changes afterwards.

So, sometimes it's important to lock your customer out of their app (yeah, that sounds evil doesn't it?). And that is where ASP.NET has a neat feature in place called "Precompiled deployment".

image You just go into Visual Studio and select your Project, click Publish Web Site and follow the wizard.
You can select to directly deploy the page to a server via FTP etc, or to just put it onto your file system.

If you open the folder afterwards you will see that some files have gone missing :).

 

 

image

All .cs (or .vb) files are gone and a new (randomly named) library has appeared in your bin\ folder that contains a compiled version of your .cs files.

Also, you need to note that precompiling your application is something that will not significantly speed up your website performance. If you just deploy the .cs files to the server they will still get compiled to IL code and run just as fast as the precompiled version you deployed binary.
What get's speeded up is the startup process of your application, because compilation takes place when the first request gets served.

I guess it's safe to say that if you see a somewhat significant improvement in performance through precompiling, your app is somewhere broken or should be broken into smaller chunks. Compiling code shouldn't take long on today's hardware, and if you end up with folders with thousands of thousands of files, you're in trouble anyway. (The server compiles your .cs files per folder when the first request gets served)

Finally, although there is a compiled library out there doesn't mean your customer can't change it at all. He could still go out and decompile your dll, change his stuff and recompile it. But if he's that smart, he probably deserves to change it anyway.
(To really protect your IP you should look for Obfuscators)

Filed under net, programmierung

Confusing UI

After getting myself a new Dell XPS M1330 laptop, I thought it would be cool to have a Bluetooth mouse that could also serve as a presenter.

image

So I got the Microsoft Presenter Mouse 8000. After opening the control panel I was presented with the above display.

It's in German so I'll translate:

Current power source: Battery
Remaining Energy for: 1%.

Ok I just unboxed the whole thing, why I ended up with a 1% charge - I don't know. 

But, what really bugs me is: This UI is pretty meaningless to me. I mean, if my battery is low, why isn't anything red? Why in the hell doesn't the driver alert me that my battery is low? And, the top line has to be the most useless thing I've ever seen anywhere ever. This is a Bluetooth mouse that has only one way of getting power: battery. And they really tell me that it's running off battery?
And the image of the battery doesn't help either. Does gray mean full, or maybe empty? Is the color for full green? I would expect it, but it's not obvious.

Finally, the accuracy and reception really sucks right now. I hope this is for the low battery, but still I don't understand why the driver isn't alerting me that I need to replace my battery.

Filed under personal

My Photography business

Projects

dynamic css for .NET

Archives

more