LA.NET [EN]

BooksArchive

Jan 16

win8

First post of the year. I hope it’s not too late to wish everyone a Happy New Year Smile

After some technical problems (unforeseen at the time), I’m pleased to announce that my latest book is out. This time, I’ve moved away from the web and I’ve went into the “wild” and decided to write a couple of pages about how you can leverage your web skills into build Windows Store Apps. It was a fun ride. I just hope that you, the reader, enjoy it as much as I did.

Dec 19

[Disclaimer: I’ve received a free copy of this book from O’Reilly]

I’ve finally managed to finish reading Ian Griffiths’ last book (yep, it’s a big book!) and I can tell you that it’s a great piece of work. In a similar vein with Jeffrey’s CLR via C# (I’ll be writing a review about this in the next couple of days), but with a different approach to the topics, Ian uses the C# 5.0 language to explore the CLR. It covers a lot of ground and that means it won’t be as deep as deserved in some areas (ex.: I think that Reactive Extensions deserved a little more love than it got). Oh, and yes, even though there’s a chapter on XAML and another on ASP.NET, don’t expect to see a lot of stuff covered about those platforms. Yes, they do cover some ground and they might be enough if you’ve got some experienced and just need the basics to get started. However, they’re far from enough if you’re looking for specific in depth coverage in each of those areas.

The text is clear and the prose is pleasant (at least, for about 95% of time) and I think this book would be a good addition to the bookshelf of any C# developer. Overall, I’d give it an 8/10.

Oct 01

[Disclaimer: I’ve received a review copy of this book from O’Reilly]

I’ve been searching for a good regular expression book for some time and I think I’ve finally found one which fits my requirements. Regular Expressions Cookbook is really a great book and you can use it as a reference for quickly picking up one or two regular expressions or as learning guide that can help you understand all the details associated with the way regular expressions work.

The book starts by introducing the topic of regular expressions and explains its “basic blocks” and how you can use them to build the most basic expressions you can think of. From there, it takes a detailed look at some common problems which you’ll be facing in the “real world”.

Being a cookbook, it’s not a surprise to see that the topics are presented in the typical problem/solution fashion. What I must point out though, is that you’ll be finding clear and long explanations about why things work the way they do and you won’t be limited to only one or two variations of regular expressions since the book presents the variations associated with several languages (.NET, Java, JavaScript, Perl, PHP, etc.). Note that rather long is not the same as boring and if you’re only interested in getting info about a specific language, you can always skim the parts which are of no interest to you. Interestingly, and even though I was only interested in getting info about using regular expresions in .NET and JavaScript, I’ve found myself reading the complete explanation section several times (which you can probably think of as a way of measuring the quality of writing that the authors have put into their work!)

Overall, I’m giving this a 9/10 and I really recommend it to those guys which are looking to learn more about regular expressions or that need to buy a good reference book on the topic.

May 18

Once more, released by FCA and in Portuguese! It covers ASP.NET MVC 2, 3  and 4 (this release presents the new stuff introduced by the current beta). Btw, I should also mention that if anything changes from beta to RC or RTM, you’ll be able to get the updated info from the FCA site. Hope you guys like it Winking smile

Apr 19

I’ve been so busy in these last months that I’ve almost missed the release of the 2nd edition of my HTML5 book. I’ve added a new chapter on SVG and I’ve also added several new sections and examples to the existing chapters which illustrate how you can combine the new features introduced by HTML5 to improve your web sites. These new sections were added based on the feedback I’ve received from the 1st edition readers. I really hope these changes will help those who are interested in getting started with HTML5.

Mar 06

Pedro Perfeito’s MS SQL Server 2012 Integration Service’s book is  now available for pre-order from Packt. If you’re looking for a good reading in this area, then this is probably a book you should consider.

Nov 16

Disclaimer: I’ve received a free copy of this book for review.

Nowadays, HTML5, CSS and JavaScript are everywhere. And since these are really hot technologies, it’s really easy to find lots of books about these topics. This really ends up being a problem because it’s not easy to find one which fits makes everyone happy. Interestingly,  Supercharged JavaScript Graphics seems to be able to do just that.

Let me be more specific: it’s a book which will make anyone with a decent knowledge of HTML, CSS and JavaScript interested in web graphics technics happy. I say this because the author introduces a range of topics and technics related with graphics which will surely teach you something new. Interestingly, the book doesn’t concentrate only in the new HTML5 features (ex.: canvas) and you’ll end up doing lots of graphic work with the pre-HTML5 features. Overall, I’m recommending this book for anyone who needs to improve their skills on graphics for the Web. Score: 8/1’0.

Nov 16

It’s been more than one month since I’ve written something in this blog. Unfortunately, I’ve been really busy with work and lots of investigation in several areas…but I think now I’ll be able to return to my daily routines and I’ll try to write at least one post per day Winking smile.

So, what have I been doing lately? Glad you’ve askedSmile I’ve been playing with the latest bits of ASP.NET (Web Forms and MVC). The next release will have some interesting features and that’s why I decided to write a  book about ASP.NET MVC (once again, in Portuguese). This won’t be a big book (like the one about Web Forms), but it will cover all the important details related with MVC projects.

Since my previous experiences have gone really well, I’ve decided once again to ask for the help of the community: if you understand Portuguese and you want to help me improve this book, just drop me a line at labreu _at_gmail.com. I can only have a limited number of reviewers and (unfortunately!) I can only offer a free copy of the book when it’s out for all your hard work Smile

Sep 28

[Disclaimer: I’ve received a free copy of this book for reviewing]

A few days ago, I’ve received a copy of the Parallel Programming With MS VS 2010 book. Before delving into the parallel lib, the books starts by presenting several interesting concepts related with parallel/multithreaded programming. From chapter 2 onwards, it’s all about the Parallel Lib. Chapter 2 presents several concepts related with adding task parallelism in your apps and Chapter 3 moves forward and tries to present several interesting ideas associated with data parallelism. Chapter 5 wraps it up by presenting several PLINQ related concepts. In Chapter 5, the author presents the concurrent collections and Chapter 6 wraps it up by talking a little bit about the available options for customizing the parallel lib.

I must say that I was really excited when I received the book. After all, multithreading programming is one of the areas that I really like to dig into. Unfortunately, the excitement was gone after reading the first 3/4 chapters. I’ve got two problems with this book: the first is it presents the code step by step and then it shows all the code. In other words, the book has lots of extra pages which really don’t add anything to it. The second issue I have with the book is that it doesn’t go deep enough. The examples shown are rather simple and, in my opinion, don’t really bring much more than the online docs. Overall, I’m giving it a 5/10.

May 24

I’m proud to say that my latest book is out! This time, I’ve decided to write about JavaScript and I tried to cover most features associated with its use. Notice that this isn’t a DHTML book. Instead, I tried to present all the features of this language (including the new ones introduced by ECMAScript5) and introduce several important patterns that are useful in the real world. I can tell you that I had lots of fun writing this books…I mean it! After all, I do love JavaScript. It’s really a fantastic language. It’s a pity that many people don’t use it correctly (but that’s another story…)

Once again, I had the good luck to work closely with my goof friend João Paulo Carreiro. Besides his precious help, I’ve also had important feedback from several other guys:

Thanks guys, your feedback was really important for improving the book!

I believe this is book number 8…I’d say it’s time to rest now…I hope…

May 12

In the previous post, we’ve started looking at encodings. In this post, we’ll finally put those theoretical concepts in practice and we’ll take a look at some code. Let’s start with a simple example. Suppose you’re building an application which will only handle English Strings. In this case, you know that UTF-8 will probably be a good option because it can use a single byte for representing all written chars. And that’s why you might decide to use it whenever you need to send or receive strings across the network:

var str = "This is a string which is going to be encoded";
var bytes = Encoding.UTF8.GetBytes( str );

 

Yes, it’s that easy! You start by getting a reference to an instance of an Encoding and then you encode an existing string into a byte array by calling its GetBytes method (the UTF8 static property returns an instance of the UTF8Encoding type, which extends the abstract Encoding type). If you only want to check out the number of bytes which are needed to encode a string, then you should resort to the GetByteCount method:

var str = "This is a string which is going to be encoded";
Console.WriteLine(Encoding.UTF8.GetByteCount( str ));

 

Calling the GetByteCount isn’t really a fast operation because the method analyzes all the chars in the string in order to return the correct number of bytes required. If you need to improve the performance of that call, then you can go with the GetMaxByteCount method. In this case, we end up with the number of bytes required for the worst case scenario (the method receives the number of chars in the string and multiplies it by the maximum number of bytes it needs to represent its “biggest” char):

var str = "This is a string which is going to be encoded";
Console.WriteLine(Encoding.UTF8.GetMaxByteCount( str.Length ));//138

 

Besides UTF8Encoding, the framework introduces several other specific Encoding implementations: ASCIIEncoding (encodes a string using the ASCII character set), UnicodeEncoding, UTF32Encoding (used for encoding each char as a 32 bit integer) and UTF7Encoding (encodes each char as a 7-bit sequence). You can create an instance of any of these encodings in two ways:

  1. you can instantiate them through constructor calls (not a good option in most scenarios).
  2. you can access an instance through one of the static properties of the Encoding class. btw, you should notice that Unicode and BigEndianUnicode return a reference to a UnicodeEncoding. The difference is that BigEndianUnicode returns a UnicodeEncoding which encodes chars in the big endian format.

The curious reader might also have noticed that the Encoding type offers a static Default property which also returns an Encoding object. This encoding is able to encode (or decode) by using the current user’s code page (as defined in the control panel’s regional settings applet). As I’ve said in the previous post, you can also use custom code pages (at your own risk!) encodings. To achieve that, you need to use the static GetEncoding method. There are several overloads which let you get a custom Encoding object by code page identifier or by code page name. The following snippet presents 3 different ways to get a handle to a UTF8Encoding instance:

var enc1 = Encoding.UTF8;
var enc2 = Encoding.GetEncoding( "utf-8" );
var enc3 = Encoding.GetEncoding( 65001 );
Console.WriteLine(enc1 == enc2);//true
Console.WriteLine(enc2 == enc3);//true

 

The previous example  also shows another interesting thing: each Encoding object is only created once when you get a reference from one of the Encoding type’s static methods or properties. So, whenever you request for an Encoding which has already been created, you end up receiving a reference to that previously created instance. Notice that this rule does not apply if you use the constructor of one of the existing derived Encoding types:

var enc1 = Encoding.UTF8;
var enc2 = new UTF8Encoding();
Console.WriteLine(enc1 == enc2);//false

 

If you look at the Encoding derived types constructor, you’ll notice that they offer several constructor overloads which allow you to fine tune the way encodings work. For instance, the UTF8Encoding introduces constructors which allows us to specify if  an encoding operation should generate a preamble (aka, BOM) and if an exception should be thrown when an invalid encoding is detected.

As you might have guessed, you can also recover a string from a previously encoded byte array. To perform a decoding, you need to 1.) get an instance of the appropriate Encoding and 2.) call its GetString method. Here’s how we can recover our previous encoded string:

var anotherString = Encoding.UTF8.GetString( bytes );
Console.WriteLine(anotherString);

So, decoding is not that hard either, right? If you’re interested in knowing how many chars will result from a decoding operation, then you should use the GetCharCount method:

Console.WriteLine( Encoding.UTF8.GetCharCount( bytes ));

 

Once again, it you’re interested in speed, then you can resort to the GetMaxCharCount method. Before ending, there’s still time mention that the Encoding type offers several properties which allow you to get info about it. For instance, you can access the CodePage property to get its code page identifier. There are other interesting properties, but I’ll redirect you to the docs since this becoming a rather large post.

That’s it for now. Stay tuned for more.

Mar 20

As we’ve seen, we can define generics in interfaces, classes, delegates and methods. In a previous post, I’ve already mentioned that you cannot define generics for properties. Besides properties, you can’t also define generics  for indexers (aka parameterful properties), events, operators, constructors and finalizers. Notice that these members can use eventual generic type parameters defined at interface or class level, but they cannot introduce their own generic type parameters. Here’s an example of what you can’t do:

public class Test {
public Test<T>( ) {
}
}

You might be curious to understand why you cannot define generics for these members. I was curious too…the best answer I got pointed to two interesting facts:

  • it seems like there aren’t really many cases where this feature would be needed.
  • allowing it would mean that the languages would have to be redesigned to allow these features.

The best example for understanding this last point relies in understanding how operators are used. For instance,there’s currently no way to specify a generic type with an operator. Lets walk through a simple example:

var str1 = “Hello, “;
var str2 = “there!”;
var str3 = str1 + str2;

We’re adding two strings through the operator+. Suppose we could use generics when defining the operator+. How would we write the code for specifying the generic type? I mean, would this be a good option?

var str1 = “Hello, “;
var str2 = 1;
var str3 = str1 +<Int32> str2;

In my opinion, that wouldn’t really contribute to improve the readability of the code…and that’s it for now. Stay tune for more.

Mar 19

I’ve been so busy that I didn’t even noticed that my latest HTML5 book was released a couple of days ago (btw, it seems like the 2nd version of the ASP.NET book  is out too with an updated chapter on the new MS JQuery plugins!). If you’re interested, you can get more info at FCA’s book page. This time, I’ve tried doing something different: I’ve asked for the help of my readers and I’s say things went very well. I’d also like to take the opportunity to thank these guys for helping in the reviewing process:

Thanks again guys! Your help was really precious…now, I can only hope that you, dear Portuguese reader, enjoy that work.

Feb 20

[Disclaimer: I’ve received a free copy of this book for reviewing]

Another of the books I’ve managed to read while I’ve been in “blog silent mode”  was Jenifer Tidwell’s Designing Interfaces, 2nd edition. User interface design is an area which is getting more and more attention lately (and, if you ask me,  that is really a good thing). In this book, Jenifer presents several UI patterns and techniques, grouped into several chapters according to their main purpose (ex.: flow patterns, layout patterns, list patterns, etc.).

All the patterns are well explained through the use of several sections: what, use when, why, how and examples (which list several use cases that illustrate the pattern in the real world). The book doesn’t concentrate only on web and desktop patterns and if  you’re interested in developing for the mobile,then you’ll be happy to know that there’s a complete chapter on it. This isn’t a book for designers only. If you’re a developer like me,then this a good book to have in your desk for those situations where you end up having to come up with the UI of an app (and we all know that in a many cases, we end up designing interfaces whether we’re prepared or not). Overall, I’m giving it an 8/10 and I’ve been using it for helping me improve the UIs that I’ve been in charge of designing lately.

Feb 20

One of the books I’ve ended up reading in the last month was the JavaScript Patterns book, by Stoyan Stefanov. The first thing you should take in mind is that this is not a JavaScript beginner’s  book. If you’re starting, then you probably should buy another book or start by reading the info in the MDC. The book starts with the basics, giving you several advices on how to improve your JavaScript code. Then it goes into several interesting details regarding basic features (ex.: hoisting), literals, functions, object construction, code reuse, general patterns and DOM patterns.

Even though this is not an ECMAScript5 book, the truth is that it prepares you well for it since it mentions most gotchas that might bite you when you decide to use it in your day to day programming. Overall, I’m giving it a 8/10 and this is a good companion for Douglas Crockford’s classical JavaScript: the good parts (which I’ve reviewed in the past and do recommend to anyone that needs to do some serious JavaScript programming).

Nov 17

Better late, than never, right? I’m happy to announce that my Silverlight book’s code is (finally) online. If you’ve bought the book, then you can head to FCA’s site and download it from the book’s page. Sorry for the delay…

Nov 03

Yep, I’ve already decided: I’ll be writing an intro book on HTML 5 (in Portuguese, of course). YEs, I just couldn’t resist it: ,,) I think HTML 5 is such a cool platform that I could resist writing a small book about it. But this time, I want to try something new: I want to see if anyone is interested in helping me out with the technical review.

Before going on, a couple of words about this project: I intend to write an intro book about HTML 5 and I do intend to talk about most of the new features which are associated with the HTML 5 acronym (ex.: canvas, geo-location, worker threads, etc.). It won’t be a big book (I’ll be trying to hit the 200 page mark) and  the only thing you need to do is read and give me feedback about the draft. You do not have to be an expert to be a reviewer (but if you are, you’re welcome too Smile). Unfortunately, there’s no money and the only thing I can promise is a special thanks entry in the acknowledgements section and a free book delivered at your home when it gets released. Not sure if this is incentive enough, but you do get the chance to bash my writing and I’ll even thank you for that.

So, if you understand Portuguese and you’re interested in helping me, please send me an email to  labreu_at_gmail.com (just replace the _at_ with the traditional @) with the subject Livro HTML and a few lines telling me why you’re interested in being a reviewer. thank you!

Sep 29

Protected: My Silverlight book is out!

Posted in Books       Enter your password to view comments.

This content is password protected. To view it please enter your password below:


Sep 15

One of the books I’ve re-read during my August vacations was Don Box’s Essential .NET. Tentatively called Essential .NET, Volume I: the Common Language Runtime (I say tentatively because there never was a volume II), it’s really one of those interesting books which you need to read for understanding and having some background on how things worked and on why they were done like this.

The book is starting to show its age (I’ve bought my copy in 2003, if I’m not mistaken) but it still provides lots of value. This is a “Don Box book”, meaning that it’s not for the faint hearted or the novice. If you want to get started then you need to pick another book. This is really a hardcore .NET book about the CLR (like the title says). And being a “Don Box book”, you’ll probably need to read it several times to get the most from it…

The book starts by taking a look at the origins of the CLR and on how it improves the existing state of things (which, if you don’t recall, was COM). After this brief introduction, things start to get really interesting. You’ll start by understanding modules  and assemblies and then you’ll see how the CLR is able to find and load them. Then things get even more interesting as Don goes through the CTS, objects and values, methods, app domains,security and interoperability with unmanaged code.

Overall,and bearing the fact that this is not a beginner’s book, I’m giving it a 9/10 despite its age. 

Jul 14

Since I’ve started working in my Silverlight book, I’ve been really busy. So busy that I completely forgot to post my review about Jeffrey Richter’s CLR via C# book. Well, to be honest, there’s really not much I can say about it…let me see…basically, I want to say two things:

  • it should be *required* reading for everyone that wants to write code for the .NET platform
  • it’s so good that when someone ask me about it, I  only say this: let’s assume that you only have money to buy a single book for learning .NET. In that case, you should buy this book. Really!

Yes, my friends, this book is really great and this last edition has added some nice chapters on multithreading too, which make it even more compelling. For all that’s worth, I’m giving it 10/10.

Apr 22

A few days ago I’ve mentioned that my ASP.NET 4.0 book was available for pre-order in the FCA site. It has finally been released during Techdays (Portuguese MS event), so you can order it from the web site or buy it in a book store.

As you can deduce from its title, this book covers ASP.NET 4.0  Web Forms in depth. A warning: don’t be fooled by the number of printed pages! When compared with the previous  3.5 editions, you’ll notice that it has less pages. But that only happened because we’ve (I’ve suggested and the editor agreed) decided to move some of the printed content into online appendixes in order to lower the price of the book. If you look at the contents, then you’ll notice that it covers more stuff than its previous editions (the main difference is that a couple of chapters which were printed are now available for download).

There’s also good news for my Brazilian readers: the book will be distributed in Brazil (and that should mean that its price should not be as high as it used to be in the past). So, if you live in Brazil and you’re interested in buying this book (or one of its previous releases), you should contact Zamboni Comércio de Livros and ask for a copy:

Zamboni Comércio de Livros Ltda.
Av.Parada Pinto, 1476
São Paulo – SP
Telf. / Fax: +55 11 2233-2333
E-mail: zambonibooks@terra.com.br

As always, feel free to contact me if you have any questions/suggestions about this book.

Apr 17

Yesterday I’ve finally finished reading Stuart Sutherland’s Irrationality. I’ve found it really entertaining and I do recommend its reading to anyone that wants to better understand what (ir)rationality means. Stuart Sutherland makes his point (we all act irrationally sometimes) by presenting the results of several experiments that have been conducted along several years. Overconfidence and conformity are just 2 of the things that lead to wrong judgments and reasoning”s…but besides these two topics, there are several others (each with its own dedicated chapter) which really turn this book into a wonderful reading experience. Overall, I’m giving it 8.5/10.

Apr 14

It’s still not for sale, but you can be notified when it’s out. Btw, here’s its cover:

aspnet40book

Mar 25

I’ve just finished reading Chris Smith’s book Programming F#. This is the second book I’ve tried reading on the subject and this time I’ve made it! Now, I’m not really a functional programming guy, but I must say that I see some interesting advantages associated with this style of programming (on the other hand, I really don’t like F#’s syntax).

The book is divided into two parts: on the first, you learn the basics about F#, functional programming (this is a plus for guys which haven’t met the concepts associated with it) and basic .NET programming (including coverage of OO). The second part of the book shows several real world examples that put F# to work. Overall, I’d say that this is a good book if you’re interested in getting started with functional programming and F#. My score: 8/10.

Feb 08

In this last weekend I was a little burnt out, so I decided it was time to relax. And that’s why I’ve decided to have a go at Tom DeMarco’s Deadline: a Novel About Project Management. I guess this is an interesting (and different) way of presenting several important aspects associated with project management: the author tells us the stories of Mr. Thompkins as he is put in charge of Morovia’s sfotware development. Overall, I guess this is really an funny reading, though I’m not sure if this book is for someone that is getting started with project management. I’m giving it an 8/10.

Jan 27

I’ve just finished reading Scott Berkun’s latest book. Scott is a really good communicator and you can say that I’ve been a fan of his work since his first best seller (Making things happen), which, btw, I’ve reviewed here a long time ago.

You’ll be able to find several interesting topics in Confessions of a public speaker. Besides tips on how to improve your skills, you’ll also find some advice on how to handle several problems which you’ll eventually face when doing public speaking in front of lots of people. I’m really convinced that if you’re a public speaker, then you’ll learn a couple of things by reading this book. I know that the presentations I’ve done in the past would have been better if I had this book at the time. Anyway, it’s never late and I’m really under the impression that by using Scott’s tips, I’ll be doing a better job when I need to talk in public in future gigs.

I must confess that I did really enjoyed the chapter on confessions where you can find a collection of short essays on things that have gone wrong during presentations (of professional speakers). Overall, I found this a pleasing and easy reading book with lots of good advices. Note: 9/10.

Nov 24

This is a post to my Portuguese readers (ie, for those guys and gals that have read my Portuguese books). I’m still preparing material for a possible ASP.NET 4.0 book and I would really appreciate some feedback on the previous editions (that is, if you read the book). What did you like? What didn’t you like? What would you like to see covered?

If you want, you can put your comments in Portuguese. Thanks for your help.

Nov 22

This was one of the books I’ve read during my summer vacations. Dan Roam tries to show us how we can use visual thinking to solve problems. I found it interesting and enlightening, though I must confess that I still haven’t tested all of his ideas in my day-to-day work. Overall, I’m giving it 7.5/10.

Nov 08

I’ve just finished re-reading (I’ve read if for the first time around 2000) this fantastic book which was written by Bjarne Stroustrup, who is the responsible for the design of C++. I haven’t used C++ professionally for over 6 years now! However, I’ve always been fascinated for its power and complexity and I do intend to start using it again really soon (btw, my first professional gig as a dev consisted in writing C++ code and that’s probably why I’ve got some affection for the language).

One of the reasons I enjoy this kind of book is because I’m always curious to understand why option A was preferred over B for a specific feature. And Bjarne does an excellent work on that area with this book. He goes all the way back to the roots of C++ (I’m too young to remember it being called C with classes) and explains all the rationale that is behind all the major decisions taken during C++ design and evolution. If you’re looking for a book that teaches you how to program with C++, then this isn’t really for you. However, if you’re puzzled about some C++ feature or if you think that something shouldn’t really work the way it does, then this book is for you (I’m positive that you’ll see that your idea wouldn’t really work in some specific scenario which gets used by 0.05% of the guys that use C++ :) ,,).

My score: 9/10.