Tag: Coding
Keep it Simple, Private Free Podcasting
This isn't about making a secure podcast, and it's not about making a popular big podcast. It's about making a simple private but non-secure podcast for free. This is what I did when deciding to read a book for my wife because, inexplicably to me, she really loves my voice. Â This is not meant to be an idiot proof guide but hopefully if you have some rudimentary programming or scripting skills you'll find it helpful. Â If you don't, then feel free to hack away or make your life more carefree and go with lipsyn.com
I chose to use free Dropbox and to do the rest myself "manually".  The steps are:
- Record what you want to post and export to mp3 format (see other post if I get around to it).
- Create an RSS file to describe your podcast in a way podcast players understand.
- Put all your podcasting related files in a publicly shared Dropbox folder, audio files, rss (xml) file, and image files.
- Access the the rss file from a podcast app.
Lets get to it.
Setup
- Have ready your recorded files. Â Assume it's called "episode1.mp3".
- Create a square 1400x14000 pixel image file for your podcast called "mypodcast.jpg"
- Create an "index.html" file for your podcast, it can be as simple as
<html> This is my podcast </html>
Create your RSS file
Create a text file named "mypodcast.rss" and edit it.
This is a XML file so you may be familiar with the formatting from other xml files or other files with a similar format.
Enter the following text in the file:
<?xml version="1.0" encoding="UTF-8"?> <rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"> <channel> <!-- Basic info on the Podcast--> <title>The Title Of My Podcast</title> <link>the_path_to_index.html</link> <lastBuildDate>Fri, 14 Sep 2018 00:10:00 -0500</lastBuildDate> <language>en-US</language> <itunes:author>My Name</itunes:author> <itunes:summary>Summary description of my podcast</itunes:summary> <description>Description of my podcast</description> <itunes:explicit>no</itunes:explicit> <itunes:keywords>keywords for my podcast</itunes:keywords> <itunes:owner> <itunes:name>My Name</itunes:name> <itunes:email>sigthorsson@gmail.com</itunes:email> </itunes:owner> <itunes:category text="Arts"/> <itunes:image href="path_to_mypodcast.jpg"" /> <copyright>Copyright 2018</copyright> <webMaster>myemail@gmail.com (my name)</webMaster> <atom:link href="path_to_mypodcast.rss" rel="self" type="application/rss+xml"/> <item> [Stuff described in the next step] <\item> </channel> </rss>
So far, except for the file paths, everything else above is fairly self explanatory where you can put in your own descriptions and information. Â Make those substitutions.
Next replace the item field as follows:
<item> <!-- Each item: update the title, pubDate, link=guid=enclosure url (lenght=number of bytes), subtitle, summary, duration --> <!-- Episode comment, doesn't appear anywhere --> <title>My episode 1 title </title> <pubDate>Sat, 14 Apr 2018 00:30:00 EST</pubDate> <link>path_to_episode1.mp3</link> <guid isPermaLink="true">path_to_episode1.mp3</guid> <description> Description of my episode 1 </description> <itunes:author>My name </itunes:author> <itunes:subtitle>Subtitle of my episode </itunes:subtitle> <itunes:summary>Summary description of my episode</itunes:summary> <itunes:keywords>Reading</itunes:keywords> <itunes:explicit>no</itunes:explicit> <itunes:duration>00:41:51</itunes:duration> <enclosure url="path_to_episode1.mp3" length="20107307" type="audio/mpeg"/> </item>
Look at you episode1.mp3 file, find the duration of the file and the size of the file (in bytes). Â On a Mac you can get both those pieces of information by right clicking the file and selecting "Get info". Â Fill in the following
- The <itunes:duration> field in units of "hours:minutes:seconds"
- The length="..." as the size of the file in bytes, don't use ","s or "."s, just a string of digits.
This is enough for now, we'll get back to it once we've uploaded the files.
Upload to Dropbox
Create or log in to your Dropbox account.
For ease, you can install the Dropbox sync app and use a synced folder on your computer  for all your podcast files (.mp3 files, .html, and .rss)
- Upload your episode1.mp3, mypodcast.rss, mypodcast.jpg and mypodcast.html files into a Dropbox folder.
- Share the Dropbox folder and make it viewable by anyone (mouse over the folder, click the share button and select the option).
- Go into the folder.
- Mouse over each file, click the share button, click create a link.
- Copy each link name, it will have a format something like this:
- https://www.dropbox.com/s/p67vykeok9fo3fq/episode1.mp3?dl=0
- Create raw links by change substituting "/s/" with "/s/raw/" and removing the "?dl=0", example:
- https://www.dropbox.com/s/raw/p67vykeok9fo3fq/episode1.mp3
Add Links To The RSS File
Take all the shared links you recorded in the previous step and update the mypodcast.rss file. Â Replace all the "path_to_..." files with the appropriate Dropbox raw links.
Make sure the mypodcast.rss file in Dropbox is synced with the mypodcast.rss file you just edited.
Accessing Your Podcast
Go to your favorite Podcast app, like Overcast, and use the raw link you created earlier for mypodcast.rss and add it as a podcast feed.
Done!
Your podcast should now be working and coming up on your Podcast app with the icon image for your podcast and your one episode listed with it's title showing.
Adding More Podcast Episodes And Additional Notes
To add more episodes simply do the following:
- Record a new audio file, "episode2.mp3"
- Upload the file to Dropbox and create a raw link as before.
- Create the text for an <item> for episode2 as described before for episode1, updating the path, title, duration, and length for the file.
- Add the text below the <\item> for the previous episode.
- Don't forget to set the correct (or desired) date and time for the episode
- Update the <lastBuildDate> to the current date time (this should trigger the Podcast app to actually check the rest of the rss file and show you the new episode).
- Make sure the .rss file is synced.
Student Loan Calculator
Student Loan Calculator - Documentation
(Version 1.0)
The Student Loan Calculator is intended to help with student loan repayment planing when things are not just simple and static. For professions such as physicians with federal loans, income based repayment may be available with loan forgiveness at the end of the initial loan period. Physicians are also commonly expected to have a huge jump in their income level at some point during the original loan period. I have come in contact with some misleading information around these topics and often “back-of-the-envelope” calculations fail to capture the basic scope of the problem.
I’m not a financial expert, I’m not giving any official financial advice, but I am an engineer, scientist, and proficient at maths. My family and I have some skin in this game of student loans and I got tired of getting half answers and relying on just intuition despite good success. Therefore, I created this little tool to help get some reasonable financial estimates and gain some insight into problems similar to mine and perhaps also yours. It’s not a perfect tool but I think the estimates are good enough to inform some of my personal and family financial decisions.
After describing the loan parameters, the following repayment plans are considered
- Minimum Repayment Plan
- Aggressive Repayment Plan
- Aggressive Two Phase Repayment Plan
- Income Based Repayment Plan With Possible Loan Forgiveness
Comparison Results of the repayment plan calculations are presented in a small graph.
Saving/Investment comparisons are also presented
- Savings Comparison 1 (minimum number of extra payments)
- Savings Comparison 2 (maintain extra payments)
The link below the “Comparison Results” section provides a url link with your current settings of the calculator that can be used to save or share results.
The following sections describe the repayment plans and the workings of the calculator.
Standing Assumptions / Comments
- Any extra loan payments are assumed to go towards paying (lowering) the principal of the loan
- THIS IS VERY IMPORTANT: If you are paying more than the minimum payments on your loans, make sure that those payments are going towards the principal of the loan. Some lenders may default to putting the extra payments towards future interest which doesn’t help you pay off the loan faster or more efficiently in most all cases.
- The pay-period is a month, i.e., 12 pay-periods per year. So payments are made every month and interest is calculated every month (APR/12).
- Unless otherwise stated, parameters such as payments per month and interest rates are assumed fixed.
- Interest is normally calculated as compound interest.
- For the saving/investment and loan projections.
- The only exception currently is a presentation of a special case shown in the “Other Results/Warnings/Comments:” textbox: if the phase 1 income based repayment plan monthly payment is less than the current interest.
- All text input entries are expected to be positive numbers with “.” as the decimal point and no other characters. Example: a loan principal of $200,123.11 loan should be entered as 200123.11 in the Current Loan Principal field in the Loan Parameters section. The calculator won’t yell at you if you do something wrong, like entering letters or zero or negative or non standard numbers, the results will just be garbage, e.g. NAN, negative numbers, nonsense.
- Another programming note, weird things can happen if you set a rate to zero so if you want to look at such cases (not sure why) then just set the rate to an extremely low value to estimate the results (e.g. 0.0001% will be fine, too close to zero and you’ll see numerical issues arise).
Loan Parameters
The parameters are:
- Current Loan Principal
- The current principal of the loan
- If you have multiple loans, then this should be the sum of the principals
- Loan APR
- The annual interest rate of the loan
- The APR is assumed to be fixed
- If you have multiple loans, then you can estimate the APR as the weighted average of the loans (e.g. loan one is for $10,000 at 4%, loan two is for $20,000 at 6%, then the weighted average is (10000x4+20000x6)/(10000+20000)=5.33%
- Keep in mind that if one loan has significantly higher interest than another, then if you pay more than the monthly minimum payment, pay it towards the highest interest loan. This will lower your total payment on aggressive repayment plans.
- Loan Period
- The period of the loan
- If you are unsure of the period and are currently not in any special repayment program, then your minimum payment should be set such that you will pay the loan off on time.
- If the above applies, then you can estimate the period of the loan by tweaking the loan period until you get your minimum monthly payment in the Minimum Repayment Plan section.
Repayment Plans
Minimum Repayment Plan
This is the nominal plan if you can afford it.
There are no editable parameters.
The calculated fields are:
- Min Monthly Payment
- The minimum monthly payment which makes you to pay off the loan on time.
- Throughout this document, when referring to the minimum monthly payment or original minimum monthly payment then this is that amount unless otherwise explicitly stated.
- Total Paid
- The total amount you will pay on this plan.
Aggressive Repayment Plan
This is likely the best plan if you can afford more than the minimum payment.
The parameters are:
- Extra Payment
- The amount you plan to pay every month that exceeds the monthly minimum payment.
- These payments go 100% towards lowering the principal of the loan.
The calculated fields are:
- Monthly Payment
- The extra payment plus the minimum monthly payment.
- Loan Paid In
- How long it will take to pay off the loan under this plan.
- This will be shorter than the loan period.
- Total Paid
- The total amount you will pay on this plan.
Aggressive Two Phase Repayment Plan
This is the same as the aggressive plan but in two phases. If you expect to have a huge jump in income during the loan period, you are likely to be able to afford to pay more at a later date.
For example, if you are a physician resident earning a 1/4 of your minimum expected pay in 3–5 years.
If you have a drop in disposable income during your loan period, you may afford to pay less extra at a later date.
For example, due to foreseeable life events such as loss of employment, relocation, or expanding your family, all of which may reduce your disposable income. These cases can also be modeled here by lowering the extra payment or possibly taking advantage of a lower minimum monthly payment needed to complete paying off the loan on time, assuming the terms of your loan allows for that (they should, assuming you were allowed to pay towards the capital of the loan).
The editable parameters are:
- Phase 1
- Extra Payment
- The amount you plan to pay every month during phase 1 that exceeds the monthly minimum payment.
- Period
- How long you will apply the phase 1 extra payment.
- Extra Payment
- Phase 2
- Extra Payment
- The amount you will pay every month during phase 2 that exceeds the monthly minimum payment for phase 2
- The original minimum monthly payment is more than the minimum monthly payment for phase 2 if the phase 1 extra payment is greater than 0.
- Extra Payment
The calculated fields are:
- Phase 1
- Monthly Payment
- The extra payment plus the minimum monthly payment.
- Total Paid
- The total amount you will pay on this plan during phase 1.
- Loan Principal Remaining
- The loan principal remaining after phase 1
- Monthly Payment
- Phase 2
- Adjusted Monthly Payment
- If the extra payment in phase 1 is greater than 0, then the principal of the loan is less than it would be applying the original minimal payments.
- This is the minimum monthly payment needed to pay the loan on time according to the loan period, given that phase 1 has paid off more than the minimum.
- Monthly Payment
- The extra payment plus the adjusted minimum monthly payment.
- Total Paid
- The total amount you will pay on this plan during phase 2.
- Adjusted Monthly Payment
- Results:
- Loan Paid In
- How long it will take to pay off the loan under this plan.
- This will be shorter than the loan period.
- Total Paid
- The total amount you will pay on this
- Loan Paid In
Income Based Repayment Plan With Loan Forgiveness
Some loans allow for income based repayment, possibly lower than the minimum payment on the loan in order to pay it back on time. Furthermore, if there is a remaining balance at the end of the loan period, that balance is forgiven. For example, a physician may work for a non-profit organization and at the end of the loan period, may have been working there long enough to qualify for loan forgiveness.
The motivating example for this is if a person has the option to live frugally enough to make extra payments but might also qualify for forgiveness. What will allow for minimum total payment? Will faster repayment be sufficient to result in a lower overall payment than to take advantage of potential forgiveness at the end of the loan period.
Special Case: If the income based repayment is less than the interest being accrued on the loan, then the nominal case is that the unpaid interest is added to the principal. In the “Other Results/Comments/Warnings” text field, an alternative case is computed where the remaining interest is forgiven. There are certain loans and repayment plans that correspond to this case. There are also loans where 50% of the remaining interest is forgiven but that case is not considered here. The total payment for such a loan will be somewhere between the nominal and the interest forgiven cases that are considered.
The editable parameters are:
- Federal Poverty Level Income
- Used for calculating the income based repayment
- In 2017: about $12,060 for individuals, $16,240 for a family of 2, $20,420 for a family of 3.
- Source
- Income Based Repayment Rate
- Used for calculating the income based repayment
- Probably either 15% or 20%, depends on the program and loan
- Phase 1
- Adjusted Gross Income
- From your tax forms, the adjusted gross income for yourself and your spouse (even if you file separate tax returns).
- Period
- How long the phase 1 adjusted gross income applies
- Adjusted Gross Income
- Phase 2
- Adjusted Gross Income
- From your tax forms, the adjusted gross income for yourself and your spouse (even if you file separate tax returns), after the phase 1 period.
- Adjusted Gross Income
The calculated fields are:
- Phase 1
- Monthly Payment
- Monthly payment during phase 1.
- The lesser of:
- The minimum payment
- The income based monthly repayment, which is:
- (Adjusted gross income - Federal Poverty Level)*(Income Based Repayment Rate)/12
- Total Paid
- The total paid during the phase 1 period.
- Loan Principal Remaining
- Amount remaining of the principal after the phase 1 period.
- If the phase 1 monthly payment is less than the interest of the loan, then the interest remainder is added to the principal each month.
- Monthly Payment
- Phase 2
- Adjusted Min Monthly Payment
- The minimum payment needed after phase 1 to pay the loan on time.
- If phase 1 resulted in a monthly payment less than the minimum payment, then this will be greater the original minimum payment.
- According to phone calls with federal student loan officers/advisors, this is how adjust income repayment plans work for those loans.
- Monthly payment
- Monthly payment during phase 2.
- The lesser of:
- The adjust minimum monthly payment for phase 2
- The income based monthly repayment, which is:
- (Adjusted gross income - Federal Poverty Level)*(Income Based Repayment Rate)/12
- If your income goes up sufficiently, then provided that the adjusted minimum payment is lower than the income based monthly payment, your payment will go up to the point of paying the loan off on time and there will be no remaining balance to forgive.
- Total Paid
- The total amount paid during phase 2
- Adjusted Min Monthly Payment
- Results
- Total Paid
- The total amount paid during both phase 1 and 2
- Amount Forgiven
- The remaining loan balance after phase 2
- This amount is assumed to be forgiven and not accounted for in comparing the payment plans
- Note that the total paid amount is the number you’ll be more interested in. If you end up paying more than on a different plan that you find feasible, then the amount forgiven is really irrelevant, and the financially superior plan is the one with the lower total amount paid.
- Total Paid
Compare Results
Total Payments
The length of the bars shown are proportional to the total amount paid under each repayment plan, as indicated by the text on each bar. The text at the end of the bar restates the amount.
This allows for a quick comparison of the total amount paid under all the plans and helps evaluate which one fits your finances best, or if the differences are small enough for you to rather be guided by other life goals.
Savings/Investments comparisons are also made and are discussed in the next section.
Saving/Investment
The editable parameter is:
- Savings/Investments APR
- The annual rate of return on you savings/investments
- As a rule of thumb you can guesstimate:
- 0.x% for savings accounts
- 1% for CDs
- 2–3% for bonds
- 5–10% for index funds (over long multi year horizon)
- Retirement savings (e.g. 401k/Roth) are usually a mixture of bonds and market funds but also have some extra tax incentives and possibly employer matching.
- If you have the chance to get employer matching towards a retirement fund, then that is 50–100% multiplier on the money you put in. This is most always going to be your top priority over paying more than a minimum on long term loans or paying into other savings.
Savings Comparison 1 (minimum number of extra payments):
This is attempting an apples-to-apples comparison given that you can afford the aggressive repayment plan and that you can sustain paying the original minimum payment throughout original loan period.
For example, if you can afford the minimum repayment plan throughout the loan period but are able to live extra frugally for a while and execute the aggressive plan. How much will you have saved on each plan if you put your extra funds towards savings/investments.
The length of the bars show the savings accumulated on each plan according to the list below. The text shows the total savings.
- The Minimum
- During the time that the aggressive plan is paying off the loan, payments are made towards savings equaling the extra payment amount for the aggressive plan.
- Thus, during the first few months/years of the loan, while the aggressive is paying off the whole loan, payments are being made here to savings. Those savings then earn compound interest until the end of the original loan period without further additional payments.
- The Aggressive
- After loan is paid off, payments are put into savings each month equaling the original minimum loan payment until the end of the original loan period
- Thus, no payments are made towards savings during the time the loan is being payed off. But after that, payments are made towards savings and those savings earn compound interest.
Savings Comparison 2 (maintain extra payments):
This is attempting an apples-to-apples comparison assuming you can afford the aggressive repayment plan throughout the original loan period.
For example, if you can afford the aggressive repayment plan throughout the original loan period: How much will you have saved on each plan if you put your extra funds towards savings/investments throughout the original loan period.
The length of the bars show the savings accumulated on each plan according to the list below. The text shows the total savings.
- The Minimum
- During the loan period, payments are made towards savings equaling the amount of extra payments under the aggressive plan.
- The savings earn compound interest throughout the loan period.
- The Aggressive
- After loan is paid off, payments are put into savings each month equaling the aggressive monthly payment until the end of the original loan period.
- Thus, no payments are made towards savings during the time the loan is being payed off. But after that, an unchanged amount of monthly payments are made towards savings and those savings earn compound interest.