The Education of a Programmer (Me)

Just another WordPress.com site

Category: Reviews

Book Review – Becoming Functional

I’ve recently been reading Becoming Functional by Joshua Backfield. As usual, the disclaimer is that I received a copy of the book for free in return for the review.

I was interested in this book, primarily because I have always been of the opinion that some of the code I’ve written for a couple of programs I’ve developed could be better written using a functional model as opposed to the traditional declarative programming model I learned in school. After reading this book, I’ve realized my instincts are better than I thought and that I’m right in that belief.

Mr. Backfield does a very good job stepping the reader through a fictional company where, as a developer, you’re trying to make some of their back end programming more efficient and more responsive to the user. He starts by walking you through the company’s code and then refactoring it step-by-step to more and more functional paradigms. Along the way, he does a good job of explaining functional programming in brief and how factoring the functions can make everything work more efficiently.

When I read the book for review, I only had the first six chapters available, but the chapters on immutable variables and recursion were enough for me to be sufficiently impressed and to have some ideas on where to take my own code. I am certainly going to go back and finish the book and work my way through the code.

Even though the code examples are in Java and Groovy, it’s not difficult to see how to change them over to C# and possibly F#. (For programmers like myself in the ASP.NET world.) With this in mind, it won’t be hard at all to work out the refactoring method by method.

Overall, for an experienced declarative programmer, this is a great introduction and a good guide to adding in functional concepts where they are called for. For less experienced programmers, this is a great way to look at a new paradigm while gaining a good understanding of how it can work in the real world. I heartily recommend the book for anyone interested.

Book Review – Microsoft Visual C# 2013 Step by Step

I’ve recently been reading Microsoft Visual C# 2013 Step by Step by John Sharp. As usual, the disclaimer is that I received a copy of the book for free in return for the review. I’ve not linked to the book because I blog as part of O’Reilly’s reader review program and recently Microsoft Press books have been removed from their site. Out of courtesy to them, I am not going to link to Microsoft’s site for the book.

The book is aimed, as you read it, for programmers who are wanting to get a foundation in the basics of C#. As such, the book is a good reference work. It takes apart each of the different parts of the language and shows you how they are used in basic format. The first part of the book introduces you to the language, it’s absolute basics, and Visual Studio. The second part, getting the object model under control. Part 3 extends it, and finally, part four shows you how to build something simple for Windows 8.1; as that is Microsoft’s application focus currently.

Overall, Mr. Sharp does an excellent job describing the basics. If you’re a more experienced programmer wanting to see what’s new in the language, this isn’t really your book. But that’s not a negative. It’s not designed for that level of programmer. The examples are clear and concise. However, my one concern is that, as with most beginning books, what you’re learning along the way doesn’t build on itself until the final portion of the book when it all builds at once. However, if you’re going to be new to C# and you’re not coming from Java, this is certainly a good book to start with.

Book Review – Algorithms in a Nutshell

I’ve recently been reading Algorithms in a Nutshell by George T. Heineman, Gary Pollice, Stanley Selkow. As usual, the disclaimer is that I received a copy of the book for free in return for the review. This book is dense. It was tough for me to get through. That’s not really a negative, it’s an admission that for all of my education in learning programming languages and writing programs, I’ve never taken the time to learn the Computer Science behind the craft of programming.

That said, this is not a book for getting an introduction into algorithms. This is a book for reference when you know what you’re doing and you want to confirm how this algorithmic pattern or that pattern will impact the program and the speed of computation. The book is well written and there is tonnes of example code throughout the book to explain what the authors are saying about each type of algorithm. There are also a tonne of algorithm types in the book to demonstrate the principles. The epilogue alone is worth the price of the book when you read it. I might have placed it at the front as a prologue to explain what I was reading first. However, as I said, I don’t have the same background and I certainly would have benefited from an introductory level book on the topic before attacking this one.

However, when time and tide avail me, I will certainly read something more introductory first and then I will return, with more knowledge in hand, to this book to see what else I can extract from it and see how it can make me a better programmer. If you are already a programmer dealing with these types of algorithms on a daily basis, then you should have this book at your side.

Book Review – Jump Start CoffeeScript

I recently read Jump Start CoffeeScript by Earle Castledine from SitePoint books.  As usual, the disclaimer is that I received a copy of the book for free in return for the review. The “Jump Start” format seems to hold great promise. Take a scenario and affix the paradigm to it to gain a basic foundation with the highlighted technology. The flow of the book felt episodic in the delivery. In this season, if you will, we tackle CoffeeScript. CoffeeScript is one of a growing number of languages, like Google’s Dart or Microsoft’s TypeScript which try to give a developer a better Javascript when writing the code before it is compiled into Javascript in the delivery to the viewer.

Leaving aside the relative merits of this approach to coding. The book is a quick and comical read by an author who really knows the ins and outs of Javascript and CoffeeScript. In this “season”, the developer (Mr. Castledine and by extension you) has been roped into a seven day “Build-A-Game” competition and partnered with a team of less than diligent designers, artists, etc. So in the end, you’re on your own to build a web based game in 7 days. To make it either more entertaining, or more insane, you decide to code this in a language you’ve never used before. Again, I will leave the relative sanity of such a decision for another day and just follow the book.

Chapter 1 sets you in motion, describing what CoffeeScript is and getting you familiar with the fact that it is much more terse than Javascript and that it will compile, when finished, into Javascript. You are pointed to a few resources to ensure your .coffee files are able to be compiled into .js files and basic syntax structures. The next 5 chapters are 5 days worth of game development. Really, I think the book does a better job of teaching you the whats and hows of creating a browser based game than the CoffeeScript itself. You are exposed to a lot of code snippets and the author explains his thinking, but if you read the code from the book’s site, you see that you’re not getting all of the code to build the game in the book. You cover important pieces, but it’s assumed that you will compile the code and run it. Or at least that’s what it felt like to me. The final chapter is more a pat on the back for finishing the game and the book.his in a language you’ve never worked with before. Again, I will leave the issue of the wisdom of your choice aside and go with the book’s scenario.

I would recommend this book for someone who wants to build browser based games. This book taught me a lot about that. It gave me a few ideas for what and how to make some killer games. However, I will look for more sources on CoffeeScript, especially if they can explain why I want to do this in the first place.

Book Review: CSS Fonts

I recently completed CSS Fonts by Eric Meyer. As usual, the disclaimer is that I received a copy of the book for free in return for the review. Mr. Meyer is very well known as a CSS expert and I follow his blog and his writing carefully because I feel certain I will learn a new trick here or there. This book most certainly continues with that trend and justified my wanting to review this book.

The book covers one topic and one topic only, fonts and how to use them better with CSS. It is slim, more reminiscent of an O’Reilly Pocket Guide than anything else. However, that is certainly not a statement against this book. In the course of 60 pages, this book covers every font selector in CSS and covered a few that I’d never heard of as well. There were clear explanations for each selector, how to use it, and why you would want to use it. In the end, if the viewer looks at a site I wrote in a Gecko-based browser, then they would see something that could rival anything developed in InDesign.

I’m looking forward to a day when a lot of the tricks I’ve read about in this book are common throughout the major browsers so hand tuning the typography in a website can add a new depth and dimension to any website. This is a fairly recent release and I think this should be in every web developer/designer’s arsenal to start making web typography as elegant as anything which appears in print.

I am going to play with a lot of these ideas in website I build when I get the chance. Buy this book!

Book Review: The Modern Web

I’ve just finished The Modern Web by Peter Gasston. As usual, the disclaimer is that I received a copy of the book for free in return for the review. Having said that, after I started reading this book, I realized if I hadn’t received it as a review copy, I would still want to go out and buy it. This was one of the best books I’ve read at introducing many of the new options available in web construction, from HTML5, through CSS3, all the way to Javascript and APIs and how to use the basics. The companion website, The Modern Web, is kept up to date by the author to cover any changes and updates to the base material, as this topic always seems to be changing.

Mr. Gasston has a dry wit, which really is engaging and fun to read. He’s also well versed on the subject and has a wonderful additional reading section at the end of each chapter which links you to not only his source materials, but to materials designed to push you further down the pathway to better programming. The book is aimed to the intermediate level developer who, like me, write good solid web pages, but knows there are a lot of things I can do to both help myself and improve my work as I go along. My favourite section had to be Chapter 3 with the device responsive CSS ideas. This really gave me a lot of ideas as to what to do with a portfolio site I work on. I also was very interested in the information about device APIs from Chapter 6.

My only criticism was in the forms section, Chapter 8, where he speaks about form input types like tel and discusses that they can be pretty much anything. While that is true to the surface, I know, and I hope many other developers know, to use the pattern attribute to ensure the proper format for the country at hand. Combined with some Javascript, this makes a great filter for ensuring the phone number matches the expected format (especially if inserted into a database somewhere.). While he mentioned the pattern attribute much later, it felt like an aside more than anything else.

That criticism aside, I heartily recommend this book and following up with it on the website he’s created for it. It will make your web work stronger!

Book Review: F# for C# Developers

I recently read F# for C# Developers by Tao Liu. As usual, the disclaimer is that I received a copy of the book for free in return for the review. This one was a challenge. Not because of the programming paradigm shift from imperative driven programming in C# to functional programming in F#, but because the density of the book and my having read a different book on F# rather recently.

Mr Liu is most certainly an expert on F#, both from his work at Microsoft and this book. However there were times when I felt a little frustrated in reading the book. My favourite chapter of this book was Chapter 3 where he examines design patterns which can be found in C# and then applies these patterns to F# code. It remains dense reading, but it demonstrates those patterns very well. Mr Liu takes the notion, as I read this, of showing you how to do something you typically do in C# and redo it in F#. The biggest question about the code samples included is why do I want to? Unlike other books I’ve read where the idea of functional programming and how it can do more in fewer lines can easily be demonstrated with examples like a quick Fibonacci Sequence; many of his earlier examples really don’t show any savings in coding at all. They do demonstrate that if you can do something with C#, you can also do the same thing with F#, but really I never got a lot of benefit analysis or convincing as to why I want to do this at all.

To me, this book really is written for a programmer who has started hearing more about F# and wants to know what could be done with it and wants to get his or her feet wet with the language. I have a feeling if I would have read this before the other O’Reilly book I reviewed on F#, I would have been far more impressed with it and gotten a tonne more out of it. It’s a good book, well written and full of exemplar code which builds on itself, but I felt like I’d covered too much of the same ground with a better guide earlier. That should not, in any way, dissuade a C# programmer who is curious from picking up the book. However, if you have a good deal of exposure to F# through other avenues, this will be a bit redundant.

My recommendation is if you want to get started, get this, then graduate to the other book I reviewed a while back. Both books will make more sense that way!

Book Review – HTML5 Canvas, 2nd Edition

I recently read HTML5 Canvas, 2nd Edition by Steve Fulton and Jeff Fulton. As usual, the disclaimer is that I received a copy of the book for free in return for the review. In this case, I am very glad that I was able to read and review this book. I’m not a designer, I know enough about Illustrator and Photoshop to be dangerous, I’m a programmer by comfort level, so this book is really geared for me.

Most of the book is centered on Javascript and how to leverage that to create some very interesting experiences with the canvas element. A lot of the book is focused on game development, which with today’s programming trends, makes a lot of sense. However they also do an excellent job covering audio and video inside a canvas element as well. Overall, the book does an excellent job with building up from the absolute basics to some very advanced effects.

My only criticism of the book would be that there is, strangely, too much code. In many of the chapters, when they build on the code, you not only get the new additions ,but then they give you the entire code with the new additions. In one chapter that meant 16 different examples which were all built on each other. I am more accustomed to tech books which tell you to replace or insert the new code at a particular point and then move on. I know this is a style choice, but to me, it makes the book easier to get through.

However, that really is my only criticism. The book is well-written, explains the concepts thoroughly, and the ebook versions link you to the libraries they use throughout the programming to make it simpler for you to follow along. By the end, I felt like I understood the subject. I would certainly suggest that anyone reading this book have a good grasp of Javascript before they start. There is no unnecessary hand-holding to bring you up to speed. You’re expected to know the material, which is a positive to my mind, and then go farther with their information.  By the time you finish the book, you will go far indeed!!!

HTML5 Canvas, 2nd Edition is a good book and well worth the price if you want to have a lot of fun seeing what you can do with the canvas element.

Book Review – Instant HTML5 Presentations: How To

First off, the disclaimer, I have received a free copy of the book in exchange for the review. For most of my readers, this is well-known and established, but I like to also post a reminder so people are fully aware of my involvement. The book is Instant HTML5 Presentations: How To by Davi Ferreira.

Now that I have that out of the way, I will admit, I thought the book was interesting. It is, basically, an extended tutorial on using reveal.js, HTML5, and CSS to create a Single Page App (SPA) that functions as a presentation. Reveal.js is a very interesting library and he covers it in good depth. There is also supplemental code if you don’t want to type in the code from the book.

Mr. Ferreira steps through each portion of the process carefully and by the end of the book, 60 pages later, you should have a very good understanding of how to do this yourself. His subheadings in the book included being able to not only customize the presentation, but add notes. One idea I wish he would have elaborated a little further is setting the same presentation up on two monitors so you could use the speakers notes effectively. I have an idea on how to do it, but I think a little more explanation there would be beneficial to someone who wants to throw a presentation together, but isn’t a programmer naturally.

He also discusses in the book how to configure and use Sass to build your CSS faster, but he pays no attention to Less for people who either can’t or don’t use Ruby and Rails for the website. To me, the example on this would be creating a presentation and then putting it on a flash drive, using some WAMP stack to create a temporary server for the presentation, and then running the presentation from the flash drive. His only suggestion is to write CSS. Could you find a way to use Less since you’re likely not going to be using Ruby on someone else’s machine? Or, for something I may be doing later this month, I have a presentation due in a class and would love to use this as a way to deliver that presentation. I have a private web host or I could even upload the page and the CSS/JS here, either way, there is no backbone support for Sass.

Overall, I was impressed at how much I picked up in 60 pages. Mr. Ferreira is a good writer and doesn’t spend time adding in anything unnecessary. I would recommend this to anyone who has to create presentations and is looking for an alternative to PowerPoint which gives more flexibility. Go buy the book, it is wort the few dollars Packt is charging for it.

Cheers

HTML5 Presentations How-to

Review Preview

As you all know, from reading my blog, I do book reviews from time to time. I was asked by PacktPub to do a new review for them for a new book which has just come out: HTML5 Presentations How-to .

This looks to be interesting and I’ve been asked to do the review in a couple of weeks time. So I’m going to get it on the tablet tonight and start reading it on the bus rides tomorrow. I had been reading articles on single page apps lately, so I am wondering if I can’t dovetail these together into something really interesting. Stay tuned for the review and my thoughts on that and a few more thoughts I’ve been having on different ideas!!!!

HTML5 Presentations How-to