How did I not know that this existed? Here’s a parody of Under the Sea, the bouncy song from Disney’s animated film The Little Mermaid, but instead of being about why life is better under the sea, it’s about why programming is better with C than with any of those newfangled programming languages with their classes and whatnot:
This amuses me to no end.
When I was a DJ at Clark Hall Pub, the engineering pub at Crazy Go Nuts University, among the alt-rock songs that were guaranteed to pack the dance floor was a strange outlier that started as a joke but turned into a hit that had to be played at least once a night: Under the Sea!
It’s also the time when I got proficient in C, as it was one of the acceptable programming languages for using in assignments. The other one was Turing, and yes, there’s a reason you haven’t heard of it. (One of my favorite professors, Dr. Michael Levison, used to say that Alan Turing would probably be horrified at the programming language that bears his name.)
I may have to add this one to my accordion repertoire.
The article demonstrates the most basic use of the Auth0.swift SDK, the Auth0 SDK for all Apple platforms — not just iOS, but macOS, iPadOS, watchOS, and tvOS. It’s Auth0’s third most-used SDKs, accounting for more than one in ten API requests to Auth0 systems!
It’s a two-part tutorial. Part 1 of the tutorial starts with File → New Project…, adds some basic interactivity, adds the Auth0.swift package, walks you through setup on the Auth0 side, and finally enables login and logout:
The app’s “logged out” screen.
Auth0’s Universal Login.
The app’s “logged in” screen.
Part 2 of the tutorial takes your basic login/logout app and gives it the ability to read user information from the user profile and display it onscreen:
Organized by Michael Berlet, it’s a weekly meetup for software developers at Tampa’s big food hall/gathering place, Armature Works, which provides a wide variety of food and drink.
We are a group of professional, freelance, and amateur software developers living in the vicinity of downtown Tampa.
If you’re sick of impersonal online developer webinars and want to meet, make friends, and network with other developers in physical space, then this is the group for you. We’re informal, and like to chat about work, personal projects, and life in general.
Kotlin developers who want to get into data science: these articles are for you! They’re about using Jupyter Notebook, but with Kotlin instead of Python. Why should Pythonistas make all the big bucks?
Read the articles, which appear on RayWenderlich.com (the premier mobile development site, and it’s where I learned iOS and Android dev) in this order:
Beginning Data Science with Jupyter Notebook and Kotlin: Once you’re familiar with krangl, it’s time to get familiar with data frames and working with datasets. This article will help you get started by exploring real data, crunching it, and even getting some insights from it.
We came up with a solution that I like to call the “close enough” algorithm. It goes through the guess word one character at a time, comparing the current guess word character with the goal word character in the same position.
When making those character-by-character comparisons, the function follows the rules:
Here’s the “close enough” algorithm, implemented in Python…
def wordle(guess_word, goal_word):
# Go through the guess word one character at a time, getting...
#
# 1. index: The position of the character
# 2. character: The character at that position
for index, character in enumerate(guess_word):
# Compare the current character in the guess word
# to the goal word character at the same position
if character == goal_word[index]:
# Current character in the guess word
# matches its counterpart in the goal word
print("green")
elif character in goal_word:
# Current character in the guess word
# DOESN’T match its counterpart in the goal word,
# but DOES appear in the goal word
print("yellow")
else:
# Current character DOESN’T appear in the goal word
print("gray")
…and here’s the JavaScript implementation:
function wordle(guessWord, goalWord) {
// Go through the guess word one character at a time
for (let index in guessWord) {
// Compare the current character in the guess word
// to the goal word character at the same position
if (guessWord[index] == goalWord[index]) {
// Current character in the guess word
// matches its counterpart in the goal word
console.log('green')
} else if (goalWord.includes(guessWord[index])) {
// Current character in the guess word
// DOESN’T match its counterpart in the goal word,
// but DOES appear in the goal word
console.log('yellow')
} else {
// Current character DOESN’T appear in the goal word
console.log('gray')
}
}
}
I call the solution “close enough” because yellow is a special case in Wordle. If the guess word is ATOLL and the goal word is ALOFT, the first L in ATOLL should be yellow and the second should be gray because there’s only one L in ALOFT.
We didn’t settle on the “close enough” algorithm — it was just enough for that night’s session. In the next session, we’ll refine the algorithm so that it matches Wordle’s!
Want to become a better programmer? Join us at the next Think Like a Coder meetup!