This is an election year, and The Mad Botter’s contest is an election contest. Contestants are asked to develop an open source project that addresses ballot access or in some other way assists with voting. Perhaps something to help people find the closest polling station? Virtual “I voted” stickers? An aggregator for open information about candidates? A “Yelp” for polling places? (You can find more ideas here.)
Here are the contest details:
No purchase is required to enter.
Your solution must be posted to a publicly accessible Github repository with the appropriate license included.
You must be a US high-school or undergraduate college student.
If you are below the age of 18, you must provide written parental consent to have your submission considered; this can be done via email.
In the event that you win, The Mad Botter INC is granted the right to post a picture of you in the winning announcement and other applicable venues; if you are below the age of 18 your parent or guardian also provides permission for this by consenting to your entering the contest.
The winning entry will be the one that shows the most practical potential and creativity and will be selected by The Mad Botter team.
All submissions should be sent to firstname.lastname@example.org and include a brief bio, explanation of the solution, and a link to the Github repository.
I was a recent guest on the show (Episode 25), and we talked about how the Toronto tech scene changed from dismal to dynamic, how I stumbled into developer evangelism, learning iOS programming via raywenderlich.com and then joining them, SwiftUI, Python and Burning Man, the hidden opportunities that come with having to stay inside during the pandemic, and more!
Teaching a person how to spell out numbers involves a lot of repetition. Tampa Bay’s own Jack Hartmann, whose children’s educational YouTube channel has over a million subscribers and 300 million views, knows this. He’s got a video that teaches kids the words for the numbers 0 through 10:
Don’t underestimate the power of videos for kids — Jack’s laughing all the way to the bank. This online estimator says that his YouTube channel should be earning about $70,000 every month, and keep in mind that his particular line of work has probably benefited from everyone being stuck at home. I may have to do something similar with the accordion when this software fad passes.
If you just wanted to be able to convert any number from 0 through 10 into word form in Python, you could use a list…
…and if you wanted the number 3 in word form, you’d use this:
# This is in the Python REPL
You wouldn’t want to take this approach for a larger set of numbers, and you probably wouldn’t want to code it yourself. Luckily, you don’t have to do this in Python, thanks to the inflect.py module.
inflect.py is a module that does all sorts of processing to make your programs’ text output grammatically correct. If you hate seeing output like this…
You have 1 items in your cart.
You have a egg in your inventory.
…you can use inflect.py to automatically use the correct singular or plural form, use “a” or “an” when appropriate, and so much more.
(I’ll cover inflect.py in greater detail in a future article.)
In addition to all these grammatical goodies, inflect.py can also be used to convert numbers to words.
To use inflect.py, you’ll need to install it first. The simplest way to do so is with pip:
pip install inflect
Once installed, you can use it in your Python programs. Here’s an example:
It produces this output:
fifty-four thousand, three hundred and twenty-one
The number_to_words() method has a number of optional parameters that are useful in certain circumstances. For instance, there’s the boolean wantlist parameter, which causes the word output to be broken into “chunks”:
[‘fifty-four thousand’, ‘three hundred and twenty-one’]
Suppose you want the number to be converted into its individual digits as words. You’d use the group parameter:
# This is in the Python REPL
'five, four, three, two, one'
'fifty-four, thirty-two, one'
'five forty-three, twenty-one'
What if you’re using the group parameter set to 1, but want to get all UK English and have it use the word “naught” for zero? Or maybe you want your program to sound like a film noir gangster and say “zip” instead? Or you want it recite a phone number and say “oh”? That’s what the zero parameter is for:
print("\(number) spelled out is \(spelledOutNumber).")
Run the playground code, and you’ll see this:
87654 spelled out is eighty-seven thousand six hundred fifty-four.
Having come from the world of C, where you format strings using printf() and formatting strings, and later from other languages where you use whatever formatting method its string class provides, I’ve ignored most of Swift’s classes that derive from Formatter — with one notable exception: DateFormatter, which is indispensable when working with dates and times.
I’m now looking for an excuse to use this capability.
As I typed “DateFormatter” a couple of paragraphs above, I remembered that DateFormatter had a locale property. It’s for ensuring that any dates you present are in the correct form for the locale:
Does NumberFormatter have a locale property?
What happens if I changed it to something other than my system’s default of US English?
So I changed the code in my playground to the following:
No tech, entrepreneur, or nerd events have been posted for this day…yet!
Do you have an upcoming event that you’d like to see on this list?
If you know of an upcoming event that you think should appear on this list, please let me know!
Join the mailing list!
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!
Mike Dominick, who runs The Mad Botter — which develops automation/integration software — moved to the Tampa Bay area three years ago. It’s been my experience that Tampa Bay techies don’t do things halfway, so it shouldn’t be a surprise that in addition to the day job, he also has a technology- and open source-focused podcast named The Mike Dominick Show.
I had the privilege of being the guest for Episode 25 of the Mike Dominick Show, which we recorded yesterday afternoon (that’s its player above), and it was a fun conversation that covered:
The Toronto tech scene
Taking up the accordion
How I got into developer evangelism
Learning iOS programming via raywenderlich.com and then joining them
Remote work and the pandemic
WWDC 2020 and SwiftUI, Python and Burning Man
Windows Phone and my time as a Windows Phone Champ
What I’ve been doing while looking for work
The hidden opportunities that come with having to stay inside
Mike ends each podcast with two questions — one tough and one easy. The tough question he asked me was “What question should I have asked you that I didn’t?” You’ll have to listen to hear how I answered that one.
Don’t just listen to my episode — be sure to check out previous ones, including these ones that I’ve enjoyed on my daily bike rides:
One of the reasons I write for raywenderlich.com — the premier mobile developer tutorial site — is that they’re wonderful people to work with, because they’re such good people. And as good people, they’ve put together something to help developers during this time of pandemic and quarantine: RW Community Care. It’s a series of office hours, livestreams, bootcamps, and more, running until August 22 — and all events are 100% free!
Here’s what RW Community care offers…
Read iOS Apprentice for free!
I learned iOS programming back in 2012 by reading and doing the exercises in an earlier edition of iOS Apprentice, which was written by Matthijs Hollemans. While I’d done some mobile development as a Windows Phone Champ during my time as a developer evangelist at Microsoft, it was this book that set me on my path as a mobile developer.
I owe a lot to this book, which is why it was a big honor to co-author the eighth edition with Eli Ganim. For the summer, you can read it online for free at RW Community Care. Whether you’re completely new to programming or — like me, back in 2012, experienced at programming but new to iOS development — you should check out iOS Apprentice on RW Community Care!
RW Talks happen weekly, cover all sorts of topics that mobile developers will find interesting, ranging from the deeply technical to the inspiring. Upcoming talks include:
Can’t attend some of the other live events, or prefer to collaborate on discussions as a community? Or maybe you’re more the type to hash out challenges or problems with a group of like-minded developers? There’s a Discord server that you can join!
Not everyone has easy access to a senior mobile developer, especially when everyone seems so busy these days and our teams are more physically separate then ever before.
Want a senior member of the development community to look over your current project, run a critical eye over your professional résumé, or review some code you’ve been struggling with? This program is designed to do just that.
If you need someone to help you with deeper questions on your particular project, or to lend a critical eye to your resume or job search, you need Review My Stuff!
The current coronavirus pandemic has given me a chance to do some spring cleaning at home, which in turn led me to revive some old computers that have been sitting idly in a closet. I figure I could put them to work doing interesting things.
As with the Compaq, I set up the ThinkPad with VS Code, Node, Anaconda, and React. Since it’s got the processor power and 16 GB RAM, I also put Android Studio 4 and Flutter on it. Between some mobile projects in my near future, and the need to have a machine for running servers and other automated tasks, it’s going to prove to be quite useful.
The Raspberry Pi’s “hard drive” is actually a microSD card that fits into an easily-accessed slot near one of the edges of the board. The process of updating the Pi’s OS is pretty simple: You use the Raspberry Pi imager on another computer with an SD card slot (and a microSD-to-standard SD card adapter) to rewrite its contents.
The Raspberry Pi is a pretty good Python machine, and I may end up using it while teaching that Python course, if only to show what’s possible on a computer that’s smaller than a deck of cards (when it’s not in a case) that you can get for about $50.
Since it’s powered by an ARM chip, it offers an opportunity for a kind of programming that most other machines don’t offer: ARM assembly programming!
It looks like it’s going to become an ARM-based world:
ARM-based chips power IoT devices,
Smartphones are generally powered by ARM-based chips, and
With this upcoming sea change, it doesn’t hurt to have some familiarity with ARM assembly language. Even though smartphones have ARM chips, the Raspberry Pi is a much better platform on which to learn ARM assembly, as it allows you to do development and execution in the same place.
It may have been a while since I’ve done assembly language programming — first on the 6502 in high school on Apple ][s and Commodore PETs, and later in university on NS32000 boards connected to Digital Unix machines — but I found my return pretty simple. It didn’t take long for me to cobble together a “Hello World!”-style app on the Pi.