Wednesday, November 4, 2026

From Nazi Germany to Nuclear Iran: How America Lost Its Long-Term Strategy to Identity Politics

There was a time when American political leadership understood that some national objectives were bigger than any president, any political party, or any election.

We disagreed on implementation. We disagreed on spending, military strategy, diplomacy, taxation, and the role of government.

But we understood something that seems increasingly lost today:

YOU CAN DISAGREE ON HOW TO ACCOMPLISH SOMETHING WITHOUT ABANDONING THE OBJECTIVE ITSELF.

And perhaps more importantly, we understood that certain objectives required sacrifice.

REAL sacrifice.

Not just higher grocery prices or expensive gasoline. Not simply enduring economic discomfort while waiting for a policy to produce results.

I'm talking about entire generations committing resources, accepting enormous economic trade-offs, and pursuing national objectives that no single president could guarantee would succeed.

And what's particularly frustrating is that we have historical examples of America confronting threats remarkably similar to those we face today.

WE ONCE MOBILIZED AN ENORMOUS SCIENTIFIC AND INDUSTRIAL EFFORT BECAUSE WE FEARED NAZI GERMANY MIGHT DEVELOP AN ATOMIC BOMB.

Today, we're confronting the possibility of Iran developing nuclear weapons.

The circumstances are different. The capabilities, geopolitical environment, and available policy options are different.

But the underlying strategic question is familiar:

WHAT ARE WE WILLING TO DO, WHAT ARE WE WILLING TO SACRIFICE, AND HOW LONG ARE WE WILLING TO REMAIN COMMITTED TO PREVENTING A HOSTILE REGIME FROM ACQUIRING A NUCLEAR WEAPON?

Look at World War II.

In 1939, Albert Einstein and physicist Leo Szilard warned President Franklin D. Roosevelt that Nazi Germany might pursue extraordinarily powerful weapons using nuclear fission.

American policymakers faced an uncertain but potentially catastrophic threat.

They didn't know whether Germany could successfully develop an atomic bomb.

They didn't know how far German research had progressed.

They didn't know whether the United States could develop the necessary technology first.

But they recognized that the consequences of being wrong could be devastating.

And what did America do?

We eventually launched one of the most ambitious scientific and industrial undertakings in human history.

THE MANHATTAN PROJECT.

It cost approximately $2 billion in 1940s dollars and employed roughly 130,000 people at its peak.

We built enormous facilities at Oak Ridge, Tennessee, and Hanford, Washington.

We assembled leading scientists, engineers, military officials, and industrial organizations.

We invested in technologies that had never been demonstrated at the necessary scale.

And we did all of this while fighting a global war.

WE COMMITTED ENORMOUS RESOURCES TO PREVENTING A POTENTIALLY CATASTROPHIC STRATEGIC DISADVANTAGE, EVEN WITHOUT KNOWING WHETHER THE THREAT WOULD MATERIALIZE.

Germany surrendered before the first successful American atomic test in July 1945. Later evidence showed that Germany's nuclear weapons effort was far less advanced than American officials initially feared.

The project ultimately produced the weapons used against Japan, not Germany.

But the original fear of a Nazi atomic bomb was an important reason the United States began pursuing the technology.

And the strategic lesson is worth remembering.

We didn't wait for Germany to demonstrate a working atomic weapon before recognizing the potential danger.

We assessed the threat, considered the consequences, and committed resources to ensuring that America would not be left strategically defenseless.

Now look at Iran.

For decades, the United States has sought to prevent Iran from acquiring nuclear weapons.

And just as American officials once faced uncertainty about Nazi Germany's nuclear progress, modern policymakers have faced uncertainty about Iran's intentions, technical capabilities, enrichment activities, and potential decisions regarding weaponization.

The historical situations aren't identical.

Nazi Germany was engaged in a world war and pursuing territorial conquest on an enormous scale. Iran operates in a different strategic environment, under international monitoring arrangements and within a complicated regional balance of power.

But both cases raise the same fundamental national security problem:

HOW DO YOU PREVENT A HOSTILE GOVERNMENT FROM ACQUIRING A CAPABILITY THAT COULD DRAMATICALLY CHANGE THE STRATEGIC BALANCE?

And here's where the comparison becomes particularly revealing.

During World War II, America was willing to commit extraordinary scientific, industrial, and financial resources to confronting that possibility.

Today, Democrats and Republicans generally agree that preventing Iran from acquiring nuclear weapons is an important national security objective.

Yet we struggle to maintain a durable agreement on how to achieve it.

Obama negotiated the 2015 nuclear agreement, which imposed restrictions and monitoring requirements on Iran's nuclear activities in exchange for sanctions relief.

Trump withdrew from that agreement in 2018, arguing that its weaknesses required a stronger approach, and reinstated sanctions under a maximum-pressure strategy.

Biden attempted to restore negotiations, but those efforts failed.

Subsequent years brought additional sanctions, military escalation, strikes against Iranian nuclear infrastructure, and renewed diplomatic efforts.

Different presidents. Different parties. Different strategies.

And the underlying problem has remained unresolved.

I'm not arguing that the 2015 nuclear agreement was perfect.

I'm not arguing that withdrawing from it was automatically wrong.

I'm not arguing that sanctions alone could have solved the problem or that military action is always justified.

I'm asking something much more fundamental.

WHY CAN'T WE ESTABLISH A LONG-TERM STRATEGY FOR PREVENTING IRAN FROM ACQUIRING NUCLEAR WEAPONS THAT SURVIVES A CHANGE IN ADMINISTRATION?

During World War II, America pursued an extraordinarily expensive scientific and industrial program because policymakers feared the consequences of a hostile regime acquiring nuclear weapons first.

Today, we're debating the same general category of strategic danger, but we cannot maintain a consistent political framework for addressing it.

And no, that doesn't mean we should launch another Manhattan Project or treat Iran as identical to Nazi Germany.

The lesson isn't that every nuclear threat requires the same response.

The lesson is that A SERIOUS NATIONAL SECURITY OBJECTIVE REQUIRES MORE THAN A FOUR-YEAR POLITICAL COMMITMENT.

It requires continuity.

It requires strategic patience.

It requires evaluating policies based on whether they advance the objective rather than which party proposed them.

And it requires accepting that preventing a catastrophic outcome may involve real economic costs.

Because preventing nuclear proliferation isn't free.

Sanctions have economic consequences.

Military readiness costs money.

Intelligence operations cost money.

International monitoring and diplomatic efforts require resources.

And military confrontation, if it occurs, can carry enormous financial, geopolitical, and human costs.

Those costs need to be evaluated carefully.

But pretending we can protect national security without making difficult trade-offs is ridiculous.

THERE IS NO SUCH THING AS A COST-FREE NATIONAL SECURITY STRATEGY.

And the Manhattan Project wasn't the only example of America's willingness to sustain long-term commitments.

Look at the Cold War.

For approximately 44 years, nine American presidents from both parties maintained a broad commitment to containing Soviet expansion.

Truman established the foundation.

Eisenhower strengthened deterrence and alliances.

Kennedy confronted Soviet pressure during the Berlin and Cuban Missile crises.

Nixon pursued détente and strategic diplomacy.

Carter adjusted his approach following the Soviet invasion of Afghanistan.

Reagan intensified competition while pursuing arms-control negotiations.

George H. W. Bush managed the final stages of the Cold War and the dissolution of the Soviet Union.

NINE PRESIDENTS. TWO PARTIES. MORE THAN FOUR DECADES OF STRATEGIC CONTINUITY.

They didn't agree on everything.

Not even close.

But they recognized that the underlying national objective transcended individual administrations.

And America paid for that commitment.

We maintained military installations around the world, supported international alliances, developed nuclear deterrence capabilities, funded defense research, and committed substantial portions of our economic output to competing with Soviet power.

At certain points during the Cold War, defense spending exceeded 9% of GDP.

Those were real economic trade-offs.

Resources devoted to defense couldn't simultaneously be devoted to every domestic priority.

Yet successive administrations maintained the broader commitment because they believed the consequences of unchecked Soviet expansion could be far worse.

WE WERE WILLING TO INVEST DECADES OF RESOURCES INTO OBJECTIVES THAT NO SINGLE PRESIDENT COULD GUARANTEE WOULD SUCCEED.

Now look at what happened afterward.

In 2008, Russia invaded Georgia during George W. Bush's presidency.

The administration condemned the invasion, supported diplomatic efforts, and provided assistance.

But the response failed to reverse Russia's territorial gains.

In 2014, Russia invaded Ukraine and annexed Crimea during Barack Obama's presidency.

Obama imposed sanctions, supported diplomatic isolation, and provided nonlethal military assistance.

But he declined to provide Ukraine with lethal defensive weapons, despite arguments that doing so could strengthen deterrence.

Russia retained Crimea.

Then, in 2022, Russia launched its full-scale invasion of Ukraine.

Different presidents. Different parties. Repeated aggression.

I'm not claiming Bush or Obama caused Russia's invasions. Russia bears responsibility for its own actions.

I'm also not claiming that stronger military assistance would necessarily have prevented subsequent aggression.

But we absolutely should question whether successive American administrations developed a sufficiently effective strategy for deterring Russia's renewed territorial ambitions.

WE SPENT DECADES CONTAINING SOVIET EXPANSION, ONLY TO STRUGGLE WITH HOW TO RESPOND WHEN RUSSIA BEGAN EXPANDING AGAIN.

And now we're facing a comparable problem of strategic continuity with Iran.

We know the objective.

We understand the stakes.

We recognize the potential consequences of nuclear proliferation.

Yet the methods change dramatically with each administration.

And that brings me to something much bigger than Russia or Iran.

WHAT HAPPENED TO OUR POLITICAL CULTURE?

How did we go from a country capable of sustaining national objectives for generations to one where nearly every major issue becomes another partisan identity contest?

The change didn't happen overnight.

But in historical terms, the acceleration has been astonishing.

Consider the political landscape of the 1990s compared with the 2010s and 2020s.

According to Pew Research Center, in 1994 approximately 10% of Americans held consistently liberal or consistently conservative positions across a broad range of political issues.

By 2014, that proportion had doubled to 21%.

And the hostility between political parties intensified dramatically.

In 1994, only 16% of Democrats and 17% of Republicans expressed very unfavorable views of the opposing party.

By 2014, those figures had climbed to 38% and 43%, respectively.

By 2022, Pew found that 63% of Democrats regarded Republicans as more immoral than other Americans, while 72% of Republicans said the same about Democrats.

THINK ABOUT THAT.

We've moved beyond simply believing that the other party has bad policies.

Increasingly, Americans believe the people supporting those policies are themselves morally defective.

And that's an enormous difference.

Because when politics becomes a contest between people who merely disagree, compromise is possible.

When politics becomes a contest between people who believe their opponents are fundamentally immoral, compromise starts looking like betrayal.

WE STOPPED ARGUING ONLY ABOUT WHAT PEOPLE BELIEVE AND STARTED JUDGING WHAT KIND OF PEOPLE THEY ARE.

And I think modern progressive liberalism played a significant role in accelerating that transformation.

Now, I'm not arguing that classical liberalism, civil rights, or equal protection under the law are inherently destructive.

Those principles have contributed enormously to American political development.

I'm talking about the increasingly identity-centered framework within contemporary progressive politics.

The tendency to interpret political and economic disagreements primarily through categories of race, gender, sexuality, historical disadvantage, privilege, and group power.

Those categories can illuminate genuine inequalities and legitimate grievances.

But problems emerge when identity becomes the dominant framework through which nearly every political question is evaluated.

When the perceived identity of the person making an argument becomes more important than the argument itself.

When disagreement over policy is treated as evidence of prejudice.

When economic outcomes are evaluated primarily through group disparities without adequately examining productivity, incentives, institutions, or other contributing factors.

And when political legitimacy becomes tied to demonstrating allegiance to a particular moral or cultural identity.

THAT'S WHERE POLITICS STOPS BEING PRIMARILY ABOUT SOLVING PROBLEMS AND STARTS BECOMING ABOUT PROVING YOU BELONG TO THE RIGHT SIDE.

But here's what makes this even more concerning.

The influence didn't remain confined to progressive politics.

It spread across the political spectrum.

Conservatives increasingly organized around their own forms of cultural identity, religious identity, national identity, and opposition to progressive institutions.

Political parties became more than organizations advocating competing policies.

They became social identities.

Being a Democrat or Republican increasingly came to signify what cultural communities you belonged to, which institutions you trusted, what media you consumed, and what kinds of people you considered allies or adversaries.

And once that happened, political disagreement became personal.

POLITICS STOPPED BEING SOMETHING PEOPLE PARTICIPATED IN AND STARTED BECOMING SOMETHING PEOPLE IDENTIFIED AS.

That's an extraordinarily dangerous development for a country that depends on democratic compromise.

Because identity isn't evaluated the same way as policy.

A policy can fail.

An economic forecast can be wrong.

A military strategy can produce unintended consequences.

A government program can become fiscally unsustainable.

Those things can be measured, criticized, and corrected.

But when a policy becomes part of someone's political identity, admitting that it failed can feel like admitting that THEY failed.

And when a political party becomes part of someone's moral identity, criticizing that party can feel like a personal attack.

NOW WE HAVE A SYSTEM WHERE PEOPLE DEFEND POLICIES BECAUSE OF WHO PROPOSED THEM, NOT NECESSARILY BECAUSE THE POLICIES WORK.

And this is where identity politics begins contaminating other dimensions of political decision-making.

Look at economics.

Instead of consistently evaluating policies based on productivity, fiscal sustainability, incentive effects, and measurable outcomes, debates increasingly become arguments about which groups deserve resources and which groups are supposedly responsible for economic hardship.

Look at healthcare.

Instead of beginning with costs, administrative efficiency, access, quality, and financing, discussions frequently become moral contests over who cares about people and who supposedly doesn't.

Look at immigration.

Instead of consistently evaluating border security, labor-market effects, legal processes, humanitarian obligations, and enforcement capacity, the debate becomes entangled with competing accusations about national identity, compassion, prejudice, and loyalty.

Look at energy policy.

Instead of weighing reliability, affordability, environmental consequences, technological feasibility, and national security, energy choices increasingly become symbols of political allegiance.

And look at foreign policy.

Instead of asking whether a strategy credibly advances American security interests, politicians and voters often begin by asking which administration proposed it.

THE QUESTION BECOMES "WHOSE POLICY IS THIS?" INSTEAD OF "DOES THIS POLICY ACTUALLY WORK?"

And that's how political identity can spread into areas where the consequences are far more serious than cultural disagreement.

Because Russia doesn't care whether our deterrence strategy is progressive or conservative.

Iran doesn't care whether our nuclear policy appeals to Democrats or Republicans.

China doesn't care whether our industrial policy satisfies the cultural priorities of either party.

Our adversaries care about American capabilities, credibility, incentives, and willingness to act.

THEY RESPOND TO CONSEQUENCES, NOT OUR CLAIMS OF MORAL SUPERIORITY.

And I want to be clear about something.

Progressive identity politics did not single-handedly create American polarization.

Partisan sorting, ideological media, economic change, declining institutional trust, geographic divisions, and conservative identity movements all contributed.

But I believe the increasing tendency to moralize political disagreement through group identity helped normalize a particularly destructive way of thinking.

The assumption that political opponents aren't simply mistaken.

They're bad people.

And once that becomes the default assumption, what incentive is there to cooperate?

Why preserve a useful policy implemented by somebody you believe is morally illegitimate?

Why acknowledge that the opposing party made a good decision?

Why compromise when your political community might interpret compromise as surrender?

WHY THINK ABOUT WHAT'S BEST FOR THE COUNTRY WHEN YOUR POLITICAL IDENTITY DEMANDS THAT THE OTHER SIDE MUST LOSE?

And that brings us back to the contrast with earlier generations.

During World War II, Americans accepted extraordinary economic sacrifices to defeat the Axis powers.

During the Cold War, Republican and Democratic administrations sustained a broad strategic commitment despite enormous disagreements over implementation.

That doesn't mean those eras were politically harmonious.

They weren't.

There were fierce ideological conflicts, discrimination, political repression, protests, and serious disagreements about American foreign policy.

But the country demonstrated an ability to maintain certain long-term commitments despite those divisions.

Today, our political disagreements increasingly extend beyond policy into questions of identity, morality, and social belonging.

And I think that has made strategic continuity substantially more difficult.

Because once politics becomes an identity contest, the success of a policy can become less important than whether your side receives credit.

A Republican administration can pursue a policy that Democrats might otherwise support, and some Democrats will oppose it because of who proposed it.

A Democratic administration can pursue a policy that Republicans might otherwise support, and some Republicans will do the same.

THE OBJECTIVE BECOMES DEFEATING THE OPPOSITION, EVEN WHEN THAT MEANS UNDERMINING SOMETHING THAT COULD BENEFIT THE COUNTRY.

And the consequences don't disappear when the election ends.

National debt continues accumulating.

Military threats continue evolving.

Infrastructure continues deteriorating.

Economic decisions continue affecting investment.

International allies continue evaluating American credibility.

And geopolitical adversaries continue pursuing their objectives.

THE WORLD DOES NOT RESET EVERY FOUR YEARS JUST BECAUSE OUR GOVERNMENT DOES.

This is why I keep returning to the importance of long-term thinking.

Not every period of economic discomfort means a policy has failed.

Not every change in political leadership should require abandoning an existing national objective.

And not every disagreement over implementation needs to become a referendum on someone's morality.

Sometimes a policy is wrong and should be abandoned.

Sometimes a policy is correct but poorly executed.

Sometimes the costs are greater than anticipated.

And sometimes a legitimate objective requires sacrifices that won't produce immediate benefits.

The responsibility of voters and political leaders is to distinguish between those situations.

Not simply defend whatever their political identity demands.

GOOD POLICY DOESN'T BECOME BAD BECAUSE A REPUBLICAN PROPOSED IT.

BAD POLICY DOESN'T BECOME GOOD BECAUSE A DEMOCRAT PROPOSED IT.

And the reverse is equally true.

The legitimacy of a national objective should be determined by its consequences, feasibility, costs, and relationship to American interests.

Not by the political identity of the person advocating it.

That's the kind of thinking that allowed America to maintain long-term strategic commitments in the past.

And it's the kind of thinking we desperately need to recover.

Because here's the reality:

POLITICAL VICTORY AND NATIONAL SUCCESS ARE NOT THE SAME THING.

A party can win an election while the country loses strategic ground.

A president can gain popularity by promising immediate relief while creating enormous future obligations.

Voters can punish an incumbent without adequately considering whether the replacement offers a better long-term strategy.

And political movements can convince themselves they're morally superior while producing policies that fail to accomplish their stated objectives.

That's why morality alone is not enough.

Good intentions aren't enough.

Political identity isn't enough.

RESULTS MATTER. INCENTIVES MATTER. RESOURCES MATTER. CONSEQUENCES MATTER.

We need to recover the ability to evaluate policies independently of the people proposing them.

We need to distinguish disagreement from moral condemnation.

We need to stop treating every political opponent as an enemy.

And we need to recognize that the country's long-term interests are bigger than the cultural identities of its political parties.

Because the alternative is a political system increasingly incapable of sustaining anything beyond the next election.

A system where each administration spends its first years reversing the previous administration's priorities.

Where long-term investment becomes uncertain.

Where international commitments become less credible.

Where every disagreement becomes a cultural conflict.

And where political loyalty matters more than institutional competence.

WE USED TO ARGUE ABOUT HOW TO ACCOMPLISH NATIONAL OBJECTIVES. NOW WE ARGUE ABOUT WHETHER THE PEOPLE PROPOSING THEM ARE MORALLY ACCEPTABLE.

That is not progress.

That is a deterioration in our ability to govern ourselves effectively.

We spent decades containing Soviet expansion.

We invested enormous resources in defending European security.

We built alliances, institutions, and military capabilities intended to protect American interests across generations.

Yet when Russia renewed its territorial aggression, successive administrations struggled to establish effective deterrence.

And when confronted with Iran's nuclear program, we struggled to maintain a durable consensus over implementation despite broad agreement on the underlying objective.

These failures have multiple causes, and political polarization is only one of them.

But the growing inability to separate national strategy from partisan identity makes solving them harder.

WE CANNOT AFFORD TO MAKE EVERY NATIONAL OBJECTIVE A CASUALTY OF OUR DOMESTIC CULTURE WARS.

We don't need Americans to agree on everything.

We need them to recognize that disagreement doesn't automatically make someone immoral.

That compromise doesn't automatically mean surrender.

That sacrifice doesn't automatically mean failure.

And that the future of the country matters more than proving that your political tribe was right.

Because history doesn't care whether a policy was progressive or conservative.

It doesn't care whether Democrats or Republicans received the credit.

It cares about what actually happened.

What worked.

What failed.

What we sacrificed.

And what consequences we left for the generations that followed.

WE USED TO THINK IN GENERATIONS. NOW WE STRUGGLE TO THINK PAST THE NEXT ELECTION.

And perhaps the most dangerous part isn't that we've forgotten how to agree.

IT'S THAT WE'VE STARTED TREATING THE VERY IDEA OF AGREEING WITH OUR POLITICAL OPPONENTS AS A BETRAYAL OF WHO WE ARE.

Good Intentions Don't Pay the Bills: The Economic Reality Behind Socialism, Entitlement, and Short-Sighted Politics

 So they want to open the border, abolish ICE, expand government programs, and implement universal healthcare, potentially including illegal immigrants. My question is simple: HOW ARE THEY GOING TO PAY FOR ALL OF IT?

TAXES. That's how. And not just taxes on the rich. Not just the middle class. EVERYONE ends up bearing the economic burden one way or another, whether through income taxes, payroll taxes, consumption taxes, higher prices, or reduced purchasing power. You cannot continuously expand government obligations without somebody eventually paying for them.

And before someone brings up Europe, yes, I know European countries have universal healthcare. That doesn't mean implementing the same system here would automatically make healthcare cheaper, more efficient, or even function as intended. We already spend an enormous amount on healthcare, but higher spending doesn't prove that transferring more responsibility to the government would solve the underlying problems. Why not address the inefficiencies in our EXISTING system before assuming an entirely different financing structure is the answer?

People love pointing to European social programs without considering the full economic picture. Many European countries have substantial taxes on ordinary workers, including payroll contributions and consumption taxes. These programs aren't magically funded by taxing a handful of billionaires.

And America isn't Europe. We have enormous financial obligations that extend well beyond our borders. NATO, international defense commitments, military deployments, global security operations, and the responsibility of maintaining a military capable of projecting power worldwide. The United States has historically carried a disproportionate share of NATO defense spending. Those obligations cost money. A LOT of money.

I'm not saying Europe can only afford healthcare because America helps defend it. I'm saying we already have substantial responsibilities that must be funded alongside our domestic obligations. Adding another massive federal commitment without a credible financing plan means higher taxes, more borrowing, spending cuts elsewhere, or some combination of the three. And if the answer is to reduce our international defense commitments, then we need to acknowledge the potential consequences for global security.

THERE ARE TRADE-OFFS. THERE ARE ALWAYS TRADE-OFFS.

But apparently considering those trade-offs is too much to ask.

What frustrates me even more is how shortsighted people have become politically. People are experiencing economic discomfort, and instead of evaluating the long-term consequences of their decisions, they seem increasingly willing to vote based on whichever option promises immediate relief.

I'm not saying people struggling financially are irrational. I'm saying there's a difference between recognizing that life is difficult and actually thinking through what your decisions will mean three, five, or ten years down the road.

I anticipated economic stresses lasting several years and was willing to tolerate short-term discomfort if it meant achieving meaningful long-term objectives. That doesn't mean everyone has to agree with those objectives. But at least evaluate the consequences instead of assuming that voting differently automatically produces a better outcome.

People complain about gas prices, groceries, housing, and the cost of living, and those concerns are legitimate. But America still has tremendous economic advantages, including high productivity, innovation, and opportunities that much of the world doesn't enjoy. Those advantages didn't appear out of nowhere, and they aren't guaranteed to last.

One of the biggest problems with this country is that more and more people seem unwilling to think beyond their immediate circumstances. And this isn't exclusive to Democrats or Republicans. BOTH SIDES DO IT.

Now let's talk about socialism, because the historical ignorance surrounding this subject is astonishing.

People talk about socialism as though it's some revolutionary new solution that nobody has ever tried before. Have we forgotten the Soviet Union? East Germany? Maoist China? Cuba?

These aren't hypothetical examples. They're historical experiences.

Centralized socialist economies have repeatedly struggled with resource allocation, production incentives, shortages, bureaucratic inefficiency, and concentrated political power. In some cases, the consequences included catastrophic famine, repression, and economic collapse.

And China is one of the clearest examples of why economic incentives matter. Beginning in 1978, China gradually introduced market-oriented reforms, expanded opportunities for private enterprise, liberalized trade, and reduced centralized control over portions of its economy. What happened? Decades of extraordinary economic growth and hundreds of millions of people escaping extreme poverty.

According to the World Bank, nearly 800 million people were lifted out of extreme poverty during China's reform era.

Think about that. One of the most significant poverty reductions in human history followed a shift AWAY from rigid central planning and TOWARD market incentives.

And people still want to argue that concentrating more economic decision-making in the hands of government is inherently progress?

Capitalism isn't perfect. Nobody with a serious understanding of economics should claim it is. But market competition, private ownership, entrepreneurship, and profit incentives have demonstrated an extraordinary capacity to generate wealth, encourage innovation, and improve living standards.

Socialism's historical record of comprehensive central planning is nowhere near as convincing.

And before somebody points to Denmark, Sweden, or Norway, those countries are not Soviet-style socialist economies. They have private businesses, market competition, private property, and functioning capitalist markets. Their extensive social programs operate on top of productive market economies.

THAT IS THE POINT.

Redistribution doesn't independently create the wealth being redistributed. A social program needs an underlying productive economy capable of supporting it. You can redistribute existing resources, but you cannot redistribute resources that haven't been produced.

People have become so comfortable with the prosperity generated by capitalism that some seem to have forgotten what makes that prosperity possible in the first place.

And then there's the argument about fairness and morality.

Everyone wants to talk about what's "fair." Everyone wants to claim the moral high ground. But saying something is morally desirable doesn't make it economically sustainable.

MORALS DO NOT ELIMINATE RESOURCE SCARCITY.

Resources are finite. Human capabilities differ. Productivity differs. People's motivations, priorities, and willingness to contribute differ. These are realities that no amount of moral posturing can erase.

Take the socialist principle: "From each according to his ability, to each according to his needs."

Sounds wonderful, doesn't it?

But think about what that actually means.

You're asking people with greater abilities or productive capacity to contribute according to what they can produce while distributing resources according to what others need.

Now explain how you preserve incentives when the relationship between contribution and reward becomes increasingly disconnected.

Why should somebody spend years developing specialized skills, take substantial financial risks, build a business, or work significantly harder if the additional rewards for doing so keep shrinking?

Of course people can be motivated by more than money. But pretending financial incentives don't matter is ridiculous.

Americans are ALREADY frustrated because they feel they're working harder just to maintain their standard of living. People already question whether additional effort is worth the sacrifice. So why would we want policies that risk weakening the relationship between productivity and reward even further?

If the reward for additional effort diminishes enough, some people will stop making that effort. Investment becomes less attractive. Entrepreneurship becomes less rewarding. Productivity and innovation can suffer.

And when productivity suffers, the consequences don't stop with the wealthy. They spread through the entire economy.

Less production means fewer resources available to distribute. Less innovation means fewer improvements in living standards. Slower growth means a smaller economic base from which to fund the very social programs people want expanded.

YOU CANNOT SUSTAINABLY DISTRIBUTE MORE THAN YOUR ECONOMY CAN SUPPORT.

Then there's corruption.

Of course corruption exists in capitalism. I'm not arguing otherwise. The 2008 financial crisis demonstrated how poor risk management, misaligned incentives, excessive leverage, and failures of oversight can create enormous systemic consequences.

But that doesn't invalidate capitalism as an economic system. It demonstrates the importance of accountability, proper risk assessment, and preventing institutions from transferring the consequences of their reckless decisions onto everyone else.

My concern with socialism is the concentration of economic power.

In a decentralized market economy, businesses and institutions make independent decisions. Failure in one part of the economy can certainly spread, especially in interconnected sectors like finance, but there are also competing firms, alternative suppliers, and mechanisms for reallocating resources.

Now imagine a system where government controls a substantially larger share of production, distribution, and economic decision-making.

What happens when corruption occurs at the center of THAT system?

The potential consequences are enormous because the same institution responsible for distributing resources also exercises tremendous influence over who receives them, how much they receive, and under what conditions.

And we've already seen how fraud can exploit publicly funded programs here in America, including healthcare billing schemes, nursing home fraud, and childcare assistance fraud. Those examples don't establish that every government program is corrupt, but they demonstrate why oversight matters when enormous sums of public money are involved.

The greater the concentration of resources and decision-making authority, the greater the potential damage when those institutions fail or become corrupt.

And this is before considering one of the most consistent problems throughout human history: POWER ATTRACTS PEOPLE WHO WILL ABUSE IT.

Why would anybody assume that concentrating more economic authority in government somehow eliminates human greed, self-interest, incompetence, or corruption?

It doesn't.

It can simply change who has the power to exploit everyone else.

And that's ultimately what bothers me about these political arguments. People focus almost entirely on the benefits they're being promised while giving nowhere near enough consideration to the systems required to deliver those benefits.

Universal healthcare sounds nice. Free education sounds nice. Expanded benefits sound nice. Greater economic equality sounds nice.

But HOW MUCH DOES IT COST?

WHO PAYS?

WHAT ARE THE INCENTIVES?

WHAT HAPPENS WHEN FUNDING FALLS SHORT?

WHAT HAPPENS WHEN THE PEOPLE ADMINISTERING THESE PROGRAMS ARE INCOMPETENT OR CORRUPT?

WHAT HAPPENS TO THE PRODUCTIVE ECONOMY SUPPORTING ALL OF IT?

And perhaps most importantly, WHAT HAPPENS TEN OR TWENTY YEARS FROM NOW?

Those aren't unreasonable questions. They're the questions that should be answered BEFORE committing an entire country to major economic changes.

I'm not arguing that every government program is inherently bad or that capitalism is incapable of producing problems. I'm arguing that expanding government responsibility is not automatically a solution, and the burden of proving that an intervention will produce benefits greater than its costs belongs to the people proposing it.

The government cannot legislate away scarcity. It cannot manufacture unlimited resources through redistribution. And it cannot eliminate the fundamental economic reality that prosperity requires productivity.

People seem increasingly concerned with dividing the pie while paying less attention to what makes the pie grow in the first place.

And the irony is that the people who stand to suffer most from long-term economic stagnation are often the very people these policies are supposedly intended to help.

Capitalism has produced extraordinary prosperity, not because human beings suddenly became morally superior, but because it creates mechanisms that align individual incentives with productive activity, competition, and innovation.

That's not a guarantee that every market outcome is good. It's a recognition that incentives matter, scarcity matters, and decentralized decision-making matters.

We should be improving the system that generates prosperity, correcting identifiable failures, and demanding accountability where intervention is necessary.

Not assuming that every problem can be solved by expanding government obligations and sending somebody else the bill.

GOOD INTENTIONS ARE NOT AN ECONOMIC PLAN. MORAL SUPERIORITY IS NOT A FUNDING MECHANISM. AND IGNORING CONSEQUENCES DOESN'T MAKE THEM DISAPPEAR.

At some point, people need to stop asking only what they want the government to provide and start asking what it will cost, what they're willing to sacrifice, and whether the policies they're supporting will leave the country better or worse off in the long run.

Tuesday, October 20, 2026

Lost Liberalism

   Somehow, we convinced ourselves that their initial demands were harmless, reasonable, or even morally righteous. A little censorship here: "Yeah, those words are offensive. Let's bleep them out or ban them altogether." A sprinkle of cancel culture there: "Yeah, that comedian was spreading hate. Pull their contract. Cancel their show." Then came the ever-expanding obsession with identity politics: "Yeah, they're a woman if they say they're a woman, and questioning that is hateful."

And so we conformed. Not necessarily because we agreed, not because the arguments were sound, and certainly not because the evidence was overwhelming, but because we feared the labels they'd attach to us if we dared to disagree.

Bigot. Racist. Nazi. Fascist. Sexist. Islamophobe.

These words became weapons of social coercion, wielded not necessarily to defeat arguments but to discourage people from making them in the first place. Rather than defend our principles, we surrendered them incrementally, convincing ourselves that each concession was too insignificant to warrant a fight. We traded intellectual honesty for social acceptance, rational skepticism for moral appeasement, and the freedom to question for the comfort of conformity.

But we were afraid of the wrong things.

We feared being called intolerant when we should have feared the erosion of intellectual freedom. We feared offending sensibilities when we should have feared the abandonment of scientific rigor. We feared social rejection when we should have feared the institutionalization of falsehoods. And above all, we feared being perceived as morally deficient when we should have feared the long-term consequences of allowing ideological conformity to supersede objective reality.

Because the danger was never merely any single concession. It was the precedent each concession established. What began as a request for tolerance became an expectation of affirmation. What began as an appeal for compassion became a demand for ideological obedience. What began as an effort to protect people from genuine harm increasingly became an effort to protect beliefs from scrutiny.

And each time we conceded, the boundaries shifted. Yesterday's controversy became today's orthodoxy, and yesterday's reasonable disagreement became today's unacceptable dissent.

This is the self-perpetuating nature of the woke mind virus: an ideology that increasingly treats its own moral convictions as unquestionable truths, then uses those convictions to justify suppressing the very criticism that might expose its flaws. It thrives not necessarily because its arguments are stronger, but because challenging them has become socially, professionally, and sometimes institutionally costly.

And at the center of it all is suicidal empathy: compassion so detached from reason, consequences, and self-preservation that it becomes destructive to the very society exercising it. An insistence on appearing compassionate, regardless of whether the policies being defended actually produce compassionate outcomes. A willingness to sacrifice long-standing institutions, freedoms, and social cohesion in pursuit of moral ideals whose practical consequences are treated as secondary, if they're considered at all.

Look at Europe, where I believe we're already witnessing the consequences of this mentality, and ask ourselves whether we're truly so exceptional that the same ideological failures couldn't take root here. Are we going to recognize the warning signs, or are we going to keep rationalizing each concession until the cumulative damage becomes impossible to ignore?

Then there are those who enthusiastically advocate socialism, or any of its countless denominations, seemingly without the slightest recollection of the historical failures, economic trade-offs, and institutional realities associated with the systems they champion.

And when confronted with those failures, what comes next? The Nordic countries, of course.

"Look at Scandinavia! Look at their healthcare! Look at their social safety nets!"

As though pointing to a handful of prosperous nations settles the argument. As though those countries exist in an economic vacuum, completely detached from the global markets, geopolitical arrangements, historical circumstances, and institutional foundations that made their prosperity possible. As though their market-driven economies, private enterprises, fiscal constraints, and dependence on international trade are somehow irrelevant to the discussion.

They praise the outcomes without adequately understanding the mechanisms. They admire the benefits without fully accounting for the costs. They point to the Nordic model while overlooking the broader economic order in which it operates, including the enormous influence of the United States and the advantages afforded by American economic and geopolitical power.

And somehow, this superficial understanding is presented as intellectual sophistication.

That's perhaps the most infuriating part of all.

These people behave as though they've figured everything out. As though history has nothing left to teach them. As though economics is merely an obstacle to be overcome by sufficient political will. As though human behavior, incentives, scarcity, unintended consequences, and institutional limitations can simply be wished away by declaring their intentions morally superior.

Their confidence is extraordinary, especially considering how little of the underlying complexity they often seem willing to acknowledge.

They mistake moral conviction for factual correctness. They mistake compassion for wisdom. They mistake ideological consistency for intellectual rigor. And perhaps most dangerously, they mistake their inability to comprehend opposing arguments for proof that those arguments have no merit.

They approach complex societal problems with an almost religious certainty in their own moral superiority, armed with just enough knowledge to believe themselves enlightened, but not enough humility to recognize the enormous gaps in their understanding.

They scratch the surface of an issue and convince themselves they've reached its foundational bedrock.

And from that shallow foundation, they presume the authority to lecture everyone else about morality, justice, economics, science, and the proper organization of society.

Yet the moment someone questions their premises, challenges their conclusions, or demands evidence beyond moral platitudes, the discussion so often retreats into accusations, labels, and emotional appeals.

Because when your worldview is built upon the assumption of your own moral infallibility, disagreement isn't merely an intellectual challenge. It becomes a moral transgression.

And that's precisely where the danger lies.

A society cannot sustain meaningful intellectual progress when questioning prevailing ideas is treated as evidence of moral corruption. Science cannot flourish when conclusions are determined by ideological acceptability rather than empirical scrutiny. Democracy cannot function as intended when citizens are pressured into professing beliefs they do not hold. And compassion cannot remain virtuous when its consequences are exempted from rational evaluation.

Good intentions do not guarantee good outcomes. Moral superiority does not establish factual superiority. And empathy, however sincere, does not absolve anyone of responsibility for the consequences of their beliefs.

We should have understood this from the beginning.

Instead, we allowed ourselves to be intimidated into conformity, one seemingly harmless concession at a time. We prioritized avoiding offensive labels over defending the principles that made open inquiry, individual liberty, and intellectual disagreement possible in the first place.

And now we're left confronting a question that should have been obvious long before we reached this point:

What good is a society's compassion if, in the name of exercising it, that society gradually destroys its own capacity to distinguish truth from falsehood, reason from emotion, and genuine progress from ideological self-destruction?


Given my political stance, rooted in classical liberalism, libertarian principles, and conservative pragmatism, it genuinely saddens me to see how far we've drifted from the very principles that made liberal society worth defending in the first place.

I believe in individual liberty, particularly negative freedoms: the freedom to speak, to think, to associate, to disagree, and to live without unnecessary interference from the state or the collective. I believe in a small but powerful government, one whose authority is limited in scope but effective in carrying out its legitimate responsibilities. A government that protects individual rights, upholds the rule of law, maintains national sovereignty, and intervenes where demonstrable harm warrants intervention, rather than attempting to regulate every perceived injustice, discomfort, or subjective grievance.

And I believe in a society where tolerance means allowing others to live differently, not demanding that everyone affirm the same beliefs.

That's an important distinction we've increasingly lost.

I don't have to agree with someone's lifestyle to respect their right to live it. I don't have to approve of someone's opinions to defend their right to express them. I don't have to embrace someone's ideology to recognize their individual liberties. And they, in turn, should not be required to embrace mine.

Tolerance is not agreement. Acceptance is not affirmation. And disagreement is not inherently hatred.

Yet somehow, we've allowed these distinctions to become blurred. We've increasingly entertained the notion that respecting someone's freedom requires validating their beliefs, that compassion requires ideological conformity, and that refusing to affirm a subjective claim is equivalent to denying someone's humanity.

But that's not the liberalism I believe in.

The liberalism I believe in protects the individual's right to be wrong, unpopular, offensive, unconventional, or simply different. It doesn't demand ideological uniformity as the price of participating in society. It recognizes that the same freedoms protecting the people I agree with must also protect those whose beliefs I find objectionable.

Because a freedom that exists only for those who hold socially acceptable opinions isn't much of a freedom at all. It's a privilege granted conditionally by whoever happens to control the prevailing moral consensus.

And privileges can be revoked.

What saddens me further is that so much of this appears to be justified in the name of progress, compassion, and equality, concepts that aren't inherently objectionable. But somewhere along the way, we've begun confusing equality before the law with equality of outcomes, tolerance with compulsory affirmation, and the protection of individual rights with the accommodation of every subjective grievance.

These are not interchangeable principles.

Equality before the law establishes a common standard under which individuals are treated as equals. Equality of outcomes, when pursued through coercive means, can require treating individuals differently to produce predetermined results. Compassion can motivate us to help those in need, but it cannot eliminate scarcity, economic trade-offs, or the unintended consequences of the policies we enact.

I support a social safety net that catches people when they fall and gives them an opportunity to recover. I do not believe that compassion obligates us to construct an ever-expanding system of dependency or that the existence of hardship automatically justifies expanding government authority.

There is a difference between helping someone regain their independence and constructing institutions that make independence increasingly difficult to achieve.

Likewise, I believe free markets, private property, voluntary exchange, and individual initiative are fundamental to a prosperous society. Not because markets are infallible, but because economic systems must contend with scarcity, incentives, dispersed knowledge, and human behavior. These realities do not disappear simply because someone's political intentions are benevolent.

And when markets fail, as they sometimes do, the appropriate response should be grounded in evidence, proportionality, and an understanding of the consequences of intervention, not an automatic presumption that greater centralized authority is the solution.

My political philosophy is not built on the assumption that government is inherently evil or that every regulation is illegitimate. It is built on the recognition that coercive authority carries consequences and therefore demands justification. The burden should fall on those seeking to restrict liberty, not on individuals to continually justify why they deserve to retain it.

And that burden should not be satisfied merely by invoking compassion, offense, equity, or the supposed moral righteousness of an objective. It should require a defensible purpose, a rational connection between the means and the ends, and evidence that the intervention is proportionate to the harm it seeks to prevent.

This is why I find the growing reliance on subjective offense as a basis for restricting behavior so troubling.

Subjective experiences are real to the individuals experiencing them, but that doesn't automatically make every subjective grievance a legitimate foundation for coercive public policy. The fact that someone finds speech offensive does not, by itself, establish that the speech causes an objectively demonstrable harm sufficient to justify restricting it.

If we're going to limit individual liberty, we should at least be capable of articulating a consistent, evidence-based standard for doing so.

Otherwise, what prevents the next person from demanding that their own discomfort be accommodated at someone else's expense? What prevents the expansion of restrictions from genuinely harmful conduct to merely unpopular conduct, and eventually to conduct that simply contradicts the preferences of those in authority?

The problem isn't that distinctions cannot be made. The problem is what happens when we abandon the obligation to make those distinctions objectively and consistently.

And perhaps that's what disappoints me most.

I don't expect everyone to share my political philosophy. In fact, the very principles I defend require me to accept that they won't. I expect disagreement. I welcome criticism. I recognize that my own beliefs are neither infallible nor immune to scrutiny.

But I expect the same intellectual humility from those who presume to tell the rest of society how it ought to function.

I expect arguments to be defended rather than dissenters demonized. I expect policies to be evaluated by their consequences rather than the moral intentions of their advocates. I expect scientific claims to withstand empirical scrutiny, economic proposals to account for real-world constraints, and political institutions to respect the boundaries of their legitimate authority.

And above all, I expect a society that calls itself liberal to understand why individual liberty must remain protected even when exercising that liberty produces opinions, expressions, or choices that others find objectionable.

What makes this especially disheartening is that I don't believe these expectations are particularly radical. Freedom of expression, equality before the law, due process, intellectual inquiry, and limitations on arbitrary authority are foundational principles of the liberal tradition.

Yet defending them can increasingly feel like an act of political defiance rather than an affirmation of principles that should transcend partisan allegiance.

I don't want a society governed by the ideological absolutism of the left any more than I want one governed by the ideological absolutism of the right. I don't want the state enforcing progressive orthodoxy, conservative morality, or any other comprehensive worldview upon individuals who do not share it.

I want a society capable of distinguishing disagreement from aggression, discomfort from harm, compassion from coercion, and moral conviction from objective truth.

A society confident enough in its principles to tolerate dissent, humble enough to question its assumptions, and rational enough to recognize that good intentions are not substitutes for good judgment.

Because the greatest tragedy wouldn't simply be that one political movement prevailed over another.

It would be that, in our desperation to appear compassionate, enlightened, and morally righteous, we gradually abandoned the very freedoms, institutions, and intellectual disciplines that made genuine progress possible.

And we did so not necessarily because we were forced to, but because we were too afraid to say no.

I don't fear a society in which people disagree with me. I fear a society in which people are no longer free to disagree, or have become too intimidated to exercise that freedom.

And if defending that distinction has somehow become controversial, then perhaps the problem isn't that classical liberal principles have become outdated.

Perhaps it's that we've forgotten why they mattered in the first place.

Thursday, September 11, 2025

VSCode + LMStudio via Continue

LM Studio

Download LM Studio: https://lmstudio.ai/


Search for a Model:

Download a Model (lets use OpenAi's open source model):

Enable local api and host the model:

Config our model (maybe increase the context length, GPU offloading, flash attention, etc) and load it:


Once its done loading the model successfully you should see something like this (copy down the loaded model name, we need it later):


We're all done with the LM Studio side of things.

VsCode

Download and install VsCode: https://code.visualstudio.com/


Go to Extensions and install the "continue" extension:


Click on the "Continue" button at the bottom right of the window and then click "Open Settings":


Click on "Agents" then "Local Agent", a "config.yaml" will open in the editor:



Add an entry for the OpenAi model we loaded in LM Studio (im loading the bigger 120b version here), and any roles you want it to have:


(snippet):
  - name: OpenAi (LM Studio)
    provider: lmstudio
    model: openai/gpt-oss-120b
    apiBase: http://192.168.1.254:1234/v1
    roles:
      - chat
      - edit
      - apply
      - autocomplete
      - embed

Save the "config.yaml" file (ctrl+s)

Go to "Models" and select OpenAi as the option for which features you want to enable with it (and additional options if you want):


Now that you've configured everything lets give it a try. Click on the bottom right "Continue" button again and click "Open Chat". A new window should come up for you to prompt in. Make sure the model selected is our LM Studio hosted model:



Let see if it can generate us a function in python for calculating the area of a triangle:


And it should work like so:



Friday, July 8, 2022

My First Ever Coding Job Interview

    Now I've worked for a couple companies already which required me to code but believe it or not none of them gave me coding interviews. I basically was thrown into the position and expected to catch up/learn what I had to and just work. Well here is my first ever coding interview and honestly I think I did horrible lol. The interview started off great, the interviewer introduced herself (who she was and how long she has been at the company), very nice person. It was then my turn to introduce myself a bit and I said my name and how I am passionate about code, and solving problems through programming. I don't remember the order of things but I will try to recall as best I can from this point. I believe she then asked me about scenarios on linux and wanted me to tell her what linux commands I would use to solve the scenario. I have linux on my resume but that was supposed to mean that I used linux and can navigate it, I didn't expect to have to remember commands for it, I mean I don't remember all the commands for windows (my daily driver). I guess its time I practice those commands for the future. Anyways now onto the part that I should've been good at.

    The question was very simple (though it wasn't immediately obvious to me because I overthought it). Return the number of days between two dates. The template code she had up was in python and while I don't code in python in my day to day, I've learned it enough through porting code etc to understand it. I then asked if I had to write the solution in python or java, to which she replied I can use any language. C# being my favorite language at the moment was what I chose. Opened Visual studio, created a new .Net 6 project and the first thing I did was recreate the class she had in her python example, no biggie. Afterwards I wrote the beginnings of what would be the GetDifference() method which is what the name of method for the solution was expected to be. Now having dealt with time in the past and all the time zone related stuff I immediately overthought the complexity of the problem. This didn't require time-zones etc but for some reason that idea stuck with me, I didn't realize it immediately, and I began to break even more than I already am. I thought, there is no way she is asking me to calculate date time accurately from scratch right? I asked... "Can I assume that months are exactly 30 days?". She (to my relief) replied yes. I thought "Oh, this should be easy now". I started to code, adding constants for the number of days in a month and months in a year so I can refer to them by name later if need be. This is around the time I realized that non of my questions had any relevance because we weren't dealing with time-zones, shoot we weren't even dealing with time, just dates. While this should make me feel better because the problem isn't as complicated as I had misunderstood it to be (to clarify this is entire my fault, I guess I was going into this expecting a much more complicated problem) but instead this error caused my mind to race. I glance over to her stream, she looked bored of it all (might have been my imagination), I had decided to say what I was doing. In hindsight I guess that was a good decision because talking to myself made me calm down a bit. Unfortunately that wasn't going to last for long. I finished my code, at this point I don't even know what logic I had just laid down, I run the program and immediately I get an error. Red everywhere, I have a micro freak-out to myself. Okay its not so bad. I fix it, this time it actually compiles, but it gives the wrong answer. I'm thinking "I Flopped, there's no recovering from this". She lets me know that the months don't have the same number of days. I thought to myself, "didn't you just say that I can assume that the months have 30 days?", maybe I was hearing things before. I go back to my code, the short little code I had written not long ago, seemed daunting and alien to me. I changed up the design, looking up how many days there were in each month and how many days are in Feb on leap years. I didn't know what I was even doing anymore. I somehow manage to focus on the array I had made to keep count of the number of days per month and from there I was able to focus a bit more on the flow of the code. My answer was off by about double, so I told myself it has to be the loop which counts the days for a year. I go to the loop and I see a potential issue, I added the "- 1". At this point I'm numb, I speak... "I don't know if this will work until i try it I guess", shoot... I didn't mean to say that out loud, I paused for the split second from the awkwardness. I click run, okay it compiles, and to my surprise the result was.... WRONG. I thought "Just kill me", if I cant even write a program to solve this easy problem, then how are they going to believe I have any competence in coding and solving problems. Sorry to say but at this point I had no energy, I was drained and I honestly didn't know where to even start debugging because my mind was in another universe. I was defeated. The defeat I had would be solidified as the interviewer said "its okay, you dont have to get the exact answer". I knew that because the number of days was indeed deterministic there should be no excuse why I couldn't provide the correct exact number. I was maybe 2 weeks off but because of the properties I just stated, that might as well be infinitely wrong.

    We ended the interview on a good note (or just my wish) with smiles although her smile might have been my imagination (she is nice and I was still in lala-land), but my smile was one which took effort to put on. I was a failure, there was nothing I could smile about. I look at my phone, and told my friends about the interview and how I felt about it. Some tried to cheer me up, some jokingly made fun of me, and of course some couldn't care less (these guys help me snap back to reality). I then sat there for a bit thinking about the interview and then tried telling myself "well the problem isn't solved until its solved". I hopped back on visual studios and proceeded to read my code. It's unbelievable how much more clear everything is when anxiety isn't tugging on your heart strings. I had made several mistakes and these where easily spotted if I had just read the code properly. In the ported code, the constructor takes 3 parameters which were day, month, year, in that order and all ints. When I went to create them in "program.cs" I had incorrectly used the wrong format of month, day, year. The dates I put there were probably wrong to begin with since I was dazed as all heck when she was reading them to me. The other issue I found was that the calculation for adding days to the total tally for a year was wrong. I fixed that as well and used https://www.timeanddate.com/date/duration.html to check my answers, each time with different dates. This all took no time at all and yet I couldn't do it during the interview. I thought I'd at least push it up to my git to add to my portfolio lol, for what its worth. I still have an in person interview tomorrow so I really hope I do better there.

ADDED: I forgot that during the coding portion she also pointed at the keyword "internal" and asked what it was for. I didn't really know what she was asking so I replied with "I can turn it to public if you want", I proceeded to change internal to public. She further explained that she wanted to know what it was and what its used for. I told her that it was an access modifier and that it used to let the the rest of the program see the class and its members. Now thinking back on it, maybe that was too simplistic of an explanation? darn it, I did horrible on that whole interview.

IN-PERSON:

    Now the drive there was pretty uneventful but as I got closer and closer to my destination, I can feel my heart rate quicken. I followed the instructions on the email I got for parking and parked the car. I started walking up the hill, with every step I realized more and more where I was. This was not some small startup, I was reminded that this is a big established company. I walk into the building and tell the front desk that I'm there for the interview. I sit and wait in the lobby, and I am dazed, I'm staring out the front window thinking "I can't believe I'm here". My interviewer introduced himself and I immediately missed his name, I reactively ask for his name again and then told him my name. I get my visitor
s sticker and I follow him. We reached the elevators and we got in. Yup just me and him in the elevator, I need to relax, so I breathe deeply but slowly. He breaks the silence by asking me how I pronounced my name, I told him its like saying the letters 'T' and 'N' and furthered it by saying I tell people that if they've watched DragonBall Z its just like the character Tien. Unfortunately he hasn't seen the show so I just reaffirmed that its just the letters 'T' and 'N'. We walk and entered a corner room. Two of the walls were glass and the other two were what seemed to be white boards. He further introduced himself and basically what they do there. I remember thinking this is some official shiz lol. I was then asked to give more of an in depth introduction about myself. I said I was passionate about coding, and I like making tools for people, and my hobby is coding to ultimately get better and learn new things etc. We proceed to talk about my reasons for leaving my previous place of employment and explaining the gap. He then explained to me that not everything there was going to be orderly and optimal and that it isn't going to go my way. I completely understood and thought it was perfectly reasonable. I guess I came off as if I left the old place because they didn't do things perfectly. I hope I reassured him that isn't the case. He was very level with me and honestly great to converse with. We also talked about teamwork and agile. I told him that at my old workplace we did agile but I wasn't too sure if it was what we actually did. By the end of the interview I essentially told him my strengths and weaknesses. I also asked a couple questions like "with the conversation we had thus far, how do you think I fare". He said he saw some of my code on GitHub but unfortunately he didn't look at one I had hoped people would look at which at the moment is BijouDB. I mean the one he looked at wasn't really bad I think but I don't think it is as impressive. Id like to get along with this interviewer seeing as potentially he would be my Lead but also to pick his brain and learn things lol.

Wednesday, March 23, 2022

Photino on Net 6

Photino is a way to develop cross platform applications utilizing web technologies. There is a .Net wrapper for it but it doesn't yet support Net 6 as of writing this, or does it lol. Here is a working snippet for their .Net sample project running on Net 6.

Friday, August 6, 2021

Making a virtual multi-tap using ViGEm/ViGEm.NET

Update 1/24/2022: Updated the download, includes the required but missing file this time, also fixed some bugs which prevents the addition of new controllers.

    So my brother has been playing a game on PCSX2 and its a multiplayer game and he asked me if I could make a program which acts as basically a virtual controller that mimics the actions of the physical controller. Now receiving controller inputs I was familiar with through DirectInput and XInput but simulating/emulating a controller is something I haven't a clue about but I know we have lots of talented people so I did some research. Now I am mainly a C# developer these days so I specifically researched on that front. Sure enough there is a driver for simulating/emulating a controller called ViGEm and even a .net wrapper called ViGEm.NET. With this in hand I did some tests and after all test passing, I proceeded to ask my brother the specifications he would like for the program and off I went. With the driver and wrapper it was easy functionality-wise but most of the work went into handling the mappings and conversions to a DualShock4. Weirdly enough the XBox360 controller emulation didn't work. I went into the discord channel for ViGEm and asked around and they couldn't figure out why either but that was fine, dualshock4 will do.

So I made this:
https://mega.nz/file/7FhWADTZ#mC76AbApajA6TSFJ0mIo3Zvq2k6yEhzJmhX3Epg6Phk

I'll number each step I mention here as a comment in the source here:
https://github.com/TizzyT566/VirtualMultitap

0) This step isn't going to be in the source code but you have to install the ViGEm.NET package which can be found here:
https://www.nuget.org/packages/Nefarius.ViGEm.Client/
Another thing is we have to specify useLegacyV2RuntimeActivationPolicy="true" in the App.config file. Finally you have to have the driver installed which can be obtained here:
https://github.com/ViGEm/ViGEmBus

1) I want to ask the user how many virtual controllers they want, since my brother only asked for up to 4 players thats what I did.

2) Now that I know how many controllers the user wants, we can leave that info for later, we'll come back to it, the first controller related step is to get user inputs for a single controller which will control the virtual controllers. We can do that via Manager.GetDevices(DeviceClass.GameControl, EnumDevicesFlags.AttachedOnly). We specify that we only want to get GameControllers that are currently attached. Each device has a device id which is represented by a guid. We can populate a list of these guids to query these controllers later.

3) Lets actually make some virtual controllers now. We first create an instance of the ViGEmClient so we can use it to make the controllers. The number we stored in step 1 will be used to create 2 arrays. One array to store the actual virtual controllers and a second to represent active ones. We want to be able to specify which of the 4 or even all of them to be active on the fly.

4) Now getting back to that list of device guids. We need to be able to single out a master controller for the virtual controllers.

4.1) We are only given the device guids so we cant really tell which device is which unless you memorized the guids. Even then because windows is wonky handing out these ids you'll never be able to distinguish any 2 controllers reliably. So there must be a method to detect which controller you want instead of selecting from a list. In this case I made it so that if the user selects 0, it would go into a sort of detection mode where the user physically presses a button on the controller they want to act as the master controller. To do that we create an array of devices and populate it with aquired devices using the guids from the list we created earlier. We have to make sure to se the data that comes back from the device be joystick data. Then we loop through the device array over and over again until one of the controllers DPad or buttons are pressed, and we make note of that device, setting it to a variable. To clean up we iterate over the device array one last time to Unacquire all the controllers we arent using.

4.2) If the user selects an option other than 0, the first thing we need to do is decrement the selected option by 1 since 0 was taking the place for Detecting a controller in step 4.1. We then initialize a Device using the selected guid. We set the dataformat and acquire it and make note of it just like in step 4.1.

5) Now that we have the master controller established we need to deal with the mappings. I decided to store the mappings in the Documents\Virtual Multitap folder. If the folder doesn't exist yet, we create it. We construct the mapping's full file path using the guid. The JoyStickState structure doesn't correlate directly with how the DualShock4 is mapped in ViGEm so I just associated one mapping to another using indexes. We loop over and over again for each input for a DualShock4 controller, mapping all buttons, sliders, axises, and the viewpoint (aka DPad). Finally I save the mapping with each dualshock4 input on a separate line in Document\Virtual Multitap\<guid>.

6) We now load the mapping we just made or load one if one already exists for that device guid.

7) The last thing to do in our routine is to kick off a loop to listen for keyboard presses and events on the physical controller and simulate them on the virtual controller. I don't use a regular loop, instead I use a SpinWait(). This allows the loop to process relatively fast while not hogging a bunch of CPU.

Friday, November 13, 2020

Mouse Speed Profiler

UPDATE 1.1: Previous versions lost profiles because the mouse ids would change upon system restarts etc. That has hopefully been resolved with this version. Download link updated.

    
So I work from home or more recently at a friends house. I use my friends computer to get work done but he has multiple mice, and they are all set to different DPI settings and every time I use one or the other I have to go into the mouse control panel, and adjust the cursor speed setting so that its comfortable. I decided it would be some what fun and useful if I made a program to automate the process either entirely or as much as possible. I had an idea which later turned out not to work. I was originally going to poll the mice with DirectX and using their DeviceInstance GUIDs. But I couldn't distinguish the mice from each other. What ever I did I could not associate mouse data separately. I went to researching, It turns out that since DirectX 9.0 Microsoft has pulled the plug on unique mouse and keyboard instances. All mice are merged together into one GUID and that's that, same with Keyboard it seem (haven't tested but was mentioned). So I thought, lets go the RawInput route, I hated this route as this wouldn't allow me to Poll anymore from a console application. Not only was RawInput a pain in the ass to get working properly, it didn't seem like anyone really had any real examples online on how to go about doing it. People seemed to always be very vague like, "you need a window, have the window register for rawinputs", I'm over here think "is there any chance I can make DirectX work" but no I finally found some sample code which semi worked. The code sometimes worked... well rarely worked, more times then not it would crash the program and this is the demo program the author made. The crash wasn't normal either, no error messages, codes or anything, it simply just closed the program. So I went to troubleshooting and debugging. Voila!!! now that I can distinguish between multiple mice, I can now work on getting and setting the windows mouse speed setting. This wasn't so bad, some MSDN C++ docs and P/Invokes later and it was all done. Finally I have to turn these functionalities into an application.

    When the program runs, it loads a "speed.prf" file (if it exists) which stores any mouse profiles. While its running and becomes focused (via Alt+Tab) you can switch to which ever mouse you want to use. A new mouse window will popup if a new mouse has been detected. You give the mouse profile a name (the mouse id is used as default), and you set what you want the windows mouse speed to be and click save; while you are moving the slider the mouse speed is set accordingly as well. You can then do the same with another mouse, etc. Now the next time you want to switch mice, you Alt+Tab to the profiler, and just start using the mouse you want.

DOWNLOAD:
https://mega.nz/file/rFow1b4S#qUNEYFMNhKf-3wqbML9bawgAxF9VOvUtin3fdDBpDo4

Wednesday, July 8, 2020

A very basic Sudoku game

   Here is a Sudoku game I made a long time ago, going through my old projects I came across it and I thought why not put this up on my blog since I haven't posted anything in a while anyways. I might come back to this but writing it from scratch since this was written in vb.net and I have since moved mostly to C# with that maybe new features etc.

DOWNLOAD: https://mega.nz/file/jZ4DWQQK#xrQgbgHqIbsNs0VEnYeMfgbAomof8L3R9hmI-J5aoWA