Windows PowerShell 3.0: Step by Step – A huge guide to things you can do after you’ve found PowerShell – #bookreview

Windows PowerShell 3.0: Step by Step
Ed Wilson
(Microsoft Press – paperback, Kindle)

 

Wondering what the “Open Windows PowerShell” option does on your Windows 8 PC?

There’s a book for that: Windows PowerShell 3.0: Step by Step by Ed Wilson.

According to Wilson, “Windows PowerShell 3.0 is an essential management and automation tool that brings the simplicity of the command line to the next generation operating systems.” It is “included in Windows 8 and Windows Server 2012, and portable to Windows 7 and Windows Server 2008 R2” and “offers unprecedented power and flexibility to everyone from power users to enterprise network administrators and architects.”

Windows PowerShell is accessed as a command console that also offers a programming language. This means you can create files that will perform some automated actions using “cmdlets” (pronounced “command-lets”) at the PowerShell prompt. The cmdlets, Wilson writes, “are like executable programs, but they take advantage of the facilities built into Windows PowerShell, and therefore are easy to write.” cmdlets are not scripts, he adds, “because they are built using the services of a special .NET Framework namespace.”

In one basic, introductory example in Wilson’s book, you create a batch file — TroubleShoot.bat — that automatically enters four commands in sequence and pipes the results of each command to a text file:

ipconfig /all >C:\tshoot.txt
route print >>C:\tshoot.txt
hostname >>C:\tshoot.txt
net statistics workstation >>C:\tshoot.txt

Wilson’s book spans 666 pages, so there are many other features and uses for PowerShell that should please power users, technical staff, Windows network administrators, and Windows networking consultants. Some programmers also will relish its opportunities to write various types of PowerShell files and create functions, subroutines, modules, and other processes.

If you are studying to become a Microsoft Certified Solutions Expert (MCSE) or Microsoft Certified Trainer (MCT), you may know this already: Windows PowerShell is considered “a key component of many Microsoft courses and certification exams.”

Windows PowerShell 3.0: Step by Step is well written, and it is solidly illustrated with code examples, screenshots, and other graphics. The author is a senior consultant at Microsoft and a well-known scripting expert. Readers are not expected to have “any background in programming, development, or scripting.” So, it is a good (albeit hefty)  how-to guide for PowerShell beginners and intermediate users.

Si Dunn

Jump Start CoffeeScript – A quick guide for experienced programmers – #programming #bookreview

Jump Start CoffeeScript
Earle Castledine
(SitePoint – paperback, Kindle)

CoffeeScript is a fun yet “serious” computer language. It is, declares the coffeescript.org website, “a little language that compiles into JavaScript. Underneath that awkward Java-esque patina, JavaScript has always had a gorgeous heart. CoffeeScript is an attempt to expose the good parts of JavaScript in a simple way.”

And therein rubs a lie, to re-coin a very old phrase. Many beginners somehow get the notion that they can take up CoffeeScript as a cool way to avoid learning JavaScript.

It is not. Your compiled code from CoffeeScript is in JavaScript, and how, exactly, do you plan to debug it if you don’t know JavaScript? (Also, a key goal of CoffeeScript is to help you learn to write better JavaScript.)

Which brings us to Jump Start CoffeeScript by Earle Castledine. This is an entertaining yet serious programming book that promises, on its cover, to show you how to “get up to speed with CoffeeScript in a weekend.”

Repeat after me: This is not a book for computer beginners, nor anyone seeking to skate around a requirement to learn JavaScript.

Castledine’s 151-page book quickly takes you, in just one chapter, from “Hello CoffeeScript!” to beginning the process of building a computer game. And, the author promises, it’s “[n]ot just the outer husk of a boring space-based shoot ‘em up, but a complete, extensible HTML5 game with tile maps, particle effects, AI, and (of course) Ninjas.”

Despite the “weekend” tagline on the cover, the book is written in part as a story in which you have one week to develop and deliver the HTML5 game as a software product. But (spoiler alert!), you will, miraculously, finish the process one day early. (This seldom happens in real-life software development.)

If you are comfortable with JavaScript, HTML and computers, Castledine’s book can provide you with an enjoyable, challenging, and useful way to learn CoffeeScript. (You will also need to have Node.js installed, so you can use npm, Node’s package manager for modules, to download and install the coffee-script module — the hyphen is required here.)

If you are not comfortable with the aforementioned qualifications, here’s another warning. To keep the book short, almost every code example is presented as an excerpt. The full pieces of code are contained within a downloadable code archive. While using the book, you are expected to open specific files and add specific lines of code. And exactly where in the file you are supposed to add them seldom is spelled out in good detail. Basically, you are supposed to know this stuff already.

For example, in Chapter 1, you are told to “Plop a canvas element into your web page using a unique ID….”

First, you have to realize that the presented excerpt is part of a particular index.html file that will become an introductory project’s web page. And as for precisely where to plop that piece of code, you just have to know. In the very next sentence, you are told: “Now we need to grab a reference to its drawing context via CoffeeScript….” This is followed by another code excerpt, and: “If you’re compiling this code with coffee, it needs to be in a separate file, compiled, then included in the web page.” And so forth.

If you don’t know what to do without further instruction, prepare to be confused.

The author is a well-known JavaScript expert who’s very good with CoffeeScript, too. And, the goal of this SitePoint book is to quickly get you up to speed with CoffeeScript.

You will get up to speed–if you possess some programming experience, know some JavaScript and HTML, and can follow the author’s instructions without needing basic 1-2-3, a-b-c steps.

Si Dunn

The Definitive ANTLR 4 Reference – You, too, can be a parsing guru – #programming #bookreview

The Definitive ANTLR 4 Reference
Terence Parr
(Pragmatic Bookshelf – paperback)

The self-described “maniac” behind ANTLR — “ANother Tool for Language Recognition” — is at it again. Terence Parr has rewritten ANTLR “from scratch” and celebrated by bringing out a new edition of his book, The Definitive ANTLR 4 Reference.

Parr, a professor of computer science and graduate program director at the University of San Francisco, says his book is “specifically targeted at any programmer interested in learning how to build data readers, language interpreters, and translators. This book is about how to build things with ANTLR specifically, of course, but you’ll learn a lot about lexers and parsers in general. Beginners and experts alike will need this book to use ANTLR 4 effectively. To get your head around the advanced topics in Part III, you’ll need some experience with ANTLR by working through the earlier chapters.”

Also: “Readers should know Java to get the most out of the book.” ( Java 1.6 or later is required.)

According to Parr: “ANTLR v4 is a powerful parser generator that you can use to read, process, execute, or translate structured text or binary files. It’s widely used in academia and industry to build all sorts of languages, tools, and frameworks. Twitter search uses ANTLR for query parsing, with more than 2 billion queries a day. The languages for Hive and Pig and the data warehouse and analysis systems for Hadoop all use ANTLR. Lex Machina uses ANTLR for information extraction from legal documents. Oracle uses ANTLR within the SQL Developer IDE and its migration tools. The NetBeans IDE parses C++ with ANTLR. The HQL language in the Hibernate object-relational mapping framework is built with ANTLR.”

So…it’s out there in many different and big ways. But ANTLR also can be used for smaller projects.

Notes Parr: “…you can build all sorts of useful tools such as configuration file readers, legacy code converters, wiki markup renderers, and JSON parsers. I’ve built little tools for creating object-relational database mappings, describing 3D visualizations, and injecting profiling code into Java source code, and I’ve even done a simple DNA pattern matching example for a lecture.”

Parr’s 305-page, 15-chapter book is divided into four major parts:

  1. Introducing ANTLR and Computer Languages
  2. Developing Language Applications with ANTLR Grammar
  3. Advanced Topics
  4. ANTLR Reference

This latest version of ANTLR “has some important new capabilities that reduce the learning curve and make developing grammars and language applications much easier. The most important new feature,” Parr adds, “is that ANTLR v4 gladly accepts every grammar you give it (with one exception regarding indirect left recursion….)”

To properly understand that exception and how it must be dealt with, you will need to read “Dealing with Precedence, Left Recursion, and Associativity” in Chapter 5.

This is not a book for programming beginners. But Terence Parr is a good writer who injects both clarity and occasional humor into his descriptions. And he provides numerous code examples and illustrations to help guide you along the way to becoming a parsing guru and mastering ANTLR v4.

Si Dunn

Jump Start Node.js – A well-written guide for learning Node.js quickly – #programming #bookreview

 Jump Start Node.js
Don Nguyen
(SitePoint – paperback, Kindle)

Don Nguyen’s well-written Node.js book has been in print for a few months and is an excellent text for learning how to put Node.js to work in fast, scalable real-time web applications.

You should have some experience with JavaScript before tackling Node.js. But Nguyen says a “server-side engineer who uses another language such as PHP, Python, Ruby, Java, or .NET” can pick up enough JavaScript from his book to get a good feel for its syntax and idiosyncratic features.

What I like most about the book is how it  jumps right into developing a dynamic working Node.js application that you deploy to a production server. The project is a real-time stock market trading engine that streams live prices into a web browser. Along the way, you learn how to set up and use a NoSQL database (with MongoDB), you learn some functional programming techniques, and you work with Ajax, Express, Mocha, Socket.io, Backbone.js, Twitter Bootstrap, GitHub and Heroku.

The author covers a lot of ground, with clear code examples and good explanations, in just 154 pages. “The main goal of this book,” he notes, “is to transfer the skill set rather than the actual project into the real world. There is a narrow domain of ‘hard’ real-time applications such as a stock exchange where specialized software and hardware are required because microseconds count. However, there is a much larger number of ‘soft’ real-time applications such as Facebook, Twitter, and eBay where microseconds are of small consequence. This is Node.js’s speciality, and you’ll understand how to build these types of applications by the end of this book.”

Note: If you are a Windows user, you will have to install Cygwin before you can start using the Mocha testing framework on page 23. If you use Mac OS X, you will need to have the Xcode Command Line Tools installed. More information related to the book can be found at this SitePoint forum.

Si Dunn

Hadoop is hot! Three new how-to books for riding the Big Data elephant – #programming #bookreview

In the world of Big Data, Hadoop has become the hard-charging elephant in the room.

Its big-name users now span the alphabet and include such notables as Amazon, eBay, Facebook, Google, the New York Times, and Yahoo. Not bad for software named after a child’s toy elephant.

Computer systems that run Hadoop can store, process, and analyze large amounts of data that have been gathered up in many different formats from many different sources.

According to the Apache Software Foundation’s Hadoop website: “The Apache Hadoop software library is a framework that allows for the distributed processing of large data sets across clusters of computers using simple programming models. It is designed to scale up from single servers to thousands of machines, each offering local computation and storage.”

The (well-trained) user defines the Big Data problem that Hadoop will tackle. Then the software handles all aspects of the job completion, including spreading out the problem in small pieces to many different computers, or nodes, in the distributed system for more efficient processing. Hadoop also handles individual node failures, and collects and combines the calculated results from each node.

But you don’t need a collection of hundreds or thousands of computers to run Hadoop. You can learn it, write programs, and do some testing and debugging on a single Linux machine, Windows PC or Mac. The Open Source software can be downloaded here. (Do some research first. You may have use web searches to find detailed installation instructions for your specific system.)

Hadoop is open-source software that is often described as “a Java-based framework for large-scale data processing.” It has a lengthy learning curve that includes getting familiar with Java, if you don’t already know it.

But if you are now ready and eager to take on Hadoop, Packt Publishing recently has unveiled three excellent how-to books that can help you begin and extend your mastery: Hadoop Beginner’s Guide, Hadoop MapReduce Cookbook, and Hadoop Real-World Solutions Cookbook.

Short reviews of each are presented below.

Hadoop Beginner’s Guide
Garry Turkington
(Packt Publishing – paperback, Kindle)

Garry Turkington’s new book is a detailed, well-structured introduction to Hadoop. It covers everything from the software’s three modes–local standalone mode, pseudo-distributed mode, and fully distributed mode–to running basic jobs, developing simple and advanced MapReduce programs, maintaining clusters of computers, and working with Hive, MySQL, and other tools.

“The developer focuses on expressing the transformation between source and result data sets, and the Hadoop framework manages all aspects of job execution, parallelization, and coordination,” the author writes.

He calls this capability “possibly the most important aspect of Hadoop. The platform takes responsibility for every aspect of executing the processing across the data. After the user defines the key criteria for the job, everything else becomes the responsibility of the system.”

The 374-page book is written well and provides numerous code samples and illustrations. But it  has one drawback for some beginners who want to install and  use Hadoop.  Turkington offers step-by-step instructions for how to perform a Linux installation, specifically Ubuntu. However, he refers Windows and Mac users to an Apache site where there is insufficient how-to information. Web searches become necessary to find more installation details.

Hadoop MapReduce Cookbook
Srinath Perera and Thilina Gunarathne
(Packt Publishing – paperback, Kindle)

MapReduce “jobs” are an essential part of  how Hadoop is able to crunch huge chunks of Big Data.  The Hadoop MapReduce Cookbook offers “recipes for analyzing large and complex data sets with Hadoop MapReduce.”

MapReduce is a well-known programming model for processing large sets of data. Typically, MapReduce is used within clusters of computers that are configured to perform distributed computing.

In the “Map” portion of the process, a problem is split into many subtasks that are then assigned by a master computer to individual computers known as nodes. (Nodes also can have sub-nodes). During the “Reduce” part of the task, the master computer gathers up the processed data from the nodes, combines it and outputs a response to the problem that was posed to be solved. (MapReduce libraries are now available for many different computer languages, including Hadoop.)

“Hadoop is the most widely known and widely used implementation of the MapReduce paradigm,” the two authors note.

Their 284-page book initially shows how to run Hadoop in local mode, which “does not start any servers but does all the work within the same JVM [Java Virtual Machine]” on a standalone computer. Then, as you gain more experience with MapReduce and the Hadoop Distributed File System (HDFS), they guide you into using Hadoop in more complex, distributed-computing environments.

Echoing the Hadoop Beginner’s Guide, the authors explain how to install Hadoop on Linux machines only.

Hadoop Real-World Solutions Cookbook
Jonathan R. Owens, Jon Lentz and Brian Femiano
(Packt Publishing – paperback, Kindle)

The Hadoop Real-World Solutions Cookbook assumes you already have some experience with Hadoop. So it jumps straight into helping “developers become more comfortable with, and proficient at solving problems in, the Hadoop space.”

Its goal is to “teach readers how to build solutions using tools such as Apache Hive, Pig, MapReduce, Mahout, Giraph, HDFS, Accumulo, Redis, and Ganglia.”

The 299-page book is packed with code examples and short explanations that help solve specific types of problems. A few randomly selected problem headings:

  • “Using Apache Pig to filter bot traffic from web server logs.”
  • “Using the distributed cache in MapReduce.”
  • “Trim Outliers from the Audioscrobbler dataset using Pig and datafu.” 
  • “Designing a row key to store geographic events in Accumulo.”
  • “Enabling MapReduce jobs to skip bad records.”

The authors use a simple but effective strategy for presenting problems and solutions. First, the problem is clearly described. Then, under a “Getting Ready” heading, they spell out what you need to  solve the problem. That is followed by a “How to do it…” heading where each step is presented and supported by code examples. Then, paragraphs beneath a “How it works…” heading sum up and explain how the problem was solved. Finally, a “There’s more…” heading highlights more explanations and links to additional details.

If you are a Hadoop beginner, consider the first two books reviewed above. If you have some Hadoop experience, you likely can find some useful tips in book number three

Si Dunn

Getting Started with Mule Cloud Connect – To help sort out the chaos of Internet services – #bookreview

Getting Started with Mule Cloud Connect
Ryan Carter
(O’Reilly – paperback, Kindle)

In a digital world increasingly cluttered with Software-as-a-Service (SaaS) platforms, Open APIs, and social networks, complexity quickly can get out of hand.

“It all starts,” Ryan Carter writes in his new book, “with a simple API that publishes somebody’s status to Facebook, sends a Tweet, or updates a contact in Salesforce. As you start to integrate more and more of these external services with your applications, trying to identify the tasks that one might want to perform when you’re surrounded by SOAP, REST, JSON, XML, GETs, PUTs, POSTs, and DELETEs, can be a real challenge.”

Indeed. But never fear, Mule ESB can ride to your rescue and connect you quickly and easily to the cloud. At least, that’s the marketing claim.

Some truly big-name users, it should be noted, are adding credibility to Mule’s claimed capabilities and usefulness as an Open Source integration platform. They include Adobe, eBay, Hewlett-Packard, J.P. Morgan, T-Mobile, Ericsson, Southwest Airlines, and Nestle, to mention just a few.

Meanwhile, riding Mule to the cloud is the central focus of this compact (105 pages), well-written get-started guide. Its author, Ryan Carter, is both a specialist in integration and APIs and “an appointed Mule champion” who contributes regularly to the MuleSoft community.

“Mule,” Carter points out, “is an integration platform that allows developers to connect applications together quickly and easily, enabling them to exchange data regardless of the different technologies that the applications use. It is also at the core of CloudHub, an Integration Platform as a Service(IPaas). CloudHub allows you to integrate cross-cloud services, create new APIs on top of existing data sources, and integrate on-premise applications with cloud services.”

The book is structured so you start off by building a simple Mule application that will serve “as the base of our examples and introduce some core concepts for those unfamiliar with Mule.” Then Carter shows and illustrates how to “start taking advantage of Mule Cloud Connectors.” He includes numerous code examples, plus some screenshots and diagrams.

The book’s six chapters are:

  1. Getting Started
  2. Cloud Connectors
  3. OAuth Connectivity
  4. Configuration Management
  5. Real-Time Connectivity
  6. Custom Connectivity

Carter emphasizes: “Mule Cloud Connect offers a more maintainable way to work with APIs. Built on top of the Mule and CloudHub integration platforms, Cloud Connectors are service-specific clients that abstract away the complexities of transports and protocols. Many complex but common processes such as authorization and session management work without you having to write a single line of code. Although service-specific, Cloud Connectors all share a common and consistent interface to configure typical API tasks such as OAuth, WebHooks, and connection management. They remove the pain from working with multiple, individual client libraries.”

If Mule does not have a connector for a resource that you need, the book shows you how to create your own.

Getting Started with Mule Cloud Connect can get you started on a beneficial ride of  discovery, and it can take you onto the trail that leads to solutions.

– Si Dunn

Testing in Scala – How to Test First, Then Develop Effective Code – #programming #bookreview

Testing in Scala
Daniel Hinojosa
(O’Reilly – paperback, Kindle)

In test-driven development (TDD), a software developer first creates some specific tests that are intended to fail and then writes code that is good enough to pass the tests. After that, the code is refactored, improved to make it better and easier to maintain and extend.

A key goal of TDD is to reduce the time and costs required to develop software.

Daniel Hinojosa’s well-written Testing in Scala effectively introduces test-driven development basics to Scala newcomers, as well as to developers already familiar with Scala or other programming languages, including Java, Ruby or Python.

The scala-lang.org website describes Scala as “a general purpose programming language designed to express common programming patterns in a concise, elegant, and type-safe way. It smoothly integrates features of object-oriented and functional languages, enabling Java and other programmers to be more productive. Code sizes are typically reduced by a factor of two to three when compared to an equivalent Java application.”

Both TDD and Scala have been around for a number of years, but each is now gaining new traction with corporations, software companies, and individual developers seeking faster results at lower costs.

One big reason for Scala’s rising popularity, the Scala website proclaims, is Scala’s close ties to Java:

“Existing Java code and programmer skills are fully re-usable. Scala programs run on the Java VM, are byte code compatible with Java so you can make full use of existing Java libraries or existing application code. You can call Scala from Java and you can call Java from Scala; the integration is seamless. Moreover, you will be at home with familiar development tools, Eclipse, NetBeans or IntelliJ for example, all of which support Scala.”

The Spring Tool Suite also can support Scala using the Scala IDE for Eclipse, but there recently were a few “caveats” if you have the Java 7 JDK installed. Meanwhile, the Spring Scala project, announced last October, is underway.

The new book Testing in Scala is structured as six chapters that utilize different testing frameworks while an example application is tested and developed from scratch:

  1. Setup
  2. Structure and Configuration of Simple Build Tool (SBT)
  3. ScalaTest
  4. Spec2
  5. Mocking
  6. ScalaCheck

The book and its code examples, Hinojosa says, are “organized in a TDD fashion: test first, fail; test again, succeed maybe; test again, succeed, and so on.”

If you’ve never tried TDD, Testing in Scala may help you learn how to become a better, more efficient Scala developer.

It also can introduce you to a development style that you may be able to adapt quickly and effectively to other programming languages, as well.

Si Dunn

Introducing Erlang – A gentle, effective guide to a challenging programming language – #bookreview

Introducing Erlang
Simon St. Laurent
(O’Reilly – paperback, Kindle)

Erlang has come a long way since it began its odd life in the 1980s as a programming language for telephone switching systems, specifically Swedish-made, Ericsson telephone switching systems.

Today, the language and its Open Telecom Platform libraries are gaining new converts among serious practitioners of functional programming. Many of them likewise are drawn to the built-in support for concurrency, distribution and fault tolerance.

“The broad shift from single computers to networked and distributed systems of multiprocessor-based computing gives the Erlang environment a tremendous advantage over practically every other environment out there,” author Simon St. Laurent contends. “More and more of the computing world is starting to face exactly the challenges that Erlang was built to address.” Yet, as he concedes in his preface, “Erlang has long been a mysterious dark corner of the programming universe, visited mostly by developers who need extreme reliability or scalability and people who want to stretch their brains.”

Brain-stretching indeed is one reason why Erlang has stayed in that dark corner for more than two decades.

The language’s learning curve, St. Laurent notes, “starts gently for a while, then it gets much steeper as you realize the discipline involved, and then goes nearly vertical for a little while as you try to figure out how that discipline affects getting work done—and then it’s suddenly calm and peaceful with a gentle grade for a long time as you reapply what you’ve learned in different contexts.”

In a world where everything seemingly must be done in a hurry, you won’t learn Erlang in a hurry. But the payoff for learning it can be rewarding. Erlang, it seems, now is on a roll and experiencing growing demand. The language has been showing up in many different places, from Facebook to CouchDB to the Costa Rican Institute of Technology, to name just a few. Numerous package managers, such as Debian, MacPorts, and Ubuntu, also include a version of Erlang in their default installation.

I run Windows machines, and getting Erlang onto them has proved pleasingly easy. Indeed, Windows users apparently have some of the easiest times getting started with Erlang. Just go to http://erlang.org/download.html and click on the correct link – 32-bit or 64-bit – for your PC.

The book’s code samples can be downloaded from a link provided in the book. And it’s easy to work with the Erlang shell, its command-line interface. The newest version now provides numbered lines.

But, if you’ve worked with other programming languages, Erlang’s syntax likely will seem awkward and strange for a while.

“Punctuation is different and capitalization matters,” the author emphasizes. “Periods even get used as conclusions rather than connectors!”

To display the current working directory in the shell, for instance, you type pwd(). And do not forget to include the period.

To move up a directory, you type cd(“..”). And do not forget to include both the quotation marks and the concluding period.

Indeed, almost everything you enter in Erlang seemingly must end with a period.

Also: “Forget classes, forget variables that change values—even forget the conventions of variable assignment,” the author cautions. “Instead, you’re going to have to think about pattern matching, message passing, and establishing pathways for data rather than telling it where to go.”

Introducing Erlang takes a slow and gentle but effective approach to learning this powerful and difficult language. Simon St. Laurent spends a lot of time trying to help readers “get comfortable in the sunny meadows at the bottom of the learning curve.” Still, his well-written book effectively and efficiently meets its stated goal of helping you “learn to write simple Erlang programs.” It likewise shows and explains how to get started working with the OTP, the Open Telecom Platform’s libraries.

The book and its numerous code examples offer a solid grounding in the basics that you can then use to “understand why Erlang makes it easier to build resilient programs that can scale up or down with ease.” And, if you decide to continue learning, Simon St. Laurent’s new book can make it easier for you to move on to the really brain-stretching, and shadowy, inner workings of Erlang.

Si Dunn

Learn You Some Erlang for Great Good! – A hefty, humorous, wide-ranging how-to guide – #erlang #programming #bookreview

Learn You Some Erlang for Great Good!
Fred Hébert
(No Starch Press – paperback, Kindle)

Two decades ago, I worked for Swedish telecom giant Ericsson, grinding out software specifications, user manuals and other documentation. I was part of a small group in Texas that was supposed to help adapt Swedish-made computers and software to the American banking market.

The coders handled the programming, so I didn’t have to know much code, just how to describe and illustrate the features they were developing. I knew a little assembler, BASIC, and C. But often, the coders worked with what was then a weird-looking proprietary language: Ericcson Language, or Erlang.

For various marketplace reasons, the head Swede suddenly showed up one day, shut our group down, and sent us packing. That was the last time I saw or gave any thought to Erlang.

Until now.

Learn You Some Erlang for Great Good!, recently published by No Starch Press, is a fun yet serious “beginner’s guide” to Erlang. The proprietary language became an open-source language in 1998.

According to the official Erlang website: “Erlang is a programming language used to build massively scalable soft real-time systems with requirements on high availability. Some of its uses are in telecoms, banking, e-commerce, computer telephony and instant messaging. Erlang’s runtime system has built-in support for concurrency, distribution and fault tolerance.”

Erlang today has a cadre of fans and serious practitioners who use it to create a variety of applications. (CouchDB, for example, is written in Erlang.) And numerous big-name companies use Erlang in a variety of ways.

It is a  functional programming language that also supports concurrent programming, and it has a reputation for being difficult to learn, according to Joe Armstrong, who created the first version of Erlang in 1986. (Indeed, the print version of Fred Hébert’s thick new “beginner’s guide” spans 30 chapters and 595 pages, from “Hello, world” all the way to testing and distribution.)

“One of the biggest barriers to learning Erlang,” Armstrong writes in the book’s foreword, “is not so much that the ideas involved are intrinsically difficult but that they are very different from the ideas in most of the other languages that you will have encountered. To learn Erlang, you have to temporarily unlearn what you have learned in other programming languages. Variables do not vary. You’re not supposed to program defensively. Processes are really, really cheap, and you can have thousands of them, or even millions if you feel like it. Oh, and then there is the strange syntax. Erlang doesn’t look like Java; there are no methods or classes and no objects. And wait a minute…even the equals sign doesn’t mean ‘equals’–it means ‘match this pattern.’”

Fortunately, Fred Hébert’s new book is the perfect antidote to Erlang’s tough learning curve. Hébert, the “Erlang User of the Year 2012,”  delivers clear writing, good illustrations, humor, and plenty of short code samples in his well-structured chapters. His long experience as an Erlang programmer and instructor definitely shines through.

He concedes that, while Erlang “does some things very well,” it definitely is “no silver bullet and will be particularly bad at things like image and signal processing, operating system device drivers, and other functions.” However: “It will shine at things like large software for server use (for example, queue middleware, web servers, real-time bidding and distributed database implementations), doing some  lifting coupled with other languages, higher-level protocol implementation, and so on.”

At the same time, he urges coders to “not necessarily limit yourself to server software with Erlang. People have done unexpected and surprising things with it.”

Si Dunn

Learning Cocoa with Objective-C – An excellent how-to guide from two experts – #programming #bookreview

Learning Cocoa with Objective-C, 3rd Edition
Paris Buttfield-Addison and Jon Manning
(O’Reilly – paperback, Kindle)

 In some surveys, Objective-C is now the third most popular programming language, up from fifth place in 2011.

O’Reilly recently has published the awaited third edition of Learning Cocoa with Objective-C, with coverage of Xcode 4.2 and iOS 6.

The book’s two authors definitely know the Cocoa framework. They have been developing for it since the Mac first supported it. And their experience and expertise shine forth in this well-written, smoothly organized how-to guide.

They have, they note, “seen the ecosystem of Cocoa and Objective-C development evolve from a small programmer’s niche to one of the most important an d influential development environments in the world.”

Their 339-page, 20-chapter book assumes that you have some programming experience and at least know how to use an OS X and iOS device. Otherwise, it is a solid choice for learning Cocoa with Objective-C from the ground up. It offers clear descriptions and practical exercises, plus numerous code samples, screenshots and other illustrations.

Paris Buttfield-Addison’s and Jon Manning’s bottom-line goal, successfully met here, is to “give you the knowledge, confidence, and appreciation for iOS and OS X development with Cocoa, Cocoa Touch, and Objective-C.”

Si Dunn