Tag Archive for 'programming'

Try blocks in R for error handling

R scripts halt execution when an error is encountered.  When batch processing this produces situations where the error can not be merely skipped like it could in a .net application with  user involvement. To use Try() blocks for error handling in R, enclose the entire block of code in a try() block.

try({
# Do some stuff here
png(filename=args[3], width=900, height=300)
# some more code here...
dev.off()
})

Linux tips and Microsoft DevOps

Best Practices for the Linux and Application Admins – Great article with mistakes and the lessons learned, Running a program as root on startup [creating a service for use with systemd] – excellent discussion on creating services.  Keeping SSH access secure – Basic analysis on dealing with SSH worms that try many username and password combinations. This page on Microsoft’s DevOps for bots has a lot of useful resources such as telemetry, testing, dashboards, and source examples related to bots and smart agents.