Skip to content
DevDisciplineNIGHT CITY NEVER SLEEPS

Frequently Asked Questions

These questions are compiled automatically from published articles and update with every new post.

A New Watch, A New Gadget: When Excitement Becomes an Excuse, Not Motivation

Source article: /posts/a-new-watch-a-new-gadget-when-excitement-becomes-an-excuse

Why do people buy gadgets for motivation but never use them, and how can you build real motivation instead?

Buying a new watch or gadget to feel motivated is a form of 'pretending to start' — the excitement is real but temporary because it's external. True motivation comes from within and is built through repeated behavior, not purchases. Identity is formed by habits, not by owning objects.

What is 'buying on enthusiasm' or impulse buying for motivation?

It's shopping not to actually use something, but to experience the excitement of imagining a 'new you.' You feel motivated at purchase, but the feeling fades quickly because it depends on the product, not on internal drive. It's a cycle of dreaming, buying, barely using, feeling guilty, and repeating.

Why doesn't buying a new gadget create lasting motivation?

Because the motivation is external — it's tied to the object, not to you. Once the novelty wears off, there's nothing sustaining the behavior. Real, lasting motivation has to come from within and is built through consistent action over time.

Do you really need a running watch to start running?

Not necessarily. If you run in a group, use a phone with GPS, have no specific performance goals, or just run for fun or fitness, a dedicated running watch isn't essential. However, for trail running, long races, accurate measurements, or battery conservation, a watch becomes genuinely useful.

What are the signs you actually need a running watch vs. just wanting one?

You likely need one if you do long trail runs requiring route loading, need precise data like altitude or heart rate zones, have a phone with poor GPS, or want to track health metrics like sleep and daily calories. If none of those apply, your phone may be enough.

How do people confuse owning things with having an identity?

People tell themselves 'I bought a running watch, so I'm a runner' or 'I bought a planner, so I'm organized.' But identity isn't built by possessing objects — it's built by making behaviors habitual through repeated action. The object alone doesn't make you the person you want to be.

What is the typical cycle of impulse buying for self-improvement?

The cycle goes: dream about a new version of yourself, buy something to feel motivated, use it briefly or not at all, lose motivation, feel guilty, then find a new enthusiasm and repeat. Each loop feels like a fresh start but rarely leads to lasting change.

Why do phone GPS receivers fall short for runners?

Phone GPS receivers are designed for car-level navigation, not the precise, step-by-step tracking that running requires. This makes them less accurate for measuring running pace and distance compared to a dedicated running watch with a purpose-built GPS.

How do you know when upgrading a gadget is a genuine need vs. an excuse?

A genuine need is tied to specific limitations — like a watch battery dying mid-race or a phone draining during a long run. An excuse is when the upgrade is driven by excitement or the idea that new gear will somehow create discipline you don't currently have.

Higher-Order Functions in Kotlin: Cleaner Android Code Without Duplication

Source article: /posts/kotlin-s-high-flying-high-order-functions

What are higher-order functions in Kotlin and how do you use them in Android development?

Higher-order functions in Kotlin let you pass functions as parameters or return them from other functions. This reduces code duplication by letting one function handle multiple similar operations. In Android development, this is especially useful when the same logic runs in different screens with only minor variations.

What is a higher-order function in Kotlin?

A higher-order function is a function that can accept other functions as parameters or return a function. In Kotlin, functions are treated like any other type such as String or Int, so they can be passed around freely without being tied to a class.

How do you pass a function as a parameter in Kotlin?

You declare the parameter with a function type, for example `function: () -> Unit`. You can then call it using `function()` inside the body. At the call site you can pass a lambda, a trailing lambda, or a function reference using `::functionName`.

Why use higher-order functions instead of copy-pasting code?

Copy-pasting similar code across Activities, Fragments, and classes leads to redundant code that is hard to maintain. Higher-order functions let you write the shared logic once and pass only the part that differs — such as a specific API call — as a parameter.

What is a real Android example of a higher-order function?

In a Leave Management app, the actions of approving, declining, and deleting a leave all shared the same flow: dismiss a dialog, show a confirmation alert, then call a backend function. A single `showAlertAndOperate` function handled all three by accepting the differing backend call as a function parameter.

What does the @StringRes annotation mean when used with a higher-order function parameter?

The `@StringRes` annotation on an Int parameter signals that the integer must be a valid Android string resource ID, such as `R.string.some_text`. It is a compile-time hint that helps avoid passing arbitrary integers where a string resource is expected.

How does Kotlin differ from Java regarding higher-order functions?

Unlike Java, Kotlin does not require functions to be defined inside a class. This freedom is what enables true higher-order functions. Java can simulate this with interfaces and lambdas, but it is more verbose and not a native language feature in the same way.

Why did Google adopt Kotlin as the official Android language?

At Google I/O 2017, Google declared Kotlin the official language for Android development. This followed years of legal conflict between Oracle and Google over Java, making a move to a non-Java language strategically and legally advantageous.

Can you store functions in variables or data structures in Kotlin?

Yes. In Kotlin, functions can be stored in variables and data structures just like any other value. This is part of what makes Kotlin a language with functional programming features.

What are the different ways to pass a function at the call site in Kotlin?

You can pass a trailing lambda outside the parentheses, a lambda inside the parentheses, a lambda with an explicit parameter name, or a function reference using the `::` syntax. All four styles are valid and produce the same result.

How to Implement a ‘Git Submodule Library’ in an Android Project? (2026)

Source article: /posts/how-to-implement-a-git-submodule-library-in-an-android

How do you implement a Git Submodule library in an Android project to share code across multiple apps?

A Git Submodule lets you maintain a shared Android library as a separate Git repository and include it in multiple projects. This avoids copy-paste duplication, supports the DRY principle, and makes updates instant across all apps. It's better than JAR or AAR files when the library is actively changing alongside your main projects.

Why use a Git Submodule instead of a JAR or AAR file for an Android library?

JAR files can't include Android SDK classes like Activity or SharedPreferences. AAR files require you to rebuild and re-import the file every time you make a change, which is painful during active development. A Git Submodule lets the library evolve alongside your main project without that overhead.

What is a Git Submodule in the context of Android development?

A Git Submodule is a Git repository embedded inside another Git repository. In Android development, it lets you maintain a shared library as its own project and reference it from multiple main projects, so all apps automatically benefit from updates made to the library.

When does using a shared Android library make sense?

It makes sense when multiple projects share identical or near-identical features — like a login screen, theme settings, language selection, or common utility functions. Without a shared library, you end up copy-pasting code across projects and making the same bugfix or refactor in every one of them.

What are the downsides of copy-pasting code across Android projects?

Any bug fix, service change, or refactor must be repeated manually in every forked project. The post describes working across 8–10 projects forked from each other, where every small change meant doing the same work over and over — which violates DRY and the Open/Closed Principle.

Can a Git Submodule library project have a launcher Activity?

No. An Android library project cannot have a launcher Activity. You must remove or comment out the intent-filter with the MAIN action and LAUNCHER category from the AndroidManifest file before the project can function as a library.

What software design principles support using a shared library instead of copy-paste coding?

The Open/Closed Principle, the Don't Repeat Yourself (DRY) principle, and SOLID principles all support library-based code reuse. The post explicitly states that copy-paste coding contradicts these principles and is not healthy development practice.

What must be true about the main project when using a Git Submodule?

The main project must also reside within Git. Since Git Submodule is a Git feature, both the library and the consuming project need to be Git repositories for the submodule relationship to work.

What are the key requirements a shared Android library should meet?

According to the post, the library should be flexible, adaptable to constant change without causing developer friction, compliant with the Open/Closed Principle, and work directly from a Git-based source control system like VSTS or similar.

Self-Discipline, Part 2: Staying Disciplined Through Months of Ultra Training

Source article: /posts/self-discipline-2

How do you maintain self-discipline for weeks or months to complete ultra-race training?

The author trained for and completed multiple ultra races, including a 63K in Cappadocia, by combining a clear goal, a structured training program from a coach, and consistent self-discipline practices. Key lessons: keeping your goal top of mind, setting rewards, and planning a realistic path — not just having a goal — are what sustain discipline long-term.

Why isn't having a goal alone enough for self-discipline?

The author discovered that a goal without a clear path to achieve it falls short. Without a structured training program, he missed sessions even when motivated. The route to the goal is just as important as the goal itself.

How do you stay laser-focused on a long-term goal?

Never let the goal slip from your mind and always prioritize it. Cut back on time-wasters like social media, say no to distractions, and keep the goal present — like something quietly nudging your conscience in the background.

How can rewards help with self-discipline?

Write your goal and the rewards you'll earn on colorful paper and hang it somewhere visible. This constant visual reminder keeps you motivated. The author keeps race medals on his work desk as a motivational tool.

Do you need a rigid, detailed schedule to stay disciplined?

No — overly rigid schedules can actually backfire and distance you from discipline. The author recommends approximately planning your path rather than micromanaging every minute, like a high-school study timetable.

What role does a coach or training program play in self-discipline?

A well-designed training program removes guesswork and gives you a clear path to follow. The author credits a program built by ultra-trail coach Özgür Tetik as the key reason he stayed on track and finished the 63K race.

What happened when the author didn't prepare well enough for a race?

At the Uludağ Ultra, he got leg cramps three times and finished in 6 hours — a sign of under-preparation. This reinforced that missing training sessions has direct consequences on race-day performance.

How can someone start building discipline around exercise if they're a beginner?

Start small and consistent — go to the gym before work or during lunch, or exercise at home with a resistance band. The key is not skipping sessions, no matter how short they are.

How can someone build a reading habit with self-discipline?

Pick a thin book you're genuinely curious about and read just 10 minutes a day at a time that suits you. Set alarms and, when they go off, drop what you're doing and start reading — no skipping allowed.

What is the core three-part discipline lesson from the post?

The author closes with advice from his mother: don't be lazy, don't procrastinate, and don't give up. These three principles underpin everything else discussed in the post.

Can you still finish an ultra race if something goes wrong on race day?

Yes — the author injured his ankle at the 36 km mark of the 63K Cappadocia race and had to walk the rest. He still crossed the finish line in 10 hours, showing that persistence matters even when plans fall apart.

Indoor Navigation with Wi-Fi Signals: How We Built a Mall Wayfinding App

Source article: /posts/technical-details-of-our-indoor-navigation-application

How did a university team build an indoor navigation app using Wi-Fi signals in a shopping mall?

A Computer Engineering team built an indoor navigation app for shopping malls using Wi-Fi modem signals instead of GPS or beacons. They used the Free Space Path Loss formula to calculate distance from signal strength, then mapped modem positions relative to stores to determine user location and route them to their destination. The project was selected as the university's best graduation project.

Why can't GPS be used for indoor navigation?

GPS signals don't work reliably inside enclosed buildings like shopping malls, airports, and hospitals. The team had to find an alternative method — Wi-Fi modem signals — to determine a user's location indoors.

Why did the team use Wi-Fi modems instead of Bluetooth beacons?

Beacons cost $5–$10 each and required one per every 5–6 square meters, making them expensive for a student project. The university didn't fund the cost, and the shopping mall agreement fell through, so the team used existing Wi-Fi modems instead.

What formula did the team use to calculate distance from Wi-Fi signals?

They used the Free Space Path Loss (FSPL) formula, which calculates distance from signal strength measured in decibels. The formula uses signal strength (dB), frequency (Hz), and a constant of 32.44 to estimate the distance between the device and the modem in meters.

How accurate was the FSPL formula for indoor distance measurement?

Testing in the dormitory showed the formula was accurate about 60–70% of the time. Signal strength variability meant a true 5-meter distance could read as 4 meters or sometimes as little as 2 meters.

What Android APIs did the team use to gather Wi-Fi modem data?

They used Android's WiFiManager, ScanResult, and ConnectivityManager classes to collect information about nearby modems, including each modem's unique MAC address and signal strength.

What programming language was used to build the app?

The app was written in Java, since Kotlin was not yet the official Android language at the time the project was developed (2015–2016).

Were there any existing indoor navigation apps when this project started?

In 2015–2016, there were virtually no working indoor navigation apps for enclosed spaces. Google was working on an airport navigation project, but it was only at the commercial stage and was later cancelled. Only theoretical academic papers existed at the time.

What was the main goal of the indoor navigation application?

The app was designed to help visitors navigate large indoor spaces like shopping malls. Users select a destination store, the app determines their current location via Wi-Fi signals, and then calculates the shortest route to that store.

What is a literature review in the context of a graduation project?

A literature review is the first stage of a graduation project where students research existing similar projects, academic papers, and prior solutions. The findings are then presented to the supervising professor to establish the project's context and novelty.

What indoor navigation tools exist now compared to when this project was built?

Almost a decade after the project, several indoor navigation solutions now exist, including Google Indoor Maps, InMapz, Path Guide, Situm Mapping Tool, Anyplace, Indoor Service, and IndoorAtlas. The field has grown significantly since 2015–2016.

ChatGPT Cited in 3 Days: A Generative Engine Optimization (GEO-AEO) Case Study

Source article: /posts/chatgpt-cited-in-3-days-a-generative-engine-optimization

How do you get ChatGPT to cite your website as a source within days of launch using GEO/AEO techniques?

A developer launched yarisradari.com on Saturday and had ChatGPT citing it as a source by Wednesday — just 3 days later. He achieved this with server-side rendering, Schema.org structured data, an llms.txt file, Bing Webmaster Tools, and explicitly allowing AI crawlers in robots.txt. The site had zero backlinks and zero promotion at the time.

What is GEO (Generative Engine Optimization)?

GEO stands for Generative Engine Optimization — getting AI tools like ChatGPT, Perplexity, and Google AI to cite your site as a source when answering questions. It differs from classic SEO, which focuses on ranking in blue-link search results.

What is AEO (Answer Engine Optimization)?

AEO stands for Answer Engine Optimization, which is about making your content the direct answer that AI-powered engines serve to users. It overlaps heavily with GEO and is contrasted with traditional SEO focused on click-through rankings.

Why does server-side rendering (SSR) matter for AI citations?

AI crawlers need to read your content directly from HTML without executing JavaScript. SSR ensures your content is fully present in the raw HTML response, making it immediately readable by bots like GPTBot and PerplexityBot.

How do you verify that AI crawlers can access your site?

The author recommends running curl tests with AI bot user-agent strings, for example using `curl -A GPTBot`, to confirm Cloudflare or other services aren't blocking those crawlers.

Should you block or allow AI crawlers in robots.txt?

To get cited by AI engines, you should explicitly allow them. The author recommends permitting GPTBot, ClaudeBot, PerplexityBot, and OAI-SearchBot in your robots.txt file.

What is llms.txt and does it actually work?

llms.txt is a file you add to your site to help large language models understand your content structure. The author included it but cautions not to expect miracles — it's a supporting signal, not a magic fix.

Why does Bing Webmaster Tools matter for ChatGPT citations?

ChatGPT's web search feature feeds from Bing's index. Signing up for Bing Webmaster Tools helps ensure your site is indexed by Bing, which increases the chance ChatGPT will find and cite your pages.

How important is Schema.org structured data for GEO?

The author considers it essential — but only when generated from real data and matched to visible page content. He warns that 'ghost markup' (structured data not reflected in visible content) is penalized.

What content strategy helped the site get cited so quickly?

The author focused on data no one else was keeping in a structured, accessible way — a unified race calendar for Turkey. Being the sole authoritative source for a specific niche, rather than competing on broad queries, was the core strategy.

How do you measure whether AI engines are citing your site?

The author recommends checking the Bing AI Performance report in Bing Webmaster Tools and periodically asking ChatGPT questions as a real user would to see if your site appears as a cited source.

How long did it take to build the site before it was cited by ChatGPT?

The author opened the repository on Saturday evening and ChatGPT was citing the site by Wednesday — roughly 3 days. He used Claude Code to accelerate development of the scraper, site, SEO, and GEO layers.

Can a brand new domain with zero backlinks get cited by ChatGPT?

Yes, according to this case study. Yarış Radarı had a brand new domain, zero backlinks, and zero promotion when ChatGPT first cited it on day three. The author attributes this to technical GEO decisions made from the start.

How Our Graduation Project Won Best Project of the Year

Source article: /posts/our-graduation-project-was-chosen-as-the-best-of-university

How do you choose and succeed in a university graduation project in computer engineering?

A computer engineering student shares how their graduation project was selected as the best of their term at Ankara Yıldırım Beyazıt University. They offer practical tips on picking the right project, managing time, working in teams, and leveraging internships to maximize career impact.

What makes a graduation project stand out as the best?

Choosing an innovative idea not previously tried in the market or academia helps your project gain recognition. A working, finished project with a well-written report matters more than perfect code quality for a graduation project.

How important are internships for a computer engineering graduation project?

Internships are very important — they help you learn real-world technologies you can apply directly to your project. The author learned ASP.Net MVC 5 during internships and used that experience as the foundation for their graduation project.

Should you do your graduation project alone or in a team?

Working in a team is strongly recommended. Team members can discuss progress, motivate each other, and being able to say 'we did this as a team' in job interviews demonstrates that you are a team player.

How do you choose the right topic for a graduation project?

Pick a topic you are passionate about and genuinely enjoy, so you stay motivated during long hours of work. It should also align with your long-term career goals and offer the opportunity to learn new technologies.

What difficulty level should a graduation project be?

The project's difficulty should be just above your current skill level. This challenges you to grow your problem-solving skills without being so hard or so easy that it hurts your learning experience.

Does code quality matter in a graduation project?

No one — not professors or hiring companies — expects perfect or clean code from a student or junior developer. Finishing the project and writing a careful report are far more important than code quality.

How long do graduation projects typically take to complete?

Graduation projects are usually selected in September and span a 6–8 month work period. Students must balance this with other ongoing courses, so choosing a project that is completable within that timeframe is essential.

Can a graduation project help in job interviews?

Yes, significantly. The author mentions that across 400–500 interviews, no manager ever failed to show respect or interest in their graduation project, regardless of the company's size.

Why should a graduation project solve a real-world problem?

Projects with real-world impact increase your motivation and raise the visibility of your work. Software or systems that address genuine problems are also more impressive to potential employers.

Is it normal to look back at old code and dislike it?

Yes, and it is actually a positive sign. A well-known industry principle says a good programmer should look at code they wrote six months ago and cringe — if they don't, it means they are not learning fast enough.

5 Ways “Just Playing Games” Made Me a Better Person

Source article: /posts/5-ways-just-playing-games-turned-me-into-a-better-human

Can playing video games actually teach you real-life skills like patience, empathy, and leadership?

Video games can build real skills beyond entertainment. Story-driven games grow empathy, hard games teach patience and resilience, and team or strategy games sharpen leadership and planning. The lessons learned from a keyboard or console often carry directly into everyday life.

What real-life skills can video games teach you?

Video games can teach patience, empathy, leadership, decision-making, and strategic thinking. Different genres build different skills — hard games build resilience, story games grow emotional intelligence, and team games develop communication and leadership.

Which games are best for building patience?

Souls-like games like Dark Souls and Sekiro teach patience through repeated failure and learning. Survival games like The Long Dark and slow-paced games like Stardew Valley also reward long-term thinking and waiting for the right moment.

How do video games improve empathy?

Story-driven games put you in someone else's shoes and show how your choices affect others. Games like Undertale, Detroit: Become Human, Hellblade, and Disco Elysium help players understand different perspectives, mental health struggles, and moral complexity.

Can video games make you a better leader?

Yes. Research by Nick Yee from Palo Alto Research Center found that players of online group games report stronger leadership, motivation, and conflict-resolution skills. Leading a raid in World of Warcraft or coordinating a team in League of Legends directly practices real leadership.

Do strategy games improve problem-solving skills?

Studies show students who performed well in Civilization scored higher on planning and problem-solving tests. Games like StarCraft, SimCity, and Football Manager require managing resources, thinking multiple steps ahead, and making complex decisions under pressure.

What does This War of Mine teach players?

This War of Mine puts you in control of civilians surviving a war zone. Every decision carries serious consequences, teaching patience, moral weight, and the cost of choices. The game is noted as highly emotional and a strong teacher of real-world empathy.

How does Undertale teach empathy differently from other RPGs?

Unlike most RPGs, Undertale lets you talk to enemies instead of fighting them. If you choose violence, you face the consequences. This design forces players to ask whether they had another choice, making empathy a core mechanic rather than a side effect.

Can video games help people understand mental health?

Hellblade: Senua's Sacrifice is specifically designed to simulate psychosis. Players hear voices and experience distorted reality, giving them a first-hand feel for what mental illness can be like. The game is widely recognized for building genuine understanding of mental health.

Are video games actually a waste of time?

The post argues they are not, citing player experiences and research. The right games build mental, emotional, and practical skills. Even games bought just for fun can teach communication, decision-making, and forward thinking.

What does Papers, Please teach about moral decision-making?

In Papers, Please, you play a border officer where every person crossing has a human story. Breaking rules costs you money; following them may harm innocent people. This creates daily moral dilemmas that mirror real-life ethical conflicts between rules and compassion.

Self-Discipline

Source article: /posts/self-discipline-1

How do you build self-discipline to complete months of intense ultra-marathon training?

The author trained for 5 months to run a 63km ultra-trail race in Cappadocia, finishing in 10 hours 9 minutes. He later reflected that his discipline came from clear goals, community support, and a structured weekly routine — factors that became harder to replicate during the COVID-19 pandemic.

What training schedule did the author follow to prepare for the Cappadocia Ultra Trail?

He trained 6 days a week for 5 months: gym strength work on Mondays, a group run of 6–10km on Tuesdays, light endurance lifting on Wednesdays, HIIT on Thursdays, lighter gym work on Fridays, and a 25–40km forest run starting at 4:30 AM on Saturdays. Sundays were rest days.

How long did it take to finish the 63km Cappadocia Ultra Trail race?

The author completed the 63.4km race on October 19, 2019, in 10 hours and 9 minutes. It was his first long-distance race, and he described crossing the finish line feeling exhausted but deeply accomplished.

What role did community play in the author's self-discipline?

The author ran weekly with Runarchy Running Club, which provided structured accountability and social motivation. Having a crew to run with on Tuesdays was a built-in commitment that helped sustain his training over five months.

Why couldn't the author repeat the same training intensity in 2021?

He identifies the COVID-19 pandemic as a major disrupting factor — gyms posed health risks, races were canceled, and the uncertainty made sustained motivation much harder. The external conditions and goal clarity that drove him in 2019 were no longer the same.

What did the author conclude about how self-discipline is built?

He found the answer by comparing what was present in his life during the successful training year versus what was absent later. Self-discipline appears tied to clear goals, supportive community, structured routines, and stable external conditions — not willpower alone.

How did a student's question inspire this post on self-discipline?

After a speech at Karabük University in March 2020, a Computer Science student asked the author how he sustained months of intense training. He didn't have a clear answer at the time, and spent over a year reflecting before writing this article.

What advice did the author give to university students in his speech?

He encouraged students to read widely, open GitHub accounts to store even small projects, contribute to open-source work, and prioritize physical exercise — sharing lessons he wished he had heard during his own university years.

Does having a full-time job make intense training impossible?

The author worked as an Android App Developer from 8:00 to 17:00 throughout his training period. He notes that he maintained the pace without much conscious thought, suggesting that strong goal commitment can coexist with a demanding work schedule.

Publishing an iOS App with Capacitor, Vue.js and Quasar: Every Error I Hit

Source article: /posts/publishing-an-ios-app-with-capacitor-vue-js-quasar-my-funny

How do you publish an iOS app built with Vue.js, Quasar, and Capacitor to the App Store?

This guide walks frontend developers through publishing an iOS app using Vue.js 3, Quasar, and Capacitor — from setup and browser testing to syncing native files, debugging real errors, and submitting to the App Store. It also applies to Angular and React apps using Capacitor as the native bridge.

What software do I need to publish an iOS app with Capacitor and Vue.js?

You need a Mac with Xcode, VSCode, and Git installed. Pull your project via Git, open it in VSCode, and install Vue.js and Quasar dependencies using npm i.

How do I add iOS platform support to a Capacitor project?

Run npx cap add ios in your project directory. This creates the src-capacitor/ios folder with all necessary iOS files. Only run it once — repeating it can cause errors.

How do I install and update the Capacitor CLI?

Run npm install -g @capacitor/cli to install or update it globally. You can check the installed version with npx cap --version.

Why should I test in a browser before opening Xcode?

Testing with quasar dev in the browser first lets you catch and fix Vue.js or API errors early. It's faster to debug at this stage than to chase down issues on the iOS side.

How do I sync Capacitor changes for iOS?

Navigate to src-capacitor, run npm i, then run npx cap sync ios. This syncs your latest web build and plugin changes into the native iOS project.

How do I avoid CocoaPods errors in Xcode?

After syncing, navigate to src-capacitor/ios and run pod install --repo-update. This installs or updates native iOS dependencies and prevents common Xcode build errors.

How do I run my Capacitor app on an iOS simulator or real device?

Use quasar dev -m capacitor -T ios --livereload --external to run on a simulator. For a real device, run npx cap open ios, select your device in Xcode, and press the Run button.

Does this Capacitor guide apply to React or Angular apps too?

Yes. Since Capacitor is a framework-agnostic native bridge, most errors and solutions described here apply to Angular, React, Next.js, and other JS frameworks. Each framework may have its own Capacitor adapter package, but core issues are largely the same.

What does Capacitor actually do when running a Vue.js app on iOS?

Capacitor wraps your web app in a native WebView, so Xcode sees the iOS project directory (src-capacitor/ios) rather than the Vue.js source files. It acts as the middleware between your frontend code and the native platform.

What should I do if npm i doesn't resolve all missing dependencies?

Try running npm install --force or npm ci. These commands can resolve stubborn dependency issues that a standard npm i might miss.

From Android to Quasar and Vue.js: What an 8-Year Kotlin Developer Learned

Source article: /posts/an-android-developer-s-encounter-with-quasar-and-vue-js

What is Quasar Framework and can an Android developer use it to build mobile apps?

A native Android developer with 8 years of experience tried Quasar Framework after burning out on Android development. Quasar, built on Vue.js, lets you build web and mobile apps from a single codebase. He found it familiar, fun, and fast — and built a working movie app within weeks.

What is Quasar developer experience like for a native Android developer?

The author says it felt like meeting aliens at first, but he adapted quickly. Quasar's Material Design components felt familiar to an Android dev, and the Vue.js syntax was clean and easy to pick up. Within weeks he shipped a working app.

Can you build a mobile app with Quasar?

Yes. Quasar lets you write one codebase and deploy it as a web app, Android app, or other platforms. The author, a former native Android developer, used it to build a mobile app and describes it as a game changer for cross-platform development.

Is Quasar good for Android development?

Quasar is a cross-platform framework, not a native Android tool, but it can target Android. The author notes some occasional friction with platform-specific features, but overall found it productive and enjoyable compared to native-only development.

What is Quasar Framework based on?

Quasar is built on Vue.js. The author highlights Vue's readable syntax, good performance, and large community as reasons the combination works well for developers coming from other backgrounds.

How does Quasar compare to native Android development?

Native Android requires platform-specific code, while Quasar lets you target multiple platforms from one codebase. The author found Quasar faster for shipping projects and more fun, though he acknowledges some platform-specific quirks can slow you down.

Is Vue.js good for cross-platform mobile apps?

Through Quasar, Vue.js can be used to build cross-platform apps including mobile. The author praises Vue's understandable syntax and strong community support, saying it makes coding enjoyable without sacrificing performance.

What technologies were used to build ING Turkey's banking app?

The ING Turkey banking app used Hilt for dependency injection, MVVM with StateFlow and two-way binding, Clean Architecture split into feature modules, a single-activity multi-fragment structure, and Mockito for unit testing. It launched on Google Play Store in 2023.

A Principal Who Made a Difference 2: Class That Blooms in the Snow

Source article: /posts/a-principal-who-made-a-difference-2-class-that-blooms-in

What was it like for a new teacher assigned to a snow-blocked village in Sivas, Turkey in 1981?

In early 1981, a newly appointed teacher traveled through heavy snow and freezing cold to reach Kazancık village in Sivas, Turkey. With roads completely blocked, he walked the final stretch nearly frozen, slept in the school's principal office, and survived on eggs and stale bread. Despite the hardship, his passion for teaching kept him going.

How did the teacher get assigned to Kazancık village in Sivas?

He received a Ministry of National Education letter in January 1981 directing him to Sivas. He participated in a district-by-district lottery and ended up assigned to Kazancık village in Şarkışla district after no schools were left in his preferred district of Gemerek.

Why couldn't the teacher reach the village by vehicle?

Kazancık is a high-mountain village, and heavy blizzards had completely closed the roads. Even the District Governor's official jeep couldn't get through, and no taxis or minibuses were operating on that route.

How did the teacher finally get to the village?

A driver named Osman Abi took him as far as his Renault could go, but the final stretch was blocked by a blizzard. The teacher walked the last two kilometers alone in freezing temperatures, arriving at the village nearly frozen.

Was the teacher afraid of the dangerous winter conditions?

Yes — he knew that three teacher colleagues had recently frozen to death on similar roads in the Zara and İmranlı areas. Despite this fear, he said his ambition to be a teacher overcame even his fear of death.

How did the teacher manage to get leave before the village roads opened?

He wrote a petition with help from the District Governor, which was signed after some back and forth with the District National Education Director. He was granted twelve days' leave to return home to Develi for the February holiday.

Where did the teacher sleep once he reached the village?

He initially stayed as a guest in a village home but felt uncomfortable with the different local customs. The resident teacher, Mehmet Özdamarlar, offered to convert the principal's office into a bedroom, where he stayed until spring.

What did the teacher eat while living alone in the village school?

Not knowing how to cook and unable to rely on others for food, he lived almost entirely on eggs — soft-boiled in the morning, boiled at noon, and fried in the evening — along with bread that had gone hard as firewood in the dry, freezing air.

Who helped the teacher when he first arrived at the village?

A teacher named Mehmet Özdamarlar, who was on his second posting at the village, welcomed him warmly. He lit the stove, gave him a room to warm up, and organized the students to retrieve the teacher's belongings from the road.

The Golden Ratio in UI Design: Why 1.618 Makes Interfaces Feel Right

Source article: /posts/you-can-t-see-but-you-can-feel-it-the-golden-ratio

What is the golden ratio (1.618) and how is it used in mobile UI/UX design?

The golden ratio (1.618, or phi φ) is a mathematical proportion found in nature, art, and architecture that makes things look visually pleasing. Designers and developers use it — often without knowing — to set spacing, typography, card sizes, and layouts in mobile apps. When applied intentionally, it creates interfaces that feel balanced and professional without users being able to explain why.

What is the golden ratio in design?

The golden ratio is the proportion 1.618, known mathematically as phi (φ). In design, it's used as a guide for spacing, sizing, and layout so that visual elements feel naturally balanced and pleasing to the eye.

Where did the golden ratio originate?

It was noticed across different cultures and eras — from the Great Pyramid of Giza to ancient Greek math. Euclid formally defined it around 300 BC in his book Elements as the 'extreme and mean ratio.' During the Renaissance, Luca Pacioli popularized it as the 'Divine Proportion,' with drawings by Leonardo da Vinci.

Does Leonardo da Vinci use the golden ratio?

Yes, intentionally. Da Vinci applied the golden ratio in works like the Vitruvian Man, The Last Supper, and the Mona Lisa. He collaborated closely with mathematician Luca Pacioli, who wrote the landmark book De Divina Proportione in the 1490s.

Is the golden ratio found in nature?

Yes. Seashells, sunflower seed patterns, pinecones, and pineapples all grow following the golden ratio through the Fibonacci sequence. Plants place seeds at roughly a 137.5° golden angle to maximize sunlight exposure.

How does the golden ratio appear in the human body?

The proportions of the human face, finger joints, and even the ratio of belly-button height to total height are all close to 1.618. The human body is described in the post as 'almost a perfect guide when it comes to symmetry and ratio.'

How is the golden ratio used in mobile app UI design?

It influences spacing between components, card dimensions, text size hierarchies, and constraint-based layouts. Whether using Jetpack Compose or XML, applying the golden ratio produces designs that are visually comfortable and don't tire the user.

Do modern UI kits like Material Design use the golden ratio?

The post states that the golden ratio quietly works in the background of modern UI kits, even if it isn't explicitly labeled. It underlies spacing scales, typography ratios, and component proportions that frameworks ship by default.

What is the relationship between the golden ratio and the Fibonacci sequence?

Natural patterns like sunflower seeds and pinecones grow using the Fibonacci sequence, and the ratio between consecutive Fibonacci numbers converges toward 1.618 — the golden ratio. The post describes this as the mechanism plants use to achieve optimal growth.

What is the 'rule of thirds' and how does it relate to the golden ratio?

The rule of thirds is a photography composition guideline where the frame is divided into a 3×3 grid. The post describes it as a simplified version of the golden ratio, used to create visually balanced and professional-looking images.

Why should developers care about the golden ratio?

Understanding the golden ratio lets developers move beyond just making things that work to making things that look good. The post argues that connecting beauty and logic marks growth from a regular coder to a craftsman, improving overall UI/UX quality.

Can a developer apply the golden ratio without being a designer?

Yes. The post emphasizes that the golden ratio is a learnable visual language — not exclusive to artists. Once understood, developers can intentionally apply it in spacing, sizing, and layout decisions within their existing tools and frameworks.

Dagger Hilt Too Late: The Dependency Injection Lesson That Cost Us a Refactor

Source article: /posts/the-moment-my-ex-manager-was-rightfully-angry-at-me-dagger-hilt

How do you use Dagger Hilt with multiple base URLs and API clients in an Android project?

A developer skipped adding Dagger dependency injection to a small Android project, then regretted it when the app grew to handle three different backend services. With Hilt, you can use @Qualifier annotations to manage multiple OkHttpClient and Retrofit instances cleanly without tangled code.

Why should you add dependency injection to a small Android project?

Small projects can grow unexpectedly. In this case, a simple tablet app eventually needed to integrate with a valet QR system, an Oracle hotel database, and the original API — three separate backends. Adding DI from the start would have made that growth much easier to manage.

How do you handle multiple base URLs in a Dagger Hilt Android project?

You create custom @Qualifier annotations — one for each base URL and its corresponding OkHttpClient and Retrofit instance. In your NetworkModule, you provide each separately and annotate injection sites with the right qualifier so Hilt knows which client to inject.

What are @Qualifier annotations in Hilt and why are you using them here?

@Qualifier annotations let you distinguish between multiple bindings of the same type. When you have three Retrofit instances for three different APIs, Hilt needs qualifiers like @BaseRetrofit, @ValeRetrofit, and @HotelRetrofit to know which one to inject where.

What is the difference between Dagger and Dagger Hilt?

Dagger is the original dependency injection framework for Android, but setting it up was complex and error-prone. Hilt is built on top of Dagger and simplifies the setup significantly, providing standard components like SingletonComponent out of the box.

What happens when you skip dependency injection and your project grows?

Without DI, each new service integration forces you to manually manage object creation and pass dependencies through constructors or globals. The codebase becomes harder to maintain, test, and extend — exactly what happened in this project when two unexpected backend integrations were added.

What is SingletonComponent in Hilt?

SingletonComponent is a Hilt component that lives for the entire lifetime of the application. Modules installed in it with @InstallIn(SingletonComponent::class) provide dependencies as app-wide singletons, which is ideal for network clients and Retrofit instances.

Is Kotlin or Java better for new Android projects?

The post notes this project started in Java because Kotlin support was not yet announced for Android at the time. Today the industry has largely moved to Kotlin, and the author suspects the app was later rewritten in Kotlin based on clues from the Play Store.

Building a Document-Based Legal AI (RAG) That Can Say “I Don’t Know”

Source article: /posts/a-document-based-legal-ai-that-can-say-i-don-t-know

How do you build a document-based legal AI with RAG that cites sources and says 'I don't know' instead of hallucinating?

This project builds a RAG (retrieval-augmented generation) system for legal documents that only answers from uploaded files, cites every source, and explicitly says it doesn't know when the answer isn't in the documents. It was tested on Turkish legal texts using Claude Haiku 4.5, Gemma 4, and DeepSeek-R1, with no fine-tuning required.

Why use RAG instead of fine-tuning a model on legal documents?

Fine-tuning pushes information into model weights in a fuzzy, unverifiable way and doesn't reliably reduce hallucination — it can even make it worse. RAG keeps documents outside the model in a searchable archive, so sources stay checkable, adding a new document takes seconds, and no retraining is needed.

How does the system prevent hallucination in legal answers?

The system uses a strict system prompt with temperature set to 0, instructing the model to only use the provided document chunks and never rely on general knowledge or guesses. If the answer isn't in the documents, the model is required to say exactly: 'I could not find this information in the provided documents.'

What embedding model is used and why?

The system uses BAAI/bge-m3, which produces 1024-dimension vectors. It was chosen because it's multilingual (handles Turkish well), performs strongly on long text, and runs locally on CPU or MPS without needing a second API key or paid service.

Why was pypdfium2 chosen over pypdf or pdfplumber for PDF parsing?

Both pypdf and pdfplumber dropped the Turkish letter 'İ' due to a broken ToUnicode/CMap font map inside the PDF — they trusted the broken map and produced corrupted text. pypdfium2 uses Google's PDFium engine, which resolves characters from the glyph itself, correctly preserving Turkish characters.

How is the text chunked before embedding?

Text is cleaned first with regex to remove page numbers, date headers, URLs, and portal noise. It's then split at sentence boundaries (not raw character counts), targeting around 1200 characters per chunk with roughly 200 characters of overlap between chunks, so rules spanning chunk edges aren't cut off and lose context.

Does the system use a vector database like Pinecone or Qdrant?

No. At the current scale, all vectors are stored in a single NumPy array and searched using cosine similarity, which with normalized vectors equals a simple dot product. This keeps the setup simple and avoids external dependencies for smaller document collections.

How does the similarity scoring work and what is the cutoff?

The system computes cosine similarity scores between the query vector and all chunk vectors, then returns the top-K highest-scoring chunks. A MIN_SIMILARITY cutoff of 0.35 filters out irrelevant chunks. In testing, relevant legal chunks scored 0.60–0.72 while unrelated ones scored 0.42–0.46.

Can the system pull from multiple documents in one answer?

Yes. The top-K retrieved chunks can come from different documents in the archive. All are passed to the model together, and the model attributes each piece of information to its correct source document, allowing answers that combine definitions from one file and examples from another.

What happens if a question is about a law not in the uploaded documents?

The model will not use its internal training knowledge to fill the gap. In a test asking about employment notice periods, the models all responded that they could not find the information in the provided documents — even though they likely knew the answer from general training data.

What file types does the system support?

The system supports .txt, .docx, and text-based .pdf files. Scanned or image-based PDFs require a separate OCR step, which was not implemented in this project since the test documents were text-based PDFs.

Which AI models were tested with this system?

Three models were tested on Turkish legal texts: Claude Haiku 4.5, Gemma 4, and DeepSeek-R1. All three correctly refused to answer when the relevant information was not present in the provided documents.

A Principal Who Made a Difference, Part 3: Cliffs, Partridges and a Sivas Winter

Source article: /posts/a-principal-who-made-a-difference-3

What was it like teaching in a remote Sivas village in the early 1980s as a school principal?

A Turkish school principal recalls his time teaching in Kazancık, a remote Sivas village in the early 1980s. He describes harsh winters with no road access, stunning white Pur cliffs, partridge calls, and deep bonds with villagers and students. Years later, an unexpected reunion at a bus station brought those memories back to life.

What were living conditions like for teachers in remote Sivas villages in the 1980s?

The principal lived in a house with a wooden reverse ceiling and no mud insulation, so snow would blow inside even when the stove was lit. Winter roads closed until early March, cutting off the village entirely from outside access.

What are the Pur Rocks (Pur Cliffs) in Kazancık village, Sivas?

The Pur Rocks are shiny, snow-white cliffs across from Kazancık village, described as almost glass-like in appearance but not marble. They are not used commercially and the principal visited them often out of pure admiration for their beauty.

Why did the principal refuse to burn the fuel the students brought to school?

Students would arrive each morning carrying bags with dung cakes to heat the classroom. The principal felt it was morally wrong to warm himself using fuel those children carried in, so he bought firewood from the village at his own expense instead.

Did the principal go hunting in the village despite wildlife being present?

No. Although he had a hunter's instinct and spotted hares and partridges regularly, he never fired a single shot. The sound of partridges calling in the early morning was so harmonious that he chose never to disturb it.

What was the social life like for teachers in Kazancık village?

There was no coffeehouse, so villagers gathered in private rooms in the evenings for tea and conversation. The teachers joined these gatherings and found the talk enjoyable. They also watched Turkey's basketball matches on one of the village's few black-and-white televisions.

What was the relationship between teachers and the local community in the village?

Villagers held teachers in very high regard, seating them in the place of honor above elders. Headman Uncle Ramazan and his brother Uncle Haydar were particularly generous and respectful toward the principal and his colleague.

How did the 1980 military coup affect teachers working in rural Turkish villages?

The principal acknowledged having personal political views, but chose to set them aside entirely. He believed his duty was to educate children and not betray the salary paid by the state, so he focused all spare time on his students rather than politics.

What kind of support did students in the village receive for their education?

There were no resources at home — no encyclopedias, no educated family members to help. So when the principal assigned homework, he and his colleague Mehmet Bey would help the children complete it themselves, keeping busy with students even in their free time.

Why did Kazancık village have a gendarmerie post despite being only 25 households?

The post was established by order of Atatürk and could not be removed. The village had a Chechen population, and the post provided security for all the surrounding villages in the area.

Was there medical care available in Kazancık village?

The village had a health house with midwives and nurses, but no resident doctor. In winter, the doctor could not reach the village due to closed roads, and would only visit during open months using the Health Directorate's vehicle.

Vibe Coding, Reviewed by a Developer With 10 Years of Experience

Source article: /posts/vibe-coding-for-10-years-experienced-software-developer

What is vibe coding like for an experienced Android developer with 10+ years of experience?

A senior developer with 10 years of experience tried vibe coding using Lovable and Gemini for a hobby project. He found it fast for prototyping but raised serious concerns about code security, lack of understanding, and hidden risks like mining agents. He concluded that experienced developers should stay in the architect role, not hand over full control.

What is vibe coding for an Android developer?

Vibe coding means using AI tools like Lovable or Gemini to generate code or designs quickly without writing every line yourself. For an Android developer, it can speed up prototyping but skips the deep code understanding that experienced developers rely on.

What mistakes does vibe coding make according to a senior developer?

The main issue flagged is security — vibe coding tools prioritize speed over code quality and safety. The developer also warns that AI-generated code can contain hidden risks like mining agents that run on your device without your knowledge.

Can you trust the code that vibe coding tools generate?

According to this developer, no — not without reading every line yourself. He did not even commit Lovable's output to GitHub and planned to rewrite it from scratch after analysis. A developer needs to understand not just the code but the intent behind it.

Is vibe coding useful for experienced developers?

It can be useful for rapid prototyping and design, but experienced developers should treat AI as a grunt worker, not the architect. Handing over full control is described as 'professional suicide' in the post.

What tools did the developer use for vibe coding?

He used Lovable for visual design and code generation, and Gemini as an AI assistant. The project started with a written brief before moving into the vibe coding tools.

What are the security risks of vibe coding?

The post warns that vibe coding tools can embed mining agents into generated code, which run on your device and silently benefit the tool's owner. This could expose banking information, passwords, and other sensitive data.

Is Kotlin better than Java for Android development?

The developer's current advice is to learn Java if your university taught it, but switch to Kotlin immediately for Android development. Java has never died and remains widely used in backend and frontend, but Kotlin is the modern standard for Android.

How does vibe coding compare to earlier no-code tools?

Earlier no-code website and app builders existed but were far less capable. The developer notes that modern vibe coding tools backed by large language models are significantly more powerful than those older platforms.

Is Discipline Really Necessary for Success? What the Research Says

Source article: /posts/is-discipline-necessary-for-success

Is discipline truly necessary for success, or can people achieve greatness without it?

Science strongly supports discipline as a key driver of success, citing studies like the Stanford Marshmallow Experiment and Angela Duckworth's Grit research. However, figures like Salvador Dalí and Steve Jobs show that passion, vision, and flexibility can also lead to extraordinary achievement. The truth likely lies between strict discipline and creative freedom.

What does science say about discipline and success?

Multiple studies support discipline as a major success factor. The Stanford Marshmallow Experiment linked self-control in children to better life outcomes, Angela Duckworth's Grit research found the most successful people were the most disciplined and persistent, and Ericsson's 10,000-hour rule showed that deliberate, consistent practice — not just talent — leads to mastery.

Can you be successful without discipline?

Yes, some highly successful people operated without strict discipline. Salvador Dalí worked on instinct and irregular hours, while Steve Jobs was known for disorganization and constantly changing his mind. Their success was driven more by passion, vision, and flexibility than by structured routines.

What is the Stanford Marshmallow Experiment and what does it prove?

In 1972, psychologist Walter Mischel gave children a marshmallow and told them they could get a second one if they waited 15 minutes. Children who waited — showing self-control — went on to have better academic careers, higher income, and lower stress as adults. The study suggests self-discipline has a significant impact on long-term success.

What did Angela Duckworth's Grit study find?

Duckworth's 2007 research found that the most successful people — including West Point cadets, corporate executives, and elite athletes — were not necessarily the most intelligent, but the most disciplined and persistent. She called this quality 'grit': passion and perseverance toward long-term goals.

What is the 10,000-hour rule and who developed it?

Psychologist K. Anders Ericsson developed this concept in 1993 after studying pianists, chess masters, and athletes. He found that top performers averaged around 10,000 hours of deliberate, conscious practice. The key wasn't just time spent, but the quality and intentionality of practice.

How did Steve Jobs succeed without being highly disciplined?

Steve Jobs didn't follow strict working hours, frequently changed his mind, and could be impatient or withdraw for weeks at a time. Despite this disorganization, he built Apple into one of the world's most valuable companies by prioritizing vision and flexibility over rigid discipline.

How did Salvador Dalí achieve success without discipline?

Dalí worked on instinct rather than a plan — sometimes working for days, then doing nothing for hours. His creative process was spontaneous and intuition-driven. Yet his works ended up in the world's most valuable art collections, suggesting that passion can sometimes substitute for structured discipline.

Is talent or discipline more important for success?

According to the research cited in the post, discipline consistently outweighs raw talent. Duckworth's grit study and Ericsson's deliberate practice research both found that persistent, disciplined effort matters more than innate ability. However, examples like Dalí show that intense passion can also drive success.

What is 'grit' and why does it matter for success?

Grit, as defined by psychologist Angela Duckworth, is the combination of passion and perseverance toward long-term goals. Her research showed it was a stronger predictor of success than intelligence or talent alone, making it one of the most important psychological traits for achievement.

A Principal Who Made a Difference: My Dad’s Leadership Journey

Source article: /posts/a-principal-who-made-a-difference-my-dad-s-leadership

What leadership lessons can be learned from a school principal with 35 years of experience?

This post begins a memoir series about a respected school principal's 35-year career. Through real stories, it shows how he handled conflicts between teachers and parents, supported staff through personal crises, and treated his school community like family. The goal is to preserve these lessons and eventually turn them into a book.

What made this school principal so respected by teachers and parents?

He treated both teachers and parents like family, stepping in personally during hardships — including visiting a child in the hospital before surgery. He handled conflicts calmly and privately, protecting his teachers' dignity while still holding them accountable.

How did the principal handle a conflict between a teacher and an aggressive parent?

When a parent was rude to a teacher in the schoolyard, the principal stopped the teacher's husband from intervening and took charge himself. He brought the parent to his office, understood the real problem (an upcoming child surgery), and resolved it respectfully for everyone involved.

What did the principal do when a teacher was late to school for the first time?

Instead of demanding an explanation, he welcomed the teacher warmly, offered tea, and acknowledged that something serious must have happened since the teacher had never been late before. He created a safe space for the teacher to open up rather than jumping to discipline.

What leadership lesson does the principal's hospital visit teach?

After resolving a dispute with parents whose child needed surgery, the principal visited the hospital, helped with paperwork, brought gifts for the child, and gave them his home phone number. He told them, 'Your parents aren't in town — here, I'm your mother and father,' showing that genuine care builds deeper trust than authority alone.

How did the principal balance supporting teachers with holding them accountable?

He publicly defended his teachers from unfair treatment while privately coaching them on better responses. For example, after protecting the teacher's husband from a costly fight, he later called him in and asked whether throwing away years of hard work over one moment was worth it.

Is there an album or post about how Evgeny Grinko was inspired by Aşık Veysel?

The post briefly mentions a previous story about how Evgeny Grinko got inspired by Aşık Veysel as part of the author's earlier writing. No further details about the album or that story are provided in this post.

My Sci-Fi Madness #1: Dune, and What It Gets Wrong

Source article: /posts/my-sci-fi-madness-1-dissing-dune

What are the main themes, characters, and criticisms of Frank Herbert's Dune?

Dune is a 1965 sci-fi epic set on the desert planet Arrakis, following Paul Atreides as he rises to power through political betrayal and alliance with the native Fremen. While praised for its world-building and themes, some readers find it overly fantasy-like, with predictable plot beats, jarring time jumps, and underdeveloped character arcs.

What is Dune about?

Dune follows young Paul Atreides after his family is betrayed and his father killed on the desert planet Arrakis. Paul escapes into the desert, joins the native Fremen people, and eventually leads them to defeat the Harkonnens and the Emperor to take control of Arrakis.

Why is spice so important in Dune?

Spice, found only on Arrakis, is the most valuable substance in the universe. It extends human life, expands consciousness, and makes interstellar space travel possible, making control of Arrakis a massive political prize.

Who are the main characters in Dune?

The key characters include Paul Atreides, his father Duke Leto, his mother Lady Jessica (a Bene Gesserit), the villain Baron Vladimir Harkonnen, and Stilgar, leader of the desert-dwelling Fremen who take Paul and Jessica in.

What are the main themes in Dune?

Dune explores power and political control, the ecology and environment of a desert world, the messianic concept of a chosen one, and the limits of human potential through Bene Gesserit training and evolution.

Is Dune more sci-fi or fantasy?

Despite being marketed as sci-fi, Dune leans heavily into fantasy elements like prophecies, genetic manipulation by the Bene Gesserit, and special powers. Sci-fi elements like ornithopters and Fremen suits exist, but they don't dominate the story.

What are the biggest criticisms of Dune?

Common criticisms include frequent time jumps that disrupt story flow, a predictable 'chosen one' hero arc, lack of detail around space travel, and Paul's inconsistent portrayal as both god-like and helpless across the two books.

How does Paul Atreides become leader of the Fremen?

After escaping into the desert following his father's death, Paul and his mother Jessica are reluctantly accepted by the Fremen. Paul quickly earns their trust, takes the name Muad'Dib, and uses superior combat techniques to unite them against their enemies.

What happens in Dune Messiah?

Dune Messiah shows a sharp decline for Paul, who displays increasing helplessness and weakness despite his earlier god-like promise. The abrupt tonal shift and underdeveloped character arcs in the sequel left some readers feeling disconnected.

Why was Dune rejected by publishers?

Dune was rejected by around 20 publishers because the sci-fi trend at the time favored shorter, more impactful stories. The book was considered too long and was often turned down without being fully read.

What is the Bene Gesserit in Dune?

The Bene Gesserit is a secretive sisterhood that practices genetic manipulation and trains members in advanced mental and physical abilities. Paul's mother Lady Jessica is a member and trains Paul in their ways.

Sleep In and Still Get to Work on Time: 10 Lazy Morning Hacks

Source article: /posts/10-lazy-ways-to-wake-up-late

How can you wake up late and still get out the door on time in the morning?

You can sleep in longer by doing most morning tasks the night before — packing your bag, laying out clothes, and prepping food. Better sleep quality through good bedding and pre-sleep routines also helps you wake up later feeling rested. Small time savings add up to an extra 15–30 minutes of sleep.

How do you wake up late in the morning without being rushed?

Prepare as much as possible the night before — pack your bag, lay out your clothes, and prep your food. This can free up 20–30 minutes in the morning so you can sleep in and still get out the door on time.

How can I sleep in later without changing my schedule?

Front-load your morning prep into the evening. Packing your bag, ironing clothes, and setting out breakfast ingredients the night before eliminates decisions and tasks that eat into sleep time.

How do you stay up late and still wake up feeling okay?

Protect the quality of the hours you do get. A good bed and pillow, a pitch-dark room, a sleep mask or earplugs, and brushing your teeth as a wind-down signal all make a short night more restorative. Put your phone in airplane mode so group chats and good-morning messages do not cut the little sleep you have even shorter.

Is skipping breakfast a good way to get more sleep?

The post suggests skipping breakfast or eating just two meals a day can free up meaningful morning time for sleep. The author notes no negative impact on energy or productivity, though a minimal pre-prepped breakfast is offered as an alternative.

How do I stop being lazy in the morning?

The post reframes laziness as motivation — doing prep work the night before is itself a lazy strategy to avoid morning stress. Making mornings effortless makes it easier to get out of bed quickly.

How does a good pillow or bed help you wake up later?

A quality bed and pillow improve sleep quality so you wake up feeling more refreshed. Better rest means you're less likely to have your sleep disrupted, effectively letting you sleep longer.

What pre-sleep routines help you sleep in longer?

Brushing your teeth signals your brain it's time to sleep and improves sleep quality. The post also recommends meditation or relaxation exercises, a dark room, sleep masks, or earplugs to reduce disruptions and deepen sleep.

How do you wake up early when you go to bed late?

Shorten the morning, not the sleep. If your bag is packed, your clothes are laid out and breakfast is either skipped or waiting in the fridge, you can be out the door 20 to 30 minutes after the alarm instead of an hour. Those minutes come straight back as sleep, which is the whole difference between waking up early and waking up early exhausted.

Why I Run: Freedom, Health and Inner Peace

Source article: /posts/why-i-run

Why do people start running and how does it improve mental health, freedom, and sense of community?

The author began running in 2017 during a period of loneliness and aimlessness, starting with garden sprints alongside his dog Şeker. Over time, running became a source of mental clarity, personal growth, and connection with others, eventually leading him to complete multiple ultramarathons.

What got the author started with running?

The author began running in 2017 while living in Istanbul during a difficult, directionless period of his life. He started with short sprints in a small garden alongside his Russian Spaniel, Şeker, and gradually built up to longer solo laps when the dog wasn't in the mood to run.

Can running help with loneliness and feeling lost?

For the author, yes — running emerged during a time when he felt alone, empty, and without purpose. The physical routine of exhaustion, sweat, and recovery gave him something concrete and rewarding to hold onto when little else did.

How did the author progress from casual running to ultramarathons?

He started with 6 garden laps a day, gradually increasing to 8, 10, 12, and 14 without formal knowledge of pace or running form. Over years, that habit evolved into completing races like the Cappadocia Ultra (63 km, twice) and the Uludağ Ultra (30 km, twice).

What ultramarathons has the author completed?

He has completed the Cappadocia Ultra (63 km) twice, the Uludağ Ultra (30 km) twice, and the Dağyenice Ultra (35 km) once. He is also eyeing the Uludağ Ultra 66 km race.

Why do runners enjoy pain and suffering during races?

The author quotes Dean Karnazes: 'There is a magic in misery.' The idea is that intense physical effort heightens awareness and consciousness in a way comfort never can. For the author, the fatigue and sweat were genuinely enjoyable from the very start.

Can running help improve social skills and build friendships?

For the author, running indirectly helped. As he worked on communication skills and opened up to colleagues, he discovered a coworker who ran races — a connection that helped draw him deeper into the running community.

Do you need to know running terms and techniques to get started?

The author started with zero knowledge of pace, speed, running form, or training zones. He simply timed his laps and focused on completing them without stopping, showing that beginners can make real progress without technical knowledge.

Is running connected to a sense of freedom?

Yes — the post frames running as a journey toward freedom, mental clarity, and inner peace. The author describes it as something that cuts through emptiness and gives a sense of direction, both literally and emotionally.

The T-Shirt Crowd Misses You, Haluk Levent

Source article: /posts/the-t-shirt-crowd-misses-you-haluk-levent

What are Haluk Levent's live concerts like, and what can fans expect from his public performances?

The author attended two Haluk Levent concerts at Kuruçeşme in 2021 and 2022. The first was a rainy but unforgettable night where no one left despite getting soaked. The second featured a VIP spot, custom Haluk Levent photo T-shirts, and an emotional, up-close experience with the legendary Turkish rock artist.

What are Haluk Levent public events and concerts like?

Haluk Levent's concerts are high-energy, intimate events where he mingles with the audience and performs improvisations. At Kuruçeşme, he walked among the crowd, and even when rain soaked the audience, no one left — which visibly surprised him.

Are there photos from Haluk Levent concerts?

The author shares photos taken at two Kuruçeşme concerts in 2021 and 2022, including crowd shots in the rain and images of custom Haluk Levent photo T-shirts fans wore. Getting a personal photo with Haluk Levent proved difficult even at close range.

Who are the musicians in Haluk Levent's concert orchestra?

His band includes Göktuğ Şenkal on electric guitar, Elvan Kızılay and Feray Tekşahin on violin, Mert Alkaya on drums, Burak Kulaksızoğlu on bass, Aslıhan Parlak on cello, and Erdi Arslan on wind instruments. Haluk Levent himself praised the orchestra for handling unrehearsed songs and his improvisations.

Where does Haluk Levent perform concerts?

The concerts described in this post were both held at Kuruçeşme, a venue by the sea in Istanbul. The seaside setting added to the atmosphere, especially during the emotional cello performance of 'Anlasana.'

How can fans get Haluk Levent photo T-shirts?

The author and a friend couldn't find ready-made Haluk Levent photo T-shirts for sale, so they found a high-quality old photograph of him and had T-shirts custom printed themselves. No official merchandise store for such items is mentioned in the post.

What songs does Haluk Levent perform live?

The author mentions singing along to many of Haluk Levent's songs, including 'Anlasana,' which featured a standout cello solo. The setlist appeared to cover a wide range of his catalog, including songs about breakups and longing.

How long has Haluk Levent been a rock musician?

According to the post, Haluk Levent himself said, 'I've been a rocker for 40 years, and I'm still adjusting my pants,' suggesting a career spanning at least four decades.

What is Ahbap and how is Haluk Levent connected to it?

Haluk Levent founded Ahbap, a charitable organization. The post notes this, along with other good deeds like starring in a cryptocurrency exchange commercial and donating the proceeds to students, as reasons the author deeply respects him.

Opening 11 Million Character HTML in a Mobile WebView: Virtual Chunking

Source article: /posts/opening-11-million-character-html-in-a-mobile-webview

How do you open an 11 million character HTML file in a mobile WebView without freezing?

Opening massive HTML documents (11M+ characters) in a mobile WebView crashes the main thread. The solution is virtual chunking: parsing the HTML into safe segments at block-level boundaries, then rendering only the visible chunk in the DOM while keeping the rest out of memory.

Why does a large HTML file crash a mobile WebView?

When a WebView loads HTML, it keeps the entire document in memory and recalculates the full layout tree on every scroll or interaction. An 11 million character document with hundreds of nested tables, divs, and definitions causes layout thrashing and locks the main thread, making the app unresponsive and the device hot.

What is virtual chunking in the context of HTML documents?

Virtual chunking is an adaptation of the 'virtual scrolling' or 'windowing' technique applied to large HTML documents. Instead of loading the entire document into the DOM, only the portion visible on screen is rendered, keeping invisible content outside the DOM to reduce memory usage and main thread load.

What is Total Blocking Time (TBT) and why does it matter here?

TBT is the time the browser's main thread is blocked and unable to respond to user input. Loading 11 million characters into the DOM all at once can lock the main thread for minutes. Breaking the process into smaller chunks frees up the main thread and keeps the app responsive.

Why can't you split a large HTML file using simple regex or character count?

Splitting HTML at arbitrary character positions or with simple regex risks cutting through open tags, leaving unclosed tables or broken div hierarchies that crash the browser. HTML's deeply nested and often poorly formed structure makes safe splitting with regex extremely difficult at scale.

What threshold did the team use to identify problematic documents?

Documents exceeding 1.5 million characters were identified as risky. There were 227 documents in the system that exceeded this threshold, with the worst cases reaching over 11 million characters.

Why was redirecting to the device browser rejected as a solution?

The sales team reported that opening documents outside the mobile application was unacceptable to customers. The product requirement was that all documents must open within the app, ruling out the simpler browser-redirect approach.

How do large platforms like Reddit handle massive HTML content on mobile?

Reddit migrated from raw HTML to a JSON-based content format in the early 2010s. The common philosophy across major platforms is to render only what is visible on screen and keep invisible content outside the DOM, which is the same principle behind virtual scrolling.

What is layout thrashing and how does it affect mobile performance?

Layout thrashing happens when the browser repeatedly recalculates the positions and sizes of elements in a large DOM tree. On mobile devices, this causes physically noticeable sluggishness with every scroll or touch interaction, especially in documents with complex nested structures.

Where should you cut an HTML document to split it safely?

The post indicates cuts must be made at safe block-level boundaries rather than at arbitrary character positions. Cutting mid-tag or inside nested structures like tables or divs creates broken HTML that the browser cannot render correctly.

What technology stack was the app built on?

The application was built with Vue.js and Capacitor, running as a native wrapper around a WebView on mobile devices.

My Sci-Fi Madness #0: What Makes Science Fiction Different

Source article: /posts/my-sci-fi-madness-0-the-genre-s-traits-and-my-beginning

What are the defining traits of the science fiction genre?

Science fiction explores scientific and technological innovations, social questions, and alternative futures. Its key traits include advanced technology, philosophical depth, alternative realities, and strong character development. It acts as a mirror for humanity's hopes and fears about the future.

What are science fiction traits?

Science fiction has four core traits: scientific and technological innovations (like AI or space travel), social and philosophical questions about human nature, alternative realities and future scenarios, and strong narrative with deep character development. Together these make sci-fi both entertaining and thought-provoking.

What is science fiction?

Science fiction explores scientific and technological possibilities through stories set in the future or alternative universes. It examines philosophical questions about human nature and society while reflecting our hopes and fears for the future. It's not just escapism — it's a mirror held up to the present.

What themes does science fiction explore?

Sci-fi explores themes like artificial intelligence, space travel, genetic engineering, social structures, identity, and the impact of scientific progress on humanity. Works like Asimov's Foundation and Philip K. Dick's Do Androids Dream of Electric Sheep? tackle sociopolitical evolution and what it means to be human.

What are some classic science fiction books to start with?

Good starting points include H.G. Wells's War of the Worlds and The Time Machine, which replaced magic with science-driven storytelling. Richard K. Morgan's Altered Carbon is a standout cyberpunk entry, and Frank Herbert's Dune is considered a landmark of the genre.

Is science fiction only about technology?

No — while technology is a common element, sci-fi also digs into deep philosophical and social questions. Asimov's Foundation examines sociopolitical structures, and Philip K. Dick's work questions reality and human identity. Technology is often just the backdrop for exploring human nature.

What is the difference between science fiction and fantasy?

According to the post, H.G. Wells moved sci-fi closer to positive sciences by replacing magic, spells, and supernatural events with human or alien-made machines. Fantasy relies on those supernatural elements, while sci-fi grounds its impossible ideas in scientific or technological reasoning.

What is the social commentary in H.G. Wells's books?

War of the Worlds is a satire of British colonialism, and The Time Machine is a satire of Victorian social class differences. Many readers, including the post's author, don't catch this subtext on first read, which shows how sci-fi layers entertainment with deeper social criticism.