Image for post
Image for post

The life and posthumous appearances of David Belasco.

Today if you go to New York City you can see a Broadway show at the David Belasco theater.

And if you do, you just might run into the theater's namesake — David Belasco. And that’s really odd because David Belasco has been dead since 1931.

David Belasco has been dead since 1931.

Image for post
Image for post
My family @ the David Belasco theater in NYC

David Belasco was one of the most prolific playwrights and Broadway producers in the history of American theater.

He wrote, produced, or directed more than 100 Broadway plays. By the age of 54 David Belasco knew an immense amount about how theaters run, he had strong opinions about how theaters should run, and he had the resources to build a Broadway theatre the way he wanted it. …


Image for post
Image for post
Photo by Daniel Muuo on Unsplash

My quick notes on choosing a great activation function for a neural network.

Consider a neuron. All it does is calculate the sum of its “weighted” inputs and adds the bias on that:

y = ∑(weight∗input) + bias

Because Y can be any value from (-inf, +inf), activation functions are the deciding factor of whether a neuron should fire or not (be on or off, 0 or 1, etc.)

Why use an activation function? Well, there are a few good reasons, but the most important is that activation functions introduce non-linearity into the network. A neural network without activation functions is basically just a linear regression model and is not able to do more complicated tasks such as language translations and image classifications. …


Gathering data without those pesky databases

Image for post
Image for post
Photo by Markus Spiske on Unsplash

Web scraping is a great way to create dynamic websites without having to contact a database for information.

To get started with web scraping, you should know how a website is structured. If you right-click on a page and click inspect (on Chrome), you can see the developer tools.

Image for post
Image for post

This shows you the structure of the website’s HTML/CSS/JavaScript code, as well as network performance, errors, security, and much more.

Now, let’s say I want to grab the first image that you see on Twitter programmatically in the JavaScript console.

Well, I could right-click on the image, click inspect, right-click on the element in the dev tools, and copy the CSS selector. …


Quick tips for showing off your code beautifully

Image for post
Image for post
Photo by Kevin Ku on Unsplash

Support for code on Medium has never been good — but here’s how to make it great.

If You Want People to Copy/Paste Your Code…

…definitely use GitHub gists or JSFiddle snippets.

To use gists, I would highly recommend installing the Code Medium Chrome extension. It takes away the hassle of creating, naming, and putting your code into the gist.

To actually insert the gist into your Medium piece, don’t copy and paste the embed script into your article.

You have to select the code symbol (<>) from the Medium paragraph options, paste the gist’s URL into the line, and press enter for your code to appear in the article. …


Image for post
Image for post
Photo by Markus Spiske on Unsplash

You. Must. Do. This.

Hashing algorithms are one-way functions. They take any string and turn it into a fixed-length “fingerprint” that is unable to be reversed. This means that if the data is compromised, the hacker cannot get the user’s passwords if they were hashed because at no point were they ever stored on the drive without being in their hashed form.

Websites using hashing typically have this workflow:

  1. A user creates an account
  2. Their password is hashed and stored on the base
  3. When the user attempts to log in, the hash of their entered password is compared to the has stored in the…


It’s better than I imagined

Image for post
Image for post

A while ago, I was trying to find something interesting to read about online when I bumped into Rust. Rust is …

“a language empowering everyone
to build reliable and efficient software.”

In short, it is a systems programming language. A freaky fast one, at that. It even outperformed C++ in many of the benchmarks tests run by The Computer Language Benchmarks Game (mostly having to do with complex algorithmic tasks like binary trees, etc).

Before I started to delve more into the language itself, though, I searched about to see what people were thinking of it. Rust was created in 2011 and is backed by Mozilla (the not-for-profit). It has a sort of niche group following it consisting mostly of previous C/C++ developers who wanted a break from the null pointer exceptions, undefined behaviors, language complexity, crazy macros — shall I go on? Although Rust is still in its early stages of maturity, it has a website devoted to following its development of game programming, which is pretty sweet. There are even some games that are gathering a lot of buzz and have even been put into the App Store and the Google Play Store such as A Snake’s Tale. Rust even has an AMAZING package manager called cargo which is comparable to npm and has had almost 1.5 …


An introduction to machine learning.

In machine learning, there are two main algorithms to get your computer to act smart: supervised and unsupervised learning.

In supervised learning, the computer is given data about the subject usually being inputs and outputs. The most common use of supervised learning is to classify objects. For example, I might give my computer a set of pictures of dogs and I want it to output 0 for Pekingese, 1 for Golden Retriever, and 2 for German Shepherd. To train this computer to recognize the dogs, I would give it millions of dog pictures with their respective numbers attached to each image. …


Back when I was using Ghost as my blogging platform, I had a problem. I wanted to keep my blog backed up, but I was too cheap to pay the extra $1 a month for Digital Ocean to do it for me.

Being me, I found a hacky way around paying.

I wrote a script to zip my ghost folder and push it up to my GitHub in some repo specifically for storing backups. Using cron, I made it run weekly. It worked great! …


Image for post
Image for post

Let’s begin with the formal definition of recursion: “A function is recursive if it is defined in terms of itself”.

Or, in other words, a function is recursive if it calls itself.

The classic math example is the factorial function. The factorial of a number is the product of all whole numbers below it down to 1. This can also be restated as: the factorial of a number is itself multiplied with the factorial of itself minus one. The factorial of 0 is 1. The factorial function is denoted by an exclamation mark.

Image for post
Image for post

Here is the factorial function for the first 5 numbers (0, 1, 2, 3…


Image for post
Image for post

TypeScript? Why? How?

Typescript is a programming language that compiles into JavaScript. This means that any valid JS (JavaScript) code is valid TS (Typescript). TS is a language for the developer. If you have every written a bunch of Javascript code and started to wonder, “hey, what was the type of that function parameter, again?”, you understand.

Typescript is “JavaScript that scales” meaning it enforces types on all variables/return values, allows for interface use, and much much more. Typescript also implements some feature that are supposed to come to Javascript in the future.

Getting Started

Typescript is a compiled language which means it needs a compiler. You will first need NodeJS installed (TS is almost always used with Node). Then type npm i -g typescript to install TS globally on your computer. If typing tsc -v works and yields the version number of your TS installation, you're good to go! …

About

Danny Denenberg

Singer, dev, native omahan; dannydenenberg.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store