美國媒體的偏好 (味道)

找資料的時候發現維基百科上面有一個條目是在說明美國媒體的偏好:「Media bias in the United States」,不過上面講的還是比較描述性,另外找了其他的研究來翻。

首先是在「"Fake News," Lies and Propaganda: How to Sort Fact from Fiction」這邊翻到的資料,是出自於「Ideological Placement of Each Source’s Audience」這邊,這是 2014 年的分析:

接著是翻到「News Literacy: News Views & Fact Checking Resources: Media Bias」這篇,出自「Media Bias Chart 4.0: Downloadable Image and Standard License」,這是 2018 年的分析:

再來是「Detecting Bias」,出自「Media Bias Ratings」,這是 2019 年的分析,原網站目前則是更新到 2021 年了:

透過這些資料可以很粗糙的抓一下這些媒體的 Political spectrum,在讀新聞的時候會更清晰一點。

Android 上不讓 App 取得真實的電話簿資料

Hacker News Daily 上看到「Fake Contacts」這個專案,可以把 Android 上的電話簿資料換成假資料,把真實的資料另外存放保存,藉此不讓 app 取得電話簿裡面的真實資料:

Create fake phone contacts, that will be stored on your phone along with your real contacts. The idea is to feed fake data to any apps or companies who are copying our private data to use or sell it. This is called "data-poisoning".

Nothing about these fake contacts will interfere with your normal use of your phone or your real contacts.

可以在 F-Droid 上下載使用:「Fake Contacts」。

另外在 Hacker News 上面也有討論:「Fake_contacts: Android app to create fake phone contacts, to do data-poisoning (github.com/billdietrich)」,其中大家馬上想到的就是 iOS 14 推出的相片保護機制,讓使用者選擇讓 app 讀到哪些相片:

Recently Apple added a feature to iOS that allows you only to allow selected photos to be accessible by an app. This allows the user to respond positively to an access request, but allow the app to see only a subset (or zero) actual photos.

It would be a very useful feature for Apple to do the same for contacts: the app would think it's getting access to your contacts, but would only actually receive a subset of them, and be none the wiser. This would be a tremendous boon for privacy.

Tim Cook 把 Privacy 當作 Feature 的偏好,我會猜在 iOS 遲早會推出這個功能,然後會宣揚吹捧一番。

至於 Android 的話,不太像是會在 iOS 推出前有這個功能...

給 Vim 的進階使用者看的教學

Hacker News Daily 上看到「A Vim Guide for Advanced Users」這篇,寫給 Vim 進階使用者的教學,教你怎麼更順暢的操作 Vim,對我來說還是有不少內容是不熟悉的...

先提到作者的另外兩篇文章,其實也還是很值得翻一下,是給初學者與給中階使用者的教學:「Is Vim Really Not For You? A Beginner Guide」、「A Vim Guide for Intermediate Users」。

這類文件可以隔幾個月回來看一次,每次都可以學到一些東西,不需要一次把裡面的技巧都看懂學完。

Firefox 在 Strict Tracking Protection 模式下閹割 Google Analytics

Twitter 上看到 Firefox 在 Strict Tracking Protection 模式下會閹割掉 Google Analytics

剛好可以跟另外一篇「Google Analytics: Stop feeding the beast」一起看,這篇主要是對網站管理端的說明,你可以使用其他對隱私保護比較好的服務,或是考慮自己架設。

回到使用者端的部份,在 Firefox 裡面 Browser Privacy 預設是 Standard,換成 Strict 後就會觸發這個行為:

不是直接擋掉到 google-analytics.comgoogletagmanager.com 的連線,而是把 javascript 抽換掉,讓呼叫的程式碼完全不會做事。

在 Strict 模式下,除了會閹割 Google Analytics 外,也有其他的 js 會被閹割 (像是 Facebook 的),可以在 GitHub 上的「gecko-dev/browser/extensions/webcompat/shims/」這邊翻到。

這個功能很明顯在 Google Chrome 上不會內建,但很久前就有套件可以用了。目前比較常見的作法是透過 uBlock Origin 做,而且是在內建的「uBlock filters – Privacy」這組定義裡面就有實做,對應到 GitHub 上的 privacy.txt 這邊可以看到:

! Redirect to neutered Google Analytics 
||google-analytics.com/analytics.js$script,redirect=google-analytics.com/analytics.js

! Redirect to neutered Google Analytics Experiments
||google-analytics.com/cx/api.js$script,redirect=google-analytics.com/cx/api.js

不過 Firefox 上的 uBlock Origin 與其他套件也有類似的功能,真的在意的人應該早就使用了...

DigitalOcean 送出 Form S-1

Hacker News Daily 上看到的消息,DigitalOcean 送出 Form S-1:「d898181ds1.htm」,在 Hacker News 上也有不少討論:「DigitalOcean S-1 (sec.gov)」。

這個消息跟 2020 年年初的裁員也可以交叉看一下:「DigitalOcean 裁員」,另外在 TechCrunch 上也有報導:「DigitalOcean’s IPO filing shows a two-class cloud market」。

Hacker News 上蠻多人在抱怨 DO 的產品,像是機器的效能,操作界面的穩定性,還有客服的反應... 不過這些跟 IPO 倒是沒什麼關係,重要的是每年的營業額有做出來:

Per its S-1 filing, DigitalOcean generated $203.1 million in 2018 revenue, $254.8 million in 2019 and $318.4 million in 2020. The company closed 2020 out with a self-calculated $357 million in annual run rate.

自己用的話應該還是偏好 VultrLinode...

超高 PPI 的螢幕

看到「DPI Calculator / PPI Calculator」這個網站,裡面有一些有趣的小螢幕,但是有超高解析度:

1280x1024 @ 0.61 MicroOLED microdisplay (2687.21 PPI)
1920x1080 @ 0.74 Silicon Micro Display ST1080 (2976.9 PPI)
2048x1536 @ 0.83 Forth Dimension QXGA-R9 (3084.34 PPI)
2048x2048 @ 0.99 Kopin Lightning 2K (2925.57 PPI)

不過如果放寬到只要是螢幕就可以的話 (不用是彩色的),查了一下發現跟目前的進展有點遠,目前有查到的是 14000 DPI:「14,000ppi MicroLED display is world’s densest, only 0.48mm across」:

According Mojo Vision, with a world record pixel pitch of 1.8µm and a pixel density over 14,000ppi, the monochrome display technology is the company’s first important step in succeeding in its mission to deliver “Invisible Computing”, enabling people to receive and share information that is immediate and relevant without distracting them from the world in front of them.

不過考慮到彩色螢幕需要三色,上面那幾個 3000 PPI 好像已經很厲害了...

挖 Ethereum 加熱房間...

大家都好像有過類似的想法,只是實際去做的不多 XDDD

有人把整個作法寫出來,挖 Ethereum 加熱房間:「How I heat my home by mining crypto currencies」。

從網站上的「About me」這邊看起來應該是住在奧地利?

I am a tech geek from Austin TX (USA), living on the country side in Austria and devote most of my time to my girlfriend, my company, my students and different projects.

不確定是哪個城市,先抓了首都維也納的溫度來看,看起來一到三月的平均氣溫都在個位數 (攝氏),可以理解暖氣應該是常備物品:

作者之前就先搞過一個可以一路接到 Grafana 的電錶,然後也有裝太陽能電板,但因為暖氣用電的關係而不夠用:

After building my own smart meter using 4$ in parts I started checking my electricity usage every day, which made me realize how expensive it is to heat your home. Especially since all heat and warm water in my low-energy house is made with electricity. I do have 4.8 kwp solar panels on my roof but in winter they don't cover too much for obvious reasons.

順便查了一下電價,在「Austria electricity prices」這頁可以看到奧地利的每一度要 USD$0.248:

而同一份資料上,台灣是 USD$0.101:

回到他的暖氣機,他是屬於中央空調大台機器的類型:

這種機器會恆溫輸出,所以是進風溫度愈低,就需要使用愈高的電能加熱。所以他想到的解法就是針對進風口預先用顯卡挖礦加熱 (四張 AMD 的 R9 390),這樣就可以降低暖氣機的電力消耗 (不過整體的消耗會提昇):

I had 4 older AMD R9 390 GPUs laying around (for the nVidia crowd that's basically on a level with a GTX 970) and I thought it could work.

後面就是改裝過程了,最後的結果雖然整體的電力使用量上升,但因為暖氣機的電力消耗降低,加上礦機挖到的 ETH 直接 cover 暖氣機的費用,反而讓暖氣機變免費了:

Success! I was able to lower my heat pump's electricity needs by ~50% and half of the costs are also paid for by the mining earnings

台灣的氣溫應該是用不太到 XDDD

今天釋出的 Firefox 86 推出了 Total Cookie Protection

Firefox 86 (新推出的 standard 版本) 推出了 Total Cookie Protection:「Firefox 86 Introduces Total Cookie Protection」。

每個站的 cookie 都有獨立的空間:

Our new feature, Total Cookie Protection, works by maintaining a separate “cookie jar” for each website you visit. Any time a website, or third-party content embedded in a website, deposits a cookie in your browser, that cookie is confined to the cookie jar assigned to that website, such that it is not allowed to be shared with any other website.

然後對於需要跨站類的應用另外處理,像是 3rd-party login:

In addition, Total Cookie Protection makes a limited exception for cross-site cookies when they are needed for non-tracking purposes, such as those used by popular third-party login providers. Only when Total Cookie Protection detects that you intend to use a provider, will it give that provider permission to use a cross-site cookie specifically for the site you’re currently visiting. Such momentary exceptions allow for strong privacy protection without affecting your browsing experience.

這樣的確把 cookie 的追蹤能力壓低很多,不過應該也會有不少站台掛掉...

PostgreSQL 的 Fuzzy Matching

在「Fuzzy Name Matching in Postgres」這邊看到 PostgreSQL 下怎麼設計 Fuzzy Matching 的方式,文章裡用的方法主要是出自 PostgreSQL 的文件:「F.15. fuzzystrmatch」。

文章最後的解法是 Soundex + Levenshtein

翻了一下資料,這個領域另外有 NYSIIS (New York State Identification and Intelligence System):

The New York State Identification and Intelligence System Phonetic Code, commonly known as NYSIIS, is a phonetic algorithm devised in 1970 as part of the New York State Identification and Intelligence System (now a part of the New York State Division of Criminal Justice Services). It features an accuracy increase of 2.7% over the traditional Soundex algorithm.

以及 Metaphone

Metaphone is a phonetic algorithm, published by Lawrence Philips in 1990, for indexing words by their English pronunciation. It fundamentally improves on the Soundex algorithm by using information about variations and inconsistencies in English spelling and pronunciation to produce a more accurate encoding, which does a better job of matching words and names which sound similar. As with Soundex, similar-sounding words should share the same keys. Metaphone is available as a built-in operator in a number of systems.

不過這些都是以英文為主,中文的沒特別翻到...

Terminal 的 Dark Theme

在「Automatic dark mode for terminal applications」這邊看到讓 terminal 的一些程式支援 Dark Theme 的方式,裡面引用的是「Automatic dark mode for terminal applications」這篇。

可以看到因為 terminal 下沒有標準,所以得 hack 事件發生時要送出的指令,文章裡面給出了 Vim (以及 Tmux)、Alacritty 這幾套程式的 hack。

不過這些 hack 過程算詳細 (而且有說明整個原理),如果有其他 terminal 下的程式有支援 Dark Theme 的話也可以用類似的邏輯套進去。