Improve Music Audio Quality with a Wireless Bluetooth DAC+AMP

There are at least 3 major things that affect music audio quality:

  1. Speakers
  2. Audio source, e.g. mp3 file, FLAC file, etc
  3. Digital-to-Analog Converter (DAC)

Some people may argue that transmitting audio over Bluetooth degrades sound quality, but the reality is the difference is so small that it’s negligible.

Speakers

Needless to say, quality speakers are necessary to hear music at a higher quality. Don’t expect to hear quality audio from cheap $10 earphones. Since I’m not an audiophile and I’m not interested in spending thousands of dollars just for speakers, I just have what I guess are prosumer speakers. Specifically, I have:

And since it makes no sense to buy them at full price, I buy them renewed on Amazon for a big discount because even renewed, they look and function exactly like they are brand new.

The WH-1000XM4 has a better sound stage, but it’s bulkier and leaks audio a lot. Also, it’s not great for working out because I feel it moves around too much and gets in the way of my workout. The WI-1000XM2 is compact, doesn’t leak audio, and can easily rest on my neck when not in use. The problem is when listening to music on my phone, the volume is often not high enough, especially when at the gym or when traveling by plane. This is where having an amplifier (amp) takes care of volume issues.

Audio source

I’ve dabbled with lossless FLAC files, but when compared to high-bitrate mp3 files, I personally can’t notice a big enough improvement to justify the cost and huge file size. I’m okay with mp3s as long as the bitrate is high enough. I normally just buy mp3s from Amazon Music. Don’t expect to hear quality audio from low-bitrate mp3s, though. The compression is too lossy.

Digital-to-Analog Converter (DAC)

Chances are you probably listen to music from your phone and sometimes from your laptop like me. The problem is the converters in them that convert digital audio signals to analog signals are likely of low quality. I have the Google Pixel 4a 5G smartphone. It’s a mid-range phone. But even if you have a high-end phone, the digital-to-analog converter (DAC) is most likely not as good as a dedicated DAC. Fortunately, there are small Bluetooth DACs that are lightweight and can clip onto your shirt. I tested the EarStudio ES100 MK 2 ($60 renewed, $80 new on Amazon).

When comparing the audio quality with and without this DAC, it’s clear that the DAC makes a decent, if not big, difference, depending on the song I’m listening to. The DAC is also an amplifier and can increase the volume to levels higher than I’d ever need it to be. It didn’t come with an aux cable, so I bought a short 4-inch one. The setup might seem complex, but it’s not that bad, especially if you’re just sitting for a long time, like on a long flight.

Instead of pairing your head/earphones to your audio source (phone, laptop, etc), you pair the DAC to it.

Though it has volume controls, I find it easier to adjust the volume from the phone app. It’s recommended to set the source volume (phone or laptop volume) to max and to adjust the analog (DAC) volume. The app has a lot of options and clear explanations, but I find the default settings to be sufficient.

Host PDFs in AWS CloudFront CDN and Enable Redirects Using CloudFront Functions & Lambda Functions

Many website files include PDFs. These PDF files are usually much larger than other file types and can take up a lot of space. You may want to keep all website files like images and PDFs (binary files) together with your HTML, CSS and JS files (text files) and put them all in version control, like GitHub, but there are downsides to this:

  1. Git version control is designed for text files, not binary files. Even though you can use Git LFS so you can version your binary files, there are simpler, better alternatives.
  2. Website images are better served from an image CDN like Cloudinary or ImageKit. These services will automatically and quickly optimize images on the fly.
  3. PDF files are better served from a CDN. Amazon AWS S3 can be used to store your PDFs with versioning and AWS CloudFront can serve those PDFs from a CDN. With CloudFront, you can also write a function to redirect one PDF file to another in case you need to delete a file.

As of this writing, the AWS CloudFront CDN has 218 global edge locations.

The steps below describe how to set up AWS S3 and CloudFront to host PDFs and to set up redirects.

Note: you can create redirects using AWS Lambda functions (launched in 2017), but they are more complicated and cost 6 times as much as the cost of CloudFront functions (launched in 2021). Learn more.

1. Create an S3 bucket

Log in to the AWS console, go to S3, and click “Create bucket”. Choose a bucket name like “pdfs”.

Since you want people to be able to access the PDFs, uncheck “Block all public access” and check “I acknowledge that the current settings might result in this bucket and the objects within becoming public.”

If you want, click the radio button that enables versioning

Ignore the other options, if you want, and then click the “Create bucket” button.

2. Upload PDFs

You can drag and drop your PDFs to upload them. If you have many PDFs, like thousands, then it’s better to use the AWS CLI S3 Sync command.

As a test, I just uploaded 2 PDF files/

3. Create a CloudFront Distribution

In the AWs console, go to CloudFront and click “Create Distribution”. For “Origin domain, choose the Amazon S3 bucket you created in step 1.

For the viewer protocol policy, choose “Redirect HTTP to HTTPS” since that’s a good policy IMO.

Ignore all other options, if you want, and click the “Create Distribution” button.

Now, the PDF files in your S3 bucket will be available in a CDN at the CloudFront domain provided, e.g. d2a5k3j4u1zr32.cloudfront.net/test-pdf-1.pdf

4. Create a CloudFront Function to Redirect Requests

Click on the distribution and then click on “Functions” in the left sidebar.

Click the “Create Function” button and enter a name for the function, e.g. “Redirects”.

You will see 3 tabs: Build, Test, and Publish.

In the “Build” tab, enter the code below and customize as needed.

Note that there is a 10 KB limit on the size of your CloudFront function.

Click the “Save Changes” button and then click the “Test” tab. You will see a field labeled “URL Path” with a default value of “/index.html”.

Since we don’t have a redirect rule for that URL path, we don’t expect any redirection to happen. Click the “Test Function” button. You will see output like below indicated that the response URI is “/index.html” as expected.

Now, change the URL path to one you have a redirect for. In my example code, I am redirecting “/test-pdf-2.pdf” to “https://www.google.com”. Click the “Test Function” button. The output shows “https://www.google.com”.

Now, publish the CloudFront function. Click the “Publish” tab, then click the “Publish Function” button.

Click “Add Association” to associate the function to your distribution. Choose your distribution in the Distribution field. Leave Event Type as “Viewer Request” and ignore Cache behavior. Click the “Add association” button.

Note that you can only have one CloudFront function for a given cache behavior and event type.

Wait for the function to be deployed. Go back to the function list page and check the status column. It will say “Updating” for a few minutes.

Wait a few minutes. Reload the page. The status should change to “Deployed”.

Now, test out the redirect in production by going to the CloudFront URL of a path you have a redirect for. You should see the redirect work.

Using Lambda Functions

Make sure the location is set to us-east-1.

Go to the Lambda page and click “Create function”.

  1. Enter a name for your function.
  2. Under “Execution Role”, choose “Create a new role from AWS policy templates”
  3. Enter a role name
  4. Under “Policy Templates”, choose “Basic Lambda@Edge permissions (for CloudFront trigger)”. This is IMPORTANT. Do NOT choose “Create a new role with basic Lambda permissions”.

In the “Code” tab, enter the redirect code below and then click File > Save.

In order to test your code, you must deploy it first. Click the Deploy button.

  1. Test your code by clicking the “Test” tab
  2. Choose “Create new event”
  3. Enter a name for the test
  4. Replace the event JSON with relevant test data, e.g.
{
  "Records": [
    {
      "cf": {
        "config": {
          "distributionId": "EXAMPLE"
        },
        "request": {
          "uri": "/docs/test-pdf-2.pdf"
        },
        "response": {
          "status": "302",
          "statusDescription": "Found",
          "headers": {
            "location": [
              {
                "key": "Location",
                "value": "https://example.com"
              }
            ]
          }
        }
      }
    }
  ]
}

Click the “Save” button and then the “Test” button.

You will either see an error or a success response similar to what’s shown below.

Under “Actions”, click “Deploy to Lambda@Edge”. This will deploy the Lambda function to the CloudFront edge network.

  1. Choose your CloudFront distribution from the dropdown list.
  2. For CloudFront event, choose “Origin Response”.

The green banner will state that the function is being replicated, but that it will take a few minutes to complete.

Go to the CloudFront distribution. You’ll see the status “Deploying”. Wait till it changes to a date/time indicating the deployment has completed.

Invalidate the CloudFront cache for all objects using /*

When the trigger is created, it will create a new Lambda function version. Click on the “Versions” tab and then click the version number to see that the trigger is saved in the version.

You will then see the CloudFront trigger in the diagram and other saved details.

Test the redirect using the cURL command.

If you need to remove a Lambda function from a Cloudfront distribution,

  1. go to the distribution
  2. click “Behaviors”
  3. choose a behavior and click “Edit”
  4. Scroll down to “Function Association” and select “No association” for the function type
  5. Click “Save changes”
  6. Invalidate the Cloudfront distribution using /*

Put Redirect Data in an External JSON File

The instructions above work, but whenever you want to update the redirects, you have to edit the lambda JavaScript function and redeploy it to the Cloudfront edge. The deployment process takes about 5 minutes. To improve this process, we can move the redirect data to a JSON file in an S3 bucket. Then, you can just upload an updated JSON file, overwriting the existing file, and the updated redirects will work immediately. Here’s how to do that.

Create a JSON file containing all redirects like the following and upload it to S3.

{
  "/file1.pdf": { "to": "/file2.pdf", "statusCode": 301 },
  "/resources/file3.pdf": { "to": "/resources/file4.pdf", "statusCode": 301 },
  ... etc. ...
}

Add permissions to the lambda function to have read access to S3. Go to Lambda > Functions > and click on the function name. Then, go to Configuration > Permissions > Execution Role > and click on the role name.

A new tab containing the role’s permission will open. Under “Permissions policies”, click on the policy name.

That will open a new tab showing the permissions defined in the policy. Click the Edit button.

A new table will open showing the existing permission. Add the following S3 permissions. Replace “mybucket” with the name of the S3 bucket where you put the JSON redirect file.

"Effect": "Allow",
	"Action": [
		"s3:Get*",
		"s3:List*"
	],
	"Resource": [
		"arn:aws:s3:::mybucket",
		"arn:aws:s3:::mybucket/*"
]

The entire JSON object may look like this.

{
	"Version": "2012-10-17",
	"Statement": [
		{
			"Effect": "Allow",
			"Action": [
				"logs:CreateLogGroup",
				"logs:CreateLogStream",
				"logs:PutLogEvents"
			],
			"Resource": [
				"arn:aws:logs:*:*:*"
			]
		},
		{
			"Effect": "Allow",
			"Action": [
				"s3:Get*",
				"s3:List*"
			],
			"Resource": [
				"arn:aws:s3:::mybucket",
				"arn:aws:s3:::mybucket/*"
			]
		}
	]
}

Back at the lambda function page, click on the Code tab and update the code as follows:

Replace the first 3 constant values with your S3 bucket’s region, bucket name and the path to the redirect JSON file.

const REDIRECTS_DATA_REGION = 'us-east-1';
const REDIRECTS_DATA_BUCKET = 'pdfs';
const REDIRECTS_DATA_OBJECT = 'docs/pdf-redirects.json';

Click “Deploy” so you can test the lambda function. Once you verify it is working, go to Actions > Deploy to Lambda Edge. Follow the remaining steps as shown above.

Resources

  • https://making.close.com/posts/redirects-using-cloudfront-lambda-edge

Passing UTM Name/Value Pairs to Specific Links on a Website

Adding UTM parameters to links is useful for tracking marketing efforts, e.g. if you have a banner or an email with links to a landing page, you’ll want to know which method (banner or email) generated the most page visits and form fills. Google has a campaign URL builder that will generate URLs with UTMs for you. In Google Analytics, you can find pageviews to the landing page by UTM parameter. However, if you want to track any subsequent pages after the landing page, then you’ll need a way to pass the UTMs along to the subsequent pages. In my particular situation, I needed to pass UTMs to a 3rd-party site. The visitor flow would be like this

  1. Click a banner on the home page of example.com. The banner has UTMs in the query string, e.g. example.com/landing-page?utmsource=home-page-banner
  2. Land on an overview page on example.com, e.g. example.com/landing-page
  3. Maybe visit other pages on example.com
  4. Return to example.com/landing-page
  5. Click a link to register for something on a 3rd-party site, e.g. foo.com/register

By default, only the first pageview of example.com/landing-page would include UTMs in the URL. To pass the UTMs to the link to the 3rd-party site, something extra needed to be done. I chose the following approach, which works well.

  1. Write JavaScript code that runs on all pages.
  2. If a URL contains UTM params, save the UTM name/value pairs as session cookies, overwriting any existing UTM cookies.
  3. If a page has any <a> tags with the class “appendUTM”, then rewrite the href value by appending the UTM params.

I then added the class “appendUTM” to any links where I wanted to append the UTMs. In my case, it was the links to the 3rd-party registration site.

Below is the code that accomplishes this.

Separating Website Images and Bulk Uploading Them to AWS S3 Using AWS CLI

I recently had to move 35,000+ website images from Git to AWS S3. The images were in many subfolders. First, I had to separate the images from all other files. Then, when I tried dragging and dropping the parent folder containing all images to the AWS S3 web interface, I had to wait 9 to 17 hours.

When I woke up in the morning, I found the upload completed with errors:

Here’s how I easily separated the images from all other files and successfully uploaded all 35,000+ images.

Separate images from other files

First, I wanted to see a list of all unique file extensions so I could know what image file extensions were being used.

find . -type f | sed 's|.*.||' | sort -u

This returned a list like the one below.

JPG
PNG
ali
bmp
brs
cnd
CSS
...

Then, I copied the website root folder and made a new sibling folder called website-images where I’d just have the images.

Then, I deleted all images from the “website” folder using the following command.

find . -type f ( -name 'gif' -or -name 'jpg' -or -name '.JPG' -or -name '.png' -or -name '.PNG' -or -name '.bmp' ) -delete

Then, I deleted all non-image files from the “website-images” folder using the following command.

find . -type f -not ( -name 'gif' -or -name 'jpg' -or -name '.JPG' -or -name '.png' -or -name '.PNG' -or -name '.bmp' ) -delete

The last command resulted in a bunch of empty folders. I deleted the empty folders using this command.

find . -empty -type d -delete

I then wrote and ran a NodeJS script to walk through each HTML file and convert each relative path to a path relative to the website root folder, e.g.

../assets/images/images/home_page_banner.png

to

/public/en/csam/latest/assets/images/images/home_page_banner.png

Upload all images to S3

As mentioned earlier, uploading 35000 images to S3 using the web interface took a long time and kept completing with errors. What ended up working was uploading the images using the AWS CLI. Here’s how I did it.

Install AWS CLI

Here’s the documentation. I ran the command line installer.

curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
sudo installer -pkg AWSCLIV2.pkg -target /

Create an access key

I had to create an access key to authenticate. I created a new Identity and Access Management (IAM) user and then clicked the “Create access key” button to generate a new key.

I ended up with 2 keys similar to the ones below:

  1. Access key: AKIAIOSFODNN7EXAMPLE
  2. Secret access key: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

Set access key as environment variables

I then saved those key values as environment variables. Here are the instructions. I basically ran the following commands in the terminal, replacing the values with my actual values.

export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
export AWS_DEFAULT_REGION=us-west-2

For the default region, I chose the region for my S3 bucket.

Upload (sync) files

I then uploaded (synced) files from my local to my remote S3 bucket. Here’s the documentation for the S3 sync command. Since I had already uploaded some files, I was hoping to find a flag to skip uploading files that exist at the destination. It turns out that the “sync” command does this by default. I ran the following command in dry-run mode to verify the output was correct.

aws s3 sync . s3://q-website-images/docs/ --dryrun

Then, I reran the command without the dry-run flag.

aws s3 sync . s3://q-website-images/docs/ 

The command output a list of the files it uploaded.

When it was done, I tried rerunning the command only to find that it completed with no output, indicating that all source files already existed in the destination. That was a sign that the sync was complete. Looking at the number of files in the S3 web console, I could see the correct number of files listed there.

Now that the images are in S3, I’ll use S3 as the origin for an image CDN (ImageKit). ImageKit will auto-optimize the images.

Simple Steps for Losing Weight and Building Muscle

Step 1: Determine Maintenance Calories

Your maintenance calories is the number of calories you consume and burn each day to neither lose nor gain weight. Enter your information in this online calorie calculator by the Mayo Clinic. It uses the Mifflin-St. Jeor equation, which pros consider the gold standard.

For me, my maintenance calories is currently 2650 calories per day.

Step 2: Calculate Calories & Protein to Lose Weight and Build Muscle

Losing Weight (Fat)

In order to lose weight by losing fat, you just need one thing: a net deficit of calories. But you don’t want too large a deficit because then you’ll lose both fat and muscle. You should target a deficit of 5 to 10% of your maintenance calories. You can lose weight by just

  • consuming fewer calories without exercising
  • consuming more calories but burning extra calories by doing cardio exercises like running

Whether you just rest or you exercise, your net calorie deficit should be 5 to 10% of your maintenance calories. For me, this value is currently between 2385 and 2517 calories.

Gaining Muscle

In order to gain muscle, you need 4 things:

  1. a net surplus of calories
  2. strength training until failure
  3. sufficient protein consumption
  4. rest (minimum 7 hours a day)

For the calories, you don’t want too large a surplus because then you’ll gain both muscle and fat. You should target a surplus of 5 to 15% of your maintenance calories. For me, this value is currently between 2782 and 3047 calories.

For the protein, you should target consuming 1 gram of protein for each pound of body weight. So, if you weigh 180 lbs, you should consume 180 grams of protein.

The calorie (energy / fuel) surplus is needed to rebuild the muscle you’ve broken down during strength training. Breaking down muscle fibers only happens if you train to failure. The large protein consumption is needed because muscles are made of protein. Muscle (protein) synthesis occurs while you’re sleeping, which is why it’s necessary to sleep enough after strength training.

Target Calorie & Protein Summary
DayCalorieProteinMy Target
Rest or Cardio5-10% deficitAny amount2385-2517 calories,
any protein
Strength Training5-15% surplus1 gr / lb of body weight2782-3047 calories,
180 grams of protein

Studies show that consuming high amounts of protein while in a calorie deficit can preserve muscle mass and accelerate fat loss. Therefore, if possible, consume a lot of protein daily, not just on strength training days.

Step 3: Make a Weekly Schedule

Your weekly schedule would be a combination of resting days, cardio days, and strength training (weight lifting) days. Here’s an example.

DAYACTIVITYCALORIES
MondayRestCalorie Deficit, Extra Protein
TuesdayStrength TrainingCalorie Surplus, Extra Protein
WednesdayCardioCalorie Deficit, Extra Protein
ThursdayRestCalorie Deficit, Extra Protein
FridayStrength TrainingCalorie Surplus, Extra Protein
SaturdayCardioCalorie Deficit, Extra Protein
SundayStrength TrainingCalorie Surplus, Extra Protein

For strength training, you need to wait at least one day in between working the same muscle group, e.g. don’t do chest presses every day. Do them at most every other day because muscle protein synthesis (MPS) takes 36-48 hours on average and working the same muscles during that time will interfere with synthesis.

Step 4: Make a Meal Plan

When it comes to losing weight, you just need a calorie deficit, but you should consume healthy calories, e.g. no processed food, no added sugar, etc. For me, I try to stick to a keto diet, although that’s not absolutely necessary.

When it comes to building muscle, the hardest part will be trying to consume sufficient protein. If you weigh 180 lbs, you need to consume 180 grams of protein. That’s actually hard to do, which is why many people consume protein shakes to supplement their meals.

Here’s a list of protein-dense foods that can help you reach your protein consumption target.

FoodQuantityProtein (g)CaloriesProtein Density
Egg1 large6788%
Egg Whites1 large41822%
Chicken breast15328419%
96/4 beef pattie12515017%
Greek yogurt6 oz159017%
Soy milk1 cup71006%
Whey protein concentrate supplement1 scoop2513019%
Turkey breast2612521%
Tuna2712821%
Premier protein shake13016019%
Kirkland chewy protein bar1101905%

I personally find chicken breast difficult to cook in a short amount of time while still tasting good. So, I opt for packaged options like Lightly Breaded Chicken Breast Nuggets. These have added protein, are easy to cook, and taste decent. Other similar options taste better, but they have less protein and more calories, e.g. Kirkland Signature Lightly Breaded Chicken Breast Chunks, Boneless Skinless.

Example Meal Plan

Target Protein (grams) Consumption (muscle building):180
Target Daily Calorie Consumption (muscle building):2782-3047
Target Daily Calorie Consumption (weight loss):2385-2517

Since the hardest thing is consuming enough protein, the meal plan below will focus on foods that will hit the target protein amount of 180 without consuming an excess of calories. If there is a calorie deficit, you can easily add any kind of healthy food to reach the calorie target.

Food / IngredientUnitProtein (g)CaloriesQuanitityTotal ProteinTotal CaloriesProtein Density
Breakfast
Eggs1 large6784243127.69%
Mozzarella string cheese stick178017808.75%
Premier Protein Shake (Chocolate)13016013016018.75%
Lunch
Keto Beef Cheeseburger
Keto burger bun1 bun9801980
96/4 lean beef pattie1 pattie25150125150
Cheddar cheese1 slice5901590
Mayo1 tbsp0351035
Ketchup1 tbsp0201020
3937510.40%
Protein Shake00
Vanilla greek yogurt1 cup (150 gr)159011590
Whey protein powder1 scoop25130125130
Unsweetened soy milk1 cup6.310516.3105
Creatine powder1 scoop00100
Glucomannan powder1 scoop00100
Frozen berries1/2 cup0351035
46.336012.86%
Dinner
Keto Chicken Cheeseburger
Keto burger bun1 bun980198011.25%
Grilled Chicken Pattie1 pattie2012012012016.67%
Cheddar cheese1 slice59015905.56%
Mayo1 tbsp03510350
Barbecue sauce1 tbsp051050
3433010.30%
Kirkland Chewy Protein Bar1 bar101901101905.26%
Anything else (pasta, fries, etc)
Total190.31807

Step 5: Exercise

Cardio

For cardio, you can do anything from hiking, dancing, running, biking, etc. If you’re low on time, you can buy a recumbent exercise bike with resistance. It lets you lay back and exercise in a comfortable position. The one below is lightweight and small and costs $178. You can easily put it in your living room and use it while watching TV.

Marcy Recumbent Exercise Bike with Resistance ME-709

Another low-intensity option is to simply walk. A common goal is to target 10,000 steps per day, which is about 5 miles. You can also walk at home while watching TV. Some walking pads can easily be stored and don’t make a lot of noise. This one, for example, comes with the following features

  • optional 3% incline
  • low 45 dB noise
  • remote control
  • large display
  • belt dimensions: 17″ x 48″
  • overall dimensions: 27″D x 50″W x 5″H
  • supports Zwift and Kinomap
  • Speed: 0.6-7.6 mph (~1350 – 17000 steps)
  • foldable
Strength training

For strength training, you should do the following:

  • For each exercise, do 3 sets of 8-12 reps with 1-3 minutes of rest in between
  • For each set, do as many reps until failure (you can no longer complete a full rep)
  • Periodically increase the weights (progressive overload)
  • Ensure you feel stimulation in the target muscle. If you don’t, then you may be doing the exercise wrong and you will see limited results. Some call this the mind-muscle connection.

When it comes to building muscle, what matters most is volume. For example, both of the following will produce the same results.

Weight (lbs)RepsSetsTotal Volume
100531500
501031500
Accessories

While working out, I’ve found the following accessories helpful.

Compression t-shirt

A compression t-shirt helps you see your physique so you can visually see your progress and which areas to target. I use the Under Armour Men’s HeatGear Compression Short-Sleeve T-Shirt.

Bluetooth headphones

Playing certain types of music can be motivating and make exercising more enjoyable. Many people wear bulky on-ear headphones. I prefer in-ear neckband earphones because they don’t move around and are lightweight. They also block out ambient noise pretty well. I wear the Sony Wireless Behind-Neck Headset (WI-C400).

Workout gloves

If you don’t wear padded gloves, you can easily develop calluses (thickened skin that forms as a response to repeated friction or pressure). Lifting weights is much more comfortable while wearing padded gloves.

Step 6: Count Calories

For calorie consumption, you can count calories by adding up all calories for each ingredient or food you consume. Look at the nutrition label on food packaging and/or look at online calorie databases.

For calorie expenditure, don’t rely on a smartwatch. Their calorie tracking can be way off. Instead, wear a heart rate monitor like the Polar H10 Heart Rate Monitor Chest Strap. You can track your calories both on your smartphone and online. Buy it on Amazon.

To see how inaccurate a smartwatch measures calories burned, today I used both my Fossil Gen X watch and the Google Fit watch app to track calories burned. I also used the Polar H10 chest strap. I did strength training for 1 hour and 10 minutes. When I started tracking on my watch, I chose “indoor workout,” and the phone app just started tracking calories, time spent, heart rate, etc. When I started tracking using the Polar H1 app on my phone, I was able to choose “Strength training” before the device started tracking vitals. Once I was done exercising, I stopped both apps. As you can see below, the smartwatch says “Run”, which I guess means it thought I was running on a treadmill. It also says I burned 482 calories. In the Polar H10 app on my phone, it says I burned 759 calories. That’s way more than 482, with a difference of 277 calories. While I was exercising, I had my Bluetooth earphones on. The Polar H10 app would send an audio message like “You are improving your fitness” or “You are burning fat”. It would say the former when I was doing strength training and the latter when I was resting.

Step 7: Measure Progress

Weight Loss Progress

Measuring your weight loss is easy. Just regularly weigh yourself. To automate this, buy a Wi-Fi scale that records and keeps track of your weight and shows a graph of your progress on your phone. I personally use the Withings Body – Digital Wi-Fi Smart Scale with Automatic Smartphone App Sync. If weighing yourself every day, make sure to do it right before bed or first thing in the morning for more accurate results.

Muscle Gain Progress

To track your muscle gain, you’ll need to track your strength training weights, reps and sets for each exercise. Personally, I log my workouts using the free version of the FitNotes app. It’s a simple and easy-to-use app that just works. I can easily see my most recent reps and weights so I can either match or exceed them.

If you are able to lift heavier weights and perform more reps, then you must be building muscle, even if it’s not immediately noticeable in the mirror. You can also try measuring the circumference of different parts of your body, e.g. your upper arm, but that’s a hassle and inaccurate if you measure right after a workout when your muscles are swollen.

Over time, you can compare your strength training limits to see progress. Below is an example showing my actual results.

ExerciseDec 26, 2021March 12, 2022% increaseTarget area
lbslbs
V-bar pushdown5072.545%Triceps
Chest press machine7012071%Chest
Lat pulldown machine9013044%Back
Shoulder press machine407075%Shoulders
Tricep pushdown machine11517047%Triceps
Bicep curl machine6511069%Biceps

Find Pageviews From Custom UTM Parameters in GA4

Google Analytics version 4 (GA4) is quite different than the previous version, called Universal Analytics (UA). GA4 is event-based, and the UI is quite different. If you’ve got a link with UTM parameters like

www.example.com/?utm_source=marketo&utm_medium=email&utm_name=feb23-campaign&utm_id=12345

In GA4, if you go to Reports > Engagement > Pages and screens, you will see stats like pageviews for many pages. You can then filter to just one page like a free trial page by entering the page’s path in the search field, e.g. “/free-trial/”. You can then add a secondary dimension for source and medium. What you’ll end up will be something like this

This may not include the source and medium in your UTM parameters. A better way to get the traffic report based on a specific source and medium or name is by going to Explorations.

Here, you can create a new exploration. In the left “Variables” column

  • give the exploration a name like “Feb 2023 Campaign”
  • add some dimensions like
    • Page path and screen class
    • Session campaign
    • Session source / medium
  • add some metrics like “Views” and “Sessions”

In the middle “Settings” column,

  • drag some or all dimensions from the left column to the “Rows” field
  • drag some or all metrics from the left column to the “Values” field
  • add some filters like
    • Session source / medium contains market
    • Session campaign contains “Feb 2023 Campaign”

You will then see the report on the right.

Here’s the mapping between UTM query parameter and UTM dimension in GA4.

To find the number of clicks on a link with a UTM, go to

  1. Reports > Acquisition > Traffic acquisition
  2. In the primary dimension, choose session source or session medium or session campaign
  3. In the Search field, enter a value for the session source or session medium or session campaign
  4. Choose a date range
  5. Scroll to the right and under “Event count”, choose “click”.

Learn more about GA4 traffic sources

Create a Google Earth Movie/Tour That Flies Along a Path

In Google Earth Pro for Desktop, you can record a tour in real time by clicking the navigation controls or by clicking on saved placemarks. However, unless you are just moving from one point to another, the resulting tour may not be as smooth as you’d like. For example, if you have three placemarks, then as you click each placemark while recording the tour, the transition between placemarks will not be smooth.

To create a smooth tour that appears as if you are flying a plane or drone at a fixed altitude along a multipoint path, you need to create a path in Google Earth. Here’s an example. Let’s say we want to fly along the Las Vegas Strip.

Change Settings

Go to Tools > Options > Touring and change the settings as in this screenshot. Make sure to click the “Apply” button and the “OK” button to save your changes.

Now, click the “Navigation” tag and change the settings to match this screenshot.

Create Path

When adding a path, your mouse pointer will turn into a crosshair and you will need click to add points along your desired path. In this mode, you will not be able to zoom, change altitude, direction or pan by clicking on the screen because doing so would add path points. If you need to move around, you’ll need to use the navigation controls.

When creating a path, I find it easier to have your view facing straight down to the ground like this. In this example, my starting point will be just south of the south end of the Strip before the Mandalay Bay.

Click Add > Path

A dialog window will pop up. We’ll name the path “Las Vegas Strip”. Let’s also specify the altitude we want our flight path to be from the ground.

  1. Click the “Altitude” tab.
  2. Set Altitude to “400m” for 300 meters.
  3. Make sure “Relative to ground” is selected.

Click to add path points

In the screenshot below, you’ll see that I created 3 points. From bottom to top, there’s 2 red points and 1 blue point.

Since I need to pan to the north to add more points along the Strip, I will use the navigation control up arrow to do so.

After adding all the last point (just north of the STRAT), I zoomed out to check the entire path. As you can see, all but the last point are red and the path curves to the right as it goes north.

Now that my path is done, I’ll click the OK button in the path dialog window. That adds the path to My Places.

Since I don’t want to see the white path line / curve, I’ll uncheck the checkbox next to the path name.

To play the path tour, just click the path Play Tour button, as shown below.

If you’re happy with how the tour looks, you can record it by clicking the “Record a Tour” button and then click the Play Tour button.

Then click Tools > Movie Maker to export the video.

Here’s how the video tour came out.

Marketing + Product Org Chart

Functional Org Chart

In my 12 years working in Marketing, I’ve see a few different organizational structures at both low and high levels. And in my particular role, I’ve had to work with pretty much everyone, which has given me exposure to many issues that often go unnoticed. While there are many ways you can structure an organization, whatever way you come up should always make sense based on your particular organization’s needs. Following is a structure that I think makes sense based on my experience. The specific job titles (chief, VP, director, manager, senior vs junior, etc) are just an example. The important thing is that the structure and hierarchy groups people by function, commonality and importance. The structure below is for a 2000+ employee organization. Obviously, if your organization is much smaller or larger and has more or less dependencies on particular functions, some positions and groups can be removed or consolidated or even divided and expanded.

Level 1:

  • CMO (Chief Marketing Officer) or CPO (Chief Product Officer)

Level 2:

  • VP of Marketing
  • VP of Product

Level 3 and 4

Director of Content (or similar name)

This functional group primarily deals with marketing activities that involve text content. Since a big part of SEO involves text content, I put SEO Expert in this group.

  • Public Relations Expert(s)
  • Copyediting Expert(s)
  • Proofreading Expert(s)
  • SEO Expert(s)
  • Social Media Expert(s)
  • etc

Director of Design (or similar name, e.g. creative, etc)

This functional group primarily deals with marketing activities that involve visual design. Brand has to do with a company’s external public image, which relates to both public relations and design. Depending on your preference, this role could be under this “design” group or the “content” group above.

  • Graphic Designer Expert(s)
  • Web Designer Expert(s)
  • Brand Expert(s)
  • Video Expert(s)
  • UI / UX Expert(s)
  • etc

Director of Web (or similar name)

This functional group primarily deals with marketing activities that involve websites. Due to the criticality and complexity of today’s websites, significant dependencies that all functional groups often have on a company’s website, and unique technical skills that members of this group have, I made this group a standalone group rather than a subset of another group. Also, since email marketing is very effective, and because HTML emails contain code like that used on a website, I put HTML Email Expert(s) in this group. Though many marketing automation tools like Marketo include an email builder tool, I’ve found that they are limited in features and produce emails that don’t look professional unless the user has web development skills.

  • HTML, CSS Expert(s)
  • JavaScript Expert(s)
  • WordPress Expert(s)
  • HTML Email Expert(s)
  • etc

Director of Marketing Operations (or similar name)

This functional group primarily deals with marketing activities that involve marketing automation tools like Marketo, revenue attribution tools like Bizible, data analysis and reporting tools like Tableau and Google Analytics, customer relationship management tools like Salesforce, lead processing and routing, etc.

  • Marketing Automation, e.g. Marketo Expert(s)
  • Customer Relationship Management (CRM), e.g. Salesforce, Experts
  • Reporting and Data Analysis Expert(s)
  • etc

Director of Channel Marketing (or similar name, e.g. demand generation)

This functional group primarily deals with marketing activities that fall under certain channels like events, e g. virtual or in-person conferences, partner marketing, etc, and demand generation activities like advertising campaigns such as Google Pay Per Click (PPC), email marketing, digital media marketing, print advertising, etc.

  • Event & Event Marketing Expert(s)
  • Partner Marketing Experts(s)
  • Google PPC Expert(s)
  • Campaigns Expert(s)
  • etc

Director of Product (or similar name)

This functional group primarily deals with product management and product-specific marketing. For example, many tech companies have multiple products. Each product requires a specific subject matter expert, as it may be uncommon to find someone who is an expert in multiple products. Each product expert (commonly called “product manager”) basically is responsible for their own product, from understanding their product’s customers’ needs, making product feature decisions, helping market a product, e.g. by writing product page content, product-related blog posts, giving product-related webinars, etc.

  • Product Expert for Product A
  • Product Marketing Expert for Product A
  • Product Expert for Product B
  • Product Marketing Expert for Product B
  • etc

Project Manager

There is one role that doesn’t quite fit in any of the categories above. Needless to say, many marketing activities require the collaboration of multiple functional groups, but each of these groups specialize in their own areas. There’s no such thing as a person or group who specializes (or is even interested) in everything. One big issue I often see is how certain marketing activities with a specific hard deadline, e.g. due to an earnings release or predetermined and pre-marketed event taking place, results in chaos, with many people working nights and weekends due to lack of planning, ownership and project management. That’s why there’s a particular title called Project Manager (PM) or Project Management Professional (PMP) and a certification where people can get a PMP certificate. These people don’t specialize in the various components that go into a project, but rather they keep a project on track to avoid delays, mistakes, oversight, etc. Sometimes, they have the boring task of having to keep reminding people to do their part to avoid delays caused by blocking subsequent tasks. Assigning a random person to be a temporary project manager may work for small projects involving few people, but for large projects involving many people, a “real” project manager who actually specializes in project management is needed.

Title Hierarchy

Here’s a title hierarchy commonly used in many companies.

  1. CEO
  2. President / COO
  3. Executive / C-Level
  4. EVP
  5. SVP
  6. VP
  7. Senior Director
  8. Director
  9. Senior Manager
  10. Manager
  11. Individual Contributor
    • Principal
    • Lead
    • Staff
    • Entry

Things To Do in Las Vegas

Personal Opinion

Shows

Awakening at Wynn5/5
Chris Angel Mindfreak4.5/5
Vegas! The Show3/5
America’s Got Talent Superstars3/5
“O” by Cirque du Soleil2.5/5
Ka by Cirque du Soleil1.5/5

Buffets

Buffet at Wynn5/5
Buffet at Caesars Palace4/5
Buffet at Palms3/5
Buffet at SouthPoint2/5

Water Parks

Vegas can get really hot in the summer, which may make you want to go to a water park.

Mandalay Bay Beach

  • Website
  • Mon-Sun 8:00 AM – 7:00 PM
  • Personal opinion: the wave pool isn’t impressive. There’s only one wave every few minutes. The lazy river is small, but it has a strong current, which is nice.

Cowabunga Bay (Henderson)

  • Website
  • $50
  • Hours
  • 30 mins from the Strip by car
  • Directions
  • Personal Opinion: This is a relatively small waterpark compared to the ones I’ve tried in Orlando, FL. However, it wasn’t crowded, which meant lines were short. There was a decent variety of rides and they were all fun. The wave pool creates large waves every 5 minutes and they last for maybe 5 minutes. Definitely a lot of fun as the strong waves can push you towards the beach. The lazy river is of decent length, however, the current wasn’t very strong.

Wet ‘n Wild / Cowabunga Canyon (Summerlin)

Buffets: All-You-Can-Eat Food

This is just a small selection of unique buffets. Scroll further down for buffets at each hotel.

Garden Buffet – South Point Hotel & Casino

  • Website
  • Uniqueness: Cheap
  • Breakfast: M-F, 7-10 am, $17, Menu
  • Lunch: M-F, 11 am – 3 pm, $20, Menu
  • Prime Rib Dinner: 4-9 pm, $29, Menu

A.Y.C.E. Buffet – Palms Hotel and Casino

  • Website
  • Uniqueness: Small but high quality
  • Brunch – $32.99, Saturday & Sunday | 9am – 4pm
  • Dinner – $36.99
    • Monday & Tuesday | 4pm – 9pm
    • Saturday | 5pm – 10pm
    • Sunday | 5pm – 9pm

Bacchanal Buffet – Caesar’s Palace

  • Website
  • Uniqueness: High quality, largest buffet in Vegas
  • Regular Brunch, $60, Thursday – Monday | 9 AM – 1 PM
  • Dinner: $80, must RSVP, very crowded

The Buffet – Wynn

  • Website
  • Uniqueness: High quality
  • Dinner: $75, not as big and crowded as Bacchanal but still very good
  • Monday – Thursday
    • Early Riser Breakfast, 8 a.m. – 9 a.m. – $40
    • Brunch, 9 a.m. – 1 p.m. – $47
  • Friday – Sunday
    • Early Riser Breakfast, 8 a.m. – 9 a.m. – $46
    • Gourmet Brunch, 9 a.m. – 1 p.m. Daily – $51

Attractions By Hotel

Note: This is not a complete list of hotels and attractions.

Mandalay Bay

  • Website
  • Opened in 1999
  • 3209 rooms

Michelob ULTRA Arena

(various shows)

Shark Reef Aquarium
Daily 10:00 AM – 8:00 PM
Last Admission 7:00 PM
$29

Cirque du Soleil Michael Jackson ONE
Daily, 7 pm, 9:30 pm, $70

Shopping

The Shoppes at Mandalay Bay

Mandalay Bay Beach

(wave pool, lazy river, etc)

Take free tram to Luxor and Excalibur or walk through the enclosed walkway

Luxor

  • Opened in 1993
  • 4400 rooms

Take pictures of Egyptian architectural theme

Titanic Artifact Exhibition
Apr 27 – Sep 4 | 11 AM – 8 PM; Last admission 7 PM
Sep 8 – Nov 12 | 11 AM – 6 PM; Last admission 5 PM
Nov 13 – Dec 31 | 11 AM – 8 PM; Last admission 7 PM
$32

Bodies… The Exhibition
Apr 27 – Sep 4 | 11 AM – 8 PM; Last admission 7 PM
Sep 8 – Nov 12 | 11 AM – 6 PM; Last admission 5 PM
Nov 13 – Dec 31 | 11 AM – 8 PM; Last admission 7 PM
$32

Discovering King Tut’s Tomb
10 AM – 8 PM | Last Arrival 7 PM
$20

Carrot Top Comedy Show
Mon – Sat 8:00 PM
From $40

Blue Man Group
Mon – Sun 5 PM & 8 PM
From $49

America’s Got Talent LIVE
Wed, Sat & Sun | 6 PM & 8:30 PM
Thu & Fri | 7 PM
From $49

Take free tram from Luxor to Mandalay Bay and Excalibur

The Buffet at Luxor
MON – TUE: Closed
WED – SUN: 8 AM – 3 PM
Price Range: $

Excalibur 

  • Opened in 1990
  • 3981 rooms

Ultimate 4-D Experience
Daily | 12 PM – 11 PM
Last Show | 20 min before close
From $12

The Australian Bee Gees show
Mon, Wed, Thu & Sun | 7 PM
Fri & Sat | 5 PM
From $40

The Buffet at Excalibur
MON – SUN: 7 AM – 2 PM
Price Range: $

New York New York

Ride the Big Apple Coaster
Mon – Thu | 11 AM – 11 PM
Fri – Sun | 11 AM – Midnight
From $25

Stroll through Greenwich Village
MON – THU, SUN: 7 AM – 2 AM
FRI – SAT: 7 AM – 3 AM
Price Range: $

See Terry Fator
Sun – Thu | 7:30 PM
From $35

Mad Apple by Cirque du Soleil
Fri – Tue | 7 PM & 9:30 PM
From $25

Park MGM (Formerly Monte Carlo)

Eataly (huge Italian-inspired dining destination)
MON – THU, SUN: 7 AM – 10 PM
FRI – SAT: 7 AM – 2 AM
Price Range: $


Take the free tram to Bellagio, Aria, Crystals, and Park MGM

Aria

  • opened in 2009
  • has 4,000 hotel rooms

Eat at Aria’s Proper Eats Food Hall

  • Laughing Buddha Ramen
  • Easy Donuts
  • Seoul Bird (Korean Street Food)
  • Shalom Y’all (Shawarma, Kebabs)
  • Pizzaoki
  • Wexler’s Deli
  • Egghead
  • Temaki Bar
  • Lola’s Burgers
  • Easy’s Cocktail Lounge
  • Proper Bar

Take the free tram to Bellagio, Aria, Crystals, and Park MGM

The Cosmopolitan

  • Opened in 2010

Eat at Wicked Spoon buffet
Breakfast: $38
Mon – Fri | 8 – 11AM
Lunch: $45
Mon – Fri | 11AM – 3PM
Brunch: $49
Sat & Sun | 9AM – 4PM
Wicked Spoon Menu (PDF)

Have breakfast at Eggslut
Mon – Thurs | 7AM – 2PM
Fri – Sun | 7AM – 3PM


Bellagio

  • Opened in 1998
  • Has 3,933 guestrooms

Walk Through the Bellagio Conservatory
Summer
5/27/2023 – 9/9/2023
Harvest
9/16/2023-11/4/2023
Holiday
11/11/2023- 1/6/2024

Gaze up at Dale Chihuly’s Fiori di Como (a glass floral sculpture)

Watch the Fountains of Bellagio
M-F: Every 30 min from 3 pm to 6:30 pm, every 15 min from 7 pm to midnight.

Sat, Sun, and Holidays: every 30 min from noon to 6:30 pm, every 15 min from 7 pm to midnight.

See Cirque du Soleil’s “O”
Wed – Sun | 7 PM & 9:30 PM
From $79

Eat at The Buffet at Bellagio
MON – SUN: 8 AM – 3 PM
WED – SUN: 5 PM – 9 PM
Price Range: $

Window shop at Bellagio’s high-end shops

Caesars Palace

  • Opened in 1966
  • Has 4,000 guest rooms

Walk the Forum Shops

50,000-gallon Atlantis aquarium

Fall of Atlantis show (free)

Eat at Bacchanal Buffet
Regular Brunch, $60, Thursday – Monday | 9 AM – 1 PM
Dinner: $80, must RSVP, very crowded


Take the free tram

Mirage

  • Opened in 1989
  • Has 3,044 guestrooms

See Cirque Du Soleil’s Beatles LOVE show
7:30 PM, 9 PM
From $69

Watch Shin Lim – Limitless (magic show)
Mon, Thu – Sun | 7:30 PM
From $50

See the atrium and the aquarium

See Mirage volcano show
Every evening at 7 pm, 8 pm, 9 pm, 10 pm, and 11 pm.

Resorts World

  • Opened in June 2021 on the land where Stardust used to be

Watch a show at Resorts World Theatre

Eat at Famous Foods (16 vendors)

Circus Circus

  • Opened in 1968
  • Has over 3,700 guestrooms
  • One of the cheapest hotels on the strip

Midway and Arcade (carnival games)
SUN – THU: 11 AM – 9 PM
FRI – SAT: 11 AM – 12 AM

Eat at THE Steakhouse
Mon – Fri, Sun: 4 PM – 9 PM
Sat: 4 PM – 10 PM
Price Range: $$$

STRAT

SkyPod observation deck
10am – 1am Daily, $20

Big Shot
Daily 2pm – 10pm, $31

Insanity
Daily 2pm – 10pm, $31

X-Scream
Daily 2pm – 10pm, $31

Eat at Top of the World Steakhouse (floor rotates)

Sahara

  • Opened in 1952

Take the Las Vegas Monorail to get to other hotels

Wynn/Encore

See Lake of Dreams (free show)

See “Awakening” show
Sun & Mon at 7 pm
Tue, Fri & Sat at 7 pm and 9:30 pm
From $99

Explore the Conservatory

Treasure Island

  • Opened in 1993

See Cirque du Soleil’s Mystere
FRIDAY – TUESDAY*
2 Shows | 7 p.m. & 9:30 p.m.
Arrive 30 mins early for pre-show entertainment
Actual performance time is approximately 90 mins
$64 – $135

Venetian/Palazzo

  • Venetian opened in 1999
  • Palazzo opened in 2007
  • Both hotels connected by the Grand Canal Shoppes

Walk the Grand Canal Shoppes

Take a gondola ride
$39

Visit Madame Tussauds Wax Museum
10 AM – 8 PM

Harrah’s

  • Opened in 1973
  • Has 2,530 guestrooms

LINQ

High Roller Observation Wheel
Daytime (Daily 12 PM to 7 PM)
Adult $23.50
Night (Daily 7 PM – 12 AM)
Adult $34.75

FlyLINQ Zipline
4 PM – 12 AM
$35

Mat Franco’s Magic Show
7 PM
$49 – $108

Eat at Hash House a Go Go (huge portions)
SUN-THU: 7:30 AM-3 PM
FRI & SAT 7:30 AM-10 PM

Walk the LINQ Promenade (food, shops, etc)

Flamingo

  • Opened in 1940s

See the Wildlife Habitat
7 AM – 8 PM

Check out Piff magic show
Mon, Thurs-Sun: 7pm
From $50

Cromwell

  • Formerly Barbary Coast

Grab a cheap snack at EatWell

Horseshoe (formerly Bally’s)

Check out “Real Bodies
Starting at $29.50

Check out Grand Bazaar Shops out front of Horseshoe

Istanbul Mediterranean in Grand Bazaar shops

Dirt Dog Bar at Grand Bazaar Shops

Happy Lemon

Paris

Take in a Great View from the Eiffel Tower Observation Deck

Planet Hollywood (Formerly Aladdin)

Eat and drink at the Miracle Mile Shops

See Criss Angel Mindfreak magic show
Wed-Sun: 7pm
$69 – $121

MGM Grand

  • Opened in 1993
  • Has over 5,000 hotel rooms

Check out Cirque du Soleil KA
Sat – Wed | 7 PM & 9:30 PM
From $69

See Jabbawockeez (dance show)
Mon, Wed – Sun | 7 PM & 9:30 PM
From $50

See David Copperfield magic show
Sun – Fri: 7:00 PM & 9:30 PMSat: 4 PM & 7 PM & 9:30 PM
From $72

Eat at the Buffet at MGM Grand
MON – SUN: 8 AM – 3 PM
Price Range: $

Tropicana

  • Opened in 1957

Other Attractions

Visit the Sphere
$69 – $129
Opens in Oct 2023

Take picture at the Las Vegas sign

The Grand Canyon
If driving, 4.5 hours from the Strip
Driving directions
Helicopter tours

Hoover Dam
9 AM – 4:15 PM Daily
Last tour departs at 3:45 p.m.
45 mins from the Strip by car
Directions


Watch Vegas: The Show
Nightly at 7 PM
75 mins
$100 – $160

Map of Strip

Customized Strip Hotel Google Map with My Personal Points of Interest

View Map

Hotel Property Maps

Maps on SmarterVegas.com

Weather