Thursday, June 23, 2016

Azure!... god bless you!!!

Although I have some experience with Microsoft Azure, I do sometimes have difficulty articulating what is is and what is does. I think one of the best explanations I've heard come from Bob Tabor of Microsoft. He explains that "Microsoft Azure allows you to perform virtually any compute or data storage operation by provisioning and scaling the necessary resources on demand and a pay-as-you-go basis". Sounds simple, don't it? 

So I present the cloud computing stack.

Infrastructure as a Service (IaaS). With IaaS you manage everything that runs within the OS, and your cloud provider handles the rest: the physical management of the servers, taking care of storage and the network, virtualization, backup power, etc

Platform as a Service (PaaS) With the OS, the middleware and the runtime are now also managed by the cloud provider, so you can focus mainly on how to build your application and where to put the data. 

Software as a Service (SaaS). This is where you simply want to use some software without having to worry about anything else. 

You can also mix and match the different levels of service, depending on how much control you want to maintain. So to explain this I once again reference an explanation from someone much smarter than me (but not as good looking), Scott Hanselman. The different levels of "control" can be compared to the differences between  owning a home, renting a room (or a home) or renting a hotel room.



So what would be the advantages of employing such a solution?


Thursday, June 2, 2016

Back It Up Mister !!!

 I have a number of computers throughout my house (embarrassed to say how many) and all important files need to be copied to my main server which uploads it to the internet for archiving. This can be quite tedious doing this manually especially when you may have multiple copies of a file on different computers as well as the possibility that an existing copy may already be on the backup server or even on the archive server (internet). So I have been using xcopy which has been working fine but I have the use Task Manager to kick off the process (.bat file). Enter RoboCopy which has many of the same switches (parameters) that xcopy has but it can be scheduled, unlike xcopy which needs another process to kick it off. It also copies more file properties than xcopy. Also has logging options.
Usage:
robocopy <Source> <Destination> [<File>[ ...]] [<Options>]

<Source> Specifies the path to the source directory.
<Destination> Specifies the path to the destination directory.
<File> Specifies the file or files to be copied. You can use wildcard characters (* or ?)
<Options> Specifies options to be used with the robocopy command.

Some of the important switches (options):
/S :: copy Subdirectories, but not empty ones.
/E :: copy subdirectories, including Empty ones.
/MOV :: MOVe files (delete from source after copying).
/MOVE :: MOVE files AND dirs (delete from source after copying).
/xo Excludes older files (to exclude files that are older than those they're being copied over)

Scheduling
/rh:hhmm-hhmm Specifies run times when new copies may be started.

Logging
/log:<LogFile> Writes the status output to the log file (overwrites the existing log file).
/log+:<LogFile> Writes the status output to the log file (appends the output to the existing log file).
/l Specifies that files are to be listed only (and not copied, deleted, or time stamped).

A complete list can be found at
https://technet.microsoft.com/en-us/library/cc733145(v=ws.11).aspx
or
http://burpee.smccme.edu/studenthowtos/robocopy.htm


FileSystemWatcher Class DRAFT!!! NOT COMPLETE!!!

Occasionally you may have a folder (network, local, ftp, etc) where you want to be alerted when a file is received or changed so that you may act on it (processes it, email it, archive it). This can ba done with the FileSystemWatcher Class. It "Listens to the file system change notifications and raises event when directory or a file in a directory is changed ". It works on directories or sub-directories on a local, drive, network drive or remote computer. To watch for changes in all files, set the Filter property to an empty string ("") or use wildcards ("*.*"). To watch a specific file, set the Filter property to the file name. For example, to watch for changes in the file MyDoc.txt, set the Filter property to "MyDoc.txt". You can also watch for changes in a certain type of file. For example, to watch for changes in text files, set the Filter property to "*.txt".

See example below: Notice the timestamp on the file "TestFile.txt" in the folder "C:\TestFolder" below.


Nothing to do with C # (I said "MOSTLY")

If you are a true geek like I am, you will enjoy this book. Mnay years ago, Andy Hertzfeld created a blog at www.folklore.org and chronicled his experiences on the development of the Macintosh (yuk). He invited other member of the team to do likewise and some of those stories are compiled in this book "Revolution in The Valley: The Insanely Great Story of How the Mac Was Made" (with a forward by Steve Wozniak). It gets a bit technical at times for the average observer, but as has been said by Kings and Queens, I am not the average observer :)


To All Pirates - Arrrrgh (R) to the rescue !!!

R is a programming language and software environment for statistical computing and graphics supported by the R Foundation for Statistical Computing. The R language is widely used among statisticians and data miners for developing statistical software and data analysis.
Okay that's from Wikipedia, here it is in English. R was traditionally used for predictive and statistical analysis (basically stats and related graphs). If you were in financial services it was a handy tool to have. NOW it is being used for Big Data Analysis, so even more so. Some of the terms may sound intimidating (Vectors which is a list or array and Matrices which are like multi-dimensional arrays) but it's easy to learn.

https://www.codeschool.com (requires registration) has a web tutorial where you can type code right into the browser and have it executed. The examples are easy to follow and fun.



Once you're seaworthy (yes, everything is about pirates) you can download an R-GUI for Windows, Linux or Mac (yuk) at https://cloud.r-project.org 



or Microsoft has R Tools for Visual Studio if you prefer that IDE.