How to declare constructor parameters when extending a Scala class

This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 4.10, “How to handle constructor parameters when extending a Scala class.”


You want to extend a base Scala class, and need to work with the constructor parameters declared in the base class, as well as new parameters in the subclass.

How to extend MacBook Pro battery life, part 2

As a quick follow up to my previous article on how to extend MacBook battery life, I just tested my MacBook Pro battery life today, and I got almost 2.5 hours out of today's battery charge(!).

Following my own MacBook battery advice, when I sat down to work I shut down Firefox and turned off the wireless networking. After that I went to work as normal, typing into a text editor for 2.5 hours straight.