
Hidden Gems: The Ternary Operator
If you didn’t already know, I’m majoring in Computer Science here at the University of Michigan and it’s been a long and unpredictable journey. I grew up with a passion for the humanities, especially art, and a large part of me wanted to be an artist. However, I was also talented in math and physics and enjoyed the problem solving required in STEM fields. Eventually I had to decide what I wanted to pursue in college, and I decided to be financially practical and pursue computer science and enjoy the humanities in my free time. Obviously this decision was completely subjective, but I want to give context as to how I approach art and computer science. Originally they were completely separate concepts, but the more I learn about computer science and programming specifically, the more I see it as a form of art. I’ve realized that I’m especially passionate about how code is written; there are no laws as to how code must be written, and style is completely subjective, which leads to each programmer having a unique style, similar to an artist. I’ve also heard comparisons between programmers and authors because both write hundreds of lines, broken up into chapters and paragraphs, which all aim to convey a certain idea. Viewed in this new light, I’ve discovered a lot of hidden gems that exist in computer science, small forms of art that go unnoticed, but are nonetheless works of creativity and intentional artistic design. I’d love to share some of those hidden gems with you, and I’d like to start with the simple ternary operator, a common programming construct found in most languages.
Programming is based on a few recurring ideas: checking certain conditions, using information, and providing interfaces that are easy to use. Checking a condition is incredibly straightforward, and I guarantee you do it all the time. For example, you might say that you’ll go for a walk if it isn’t raining outside, otherwise you’ll stay inside. In very loose code form (referred to as pseudocode), that conditional might be:
if (it isn't raining) {
go outside;
} else {
stay inside;
}
This is fairly easy to understand and it’s easy to see the pieces that correspond to the original sentence. However, it also takes up 5 lines of code. This might sound negligible, but when you’re working on a project that has thousands of files, each with over 100 lines, you quickly realize how much these small conditionals add up, and eventually how hard it is to read the code. In this way, programmers and writers differ: while a writer can spend paragraphs discussing an insignificant detail (think Charles Dickens), a programmer has to express a thought in as little words as possible, while still conveying the same meaning. The purpose is to make the code so easy to read and understand that a future programmer looking back at the code can read it like a book. I find it especially interesting how code is meant to be read by other people; I’ve heard the saying that the first programmer to write a file will only read it once, but that it will be read a hundred times by the programmers that come after them. Put in this perspective, it’s easy to see how important clean code is, and to understand the fine balance between art and efficiency when styling code. So, how can we make this 5 line conditional even more elegant? Answer: the ternary operator. Here is the same logic presented using the ternary operator:
it isn't raining ? go outside : stay inside
Breaking this single line into pieces, it says “is the first statement true? If it is then do this first thing. If it is not true, then do this other thing”, where the question mark signifies the question and the first thing and second thing are the pieces separated by the colon. Take the time to translate our example into this format and compare to the original piece of code. Now appreciate the simplicity and readability of the second form. I hope I am conveying just how fascinating this simple structure is, and how it is a small work of art in the world of programming. It is an art of elegance, conveying complex ideas in simple ways, but with a practical importance not found in most art. Hidden gems like this remind me why I enjoy programming so much, and how art can be found in anything, even when you aren’t looking for it.
Study Hal: Week 25 – Election Day
Hello from the polls! Hal’s been pretty stressed about the election. But, that anxiety inspired him to be an election official, to help folks vote in person! It’s a good cause, but, like the rest of the election inspectors in Michigan, he had to get up early. (Early enough to be at his precinct at 6 AM!)
If you can vote and you haven’t already submitted an absentee ballot, please try to get out to the polls today! Folks like Hal are there to help you make your voice heard as quickly and safely as possible. Check out The Michigan Daily for info on in-person Ann Arbor precincts, and be sure to get in line before 8 PM in Michigan! On that note, please be kind to your election officials, too! They’ll probably be working until after 10 PM to ensure everything runs smoothly.
In case you’ve missed it, Hal is a U-M student studying remotely this semester! Check out the Study Hal tag to learn more, and see more clips here every Tuesday!
The Artist’s Panel: Intersect
For a STAMPS freshman, Victor Luis Garcia already has an impressive list of achievements. He has sat court-side during a Lebron James All-Star game as recognition for his work as an ambassador for low-income aspiring college students, he has had his work on display at SAIC in Chicago, and, just last summer, he was a part of a mural project in collaboration with several renowned Chicago street-artists working to support the BLM movement and the communities where riots were taking place. Victor’s list of accomplishments goes on a lot farther than this, and by looking at his artwork, it is very apparent why. His design and illustration work is impressive and meaningful. He focuses on topics such as LGBTQ identity and intersectionality, and his unique style and thoughtful attention to detail represent these complex issues with elegance. To keep up with the work that Victor is producing and to learn more about his art, you can follow him on Instagram @craboi6.
What is Song Structure?
During quarantine this summer, I had the opportunity to attend a webinar put on by Seth Mosley and the rest of Full Circle Music–a famous Christian songwriter/producer and his record label based out of Nashville, Tennessee. This was super exciting for me because though I’d been writing songs for many years, I had never put much thought into the standard way the music industry encourages artists to put together their music.

What I learned over the course of this webinar was that the music industry is a LOT more specific about what types of songs are produced than I thought they were. The rule-breaking singer/songwriter jams I listen to on a daily basis are definitely not the norm. In fact, as Seth said a few times, many producers and labels won’t even give a song a chance if it doesn’t meet certain specific criteria.
To help explain the most basic song structure, here is a rough draft of a piece I was working on last year. This particular song was about living far away from home. It applies to long-distance relationships, going to school out of state, or any other situation in which you are physically far from someone or some place which means a lot to you.
Songs start with a verse–each verse follows a similar (if not identical) melody:
Verse 1:
Dreaming comes easy since I’ve been gone
I close my eyes and the lights all come on
I see your face in the back of my mind
When I close my eyes there’s no doubt what I’ll find
Then comes the PreChorus. This is a short turn which builds to the chorus.
PreChorus:
It’s hard as hell to wait
Feeling the worst kind of pain
Followed by the chorus: the refrain which will be repeated multiple times. It should be clear when this starts and ends. This is often the ‘catchy’ part of the song.
Chorus:
Take hold of me
And show me the distance
From your porch to mine
Make it seem small
And save me the pity
As you write me a letter
Show me the distance
Like its nothing at all
Verse 2 follows the same pattern as Verse 1:
Making believe like you’re just down the road
A quick walk away if I want to go home
Fooling myself into living a lie
No it’s not working, but I thought that I’d try
PreChorus again…
And It’s hard as hell to wait
Feeling the worst kind of pain
Chorus:
Take hold of me
And show me the distance
From your porch to mine
Make it seem small
And save me the pity
As you write me a letter
Show me the distance
Like its nothing at all
Then comes the bridge: a short section of the song that differs from all the rest. This is often where a song in a major key will include a few minor chords, or where a quick-paced song will slow down for a few moments.
Bridge:
Oh the miles how they add up on the dashboard of my car
One too many state lines to cross to where you are
Then comes the Chorus again, but twice. The first is ‘down,’ played with less oomph, and the second is ‘up:’ the climax of the song.
Chorus (X2)
Take hold of me
And show me the distance
From your porch to mine
Make it seem small
And save me the pity
As you write me a letter
Show me the distance
Like its nothing at all
Finally comes the outro. This sometimes includes lyrics and sometimes doesn’t. In the case of this song, the outro was strictly musical on my guitar.
If this information was helpful for you, or if it piqued your interest, I recommend looking into more song structure information online!
To hear more specifically from Grammy winner Seth Mosley, and to hear a bunch more of his personal songwriting tips, check out this video! This advice applies to most popular genres on the radio, not just Christian rock! (Also disclaimer: I am in no way affiliated with Seth, I simply have learned a lot from him 😊)
©SKETCHES BY MAKO: 11111111111religion
" Then the angel of the Lord stood before them, and the glory of the Lord shone around them, and they were terrified (Luke 2:9). " Have you ever seen an angel cry? A biblical angel Lonely only in GPU accelerators and graphics cards I miss you, Flesh-coated bone under synthetic skin- 11111111111I think I begin To keep memory I said baby, Can you take my hand? If not now, Soon, You said baby, I'm coming soon. If not now, When? My new religion Rapture

For I don't know how much Longer I can stay

