david-img

Breaking News Bot Development Part 3

01 Mar 2022 - David Baker

Tag: breakingnewsbot

This is the 3rd and final post on my series about my Breaking News Bot App, a news app with a bias slider to observe how political spin changes the narrative of certain topics. This post could also be titled “How Not to Release an App” or “Don’t be Lazy”. In my original post I mentioned how I used the Bing News API because I was trying to avoid the work of becoming my own news aggregator for this purpose. Both the idea and the code was simple and I didn’t want to over complicate it. The pricing of the Bing API at $6 for 1000 api calls is something I knew wouldn’t scale well but if this didn’t generate interest or traffic then it wouldn’t matter much anyway. In fact, I had the app up a few months (with minimal traffic) and received Azure bills for .17 cents / month and .30 cents per month. In order to reduce that potential bill even further I added client-side caching, so any topic/bias combination searched by a client n number of times would only burn 1 api call. In order to determine if I could be done with this app or have to re-engineer it, I posted it on reddit to gauge interest.

... read more

.NET Core App on Linux Server Does Not Read Environment Variables

23 Feb 2022 - David Baker

Tags: linux dotnet

If you’re reading this you might’ve already tried setting your Environment Variables in /etc/profile or /etc/environment or possibly ~/.bashrc and it’s still not being picked up in c# by Environment.GetEnvironmentVariable("API_KEY") (for example).

... read more

Deploy a .NET 6 Webapi and Angular UI to Ubuntu Server

11 Feb 2022 - David Baker

Tags: digitalocean linux code angular dotnet breakingnewsbot

This is part 2 of my Breaking News Bot project. This post is mostly on the infrastructure I used to host it. I will walk you through how to set up a .NET 6 Web Api backend and Angular Front end application on a $5/month DigitalOcean droplet running Ubuntu 20.04. More realistically this is going to serve as my own reference when I forget how I configured my server and need to do it again.

... read more

Unable to resolve service for type 'Microsoft.EntityFrameworkCore.Storage.TypeMappingSourceDependencies'

06 Feb 2022 - David Baker

Tags: dotnet code

I just had the rare experience of googling a programming error and only getting 1 result, which also happened to be in a foreign language:

... read more

Digital Ocean SSH Firewall: Connection Timed Out

01 Feb 2022 - David Baker

Tags: digitalocean linux

If you’re like me you might’ve locked yourself out of your DigitalOcean linux droplet by enabling your firewall using sudo ufw enable without allowing SSH first. This means that after you exit the terminal you will no longer be able to SSH into the droplet from either your own terminal or the DigitalOcean console.

... read more

Jekyll: Uncaught SyntaxError: unexpected token: identifier

11 Dec 2021 - David Baker

Tags: jekyll code

If you encounter this in Jekyll where a blog post seemingly is not working when clicking on it, it might be because you have an apostraphe in the file name, like this:

... read more

Books I've Read in 2021

11 Dec 2021 - David Baker

Tag: books

This is not a complete list since I’ve forgotten what I read earlier in the year before my blog. But that’s ok, because I did just read Forgetting: The Benefits of Not Remembering which argues that forgetting things is an important and healthy part of brain function. So I’m pretty healthy.

... read more

Lets Create A Biased News App

20 Nov 2021 - David Baker

Tags: code breakingnewsbot

This post is going to cover some of the challenges I faced when making my biased news aggregator Breaking News Bot. I will probably make a follow up post about how it was coded.

... read more

The Premonition Book Review

30 Oct 2021 - David Baker

Tag: books

I listen to Michael Lewis’s podcast Against The Rules, so when I heard he wrote a book on the pandemic called The Premonition I scooped it up on Audible. The book follows two public health experts, Charity Dean and Carter Mecher, as they navigate what would appear to be a tremendous amount of barriers put in place to prevent the country from an effective pandemic response. The book identifies something called “The L6” which is referring to an interesting observation that whenever something goes wrong in an organization, the people most likely to know the most about the problem are 6 layers deep from the top. Charity Dean and Carter Mecher are the L6.

... read more

A Case For Alcohol

25 Oct 2021 - David Baker

Tag: books

I finished reading Drunk: How We Sipped, Danced, and Stumbled Our Way to Civilization by Edward Slingerland. The book is an entertaining read because it’s a combination of social psychology, evolutionary history, and a history of alcohol. Peppered with some quality quotes from historical figures about alcohol. Did you know George Washington made the case to Congress to open several distillaries as critical to the moral of his army? This is despite the fact that he won several battles because the enemy was drunk, so he was well aware of the negative effects.

... read more

Site Conception

24 Oct 2021 - David Baker

Tags: jekyll code

Welcome to my new site. I previously had a Wordpless blog, but the site wasn’t really worth the $5/month I was paying in hosting. Plus, the management of the site was just a tedious excercise in using the Wordpress Admin Panel that didn’t really teach me anything about programming. When I discovered Jekyll I realized I could create exactly what I wanted: a personal website that doubles as a blog (without a database) and is hosted for free on Github pages.

... read more