tag:blogger.com,1999:blog-3012995609113485712008-05-20T00:33:15.308-07:00Aristo's Code Stuffprivate bool ishadrjob() {return true;}Mariusz Zaleskihttp://www.blogger.com/profile/12049214869277539698noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-301299560911348571.post-14734598095684544482008-02-28T06:30:00.000-08:002008-04-17T06:40:09.459-07:00The Best Software Writing I: Selected and Introduced by Joel SpolskyI have just purchased "The Best Software Writing I" by Joel Spolsky.<br /><br />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.<br /><br />Why? Because I have read a few reviews about this book.If you, by some reason didn't read it yet check here and <a href="http://agylen.com/2005/11/10/the-best-software-writing-review/">here</a>.<br /><br /><br /><br /><p><img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://www.aristo-samar.com/blog/uploaded_images/Joel_book-734593.jpg" border="0" /><br />[update]<br />It is great book indeed.I haven'r read such a good position for long time.<br />Worth to buy? Definitely :-)</p>Mariusz Zaleskihttp://www.blogger.com/profile/12049214869277539698noreply@blogger.comtag:blogger.com,1999:blog-301299560911348571.post-60868186169854074522007-12-22T06:11:00.000-08:002008-04-20T13:05:08.573-07:00LINQ - Passing query resultsThere is something in C# I am crazy about last time. There really is.<br /><br /><br />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...<br /><br />but...<br /><br />Have a look at this code:<br /><br /><p align="center"><a href="http://www.aristo-samar.com/blog/uploaded_images/ex1-766124.jpg"><img style="CURSOR: hand" alt="" src="http://www.aristo-samar.com/blog/uploaded_images/ex1-766116.jpg" border="0" /></a><a href="http://www.aristo-samar.com/blog/uploaded_images/ex3-710613.jpg"></a></p><br />It works ok unless we want to pass the result out from the Fo method by some way.<br /><br />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.<br /><br /><br />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.<br /><br /><br />It is not very convenient I would say.<br /><br />I would rather think about something like this:<br /><br /><p align="center"><a href="http://www.aristo-samar.com/blog/uploaded_images/ex2-766138.jpg"><img style="CURSOR: hand" alt="" src="http://www.aristo-samar.com/blog/uploaded_images/ex2-766132.jpg" border="0" /></a><a href="http://www.aristo-samar.com/blog/uploaded_images/ex1-766124.jpg"></a></p><br />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.<br /><br />Trying to declare var query as we have done in the last example,<br /><br />will give no chance for compiler to figure out the type of the var.<br /><br /><br />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.<br /><br /><br />Lets try something like that:<br /><br /><p align="center"><a href="http://www.aristo-samar.com/blog/uploaded_images/ex3-710613.jpg"><img style="CURSOR: hand" alt="" src="http://www.aristo-samar.com/blog/uploaded_images/ex3-710605.jpg" border="0" /></a><a href="http://www.aristo-samar.com/blog/uploaded_images/ex2-766138.jpg"></a></p><br />Right now your result is accessible from any part of your class.<br /><br />It can be also passed into and out of the method.<br /><br />It made me happy about LINQ again...Mariusz Zaleskihttp://www.blogger.com/profile/12049214869277539698noreply@blogger.comtag:blogger.com,1999:blog-301299560911348571.post-91717843650499768622007-11-26T05:59:00.000-08:002008-04-17T06:42:15.993-07:00DDD6 - UK Developer Community Event<a href="http://www.aristo-samar.com/blog/uploaded_images/ms_campus-766333.jpg"><img style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://www.aristo-samar.com/blog/uploaded_images/ms_campus-766281.jpg" border="0" /></a><br /><div><span style="font-family:arial;">I had a pleasure to attend <a href="http://www.developerday.co.uk/ddd/default.asp">DDD6 in Reading </a>last Saturday.</span><br /><span style="font-family:arial;">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.</span><br /><span style="font-family:arial;">Great people, presentations, place... No more to add...</span><br /><span style="font-family:arial;">If, for some reason you're not familiar with this event, feel free to visit the website and join us at DD7 then :-)</span></div>Mariusz Zaleskihttp://www.blogger.com/profile/12049214869277539698noreply@blogger.comtag:blogger.com,1999:blog-301299560911348571.post-35143464769146509342007-11-25T05:51:00.000-08:002008-04-19T18:32:52.467-07:00And it came to past...<span style="font-family:arial;">... that I've got my own blog as well.<br /></span><br /><span style="font-family:arial;">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.<br /><br />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.<br /></span><br /><span style="font-family:arial;">Taking example of <a href="http://www.neopoleon.com/home/default.aspx">Rory's blog </a>(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.<br /></span><br /><span style="font-family:arial;">Who am I?</span><br /><span style="font-family:arial;">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]<br /></span><br /><span style="font-family:arial;">Some of my fun... but not only... stuff you may find on my website. If you have visited <a href="http://www.aristo-samar.com/">my website</a>, 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.<br /></span><br /><span style="font-family:arial;">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.<br /></span><br /><span style="font-family:arial;">That's all this time.</span><br /><span style="font-family:arial;">Keep cool folks! </span>Mariusz Zaleskihttp://www.blogger.com/profile/12049214869277539698noreply@blogger.com