Hot, hot, hot! Microsoft Pre-release Software Visual Studio Code Name "Orcas" - March 2007 Community Technology Preview (CTP) is available for download.
This is the first mostly feature complete Visual Studio v.next version (Visual Studio 2007 I bet).
6Gb download, so before click on the link take a look at what's new and decide if you need it. It's Pre-release and Community Technology Preview too. Anyway here are some highlights:
Google launches Premier Edition of the google.com/a - Google Apps. It's:
for mere $50/year per user. Sounds tempting for microISVs and small businesses.
They say it's cheap alternative to Microsoft Office. I'm not convinced. $50 x 4-5 years = Microsoft Office price, but I'm not sure one can compare Google Apps and Microsoft Office featurewise (yet).
What's more interesting is /. gang very cold reaction. Are sysadmins afraid Google is taking their job off?
Here is a list of 65 Math books available online for free, compiled by George Cain of Georgia Institute of Technology. Including really interesting ones such as:
[Via reddit.com: programming]
Microsoft decided to shut down GotDotNet site by July 2007. The official announcement goes like this:
Microsoft will be phasing out the GotDotNet site by July 2007.
Microsoft will phase out all GotDotNet functionality by July 2007. We will phase out features according to the schedule below. During the phase-out we will ensure that requests for features or pages that are no longer available will render enough information for you to understand what has changed. If you have any questions please don’t hesitate to contact the GotDotNet Support team.
We are phasing out GotDotNet for the following reasons:Microsoft wants to eliminate redundant functionality between GotDotNet and other community resources provided by Microsoft Traffic and usage of GotDotNet features has significantly decreased over the last six months Microsoft wants to reinvest the resources currently used for GotDotNet in new and better community features for our customers
If you still hosting anything at the GotDotNet - here is your moving deadlines:
Phase Out Schedule
The GotDotNet phase out will be carried out in phases according the following timetable:Target Date
Areas to be ClosedFebruary 20
Partners, Resource Center, Microsoft ToolsMarch 20
Private workspaces, Team pages, Message BoardsApril 24
GDN CodeGallery (projected date)May 22
GDN User Samples (projected date)June 19
GDN Workspaces (projected date)
Well, obviously that was inevitable. GotDotNet sucked big despite any efforts made. Looks like Microsoft was learning how to do open source project hosting on the web and GotDotNet was first that first pancake that is always spoiled. CodePlex definitely tastes better.
There are couple of projects still hosted at the GotDotNet that I care about:
Well, the GotDotNet is dead. Long live CodePlex!
We spent half of today in the "Leumi" park of Ramat-Gan. The weather was just wonderful lovely. Here are some photos to let you feel Israel winter:
According to the Official Google Reader Blog Google feed crawler, Feedfetcher, started to report subscriber counts. "The count includes subscribers from Google Reader and the Google Personalized Homepage, and in the future may include other Google products that support feeds."
What I found it interesting is that they do it via User Agent string. That's a very simple and nice solution and it's apparently not something new as I just looked at my blog log file and found subscribers info from a variety of feed crawlers:
GET /blog/index.xml - x.x.x.x HTTP/1.1 Bloglines/3.1+(http://www.bloglines.com;+154+subscribers) GET /blog/index.xml - x.x.x.x HTTP/1.1 NewsGatorOnline/2.0+(http://www.newsgator.com;+99+subscribers) GET /blog/index.xml - x.x.x.x HTTP/1.1 Feedfetcher-Google;+(+http://www.google.com/feedfetcher.html; +167+subscribers;+feed-id=xxxxxxx) GET /blog/index.xml - x.x.x.x HTTP/1.1 Newshutch/1.0+(http://newshutch.com;+12+subscribers)
And even such funny user agent as
GET /blog/index.xml - x.x.x.x HTTP/1.1 Mozilla/5.0+(X11;+U;+Linux+i686;+en-US;+rv:1.2.1; +Rojo+1.0;+http://www.rojo.com/corporate/help/agg/; +Aggregating+on+behalf+of+15+subscriber(s)+online+at+http://www.rojo.com/?feed-id=xxx)+Gecko/20021130
One might claim that's user agent header abuse, but I don't think so. Here is what RFC 2616 (HTTP) has to say:
14.43 User-Agent
The User-Agent request-header field contains information about the user agent originating the request. This is for statistical purposes, the tracing of protocol violations, and automated recognition of user agents for the sake of tailoring responses to avoid particular user agent limitations. User agents SHOULD include this field with requests. The field can contain multiple product tokens (section 3.8) and comments identifying the agent and any subproducts which form a significant part of the user agent. By convention, the product tokens are listed in order of their significance for identifying the application.
Statistical purposes that's it.
Oh, and while at it I should admit I hooked up to the Google Reader completely and haven't run RSS Bandit for months now. RSS Bandit has tons of cool features, but I always knew I need lightweight Web based feed reader. I tried Bloglines repeatedly, but only with Google Reader I found myself really comfortable from the first minute. That's great application.
I was looking for Ruby on Rails hosting and found this amazing offer from DreamHost. This is just unbelievable. Consider this:
These guys are like gmail in web hosting - they talk hundreds gigabytes of space and terabytes of bandwidth.
And for this "oh my freaking God" hosting plan they want $9.95/mo only (or even $7.95 if you subscribe for 2 years). But wait, google for "Dreamhost" and you can find promo codes like "mddr" or "FLY", which give you $97 discount for the first year.
Bottom line - you have to pay only $22.40 for the whole first year.
Cool. I want this. Fuck Windows hosting, go Linux and Ruby :)
Where is the catch, anybody?
Update. Ok, here comes the tricky part. "DreamHost Web Hosting does not accept payments from Israel". Really weird. What's wrong with payments from Israel? Oh well, happily I have US card too.
Kzu, being also one of the Mvp.Xml project users has this wild feature request. He wants to reverse XInclude resolving back. The scenario is simple: you load XML document A.xml containing XML Inclusions for B.xml and C.xml, XInclude processor resolves XML Inclusions, you get a combined document, edit it and then you save it back to A.xml, B.xml and C.xml. So if you have modified an element coming from B.xml then B.xml gets updated on save.
Well, that sounds like a reasonable feature, but how it can be done? To be able to reverse XML Inclusions one has to know exactly where each node came from, i.e. to preserve original context in a post-XInclude document.
Inclusion preserving context information is also known as a transclusion. Visual transclusion is traditionally associated with XLink instead and technically speaking XInclude has nothing to do with it. From XInclude 1.0 spec:
1.1 Relationship to XLink
XInclude differs from the linking features described in the [XML Linking Language], specifically links with the attribute value
show="embed"
. Such links provide a media-type independent syntax for indicating that a resource is to be embedded graphically within the display of the document. XLink does not specify a specific processing model, but simply facilitates the detection of links and recognition of associated metadata by a higher level application.XInclude, on the other hand, specifies a media-type specific (XML into XML) transformation. It defines a specific processing model for merging information sets. XInclude processing occurs at a low level, often by a generic XInclude processor which makes the resulting information set available to higher level applications.
Simple information item inclusion as described in this specification differs from transclusion, which preserves contextual information such as style.
So in an ideal world I'd just suggest Kzu to use XLink instead of XInclude for transclusions. The problem though is that XLink is basically dead for years now and unfortunately there is none XLink implementations for .NET. That's why XInclude.
As I read XInclude spec more I realized above citation about XInclude != transclusion isn't 100% true and XInlcude does preserve some pieces of context:
The inclusion history of each top-level included item is recorded in the extension property include history. The include history property is a list of element information items, representing the
xi:include
elements for recursive levels of inclusion. If an include history property already appears on a top-level included item, thexi:include
element information item is prepended to the list. If no include history property exists, then this property is added with the single value of thexi:include
element information item.
So basically for each node in a post-XInclude document it's possible to figure out it's original context:
Of course that only sounds simple. For starters Mvp.Xml XInclude implementation doesn't support "include history". XIncludingReader keeps internal stack of xi:include elements though and can expose it in some way. Then "include history" should be preserved in XML Infoset implementation, e.g. XML DOM - XmlDocument. That means XIncludeXmlDocument class extending XmlDocument. And then "include history" should be used when saving XmlDocument. Still sounds feasible.
Problems. What about partial inclusions with XPointer? if a node was included from inside a document its full XPath must be preserved in "include history" so it can be saved back at exactly the same location. Still feasible.
Editing combined document opens Pandora's box. New nodes - where they should be saved. Deleting nodes - how to detect? Moving nodes around. Multiple inclusions of the same node - how to resolve conflicts?
Well, still it sounds mostly feasible to implement transclusion on top of XInclude.
Any comments? Does anybody think it might be useful?
Kurt Cagle launched XForms.org - The XForms Community Forum as well as XForms.org News Portal and XForms_Dev mailing list.
Welcome to the new XForms.org Community Web Portal, a central clearinghouse for articles and resources on XForms based technologies. This site is intended as one gateway into the XForms community (the other primary one being http://www.xforms.org itself), and provides the static side of the XForms.org community.
If you were thinking about learning Ruby - this is what you need to get started smoothly. Just released One-Click Ruby Installer 1.8.5-22 Final for Windows is "A self-contained installer that includes the Ruby language, dozens of popular extensions, a syntax-highlighting editor and the book "Programming Ruby: The Pragmatic Programmer's Guide".
You would also need FreeRIDE - free full-blown Ruby IDE, written of course in Ruby.
So you get full Ruby runtime, decent IDE and a book - what else do you need? Go for it.
openxml.biz announced the availability of the OpenXML Writer - open source text editor for creating OpenXML WordprocessingML files (.docx). Supported features include "text formatting options like bold, italic, underline, font color, font name , font size, paragraph justification and text indentation. Basic editing functions like cutting, copying, pasting and spell check are also provided".
OpenXMLWriter is .NET 3.0 application, so you might need to install "Microsoft(TM) .NET Framework 3.0 Redistributable Package (For Win XP/2K users)" in order to run it.
It's not immediatelyt clear for me if this application is just a sample from some microsoftie or free component from one of C# hackers. The site is basically empty and I have no idea who is behind this.
Anyway the idea sounds interesting:
OpenXML Writer is a .Net 3 project that shows how you can create .docx (OpenXML WordProcessingML) documents with the RichTextBox. The RichTextBox exposes a wide range of features that are easily tapped to create a fairly powerful editor. For example, you can turn on the spell check feature in the RichTextBox by simply setting a property.
OpenXML Writer works by transversing the contents of the RichTextBox and converting each of the elements into OpenXML format. It also package the relevant resources into a .docx file based on the OpenPackaging Convention.
OpenXML Writer has the potential to turn into a full fledge editor in the near future by taking advantage of the many features that the RichTextBox itself supports. Already, many features are being planned, such as the support for lists, images and tables in OpenXML Writer.
The source code for OpenXML Writer is available for download. It illustrates the techniques of
- Using the RichTextBox as the editor to format text data
- Traversing the contents of the RichTextBox and converting them into OpenXML format
- Packaging the contents using the OpenPackaging Convention into a .docx file
Web-based OpenXML editor would be even cooler.
If you like the "Daily Grind" by Mike Gunderloy you might like its Microsoft-free version "Quick Links" at the "A fresh Cup" site ("Notes from a recovering Microsoft addict") too. Worth subscribing anyway.
If you were using my little AdSense Watch Toolbar 1.0b version and it expired, I'm sorry about that, go and download new version 1.0, which has no time limitation.
After 6 months in beta I can say AdSense Watch proved to be pretty stable, which is kinda unusual for screenscraping applications. Google used to change AdSense site once in a months or two, breaking various AdSense tools, but this toolbar kept working just fine. I never had to fix it because of Google site changes. That's because AdSense Watch is only using screenscraping technique for logging in, the AdSense data itself is fetched as CSV in English, which happens to be stable enough.
So if you are AdSense addict, that's for you. And it's free. Feature requests are welcome.
Here is a problem: XSLT 1.0 sucks on generating XML character or entity references. I mean getting &foo; out of XSLT 1.0 is hard. The only ugly solution is disable-output-escaping hack, but it's a) optional, b)doesn't work in all scenarios (only when XSLT engine controls output serialization into bytes and c) works only on text nodes. Latter is real showstopper - you can't generate character or entity reference in attribute using XSLT 1.0. But now that we have XSLT 2.0, which is oh so better. What's XSLT 2.0 solution for the problem?
In XSLT 2.0 disable-output-escaping is deprecated. New facility for the problem is called Character Maps. Character maps are simpler, better and don't mess with data model. Formal definition:
A character map allows a specific character appearing in a text or attribute node in the final result tree to be substituted by a specified string of characters during serialization. The effect of character maps is defined in [XSLT and XQuery Serialization].
This is basically declarative replace for XSLT output.
Let's say you want to generate this XUL fragment (real world question):
<menuitem label="&context.add.building;"/>
XSLT 2.0 solution would be to define a character map, which maps ampersand character to ugh... ampersand character :) For this to make sense you should realize that mapping a character effectively disables its XML or HTML escaping. It's like you say "I want this character to be outputted as this string and don't mess with it you, the engine". That's powerful enough even to disable escaping of reserved characters such as & and <.
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:output use-character-maps="xul" /> <xsl:character-map name="xul"> <xsl:output-character character="&" string='&'/> </xsl:character-map> <xsl:template match="contextMenu"> <menuitem label="&context.add.{name()}"/> </xsl:template> </xsl:stylesheet>
Awesome. I can't wait, I want this in XSLT 1.0 too. I think I'm going to implement character maps for nxslt.exe tool. The only problem is how to provide mapping info. I'll post about it next time.
[Tested with Saxon 8.8B for .NET].
Google somehow seems to be inaccessible (down?) from my place for at least 15 minutes now and I already feel uncomfortable if not desperate. I want my mail, news and search back! Seriously, WTF? How come can I be so dependent on google? Ok, great, who else does search on the Web?
Everybody who speaks English can communicate with anybody else who also happens to speak English. You can talk, you can mail, you can read books written in English by others.
Sure you can invent your own language, no big deal. You can even make somebody learn it and then talk to her.
But most prefer easy way and speak XML, I mean English.
[Well, technically speaking majority on this planet prefer Chinese anyway].
I'm blogging since March 2003 and as time goes I noticed my blog archive list became way too long and ugly. Finally I figured out how to generate it in a nice expandable list form you can see on the right. Here is a my small how to for MovableType powered blog. It's a little bit hacky, but works fine.
1. Install Archive Date Header Plugin from Adam Kalsey. This allows to generate year headers.
2. Insert this piece of Javascript somewhere - if you have common js file that would be the best, but at worse just paste it before </head> in your template. It's a function to handle expand/collapse year clicks.
<script type="text/javascript"> function ec(e) { var targ; if (e.target) targ = e.target; else if (e.srcElement) targ = e.srcElement; if (targ) { rows = targ.parentNode.getElementsByTagName("DIV"); collapsed= targ.className == "year-hdr collapsed"; targ.className = collapsed? "year-hdr expanded" : "year-hdr collapsed"; for(i=0; i < rows.length; i++) rows[i].style.display = collapsed? "block" : "none"; } } </script>
3. Use the following snippet in your template to generate expandable archive list. It generates nested list of archives with year headers.
<div class="side"> <div> <MTArchiveList archive_type="Monthly"> <MTArchiveDateHeader> </div><div> <p class="year-hdr collapsed" onclick="ec(event)" id="archive<MTArchiveDate format="%Y">"> <MTArchiveDate format="%Y"> <p> </MTArchiveDateHeader> <div class="month-row"> <img src="images/folder.gif" align="middle"/> <a href="<$MTArchiveLink$>"><MTArchiveDate format="%B"></a> </div> </MTArchiveList> </div> </div>
4. If you prefer the current year to be expanded by default, insert this piece of javascript after above template:
<script type="text/javascript"> year = document.getElementById("archive" + (new Date()).getFullYear()); if (year) { year.className = "year-hdr expanded"; rows = year.parentNode.getElementsByTagName("DIV"); for(i=0; i < rows.length; i++) rows[i].style.display = "block"; } </script>
5. Define CSS styles. Here are my definitions:
.year-hdr { cursor: pointer; cursor:hand; font-size: 120%; font-weight: bold; background-repeat: no-repeat; background-position: top left; padding:2px; } .collapsed { background-image: url(images/plus.gif); } .expanded { background-image: url(images/solid.gif); } .month-row { display: none; padding-left: 2em; }
Done.
I was writing about loading XSLT stylesheets embedded into assemblies (dll or exe) recently and Richard Quinn asked this very legitimate question:
But why oh why would anyone embed their XSLT in the assembly? The point is to separate design from logic. Even if the xslt does a non-presentational transform it _will_ be a pain to have to redeploy the assembly instead of just the stylesheet. Or not?
Well, having XSLT stylesheets externally no doubt has many benefits. But embedding XSLT stylesheets into deploy units (be it dll, exe or jar) is also done not without a reason. After all two the most often used in the wild XSLT stylesheets are embedded. I'm talking about res://msxml.dll/defaultss.xsl (technically not XSLT stylesheet) and chrome://global/content/xml/XMLPrettyPrint.xsl - respectively Internet Explorer and Firefox XML pretty printers.
Embedding stylesheet doesn't necessarily mean coupling presentation and logic layers, in fact it has nothing to do with any application design issues. It's just deployment strategy and in that sense XSLT stylesheets aren't different from images or scripts.
Sure, when your XSLT file is just laying around you can tweak it without reinstalling application (sometimes even without restarting it). Sometimes that's useful and sometimes you don't want users to play with your stylesheet, because allowing that means:
Again, sometimes deployment is easier if you don't have to bother about all that little files to be placed into the right place.
Some people embed, obfuscate and encrypt XSLT stylesheets trying to prevent reverse engineering. Well, apparently they do it for a reason too.
Performance is another interesting point. I think loading string resources should be a little bit faster than loading from the disk. Didn't test it though.
But the whole new era of XSLT embedding is going to start when XSLT finally becomes widely compilable into executable code. Next Visual Studio (codename Orcas, expected later this year) will include XSLTC.EXE - XSLT to MSIL compiler. That would add another benefit - save on XSLT compilation, which is time and resource hog.
If you do embed your XSLT stylesheets, I wonder what are your reasons?
Here is a nice trick how to build category cloud for your MovableType blog. No plugins required, just past this snippet into your template.
<div class="side" id="CategoryCloud" style="line-height:1.6em;"> <MTCategories show_empty="0"> <a href="<$MTCategoryArchiveLink$>" class="<$MTCategoryCount$>"><$MTCategoryLabel$></a> </MTCategories> <script type="text/javascript"> e = document.getElementById("CategoryCloud").getElementsByTagName("A"); for(i=0; i < e.length; i++) { if(e[i].className != "") { t = e[i].className; if(t > 256) e[i].style.fontSize = "230%"; else if(t > 126) e[i].style.fontSize = "200%"; else if(t > 68) e[i].style.fontSize = "180%"; else if(t > 16) e[i].style.fontSize = "160%"; else if(t > 8) e[i].style.fontSize = "130%"; else if(t >= 2) e[i].style.fontSize = "110%"; else if(t = 1) { e[i].style.fontSize = "100%"; } } } </div>
[Found here]
The idea is simple - generate list of categories with count of posts embedded into class attribute and then in browser scan categories and set font size according to any kind of cloud algorithm.