Categories
quote thoughts

Keeping a file

In the book The Sociological Imagination, C. Wright Mills emphasizes the importance of keeping a file (a blog, journal of sought) as a way of organizing thoughts, observations, and intellectual development. Here is a quote:

“In such a file, you, as an intellectual craftsman, will find your developing ideas, your questions and answers, your personal notes and excerpts from books, your bibliographical items, and outlines of projects.”

He goes on to say:

“By keeping an adequate file and thus developing self-reflective habits, you learn how to keep your inner world awake.”

This is why I am writing on this blog. To keep an archive of thoughts hence the tag line “not sure how raw these thoughts are”.

Categories
Book Review

Islands in the Cyberstream

The book “Islands in the Cyberstream: Seeking Havens of Reason in a Programmed Society” is an interview between Joseph Weizenbaum and Gunna Wendt. This is how this books ends:

“It is a widely held but a grievously mistaken belief that civil courage finds exercise only in the context of world-shaking events. To the contrary, it’s most arduous exercise is often in those small contexts in which the challenge is to overcome the fears induced by petty concerns over career, over our relationships to those who appear to have power over us, over whatever may disturb the tranquility of our mundane existence.”

This is actually a quote from his book “Computer Power and Human Reason”. The quote is there because her daughter asked him to read his own book.

Professor Weizenbaum came to fame for creating Eliza, a natural language processing program that explores interactions between humans and machines. You can read more it on Wikipedia here https://en.wikipedia.org/wiki/ELIZA. What surprised Weizenbaum was how fast and tight the relationship between humans and the program developed. His own secretary who knew how the program worked feel into deep conversation with the program and even referred to it as “doctor”.

Prof Weizenbaum became a critic of the role of computers in our society, he says he is a social critic not a computer critic. Through the interviews we get to view his insights. When asked about the influence of computer on society he suggests we change perspective and ask “what influence does society have on the computer, on its development and its meaning?” He states the fact that the “computer was born in war and that the military made and sponsored all computer research and advances”. Most great applications of technology end up to be used in the military, in the US context.

The interview gets into discussing misinformation with examples of how war lies were communicated via the television. He says “We can never really be sure if what we are seeing on the television is reality or if it is simulated”.

He gets into discussing technology and its introduction in schools. I quote:

“The screen is not without danger for children. On the one hand – we have talked about this already – because they experience that screens are a source of truth, daily at home. Maybe I should replace ‘truth’ with ‘reality? Children experience reality through the screens. I don’t want to talk about how much time they sit in front of television on average, it is no doubt a lot, but that’s not what this is about.”

This reminds me the challenges we are experiencing with the many hours we are immersed in social media bubbles. How hard it is for our “WhatsApp aunties” to spot AI generated videos. If adults are facing psychological challenges with this exposure, how much would it affect children’s thinking. He goes further into his thoughts on learning:

Referring to learning, what I think is very dangerous is the way that knowledge is picked up from screens. It reaches the watcher without having to exert any kind of struggle. Absolutely effortless – you could say at the push of a button. But that isn’t how we learn. I can only repeat: learning does not mean the piling up of knowledge. Knowledge comes to the learner only with a certain commitment, with a certain effort and struggle, or else it doesn’t stick. It has to be developed, it doesn’t just fall in the lap.

He cautions against ignoring problems that actually exist and engineering problems that technology will solve. For example he says instead of spending budgets on computers maybe we should focus on issues like education feeding programs that play a critical role in how children learn in school.

Through the book we see how Prof Weizenbaum is surprised by how the scientific community views humans as seen in the follow quotes:

Hofstadter’s answer was: Firstly he didn’t worry about it and secondly, the human race is not the most important thing in the universe.

“Another important American philosopher, Daniel Dennett from Tufts University has set the challenge: “We must lose our reverence for life before any real progress can be made in Artificial Intelligence.”

Anyway, today in America only a few people protest the idea that the human is at root just an information processing machine or that pieces of living people can be replaced with artificial organs.

He is very troubled by how many have reduced humans to information processing machines that can be replaced a robot that becomes human. Imperfect machines. He states that “Only a human can confirm the humanity of another human.”

Prof Weizenbaum emphasis on the need for an individual, the island, to be able to critically think on our own. He is against a certain specific laziness, intellectually or spiritually laziness. He says:

In our society we rarely have the opportunity to sail alone on the sea. We live in our society almost completely in the harbor, not always the same one, sometimes this harbor, sometimes that one. And mostly there are other people who are responsible for us. We seldom have the opportunity or we are seldom challenged to truly decide things for ourselves. In our consumer society, for example, it is the advertisements that recommend, you could even say, command what we should do. At a certain degree of wealth we can be lazy – I mean especially intellectually or spiritually lazy.

I first got to hear of Prof Weizenbaum social criticism through the Tech Won’t Save Us podcast. I recommend listening to the episode here https://techwontsave.us/episode/182_ai_criticism_has_a_decades_long_history_w_ben_tarnoff

This a great social critic. Looking forward to getting and reading his book “Computer Power and Human Reason”.

Categories
Book Review readings

The Stranger by Albert Marcus

This is a book about a man, Meursault, who doesn’t care. This is the first line:

“Maman died today. Or yesterday maybe, I don’t know.”

 He doesn’t even know when his mother dies. It starts with him attending his mother’s funeral in a home he sent her to. There he meets all the people that her mother interacted with. He is strikingly emotionally detached. He immediately gets back to work. When his boss asks about his mother’s age, he says “About sixty”. He gets into a relationship the day after the funeral and goes to watch comedy with her. The neighbours worry about him but he clearly shows no emotions.

He passively drifts through life observing other humans from a far, his house window while smoking. Meursault ends up killing a man on the beach, he had no personal issues with the man. This murder was very senseless.

“It was then that I realized you could either shoot or not shoot.”

His murder trial becomes a scrutiny of his lack of remorse, particularly his behaviour during his mother’s death. This lack of grief becomes the real crime in court.

“I had this stupid urge to cry, because I could feel how much all these people hated me.”

Many testify that he showed no emotion during the funeral, an example was him offering someone a cigarette. When the judge asks him for a reason for his action, he blames the sun.

The book from my view seems to show us someone who has accepted that life is meaningless contrary to how many struggle to attach meaning to life. His alienation from friends, society and even his emotions making him the stranger. He has found freedom in the acceptance of life’s meaninglessness and ultimately finds acceptance of death.

“I opened myself to the gentle indifference of the world. Finding it so much like myself—so like a brother, really—I felt that I had been happy and that I was happy again.”

This is a really good read and cries for another read.

Categories
macOS TILs

networkquality

Today I learned that MacOS has an inbuilt command networkquality that can use can you to test your internet speeds without using speedtest.net or fast.com. You type it in the command line and while running it will display the Downlink, Uplink speeds:

$ networkquality
Downlink: 3.958 Mbps, 37 RPM - Uplink: 8.765 Mbps, 37 RPM

You can stop it using Ctrl+C but if you let it run for a few seconds it will end with a summary as shown below

==== SUMMARY ====
Uplink capacity: 7.997 Mbps
Downlink capacity: 5.332 Mbps
Responsiveness: Low (1.071 seconds | 56 RPM)
Idle Latency: 104.417 milliseconds | 576 RPM

I’m thinking this might be a way that maintains privacy without having to visit some ads serving speed testing website.

Categories
readings

against self-criticism

“We are never as good as we should be; and neither, it seems, are other people. A life without a so-called critical faculty would seem an idiocy: what are we, after all, but our powers of discrimination, our taste, the violence of our preferences? Self-criticism, and the self as critical, are essential to our sense, our picture, of our so-called selves. Nothing makes us more critical – more suspicious or appalled or even mildly amused – than the suggestion that we should drop all this relentless criticism, that we should be less impressed by it and start really loving ourselves.”

Categories
macOS TILs

remove exif data on MacOS

I was look at how to remove exif data from photos I had copied to my Mac. I used AppleScript to achieve this:

— Select images to remove EXIF data
set imageFiles to choose file with prompt "Select images to remove EXIF data" of type {"public.image"} with multiple selections allowed
— Loop through each selected image
repeat with imageFile in imageFiles
set imagePath to POSIX path of imageFile
— Create a backup copy (optional)
do shell script "cp " & quoted form of imagePath & " " & quoted form of imagePath & ".backup"
— Remove metadata using sips
do shell script "sips -s formatOptions none " & quoted form of imagePath
end repeat
display dialog "EXIF data removed from selected images." buttons {"OK"} default button "OK"

To use this:

  1. Open Script Editor on your Mac (found in Applications > Utilities).
  2. Paste the script
  3. Hit the run button

This script lets you select one or more images, uses the sips command with the -s formatOptions none option to remove the metadata. It makes a backup copy of the image with .backup extension.

Categories
macOS TILs

Console.app

Today while reading this blog, https://objective-see.org/blog/blog_0x7B.html, by the amazing Patrick Wardle, I learned about the MacOS Console.app

Console app allows you to see reports generated on you mac and iPhone. These reports include: crash, spin, log, diagnostic, mac analytics and system log reports. See screenshot below with the example in the blog post mentioned above. Here there is code and screenshot of the crash report via the Console app:

This is what you see on the terminal when you run the compile and run ./a.out

Console app has a lot of details well summarised plus the full report in json format

You can also see reports from your iPhone. See below screenshot of wifid process on the iPhone

These reports are important when you want to understand what is really going on on your devices. I suggest reading the blog post I linked at the beginning https://objective-see.org/blog/blog_0x7B.html

Categories
python

nltk.download

Was working on some sentences and needed to download the ‘punkt’ nltk (natural language toolkit) data file but encountered the following issue:

[nltk_data] Error loading punkt: <urlopen error [SSL:
[nltk_data]     CERTIFICATE_VERIFY_FAILED] certificate verify failed:
[nltk_data]     unable to get local issuer certificate (_ssl.c:1000)>

This seemed to be a ssl issue. So I run this command:

sh "/Applications/Python 3.12/Install Certificates.command"

Which installed certifi

-- pip install --upgrade certifi
Collecting certifi
  Using cached certifi-2024.7.4-py3-none-any.whl.metadata (2.2 kB)
Using cached certifi-2024.7.4-py3-none-any.whl (162 kB)
Installing collected packages: certifi
Successfully installed certifi-2024.7.4

Then attempted download of the nltk data files via the terminal:

python3 -c ""import nltk;nltk.download('punkt')"

Categories
data TILs

Collaborative Filtering

This is a technique used in recommendations systems to predict preferences of a user by collecting preferences from many users.

There are 2 types:

  1. user based collaborative filtering – finds users who are similar to the target user based on their past interactions (e.g., ratings or purchases) and recommends items that these similar users liked
  2. item based collaborative filtering – looks at the similarity between items based on users’ past behavior. It recommends items that are similar to what the target user has liked in the past

Here is code. Its scrollable 🙂

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

You can find the Jupyter notebook here https://github.com/bmwasaru/collaborative_filtering/blob/main/collaborative_filtering.ipynb

Leave me a comment, I like feedback 🙂

Categories
git TILs

[rejected] main -> main (fetch first)

So I created a repository on Github and added a README file during the creation and I needed to push my local changes to the GitHub remote repository, I encountered this error because the history on the main branch are different between the local and remote repo

 ! [rejected]        main -> main (fetch first)
error: failed to push some refs to 'https://github.com/<my_username>/<repo_name>.git'

To solve this I tried:

$ git pull origin main --allow-unrelated-histories

Then I encountered this warning or was it an error (its yellow in colour):

hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
hint: 
hint:   git config pull.rebase false  # merge
hint:   git config pull.rebase true   # rebase
hint:   git config pull.ff only       # fast-forward only
hint: 
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
I had to run the following:
$ git config pull.rebase false
$ git pull origin main --allow-unrelated-histories