Thursday, November 23, 2006

LINQ to Desktop Search

Yes! Yet another interview with Anders Hejlsberg on Channel9.

In this one he talks to Chris McConnel who is the architect for the Windows Desktop Search product. It's really cool to hear his takes on the world, and how LINQ fits into it. And as a new thing in Channel9 the person asking questions is actually not the interviewer but the interviewee (ie. Chris McConnell asks Anders questions). It seems like he's asking all the right things, and we get Anders' views on a lot of different problems in the programming world, for example:
- functional programming
- intentional programming
- LINQ to desktop search
- WinFS


Nice stuf...


Well, here's the link:
http://channel9.msdn.com/ShowPost.aspx?PostID=260202#260202

Tuesday, November 21, 2006

What about the link?!??

.. sorry. Forgot to post a link to some fun this time. I'm thinking it may become a tradition?

Link: http://bree25.buzznet.com/video/popup/39016/%20

It's a band called "Ok Go" performing. They are pretty cool. Their web site is here: http://okgo.net/

CBS - G1

Hey everyone

So, I been back at CBS for two days now, and have already heard about 100 people asking me about my G1. Not that I'm getting tired of it (I love being the center of attention) but sometimes I'm in the middle of something else when they attack me, wanting my autograph and personal tuition...

I have therefore decided to make the project availabe for download. You can find it right here:
Code: http://aoa.dk/demo/g1/code.zip
Text: http://aoa.dk/demo/g1/text.pdf


Please note that while I may have done a lot of code over the time, this project was my chance to get down and dirty with the special features of Java, and I haven't nailed every problem the most beautiful way...

I hope I can inspire someone to do better next time, or not loose it when things seem hard.

There where a few issues I had difficulties with as well.. For example the graph, which isn't actually correct.. So I was told. Another example is my use of LayoutManager's which may seem strange, because I was using the attempt-and-fail method while developing.

Thursday, November 16, 2006

C#'ing into the future

It's been a week since I was at the Microsoft event, where Anders Hejlsberg addressed the new features in C# 3.0, and better tell you about what he told me about..

I had seen a webast where he talks about C# 3.0 before, and he started the exact same way, by stating that:

Data != Objects

The rest was kinda like that webast, but he seemed to go more into details, which was brilliant. As mentioned I had seen a lot of his stuff before, but there where a few points that, if not supprised me, then made me think. Fx. in my head C# 3.0 == LINQ and nothing more. Anders made it quite clear that that wasn't the case. C# 3.0 is a whole bunch of small things that combined make the developer able to write C# in a query-like syntax. The small features are mainly:
- Extension methods
- Lambda expressions
- Expression Trees

As Anders said, the

var q = from c in Customers
where c.City == "London"
select c.Name

is only "syntactic sugar" translated by the compiler to:

var q = Customers.Where( c => c.City == "London" ).Select( c => c.Name );

ie. method calls! All very simple when it's explained to you like that..


The most important thing, however, was that before we left the lecture Marcus, the technical manager in Composite, got Anders' autograf in the C# 2.0 book :-)




In other news: My G1 school project is finished!! Now I only need the printing part, which I will do tomorrow, so I'm what you could call a free man tonight!! Hmm.. Where did I put that shortcut for Visual Studio ;-)


'Till next time...




Oh yeah, and check this out: http://www.zefrank.com/theshow/gallery/d/8544-1/yeeha.mp3

Wednesday, November 15, 2006

Get your Java!

I'm in the final phase of the G1-project for CBS now, and mostly writing the report... I read in the project description that we shall attach all classes in the project as text. Hmm.. That's a lot of pages with code!

I made a little utility (in C# of course) that reads all the files in your project and projects the content of them, with line number, in an HTML file...

I'm thinking a lot of people could use this right about now, so I made it available for download: Here.

Friday, November 10, 2006

A day of mixed emotions

Today I feel a weird combination of goodness and badness..

On the bad side:
- I haven't done any work on my Java-project at all today
- I'm hungry
- I miss Composite (and most of all C# - Java is making me a bit angry)


On the good side:
- I went to a guest lecture at ITU today, with Anders Hejlsberg himself.. He spoke of C# 3.0 and the new features they are implementing, and a few times he kinda blew me away, although I've seen most of the stuff before in previous preview-bits. Anyway, it was a cool experience, and definetly woth the time.



After the lecture I went to a house-warming reception at some software company that is currently building a whole new e-commerce application. Hmm... Interesting guys there... Then I stopped by Composite HQ to check how things where, and had a long discussion with a dude there about the W3C DOM spec and how .NET and Java implement it differently. Cool!


So now I'm still hungry, and still have a lot to do, so I better get started :-)

I fucking hate caps lock

I hate it when it happens: You're typing your user name and password, but it doesn't work. Then you do it again, and it doesn't work.. Then you do it AGAIN, and it doesn't work. Then you look at the little Logitech stand for your wireless desktop and realize caps lock is on !!!!

I have partly stolen, and partly adjusted and perfected this little JavaScript code snippet to check if caps lock is on, and displays a message if it is:


var capsLockOnMessageDisplayed = false;

function checkCapsLock( e )
{
var keyCode = 0;
var shiftKeyOn = false;

if ( document.all )
{
keyCode = e.keyCode;
shiftKeyOn = e.shiftKey;
}
else if ( document.layers )
{
keyCode=e.which;
shiftKeyOn = ( keyCode == 16 ) ? true : false;
}
else if ( document.getElementById )
{
keyCode = e.which;
shiftKeyOn = ( keyCode == 16 ) ? true : false;
}
if ( ( keyCode >= 65 && keyCode <= 90 ) && !shiftKeyOn ) { displayMessage(); } else if ( ( keyCode >= 97 && keyCode <= 122 ) & shiftKeyOn ) { displayMessage(); } } function displayMessage() { if( !capsLockOnMessageDisplayed ) { alert( 'Caps Lock is On.\n\nTo prevent entering your password incorrectly,\nyou should press Caps Lock to turn it off.' ); capsLockOnMessageDisplayed = true; } }


Ps. check this out: CAPSoff

Thursday, November 09, 2006

I'd like to welcome myself

Hello Mads, and congrats on your new blogger blog... Hey - and welcome to you reading this!


So far nothing's in here, but I think I'll try and do something about that. I don't really have the time to post a lot up here right now - I'm working on a project for "school" (Copenhagen Business School) which proves to be very interesting, but also more time consuming than expected.


Anyway, the next couple of posts will probably be about the project, and will most likely be of the not-so-optimistic kind.

'Till then!