18 Jun 2024
Grapes + Components of a Grape
There are white grapes and red grapes. Red wines and Rose wines are made from red grapes, whereas white grapes can only make white wines. But white wines could be made from white or red grapes.
Grapes flower and then ripen in the summer. They can only be planted in areas that are 30 - 50 degrees above and below the equator. In warmer areas, the grapes tend to be sweeter and more ripe. The riper a grape is, the more sugars are in the grape and the less acid. White grapes are more common in cooler areas and red grapes are more common in warmer areas.
The grape is made out of two parts: the pulp and the skin
Skin contains tannin, which gives the wine it’s color and that drying taste on the tounge. The longer the skin is in the wine, the deeper the color of the wine. Deep red wine has had skin contact for a long time. Roses only partially.
Pulp contains acid and sugars. The sugars are a key component when making wine.
New Zealand and Australia make new world wines.
Making wine
Basics
Wine is made by adding yeast to grape sugars. Yeast + Sugars = Alcohol + CO2.
Sweet wines occur when alcohol is added so the yeast dies prematurely. Yeast could also be removed or unfermented grape juice could be added. For dry wines, when all the sugars are gone, the yeast dies and falls to the bottom of the wine.
Wines are generally 11 - 14.5% ABV.
Sparkling wines are made by either not letting the C02 escape during the fermenting process, or adding CO2 during bottling.
Red Wine
Crushing, fermentation, draining + pressing, maturation, bottling
White Wine
Crushing, pressing, fermentation (with no skins), maturation, bottling
Rose Wine
crushing, fermentation (short), draining, more fermentation (with no skins), maturation, bottling
Wines
Red Wines
Merlot
Merlot is dry, full bodied, medium acidity, medium tannins.
Flavors of red fruits, black fruits.
Frequently aged in oak.
Bordeaux is a type of Merlot.
Commonly blended with Cabernet Sauvingnon.
Chateauneuf du Pape
Chateauneuf du Pape is dry, full bodied with high alcohol.
Flavors of red fruit.
Frequently aged in oak, with flavors of clove.
Syrah
Syrah is dry, medium - full bodied, medium - high tannins, medium acidity.
Flavors of black fruits and spice.
Frequendly aged in oak.
French -> Fresh fruit + peppers
Australian (Shiraz) -> jammy + licorice, lower in tanins
Rioja
Rioja is dry, medium to full bodied.
Flavors of red fruit.
Oaked. Spanish.
Cabernet Sauvignon
Cavernet Sauvignon is dry, medium - full bodied, high tanins, high acidity
Flavors of black fruits, herbacious
Frequently aged in oak.
Commonly blended with other grapes (like Merlot for more softness)
Bordeaux
Bordeux is dry, medium - full bodied, high acidity and high tanins.
Flavors of black fruits and cedar.
Blend of Cab Sauv and Merlot.
Burgundy
Burgundy is high acidity and medium bodied.
Aromas of citrus and stome fruits (white) or red fruits (red).
Vanilla notes from oak maturation.
Make from Chardonnay grapes (white) or Pinot Noir (red).
Cotes du Rhone
Cotes du Rhone is dry, medium body.
Flavors of red fruit and white pepper.
Can be aged in oak or no oak.
Chianti
Chianti is dry, high tannin, light - medium bodied, high acidity.
Flavors of red fruit.
Oaked. Italian.
Pinot Noir
Pinot Noir is dry, light - medium body, low - medium tanins, high acidity.
Flavors of red fruit.
Frequently aged in oak.
Makes Champagne when blended with Chardonnay.
Beaujolais
Beaujolais is dry, ligh bodied, low tanins.
Flavors of red fruits.
Frequently unoaked.
White Wines
Sauternes
Sauternes is a sweet, full bodieid high acidity wine.
Flavors of stone fruits and honey.
Oaked. Sauternes is in Bordeaux.
Chardonnay
In warm climates: medium - full body, medium acidity with flavors of tropical fruit.
In cool climates: light - medium body, high acidity with falvors of green furit + citrus.
Usually aged in oak.
Makes Champagne when blended with Pinot Noir.
Sancerre
Sancerre is a dry, medium bodied.
Flavors of green fruit and herbacious.
Made from Sauv Blanc.
Chablis
Chablis has high acidity and light - medium body.
Flavors of green fruits and citrus.
Unoaked. Made in France.
Sauvignon Blanc
Sauvignon Blanc is dry, light - medium bodied, high acidity.
Flavors of green fruit, citrus, tropical fruits, hebacious.
Frequently aged in stainless steel.
Riesling
Riesling is dry - sweet, light - medium bodied, high acidity.
Flavors of floral, green fruits, citrus and stone fruits.
Frequently aged in stainless steel.
German Riesling is sweet.
Alsace in France and Rieslings in Australia are dry.
Pinot Grigio
Pinot Grigio is dry, light bodied, medium to high acidity.
Flavors of pear and lemon.
Frequently aged in stainless steel.
Rose
White Zinfandel
White Zinfandel is a medium sweet, low alcohol.
Flavors of red fruit.
Unoaked.
Sparkling
Prosecco
Prosecco is dry - medium sweet, light bodied.
Flavors of green fruit and floral.
Cava
Cava has flavors of green fruit and citrus.
Spanish.
Champagne
Chardonnay and Pinot Noir.
Foritifed
Sherry
Sherry is dry - sweet with many styles.
Spanish.
Port
Port is sweet, high alcohol, full bodied with high tannins.
Flavors of black fruit.
Portugal.
Tasting Process
What color is the wine? Is the wine clear?
Is the wine sweet or dry?
How acidic is the wine?
How is the body?
How are the tannins?
How much alcohol is in the wine?
What are it’s notable aromas and flavors?
Pairing
Food is… -> Wine is…
Sweet -> more drying, bitter, acidic, less sweet + fruity, body
Want SWEET wine
Umami -> more drying, bitter, acidic, less sweet + fruity
Want FRUITY wines with LOW tannin
Bitter -> more bitter
Want white wines or low tanin fruity reds.
Salty -> more fruity, body, less drying, better, acidic
Want high ACID, high TANIN, OAKED
Chips? Sauv Blac/Champagne
Red meat? High tanin + oaked red.
Acidic -> more sweet + fruity, less drying, bitter, acidic
Want high ACID. Sauv blanc/Chianti.
Highly flavored -> overwhelmed
Want a wine thats similar in intensity (maybe like a full bodied red?)
Fatty/oily -> less acidic
Want high acidity, Sauv blanc
Hot/Spicy -> increases heat, alcohol burning is more noticeable.
Want FRUITY whites, low tannic reds, or low alcohol sweet wines.
Storage and Serving
- Cool constant temp
- Away from light
- Corked? Store on side. Screwcap. Store upright.
How to preserve wine once opened?
A. Vacuum system - remove air from bottle
B. Blanket system - push gas into bottle, which removes air
Serving temp:
Room temp -> Medium - full bodied reds
Lightly chilled -> full bodied white / light bodied reds
Chilled -> light - medium bodied white + rose
Well chilled -> Sparkling, sweet wines
Reds should be served in wide mouth glasses.
Whites in narrower mouth.
Sparkling in flutes.
04 Jun 2024
When we’re writing a program, we usually write things sequentially. Which, is great, but modern computers have more computing power and can do more. We can use different processes to concurrently solve problems to get a faster result.
Multithreading vs Multiprocessing
Multithreading is the ability for one process to run multiple threads.
Multiprocessing is the ability for a system to run multiple processes.
A system can have multiprocessing of multiple processes, where each process uses multithreading.
Concurrency vs Parallelism
Multithreading is concurrent, which means that the threads don’t actually run at the same time. They mimic running at the same time by staggering execution of a thread. Parallelism is what multiprocessing has, where processes do execute at the same time.
This is mainly because a process has its own memory and interpreter, whereas in multithreading, all threads share the same interpreter.
Python’s Global Interpreter Lock
Python has something called a Global Interpreter Lock, it only allows one thread to have control of the Python interpreter. Only one thread can be executing at a time. Python works by using reference counting, meaning that when data is created in Python, Python tracks the amount of references the object has. When all references are deleted, the memory is freed. In order to prevent a race condition where multiple threads are trying to edit the reference counter, the GIL was introduced.
This does not mean that you don’t have to use a lock in your Python code. GIL only protects the interpreter. You still want consistency if you share state between threads. You don’t know when your thread will get interrupted and switch to executing another thread, which means that when you save a state in a thread, you want to lock that code.
What is a Daemon thread?
A Daemon thread is one that runs without blocking the main program.
Python Threading Coding Notes
What is the difference between lock() and join()?
Lock guarantees that only one thread can execute a portion of code at a time.
Join waits for a thread to complete.
What is RLock?
RLock is a lock that can be acquired many times by the thread that got it the first time. The lock stays locked and is held until each acquisition is released.
In a case where a locked function is calling another locked function, that code would not work with a normal lock. The lock would have to be released before the second function could be entered. If you have a RLock, the same thread can enter both functions.
As of Python 3.2+, RLocks do not have any sigificantly greater performance cost than a regular Lock.