Saturday, June 06, 2026

The Joy of Historical Deep-Dives with AI

My recent chat with AI started simple: How did we get from Michael Faraday’s 1821 toy demonstration of a wire spinning in a bowl of mercury to the high-power industrial motors that run our world today?

It turns out the evolution of the electric motor wasn't just a story of laboratory breakthroughs. It was a messy, high-stakes saga funded by wartime telegraphy, secured by Cossacks, and built by a group of brilliant, broke brothers who knew exactly how to close a magnetic air gap when it mattered most.

When I asked what role Werner von Siemens played, the conversation shifted from pure physics to heavy mechanical engineering. It turns out Siemens’ grand contribution wasn't discovering a new law of nature; it was eliminating the air gap.

Early armatures were bulky and left air gaps between the spinning rotor and stationary magnets. Because air resists magnetic fields, energy was wasted. Siemens invented the shuttle armature in 1856, cutting deep grooves into an iron cylinder to tuck the wires inside, allowing the iron core to spin mere fractions of a millimeter from the magnets.

I realized that Siemens was pouring capital into motor R&D in the 1850s and 60s, but motors weren’t commercially viable yet. Where was the money coming from?

I discovered that Werner von Siemens started with absolutely zero family money. He was not a member of the aristocracy, Werner officially received the "von" name in 1888, quite late in his life (he was 71 years old). He was a penniless son (with 10 other siblings) of an educated tenant farmer who couldn't afford college. He only got an engineering education because he joined the Prussian Artillery Corps in 1834, which offered free schooling to officer candidates.

To be accepted as an officer candidate, Werner had to pass a demanding entrance examination that tested math, physics, geography, and French. This was a great hurdle for him because his secondary school education had focused heavily on classical languages (like Latin and Greek) rather than hard sciences. He spent three months cramming under intense self-preparation. Later in his life, he admitted in his recollections that while he prepared fiercely, passing the exam and securing his spot was also aided by "a spot of good luck."

Once inside the academy, Werner treated his strictly military duties as a necessary chore to secure his livelihood, focusing his real energy on the chemistry and physics lectures taught by top university scientists. The penniless outsider had successfully used the Prussian state to fund the very education that would later allow him to revolutionize the industrial world.

Even his early laboratory work was pure hustle. He perfected a commercial electroplating process while serving time in a military prison cell for acting as a second in an illegal duel! Because he was an officer, he was given "honorable confinement" (Festungshaft), allowing him to turn his cell table into a chemistry bench and smuggle in reagents through a friendly local apothecary and earn some money.

While serving as an artillery officer, Werner became fascinated by the early needle telegraphs being developed in Britain by William Fothergill Cooke and Charles Wheatstone. These early devices required users to watch multiple needles point to letters on a diamond-shaped grid. They were finicky, easily knocked out of sync, and required skilled operators. Werner looked at this system and thought he could make it vastly more user-friendly. In 1846, he built a prototype of a dial telegraph. It was so simple that an untrained person could type and read messages instantly.

Because Werner had spent years publishing scientific papers and developing his dial telegraph prototype, he was appointed as a technical expert to the Prussian Telegraph Commission in 1846. He effectively became the internal advisor helping the government decide what to buy, putting him in the perfect position to pitch his own capabilities.

Werner had the design, but he lacked two critical things: the money to build it at scale, and the mechanical precision to manufacture it perfectly. He found his solution in two men: Johann Georg Halske, a highly skilled master clockmaker and precision mechanic in Berlin. Johann Georg Siemens, Werner’s wealthy cousin. He provided the initial seed capital of 6,842 thalers (a substantial sum for a young startup) to buy tools and rent a small workshop. On October 1, 1847, they opened the Telegraphen-Bauanstalt von Siemens & Halske in a small Berlin courtyard with just ten employees.

In 1848, amidst a wave of violent democratic revolutions, the Prussian government desperately needed a secure, underground communications line from Berlin to Frankfurt. Werner did not have high-society aristocratic connections, but he built a highly strategic, merit-based professional network inside the Prussian military and scientific establishment. He secured the 1848 Berlin-to-Frankfurt 500km telegraph contract through a mix of institutional placement, a powerful mentor (Magnus), and a perfectly timed political crisis. He also had just invented a machine to coat copper wires in seamless gutta-percha (a newly discovered Malaysian tree sap, better than rubber, sent to him by his younger brother Wilhelm in London). He landed the contract and laid the underground line.

But then came the twist: The early underground wires rotted. Bacteria ate them. Field mice and hamsters chewed through them. The Prussian underground network collapsed, a bitter bureaucratic feud erupted, and Siemens was effectively blacklisted from getting any more Prussian state contracts.

To survive, the Siemens brothers had to pivot internationally. They ignored Germany and went all-in on the Russian Empire. It required adapting to a closed, highly suspicious St. Petersburg aristocracy. Werner sent his 24-year-old brother, Carl Siemens, to embed himself in Russian high society. Carl succeeded by exploiting the looming panic of the Crimean War and pitching a killer product: a telegraph dial entirely redesigned with the Cyrillic alphabet, meaning completely untrained Russian soldiers could operate it instantly. They first won the initial contract for a line from Warsaw to the Prussian border, finishing in months, proving to the Tsarist officials that the company could deliver under immense pressure. Then they won the 9,000km 1853 telegraph contract.

Having learned his lesson from the previous underground catastrophe, instead of burying the wires to rot, Siemens built a 9,000-kilometer overhead network on wooden poles. This led to the discovery of the Tatarengalvanometer.

Laboratory testing equipment of the 1850s used delicate silk threads to hang magnetic needles, they broke if you looked at them wrong. Because Siemens was laying lines through the brutal Siberian winter and the rocky Caucasus, Werner ruggedized the technology. He mounted the needle on a heavy steel pivot and encased it in a dust-proof, waterproof cast-iron shell. It was built so tough that local labor crews could drop it in the mud or throw it in the back of a horse wagon without losing calibration.

The engineers affectionately named it after the local frontier populations: the Tatarengalvanometer.

...And the rest is history.

If I had read a standard biography of Werner von Siemens, I would have gotten a dry list of dates. If I had read a textbook on electric motors, I would have gotten pure math.

By using an AI collaborator as an adaptive sounding board, I was able to follow the thread of my own curiosity in real-time. I could jump instantly from the electromagnetic flux of a shuttle armature to the sociological reasons a German engineer could charm his way into the Tsarist court, and then immediately back down to the math of Ohm's Law.

The Siemens story is also a reminder that extraordinary success requires intelligence, determination, building a strong network by being useful to others, and a measure of luck, often arriving disguised as a crisis.

PDF: Memoirs of Siemens [Lebenserinnerungen] 

Music: Where have all the Flowers Gone - Marlene Dietrich

Sunday, December 28, 2025

Computer engineering magic

"Any sufficiently advanced technology is indistinguishable from magic." Arthur C. Clarke
In the field of computer engineering, the following appear as magic to me. I am planning to lift this mystery by building small-scale models:
  1. How games like Prince of Persia could be written in assembly
  2. Detecting syntax errors while typing (linting)
  3. Code completion
  4. Stopping a program at a breakpoint and inspecting debug information
  5. Interpreters (with parallelism on multicore) and compilers
These would help me to transition from "user of tools" to "creator of systems."

Sunday, November 16, 2025

Surprising Facts

A collection of facts that I found surprising:
  1. Availability of animals for domestication was the reason for deadly animal-human disease transmission and the death of 90% of American indigenous population. And the lack of domestic animals in the Americas was the reason why there was no American plague spreading in Europe.
  2. The Wright brothers did not invent flying in the general sense but they invented controlled flying by overcoming adverse yaw during rolling maneuvers.
  3. The root cause of the oxygen tank explosion in the Apollo 13 mission was using 60V during ground operations on 28V rated oxygen tank to boil off oxygen in the tank which led to welding of the thermostat and the eventual burning of wire Teflon coating.
  4. The Linux Kernel has thousands of goto statements.

Thursday, August 21, 2025

Germany-Switzerland Train Tour

This August we embarked on a train tour across Germany and Switzerland, visiting a different city every day. Our route was: Düsseldorf – Köln – Koblenz – Heidelberg – Freiburg – Luzern – Interlaken – Bern – Zürich – Stuttgart – back to Düsseldorf

We chose the cities so that each train journey was around one hour. Every afternoon, we traveled to a new city, rested at the hotel, took an evening walk, ate dinner, then the next morning had breakfast, checked out while leaving our baggage at the hotel, explored the city for a couple of hours, picked up our luggage, and continued on to the next city.

Booking Trains and Hotels

We had secured our train tickets and hotel bookings as early as April. It is not critical for train tickets because you will always find a train with paying around 20% more if you buy on the day of your journey. Buying individual tickets for each route was much cheaper than buying a Eurail Pass. Hotels must be booked in advance, otherwise you won't be able to find a room.

The entire process was digital. To buy train tickeds, we used DB Navigator, bahn.deOmio for Germany and SBB for Switzerland. You don’t need a physical ticket to board—just show the QR code to the ticket inspector after finding a seat. Seats usually display their reservation status on a small LCD screen next to them. If you don’t have a reservation, simply choose a seat that isn’t reserved.

We used Booking.com for hotel bookings, making sure our hotels were within 15 minutes walking distance of of train stations. We complemented our city explorations with walking routes from the GPSmyCity app (20 USD/year).

Trains

  • German ICE trains were fast, comfortable, with free WiFi and quiet 1st class cars.

  • Note that sometimes they change the train platform/track number ("Gleis" in German). Pay attention to the screens and announcements. In the photo below, the platform of our train has been changed from 5 to 4:

  • Swiss regional trains were slow and more scenic, but 2nd class trains typically lacked WiFi. Even station WiFi required SMS verification—which didn’t accept Turkish numbers. That left us dependent on hotel WiFi unless we wanted to pay roaming fees.

  • Trains generally ran within 10 minutes of their scheduled time.

  • Seat reservations cost 7 euros per person, but if you travel outside rush hours, they’re unnecessary, there are plenty of empty seats.

One of the trip’s strongest impressions was how deeply rail networks shape daily life in these countries. Every town is linked by trains running at 150 km/h or more. This creates not just convenience for travelers, but also massive employment opportunities for technicians, engineers, and operators who maintain and innovate these networks.

As the saying goes: "A developed country is not a place where the poor have cars. It's where the rich use public transportation." For a deeper dive into this idea, I recommend the YouTube channel Not Just Bikes.

Practical Travel Notes

  • We were always able to pay by credit card. Only once did my card not work in a grocery store, and I had to pay in cash. Having 200 euros in cash will be more than enough.

  • Breakfast: Hotel breakfasts average 20 euros per person. Since we had modest breakfast needs, we skipped them, preparing our own breakfast, using our own egg cooker. A nice side benefit was that we didn’t have to conform to the hotel’s breakfast hours and each member of our family could sleep as much as they wanted. Grocery chains like REWE, Lidl in Germany and Coop in Switzerland became our go-to spots. Here is our typical breakfast:

  • In Switzerland, our egg cooker required a Euro-to-Swiss (Type J) adapter because it had thick pins, while Swiss electrical outlets are designed for thin ones:

  • Tap water: Safe and free everywhere.

  • Weather: It was a pleasant 25 °C on August 4, but by August 11 a heat wave had reached Germany and Switzerland, with temperatures rising to 35 °C, making walking exhausting. It lasted for a week and subsided just as we returned. Locals said this happens only once a year, and we were a little unlucky to catch it.

Wednesday, August 20, 2025

The Teenage Attention Crisis

A friend of mine asked me for advice on how to help his 17-year-old son overcome his gaming and video addiction. Short-form social media videos and online games are designed to be addictive. Having been a former StarCraft addict and now the father of a 13-year-old boy, I know firsthand that nothing compares to the thrill of online gaming.

The problem is, these activities don’t just eat up time — they erode attention span. Games and TikTok-style videos constantly reward the brain with quick hits of dopamine. You get instant excitement, instant novelty, instant feedback. Over time, this rewires the brain to expect stimulation every few seconds.

It is not an issue when the child is less than 7 years old and a tablet is a parent's best friend. As the child starts school, it makes it difficult to sit through a class, read a book, or even watch a movie without reaching for a phone. The mind starts craving constant action. Anything slower feels boring, even if it’s meaningful.

This is why expecting teenagers to “just stop” is unrealistic. No matter how fun or beneficial the alternatives may be, those alternatives can’t compete with the rapid-fire dopamine loops of gaming and social media.

And here’s the key point: it’s not about a lack of awareness. Teens know they should be studying, playing sports, or sleeping earlier. The issue is willpower — and when your brain has been trained to chase fast rewards, willpower alone isn’t enough.

So talking them into it rarely works, and even then only for a few days at most. The only reliable way is to restrict access: put the phone away, turn off the computer. Of course, they will get bored. But boredom is valuable because it pushes you to be creative, to explore, to come up with something new. If the phone is always there to fill every empty moment, the brain never learns how to generate its own entertainment or ideas.

For parents, holding the line is hard because kids will push back, they’ll get angry, and they’ll try to negotiate their way around the rules. We use Google Family Link to limit his mobile phone time and app access. During school semester, he’s allowed to use his computer only on weekends, for up to three hours per day. When he breaks the rules by secretly giving himself more time on his mother’s phone or by exceeding the three-hour computer limit, we take away his phone and computer for a couple of days. Before and during exam weeks, he also goes on a digital detox, meaning the phone and computer are completely put away for 2 weeks.

Music: Stromae - Papaoutai

Friday, May 30, 2025

Liselere Giriş Sınavı (LGS) Hazırlığı

Oğlumuz Argun şu an 12.5 yaşında ve 6. sınıfta, LGS’ye hazırlanıyor. Keşke çocuklarımız sınav kaygısı yaşamadan, yetenek ve ilgilerine göre yönlendirilse, eğitim sistemi onları rahat bir yaşama taşıyacak şekilde desteklese. Ancak ortam ne yazık ki şu an buna uygun değil

Lise ve üniversite giriş sınavlarının olmadığı ülkelerin ayırd edici özellikleri:

  1. Ekonomi ve sosyal destek güçlü, işsizlik oranı düşük, asgari ücretle geçinmek mümkün
  2. Üniversite mezunu olanla olmayan arasındaki iş bulma imkanlarında ve ücretlerde uçurum yok
  3. Öğretmen ücretleri yüksek

İlk iki özellik üniversiteye girme baskısını azaltıyor, üçüncüsü de eğitimin ve verilen notların kalitesini arttırıp merkezi sınava ihtiyaç duymadan öğrenci seçmeyi mümkün kılıyor. Bizim içinde bulunduğumuz ortamda bunlar istenen seviyede olmadığından çocuklarımızın sınavlarda başarılı olmasını istemek doğal. Elbette başarıya giden başka seçenekler de var; ancak ne yapılması gerektiğinin en belirgin olduğu yol sınavlardan geçiyor. Diğer seçenekler ise daha fazla çaba ve risk içeriyor. Çocuğunuz kendi başına çalışamıyor ve desteğe ihtiyaç duyuyorsa bu yazıda özetlediğim 5.5 yıllık deneyim işinize yarayabilir.

Eğitim hep özel ilgili alanlarımdan biriydi, ayrıca eşim de fen bilgisi öğretmeni. Argun'un doğmasıyla eğitim hobi olmanın ötesine geçti. Eğitim sisteminin çok sayıda sorunu olduğundan ve çocuğu en iyi velisi tanıyabileceğinden eğitim (terbiye, disiplin) ve öğretimin (matematik, İngilizce) ana sorumluluğu biz velilerde.

Argun'un okulda rahat edebilmesi için anaokulunda bir yıl fazladan kalarak ilkokula geç başlamasını sağladık. "Ya sıkılırsa" sorusuna yanıtımız "geride kalma hissi yaşamasındansa sıkılmasını göze alıyoruz" oldu. 7 yaşındayken (ilkokul 1. sınıf) her gün düzenli olarak Khan Academy ile matematik çalışmaya başladık. Günde 15 dakika ek çalışmayla 4. sınıfın sonuna geldiğimizde 8. sınıf matematik konuları bitmişti. Khan Academy’yi Argun tek başına değil, bizim gözetimimizde kullandı. Her gün düzenli olarak çalışmak çoğu yetişkin için bile zorken çocuğun iradesi yetmiyor. 5. sınıfla birlikte LGS matematik test kitapları çözmeye başladı. Sosyalleşmesi hep birinci önceliğimizdi, ders için sadece bilgisayar oyun zamanından çalıyorduk.

Hedef olmadan sınava hazırlanmak çok zor çünkü ders çalışmaktan daha cazip pek çok şey var. Profesyonel basketbolcu, YouTuber, ya da fizikçi olmak ilk bakışta hedef gibi görülebilir, ancak bu alanlarda konforlu bir hayat sürebilmek için Ankara'nın en iyi basketbolcusu olmak ya da fizik olimpiyat takımına girebilmek gerekir. İstatistik gereği çocuğunuzun böyle bir yeteneğe sahip olma olasılığı milyonda bir. Çocukların bir mesleği hedef haline getirebilmesi için işini severek yapan birilerinden destek alınmalı. Argun hedefi olan bilgisayar mühendisliği için %1'lik dilime girmesi gerektiğini bildiğinden ders çalışmanın sıkıcılığını iradesiyle ve bizim de onu biraz ittirmemizle aşabiliyor.

Hedefi belirledikten sonra çocuğun sınırlı bir kapasitesi olduğundan kapasiteyi idareli kullanmak lazım, yoksa çocuğun canından bezme riski var. Ek çalışmada tüm dersler yerine matematik ve İngilizce'ye odaklanmak en yüksek faydayı sağlıyor. Diğer derslere okulun istediği kadar çalışması yeterli oluyor.

Süreç boyunca sonucun değil gayretin, çözülen soru sayısının ya da harcanan vaktin değil, kapasitesini her seferinde biraz aşmasının gelişim için önemli olduğunu vurguladık.  Örneğin yorgunken 1 soru çözmek bile yeterli olabilir, iyi hissederken 10 soru bile az gelebilir. Kendini kandırmanın ne kadar kolay olabileceğini örnekledik. Argun büyüdükçe bunları daha iyi anlar hale geldi.

Durum değerlendirmesi için okulunun dahil olduğu Sebit SDS (Süreç Değerlendirme Sınavı) sonuçlarına odaklandık. 5. sınıftan başlayarak her dönem üç, yılda toplam 6 sınav yapılıyor, sınavlara farklı okullardan yaklaşık 3000 öğrenci katılıyor. Argun 5. sınıfta pek de iyi olmayan bir başlangıcın ardından inişli çıkışlı bir performansla 6. sınıfı güzel bir yüzdelik dilimde bitirdi:

Sınavlarda Argun'un fire vermesinin sebebi konu eksiğinden ziyade konsantrasyon süresinin kısalığıydı. Son sınav öncesinde kendisinin de rızasıyla bir ay dijital detox uyguladık, kitap okuma süresini arttırdık. İşin ciddiyetinin farkına vardı ve sınava konsantre girdi. Bundan sonrası aynı yöntemi uygulayıp seviyeyi korumak.

Thursday, May 15, 2025

Intersection of circle and sine wave

I recently encountered the following question [University of Tor Vergata, Engineering Sciences, PreCalculus self assessment test, Geometry D]: A circle has center at the point A = (1, 1) and has radius r = 2. At how many points does it intersect the function y = sin(x)?

The equation of the circle with center (1, 1) and radius 2 is: (x - 1)² + (y - 1)² = 4

At any intersection point, the coordinates (x, y) must satisfy both equations:

1. (x - 1)² + (y - 1)² = 4

2. y = sin(x)

Let's substitute the second equation into the first: (x - 1)² + (sin(x) - 1)² = 4

This is a transcendental equation and cannot be solved analytically. Luckily, the equations are easy to plot by hand. The circle is trivial and plotting sin(x) only requires you to know that sin(0)=0, sin(pi/2)=1, sin(2*pi)=0. The sine wave amplitude is between -1 and 1. Since the circle has radius 2 and is centered at (1, 1), both the x and y interval for the circle will be [-1, 3]. This results in two intersections. Using Desmos for a cleaner plot:

Note that if we increase the amplitude of the sine wave, we will can have more than 2 intersections. For an amplitude of 3.5, we have 4 intersections:

After amplitude, if we also increase the frequency by 4, we get even more intersections:
It is only reasonable to find the number of intersections by hand drawing if the sine wave is of the simple form sin(x).

If you want to find the numerical values of the intersections (which is not asked for in the question), you have to use numerical root finding methods like Newton-Raphson.