I've posted an article to CodeProject about building my Google Ajax Search Enabled Homepage.
So, go there, read it, comment it, vote for it, tell your friends about it, print it and glue it to your forehead, whatever you think is appropriate.
Unless you didn't like it. In that case, you shouldn't do anything. why bother ? :)
I have loaded a new homepage, and used a little of the Google AJAX Search API to make it interesting. Actually, I'm using it now as my browser's default homepage, instead of google.com
Not only that, but I have documented the process of making it, and have sent it to codeproject, to be published, as my first contribution there, in hope for more to come.
So, please leave your impressions, eiether here or in the codeproject article (I'll post the addresss once it will be up).
So, I've been tagged.
Actually, it was more than a week ago. Since I am not much of a writer, it takes me a lot of effort to write non-technical stuff. I've worked on a "5 things" post on notepad, and mistakenly closed it without saving. It took me while to recover (myself, not the file) and gather the courage to redo this post.
So, with no further ado, here are 5 thing you didn't know about me, nor will you probably remember tomorrow.
1. I grew up in a religious family. I even learn a few months in a Yeshiva. I used to like (and was quite good) the studies of "Talmud" and "Halacha" (the basis for Jewish laws) since those involve strict logic methods, and much resembles the way you prove mathematical theorems.
2. Before I was programming professionally, I was in the IDF. I attended the IAF flight course for a while, then went through combat training in the infantry forces until my knees almost fell apart, and I found myself doing paperwork. Later on I moved to the Logistics force, and became expert in Warehouse Management, and small scale HR management.
3. Before I was in the army, I was a musician. I own a great acoustic guitar (by Takamine), two sound modules (Korg and Roland), an electric guitar (Washburn), two Multi-Effect modules for guitar (Boss and Zoom), a synth (Ensoniq), two dedicated sound-cards (hoontech/Yamaha and an old SBLive Premium), Shure mics. I ran a full featured MIDI recording studio, and produced playbacks for people who wanted demos for the radio. I have also did musical direction for song contests, of the religious youth movement "Bnei Akiva". But I cannot read notes.
4. When I grew up I was afraid of animals. Of any kind. Even kittens. Now I live with three ex-stray cats and they sleep with me. Actually, they fight and I try to sleep ... I'll flickr some photos of them sometime. One of them play "fetch" like a dog. When I throw one of his toys, he runs to it, take it in his mouth, and bring it to me to throw again. The second is a beautiful cat who acts like a lady, and the third is blind from birth, but rules the house easily.
5. I have been coding since I was 5. really. My father have bought me a ZX-80 and a bunch of BASIC books, and I went CAREZY about it. I remember that when I was about 7 I coded a simple Space Invaders mock and invited two of my classmates to play with me. however, then I came to learn the importance of QA, since the game was very buggy and the friends went to play hide-and-seek while I tried to debug my spaghetti ...
So those were 60 minutes, about Ken Egozi. The movie feature is due this summer (kenegozimovie.com ...)
Eli Golovinsky, Dror Engel, Yosi Taguri, Hamilton Verissimo de Oliveira, Omer van Kloeten, Roy Daya
Hey people - you have been tagged !
Here is the latest addition to AspView.
example:
<%@ Page Language="C#" Inherits="Castle.MonoRail.Views.AspView.ViewAtDesignTime" %> <% %> Outside the filter <filter:LowerCase>
Inside the LowerCaseViewFilter - this text should be viewed in lower case
</filter:LowerCase>
Outside the filter AGain
<filter:UpperCase>
Inside the UpperCaseViewFilter - this text should be viewed in upper case
</filter:UpperCase> Finally - outside the filter
As you can see, the syntax is simple. Given a viewFilter, named "MyViewFilter", you use the xml tag <filter:my> or <filter:myViewFilter>. The viewfilter itself has to be suffixed with "ViewFilter" (Just like Controllers are suffixed with "Controller", etc.), and it has to implement IViewFilter which is defined with:
using System;
using System.Collections.Generic;
using System.Text;
namespace Castle.MonoRail.Views.AspView
{
public interface IViewFilter
{
string ApplyOn(string input);
}
}
The power of the ViewFilters is than they can apply to a whole SubView, while the subview is rendered as a black box, the filter does the work AFTER the subview was rendered.
Grab the sources, play, and have fun.
After hammet's approval, I hav finally added AspView source to the Castle Project's Contrib section of the subversion repository.
Thank hammet and the rest of the Castle crew for voting for that.
So from now on, you'd be able to grab the sources from http://svn.castleproject.org:8080/svn/castlecontrib/viewengines/aspview/
Two last comments:
1. The latest edition works with Castle's trunk from build 229.
2. The latest additions are supporting "~" as a macro for siteRoot, and "~~" as a fullSiteRoot (~ would expand to the virtual directory, and ~~ would expand to full url- http://...).
There are two facts here:
1. I love NHibernate.
2. I hate NHibernate's exception messages.
And here's my story.
On a project I'm working on, I need to show a projection of "top 10" from the database. let's show this on the good old Blog scenario:
So I want to show the posts with the longest comments measured by the comment's length. Stupid, huh? but it's a demo only (I cannot expose the actual ERD). Let's say I want the top 5.
I am using Castle ActiveRecord. There is a Post and a Comment classes. However, I do not wish to load Posts objects, since It will load the Comments, too, and maybe other stuff that the Post class is related to. So I have defined a PostProjection class:
1: public class PostProjection
2: {3: public string Title;
4: public int Length;
5: public PostProjection(string title, int length)
6: { 7: Title = title; 8: Length = length; 9: } 10: }I have also added an [Import] attribute on the Post. The actual querying is done using the next hql :
1: public static PostProjection[] GetTopPosts(int postsToGet)
2: { 3: SimpleQuery<PostProjection> q =4: new SimpleQuery<PostProjection>(typeof(Post), @"
5: select new PostProjection(p.Title, sum(c.LineCount)) 6: from 7: Post p inner join 8: p.Comments c 9: order by sum(o.LineCount) desc 10: group by p.Title"); 11: q.SetQueryRange(postsToGet);12: return q.Execute();
13: }It worked great.
Yesterday I've upgraded my Castle dll's to the ones from build 229. It includes NHibernate 1.2.0.2002
Now the "select new" started to fail, and NHibernate started to claim than "Could not find constructor for: PostProjection".
I've been scratching my head, trying various approaches, and even was keen to skip the "new" and use an object[ ] and populate the Projection Array by hand, but then I tried changing the "length" parameter of the constructor from "int" to "long". Magically it solved the problem.
Now, if only NHibernate would have said :
Could not find constructor for: PostProjection.
Looking for: PostProjection(string, long)
I would've known what the problem was, and what should I change.
So what have we learned today?
1. NHibernate expects sum() to return "long" rather than "int"
2. NHibernate's error messages suck.
I've svn-ed the NHibernate trunk, added some code so this message would be more developer friendly, and I'm going to send the patch to NHibernate's JIRA.