CODEX

Photo by Ilija Boshkov on Unsplash

1. Shorter If…Else Statements with Ternary Operators

let money = 100if money > 0 {
print("Some money")
} else {
print("No money")
}
money > 0 ? print("Some money") : print("No money")

2. Destructuring Tuples

func getInfo() -> (name: String, email: String) {
return (name: "Matt", email: "matt@example.com")
}


Learn how to add a smoothly animated gradient to your app.

Setting Up the Gradient

Choosing the colors

Using the Colors

let color1: CGColor = UIColor(red: 209/255, green: 107/255, blue: 165/255, alpha: 1).cgColorlet color2: CGColor = UIColor(red: 134/255, green: 168/255, blue: 231/255, alpha: 1).cgColorlet color3: CGColor = UIColor(red: 95/255, green: 251/255, blue: 241/255, alpha: 1).cgColor

Initializing the Simple Gradient


CODEX

Learn what are structures and classes, what are the key differences and how to choose between them.

Photo by Markus Winkler on Unsplash

Structs vs Classes

A Brief Comparison

The Key Difference


Ace your next coding interview

Females interviewing
Females interviewing
Photo by Christina @ wocintechchat.com on Unsplash

1. Name Some Differences Between a List and a Tuple

List

  • Mutable
  • Higher memory consumption
  • A lot of built-in methods available
  • Slower iteration
  • Better for operations like insertion and deletion

Tuple

  • Immutable
  • Lower memory consumption
  • A small number of built-in methods available
  • Faster iteration
  • Better for accessing elements

2. What Does the Range() Function Do?


Save time and increase your productivity

Jupyter Notebook logo
Jupyter Notebook logo
Image by the author.

1. Shell Commands

!pip install Tkinter

2. View a List of Shortcuts

  1. Open up a Jupyter Notebook.
  2. Activate the command mode (press…


Practice your Python skills by implementing a linked list

Chain
Chain
Photo by Karine Avetisyan on Unsplash.

What Is a Linked List?

  • Data (such as a number)
  • Pointer to the next node


Level up your JavaScript skills

Photo by Tyler van der Hoeven on Unsplash

1. One-Liner If-Else Statements

2. Remove Duplicates From an Array


Make the most of your simulations by knowing how to animate graphs.

Animated sine wave
Animated sine wave
  • How to create a basic Matplotlib plot.
  • How to create a basic animated plot using Matplotlib.
  • How to create a live-updating graph of a stock price.

Matplotlib


Treat errors with care.

Photo by Romson Preechawit on Unsplash

Throwing Functions

Error Handling

Do-Try-Catch Structure


Write about anything with amazing results

Photo by Lukas Blazek on Unsplash
  • If you pick a niche with high competition, your blog gets bashed by high-authority competitors.
  • If you pick a niche nobody is interested in, your blog won’t be able to make an impact.
  • If you don’t pick a niche at all and write about everything, you end up with a bunch of confused readers.

Artturi Jalli

Tech Expert, Entrepreneur, Software Engineer from Finland. Writing about programming and science. Check out my blog at https://www.codingem.com/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store