Arrays have a beautiful way of condensing code. To put it simply, an array is just storage space. It’s a closet. You throw data inside, so that it’s easier to find and use later.
Java: How to Use an If/Else Statement
Last week we covered how toast happens in Android Studio. Today, we’re going to make it a tad more dynamic with an if/else statement. Going back to this Riddler App, I want to add hints for the user if they can’t guess the answer outright. Quick reminder, our test riddle was “What has a neck but no head?” Most people start guessing insects for that one (isn’t an earthworm basically all neck? you might argue), but the answer we’re looking for is “A Bottle.”
To keep the mystery alive, we’re going to keep hints semi-living creatures related. If a user hits the Hint button once, a toast message will pop out reading, “It has no fingers or toes either.” Otherwise, the toast will say, “And lives all over the world.”
Continue reading “Java: How to Use an If/Else Statement”
Java: How to Add Toast to an App
Today’s tutorial is a continuation of How to Make a Genuinely Basic App. All we’re doing is adding a method to give a new button a job. This is the coding equivalent to dipping a toe in the water so as to not become overwhelmed at the sheer horror of all the java inside a basic project in Android Studio.
The method of choice for our experiment—toast.
Java: How to Make a Genuinely Basic App
I’m back! After a short 14 month siesta, I’ve decided to change gears and pick up App design.
Don’t worry. Today’s tutorial is going to be extremely light on the coding because for the most part, we’re just generating a hoard of files with pre-written code. After that, this is going to be an exercise in strategically ignoring all but the most essential bits required to make an Android app. Our goal is to adapt a few key pieces of that code to lay the groundwork for java tutorials in the future.
Let’s get started.
Python: How to Parse CSV Files
Did you know that if you go to Google Docs and try to load a csv file with 11,920 rows and 92 columns, you’ll likely get a warning like this?
JavaScript: How to Loop All Letters in a Word Doc
Last week, I wrote a function that loops through all the characters in the first paragraph of a Google Doc. But chances are, if you’re running through all the characters in a paragraph, you’re going to need all the characters in all the paragraphs.
How the heck do you do that?
Continue reading “JavaScript: How to Loop All Letters in a Word Doc”
Python: How to Scrape Craigslist Housing Posts
I live in Miami.
And I can tell you from experience, the Craigslist housing listing page is the 8th circle of hell. Evil pits, horned demons, real estate agents posting fake listings as bait for new clients.
Who has the time to sift through all that?
Continue reading “Python: How to Scrape Craigslist Housing Posts”
PYTHON: How to Script Speech Recognition
SpeechRecognition is a module that to helps Python scripts interact with outside Speech-to-Text engines. It’s important to note here that the module doesn’t actually transcribe audio on its own—it’s more like a sports agent, connecting you with talent.
And some of that talent can be had or tried free of charge. Today, I’ll be looking exclusively at those.
PYTHON: How to Make a Blender Add-On
It’s not difficult to load Python scripts into Blender’s text editor, but there’s something reassuring about just getting them to populate in the space bar menu.
How do you get Blender to do that, you ask?
You make your script into an add-on.
PYTHON: How to Use Try and Except
You know how sometimes when the charger on your phone gets old, it won’t work unless it’s leaned at a 35 degree angle to the right while the device is hanging upside down from the cord? Duck tape. Duck tape is how I solve that problem. Same deal when the fridge handle breaks or when my rain coat gets holes or when my laptop screen gets dislodged from the body.
Duck tape.
Try and Except is the duck tape of Python. Everyone should be aware of its power.