Thoughts From My Life

Advice from someone who does not know everything.

Deleting Weight Measurements on the RENPHO App

I recently purchased the RENPHO ES-28ML smart body weight scale. It is a great device and I use it regularly. One issue I had with it was the RENPHO iOS app on my iPhone. How to delete a weight that was recorded incorrectly.

Continue reading

Trade Your Way to Financial Freedom – Book Review

I’m reading Trade Your Way to Financial Freedom right now. Excellent book, in my opinion. I had stopped doing any type of trading personally a couple years ago, but I have always found it interesting so decided to get active in it again.

I’m only going to “paper” trade for right now. This is “fake” trading to see how your performance is before ever risking any real money. A way to prove out a system somewhat to see how it would have done if you traded real money (though if you traded real money it would then have some “effect” on the market and may change the outcome).

“Trade Your Way to Financial Freedom” is a great book that isn’t about teaching you any specific system on how to trade, but it is more about how you evaluate the system you are using and yourself. It does briefly cover a variety of strategies and their basis. Not recommending one or the other, but discussing what is commonly used out there and why it may appeal to different individuals.

Personality

Chapter 3 has a great list of questions that you need to answer about yourself and try to gauge your capabilities. Items like:

  • How much time do you have to trade? Do you already have a full time job?
  • What is your risk tolerance? Will you lose sleep at night if you have money tied up in the markets?
  • What skills do you have? Good at math? Good with computers? Analytical?

Analyzing the System

A lot of terminology is used here but explained very clearly. Reward to Risk ratio is commonly used to guage how good your returns are compared to the risk you are taking. Position sizing is touched on. I’m only 3/4’s of the way through the book, but it has been excellent. I recommend the read to anyone thinking of getting into it.

Ford Pass Experience

I recently purchased a used 2017 F-150 XLT 302A SuperCrew truck. I jumped ahead quite a few years from my 2006 truck I was previously driving. One thing I was pleasantly surprised about was the technology Ford has in its vehicles. In particular the Ford Pass application.

Continue reading

2017 F-150 XLT XTR 302A Supercrew Truck

I recently switched trucks. Went from a 2006 Dodge Quad Cab to the 2017 Ford F-150 XLT XTR 302A Supercrew Shortbox. It felt like the right time to make a change as the family was growing and having a proper crew cab for some more space in the interior seemed like the right choice. In this article I will talk about what I was looking for and why I picked this truck and some of the useful tips and tricks there are with the F-150.

Why This Truck?

I was looking for several things specific to what I wanted and I have listed them in an order that is generally more important to less important.

  • Large seating room in the back. The Supercrew F-150 has loads of room a the back and I have 3 children who are into the school age now, so piling into the back with backpacks and child seats takes up a lot of room.
  • Aluminum body. Less opportunity for rust to set in. I had this issue with my last truck. For a few reasons really. I’m not that diligent in washing my vehicle, I live in a climate where road salt is used, and I park in a heated garage where that salt can just eat away with the moisture from melting snow and ice.
  • XLT trim. This is only the 2nd lowest trim package they offer, but it is the highest trim package that still offers 6 seats (see below). It is also a lot more reasonable in price.
  • 6 seats. This is related to the XLT trim, but we occasionally use that additional seat in the front middle. When you don’t need the seat, the back rest folds down for an arm console that has a storage area with flip up lid and there are also 2 cup holders. There are an additional 2 cup holders that can be made available on the floor if you need.
  • 302A package. This is the top luxury package available on the XLT. Lots of little things such as:
    • Heated seats
    • Large console screen
    • Sync3 infotainment screen that supports Apple CarPlay
    • Remote start
    • LED lighting in the truck bed
    • 400W 110V plugin in the front
  • Shortbox. Only a 5.5′ box, but I don’t need that much room (stores occasional work supplies, load of dirt or bark mulch, and hockey gear). This kept the truck around the same length as my Dodge Quad Cab so it fits in the garage the same way.
  • Has the tailgate step as well.
  • White – I find it easier to keep clean and not show scratches compared to black.
  • Better gas mileage than before. I was driving the Dodge Hemi so gas mileage was worse, but I don’t put enough mileage on for it to really matter. I always could have found a 3.6L pentastar in a Dodge too for better mileage.

What Else Is In It

I wasn’t particular about the engine, but when looking used there are a lot of the 3.5L Ecoboost engines out there, so that is what I ended up with. Mine has that auto stop/start technology, so often while sitting at traffic lights, it will turn the engine off until I’m ready to go again.

In the 2017’s, they started putting in a 10-speed transmission. Took a while to get used to when I started driving as it likes to shift a lot around town. I notice the first shift into 1st gear is a bit hard in the morning too.

I also installed the Truxedo LoPro QT tonneau cover. I had this on my Dodge as well and I loved it. Lifetime warranty and only has one release mechanisms on the left hand side, so very easy to get off. I notice on my Ford that the end gate is a bit tight to get closed, but apparently it wears in after a bit.

I have not decided on where to put my cell phone in the vehicle either. I typically use the vent mount to the right of the steering wheel, but in this truck the shifter is there and blocks the view of the cell phone as it is so close to that vent.

Large back seat area.
Large display, heated seats, 110V plugin.
Cupholders in flip down arm rest of the 6th seat.
Lots of options on the dash
Power port for the rear seating area.

Creating Data-Driven SSRS Reports in SQL Server Standard Edition

I recently had to resolve this issue. I was running SQL Server Standard Edition and needed to have an SSRS subscription that behaved like a data-driven subscription. Data driven subscriptions are available in Enterprise Edition SQL Server, but not Standard.

What is a Data-Driven Subscription

This is a very useful tool in the Enterprise Edition. A regular subscription is simply a scheduled time when a report will run and can be sent to email addresses or saved to a network share. The individual subscription will only run once and utilizes the same report parameters and recipient information.

A data-driven subscription lets you run a database query that returns no results or a set of results. The report is then run as many times as there are row results in the original database query. This allows you to 2 important things:

  • Not run the report if it does not have any meaningful results. e.g. Don’t send anything out.
  • Run multiple reports at once with customized parameters (who it is sent to, the subject of the email, the parameters used to generate the report, etc). This allows you to scale subscriptions really easily without having to go in and create a subscription for each recipient manually every time.

But I Do Not Have SQL Server Enterprise Edition

This means you do not have the data-driven feature when creating subscriptions. If you are doing a lot of data-driven report subscriptions, it may be worth your while to pay for that license as it will be less development time and more intuitive for users to understand what is happening than what I will describe below.

So we will have to come up with an alternative method to achieve something similar.

The Design

  • Publish an SSRS report if it is not published already.
  • Create a regular subscription using the SSRS interface.
    • Set any parameter values that are constant.
    • You may set the other parameters, but they will be overwritten anyways.
    • Set the schedule to have a stop date in the past, this makes sure it is active, but will not run on its own.
  • Create a stored procedure to run our report.
    • Code example in detail below.
    • Needs to run a query that provides how many times you want the report to run and what the override parameters should be.
    • Will loop over the results to:
      • Override the parameters stored in the table.
      • Execute the report.
      • Wait until the report is finished.
      • Continue.
  • Create a SQL Agent job to run the stored procedure on a schedule.

A Note Waiting For Each Report To Finish

Calling EXEC ReportServer.dbo.AddEvent does not block the script until the report is finished. It merely adds the report to the queue to be processed. If the report takes a while to run, this script may overwrite the parameters and settings being used. So it is important to have a loop monitoring the Events table to make sure the report has completed before continuing.

Stored Procedure Example

This example will determine how many reports need to be created and run each report consecutively by waiting for the report to finish before triggering another one.

--Steps to create data-driven like subscription in SQL Server 2016 Standard Edition:
--1. generate a subscription for a single user and note the subscription_id
--2. create stored procedure to update settings and generate reports
--3. schedule a job to run this procedure

-- Notes to Remember
-- Need to use a Job to run this and schedule.  
-- The subscription_id will be generated at the time the report subscription is created
-- The subscription should be set to active with a stop date in the past so it doesn't run on its own if not desired, but is an active report subscription.

IF EXISTS ( SELECT 1 FROM sysobjects WHERE id = object_id('DataDrivenSSRSSubscription_MyExampleReport) AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
BEGIN
DROP PROCEDURE dbo.DataDrivenSSRSSubscription_MyExampleReport
END
GO

CREATE PROCEDURE [dbo].[DataDrivenSSRSSubscription_MyExampleReport]
@subscription_id varchar(50),
@parameter_id int

AS
BEGIN
    DECLARE @v_email varchar(256), @v_parameter1 varchar(256)
@settings varchar(4096), @params varchar(4096), @qry varchar(1024), @wait smallint
           
    DECLARE db_cursor CURSOR FORWARD_ONLY READ_ONLY FOR  
SELECT
*
FROM Some_Table
WHERE Some_Table.parameter_id=@parameter_id

    OPEN db_cursor  
    FETCH NEXT FROM db_cursor INTO @v_email, @v_parameter1
   
    -- looping through the list
    WHILE @@FETCH_STATUS = 0  
    BEGIN  
        -- wait until report has been cleared from the reporting queue
SELECT @wait = COUNT(*) FROM ReportServer.dbo.Event WHERE EventData=@subscription_id
WHILE @wait > 0
BEGIN
WAITFOR DELAY '00:00:01'
SELECT @wait = COUNT(*) FROM ReportServer.dbo.Event WHERE EventData=@subscription_id
END

        -- update parameters before generating report
SET @settings = '<ParameterValues>
  <ParameterValue><Name>TO</Name><Value>'+@v_email+'</Value></ParameterValue>
</ParameterValues>'

SET @params = '<ParameterValues>
  <ParameterValue><Name>Parameter1</Name><Value>'+@v_parameter1+'</Value></ParameterValue>
</ParameterValues>'
UPDATE ReportServer.dbo.Subscriptions
SET extensionsettings = @settings,
parameters = @params
WHERE subscriptionid = @subscription_id

        IF @@error = 0
        BEGIN
            -- run report and send email
EXEC ReportServer.dbo.AddEvent @EventType='TimedSubscription',
@EventData=@subscription_id
        END                
        FETCH NEXT FROM db_cursor INTO  @v_email, @v_parameter1
    END  
   
    CLOSE db_cursor  
    DEALLOCATE db_cursor

END    

References

These are some really good references that may be easier to understand. One note though, they do not cover “waiting for each report to finish before moving on to the next report.”

Replacing Hood Struts on 2006 Dodge RAM 1500

I had to replace my hood struts the other day.  Essentially I would open the hood on my 2006 Dodge RAM 1500 and there wasn’t enough strength left in the hydraulic hood struts to keep the hood lifted.  I ended up having to take a scrap piece of 2×4 wood and jam it to keep the hood up.

So I looked around the local part places and it seemed to be more money that some I could find on Amazon.  I ended up purchasing the hood shocks/struts at this paid link:

ARANA Qty(2) 4364 Front Hood Shocks/Strut/Front Lift Supports/Gas Springs Compatible with 2002-2010 Dodge Ram 1500/2500/3500/4500/5500 (paid link)

Once they arrive, you can probably figure it out yourself, but if not there are many hood strut videos available on YouTube, but I found this one useful.

Creating a Sun Shield for Garage Door Sensor

I have had issues with my garage door not wanting to close depending on the time of day. I have a a north facing garage door and depending on the time of year and time of day, the sun can shine on the door sensors and interfere with them.

The door sensors are the little sensors that are attached near the bottom of the door rails. They are a pair and point at each other. If anything is between the sensors, then it will block the garage door from closing. On my opener, the door won’t even try to close or if it was closing and something got between the sensors, it would go back up. The light on the garage door unit flashes three time until the issue is resolved.

One of my sensors.
Continue reading

Vehicle Bill of Sale

A few years back I was purchasing a vehicle for my wife. It was a good exercise in the process of buying a used car through a private sale. There a a number of issue to take care of and I developed my own little process. You can read about it in my article Negotiating a Private Sale on a Car.This article provides an example of a Bill of Sale or what I call a Purchase Agreement. You should always, always, always have one of these. It defines the actual agreement that you have come to with the seller. You will need it to insure and register your vehicle.Feel free to use this template. I am sick of not being able to find a decent one for free. I have underlined and italicized the sections you will want to fill in yourself. You can copy and paste it into a text editor or try downloading a template:

I would keep the overall sections there, but you can add criteria to each one as you see fit. There might be more or less conditions as well.

Continue reading

Negotiating A Private Sale on a Car

I have learned a lot about negotiating and due diligence on a car when buying privately. This is from my own experiences and talking to other people that have purchased used vehicles and what they feel is important. If you don’t think you need to do any of these items, then feel free not to.I just whipped this article up from my recent experiences and I will continue to add to it over the next few weeks.

Continue reading

Stupid to the Last Drop by William Marsden

I just finished reading Stupid to the Last Drop: How Alberta Is Bringing Environmental Armageddon to Canada (And Doesn’t Seem to Care). It is a very interesting look at the oil industry in Alberta and I would recommend it for anyone who lives in Canada or is from here to read.

It covers a lot of history as to how the industry developed and is also very critical of the Alberta government and industry in general in terms of the environmental policy (or lack thereof).

Be warned: it is very critical and does not portray a very positive image of the province in general. Regardless of your opinion though, it is a worthwhile read with a lot of interesting points to consider and debate.

Below is a paid link to purchase the book.

« Older posts