Thursday, August 29, 2013

my new "mobile NAS": Synology DS112+

DS112+ Products - Synology Inc. Network Attached Storage

Installation procedure from CD-ROM:
  • you are starting with a DiskStation with a bare disk, i.e. no DSM (the DS Management system)
  • mount the supplied CD-ROM
  • mount DSAssistant-SYNOLOGY_….dmg from the CD-ROM
  • run the assistant App from there
  • the assistant App helps you installing the DSM, either from a  DSM_DS112+_….pat file (around 40 MB large) on the CD-ROM (it comes with DSM-4.1) or from a file you download from the Synology website (bleeding edge: DSM-4.3)
  • that includes formatting the hard disk
Installation procedure following following the quick set up leaflet:
  • surf to
  • it is meant to discover all reachable Synology DiskStations
  • in this situation it does not find the DiskStation in question (running a DSM)
  • it points you to DSAssistant-SYNOLOGY_….dmg, to be downloaded from the Synology website
  • mount the downloaded DSAssistant-SYNOLOGY_….dmg
  • run the assistant App from there
Because I had temporary trouble accessing the supplied CD-ROM, I had to download the DSAssistant…, but I used the DSM-4.1 on the CD-ROM. That decision was unreasonable and done a little too fast, as I seriously intended to operate using DSM-4.3. So in the meantime I downloaded DSM-4.3, and after having set up DSM-4.1 entirely and properly, I set up DSM-4.3.

Further steps:
  • setting up a personal user account
  • allowing SSH access
  • SSH log-in in using the root account
  • modifying /etc/passwd to allow shell login for the user accounts in question (the resp. record has a "nologin" instead of a proper shell path)
Further steps:
  • I followed the instructions listed in my own "my new NAS (…): Synology DS213+" (taken from somewhere else and my own experience)
  • install the ipkg installation system
  • install a proper rsync through ipkg; I will have to call this rsync as /opt/bin/rsync from now on
  • "standard standard" installation is broken for the DS112+, but the wiki page describes the actual standard procedure including a fix in some
  • commenting out the standard PATH setting in ~root/.profile and ~MY_ACCOUNT/.profile
  • my first personal rsync-s to the DiskStation

Friday, August 23, 2013

O'Reilly Media book: Learning R

Learning R:
If you do any kind of data analysis, you need R in your toolkit. This book teaches you how to be productive with this important programming language for statistics by covering everything about R you need to know, including data gathering, transformation, visualization, modelling, and publishing.

Rocky Nook book: Testing Cloud Services
Everybody is confronted with cloud computing. Whether you are a user, designer, programmer, project manager, or tester, sooner or later the cloud affects your work. If you are involved in selecting or implementing services from the cloud, or in keeping them up and running, this book will prove to be an invaluable resource.

Testing Cloud Services covers an extensive list of risks that arise when implementing cloud computing, including some traditional risks and some completely new ones, and provides strategies for avoiding these risks and solving problems. Every risk is connected to existing, updated, and new test measures. It is necessary to start testing during the selection of cloud services, and continue end-to-end testing even after going live, as continuity risks arise all the time.

O'Reilly Media book: Git Pocket Guide

Git Pocket Guide:
This pocket guide is the perfect on-the-job companion to Git, the distributed version control system. It provides a compact, readable introduction to Git for new users, as well as a reference to common commands and procedures for those of you with Git experience.

SitePoint book: Jump Start Rails

Jump Start Rails:
Jump Start Rails provides you with a fun and yet practical introduction to Rails, an incredibly popular framework that makes it possible to quickly develop incredibly powerful web applications with Ruby. This short book covers Rails 4, the latest version of the framework, and while it's not intended to be a completely comprehensive Rails guide or an in-depth Ruby tutorial, it will quickly get you up to speed with Rails and give you the confidence to start experimenting on your own.

The book is built around a real-life example project: a personal portfolio site. It's a fun and easily understandable project that is used to demonstrate the concepts outlined in the book in a practical way.

This is a clear, approachable and very easy-to-follow book that will get you to to speed with Rails in no time.

O'Reilly Media book: Mastering Perl, 2nd edition

Supercharge your Perl knowledge with advanced concepts to make coding easier, maintenance simpler, and execution faster. It’s possible with this thoroughly updated edition of Mastering Perl, the third in O’Reilly’s series of landmark Perl tutorials.

O'Reilly Media book: Oracle Essentials, 5th edition

Oracle Essentials:
Written by experienced Oracle insiders, this easy-to-read volume covers every aspect of the Oracle database for readers of all technical levels. The book includes information on Oracle's product line, architecture, data structures, networking, concurrency, tuning and more.

brian d foy's book "Mastering Perl": New to “Modules as Programs” (AKA Modulinos)

In the end you will find a [link] to the entire new respective chapter.

New to “Modules as Programs”:
I (that refers to brian foy) keep wanting to name this chapter “Modulinos”, but that doesn’t mean much to someone who doesn’t have that idea yet, so I leave it as is.
For awhile, I’ve wanted to reduce the modulino idea to a single statement, perhaps a use statement:
use Modulino;
I think I’ve got most of the way there with Modulino::Base, which I’ve included in my update to the chapter. It was an interesting journey though. I didn’t want to inherit from it because it’s not really that sort of relationship. I could add it as a role or trait, but I didn’t want to deal with complication surrounding that. I settled on a require because the code needs to run after the compile phase when all of the methods are already compiled. That was true of the code that was already controlling that behavior:
__PACKAGE__->run(@ARGV) unless caller;
Moving all of the code into another file (and using subroutines) messed with caller a bit. Now I had to look back a couple of levels to see what was going on. That seems simple now that I’ve figured it out, but on the way I loaded Modulino::Base in many ways and looked at caller going two levels back to convince myself I was doing the right thing. As with most coding problems, the other weird things I was trying to do had clouded the problems and simplifying the module solved it.
The danger with any code written specifically for a book is that it hasn’t been used widely and its problems haven’t appeared. I know they are there. Not only that, once the book is done, the author tends to stop supporting the code. I certainly plan that because I think the idea is simple enough that no one should use a module for it. That is, no one should create an external dependency to get something so simple.
I’ve also expanded the modulino idea. Previously, it was about running as a program or loading as a module. However, we can do other things based on any condition. The module can run as a test script. Modulino::Base looks for methods that start with _test_ and runs them as subtests if CPANTEST is set to a true value. I stole that idea from Python, although it doesn’t seem to be as popular as it was when I learned that language.
Beyond that, I experimented with having a module file be a template for its own documentation. Using some switch to say I wanted to read the docs, it ran Pod::Perldoc on itself, making modifications to the Pod along the way, such as automatically inserting the right package name. I like that idea and I think there’s more behind it, but it’s not something I want to delay the book for.
You can check out this chapter in O’Reilly Atlas.

Wednesday, August 21, 2013

The Pragmatic Bookshelf: Seven Web Frameworks in Seven Weeks

The Pragmatic Bookshelf | Seven Web Frameworks in Seven Weeks

reading a growing file in perl

  • How do I read a file which is constantly updating? (Stack Overflow) [link]
  • How can I read from continuously updated file in Perl? (Stack Overflow) [link]
  • File::Tail (or one of its sisters) is your friend (preferred!)
  • use this (together with sleep(...)) for getting EOF reset: seek(LOG, 0, 1) (if you must stay with vanilla perl)
Wrote my 1st script making use of File::Tail today, a "main log file" referring to short other log files. Now I read all of them using File::Tail. Looks good and rather versatile.