Jiri Pik – RocketEdge.com https://jiripik.com The Next-Generation Strategist Sat, 20 May 2017 12:32:13 +0000 en-US hourly 1 https://wordpress.org/?v=4.7.5 https://cdn.jiripik.com/wp-content/uploads/2015/12/30143908/SiteIcon.png Jiri Pik – RocketEdge.com https://jiripik.com 32 32 93231625 PostSharp and Excel-DNA https://jiripik.com/2017/05/01/postsharp-excel-dna/ https://jiripik.com/2017/05/01/postsharp-excel-dna/#respond Mon, 01 May 2017 09:26:09 +0000 https://jiripik.com/?p=1789 Introduction Writing readable and concise source code is one of the key objectives of software development as majority of the total costs of ownership of a software solution is usually spent on code maintenance. Aspect Oriented Programming enables, inter alia, to reduce the amount...

The post PostSharp and Excel-DNA appeared first on Jiri Pik - RocketEdge.com.

]]>
Introduction

Writing readable and concise source code is one of the key objectives of software development as majority of the total costs of ownership of a software solution is usually spent on code maintenance.

Aspect Oriented Programming enables, inter alia, to reduce the amount of source code by unifying the logic for processing of inputs and outputs of class methods (cross-cutting concerns). These code fragments are called boundary aspects.

PostSharp is a leading .NET Aspect Oriented Programming library. Excel-DNA is a leading framework for development of .NET Excel Addons.

This article introduces some unusual applications of PostSharp within the Excel-DNA problem space: (1) a check whether the cell’s formula length is shorter than 255 characters and (2) an automatic resizing of a function result into a range formula. 

Without using PostSharp aspects, every single exposed Excel Function would have to repeat the same code implementing this logic resulting in a ballooned code base. With PostSharp, the code is brief, easy to read and easy to maintain.

PostSharp Versions

This article makes use only of the PostSharp’s Method Decorator which is already available in the free version of PostSharp. The full description of various PostSharp versions is available here.

Method Decorator Explanation

Method Decorator (PostSharp Documentation) specified as a method attribute injects into the method code before and/or after the method is run the code of the Decorator.

The before-method decorator, the OnEntry method, is run before the code of the actual method is executed and is ideally suited for checking whether the method can be run and whether the method parameters are sensible. If not, the decorator can halt the execution of the method and return a pre-defined value.

The after-method decorator, OnSuccess method, is run after the method succeeded without raising any exception and thus can be be utilized for transforming of the method return value into the target form.

Excel Background

Excel C API limits the length of the formula it can handle to 255 characters.

By default, the result of an Excel function fills up the size of the range where the formula is inserted. As the user must select the range of the right sizes, this may be bothersome. For that purpose, the ResultResizer does the job and resizes the output range to the right size.

Example

The source code of the example is available on https://github.com/jiripik/PostSharpExcelDNA

To test the code, build the code, and install the produced xll file into Excel. Then, insert a formula =TryMe() and see the magic!

The Aspect defines a before-method decorator, an on-exception decorator and an after-method decorator. The code is largely self-explanatory.

namespace PostSharpExcelDNA
{
    using ExcelDna.Integration;
    using PostSharp.Aspects;
    using System;
    [Serializable]
    internal class ResultResizerAspectAttribute : OnMethodBoundaryAspect
    {
        private const int ExcelFormulaMaxLength = 255;
        public sealed override void OnEntry(MethodExecutionArgs args)
        {
            var excelReference = XlCall.Excel(XlCall.xlfCaller) as ExcelReference;
            var excelFormula = GetFormula(excelReference);
            if (string.IsNullOrWhiteSpace(excelFormula))
            {
                args.ReturnValue = ExcelError.ExcelErrorNA;
                args.FlowBehavior = FlowBehavior.Return;
                return;
            }
            if (excelFormula.Length > ExcelFormulaMaxLength)
            {
                args.ReturnValue = "Formula too long - Excel supports formulas up to 255 characters";
                args.FlowBehavior = FlowBehavior.Return;
                return;
            }
        }
        public sealed override void OnSuccess(MethodExecutionArgs args)
        {
            if (args.ReturnValue != null && args.ReturnValue.Equals(ExcelError.ExcelErrorNA))
            {
                args.ReturnValue = ExcelError.ExcelErrorGettingData;
                return;
            }
            if (args.ReturnValue is string)
            {
                return;
            }
            ExcelResultResizer.ResizeAndAutoFormat(args.ReturnValue as object[,]);
        }
        public sealed override void OnException(MethodExecutionArgs args)
        {
            args.ReturnValue = args.Exception.Message;
            args.FlowBehavior = FlowBehavior.Return;
        }
        private static string GetFormula(ExcelReference excelReference)
        {
            try
            {
                return (string)XlCall.Excel(XlCall.xlfGetCell, 41, excelReference);
            }
            catch
            {
                return string.Empty;
            }
        }
    }
}

In order to use the Aspect, just decorate the function with the attribute [ResultResizerAspect].

namespace PostSharpExcelDNA
{
    using System;
    using ExcelDna.Integration;
    public class ExcelFunctions : IExcelAddIn 
    {
        [ExcelFunction(IsMacroType = true)]
        [ResultResizerAspect]
        public static object TryMe(object parameter)
        {
            return ExcelAsyncUtil.Run("TryMe",
                new[] { parameter },
                () =>
                {
                    try
                    {
                        const int n = 100;
                        var res = new object[n, n];
                        for (var i = 0; i < n; ++i)
                        {
                            for (var j = 0; j < n; ++j)
                            {
                                res[i, j] = string.Format("{0}, {1}", i, j);
                            }
                        }
                        return res;
                    }
                    catch (Exception exception)
                    {
                        return exception.Message;
                    }
                });
        }
        public void AutoOpen()
        {
        }
        public void AutoClose()
        {
        }
    }
}

Comments on the Example

  1. Split up the aspect into two aspects – it may be logically sensible to separate the code for checking of the length of the formula from the code for re-sizing of the result
  2. The auto-resize code fails for nested asynchronous excel functions

General Comments

  1. Excellent performance – there is no noticeable penalty for using PostSharp aspects
  2. The more the aspect is used, the greater the benefits of the aspect
  3. Do not overuse aspects – aspects, like any other tool, are suitable for certain kind of problems but not very much useful for other ones. Know their limitations
  4. Other typical uses of aspects include logging, caching, license and security management

References

The post PostSharp and Excel-DNA appeared first on Jiri Pik - RocketEdge.com.

]]>
https://jiripik.com/2017/05/01/postsharp-excel-dna/feed/ 0 1789
“The Crazy Ones” https://jiripik.com/2017/04/17/the-crazy-ones/ https://jiripik.com/2017/04/17/the-crazy-ones/#respond Mon, 17 Apr 2017 07:31:29 +0000 https://jiripik.com/?p=1889 Source: Etsy – Posterama

The post “The Crazy Ones” appeared first on Jiri Pik - RocketEdge.com.

]]>

Source: Etsy – Posterama

The post “The Crazy Ones” appeared first on Jiri Pik - RocketEdge.com.

]]>
https://jiripik.com/2017/04/17/the-crazy-ones/feed/ 0 1889
How to use Advanced Installer for an Excel-DNA Project https://jiripik.com/2017/02/25/use-advanced-installer-excel-dna-project/ https://jiripik.com/2017/02/25/use-advanced-installer-excel-dna-project/#respond Sat, 25 Feb 2017 14:22:14 +0000 https://jiripik.com/?p=1676 1. Introduction Excel-DNA is a game-changing solution for development of XLL Excel add-ons in C# without VSTO abstracting away majority of the C++ implementation details. While a simple XLL add-on requires no registration or installation, the more advanced XLL add-ons...

The post How to use Advanced Installer for an Excel-DNA Project appeared first on Jiri Pik - RocketEdge.com.

]]>
1. Introduction

Excel-DNA is a game-changing solution for development of XLL Excel add-ons in C# without VSTO abstracting away majority of the C++ implementation details.

While a simple XLL add-on requires no registration or installation, the more advanced XLL add-ons with rich UI components demand an installer for setting up the environment.

Advanced Installer is an installer enabling you to deliver professional installers with minimum effort. I have been using it for a number of years with full satisfaction.

2. The Importance of Distributing a MS Excel Add-on with an Installer

For small projects, Excel-DNA provides an elegant way of distributing the output add-ons by packing all required DLLs into one big XLL file (one for 32-bit and one for 64-bit version of MS Excel).

The XLL file(s) can then be just copied on the target computer and opened directly in Excel without manual modifications of any system registry or other changes.

Once the add-on becomes larger and once the number of DLL libraries it depends on increases, this approach becomes not optimal because:

  1. Ballooning of the total distribution file sizes due to the inclusion of packed identical DLLs in both the 32- and 64 bit XLL versions. Each Excel add-on needs to be distributed in both 32- and 64- bit versions and packing all libraries into the XLL files requires all the libraries to be packed in both 32- and the 64-bit version XLLs, effectively distributing of each DLL library twice. This becomes an issue once the Excel-DNA addon depends on complex UI components with typical sizes of tens of megabytes. Then it may become advantageous NOT to pack all the libraries into the output XLL files.
  2. Inability to pack native unmanaged DLLs with Excel-DNA packer. Once the Excel add-on starts depending on some native unmanaged optimized library, e.g. a numeric math one or SQLite one, the distribution requires to distribute separately a 32-bit and a 64-bit version of the native unmanaged optimized libraries. Excel-DNA packer doesn’t offer this feature and the solution has to be distributed as an XLL file with a couple of DLL copied alongside.
  3. Inability to pack effectively the database and other files. Though it’s possible to pack database and other required files as resources in an Excel-DNA addon and then unpack at runtime, this solution is not optimal since this increases your code base (have as little code as possible!) and since there is a performance cost for this. Separate distribution is much preferred.
  4. Install every time Excel opens. Though it’s possible to install an Excel-DNA add-on using AutoLoad method, so that the user would have to just launch an Excel-DNA XLL file in Windows Explorer or in a similar way, such a method is not recommended as it increases the initialization time of launching Excel and is a pure waste of time – why should the add-on be installed (or checked if it’s installed) each time you launch Excel? Thus, automatic installation of the add-on only once is a better way.
  5. Not Supported Auto-Updates. Excel-DNA packer doesn’t provide any native method of auto-updating of the add-ons. A solution which provides auto-updates is then much welcome.
  6. Manual Management of Installation. Since all you need to do is to manually copy the XLL files, you have to take care of all folder operations which may be inconvenient, at best. A one-stop Installer does the job much more elegantly.
  7. No support for Pre-Requisites. The more and more advanced the add-on gets, the longer and longer the list of the frameworks it depends on gets. Apart from crashing or possibly an error message, Excel-DNA has no way to check or even to remedy the situations, such as that the required .NET version is not present or that you do not have the right libraries installed. Most installer solutions do provide a way to check the pre-requisites and to download and install automatically the missing components.

3. Why Advanced Installer

While there are a number of commercial (e.g. InstallShield) and public source installers (e.g. WIX – check this link for an Excel-DNA example) available, I sincerely believe that Advanced Installer stands out for the following reasons:

  1. It’s forward looking in provided functionality – not many installers offer, for example, a native Auto-Update support
  2. It’s easy to set up and to use – you can set up a professionally looking Installer in just minutes in a very intuitive UI
  3. It has excellent support – you get answers to you all your questions within a few hours
  4. It’s much cheaper than competitive solutions

4. The Editions of Advanced Installer

Advanced Installer is provided in a number of editions (see the comparison), starting with the Free Edition which is suitable for basic setups.

This tutorial describes the Advanced Installer Professional Edition.

5. Step-By-Step Instructions for Creating Advanced Installer Project for an Excel-DNA Solution

For an Excel-DNA add-on, I recommend creating two projects – one for the installer itself and one for the auto-updater.

The output of the Installer project is an EXE (or an MSI) file. The output of the Auto-Updater is a TXT file which contains the updates definition – this file is then being polled every day by your application to see if there has been an update.

The set-up is straightforward.

5.1 The Installer Project

Fire up Advanced Installer, choose the Professional Template …

Click to create a project …

Set up the project definitions – Name etc. – …

Specify the URL of the txt file generated by the Auto-Updater …

Set up the pre-requisites for the Product, e.g. the .NET 4.5 and what to do if it’s missing – here the installer packs the Web (very small) .NET 4.5 installer to the installation file …

Install only if Excel is installed …

Specify the target file hierarchy – what files and directories to copy to the installation target directory …

Choose the Installer Theme …

Set up conditions to find out whether the target computer is running Office 32- or 64-bits …

Carry out pre- and post-installation custom actions. These actions are shared among uninstallation, installation and maintenance so make sure that you tick off the right checkboxes for your actions.

For all uninstallation, installation and maintenance, first, detect if there is an Excel open, warn the user that it will be closed, close the Excel …

Now, let’s install the add-on – different procedure for 32- and 64- bits as the XLL files are named differently …

And finally, kill all open Excels, just in case …

Now, you’re able to Build the Installation EXE file …

Notes:

  1. For more complex scenarios, I recommend creating a separate EXE program installing and uninstalling the XLL into / from the System Registry
  2. Advanced Installer also offers you to sign the resulting installation file with a digital signature
  3. It is also possible to set up the installer so that the resulting installation file is a MSI or a light installer which downloads the current version from the Internet

5.2 The Updater Project

Open a new Advanced Installer Project …

Click on the Update button which asks you for the path to the EXE of the installer created in the previous subchapter and specify the version details …

Specify the description of the changes in the update …

And finally, add to your C# solution a call to the “updater.exe /silent” on start and your updater is up and running!

For the details on the Updater, please, refer to the Advanced Installer’s Updater Documentation

The post How to use Advanced Installer for an Excel-DNA Project appeared first on Jiri Pik - RocketEdge.com.

]]>
https://jiripik.com/2017/02/25/use-advanced-installer-excel-dna-project/feed/ 0 1676
Optimal Database Architecture for Super-Fast Access to Historical Currency Market Data in MySQL https://jiripik.com/2017/02/04/optimal-database-architecture-super-fast-access-historical-currency-market-data-mysql/ https://jiripik.com/2017/02/04/optimal-database-architecture-super-fast-access-historical-currency-market-data-mysql/#respond Sat, 04 Feb 2017 14:01:48 +0000 https://jiripik.com/?p=1319 Introduction The optimal database architecture depends on the structure of the data, the number of the records to be stored, their intended updates (if any), the typical queries and their frequency, and the database engine itself. Each database engine is...

The post Optimal Database Architecture for Super-Fast Access to Historical Currency Market Data in MySQL appeared first on Jiri Pik - RocketEdge.com.

]]>
Introduction

The optimal database architecture depends on the structure of the data, the number of the records to be stored, their intended updates (if any), the typical queries and their frequency, and the database engine itself.

Each database engine is optimized differently and thus, for example, the best architecture for MS SQL Server would be different from the most suitable architecture for MySQL.

For a small amount of data, there is virtually no difference between a naive and the smartest architecture. The more data you store, the more pronounced the performance differences will be.

This article describes the optimal database architecture for super-fast access to historical currency market data for about 40k currency pairs in MySQL at the time of writing of this blog post.

Relational -vs- NoSQL representation of Financial Data

All timeseries financial data is fixed-structured (date, seriesId, value) and SQL databases are best suited for handling them because

  1. SQL Query Language – no matter how well you handle the import process, you will always encounter situations where you need to verify particular value or find values within a range or so. Without SQL language, you would spend extraordinary amount of time manually coding the queries
  2. Faster Processing – fixed structure of the data allows for optimization of the persisted data and unless you always require retrieval of all records, your filtering of the data (e.g. a time window – retrieve all values of the exchange rate between Jan 1 and Jan 10), allows for a quicker retrieval
  3. Existence of Well-Established Tools and SDKs – for all major SQL database engines, there are tons of professional tools – e.g. backup tools, reporting tools, version control tools, clients – which dramatically lower the total costs of ownership. For majority of NoSQL databases, there just a few such solutions.

AWS MySQL RDS vs AWS S3 for Historical Currency Data Persistence

AWS S3 (in a way a NoSql database) is a dramatically cheaper alternative for storing historical currency data in AWS than an AWS RDS MySQL.

The key differences are these:

Parameter AWS RDS MySQL AWS S3
Access Latency A guaranteed max latency, with some data coming from in-memory caches Access time is random, though usually very fast
Locking for Updates Certain locking mechanisms for update of the data None
Granularity of Access Row data access File access
Query Language A general SQL-like query language None
Costs Thousands of USD per year Tens of USD per year

Thus, for high-performance data access, MySQL is the best solution.

For batch processing with very infrequent single-threaded updates, and low performance requirements, AWS S3 provides the best results.The optimal S3 file content would then be a zipped protobuffer file since the less data you transfer, the quicker it is (thus the zip compression) and since protobuffer is one of the most efficient serialization protocols available nowadays.

The text below focuses on high-performance MySQL representation of the historical currency data.

MySQL

MySQL, an open-source database management system, is the 2nd most frequently used database engine in the world:

An optimized version of MySQL became AWS Aurora, or Percona Server for MySQL and also MariaDB.

The fact that MySQL has zero license costs turned the database engine into an attractive back-end for small hedge funds or financial traders.

MySQL Key Performance Facts

  • Primary Key – The rows in the database tables are physically organized in the ascending order of the primary key. So, the primary key is a synonym for a clustered index. Thus, you do not need an index on the primary key.
  • Table Partitioning – MySQL implementation of table partitioning is not as advanced (e.g. one cannot have a foreign key on a partitioned table) as the partitioning of any commercial database engine, like Oracle, and I do not recommend using it. Rather, partition manually like the text below suggests.

Typical Historical Currency Data Database Operations

The typical operations on a historical currency data database are:

  1. INSERT new rows
  2. UPDATE old values
  3. SELECT values on a given date, or max/min value over a period

Usually, DELETE operation would be very rare.

Typical Historical Currency Data Structure

The typical fields sets is

  1. DATE of the data
  2. NAME of the currency pair, e.g. USDCHF
  3. VALUE (double) of the currency exchange rate
  4. LAST_UPDATED_IN_UTC – timestamp where the value has been most recently updated

Initial Theoretically-Sound Solution

The recommended textbook architecture would be as follows – autonumber primary keys with partitioning by currency pairs:

CREATE TABLE CurrencyPairs
(
CurrencyPair_ID INT AUTO_INCREMENT NOT NULL,
FromCcy char(3) not null,
ToCcy char(3) not null,
PRIMARY KEY (CurrencyPair_ID)
);

ALTER TABLE CurrencyPairs
ADD INDEX IND_CurrencyPairs_FromToCcy (FromCcy, ToCcy);

CREATE TABLE CurrencyPairsHistory
(
CurrencyPairsHistory_ID INT AUTO_INCREMENT NOT NULL,
Date Date not null,
CurrencyPair_ID int not null,
LowPrice decimal(24,10) null,
HighPrice decimal(24,10) null,
ClosePrice decimal(24,10) null,
LastUpdatedInUtc timestamp null,
PRIMARY KEY (CurrencyPairsHistory_ID,CurrencyPair_ID)) PARTITION BY HASH(CurrencyPair_ID);

ALTER TABLE CurrencyPairsHistory
ADD INDEX IND_CurrencyPairsHistory_CurrencyPair_ID (CurrencyPair_ID);

ALTER TABLE CurrencyPairsHistory
ADD INDEX IND_CurrencyPairsHistory_DateCurrencyPair_ID (`Date`, CurrencyPair_ID);

This architecture is not optimal because

  1. Poor retrieval times – it took up to a few seconds to retrieve 10 years of history for a given currency pair (i.e. in total the number of rows was 365.25 * 10)
  2. Huge Indices – the data for about 40k currency pairs and 10 years of history requires approx. 2 GB of table space with 8 GB huge indices
  3. Enormous Index Rebuilds – Each time there is an insert of a new data point, the indices have to be rebuilt making the entire MySQL unresponsive

In other words, storing all data in one big table, rather than a number of smaller tables, leads to a very few very huge files with significant times necessary for updates.

The Optimal Solution

The final solution which delivers the entire time series, or any of its subsets, in milliseconds is this:

  • One values table per currency pair – For each currency pair, we have one table with the Date being the primary key -> choosing the currency pair leads to the choice of the right table (we have about 40k tables!), and Date being the primary key making searches ultra-fast
  • Prepopulation of the tables with null values for every single day since Jan 1, 1999 till Jan 1, 2018 – Each table is pre-populated with blank rows with null value for every single day since Jan 1, 1999 till Jan 1, 2018 (a year from now) which eliminates the time and resources expensive index rebuilds and when a new value arrives, the corresponding row is simply updated (without triggering an index rebuild)

For top performance, modify the MySQL table_open_cache parameter:

table_open_cache=50000

Sample creation code for the currency paid CHF/USD (there would be about 40k tables of the same structure, one table per currency pair):

CREATE TABLE CHFUSD
(
Date Date not null,
LowPrice decimal(24,10) null,
HighPrice decimal(24,10) null,
ClosePrice decimal(24,10) null,
LastUpdatedInUtc timestamp null,
PRIMARY KEY (Date))

Recommended MySQL Clients

Opening a database connection to the above architected database in MySQL Workbench or Navicat for MySQL would take tens of minutes since those clients download the list of all database tables first.

The better MySQL clients are Toad DataPoint (commercial) or Toad for MySQL (free) which are far more powerful and provide instantaneous access to such databases.

The post Optimal Database Architecture for Super-Fast Access to Historical Currency Market Data in MySQL appeared first on Jiri Pik - RocketEdge.com.

]]>
https://jiripik.com/2017/02/04/optimal-database-architecture-super-fast-access-historical-currency-market-data-mysql/feed/ 0 1319
Best Practices for Spam Handling in MS Outlook and MS Office 365 (Junk Email) https://jiripik.com/2017/01/28/best-practices-spam-handling-ms-outlook-ms-office-365-junk-email/ https://jiripik.com/2017/01/28/best-practices-spam-handling-ms-outlook-ms-office-365-junk-email/#respond Sat, 28 Jan 2017 10:08:03 +0000 https://jiripik.com/?p=1598 Introduction Your professional success and personal happiness depends on your ability to handle enormous amount of new information, much of it coming via e-mail newsletters. The more e-mail newsletters you’re subscribed to, the larger chance there is that your e-mail...

The post Best Practices for Spam Handling in MS Outlook and MS Office 365 (Junk Email) appeared first on Jiri Pik - RocketEdge.com.

]]>
Introduction

Your professional success and personal happiness depends on your ability to handle enormous amount of new information, much of it coming via e-mail newsletters. The more e-mail newsletters you’re subscribed to, the larger chance there is that your e-mail address ends up on a mailing list of some spammer.

There is nothing worse than your cell phone beeping with a new message alert triggered by a spam message!

I personally receive 1000-5000 spam e-mails every day and using the below described methodology I can handle all of them in a few secs per day.

While there are number of various anti-spam solutions available (e.g. Spam Assassin, Norton Anti-Spam, Postini), most of which I have tried and all of which failed, the only solution which actually works for Jiri is a very simple setting of white-listing only trusted domains.

This approach requires minor tweaks this article outlines.

Microsoft Outlook and Microsoft Office 365

I have been using Microsoft Outlook for almost 20 years and have found no real alternative because

  • its ability to set up Message Rules is principal in helping me focus on the most important emails by filing the less important messages to less frequently monitored folders
  • its ability to save related emails into folders enables me to look up the entire relevant histories within a second without having to figure out some complex search queries
  • its calendar and task lists are top of the class.

Microsoft Office 365 is then the best Exchange hosting I have found with truly exceptional complimentary support (you get a call on any new support case within an hour of creating it). In addition to the support, it has the best global connectivity and reliability I am aware of.

Spam Handling in MS Outlook

MS Outlook provides the support for spam handling via the Junk’s Ribbon dropdown:

Clicking on the dropdown’s Junk E-mail Options displays the settings dialog

The problem with all options for email protection it offers apart from the last one (“No Automatic Filtering”, “Low”, “High”) is that they depend on algorithms of various quality to determine if an e-mail looks like a spam e-mail or not.

The writers of spam e-mails obviously know MS Outlook so are able to tweak their spam campaigns so that the Outlook won’t label them as spam, making these options not really useful.

The only option I found to be working is the “Safe Lists Only”.

Junk Email Options: Protection = “Safe Lists Only”

Selecting this option requires you to manually white-list domains of the legitimate senders which will take you a few minutes in the first week and then you just enjoy your inbox spam free.

The workflow is as follows – MS Outlook delivers the unknown domain email into Junk Email Folder, you right click and select “Never Block Sender’s Domain”:

The setting is then uploaded onto MS Office 365’s server and the emails from that domain will never end up in the Junk Email Folder. You can then move the message to the actual destination folder.

You should also enable white-listing of all your Outlook contacts and white-listing of all the contacts to whom you send a message:

Junk Email Folder Processing

If you look at a typical Junk Email folder contents,

you see that the spam messages are usually received multiple times, so that you can quickly select and delete.

Known Caveats

1. MailChimp Mailing Lists

Many of the largest newsletters are using MailChimp as their Email Service Provider (ESP). MailChimp, unlike most other ESPs, sets the FROM email address to be an email address of one their thousands sending servers, thus making white-listing of the domains virtually impossible

Nevertheless, MailChimp generously shared their sending domains with me (download them from here), so you can manually import them into your Junk Email Options’s Safe Senders List

2. Freshly Whitelisted Domain Emails Return Back to Junk

White listing a sender’s domain can take 30 secs to propagate to the MS Office 365 servers, so if you white list the domain and then move the item directly to Inbox, it can return back to the Junk Email folder.

Rather, you should move the email to the destination, non-Inbox, folder, or wait a few secs for the white-listing to finish.

3. Reset of the Safe Senders Domains List

Once in a while, the Safe Senders Domains List can get corrupted and you may encounter duplication of emails etc.

In such a scenario, the best course of action is to export all Safe Senders Domains List into a text file, delete all the entire list in MS Outlook, close MS Outlook, wait a minute, start MS Outlook and re-import the Safe Senders Domains List.

4. Blocking of Spam Email Addresses

Blocking of Spam Email Addresses usually does not work since the spam senders change their identities all the time.

However, if you happen to find the pattern, the best solution for black-listing of a domain is via MS Office 365 portal – this way, the email is blocked directly by the Office 365 server before the Outlook’s Junk Lists are ever considered resulting in a higher email throughput.

The post Best Practices for Spam Handling in MS Outlook and MS Office 365 (Junk Email) appeared first on Jiri Pik - RocketEdge.com.

]]>
https://jiripik.com/2017/01/28/best-practices-spam-handling-ms-outlook-ms-office-365-junk-email/feed/ 0 1598
How to run Ultra-Fast WordPress on Http/2 with ALPN, WP-Rocket and AWS CloudFront on AWS and RHEL https://jiripik.com/2017/01/15/run-ultra-fast-wordpress-http2-alpn-wp-rocket-aws-cloudfront-aws-rhel/ https://jiripik.com/2017/01/15/run-ultra-fast-wordpress-http2-alpn-wp-rocket-aws-cloudfront-aws-rhel/#respond Sun, 15 Jan 2017 14:15:16 +0000 https://jiripik.com/?p=1538 Introduction A website is a mirror of his/her owner. If one’s website is too slow, maybe the owner does not care about pushing the limits in all his/her other endeavors. The steps below outline the instructions how to set up...

The post How to run Ultra-Fast WordPress on Http/2 with ALPN, WP-Rocket and AWS CloudFront on AWS and RHEL appeared first on Jiri Pik - RocketEdge.com.

]]>
Introduction

A website is a mirror of his/her owner. If one’s website is too slow, maybe the owner does not care about pushing the limits in all his/her other endeavors.

The steps below outline the instructions how to set up the one of the fastest possible WordPress installations at the moment.

Disclaimers

  • Neither AWS, nor RedHat does provide any support for these installation steps. If you require support, contact Jiri to discuss his availability.
  • These instructions are a result of years of experience, extensive web research and countless conversations with various brilliant people. Their help is much appreciated.
  • The packages discussed below are cutting-edge, and they are not yet part of RedHat Enterprise Linux (RHEL) or AWS Linux. If you prefer, you can download them already built from either Remi’s Repo or Webtatic provided you trust these repositories. For production environments, I strongly advise against that due to a chance of trojan horses etc. being included in the built versions.

Target Infrastructure

I build all my systems on AWS because I found their level of service unmatched by services of any other cloud provider.

I use RedHat Enterprise Linux because

  • it’s well supported
  • it’s a stabilized version of Fedora Linux and some time ahead of the default AWS Linux
  • I can easily test the installation steps on a local dev machine with VMWare Workstation’s RHEL image with snapshots which I found to be the most effective ways of fine-tuning production systems

The below instructions should apply with minor modifications to other Linux versions.

Http/2

Http/2 is a performance boosting update to the 1999’s http 1.1 protocol used for all web traffic.

In a nutshell, it utilizes only a single multiplexed connection to the server (opening of a connection channel takes most of the web page loading time), it’s binary, it prioritizes the order of resources being delivered, and pushes to the client pro-actively the resources it may request in the future.

It’s already supported by majority of web browsers – at the time of writing this article in January 2017 it was 78%.


Thus, by your website not supporting the protocol, your audience spends unnecessarily more time on its loading, and in consequence being less satisfied.

OpenSSL, Apache, PHP Setup

1. OpenSSL

sudo yum update -y
sudo su
# Enable RedHat Repositories
cp /etc/yum.repos.d/redhat-rhui.repo /home/ec2-user
vi /etc/yum.repos.d/redhat-rhui.repo

Change enabled=0 to enabled=1

[rhui-REGION-rhel-server-rhscl]
name=Red Hat Enterprise Linux Server 7 RHSCL (RPMs)
mirrorlist=https://rhui2-cds01.REGION.aws.ce.redhat.com/pulp/mirror/content/dist/rhel/rhui/server/7/$releasever/$basearch/rhscl/1/os
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
sslverify=1
sslclientkey=/etc/pki/rhui/content-rhel7.key
sslclientcert=/etc/pki/rhui/product/content-rhel7.crt
sslcacert=/etc/pki/rhui/cdn.redhat.com-chain.crt
# Install pre-requisites
yum install -y mc mlocate at wget links perl gcc  
yum groupinstall &quot;Development Tools&quot; -y
yum install -y autoreconf automake autoconf pcre-devel openssl-devel git wget mlocate 
# Upgrade OpenSSL
cd /usr/local/src
wget https://www.openssl.org/source/openssl-1.0.2-latest.tar.gz
tar -zxvf openssl-1.0.2-latest.tar.gz
cd openssl-1.0.2j
./config --prefix=/usr --openssldir=/usr/local/openssl shared
make
make test
make install

2. Apache

# Install nghttp2
cd /usr/local/src
git clone https://github.com/nghttp2/nghttp2
cd nghttp2
git submodule update --init
autoreconf -i
automake
autoconf
./configure
make
make install

# Install Apache
cd /usr/local/src/
wget http://www-us.apache.org/dist//httpd/httpd-2.4.25.tar.gz
tar -zxvf httpd-2.4.25.tar.gz 
cd httpd-2.4.25
cd srclib
wget http://www-us.apache.org/dist//apr/apr-1.5.2.tar.gz
tar xvf apr-1.5.2.tar.gz 
mv apr-1.5.2 apr
wget http://www-us.apache.org/dist//apr/apr-util-1.5.4.tar.gz
tar xvf apr-util-1.5.4.tar.gz 
mv apr-util-1.5.4 apr-util
cd /usr/local/src/httpd-2.4.25
./configure --prefix=/opt/httpd --enable-http2 --with-nghttp2=/usr/local/lib  --enable-so
make 
make install

cp /opt/httpd/conf/httpd.conf  /home/ec2-user
vi /opt/httpd/conf/httpd.conf

Uncomment these lines

LoadModule http2_module modules/mod_http2.so
LoadModule ssl_module modules/mod_ssl.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
Include conf/extra/httpd-ssl.conf

Add these lines

Add:
&lt;IfModule http2_module&gt;
    LogLevel http2:info
&lt;/IfModule&gt;

Protocols http/1.1 h2 h2c 

Change Override None to Override All

cp /opt/httpd/conf/extra/httpd-ssl.conf  /home/ec2-user
vi /opt/httpd/conf/extra/httpd-ssl.conf

Change these values for these parameters:

  • ServerName
  • ServerAdmin

Uncomment the parameter SSLCertificateChainFile.

Upload the SSL certificates to the appropriate locations

SSLCertificateFile &quot;/opt/httpd/conf/server.crt&quot;
SSLCertificateKeyFile &quot;/opt/httpd/conf/server.key&quot;
SSLCertificateChainFile &quot;/opt/httpd/conf/server-ca.crt&quot;

Restore permissions

restorecon -RvF /opt/httpd/conf

Reboot and log back in.

sudo su
/opt/httpd/bin/apachectl -k start

Got the error:
httpd: Syntax error on line 133 of /opt/httpd/conf/httpd.conf: Cannot load modules/mod_http2.so into server: libnghttp2.so.14: cannot open shared object file: No such file or directory

Fix that problem with the following

cd /etc/ld.so.conf.d/
echo /usr/local/lib &gt; http2-lib.conf
rm /etc/ld.so.cache
/sbin/ldconfig
 
/opt/httpd/bin/apachectl -k start

Check all apache config is fine

/opt/httpd/bin/apachectl configtest

Set up auto-start of Apache

touch /etc/init.d/apache2
chmod 755 /etc/init.d/apache2
vi /etc/init.d/apache2 

Paste there this text:

#!/bin/bash
#
# apache2        Startup script for the Apache HTTP Server
#
# chkconfig: 3 85 15
# description: Apache is a World Wide Web server.  It is used to serve \
#              HTML files and CGI.
 
/opt/httpd/bin/apachectl $@

Run

chkconfig --add apache2
chkconfig --list apache2 

Set up permissions for www

sudo groupadd www
sudo usermod -a -G www ec2-user
sudo chown -R root:www /opt/httpd/htdocs
sudo chmod 2777 -R /opt/httpd/htdocs

Reboot to see if the Apache was started automatically

3. PHP

sudo su
yum install -y perl libxml2-devel curl-devel libpng-devel
cd /usr/local/src
wget http://php.net/get/php-7.1.0.tar.gz/from/this/mirror
mv mirror php-7.1.0.tar.gz
tar -zxvf php-7.1.0.tar.gz
cd php-7.1.0
./configure --enable-bcmath --enable-mbstring --with-gd  --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --includedir=/usr/include --prefix=/opt/php71 --with-apxs2=/opt/httpd/bin/apxs  --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-curl --with-zlib --enable-zip
make 
make test
make install
 
vi /opt/httpd/conf/httpd.conf

Uncomment

LoadModule php7_module modules/libphp7.so

Add

&lt;FilesMatch \.php$&gt;
    SetHandler application/x-httpd-php
&lt;/FilesMatch&gt;
 
&lt;FilesMatch &quot;\.phps$&quot;&gt;
    SetHandler application/x-httpd-php-source
&lt;/FilesMatch&gt;

Set up PHP’s settings

vi /etc/php.ini

Paste there this text

; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 2048M
 
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 200M
post_max_size = 200M

log_errors=true
error_log=/opt/httpd/logs/php-errors.log

Install ImageMagick

sudo yum install ImageMagick
cp /etc/ImageMagick/policy.xml  /home/ec2-user
vi /etc/ImageMagick/policy.xml

Add there these policies, if they are not already present

  &lt;policy domain=&quot;coder&quot; rights=&quot;none&quot; pattern=&quot;EPHEMERAL&quot; /&gt;
  &lt;policy domain=&quot;coder&quot; rights=&quot;none&quot; pattern=&quot;URL&quot; /&gt;
  &lt;policy domain=&quot;coder&quot; rights=&quot;none&quot; pattern=&quot;HTTPS&quot; /&gt;
  &lt;policy domain=&quot;coder&quot; rights=&quot;none&quot; pattern=&quot;MVG&quot; /&gt;
  &lt;policy domain=&quot;coder&quot; rights=&quot;none&quot; pattern=&quot;MSL&quot; /&gt;
  &lt;policy domain=&quot;coder&quot; rights=&quot;none&quot; pattern=&quot;TEXT&quot; /&gt;
  &lt;policy domain=&quot;coder&quot; rights=&quot;none&quot; pattern=&quot;SHOW&quot; /&gt;
  &lt;policy domain=&quot;coder&quot; rights=&quot;none&quot; pattern=&quot;WIN&quot; /&gt;
  &lt;policy domain=&quot;coder&quot; rights=&quot;none&quot; pattern=&quot;PLT&quot; /&gt;

Reboot and restore the original WordPress site from BackupBuddy.

4. Final Check

Go to https://tools.keycdn.com/http2-test and check your website does run on Http/2 with ALPN:

WordPress Setup

I highly recommend the below two WordPress plugins for enhanced WordPress performance.

In addition, I strongly recommend manual running of the WordPress’s Cron.

sudo crontab -e
* * * * * /usr/bin/php /opt/httpd/htdocs/wp-cron.php &gt;/dev/null 2&gt;&amp;1

1. WP-Offload

WP-Offload is a WordPress Plugin uploading all media (images, videos and others) into an AWS S3 bucket which is then mapped onto an AWS CloudFront distribution serving as a super-fast CDN.

Recommendation: Do enable Http/2 on the AWS CloudFront Distribution.

2. WP-Rocket

WP-Rocket is one of the best page caching / pre-loading plugins available.

It minifies CSS, JS files, offers lazy loading of images or video, and stores pre-generated html pages in a cache so that whenever the web server receives a page request, it can be served without the server having to build it from its MySQL representation.

And above all, it’s exceptionally well supported.

The post How to run Ultra-Fast WordPress on Http/2 with ALPN, WP-Rocket and AWS CloudFront on AWS and RHEL appeared first on Jiri Pik - RocketEdge.com.

]]>
https://jiripik.com/2017/01/15/run-ultra-fast-wordpress-http2-alpn-wp-rocket-aws-cloudfront-aws-rhel/feed/ 0 1538
Zig Ziglar – Inspiration 365 Days a Year https://jiripik.com/2017/01/01/zig-ziglar-inspiration-365-days-year/ https://jiripik.com/2017/01/01/zig-ziglar-inspiration-365-days-year/#respond Sun, 01 Jan 2017 11:47:09 +0000 https://jiripik.com/?p=1489 Inspirational Quotes by Zig Ziglar.

The post Zig Ziglar – Inspiration 365 Days a Year appeared first on Jiri Pik - RocketEdge.com.

]]>

The post Zig Ziglar – Inspiration 365 Days a Year appeared first on Jiri Pik - RocketEdge.com.

]]>
https://jiripik.com/2017/01/01/zig-ziglar-inspiration-365-days-year/feed/ 0 1489
When it comes to Peak Performance, it’s About the Bike https://jiripik.com/2016/12/11/peak-performance-bike/ https://jiripik.com/2016/12/11/peak-performance-bike/#respond Sun, 11 Dec 2016 10:46:02 +0000 https://jiripik.com/?p=1125 The post When it comes to Peak Performance, it’s About the Bike appeared first on Jiri Pik - RocketEdge.com.

]]>

Introduction

While for some products the difference in the user experience between the top-priced models and the middle-priced models is tiny, for stationary bikes it’s not the case.

It’s about the bike.

“It’s not about the bike.”
Lance Armstrong

Why Wattbike is Special

Wattbike is one of the most expensive stationary bikes available in Switzerland at the moment (about 4000 USD), and despite that, I consider its purchase to be one of the best investments I have ever made.

Having used other stationary bikes daily for over 20 years, the primary reasons why I love the bike are

  1. it’s extremely stable – it simply does not shake no matter how you sit on it
  2. the biking is exceptionally smooth – the other bikes squeeze, have fits etc
  3. the biking is most motivating – it’s captivating display motivates one to improve his biking style
  4. the bike is ultra-high tech – Ant+ connectivity to your Garmin Watches / Garmin Connect, plus Bluetooth connectivity to your iPhone / Android with a special iPhone / Android app
  5. and most importantly, it’s impossibly easy to reach and to maintain the heart rates over 140 bps associated with the mental state of increased creativity, with your emotional feelings of happiness or love,  and of course, with your improved physical health. On a daily basis, my Garmin Watches are exploding with “Performance Condition Deteriorated” with a Recovery time of at least 26 hours. And I have never felt this good afterwards with great ideas flowing “directly from God”. Read the Wattbike’s explanation of training zones.

The Link Between your Heart Health and your Emotions

Recent HeartMath studies define a critical link between the heart and brain. The heart is in a constant two-way dialogue with the brain — our emotions change the signals the brain sends to the heart and the heart responds in complex ways.
….
Conversely, HeartMath’s research shows that when we experience heart-felt emotions like love, care, appreciation and compassion, the heart produces a very different rhythm. In this case it is a smooth pattern that looks like gently rolling hills. Harmonious heart rhythms, which reflect positive emotions, are considered to be indicators of cardiovascular efficiency and nervous system balance. This lets the brain know that the heart feels good and often creates a gentle warm feeling in the area of the heart. Learning to shift out of stressful emotional reactions to these heartfelt emotions can have profound positive effects on the cardiovascular system and on our overall health. It is easy to see how our heart and emotions are linked and how we can shift our heart into a more efficient state by monitoring its rhythms.

Institute of HeartMath

The Link Between Regular Exercise and Creativity

A new study in the journal Frontiers in Human Neuroscience shows that regular exercisers do better on tests of creativity than their more sedentary peers. Specifically, researchers noted that regular exercise seems to be associated with improved divergent and convergent thinking, which are considered the two components of creative thinking; the former involves thinking of multiple solutions for one problem, while the latter involves thinking of one solution for a problem.

-The Huffington Post

Wattbike Models

There are two Wattbike models – Trainer (Power Range 0-2000 W) and Pro (Power Range 0-3760 W).

My dealer advised that I should go for the Trainer which was immediately one of the reasons for going for the Pro – I do not appreciate people underestimating my goals.

More importantly, I took the test which has shown that I am suitable for both models.

Wattbike Console

The bike’s console is one of the key motivators of the bike – persistently showing you how to improve your pedaling techniques.

Watch this video:

Fitness Data Analysis

Apart from the Ant+ connectivity allowing automatic exports of the fitness data to Garmin Connect, the native Wattbike Hub app exports data into the Wattbike Hub portal with enhanced analysis or Strava.

The post When it comes to Peak Performance, it’s About the Bike appeared first on Jiri Pik - RocketEdge.com.

]]>
https://jiripik.com/2016/12/11/peak-performance-bike/feed/ 0 1125
Hiking / Biking / Skiing Vacation in St. Moritz (Swiss Alps), Switzerland while staying with Kempinski Grand Hotel des Bains https://jiripik.com/2016/12/06/hiking-biking-skiing-vacation-st-moritz-swiss-alps-switzerland-staying-kempinski-grand-hotel-des-bains/ https://jiripik.com/2016/12/06/hiking-biking-skiing-vacation-st-moritz-swiss-alps-switzerland-staying-kempinski-grand-hotel-des-bains/#respond Tue, 06 Dec 2016 09:55:37 +0000 https://jiripik.com/?p=1123 St. Moritz (Swiss Alps), Switzerland, is one of my most favorite vacation / escape destinations for its geographical expanse – for example, Zermatt lies in a substantially narrower valley its serenity – absolute quietness on the mountain peaks its natural...

The post Hiking / Biking / Skiing Vacation in St. Moritz (Swiss Alps), Switzerland while staying with Kempinski Grand Hotel des Bains appeared first on Jiri Pik - RocketEdge.com.

]]>
St.Moritz

St. Moritz (Swiss Alps), Switzerland, is one of my most favorite vacation / escape destinations for

  1. its geographical expanse – for example, Zermatt lies in a substantially narrower valley
  2. its serenity – absolute quietness on the mountain peaks
  3. its natural beauty
  4. and its quality of experiences – there is no better way to sense an achievement and to get the right perspective on life than from looking down a 3km high mountain one’s just climbed upon.

This article originated in outlining over and over to my overseas friends/clients how to get in and how to make most of their stay there.

Ingredients of a Perfect Vacation

I firmly believe that the quality of one’s vacations depends directly on the richness of the experiences during the vacation – purely lying on a beach bathing in sun will certainly be less memorable than diving into an ocean while searching for a treasure hunt.

The best experiences are then, in my view:

  • trips especially those where your heart rate jumps above 140 bps
  • trips with the latest gadgets with magic powers
  • finally, the fun is usually multiplied by the number of people around you sharing your values and your sense of humor

How to Get In

Citizens of many countries can enter Switzerland without a visa – check conditions and app website.

The best way is to arrive by plane to the Zurich International Airport and then take a train to St. Moritz (~3:40 hours) via Zurich Hauptbahnhof (HB) and Chur.
St Moritz - Zurich Airport → St. Moritz

Tips

  1. For the segment Chur → St. Moritz, upgrade your ticket to the panorama the Glacier Express – the easiest way is at the railway station’s ticket counterst-moritz-glacier-express
  2. Buy the train ticket via the SBB iPhone / Android app (at least for the return journey)
  3. If you intend to come to Switzerland frequently, get a SwissPass. Even for a one-time stay in Switzerland, travel cheaply 1st class with SuperSaver tickets. For example, with SwissPass and a SuperSaver ticket you can get 1st class ticket Zurich → St. Moritz for about 30 USD

Where To Stay

St. Moritz - Kempinski Grand Hotel Des Bains

I highly recommend staying in Kempinski Grand Hotel des Bains, one of the best hotels I have ever stayed in. The hotel is actually not located directly in St. Moritz, but in St Moritz Bad (10 mins from St. Moritz train station by a bus) which makes it a more suitable starting point for all summer and winter sports. The hotel’s extremely spacious, the food is excellent, its spa with an indoor swimming pool has no competition, and unlike other hotels, they have an activity concierge for the summer and a ski school for the winter.

When booking your stay, you should optimize the dates of your vacation for the days off seasonal peaks and then the prices are not that bad at all. Start with the “Special offers“, some of which include a sweet complimentary upgrade upon availability – another reason for optimizing the dates.

The hotel price includes a complimentary pick-up from the train station, and as of 3 nights, an unlimited Engadin pass for all cablecars, busses, trains and in the winter ski lifts in the entire Engadin.

True, one can stay elsewhere in St. Moritz for half the price, however, that stay would not be that grand and that memorable.

Activity Concierge

The activity concierge is one of the best assets of the hotel.

In the summer, he personally designed for me everyday’s iteneraries (GPX files) taking into account the weather condition, my level of hiking / biking skills, the memorability of the trips, and the beauty of the destinations.

Some of his tips include hiking above the clouds, or before the dawn so that when the sun rises, you have unforgettable views of the scenery.

St. Moritz - Walking above the clouds

I would have never come up with the iteneraries he suggested and would have missed so much!

What to Pack for Both a Summer and a Winter Stay

Recommended Item Recommended Brands
Action Camera GoPro Hero 5 Black with accessories 3-Way, Seeker, Strap and plenty of spare batteries and microSD cards
GPS Mapping Garmin Montana 680t with maps from Topo Schweiz V4 Pro, Swiss TransAlpin V4 Pro, SchweizMobil, Outdoor Active, Open Alps Map, OpenMaps
Extra USB Battery Pack XQisit Power Bank 20800 mAh
Small Drone for Photography Aerix VIDIUS HD
360 Degrees Camera Ricoh Theta S
Whistle Ultimate Survival Technologies Marine JetScream Floating Whistle
Head Flashlight Petzl Tikka
Waterproof bags aLoksak Waterproof Cases
Suncream +50
Sun Glasses Oakley SLIVER™ Polarized

What to Pack for a Summer Stay

Recommended Item Recommended Brands
Walking Poles LEKI Micro Vario Carbon Trekking
Bike Helmet Lazer
Waterproof and Windproof Trousers and Jacket HAGLÖFS or The North Face
Waterproof Trekking Shoes HAGLÖFS ROC ICON GT Men
Warm Underwear X-Bionic
Cap

 

What to Pack for a Winter Stay

Recommended Item Recommended Brands
Goggles Oakley Airwave (Hyperdrive White, Fire Iridium) – watch this video
Skiing Backpack Ortovox FREE RIDER 26
Boots
Helmet Giro AVANCE MIPS
Waterproof and Windproof Trousers and Jacket Kjus or Spyder
Warm Underwear X-Bionic
Gloves
Ski Socks
Second layer

 

What To Do in the Summer

St Moritz Upper Engadin Valley

When staying with Kempinski, the best is to ask the activity concierge for his recommendations. For me he helped organized paragliding, biking and hiking. His menu of activities also includes horse riding, archery, fishing, canoeing, sailing and actually anything imaginable.

His hiking recommendations for me are best described by the GPX maps of the actual hikes taken below:

St. Moritz Hiking Map

One of the most remarkable hikes was a trip along the glacier close to the Boval Hut – see the GPX file of the hike.

For biking, one can rent the bike close to the Kempinski Hotel at Suvretta Sports, at best reserve before. Check out TrailForks for biking ideas.

Check out the excellent Engadin’s mountain bike map:

St.-Moritz-Biking

 

While hiking / biking around I recommend drinking a lot of water which reduces the high altitude dizziness. I found the best lunch bag to be a few GU Energy Chews for they are very light for a backpack, and (with some imagination) tasty.

And for any sport, check the Engadin’s Topo Map.

What To Do in the Winter

Ski Alpin
Signing up for a quick ski-refresher may be beneficial since the instructors can provide advice on best slopes and on off-piste skiing and since he can provide you with avalanche bags should it be needed.

Travelling with skis can be bothersome, so I recommend renting both skis and poles at Ski Service Corvatch.

General overview of the skiing in Engadin:
St.-Moritz-Ski-Catalog

Review the Engadin’s ski slope map:
St.-Moritz-Ski-Slopes

Apart from skiing, or cross-country skiing, one can also snowshoe.

Check out the Ski Slope Report and the recommendations at WeLove2Ski.

Weather

The Weather in St. Moritz or in Switzerland in general is very hard to forecast due to the high mountains and lakes.

In my experience, the most reliable forecasts are provided by the Weather Channel (see its iPhone app). For the snow overview, I recommend the iPhone app Swiss Snow.

I do not recommend wearing T-Shirts and shorts unless your skin is accustomed to the Alpine sun exposure. In the summer, I had a T-Shirt and shorts on my first day of hiking and I got so incredibly burnt that I had to be fully covered afterwards.

Recommended Links

The post Hiking / Biking / Skiing Vacation in St. Moritz (Swiss Alps), Switzerland while staying with Kempinski Grand Hotel des Bains appeared first on Jiri Pik - RocketEdge.com.

]]>
https://jiripik.com/2016/12/06/hiking-biking-skiing-vacation-st-moritz-swiss-alps-switzerland-staying-kempinski-grand-hotel-des-bains/feed/ 0 1123
7Twelve(R) Portfolio designed by Craig L. Israelsen in Spearian For Excel https://jiripik.com/2016/06/25/7twelver-portfolio-designed-craig-l-israelsen-spearian-excel/ https://jiripik.com/2016/06/25/7twelver-portfolio-designed-craig-l-israelsen-spearian-excel/#respond Sat, 25 Jun 2016 16:24:02 +0000 https://jiripik.com/?p=907 Spearian For Excel offers an intuitive access to the construction of 7Twelve®Portfolios designed by Craig L. Israelsen, multi-assets portfolios with weights designed to maximize long-term performance at reduced risk. See the Spearian’s Documentation.    

The post 7Twelve(R) Portfolio designed by Craig L. Israelsen in Spearian For Excel appeared first on Jiri Pik - RocketEdge.com.

]]>
Spearian For Excel offers an intuitive access to the construction of 7Twelve®Portfolios designed by Craig L. Israelsen, multi-assets portfolios with weights designed to maximize long-term performance at reduced risk. See the Spearian’s Documentation.

 

20050619 7TwelveIntro

20150619 7TwelveStacked

 

20150619-The-7Twelve-Portfolio

The post 7Twelve(R) Portfolio designed by Craig L. Israelsen in Spearian For Excel appeared first on Jiri Pik - RocketEdge.com.

]]>
https://jiripik.com/2016/06/25/7twelver-portfolio-designed-craig-l-israelsen-spearian-excel/feed/ 0 907