Categories
Meetups Programming Tampa Bay

Scenes from last night’s Java User Group meetup featuring Scala

It’s great to be back at meetups, especially in Tampa Bay, where there’s an active, engaged, and interesting tech scene. Part of that scene includes Tampa’s sizable Java User Group, whose meetup I attended last night and featured a JVM language I was interested in: Scala!

Presented by Steve Waldman at KForce’s new office in Midtown, it was a tour of Scala-CLI as a tool for not just running Scala code, but Java code without all the scaffolding and yak-shaving that it normally requires.

The meeting took place in the conference room at KForce’s new office in Midtown, which is really nice and has some particularly comfy chairs. I will need to talk to them about hosting some of my meetups in the future!

I’m even more interested in the language after having seen Steve’s presentation and sample code.

Even better, Steve contacted Haoyi Li, author of Hands-On Scala Programming about possibly giving attendees a discount code for the book — and we all got the book for free! I’ve already dug a little into it, as it was also an excuse to take out this new Mac terminal app, Warp, for a test drive, as you can see in the screenshot below:

Here’s another reason to attend Tampa Java User Group meetups: the prizes! A lucky winner got a free JetBrains personal edition IDE:

Afterwards, some of us hit the nearby pizza place/pub for more conversation, which included tales of the dot-com bubble, career advice, job openings that I’d heard about (including some at my place of work, Okta), and explaining that once upon a time, you had to buy development tools in a shrink-wrapped box from a store (you didn’t want to download hundreds of megabytes over phone lines):

I had a blast! If you want to join in on the fun, join the Tampa Java User Group and keep an eye out for their meetups!

Categories
Artificial Intelligence Math Programming

You want sum of this? (or: What does the Σ symbol mean?)

If you’ve been perusing LinkedIn or a programming site like Lobste.rs, you may have seen that the professors who teach Stanford’s machine learning course, CS229, have posted their lecture notes online, a whopping 226 pages of them! This is pure gold for anyone who wants to get up to speed on machine learning but doesn’t have the time — or $55K a year — to spend on getting a Bachelor’s computer science degree from “The Cardinal.”

Or at least, it seems like pure gold…until you start reading it. Here’s page 1 of Chapter 1:

This is the sort of material that sends people running away screaming. For many, the first reaction upon being confronted with it would be something like “What is this ℝ thing in the second paragraph? What’s with the formulas on the first page? What the hell is that Σ thing? This is programming…nobody told me there would be math!”

If you’re planning to really get into AI programming and take great pains to avoid mathematics, I have good news and bad news for you.

First, the bad news: A lot of AI involves “college-level” math. There’s linear algebra, continuous functions, statistics, and a dash of calculus. It can’t be helped — machine learning and data science are at the root of the way artificial intelligence is currently being implemented, and both involve number-crunching.

And now, the good news: I’m here to help! I’m decent at both math and explaining things.

Over the next little while, I’m going to post articles in a series called Math WTF that will explain the math that you might encounter while learning AI and doing programming. I’m going to keep it as layperson-friendly as possible, and in the end, you’ll find yourself understanding stuff like the page I posted above.

So welcome to the first article in the Math WTF series, where I’ll explain something you’re likely to run into when reading notes or papers on AI and data science: the Σ symbol.

Σ, or sigma

As explained in the infographic above, the letter Σ — called “sigma” — is the Greek equivalent of our letter S. It means “the sum of a series.”

The series in question is determined by the things above, below, and to the right of the Σ:

  • The thing to the right of the Σ describes each term in the series: 2n + 3, or as we’d say in code, 2 * n + 3.
  • The thing below the Σ specifies the index variable — the variable we’ll use for counting terms in the series (which in this case is n) — and its initial value (which in this case is 1).
  • The thing above the Σ specifies the final value of the index variable, which in this case is 4.

So you can read the equation pictured above as “The sum of all the values of 2n + 3, starting at n = 1 and ending with n = 4.”

If you write out this sum one term at a time, starting with n = 1 and ending with n = 4, you get this…

((2 * 1) + 3) + ((2 * 2) + 3) + ((2 * 3) + 3) + ((2 * 4) + 3)

…and the answer is 32.

You could express this calculation in Python this way…

# Python 3.11

total = 0
for n in range(1, 5):
    total += 2 * n + 3

Keep in mind that range(1, 5) means “a range of integers starting at 1 and going up but not including 5.” In other words, it means “1, 2, 3, 4.”

There’s a more Pythonic way to do it:

# Python 3.11

sum([2 * n + 3 for n in range(1, 5)])

This is fine if you need to find the sum of a small set of terms. In this case, we’re looking at a sum of 4 terms, so generating a list and then using the sum function on it is fine. But if we were dealing with a large set of terms — say tens of thousands, hundreds of thousands, or more — you might want to go with a generator instead:

# Python 3.11

sum((2 * n + 3 for n in range(1, 5)))

The difference is the brackets:

  • [2 * n + 3 for n in range(1, 5)] — note the square brackets on the outside. This creates a list of 4 items. Creating 4 items doesn’t take up much processing time or memory, but creating hundreds of thousands could.
  • (2 * n + 3 for n in range(1, 5)) — note the round brackets on the outside. This creates a generator that can be called repeatedly, creating the next item in the sequence each time that generator is called. This takes up very little memory, even when going through a sequence of millions, billions, or even trillions of terms.

Keep an eye on this blog! I’ll post more articles explaining math stuff regularly.

Worth reading

For more about generators in Python, see Real Python’s article, How to Use Generators and yield in Python.

Categories
Artificial Intelligence Deals Programming Reading Material

Humble Bundle’s deal on No Starch Press’ Python books

Banner for Humble Bundle’s No Starch Press Python book bundle

I love No Starch Press’ Python books. They’re the textbooks I use when teaching the Python course at Computer Coach because they’re easy to read, explain things clearly, and have useful examples.

And now you can get 18 of their Python ebooks for $36 — that’s $2 each, or the cost of just one of their ebook, Python Crash Course, Third Edition!

Check out the deal at Humble Bundle, and get ready to get good at Python! At the time of writing, the bundle will be available for 20 more days.

Banner for Tampa Artificial Intelligence Meetup

Consider these books recommended reading for the Tampa Artificial Intelligence Meetup, which is now under my management, and holding a meeting later this month!

Categories
Mobile Programming

My “Working with dates and times in Swift” articles on the Auth0 blog

Swift (or more accurately, the Foundation framework from which Swift gets its date and time classes) gets a bad rap for complex date and time programming, but that’s because date and time programming is complex, and many programmers have erroneous ideas on the topic.

This blog used to be home to a four-part series on date and time programming in Swift. I’ve recently updated that series and moved it to the Auth0 Developer Blog (the one that has much greater reach and also pays my mortgage). It’s also a four-parter:

  1. Introduction to Date and Time Programming in Swift, Part 1: Learn how to create dates and times using Swift’s powerful date and time objects.
  2. Introduction to Date and Time Programming in Swift, Part 2: Now that you can create dates and times in Swift, learn how to display date and time values to your users.
  3. Date and Time Calculations in Swift, Part 1: Learn how to perform date and time calculations with Swift’s powerful date and time objects.
  4. Date and Time Calculations in Swift, Part 2: Improve your Swift date and time calculations with syntactic magic.

With these articles, you’ll be able to answer questions like:

  • What will the day and time be 10,000 hours into 2023?
  • What date is the first Friday of 2024?
  • What date is the first National Donut Day of 2023?
  • What date is the Thursday of the 33rd week of the year?
  • What is the actual date of September 50, 2023?
  • What day of the week and week of the year will April Fools’ Day 2023 fall on?
  • What’s 3:30 p.m. Pacific on the 3rd Thursday of July in the Coptic Calendar system in Melbourne, Australia’s time zone?
  • When does a 90-day warranty that starts today expire?
  • What is the date of the next Sunday? Or the previous Sunday?
  • When is the next Friday the 13th? How many Friday the 13ths will there be in 2024?
  • Can you write code like this:
let futureDate = (2.months + 3.days + 4.hours + 5.minutes + 6.seconds).fromNow

I answer all of these questions in this series, so check these articles out!

Categories
Artificial Intelligence Meetups Programming Tampa Bay

Tampa Artificial Intelligence Meetup is back!

I’m the new organizer of the Tampa Artificial Intelligence Meetup, a meetup that started way back on June 7, 2017 at its inaugural meetup — which I happened to attend!

Here are some photos from that kick-off meeting, featuring original host Dan Daniels at the head of the room:

Since then, the Tampa Artificial Intelligence Meetup has held dozens of gatherings over the years, ranging from presentations to discussions to study groups.

After the two-year pause from the pandemic, it’s time to get the meetup started again. I’ve been made Tampa Artificial Intelligence Meetup’s organizer with the blessing of organizers Sam Kasimalla, Lenar Mukhamadiev, and OG organizer Stan Liberatore, who remain co-organizers. I’ve also added my partner in life and tech, Anitra Pavka to the co-organizers, as she will provide invaluable assistance in restarting the meetups.

What’s happening at the next Tampa Artificial Intelligence Meetups?

I thought we’d start with a bang and code ELIZA, the very first chatbot, developed between 1964 and 1966 at MIT by Dr. Joseph Weizenbaum. It simulates a Rogerian therapist, using pattern matching to reflect what the patient says back at them or gets the patient to talk about what they just said.

You can try out ELIZA online!

ELIZA was created by computer scientist Joseph Weizenbaum at MIT’s Artificial Intelligence Lab over a two-year period from 1964 to 1966:

It simulated a psychotherapist that reflects what the patient says back at them or gets the patient to talk about what they just said. Although it was written for the IBM 7094, a room-sized computer whose operator console is pictured below…

IBM 7094 operator console. Photo by Arnold Reinhold.
Tap to view at full size.

…it later became a popular program on home computers in the 1980s under the name “Eliza” or “Doctor”:

We’ll build ELIZA — in Python. I’ll give you a “starter” project, and you’ll code along with me in real time until you have a working Eliza version that you could tweak into your own chatbot.

You wouldn’t need the latest and greatest computer to do it, either! A laptop from 2010 (and remember, that’s 13 years ago now!) or later would be all you’d need.

When will it happen?

Sometime in May. I’m working on securing a venue, and I’ll announce a date, time and location once we have one.

Categories
Artificial Intelligence Programming Reading Material

Humble Bundle deals on AI books and courses

The “Ultimate Guide to ChatGPT & AI Chat Bots” bundle

Cover of “Exploring GPT-3”

How did I not know this book existed? Exploring GPT-3, published by Packt and written by Tampa Bay’s own Steve Tingiris, is a great introduction to GPT-3 and natural language processing that doesn’t require you to have a technical background. All you need are basic computer skills to try out the exercises in this book.

Ultimate Guide to ChatGPT and AI Chat Bots

Exploring GPT-3 is but one of twelve books, shown below…

Covers of all the books in the “Ultimate Guide to ChatGPT and AI Chat Bots” bundle

… and you can get all o them for as little as $18 in the Ultimate Guide to ChatGPT and AI Chat Bots ebook package from Humble Bundle (pictured above).

🚨 At the time of writing, this Humble Bundle will expire in 17 days.

The “Machine Learning and AI: Zero to Hero” bundle

Machine Learning and AI: Zero to Hero

Also worth checking out: the Machine Learning and AI: Zero to Hero Humble Bundle, which gives you 21 courses from Packt on various aspects of ML and AI:

Covers of all the courses in the “Machine Learning and AI: Zero to Hero” bundle

🚨 At the time of writing, this Humble Bundle will expire in 13 days.

Categories
Conferences Programming What I’m Up To

How to work the room at PyCon US 2023

It’s been my experience that some of the most important things I’ve learned and all the connections I’ve made at conferences didn’t happen at the presentations. Instead, they happened between presentations — in the hallways, lounges, lunches, and social gatherings, where I had the chance to chat with the speakers, organizers, and the other attendees. This observation is so common that it’s given rise to “unconferences” like BarCamp, whose purpose is to invert the order of things so that the conference is more “hallway” than “lecture theatre”.

It’s especially important to talk to people you don’t know or who are outside your usual circle. Books like The Tipping Point classify acquaintances with such people as “weak ties”. Don’t let the word “weak” make you think they’re unimportant. As people outside your usual circle, they have access to a lot of information, people, and opportunities that you don’t. That’s why most people get jobs through someone they know, and of those cases, most of the references came from a weak tie. The sorts of opportunities that come about because of this sort of relationship led sociologist Mark Granovetter to coin the phrase “the strength of weak ties”.

The best way to make weak ties at a conference is to work the room. If the phrase sounds like sleazy marketing-speak and fills your head with images of popped collars and wearing too much body spray, relax. Working the room means being an active participant in a social event and contributing to it so that it’s better for both you and everyone else. Think of it as good social citizenship.

If you’re unsure of how to work the room, I’ve got some tips that you might find handy…

Have a one-line self-introduction

A one-line self-introduction is simply a single-sentence way of introducing yourself to people you meet at a conference. It’s more than likely that you won’t know more than a handful of attendees and introducing yourself over and over again, during the conference, as well as its post-session party events. It’s a trick that Susan RoAne, room-working expert and author of How to Work a Room: The Ultimate Guide to Making Lasting Connections In-Person and Online teaches, and it works. It’s pretty simple:

  • Keep it short — no longer than 10 seconds, and shorter if possible. It’s not your life story, but a pleasantry that also gives people just a little bit about who you are.
  • Make it fit. It should give people a hint of the cool stuff that you do (or, if you’re slogging it out in the hopes of doing cool stuff someday, the cool stuff that you intend to do.)
  • Show your benefits. Rather than simply give them your job title, tell them about a benefit that your work provides in a way that invites people to find out more. Susan RoAne likes to tell a story about someone she met whose one-liner was “I help rich people sleep at night”. That’s more interesting than “I’m a financial analyst”.

My intro these days is something along the lines of “I’m a rock and roll accordion player, but in my main side gig, I’m the guy at Okta who shows mobile developers how to secure their apps, and in my side side gig, I put together the Tampa Bay tech events list and run a couple of coder meetups in town.”

How to join a conversation

You’ll probably see a group of people already engaged in a conversation. If this is your nightmare…

Click the screenshot to read the Onion article.

…here’s how you handle it:

  1. Pick a lively group of people you’d like to join in conversation. As people who are already in a conversation, they’ve already done some of the work for you. They’re lively, which makes it more likely that they’re open to people joining in. They’ve also picked a topic, which saves you the effort of having to come up with one. It also lets you decide whether or not it interests you. If they’re lively and their topic of conversation interests you, proceed to step 2. If not, go find another group!
  2. Stand on the periphery and look interested. Just do it. This is a conference, and one of the attendees’ goals is to meet people. Smile. Pipe in if you have something to contribute; people here are pretty cool about that.
  3. When acknowledged, step into the group. You’re in like Flynn! Step in confidently and introduce yourself. If you’ve got that one-line summary of who you are that I talked about earlier, now’s the time to use it.
  4. Don’t force a change of subject. You’ve just joined the convo, and you’re not campaigning. Contribute, and let the subject changes come naturally.

Feel free to join me in at any conversational circle I’m in! I always keep an eye on the periphery for people who want to join in, and I’ll invite them.

More tips

Here’s more advice on how to work the room:

  1. Listen! Yes, you’re there to talk, but so is everyone else. Make sure you listen to other people in the circle as they speak, and ask questions, too! One of the reasons you go to PyCon is to get exposed to new ideas. As I said earlier, learning goes beyond the talks. Try to learn three new things at every event.
  2. Be more of a host and less of a guest. No, you don’t have to worry about scheduling or if the coffee urns are full. By “being a host”, I mean doing some of things that hosts do, such as introducing people, saying “hello” to wallflowers and generally making people feel more comfortable. Being graceful to everyone is not only good karma, but it’s a good way to promote yourself. It worked out really well for me; for example, I came to the first DemoCamp (a regular Toronto tech event back in the 2000s) as a guest, but by the third one, I was one of the people officially hosting the event.
  3. Beware of “rock piles”. Rock piles are groups of people huddled together in a closed formation. It sends the signal “go away”. If you find yourself in one, try to position yourself to open up the formation.
  4. Beware of “hotboxing”. I’ve heard this term used in counter-culture settings, but in this case “hotboxing” means to square your shoulders front-and-center to the person you’re talking to. It’s a one-on-one version of the rock pile, and it excludes others from joining in. Once again, the cure for hotboxing is to change where you’re standing to allow more people to join in.
  5. Put your stuff down. Carrying your bag or other stuff is a non-verbal cue that you’re about to leave. If you’re going to stay and chat, put them down. When you’re about to leave, take your stuff and start saying your goodbyes.
  6. Show and tell. Nothing attracts our eyes like shiny, whether it’s an interesting pieces of tech, a new book, a new t-shirt you’re fond of, or even some local knowledge, such a new restaurant, cafe, or bar that just opened. It’s why I carry my accordion around; I think of it as a device that converts curiosity into opportunity (and music as well). Got an interesting thing or idea? Got a neat project that you’ve been working on? Whatever it is, park yourself someplace comfortable in the hallway, show it off and start a conversation!
  7. Save the email, tweets and texts for later, unless they’re important.They’ll draw your attention away from the room and also send the message “go away”.
  8. Mentor. If you’ve got skills in a specific area, share your knowledge. Larry Chiang from GigaOm says that “It transitions nicely from the what-do-you-do-for-work question. It also adds some substance to party conversations and clearly brands you as a person.”
  9. Play “conversation bingo”. If there are certain topics that you’d like to learn about or people you’d like to have a conversation with, put them in a list (mental, electronic or paper) of “bingo” words. As you converse at the conference, cross off any of those topics that you cover off the list. This trick forces you to become a more active listener and will help you towards your learning goals. Yelling “BINGO!” when you’ve crossed the last item on the list can be done at your discretion.