I’m on a very distributed remote team at Auth0. I’m in Tampa, with teammates in Spain, Italy, Argentina, the north and south US west coast, Australia, and more. Slack is our combination hallway, water cooler, and memorandum system, and it’s down at the moment.
I thought I’d commemorate the first work tool outage of 2021 andthe official end of Flash support with the meme pictured above, along with the classic animation from which it came. And here’s hoping that Slack comes back online soon!
It’s the start of a brand new year, and in the world of developer YouTube, that means one thing: A whole lot of videos on the topic of the programming languages that you must know or learn for the upcoming year.
In a non-pandemic year, “Top programming languages for 2021” is a relatively easy topic to cover, and one that’s sure to attract some extra search-based viewership. In the year after the one we just had, a good number of people who are trying to pivot to software development, and a title like “Top programming languages for 2021” is pure YouTube audience bait.
Since I had some time to kill while reformatting one of my machines over the holiday break, I decided to enter the search term top programming languages for 2021 into YouTube’s search field and see what came up. To keep the number of videos down to something manageable, I considered only videos posted after the start of November 2020.
A lot of the same recommendations
Creative Commons photo by Doug Kline. Tap to see the source.
I ended up watching 17 videos, and there was a high degree of overlap in their recommendations:
Language
Recommendations
JavaScript
17
Python
16
Go
12
Java
11
C#
10
Kotlin
10
C / C++
9
PHP
9
Swift
6
R
3
Rust
3
Ruby
2
SQL
2
TypeScript
2
Dart
1
Shell scripting
1
Unsurprisingly, every video recommended JavaScript and all but one recommended Python. The more interesting results were further down the list including:
A surprisingly high number of recommendations for Go and C/C++ — lower-level systems programming languages that are a little less suited for web development than the others. Most of the people who posted “top languages for 2021” videos seemed to be targeting an audience of web developers, which makes me wonder if their recommendations are based simply on C’s, C++’s, and Go’s strong showing on the TIOBE Index.
I thought Kotlin and Swift would be about even, but 10 reviewers recommended Kotlin, while only 6 recommended Swift.
I thought TypeScript would get more recommendations.
The videos
For the benefit of the curious, I’ve listed the videos below, complete with links and each one has a list of the recommendations made in the video.
I feel obliged to remind you that these are subjective opinions that could easily be based on the presenter’s biases, some Googling, or cribbing notes from the Technology section of the 2020 Stack Overflow developer survey.
If you’re planning to learn a new programming language or sharpen your skills on a language you’re already familiar with, you should make sure that it’s in service of some kind of goal. Is knowing a language part of a larger career plan, to assist you with your current job, to make yourself more attractive to prospective employers, or for fun? All of these are valid reasons, but you should have a reason.
I thought I’d start by giving my home state of Florida some love by presenting Jacksonville-based polyglotengineer’s list of languages to learn this year. Here are his picks:
10. Java
9. C#
8. PHP
7. C / C++
6. Go
5. Kotlin
4. Rust
3. Python
2. Swift
1. JavaScript
Simplilearn is an online bootcamp that boasts of partnerships with Purdue, Caltech, UMass Amherst, AWS, IBM, Microsoft, and Accenture. Here’s their “top ten” list of programming languages to take up in 2021:
10. C#
9. Go
8. C++
7. JavaScript
6. Swift
5. Java
4. R
3. Kotlin
2. PHP
1. Python
Danny “DThompsonDev” Thompson wins the prize for best use of props in his round-up of the languages you should learn in the new year, with the Python fanboy baseball bat and PHP cash money.
Here’s his selection of the top seven programming languages to take in the 2G21:
7. Go
6. PHP
5. C#
4. Java
3. C++
2. JavaScript
1. Python
Hitesh Choudhary is one of the instructors at LearnCodeOnline, an online coding school. Here’s his list of the top five programming languages to learn this year:
Here’s Boston-area-based Bryan Cafferky’s take on what you should learn this year, broken down by category. His is the one list that has a recommendation that no one else gave: Learn shell scripting, whether for Windows or Unix-based platforms.
codebasics is Dhaval Patel’s YouTube channel, where he covers a lot of data science and Python topics. Here are his top five languages to learn in 2021:
5. Go
4. Kotlin
3. JavaScript
2. TypeScript
1. Python
Here’s another video from a channel that’s just getting started — NeuralNine, which is “an educational brand focusing on programming, machine learning and computer science in general.”
Here’s their list:
5. C# / Java
4. C / C++
3. JavaScript
2. Go
1. Python
Great Learning say they have over 200 free certificate courses and seven years’ worth of videos. Here’s their top ten list of programming languages to take up in 2021:
10. Kotlin
9. Swift
8. C#
7. R
6. PHP
5. Go
4. C++
3. Java
2. Python
1. JavaScript
Ishan Sharma looks to be just a bit older than Yazeed (judging from his youthful appearance and bookshelf contents). In addition to making videos at GeeksForGeeks,he also has his own YouTube channel, which boasts over 32,000 subscribers.
He recommends the same languages as Yazeed, plus two more:
7. Kotlin
6. PHP
5. C++
4. Go
3. Java
2. Python
1. JavaScript
I’ll close out this collection with a more general list from John Codes, who describes himself with the phrase “software engineer turned content creator”. Here’s a quick summary of his recommendations for 2021:
If you don’t know it already, pick up a little JavaScript.
If you’re looking for a new back-end language and stack, look at Go and Kubernetes.
For operating systems and embedded programmers, look at Rust.
If you’re reading this, it means that you’ve survived 2020 and made it to a whole new year! I know that the current situation doesn’t really pay attention to arbitrary calendar divisions, but there’s a reason why we celebrate birthdays and anniversaries. If you haven’t done so yet, take some time to reflect on 2020 and tink about what you’d like to accomplish in 2021. Global Nerdy is here to help the people in the Tampa Bay tech scene meet their goals!
Sad new Meetup! (Or: Why this list even more useful than ever)
Over the holidays, Meetup.com changed their home page format, and it’s now even harder to find out what’s going on this week.
To see what I mean, go to Meetup.com and try to see what’s happening in Tampa this week. You’ll see something like this:
Events for any groups that you belong to will still be listed in chronological order. But everything else? It’ll be a mish-mash, with an event scheduled for next week followed by one taking place tomorrow, and all of them subdivided into sections to maximize your clicking and viewing pages instead of finding events.
This sort of mess is why I made this weekly list in the first place. Between our geographical spread, our limited time, and the pandemic, it was already hard enough to find tech, entrepreneur, and nerd events in Tampa Bay. Meetup’s new home page makes things worse. This list is meant not only to fix that problem, but to help facilitate Tampa Bay tech gatherings and help grow our scene.
Casting a wider net
I’ve tweaked the list a little — you’ll see that it now covers events within 100 miles of Tampa Bay, which includes some Orlando-based events. Howdy, neighbors!
I’m still listing only online events for the time being
I’m tired of the “new normal”, and I’m sure you are as well. But we’re not out of trouble yet:
1 in 16 Americans has been infected with COVID-19 (20.5 million cases as of Sunday, January 3, out of a total population of 328.2 million).
1 in 1000 Americans has died from COVID-19 (350,000 deaths as of Sunday, January 3, out of a total population of 328.2 million).
1 in 16 Floridians has been infected with COVID-19 (1.35 million cases as of Sunday, January 3, out of a total population of 21.48 million).
1 in 980 Floridians has died from COVID-19 (21,889 deaths as of Sunday, January 3, out of a total population of 21.48 million).
These numbers, coupled with the recent holidays — where a lot of people threw precautions to the wind — are why I’m doing my part and not promoting any in-person events just yet.
This list covers events from Monday, January 4 through Sunday, January 10, 2020.
Events — especially virtual, online ones — can pop up at the last minute. I add them to the list as I find out about them. Come back and check this article from time to time, as you might find a new listing that wasn’t there before!
If you’d like to get this list in your email inbox every week, enter your email address below. You’ll only be emailed once a week, and the email will contain this list, plus links to any interesting news, upcoming events, and tech articles.
Join the Tampa Bay Tech Events list and always be informed of what’s coming up in Tampa Bay!
Avocado Labs an Auth0 project whose goal is to keep developers and techies — and people who want to become developers and techies — connected through high-quality online talks.
Today at noon Eastern (17:00 UTC), join Avocado Labs’ Twitch channel to meet Matthew Pegula, Director of Creative Technology at the technology/experience design studio Deeplocal.
He’ll be talking about some of their cool projects, including a project called “Connected Mistletoe”, which keeps distant people connected over the holidays:
Here’s the brief for the talk:
Matthew Pegula works at Deeplocal, a creative technology and experience design studio based in Pittsburgh, PA. They’re a group of engineers and creatives who use technology to tell stories and create experiences in novel ways. At first glance, their projects don’t always jump out as being overly technical or software-driven, but that’s sort of the idea: the technology enables the story, it doesn’t overshadow it. Matthew is going to show a few of their favorite projects, talk about the technology that’s driving them, and some of the challenges they ran into along the way.
Matthew Pegula is a software engineer who has been lucky enough to blend his interests in technology, design, writing, and engineering into a career that encompasses them all. He has a BS in computer science from Allegheny College and leads the Creative Technology team at Deeplocal.
Once again, here’s the weekly list of events for events for Tampa Bay techies, entrepreneurs, and nerds. Every week, on GlobalNerdy.com and on the mailing list, I scour the announcements for events that are interesting to or useful for those of you who are building the future here in “The Other Bay Area, on The Other West Coast”.
This list covers events from Monday, December 21 through Sunday, December 27, 2020.
Events — especially virtual, online ones — can pop up at the last minute. I add them to the list as I find out about them. Come back and check this article from time to time, as you might find a new listing that wasn’t there before!
While a number of events appear to be scheduled for this day on Eventbrite, Meetup, and other sites, they were probably posted on “autopilot” and most likely aren’t happening.
If you’d like to get this list in your email inbox every week, enter your email address below. You’ll only be emailed once a week, and the email will contain this list, plus links to any interesting news, upcoming events, and tech articles.
Join the Tampa Bay Tech Events list and always be informed of what’s coming up in Tampa Bay!
Please be warned: If you want to try solving the challenge on your own and without any help, stop reading now! The remainder of this post will be all about my solution to both parts of the Day 8 challenge.
The Day 8 challenge, part one
The Kittenbot Meowbit handheld game console. Tap to find out more.
Your flight to the major airline hub reaches cruising altitude without incident. While you consider checking the in-flight menu for one of those drinks that come with a little umbrella, you are interrupted by the kid sitting next to you.
You narrow the problem down to a strange infinite loop in the boot code (your puzzle input) of the device. You should be able to fix it, but first you need to be able to run the code in isolation.
The boot code is represented as a text file with one instruction per line of text. Each instruction consists of an operation (acc, jmp, or nop) and an argument (a signed number like +4 or -20).
acc increases or decreases a single global value called the accumulator by the value given in the argument. For example, acc +7 would increase the accumulator by 7. The accumulator starts at 0. After an acc instruction, the instruction immediately below it is executed next.
jmpjumps to a new instruction relative to itself. The next instruction to execute is found using the argument as an offset from the jmp instruction; for example, jmp +2 would skip the next instruction, jmp +1 would continue to the instruction immediately below it, and jmp -20 would cause the instruction 20 lines above to be executed next.
nop stands for No OPeration – it does nothing. The instruction immediately below it is executed next.
First, the nop +0 does nothing. Then, the accumulator is increased from 0 to 1 (acc +1) and jmp +4 sets the next instruction to the other acc +1 near the bottom. After it increases the accumulator from 1 to 2, jmp -4 executes, setting the next instruction to the only acc +3. It sets the accumulator to 5, and jmp -3 causes the program to continue back at the first acc +1.
This is an infinite loop: with this sequence of jumps, the program will run forever. The moment the program tries to run any instruction a second time, you know it will never terminate.
Immediately before the program would run an instruction a second time, the value in the accumulator is 5.
Run your copy of the boot code. Immediately before any instruction is executed a second time, what value is in the accumulator?
Importing the data
Every Advent of Code participant gets their own set of data. I copied my data and went through my usual process of bringing it into a Jupyter Notebook running a Python kernel.
This involves pasting it into a triple-quoted string and then assigning its value to the variable main_raw_input:
With the data imported, the next step was to build an appropriate data structure. Since today’s puzzle was based on simplified microprocessor instructions, I thought that the data structure should do the same.
I wanted my data structure to look like the table below, which shows the instructions from extracted from the first five lines of the data given to me:
Index
Opcode
Operand
0
acc
37
1
acc
-4
2
nop
405
3
jmp
276
4
acc
39
Here’s the function that I wrote to convert the input data into the data structure:
I then wrote accumulator_value_at_first_repeat(), the function that would use the data structure contained within instructions to solve the first challenge:
def accumulator_value_at_first_repeat(instructions):
program_length = len(instructions)
program_counter = 0
accumulator = 0
executed_instructions = set()
repeat_instruction_encountered = False
while 0 <= program_counter < program_length:
current_instruction = instructions[program_counter]
if program_counter in executed_instructions:
repeat_instruction_encountered = True
break
else:
executed_instructions.add(program_counter)
if current_instruction["opcode"] == "jmp":
program_counter += current_instruction["operand"]
continue
elif current_instruction["opcode"] == "acc":
accumulator += current_instruction["operand"]
elif current_instruction["opcode"] == "nop":
pass
else:
print("Something went wrong in accumulator_value_at_first_repeated_instruction().")
print(f"pc = {program_counter} acc = {accumulator}")
print(f"instruction:\n{instruction}")
program_counter += 1
if repeat_instruction_encountered:
print(f"The accumulator's contents at the first repeated instruction is: {accumulator}.")
else:
print("Reached end of instructions without repeating any of them.")
When run, it sets up the following variables:
program_length: The number of instructions in the data structure.
program_counter: The program’s equivalent of the “program counter (PC)” register in a microprocessor; contains the index the instruction to be executed.
accumulator: The program’s equivalent of an accumulator in a microprocessor. For those of you who aren’t familiar with what happens at the microprocessor level, think of the accumulator as a “scratchpad” variable where you do all the math.
executed_instructions: A set (which means that every value in it is unique) of the indices of all the instructions that have already been executed. We use it to determine if a given instruction has already been run, at which point we should stop the program and see what the value in the accumulator is.
repeat_instruction_encountered: A flag that should be set to True when an instruction is about to be executed a second time.
The function’s main loop performs a greatly simplified version of a microprocessor’s “fetch-decode-execute” cycle:
Fetch the current instruction, which is the one whose index is specified by program_counter.
See if the instruction has been executed before. If this is the case, exit the loop; otherwise, recording this instruction as having been executed.
Decode the current instruction:
If the instruction is jmp, add the operand value to program_counter and go back to the start of the loop.
If the instruction is acc, add the operand value to accumulator.
If the instruction is nop, do nothing.
If the instruction is anything else, display an error message.
After the loop is done, if the repeat_instruction_encountered flag is set, we’ve found the value we’re looking for — display it! Otherwise, display a message saying that we’ve reached the end of the instructions without ever repeating one.
I ran the function…
>>> accumulator_value_at_first_repeat(instructions)
The accumulator's contents at the first repeated instruction is: 1801.
…and got my result: 1801.
The Day 8 challenge, part two
The TinkerGen GameGo programmable handheld game console. Tap to find out more!
The challenge
After some careful analysis, you believe that exactly one instruction is corrupted.
Somewhere in the program, either a jmp is supposed to be a nop, or a nop is supposed to be a jmp. (No acc instructions were harmed in the corruption of this boot code.)
The program is supposed to terminate by attempting to execute an instruction immediately after the last instruction in the file. By changing exactly one jmp or nop, you can repair the boot code and make it terminate correctly.
For example, consider the same program from above:
If you change the first instruction from nop +0 to jmp +0, it would create a single-instruction infinite loop, never leaving that instruction. If you change almost any of the jmp instructions, the program will still eventually find another jmp instruction and loop forever.
However, if you change the second-to-last instruction (from jmp -4 to nop -4), the program terminates! The instructions are visited in this order:
After the last instruction (acc +6), the program terminates by attempting to run the instruction below the last instruction in the file. With this change, after the program terminates, the accumulator contains the value 8 (acc +1, acc +1, acc +6).
Fix the program so that it terminates normally by changing exactly one jmp (to nop) or nop (to jmp). What is the value of the accumulator after the program terminates?
Here’s the function I wrote to solve this challenge:
The function, accumulator_value_and_halt_at_first_repeat(), is an expanded version of the function from part one, accumulator_value_at_first_repeat().
In addition to a set of instructions, it takes an additional parameter: the address of an instruction that should be changed — either from jmp to nop, or from nop to jmp.
The function still performs the “fetch-decode-execute” loop, and it exits the loop if it’s about to execute an instruction that’s already been executed. The main difference is that if the current instruction is the one flagged for change, it changes the instruction appropriately.
I wrote the accumulator_value_and_halt_at_first_repeat() function to be used by the function below:
def run_instructions_with_mods(program):
for index in range(len(program)):
instruction = program[index]
if instruction["opcode"] != "acc":
print(f"Found jmp or nop at address: {index}")
result = accumulator_value_and_halt_at_first_repeat(program, index)
if result["halted"]:
print(f"Found it! {result}")
break
else:
print(f"Not the correct instruction.")
This function goes through all the instructions in the set, looking for any jmp or nop instructions. When it finds one, it runs the program using accumulator_value_and_halt_at_first_repeat(), marking the jmp or nop instruction as the one to be changed.
This lets us modify the program, one jmp or nop instruction at a time, in order to find which change to a jmp or nop instruction is the one that allows the program to reach the end of the instructions.
Here’s an abridged version of what happened when I ran the function:
>>> run_instructions_with_mods(instructions)
Found jmp or nop at address: 2
Changing opcode at address 2
- Changing nop to jmp
Not the correct instruction.
Found jmp or nop at address: 3
Changing opcode at address 3
- Changing jmp to nop
Not the correct instruction.
Found jmp or nop at address: 7
Not the correct instruction.
Found jmp or nop at address: 10
Changing opcode at address 10
- Changing jmp to nop
Not the correct instruction.
...
Found jmp or nop at address: 207
Changing opcode at address 207
- Changing jmp to nop
Not the correct instruction.
Found jmp or nop at address: 209
Changing opcode at address 209
- Changing jmp to nop
Not the correct instruction.
Found jmp or nop at address: 210
Changing opcode at address 210
- Changing jmp to nop
Found it! {'halted': True, 'program_counter': 623, 'accumulator': 2060}
I entered 2060 as my answer, and step two was complete.