• My Workout Routine after 10 years of iteration

    Skip to My Current workout Routine

    It's been about 10 years since I first joined a gym.
    Since then, I've been constantly iterating on my workout routines, and believe I have reached an optimized version for my goal. I'd like to share this process. Starting with the goals.

    Fitness Goals

    What were my goals?
    Well, back then I was pretty skinny, and was suffering from backaches (tall people problems).
    I never wanted to be super buffed. Rather just fit, flexible, and pain-free.
    • Muscle Mass (though nothing bulky)
    • Strong Core (for the backaches)
    • Cardio Stamina
    • Flexibility
    So now that the goals were established, I've received my first program from my fitness guide.
    Basically there were a few general rules.
    • 3 Times a Week - 3 workouts a week, with 1 day of rest between each workout.
    • 3 Sets, 12 Repetitions - Most exercises need to have 12 repetitions of 3 sets.
      The weight has to be heavy enough so that you can barely finish, but light enough so that you do the exercises properly.
    • Abs on every workout - There's an Ab Crunch machine at the gym, do a 3X12 every workout.
    • Cardio at the end - After every workout, 30 minutes on the treadmill (at 10-12 kmh speed).
    • Stretch - 5-10 minutes of stretching at the end of the cardio.
    Now for the schedule:

    1st Fitness Routine

    DayMuscle Group 1Muscle Group 2Muscle Group 3AdditionsEstimated Time
    Monday
    Chest, Back, and Biceps
    Chest
    3 X 12 Chest Press Machine
    3 X 12 Chest Fly Machine
    Back
    3 X 12 Lat Pulldown Machine
    3 X 12 Rowing Machine
    3 X 12 Back Extension Machine (lower back)
    Biceps
    3 X 10 Curls (free weights)
    3 X 10 Hammers (free weights)
    Cardio + Abs
    3 X 12 Ab Machine
    30 Minute Cardio
    3 Hours
    Wednesday
    Legs, Shoulders, and Triceps
    Legs
    3 X 12 Hack Squat Machine
    3 X 12 Leg Extension Machine
    3 X 12 Leg Curl Machine
    Shoulders
    3 X 12 Shoulder Press Machine
    3 X 12 Front Raise (free weights)
    Triceps
    3 X 12 Triceps Pushdown (rope extension)
    3 X 12 Overhead Triceps Extension
    Cardio + Abs
    3 X 12 Ab Machine
    30 Minute Cardio
    3 Hours
    Friday
    Chest, Back, and Biceps
    Chest
    3 X 12 Chest Press Machine
    3 X 12 Chest Fly Machine
    Back
    3 X 12 Lat Pulldown Machine
    3 X 12 Rowing Machine
    3 X 12 Back Extension Machine (lower back)
    Biceps
    3 X 10 Curls (free weights)
    3 X 10 Hammers (free weights)
    Cardio + Abs
    3 X 12 Ab Machine
    30 Minute Cardio
    3 Hours
    I did this workout routine for about 4 years, it's a great total body workout.
    Eventually though, it had some issues/limitations:
    • Flexibility & Core - it still felt like my core wasn't getting a lot of attention, especially because I was sitting down to use the machines for most of the workout.
      My general movement felt fairly restricted, I tried increasing streching time but that produced limited results.
    • Time - As I got busier, spending 9 hours a week on working out seemed like less and less of an option.
    • Gym - going with an extra pair of shoes (and clothing), in the heavy european winter... The entire thing seemed more and more like an ordeal to me.

    2nd Fitness Routine - P90X

    So while doing some research back in 2013, I found out about an exercise program called P90X.
    It looked pretty promising so I decided to give it a try, following it as closely as possible to the program.
    DayExercise NameAdditionsEstimated Time
    MondayChest, Shoulders, and Triceps
    More info
    Ab Ripper X
    More info
    1.25 Hours (1 hour & 15 minutes)
    TuesdayCardio X
    More info
    0.75 Hours (45 minutes)
    WednesdayBack and Biceps
    More info
    Ab Ripper X
    1.16 Hours (1 hour & 10 minutes)
    ThursdayCardio X
    0.75 Hours (45 minutes)
    FridayLegs and Back
    More info
    Ab Ripper X
    1.28 Hours (1 hour & 17 minutes)
    The immediate thing I've noticed is improvement in posture. This is certainly due to the Core Muscles getting a hit every single weekday. The other major bonus is that workout time dropped to 5 Hours and 12 Minutes!

    Minimum equipment for P90X

    I've been using 2 items of equipment for my entire P90X schedule:
    • Replacing the Pull Up bar
      Installing a Pull Up bar in a rented flat is not easy.
      Some contracts don't allow you to do such modifications, and some ceilings are just not high enough to allow for a standard Pull Up. After some experimentation, I've opted for:
      V3Tec Expander
      This clever little device allows for up to 100KG (!!) resistance.
      It is very adjustable, simply by removing a band, you reduce the resistance by 20KG.
      Instead of doing Pull Ups, I use the Expander for rowing, thereby working on the same muscle groups.
    • Using Bands
      Instead of weights which are heavy, bulky, and hard to carry around while traveling,
      I've been using Exercise Bands. There are sets that can give you nearly 80KG of resistance!
      I highly recommend shopping around for these. I had a few bands that ripped. Eventually I found the right set, which I've been using for well over 3 years now.

    Custom Abs Workout

    After iterating on the Abs routine, I've made a customized routine that just works better, while being a few minutes shorter. It's a combination of 8 Minute Abs (with Winsor Pilates) + P90 Ab Ripper (not the P90X one).
    If you cut them down enough, you get 13 Minutes of Ab workout (3 minutes less than Ab Ripper X).

    My Final Workout Routine

    I suppose I should call it "current" since it's quite likely that this will develop further.
    I'm quite happy with it, as it is quite time-optimized, and uses very minimal equipment.
    The biggest change I've made since the last routine, was replacing Cardio X with P90X3 Accelerator.
    Accelerator is far more intense, and it's also shorter at only 30 minutes.
    DayExercise NameAdditionsEstimated Time
    MondayChest, Shoulders, and Triceps
    More info
    Custom Abs Workout
    More info
    1.2 Hours (1 hour & 12 minutes)
    TuesdayP90X3 Accelerator
    More info
    0.5 Hours (30 minutes)
    WednesdayBack and Biceps
    More info
    Custom Abs Workout
    1.11 Hours (1 hour & 7 minutes)
    ThursdayP90X3 Accelerator
    0.5 Hours (30 minutes)
    FridayLegs and Back
    More info
    Custom Abs Workout
    1.23 Hours (1 hour & 14 minutes)
    The final workout schedule is down to 4 Hours and 33 Minutes, nearly half the time my original routine took, there's no need to go to the gym!

    What's next?

    I've been toying with a few modifications.
    I've considered doing Cardio on the same day as I do the Muscle workouts.
    This could potentially reduce prep times, but may hurt results.
    Another thing I'm considering is adding a TRX hook on the wall, for a better Pull Up simulation.
    For now though, this routine works very well for me, and I definitely recommend it for a sustainable schedule that delivers results.
  • Hedera Hashgraph - the future of Blockchain?



    Yesterday I had a chance to see a presentation by Mance Harmon & Tom Trowbridge, the Founders of Hedera Hashgraph. Hashgraph presents a potential for a next generation ledger solution, or in simple terms - The next evolution of Blockchain technology.

    The actual Hashgraph algorithm was written by Leemon Baird, a highly gifted individual with a PhD in Computer Science from Carnegie Mellon University. Baird has a long history of Math & Algorithms, specifically around machine learnnig and more recently distributed consensus.

    Hasgraph promises to tackle some of the biggest issues with Blockchain: Performance, Security & Governance.

    Hashgraph Performance

    The most critical performance metric for any Blockchain/Ledger is TPS - Transactions Per Second.
    Here are some TPS numbers for the most popular Cryptocurrencies and traditional payment processors:
    • Bitcoin 2.5 TPS
    • Ethereum 15 TPS
    • Visa 1700 TPS (avg) to 4000 TPS (peak)
    • PayPal 115 TPS
    And Hashgraph's promise?
    • Hashgraph 50,000 TPS - 250,000 TPS
    If these numbers can be replicated on a public ledger, we're looking at a potential mass-market solution without any of the familiar growing pains for the foreseeable future.
    Hashgraph also promises to integrate Sharding to allow for even larger distributed applications on top of the platform.
    Mance Harmon, CEO of Hedera Hashgraph

    Hashgraph Security

    Hashgraph claims to have achieved the highest theoretical level of security in the crypto industry, the coveted "asynchronous Byzantine Fault Tolerance" or aBFT for short.
    Without going too much into the details of aBFT, they present an elegant and efficient way to replace Proof-of-Work, which thus far has been the dominant BFT solution.
    This potentially gets rid of the obvious energy-consumption and hardcoded slowdown issues of the system.

    Hashgraph Governance - the council of 39

    In order to avoid the immediate 1/3 dishonest nodes problem, two thirds of the initial tokens will be given to a council of 39 Major Corporations & Organizations from different industries and locations. Those entities will not technically hold the actual tokens, but they will have committees to eventually decide when to release those tokens to the public. All revenues from sale will go back to Hedera.
    This event will occur when the token is of high enough value, such as that a 1/3 dishonest node attack will no longer be financially feasible.
    It remains to be seen whether it's possible to determine when this will happen, as well as preventing a single actor from gaining too much power over the economy as a whole.
    Hedera Hashgraph is definitely trying something unique here, and it's mostly a matter of time to see how it works in a live public setting.

    A distributed Ledger that is fault-tolerant AND can do over 250K TPS can truly usher an era of a decentralized, user owned internet.
  • Moving to Crypto Valley



    Not many know this, but I've had my eyes set on Zug long before Ethereum registered its foundation there. The quiet town that is close enough to Zurich for a potential daily commute, yet still small enough to give you a genuine Swiss experience, was in my top 3 relocation candidates list since 2013.
    So together with the growing Crypto scene there, it was the perfect storm of events that gave me the final push to move to Zug.

    Between Cloud and Crypto

    In the summer of 2017, we at Cloudwith.me have introduced a new token to usher a new age of Cloud.
    The plan is multi-faceted, and quite complex, but to focus on the current stage - The new Cloud Token is made to be the de facto currency to purchase Cloud Services.
    Whether those are servers at Cloudwith.me (currently supporting Google Cloud, AWS, and Microsoft Azure), or Cloud products at other Cloud providers & merchants that will soon adopt the Cloud Token.
    Due to this exciting turn of events, it has become more and more critical to keep up with the fastest changing tech landscape in the world - Crypto/Blockchain technology.

    Why Crypto Valley?

    "If Satoshi Nakamoto were a trustee, we would've found him for you." - street advertisement in Zug

    I often hear that a decentralized technology should have a decentralized ecosystem, I guess the physical world doesn't work that way.
    For Crypto, there seem to be 3 main hubs: Zug, Hong Kong, and Singapore.
    As I'm already living in Europe, speak German, and am not a Megacity person (HK & SG aren't technically Megacities, but they sure feel like ones), Zug seemed like the obvious choice.

    Zug is also the home of The Ethereum Foundation, Crypto Valley Association, ShapeShift, Lisk, and thousands of other Crypto companies.

    With a direct flight to every major city in Western Europe within 1-3 hours (not to mention the train connections), it's a prime location both from and to conferences/meetings.

    What's Next?

    This move has been the slowest settling period I've had, perhaps with the exception of my initial move to Berlin. I keep trying to find a reason for this, and I think it has to do with the suburban lifestyle of Switzerland. I'm used to getting all my answers online. In fact, with enough research, one can have almost the same knowledge as a local, before moving to a capital city. This all falls apart when one moves to a smaller town. Local knowledge is just not out there in the Googleverse. The simplest questions such as "Who's the best Internet Provider?", or "How does waste disposal work?" change drastically even between communities.
    The best solution for this is - joining local groups (some are even on Facebook), and be patient - you'll figure it out sooner or later.

    After finally settling in, I feel like it's time to get to work!
    I'm working on 2 key directions at the moment, as well as a potential 3rd one.

    Business Partnerships

    The goal is to finalize an agreement with at least 2-3 cloud providers/merchants to accept Cloud Tokens.
    We have had several talks with several niche cloud providers, but the complexity of Token transactions has been the biggest blocker here. Since we rely on the Ethereum blockchain, we are limited with the amount of simplification we can do on our end.
    However, recent developments on MetaMask are inching closer and closer towards a sane way to pay with Ether & Tokens (almost PayPal-like). Seamless integration is a matter of months, if not weeks, so it's definitely a reason to stay positive.

    Technological Partnerships

    As mentioned above, promoting seamless token transactions right from the browser is not only beneficial to our Cloud Token, it's beneficial to the entire Ethereum community. In fact I would go so far and say that MetaMask has the potential to lead to mass adoption of the Ethereum blockchain.

    The priority here is contributing directly to MetaMask, as well building integrations/plugins for the extension.

    Bridging the gap

    The 3rd potential direction is more of a trend that has been bothering me as of late.
    I see a huge gap between potential contributors/investors and actual developers.
    There are a lot of campaigns out there, talking about incredible ideas, but without technical knowledge investors are left guessing in the dark. I believe there is plenty of work to do on this front,
    both on the technical side, as well as on the human side.

    One last thing - I've made a few design changes, time for a refresh :)
  • Adding Serverless to your Web Application



    As you've probably heard, Serverless is the next big thing in the cloud industry.
    Here's I'll go over some of the ways you can integrate Serverless technology in your existing web apps!



    Serverless is essentially a system of Function-as-a-Service, where you have certain functions in the cloud, and you get billed by their usage & required computation.
    This is a further abstraction from the actual Virtual Machines in common use today, and goes hand-in-hand with a Microservices approach to web development.
    But enough about dictionary definitions, let's go to the good stuff:

    Examples of integrating Serverless with your existing Web App

    Reports

    Database reports are a pretty common request, often by marketing/business departments to get a better understanding of your users.
    This is more common in early-stage applications, before you connect them to proper analytics tools.
    Using Serverless, it's quite simple to have a function that runs a report on the database.
    We'll use AWS Lambda in this example:
    1. Go to Lambda on your AWS Dashboard:
    2. Choose "Author from scratch":
    3. In your Lambda function, add the following code:
       1
       2
       3
       4
       5
       6
       7
       8
       9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26
      27
      28
      
      'use strict';
      module.exports.runReport = (event, context, callback) => {
        const response = {
          statusCode: 200,
          body: {
            message: 'Result: ',
            input: event,
          },
        };
        const mysql = require('mysql');
        const connection = mysql.createConnection({
          host: 'localhost',
          user: 'user',
          password: 'password',
          database: 'database',
          port: 'port' //if you remove this line port defaults to 3306
        });
        connection.connect();
        connection.query('SELECT * FROM users', function(err, results) {
          if (err) throw err;
          response.body.message += JSON.stringify(results);
          response.body = JSON.stringify(response.body);
          callback(null, response);
        })
      
        connection.end();
      
      };
    4. As an easier alternative, get the entire Serverless Boilerplate here

    Admin Panel

    In most web applications there's some sort of an Admin Panel.
    Ideally, the admin panel should be a separate application, to limit potential systemic weaknesses.
    Using Serverless, we're able to take advantage of some of the most secure systems available - IAM permissions.
    Examples of cool things you could do to further secure your Admin Panel:
    • Restrict Admin functions permissions - Since Lambda functions have their own IAM roles, you can have very fine-grained permission settings. A great example of this is with DynamoDB.
      You can literally give your function access to specific tables with a custom IAM policy:
       1
       2
       3
       4
       5
       6
       7
       8
       9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      
      {
        "Version": "2012-10-17",
        "Statement": [
          {
            "Sid": "Stmt1509470869566",
            "Action": [
              "dynamodb:BatchGetItem",
              "dynamodb:DescribeTable",
              "dynamodb:GetItem",
              "dynamodb:GetRecords",
              "dynamodb:ListTables",
              "dynamodb:Query",
              "dynamodb:Scan"
            ],
            "Effect": "Allow",
            "Resource": "arn:aws:dynamodb:YOUR-REGION:YOUR-AWS-ID:table/TABLE-NAME"
          }
        ]
      }
      Or another great example where a function can only write items to the table without reading any:
       1
       2
       3
       4
       5
       6
       7
       8
       9
      10
      11
      12
      13
      
      {
        "Version": "2012-10-17",
        "Statement": [
          {
            "Sid": "Stmt1509470869566",
            "Action": [
              "dynamodb:PutItem"
            ],
            "Effect": "Allow",
            "Resource": "arn:aws:dynamodb:YOUR-REGION:YOUR-AWS-ID:table/TABLE-NAME"
          }
        ]
      }


    • Combine API Gateway with Cognito User Pools for authentication - This is quite complex, but this guide has a pretty good walkthrough. In the following days (probably weeks) I'll try to add this to the boilerplates repository.


    • Write the entire Admin Panel on Serverless - If your app doesn't have a fully fledged Admin Panel yet (and you understood the last 2 items on the list), This could offer both a high level of security as well as a great way to integrate Serverless into an important but not-yet-customer-ready parts of your system.

    Cron Jobs

    Most applications have some form of Cron Jobs, but more often than not,
    there's a good chance that you don't have a lot of logging/analytics for your Cron Jobs.
    With CloudWatch you can schedule functions to run every minute/hour/day/week, just like a normal Cron Job.
    Combine that with CloudWatch Alarms, and you have both a logging system and an alarm system in case something goes wrong.


    These were just a few examples of how you could integrate Serverless into your web app right away.
    In the future, I'll try to work on the boilerplate repository, to add more cases.
  • View-specific JS Files in Sails.js



    One thing I really loved about Meteor, is that you can fine-tune which files are included (and the order of inclusion).
    This is especially useful when structuring everything in small Meteor packages.
    So for example, if you simply want to add relevant client JS files (on package.js):
    1
    2
    3
    4
    
    api.addFiles([
        'client/page-login.html',
        'client/page-login.js',
    ], 'client');
    page-login.html:
    1
    2
    3
    4
    5
    6
    7
    
    <template name="PageLogin">
      <form id="login-form">
        <input name="username" type="text" />
        <input name="password" type="password" />
        <input id="submit-login" type="submit" />
      </form>
    </template>
    page-login.js:
    1
    2
    3
    4
    5
    6
    
    Template.PageNewDomain.events({
      'submit #login-form': function (event, template) {
        event.preventDefault();
        //handle form submission..
      }
    });
    Together with specific Template namespaces, it allows you to have template-specific JS code that doesn't interfere with other templates. I looked for a way to have that feature in Sails.js.

    Instead of trying to implement the entire complicated Template rendering engine, I figured it should be enough if every view gets a corresponding JavaScript file that is optionally loaded with said view.

    How it should work

    • Each View in the views/ folder has a name, let's create a corresponding JS file with the same name
    • On Sails.js, JavaScript files are stored separately in the js/ folder, let's store all view-specific JS files under js/views/
    • JS filenames should be the same as view filenames. views/dashboard/login.ejs will have a JS file named js/views/dashboard/login.js

    How to implement

    • add this to config/views.js:
      1
      2
      3
      4
      
      locals: {
          existsSync: require('fs').existsSync,
          jsPath: __dirname + '/../assets/js/views/'
      }
      This is so that we're able to check if a JS file exists.
    • on the bottom of views/layout.ejs, under blocks.localScripts
      1
      2
      3
      
      <% if (existsSync(jsPath + req.options.controller + '/' + req.options.action + '.js')) { %>
        <script src="/js/views/<%= req.options.controller + '/' + req.options.action %>.js"></script>
      <% } %>
    • In tasks/pipeline.js in the jsFilesToInject array, we need to remove
      js/**/*.js
      This is Critical. Otherwise, all JS files under js/views will be automatically included in ALL views.
      Instead, to automatically inject other views we can have the following line:
      js/dependencies/**/*.js
    That's it! Now you'll be able to write view-specific JavaScript files!