Handy little tool

Posted on November 23, 2007

If you would like to monitor a project try Commit Monitor (for svn).

Filed Under Uncategorized | Leave a Comment

Posted on November 23, 2007

I would rather write programs to help me write programs than write programs.

Dick Sites
Digital Equipment Corporation

Filed Under Uncategorized | Leave a Comment

Boo Flex DSL

Posted on November 20, 2007

XML is supposed to be human-readable not writable so here is a prototype of Boo DSL for Adobe Flex 3 aka BooFlex ;-)

BooFlex Code (version 1.0 generated from ASDoc)

Example of BooFlex program (looks very LISPy)

nnamespace NAXSoft.MX.Demo
import NAXSoft.BooFlex.MxDsl
import NAXSoft.BooFlex.MxDslExtra
import NAXSoft.BooFlex.MxLiterals

Application {"xmlns:mx": "http://www.adobe.com/2006/mxml" }:
    Script { source: "file1.as" }
    DataGrid { id: "myGrid", dataProvider: "{initDG}", variableRowHeight: "true" }:
        Columns:
             DataGridColumn { dataField: "Artist"}
             DataGridColumn { dataField: "Album" }
             DataGridColumn { dataField: "Cover" }:
                 ItemRenderer:
                     Component {id: "CoverRenderer", className: "CoverRenderer"}:
                         VBox:
                             Script   { source: "file2.ac" }    
                             Text     { id: "albumName", text: "{data.Album}" }
                             Image    { id: "albumImage", source: "data.Cover" }
                             TextArea { text: "{’Renderer localVar= ‘ + localVar}" }
                             TextArea { text: "{outerDocument.localVar}" }
             DataGridColumn { dataField: "Price" }

And the result:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" >
<mx:Script source="file1.as" />
<mx:DataGrid variableRowHeight="true" dataProvider="{initDG}" id="myGrid" >
<mx:columns >
<mx:DataGridColumn dataField="Artist" />
<mx:DataGridColumn dataField="Album" />
<mx:DataGridColumn dataField="Cover" >
<mx:ItemRenderer >
<mx:Component className="CoverRenderer" id="CoverRenderer" >
<mx:VBox >
<mx:Script source="file2.ac" />
<mx:Text id="albumName" text="{data.Album}" />
<mx:Image source="data.Cover" id="albumImage" />
<mx:TextArea text="{’Renderer localVar= ‘ + localVar}" />
<mx:TextArea text="{outerDocument.localVar}" />
</mx:VBox>
</mx:Component>
</mx:ItemRenderer>
</mx:DataGridColumn>
<mx:DataGridColumn dataField="Price" />
</mx:columns>
</mx:DataGrid>
</mx:Application>

What do you think?

Filed Under Uncategorized | 9 Comments

Reflection on C# 3.5

Posted on November 20, 2007

C# 3.5

Expression<Func<int, bool>> filter = n => (n * 3) < 5; 

BinaryExpression lt = (BinaryExpression) filter.Body;
BinaryExpression mult = (BinaryExpression) lt.Left;           
ParameterExpression en = (ParameterExpression) mult.Left;           
ConstantExpression three = (ConstantExpression) mult.Right;
ConstantExpression five = (ConstantExpression) lt.Right;

"(LessThan (Multiply n 3) 5)" ==
      string.Format("({0} ({1} {2} {3}) {4})",
                     lt.NodeType, mult.NodeType,

                     en.Name, three.Value, five.Value);

Maybe in C# 4.0 instead of pretending to be functional we will try to be and writing code like this: 

(define (factorial n)
    (let ((product 1)
          (counter 1))
    (define iter)
       (if (> counter n)
           product
          (begin (set! product (* counter product))
                 (set! counter (+ counter 1))
          (iter))))
     (iter)))

And in C# 5.0 we may finally figure how to use pieces of alien technology:

(define (factorial n)
   (define (iter product counter)
        (if (> counter n)
            product
           (iter (* counter product)
                 (+ counter 1))))
   (iter 1 1))

And after 5.0, maybe we will finally code like it was ment to be.

The point is, C# 3.5 is an interesting language and dig it!

Filed Under Uncategorized | 1 Comment

Posted on November 16, 2007

Flex 3 Hello World Application

 

I downloaded Adobe Flex 3 Beta 2 SDK. And it is amazing! Compared to it AJAX apps will look like a simple hack! The UI syntax is easy — a la html with more widgets. Because syntax is easy to learn you don’t need to buy their IDE to learn and use it (although you you are paid to work on Flex project it would certanly pay for itself).

The best part is ActionScript. One word - sane JavaScript!
Oh and the second best part, it has no dependencies on server-side components. So you can use it with any webserver or web framework. It’s just the view!

Now the really best part is Flex 3 will be open-sourced. Now the only piece missing is open-sourced Flash Player.

I really need to learn more about it. But I think I might use it for every project that requires rich web ui.

 

 

 

Filed Under Uncategorized | Leave a Comment

On testing

Posted on November 15, 2007

When object queries other object, that is part of implementation.
When object delegates somethig to other object, that is part of the behaviour.

Interaction based test should test behaviour.

Filed Under Uncategorized | Leave a Comment

Posted on November 15, 2007

Somebody smart probably said it, and I repeat it again, interesting stuff is under the curve.

Filed Under Uncategorized | Leave a Comment

© Copyright 0xDEADBEEFCAFE • Powered by Wordpress • Design by Sebastin.

free web hit counter