Aristo's Code Stuff

private bool ishadrjob() {return true;}

Thursday, February 28, 2008

The Best Software Writing I: Selected and Introduced by Joel Spolsky

I have just purchased "The Best Software Writing I" by Joel Spolsky.

I have to tell you I cannot wait to start read it.It is not in my native language which I usualy prefer to read in, but I don't mind.

Why? Because I have read a few reviews about this book.If you, by some reason didn't read it yet check here and here.




[update]
It is great book indeed.I haven'r read such a good position for long time.
Worth to buy? Definitely :-)

Saturday, December 22, 2007

LINQ - Passing query results

There is something in C# I am crazy about last time. There really is.


It is the LINQ, which stands for Language INtegrated Query.LINQ came up along with C# 3.0 and .Net Framework 3.5.I really enjoy it...

but...

Have a look at this code:


It works ok unless we want to pass the result out from the Fo method by some way.

Using var query this trick is not possible, because of an unknown type (maybe rather dynamic type) the var will converted into on the compile time.


It is not possible to pass var query into a method too because of the same reason.It looks to me like the biggest disadvantage of LINQ.The fact that we are unable to pass var into and pass it out of the method means that everything we want to do with the query result has to be done within the Fo() method.


It is not very convenient I would say.

I would rather think about something like this:


This would be nice but it wont work. The type of var query is dynamically created by compiler which takes a look at the syntax on the right side of = sign.

Trying to declare var query as we have done in the last example,

will give no chance for compiler to figure out the type of the var.


I was looking for the solution and I have found it somewhere on the net.So, to be able to pass the result whether out or into the method, or even declare our variable outside the method and use it within it we can use IEnumerable , which is in System.Collections.Generic namespace.


Lets try something like that:


Right now your result is accessible from any part of your class.

It can be also passed into and out of the method.

It made me happy about LINQ again...

Monday, November 26, 2007

DDD6 - UK Developer Community Event


I had a pleasure to attend DDD6 in Reading last Saturday.
Day started for me about 3am. I have driven over 200miles one way from Chadderton to be there and enjoy the event together with rest of UK Developer Community.
Great people, presentations, place... No more to add...
If, for some reason you're not familiar with this event, feel free to visit the website and join us at DD7 then :-)

Sunday, November 25, 2007

And it came to past...

... that I've got my own blog as well.

I have been thinking about my blog since some time, and finally... here it is.The first idea was to create ( I mean code ) my blog myself, but I found myself whether too lazy or too busy to do it. So far the Blogger.com satisfies my expectations. I am gonna leave it like that till... I'll change my mind.

What will be this blog about? Definitely about computers... maybe not exactly, but for sure about programming, what is my bread and butter every day.

Taking example of Rory's blog (which I like to visit sometimes to separate my mind from binary-way thinking) I will try to blog about everything, not only about tech stuff.

Who am I?
My name is Mariusz.I live in North West UK, study Computer Science - Bsc (Hons) in Computing at The Open University in Milton Keynes and try to become heavily addicted software developer... as my partner used to say :-) [edit - She said that it happend long time ago already]

Some of my fun... but not only... stuff you may find on my website. If you have visited my website, you already know that I live with my partner Aneta and 19 (at the moment) month old daughter Michelle.I try to post as much pictures of her as possible. I'm actually freaking about it. Feel free to see them all.

Apart from that I work (almost full time) on Express Solution project. The ES is a Hotel Management System helping to manage full life-cycle of whether a hotel or a network of hotels. There is not too much about this project on my website. Just a few screenshots so far... simply, because I prefer to work on it, than to write about it. Btw, I always heated to write manuals or documentation for my projects. I prefer to leave it for others (freaks :-) and focus myself on what I like doing best.

That's all this time.
Keep cool folks!