Reading view

There are new articles available, click to refresh the page.

On Reflection: Realism in the late 19th century

In the late nineteenth century, Realist landscape painters challenged themselves with increasingly difficult reflections, where the water surface isn’t mirror-like, but broken.

Gustave Caillebotte, Rain on the Yerres (1875), oil on canvas, 81 x 59 cm, Indiana University Art Museum, Bloomington IN. WikiArt.
Gustave Caillebotte (1848–1894), Rain on the Yerres (1875), oil on canvas, 81 x 59 cm, Indiana University Art Museum, Bloomington IN. WikiArt.

Gustave Caillebotte’s Rain on the Yerres (1875) is an innovative study of a reflective water surface disrupted by circles projected by raindrops.

ricocanalvenicemet
Martín Rico y Ortega (1833–1908), A Canal in Venice (c 1875), oil on canvas, 50.2 x 67.9 cm, The Metropolitan Museum of Art, New York, NY. Wikimedia Commons.

The broken reflections in Martín Rico’s A Canal in Venice from about the same time may have been painted mostly en plein air, despite their fine detail.

ricocanalveniceaic
Martín Rico y Ortega (1833–1908), Canal in Venice (date not known), oil on canvas, dimensions not known, The Art Institute of Chicago, Chicago, IL. Wikimedia Commons.

Rico’s Canal in Venice uses more painterly marks in its reflections.

At the same time, Eilert Adelsteen Normann was painting the grander effects seen in the fjords of Norway.

normannfromromsdalfjord
Eilert Adelsteen Normann (1848–1918), From Romsdal Fjord, 1875 (1875), oil on canvas, dimensions not known, Bergen kunstmuseum (Kunstmuseene i Bergen), Bergen, Norway. Wikimedia Commons.

Normann’s From Romsdal Fjord, also from 1875, shows the ninth longest fjord in Norway as it carves its way through this huge mountain gorge. Although much of the water surface is glassy calm, there’s a slight blur of fine ripples, and patches where it’s more disrupted by gentle breeze.

normannsteamship
Eilert Adelsteen Normann (1848-1918), The Steamship (date not known), further details not known. Wikimedia Commons.

The unidentified fjord in Normann’s undated The Steamship shows a similar repertoire of subtle optical effects.

ringaldertrunks
Laurits Andersen Ring (1854–1933), Alder Trunks (1893), oil on canvas, 52.9 x 73.5 cm, Collection of Her Majesty the Queen Margrethe II, Copenhagen, Denmark. Wikimedia Commons.

Alder Trunks from 1893 is one of Laurits Andersen Ring’s finest landscapes, and has earned its place in the Danish Royal Collection. He shows these old coppiced alders mainly in reflection. Although their details are quite painterly, the overall effect is that of meticulous realism.

The specialist of this period is the Norwegian Frits Thaulow.

thaulowwinterriversimoa
Frits Thaulow (1847–1906), Winter at the River Simoa (1883), oil on canvas, 49.5 x 78.5 cm, Nasjonalgalleriet, Oslo, Norway. Wikimedia Commons.

Thaulow seems to have discovered what was going to be his recurrent theme for much of his career by 1883, when he painted this scene of Winter at the River Simoa. A lone woman, dressed quite lightly for the conditions, is rowing her tiny boat over the quietly flowing river, towards the tumbledowns on the other side. The surface of the river shows the glassy ripples so common on semi-turbulent water, and the effect on reflections is visibly complex. The distant side of the river is also partly frozen, breaking the reflections further.

thaulowmillsmontreuil
Frits Thaulow (1847–1906), The Mills at Montreuil-sur-Mer, Normandy (1894), oil on canvas, dimensions not known, Minneapolis Institute of Art, Minneapolis, MN. Wikimedia Commons.

Thaulow later returned to his studies of flowing rivers, for example in The Mills at Montreuil-sur-Mer, Normandy. This painting has been claimed to date from 1891, before the artist moved to Montreuil, but I think that its date reads 1894.

thaulowadigeriververona
Frits Thaulow (1847–1906), The Adige River at Verona (c 1894), oil on canvas, 81 x 100 cm, Walters Art Museum, Baltimore, MD. Wikimedia Commons.

In 1894, Thaulow travelled across northern Italy to Venice, stopping off to paint The Adige River at Verona. This shows the five arches of the Ponte della Pietra, with wonderfully disrupted reflections describing the river’s turbulent flow.

thaulowdordogne
Frits Thaulow (1847–1906), La Dordogne (1903), oil, further details not known. Wikimedia Commons.

Soon after Thaulow had settled at Beaulieu in central France, he found form with the magnificent river surface and lighting of La Dordogne (1903), whose precise detail in the foreground quickly yields to a more sketchy background.

A few artists rose to the challenge of combined reflected and refracted images, among them Kazimierz Sichulski.

sichulskifish
Kazimierz Sichulski (1879–1942), Fish (1908), pastel on paperboard, 63 x 82 cm, Muzeum Narodowe w Poznaniu, Poznań, Poland. Wikimedia Commons.

Sichulski’s Fish (1908) is a startlingly unusual pastel painting, a virtuoso combination of reflections from and views through this water surface. It’s an essay in practical optics.

On Reflection: Introduction

Many humans and animals are fascinated by reflections. Whether they’re images of themselves seen in mirrors, or an inverted copy of a landscape seen on the surface of a lake, we can spend embarrassingly long periods just staring at them. For visual artists, those reflections have been a technical challenge and, for those who rise to it, an opportunity to display their painting skills. This series sets out to describe and illustrate how, from the early Renaissance to the twentieth century, masters have painted reflections.

vaneyckarnolfiniportrait
Jan van Eyck (c 1380/90-1441), Portrait of Giovanni Arnolfini (?) and his Wife (1434), oil on oak panel, 82 x 59.5 cm. The National Gallery, London. Wikimedia Commons.

Optical effects are one of the central themes in the Northern Renaissance, as seen in Jan van Eyck’s most famous painting The Arnolfini Wedding (or similar variations), completed in 1434. Between this newly-wed couple holding hands next to their marital bed, in the midline of the painting is a prominent circular convex mirror. The reflection is probably the first example of mirror-play in European art, as it shows a view of the room looking in the opposite direction, past the couple to another two figures, who might be the artist and another.

Jan van Eyck, Portrait of Giovanni(?) Arnolfini and his Wife (detail) (1434), oil on oak panel, 82.2 x 60 cm. National Gallery, London (WikiArt).
Jan van Eyck (c 1380-1441), Portrait of Giovanni(?) Arnolfini and his Wife (detail) (1434), oil on oak panel, 82.2 x 60 cm. National Gallery, London. WikiArt.
Jan van Eyck, The Madonna of Chancellor Rolin (detail) (c 1435) oil on panel, 66 x 62 cm. Musée du Louvre, Paris (WikiArt).
Jan van Eyck (c 1390–1441), The Madonna of Chancellor Rolin (detail) (c 1435) oil on panel, 66 x 62 cm. Musée du Louvre, Paris (WikiArt).

Look in the landscape behind Jan van Eyck’s Madonna of Chancellor Rolin, probably painted the following year, and you’ll see one of the earliest examples of the meticulously accurate depiction of reflections on water.

caravaggionarcissus
Caravaggio (Michelangelo Merisi da Caravaggio) (1571–1610), Narcissus (1594-96), oil on canvas, 110 × 92 cm, Galleria Nazionale d’Arte Antica, Rome. Wikimedia Commons.

In some paintings, reflections are essential to their narrative. Caravaggio’s brilliant Narcissus of 1594-96 uniquely combines chiaroscuro with reflections to provide just enough visual clues to tell this myth so effectively.

The optics of reflections appear to have confounded some painters, while others have deliberately flouted physics for effect, in this case what has become known as the Venus Effect.

velazquezvenus
Diego Velázquez (1599–1660), Venus at Her Mirror, The Toilet of Venus (Rokeby Venus) (1644-48) [101], oil on canvas, 122.5 x 177 cm, The National Gallery, London. Image by Diego Delso, via Wikimedia Commons.

Although often illustrated by one of Titian’s paintings of Venus, the canonical example must be Velázquez’ Venus at Her Mirror, also known as The Toilet of Venus or the Rokeby Venus, from 1644-48. It shows the goddess Venus, whose face is blurred in a false reflection in a mirror being held by her son Cupid. The theme was common, seen in paintings by Titian and Rubens, with Venus sat upright. Giorgione and others had posed her reclining and facing the viewer, making her pose here unusual. Most other paintings of Venus set her in a landscape: here she rests on luxurious even sensuous fabrics.

No matter how convincing her face might appear in the mirror, a moment spent placing yourself in the same position confirms that the image in the mirror is wholly imaginary, and optically incorrect.

Pierre Bonnard is among the most prolific and inventive of mirror-players.

bonnardwomangettingdressed
Pierre Bonnard (1867-1947), Woman Getting Dressed (1906), oil on canvas, 42 x 58.7 cm, Private collection. The Athenaeum.

In his Woman Getting Dressed from 1906, it’s the mirror at the left that reveals the subject, who is sat beyond the right edge of the painting, getting dressed. Venus has here become a pile of discarded clothing.

As landscape painting became popular, many of the most proficient sought out locations where they could demonstrate their skills at getting them right. Others used reflections as their theme.

Vincent van Gogh, Starry Night over the Rhône (1888), oil on canvas, 72.5 x 92 cm, Musée d'Orsay, Paris. WikiArt.
Vincent van Gogh (1853–1890), Starry Night over the Rhône (1888), oil on canvas, 72.5 x 92 cm, Musée d’Orsay, Paris. WikiArt.

In the last two years of Vincent van Gogh’s life, he painted this landmark nocturne Starry Night over the Rhône (1888) with its many shimmering reflections.

ringaldertrunks
Laurits Andersen Ring (1854–1933), Alder Trunks (1893), oil on canvas, 52.9 x 73.5 cm, Collection of Her Majesty the Queen Margrethe II, Copenhagen, Denmark. Wikimedia Commons.

Alder Trunks from 1893 is one of Laurits Andersen Ring’s finest landscapes, and has earned its place in the Danish Royal Collection. He shows these old coppiced alders almost entirely in reflection.

Théo van Rysselberghe (1862-1926), Canal in Flanders (1894), oil on canvas, 152.4 x 203.2 cm, Private collection. WikiArt.
Théo van Rysselberghe (1862-1926), Canal in Flanders (1894), oil on canvas, 152.4 x 203.2 cm, Private collection. WikiArt.

Théo van Rysselberghe’s eye-catching geometry in his Canal in Flanders (1894) combines radical perspective projection, intense rhythm and meticulous broken reflections.

Reflections are also used by some of the Surrealists.

Landscape from a Dream 1936-8 by Paul Nash 1889-1946
Paul Nash (1892–1946), Landscape from a Dream (1936-38), oil on canvas, 67.9 x 101.6 cm, The Tate Gallery (Presented by the Contemporary Art Society 1946), London. © The Tate Gallery and Photographic Rights © Tate (2016), CC-BY-NC-ND 3.0 (Unported), http://www.tate.org.uk/art/artworks/nash-landscape-from-a-dream-n05667

Paul Nash’s Landscape from a Dream (1936-38) was inspired by Freud’s theories of the significance of dreams as reflections of the unconscious. This collection of incongruous objects is gathered on the Dorset coast, a landscape Nash associated with the praeternatural. Dominating the scene is a large framed planar mirror, almost parallel with the picture plane. Stood at the right end of the mirror is a hawk staring at its own reflection, which Nash explained is a symbol of the material world. To the left, the mirror reflects several floating spheres, referring to the soul. The reflection shows that behind the viewer is a red sun setting in a red sky, with another hawk flying high, away from the scene.

I hope you’ll join me in the reflections to come in this series.

Last Week on My Mac: Signs of distress

Over the last few weeks, I’ve been posed a series of questions that can only be resolved using the log, such as why Time Machine backups are failing to complete. The common confounding factor is that something has gone wrong at an unknown time, but if you don’t know exactly what you’re looking for, nor when to look, the Unified log is a hostile place, no matter which tool you use to browse its constant deluge of entries.

This is compounded by the fact that errors seldom come singly, but often propagate into tens of thousands of consequential log entries, and those not only make the cause harder to find, but can shorten the period covered by the log. In the worst case, by the time you get to look for them, the entries you needed to find are lost and gone forever.

In late 2017, I experimented with a log browser named Woodpile that approached the log differently, starting from a histogram of frequencies of log entries from different processes.

keychainopen05

Viewed across the whole of a log file, this could draw attention to periods with frequent entries indicating potential problems.

keychainopen06

The user could then zoom into finer detail before picking a time period to browse in full detail. Of course, at that time the Unified log was in its early days, and entries were considerably less frequent than they are now today.

logchart05

A related feature in my later Ulbow log browser provides similar insights over the briefer periods covered, but like Woodpile that view seems little used, and isn’t offered in LogUI.

Another concern is that a great deal of importance can be recorded in the log, but the user is left in the dark unless they hunt for it. I documented that recently for Time Machine backups, and note from others that this isn’t unusual. Wouldn’t it be useful to have a utility that could monitor the log for signs of distress, significant errors or failure? To a degree, that’s what The Time Machine Mechanic (T2M2) sets out to do, only its scope is limited to Time Machine backups, and you have to run it manually.

Given the sheer volume and frequency of log entries, trying to monitor them continuously in real time would have a significant impact on a Mac, even if this were to be run as a background process on the E cores of an Apple silicon Mac. In times of distress, when this would be most critical, the rate of log entries can rise to thousands per second, and any real-time monitor would be competing for resources just when they were most needed for other purposes.

A better plan, less likely to affect either the user or the many background services in macOS, would be to survey log events in the background relatively infrequently, then to look more deeply at periods of concern, should they have arisen over that time. The log already gives access to analysis, either through the log statistics command, or in the logdata.statistics files stored alongside the folders containing the log’s tracev3 files. Those were used by Woodpile to derive its top-level overviews.

Those logdata.statistics files are provided in two different formats, plain text and JSON (as JSON lines, or jsonl). Text files are retained for a shorter period, such as the last four days, but JSON data are more extensive and might go back a couple of weeks. I don’t recall whether JSON was provided eight years ago when I was developing Woodpile, but that app parses the current text format.

Keeping an eye on the log in this way overlaps little with Activity Monitor or other utilities that can tell you which processes are most active and using most memory, but nothing about why they are, unless you run a spindump. Those also only show current figures, or (at additional resource cost) a few seconds into the past. Reaching further back, several hours perhaps, would require substantial data storage. For log entries, that’s already built into macOS.

I can already see someone at the back holding up a sign saying AI, and I’m sure that one day LLMs may have a role to play in interpreting the log. But before anyone starts training their favourite model on their Mac Studio M3 Ultras with terabytes of log entries, there’s a lot of basic work to be done. It’s also worth bearing in mind Claude’s recent performance when trying to make sense of log entries.

What do you think?

Behind Tesla

A hugely controversial company that aims to transform the future of transportation, and our world by introducing an electricity revolution, Tesla has been in the media spotlight for years. As its valuation surpassed all other car manufacturers that sell much more cars and have much more history than Tesla, we must ask ourselves, does the magical story of Tesla really stands?

Chapter 1: Elon’s cult of personality

Elon Musk has received many praises throughout the years and has managed to gather a very enthusiastic following. Arguably, he can be considered as a social media influencer that utilizes his following to achieve his goals. He frequently interacts with his fanbase on twitter and replies to requests from random users which keeps the flame going. It is like having a hand-shaking meeting which is practiced by singers and others alike in Japan, where their fans would be able to shake their hands and the star would typically say a sentence in return. This has proven to be hugely successful in Japan, and based on Elon’s twitter feed, the same works online.

His cult of personality has grown through arguably one of his most damning failures, the production numbers of Tesla Model 3, where for months the actual production numbers remained much less than his promised ones, and as Tesla faced more bottlenecks in increasing production capacity, he kept on promising more without delivering. However, he even managed to turn this in his personal following’s favor, when he finally delivered by pulling some ‘superman tactics’, such as by working extremely long hours, sleeping in the factory, being actual hands on with the production line, building a temporary factory in a tent, and flying in equipment from Germany. However, if we cut out Elon’s cult of personality, we will see that this as a huge red flag instead of Elon pulling his magic. It is unfathomable that Elon as the CEO of Tesla has to get on the production lines to make things worked out, as he was instead wasting precious time needed to make proper, good, and reasonable decisions as the CEO instead of a production line worker. Tesla does not pay him to be on the production lines making tweaks, Tesla pays him to make those proper, good, and reasonable decisions that he neglected to do, when he instead made bold claims about the production numbers without a way of fulfilling it. Flying in heavy equipment was the solution to increasing the production numbers but had there been better planning, such an expensive manoeuvre could have been avoided entirely.

The truth is, Elon remains much less than a responsible CEO and is more of an engineer that likes to focus more on the technical as seen by his role as chief engineer in SpaceX. A responsible CEO would not have said ‘The coronavirus panic is dumb’, ‘Am considering Tesla private at $420’, ‘Tesla stock price is too high imo’, and much more. What Elon has instead continuously demonstrated is that he is very much still an individual that is not willing to be bound by his duties and rules that apply to him, and such an individual in charge of the biggest car manufacturer in the world by valuation, makes him Tesla’s greatest asset and liability at the same time.

Elon Musk smoking a weed on a podcast live

Chapter 2: Underlying culture

‘Autopilot’ is a feature that can be included in Tesla EVs, but the term is misleading. For one, assisted driving technology is classified into different tiers, each representing the extent that machine is in control of the car, or autonomous level. Tesla’s autopilot feature is classified as level 2 where the car can act autonomously but requires constant driver supervision who needs to be prepared to take over control at all times. A German court has ruled Tesla’s claims misleading and there have been numerous cases where the driver who is supposedly in constant supervision instead falls asleep or is on their phone. The National Transportation Safety Board have criticized Tesla’s lack of system safeguards in a fatal 2018 Autopilot crash in California and for failing to foresee and prevent the ‘predictable abuse’ of autopilot.

The fact is, although the claims on ‘Autopilot’ are believed to be abusive and dangerous or at the minimum, misleading by many professionals, they are kept in Tesla’s marketing. This decision is just one of the many intentionally made decisions that show a truer picture of Tesla’s culture, one that does not consider itself to be accountable to rules that apply to Tesla, just like its CEO.

One such instance happened in China, the biggest car market in the world and where Tesla has gained huge grounds, some literal, as Gigafactory 2 was opened in Shanghai a few months ago. Just as the sales of Tesla cars grew, so did the problems that encountered it. Tesla has been ordered to recall 30,000 cars by the China’s State Administration for Market Regulation, but instead of addressing the suspension problem that forced the order to recall those cars, Tesla instead blamed it on ‘driver abuse’ without offering any evidence to support the claim. This came after Tesla executives were summoned by the China’s Ministry of Industry and Information Technology back in March 2020 because Tesla used the old version of computer chips in Model 3s instead of the new version as promised to the consumers, which sparked outrage and resulted in the same Chinese government agency to formally require Tesla to immediately correct the chip downgrade, which Tesla again, instead of recognizing the problem and their own fault, blamed their actions on the supply chain disruption due to COVID-19.

As these stories show, the below-grade manufacturing is far from just a few instances in Tesla, be it in China or elsewhere. It is in fact the culture of Tesla that causes this, of course, at the expense of its customers and potential future sales.

Beyond manufacturing problems that are caused by this culture, these has been numerous whistleblowers and articles that is alleging all sorts of crazy acts happening within Tesla. Mr. Karl Hansen has filed a lawsuit alleging Elon and Tesla’s management have ‘intentionally interfered with efforts to seek employment with other employers in retaliation for outspoken union support’, actively concealed and participated in spying on its employees, improper contracts, theft orchestrated by organized crimes, terminated a Tesla employee’s contract after reporting the theft of $13,000 USD of copper wire to law enforcement, and more. There are more claims after from Mr. Hansen’s, and numerous lawsuits have been filed in what is described by some media as ‘Whistleblower Hell’. It is likely that we continue to see more allegations to come out of Tesla, a terrible position to be in for anyone, especially so for a company that dissolved its U.S. PR unit in October 2020.

To a large extent, Elon is Tesla, and so is his mentality the Tesla culture. Just as his successes support the entire company, so does his own problems creep in. This translates into troubles for Tesla, and if not managed well enough, could be potential deathtraps that threatens the existence of the company itself. The mentality of Elon Musk to ignore the rules whether social expectations, constraints, or perfectly legitimate laws has sparked equal number of innovations and PR crises that lacks a PR department to manage (in the U.S.), and this does not always mean well for the culture of any company, let alone a multinational which is the most valuable car maker in the world.

Simply put, Tesla’s history of troubling actions will continue into the future as it is the company culture that shapes its actions, and Elon’s mentality that shapes its culture.

Chapter 3: Tesla China

Tesla in 2018 became the first foreign car manufacturer to be in sole possession of its Chinese subsidiary, this is followed by the construction of Gigafactory 2 in Shanghai after being offered very beneficial terms by the Shanghai Municipal Government. Construction progressed at a rapid pace and production started just 1 year later in 2019. One of the most impactful effect that Giga Shanghai has brought has been the lowered production cost of Tesla EVs in China, since localized production gets rid of import taxes and lower cost overall. As a result, Tesla has been able to lower its offerings in China to attract more customers, but the way this has been accomplished has tainted its image.

The way that Tesla has lowered the price of its offerings can be described as bad business practice at best, and on the far end, intentionally fooling its customers. Tesla lowers its prices without any prior warning or compensation for customers that have purchased the cars right before the price was lowered. Often customers find themselves to have purchased the car the very day before the price decrease, when Tesla sales agents employ marketing techniques to urge customers make the purchase quickly, presumably before the price is lowered. It is not one, or twice, or thrice that Tesla has lowered its prices this way, but Tesla has adjusted its prices near 60 times after entering the Chinese market which saw the price of Model 3 slashed in half. Predictably this has angered customers that think they were tricked into buying the cars right before the price decrease, often without any compensation and this has sparked outcry on Chinese social media.

Lowering the price of products is generally a good thing for a business because it attracts more customers, but the way that Tesla has done it has made Chinese consumers weary of purchasing Tesla cars because there would be no guarantee that the price would drop by 10% right after you have made the purchase.

Apart from the price issue, Tesla has sparked more outcry on Chinese social media after the recent article that came out with allegation such as quality control issues, ‘Giga-sweatshop’, Tesla operations in Greater China being isolated from the rest of the world bringing opportunities to use practices banned by the company elsewhere, and sales personnel selling Model 3s through private channels at a discount, in stark opposition with the direct sales model that Tesla embraces.

PingWest is the media that published the article, and this is the third instalments of their ‘Tesla China chaos’ series. Only the third is translated into English, and the Chinese version offers much more detail and includes links to the first two instalments of the series.

Chapter 4: Giga Shanghai, my observations and speculations

Disclaimer: My words do not constitute professional opinion, investment advice, or any similar notion in any way, it is only my personal speculation as a tourist and is not meant to be taken seriously beyond the mere literary expression, and the actions you take out of my words is taken entirely at your own responsibility.

In this chapter, I will only address the latest instalment of the series by combining what is described in the article and what I saw and speculate as a result at Tesla’s Giga Shanghai.

There was nothing notable about the factory, the east side expansion was on its way and trucks transporting construction materials were parked on the side of the road. However, given what I was able to see through the extremely limited information outside of the factory, I believe that the article mentioned prior is true.

Rubbish on the side of the road

On the road out of the factory gates, the side is littered with primarily 2 kinds of rubbish, masks and food packaging, in particular, masks were on top of food packaging suggesting that the food packaging existed before the pandemic began. This corroborates with the claim that Giga Shanghai’s food options have been deteriorating since it opened (in 2019, before the pandemic) and inadequate. The container made guard room at the gate of the factory also show signs of trouble, I was unable to take pictures inside due to the guards but if you believe what I say, there was the phone number for the local police station placed at a prominent position that is easy for viewing by the guards. I believe that it was placed later and was not there initially because it was in an awkward position, put on the wall surrounded by plans of the factory and other images, far away on the left-side from where other phone numbers are posted (on the right-side). This has led me to believe that the police number was put there later because they did not put it along with all the other phone numbers (that were on the right-side of the wall), but only felt it was necessary later, potentially due to the chaos described by PingWest.

The grey container is the guard room

The other speculation I would make is that Giga Shanghai faces management chaos. This is the car transporter truck that came out of the factory and this is the same truck a few minutes later stopped at the end of a road. You can tell it is the same truck because it carries Teslas and is white, the other car transporter truck that came out of the factory around that time is blue. The white truck stopped at the end of the road where I observed all other trucks make a U-turn to head towards the highway. I was unable to take a picture of the two workers (due to fear of increased risk as I have lingered around the factory for sometime already) so you have to take my word for it. Two workers were standing on the left side of the truck, one appears to be the driver as the driver’s cabin door was open and there was no one inside, and he wore the driver’s uniform I saw earlier, and the other one appears to be another type of worker, potentially a supervisor as he wore a different uniform than the two kinds I saw earlier. The ‘supervisor’ was holding a binder that contained documents and a pen, and he appeared to be checking with the driver on something. While it is impossible to speculate on the content of the binder or what they were specifically checking on, I believe this shows the management chaos as no reasonable company would conduct its final checks on its deliveries right outside the factory instead of inside, because of the increased risk. Furthermore, this appears to be an isolated instance as I did not see the blue truck that departed later, suggesting that they only discovered something wrong with the white truck last minute and managed to stop it right outside of the factory. In the best sense this shows mismanagement as it is risky to park a truck full of newly made cars at a road construction site, worse this shows the chaos in management that even the checks on new deliveries cannot be done properly.

Tesla has come far and has made giant leaps. Elon Musk has been monumental for Tesla in terms of pushing it to come to where it is today. Not willing to obey the rules is the reason behind Tesla’s numerous innovations, but also its crises. A Chinese proverb says that ‘water floats, and sinks a ship’, what has made Tesla Tesla, could also ultimately be its downfall.

Images taken at Giga Shanghai

White truck departing the factory
The blue truck came later
White truck stopped at the end of the road (do not enter sign can be clearly seen)
Map showing where white truck was parked

Further reading

252 judgements: Behind the lawsuits that Tesla brought onto itself in China (in Chinese)

Bibliography

Tesla’s ‘Autopilot’ misleading, Germany rules

NTSB warns about law oversight of new car tech

US agency opens probe into 115,000 Tesla vehicles over suspension issue

Tesla, recalling 30,000 cars in China, blames ‘driver abuse’

Tesla attributes recall of nearly 50,000 cars in China to driver abuse

Tesla is in trouble with the Chinese government after it quietly downgraded the chips in some of its Model 3 cars

How Elon Musk built a Tesla factory in China in less than a year

Tesla to recall 3,183 Model X vehicles in China, market regulator

薛定谔的春天

读余秀华的《春天回来时》,想到,春天除了是万物复苏、生命萌发的季节,大概也是确认死亡的季节。那些在寒冬中死去的,直到春天,没有看到像期望中一样出现,才算最终确定了,它的死亡。才能真正开始,以此来决定之后的心情。之前冻土下,不知道生死的状态,就像薛定谔的箱子,终有一刻被婉转打开。

春天回来时 余秀华

该来的都会来
你我在一个温暖的流域老去了
鱼群从身边流过,我们不认识,却互相知道
它们的身体折射出光芒,如同我们的过去
噢,我们的过去
春天一次次来临我们的身上
嘬出浅浅的窝,埋下的种子没有等到夏天
就被鸟雀翻了出来
但是你一次次原谅这样的意外
并当之以常态来爱
连同这个春天
包裹的悲悯

面向产品设计的 Web 前端分享会(分享会记录)

最近听说部门里面的产品或本地化运营对 Web 前端相关的内容比较感兴趣,正好我有相关的实践经验,所以在公司做了一个 Web 前端相关的分享会。分享内容包含:

  1. 使用 Devtools:介绍 Chrome 浏览器内的模拟、编辑和审查工具;
  2. 网页和部署:介绍 HTML, CSS, JavaScript, React,以及网站的部署和托管;
  3. 网页性能指标:介绍网页性能常用指标和测量工具;
  4. 资源分享:分享浏览器插件、网站和课程推荐。

与以往不同的是,这次分享会中加入了互动环节。我做了一个代码 Playground,尝试帮助观众了解 React,以及 React Props 的概念,并留了两个小任务,给观众尝试去实践对 React 项目进行编码。

完整的分享内容内容请继续浏览本文。

使用 Devtools

这个章节主要介绍 Chrome Devtools 一些可能不为人知的功能,来帮助我们提高日常工作中的效率和解决一些问题。先介绍 Devtool 里面「模拟」相关的功能。

模拟设备和屏幕尺寸

在 Devtool 里打开设备工具栏,在这里除了能够自由调整网页宽高,还能够模拟各种主流设备的屏幕。

甚至还能读取到网页里面的断点样式,提供快捷切换各种断点的方式。

需要注意的是,这里模拟的设备是会带上 UA 的,所以如果想在电脑里调试一些做了移动端特化处理的网站(比如访问主域名时,判断到是手机设备,则会跳到移动端的专门网站),是需要用到这个功能的。

模拟伪类

Devtools 还可以帮助我们排查各种交互状态下的样式问题,最常用的是,比如说我们想仔细排查某个元素的悬停和按下状态的样式,则可以在选中元素之后,勾选对应的伪类选项。

模拟媒体

在渲染面板(需要手动开启,浏览器默认是没有打开这个面板的)能够模拟部分系统设置,比如亮暗模式、打印模式、高对比度和减少动态效果等。

与之对应地,可以扩展一个概念叫做 CSS 的媒体查询,CSS 还可以探测到很多用户设备的属性或者设置,比如设备指针精度、视窗比例、当前是否全屏模式、设备方向等…

能探测的内容很多,但实际能用起来的可能只有寥寥数个,最全面的信息可以取 MDN 上查看。

编辑网页文字样式

Devtools 还提供了一个新的字体编辑器,能够让我们实时更改网页中的字体家族、字体大小、字重等属性。

编辑网页内容

我们在 Devtools 控制台里面执行代码document.designMode = 'on' 后,就可以实时在本地修改网页文字内容了,就跟平常打字一样。很适合用在测试文案长度的场景。最后也会分享一个浏览器插件,能够对网页做更多的编辑。

审查 React 组件

最后介绍一个审查 React 组件的方法,有时候我们想看某个元素是不是用的组件库,或者这个组件包含了什么属性之类的,可以下载 React Developer Tools,然后点选网页中的任意元素,进行审查。

网页和部署

接下来我介绍一下网页构成和网站部署相关的内容。

通常来说,HTML, CSS, JavaScript 是构成网站的三个要素。其中:

  • HTML 用来用于定义网页的结构和内容,可以用来创建网站的各个部分,比如标题、段落、图片、链接等。
  • CSS 用来定义网页的样式和布局,这个可能会是咱们设计师比较熟悉的部分,我们能够利用 CSS 来定义 HTML 元素的各种样式,控制它们的布局和位置。
  • JavaScript 用来实现各种功能逻辑和操作交互。比如响应点击事件、动态修改网页内容,根据条件执行动画效果或展示特定内容等。

CSS 预处理器

上述的三种语言,都有各自对应的语法规则。而 CSS 预处理器,则改进了原有的 CSS 语法,使我们能使用更复杂的逻辑语法,比如使用变量、代码嵌套和继承等。

简单来说,CSS 预处理器能让我们写样式代码的过程更顺畅,使代码有更良好的可读性和扩展性,帮助我们更好地维护代码。

举个简单的例子,比如原本的 CSS 语法中要求我们给每一个元素写样式时,必须以花括号开始和结尾,而且每一条样式规则直接都要以分号隔开,而 Stylus 则能够让我们跳出这个限制。直接用换行和缩进来代替。

CSS 框架

另一个值得一提的概念是 CSS 框架。CSS 框架则提供了一套预设样式,比如颜色板、字体梯度,布局和断点设定等;以及一些常用组件,如导航栏、对话框和页脚等。

简单来说,就是提供了一批开箱即用的样式,便于开发者快速启动项目,同时也会保留高度自定义的空间,用于支持各种各样的需求。通常 CSS 框架都会包含使用某个 CSS 预处理器,甚至内置了一些图标库,主打一个 “开箱即用”。

这里稍微介绍一下一个 CSS 框架:Tailwind CSS。是一个高度定制化的 CSS 框架,通过大量的预定义类名,使开发人员快速构建和设计网页界面。

与其他 CSS 框架相比,有一个显著的特点是 Tailwind CSS 本身不会包装一个组件出来,比如按钮、输入框的样式,没有预设好的。取而代之的是,Tailwind CSS 将各种原子级的 CSS 类名包装起来,比如:

  • 设置左右两边的 Padding,用 px-[...] 类名来实现;
  • 设置一个元素为块级元素, 用block 类名来实现…

如果想要在 TailwindCSS 中,使用打包好的组件,达到开箱即用的效果,可以通过各种官方/非官方的模版或组件生态来进行。比如:

React

接下来介绍另一个概念:React。这是一个用于构建 Web 和原生交互界面的库(是的,它能够用来做 App,不仅仅是网页)。而且引入了 JSX 语法,将 HTML 和 JS 结合起来,以一种更直观和易于理解的方式描述界面的结构和内容。

React 有一点和我们的设计稿很像,就是它的组件思维。在构建用户界面时,React 主张先把内容分解成一个个可以复用的组件(把具体的交互、功能逻辑写在组件里面)。然后在页面中将各个组件连接起来,使数据流经它们。

下图引用了官网中的一个例子,其中:

  1. 完整的应用,可以理解为由多个组件拼接成的完成网页;
  2. 搜索组件,用来获取用户输入;
  3. 数据列表,会根据用户搜索来过滤和展示内容;
  4. 每个列表的表头;
  5. 表格内每条数据。

现在我们用一个具体例子来简单介绍下 React 的组件。

在上图中,展示了一个页面页面 App.jsx 包含了 Profile、Gallery 和 FAQ 组件,以及 Profile.jsx 组件的代码。右侧是输出页面,展示了三个组件拼接而成的页面效果示意图,其中 Profile 组件模块里展示的内容,是和 Profile.jsx 文件内代码一一对应的。

上述的组件只是将一个模块包装起来,使其能够被其他地方复用。但组件内容是固定的。接下来会为大家展示如何向组件传递 Props,实现上文提到的一句话 “使数据流经他们” 。

在上图中,我们先将一些 Props 传递给组件 Profile(比如这里传递了图片的地址、人物姓名和描述),然后在 Profile 组件内接收这些 Props,并在组件代码内使用这些数据。

现在,我们就做出了一个可以复用的组件了,可以根据不同的内容来展示相关的人物信息。

大家有没有觉得这种做法有点熟悉?是的,在 Figma 中,我们的组件里面也有类似的做法。Figma 组件同样同样传递字符串、布尔和组件等内容。

实际上 React 组件可以传递的参数不仅仅只是上面例子中的字符串和布尔值,还能传递数值、函数、对象、Node 类型甚至另一个组件等。

我做了一个简单的 Playground,提前封装好了一个 Profile 组件,会传递一些字符串、布尔值(是否展示网站标签)以及数值(圆角大小),帮助大家更好地理解。

🛝 Playground

我做了一个 🛝 Playground ,大家可以在里面看到这个组件的具体的情况,实际看一遍代码可能会帮助理解 React 的组建和 Props 概念。

同时我也写了两个小任务给到大家去尝试,大家可以在上面的编辑器中自由尝试。

发布网站

到了这里,相信大家对构建一个网站已经有了初步的认识,接下来我为大家介绍下如何将构建好的网站发布的互联网当中,能够真正地被世界各地的人们浏览。

方法一:部署到服务器

这是比较传统的方法,先将项目相关的文件放进服务器里面(比如阿里云 ECS,或轻量服务器等)。然后在服务器内安装 NGINX,索引到项目文件夹,定义好首页、端口、404 等场景,最后将域名解析到服务器 IP。之后我们的网站就能在互联网上被人们访问了。

方法二:托管到服务商

这种是相对省心的方法,将我们项目所在的 GitHub 仓库,链接到服务商的托管服务当中。等于是由服务商来帮我们部署、发布项目,不用自己来配置服务器的各种内容了。下图列举了几种常见的网站托管服务商,分别是:Vercel,Github Pages 和 Netlify。

以 Vercel 来举例,除了能够托管网站之外,对每一次发布进行管理,甚至能够是对不同代码分支进行独立发布,还能收集网站访问数据等。

网页性能

接下来为大家介绍网页性能相关的内容。通常一个网站性能好不好,我们能够在体验时主观地感受到,比如打开时很慢、滚动时卡顿,或者点击按钮后很久才响应等等。但如果要准确地判断到网页的性能到底如何,是需要依赖具体指标的。

下面介绍三个常用的指标,分别是:FCP(首次内容绘制)、LCP(最大内容绘制)以及 CLS(积累布局偏移)。

FCP(首次内容绘制)

FCP 是一个关键指标,用来测量页面从开始加载到第一个页面内容在屏幕上完成渲染的时间。越快的 FCP 时间能够让用户感知到网页有在正常运行,而不是停滞、无响应。

这里提到的 “内容” ,指的是文本、图像(包括背景图像)、<svg>元素或非白色的<canvas>元素。如下图所示,FCP 出现在第二帧。

LCP(最大内容绘制)

LCP 指的从页面开始加载到可视区域内可见的「最大图像」或「文本块」完成渲染的时间。

这里提到的「最大图像」或「文本块」,具体来说是包含<img>元素、内嵌在<svg>元素内的<image>元素、块级文本等。

而测量方式,则是在页面加载过程中,记录视窗内的元素的渲染大小,取尺寸最大的元素,回溯这个元素被完整渲染的时间。注意,如果元素的有一部分在视窗外,在视窗外的部分不会参与到尺寸比较当中。

如下图所示,LCP 发生在第二帧,因为这个时候渲染尺寸最大的文本块被渲染出来了。后续帧当中,可能渲染出了一些图片,但尺寸都比文本块小,所以文本块依然是这个视窗内的最大元素。

CLS(积累布局偏移)

CLS 是指可视区域内发生的最大布局偏移分数。简单来说就是测量页面在加载时,元素的位置出现意外的偏移情况,如果元素尺寸大,而且位置偏移比较远,那么 CLS 分数就会显著增高。

这个指标会跟实际的用户操作或者体验有直接相关,所以应该也会是咱们设计师需要重点关注的内容,因为有时候布局偏移,是会比较影响用户获取信息、或者进行操作,甚至引发一些不可挽回的损失。

然后我来介绍一下测量网页性能的工具吧。我自己用过这两个,发现其实没啥差别,大家看喜好使用即可:

两个工具都能模拟桌面设备或者移动设备,记录多项关键指标的数据,并给出改进建议。

观察页面性能情况,不仅仅是前端技术人员要做的事情,了解到设计师也是可以参与到其中的。

比如 Guillaume Granger,他会比较想控制页面中 JavaScript 的数量,所以它提到,他会将所有用了 JavaScript 相关信息记录在表格当中。之后每次在网页中使用 JavaScript 时,都会跟之前的记录进行比对,判断重要性,决定是否在这个位置上使用 JavaScript。

开发者 Thomas Kelly 则提出了当意识到页面性能出现瓶颈时,需要做的事情,比如:

  • 制定一个目标,团队一起往这个目标前进;
  • 高频收集页面性能数据;
  • 尝试用不同方式来解决同一个问题;
  • 与同伴分享对性能的一些新发现…

资源分享

最后来分享一下相关的资源吧,包含两个插件、三个学习网站以及一个 React 课程。

插件:VisBug

介绍一个谷歌官方出品的插件:VisBug,主要用来帮助用户在浏览网页时进行调试和设计,包括编辑和可视化页面的 CSS,尺寸和字体等元素。

插件:Motion DevTools

Motion DevTools 是一个检查网页动效的插件,可视化和分析用户交互设计中的滚动、动画效果,并支持实时编辑、预览或导出等功能。

网站推荐

接下来介绍三个在国内外拥有较高知名度和影响力的设计师和开发人员。他们的观点、经验分享往往能给我带来一些新的启发。尤其是他们对钻研新技术的热情,是非常强烈的。

课程推荐

最后强烈推荐一门 React 课程——The Joy of React,这个课程我在年初的文章也有提到过,是以互动式课程的形式,由浅入深地讲解 React。从基础的组件 props 和 JSX 知识,到 Hooks、API 设计等等,讲述非常清晰,强烈推荐。

分享会感想

分享完之后感觉效果可能还不错,大家都有各自的收获。而且分享会中也不时有人提出相关问题,我也一一进行解答了。

或者也有对我分享内容的一些补充,比如我在分享完 Devtools 环节的时候,有同事也分享了一个在 Application — Cookie 面板里快速切换网页语言的方法。

后面了解到大家对于 CSS 和 React 那块听的比较迷糊,因为原本没有实践过的话,会对这些没有什么概念。而且大家好像对 🛝Playground 没有什么兴趣,并没有人对里面的内容有什么提问和看法之类的,可能到这一步都比较迷糊?🤔

指标那块倒是有不少同事关心,问了几个问题,比如有哪些方法来去改进几个指标的数据,或者在设计过程中是否可以提前避免性能问题等等。

总体来说和之前的分享会相比,这次分享会的参与度比较不错。

❌