The Smile Position Paper

A Thought from a Tweet

This morning, I bumped into Paul Ford’s quote, and it was so brilliant that I just had to expand on it.  In the design of Smile I’ve thought about this for years — what matters in computation, and have I made the language focus on that? — but I think it’s worth talking about it as a position paper.  Ford hits the nail on the head:  Smile has an opinion, and it’s a strong opinion, just one that’s very different from most languages in use today.

Continue reading “The Smile Position Paper”

Syntax matters

Something that I haven’t really explained well is why I believe Smile code is shorter, better, and simpler than nearly everything else out there.  I’ve talked about it at a high level, and I’ve shown “Hello, World” and simple test programs, which are nice, but none of that really gives you the feel of coding in Smile.

So here’s an example of some unit tests written using a simple unit-test suite that I’ll be including out-of-the-box with the Smile distro.  Writing unit tests is a little closer to the day-to-day activities of Real Programmers, and it helps you to see a little better what code in a language feels like:

#include "testing"

tests for the arithmetic unit {

    it should add small numbers {
        x = 5 + 7
        assert x == 12
    }

    check the boundary conditions {
        x = 5 + 7
        assert x != 0 (adding positive numbers should never produce zero)
    }
}

Continue reading “Syntax matters”

I’m still doing things

It’s been a while.

The credulity of my tagline — where I’m still writing but you’re not reading — seems to be a bit stretched lately, as it’s been months since I last posted anything about anything.  That’s not for a lack of interesting things to write about, but mostly for a lack of time in which to do it:  I most often think of things to say while driving to or from work, or while lying in bed at night having spent my evening feeding and cleaning up after small children, and neither scenario is especially conducive to posting on one’s blog.  Even when I do get a little private time, I tend to spend it working on Smile, rather than posting here about Smile, which doesn’t especially help with anybody else knowing what’s going on with it.

So let’s talk about Smile.

Continue reading “I’m still doing things”

Downfall

Downfall. 2236, Pogo Publishing, Lagos, Nigeria. 577 pages.

It goes without saying that the collapse of America was the defining event of the 21st century.

Historian Warren Keeler’s new book, Downfall, explores the collapse of the world’s most technologically-advanced empire in breathtaking scope, and while it leaves some to be desired — I found the scant mention of the Harriman Riots disappointing — it is still among the most comprehensive analyses of the collapse to date.

The core outline — that poorly-educated, rural Americans were taken in by a fast-talking real-estate mogul who became not only America’s last President but its first Dictator, ultimately driving the nation to despotism and ruin — this story is well-known to any schoolchild today.  Still, despite all of the analyses of the rise and eventual fall of the Trump Dynasty, few attempt to trace its origins farther back than Donald Trump’s rise to power in 2016.  Keeler’s book fares excellently in this time period, chronicling not only the rot in the Democratic Comradeship that ultimately led to the failed candidacy of Hillary Crookton, but also the weaknesses in the Strong Republicans For Strength Party that allowed Trump to rise in the first place.

Keeler also excellently covers the pivotal first three years of Trump, long before he became Grand Commander.  I had not realized, for example, that the retirement of a single Justice from the American Ultimate Court — then called the Supreme Court, apparently — was what ultimately led that Court to rule in favor of abolishing term limits on the American President.  It is also interesting to wonder what might have happened had the election of 2018 swung the other way:  Perhaps the American Legislature might have been a better check on Trump’s ambitions; with just one more Democratic vote to tip the balance toward his opposition, he might not have been able to run roughshod over the other two branches of government.

But, of course, history did not play out that way.  The Legislature quickly became Trump’s rubber stamp; laws were passed to silence all information except Foxnews and Trumpitter; and by the time Democratic leaders began to disappear at the hands of ICE, his private army, even his original supporters were too terrified to stop him.  The Battle of New York City — then simply called “quieting the insurgent rats” — was the final fight between Trump’s Blackshirts and the Hashtag Resistance, and it put an end to any attempt to stop his seizure of power.  The collapse of the American economy during the subsequent Deportations — his epithet used to describe the murder of his opposition and critics — was almost inevitable.

In the wake of Donald Trump’s reign, and the failed dictatorship of his son, nearly a hundred million people died.  And, of course, America is ruined, its landscape now badly irradiated:  Trump’s decision to use his nuclear weapons on California is rightly denounced not just today but was even denounced by some of his supporters at the time.  Yet Keeler does not attempt to place judgment on either Trump or his family:  True to his trade, he is a dispassionate historian, chronicling the facts as accurately as he can from the remaining records, many of which were lost in the collapse of the internet.  I would have liked stronger opinions from Keeler on the worst of Trump’s atrocities, but I understand his desire to remain objective.

Ultimately, of course, without the collapse of America, the rise of the African Empire would have been unlikely.  And while our continent is strong and wise and capable, there are still technological and artistic wonders that America’s world knew that we are yet rediscovering.  One cannot help but wonder what the alternative history of Earth might have been — had the American people put up a little more of a fight against the greatest despot and mass-murderer mankind has ever known.

— Jax M’nungo

Lessons from an Old Coder

I’ve been coding for a lot of years — next year, it’ll have been 35 years since I wrote my first line of code — and I’ve worked on a lot of projects over those years.  Some of those projects have wildly succeeded, and some have absolutely bombed.  (I’d like to think my lifetime average is positive, though.)  Through all that work, I learned a lot of lessons the hard way, and today, after a discussion at work, I decided I’d share with the younger crowd some of the most important programming lessons I’ve ever learned.  The lessons below are hard-won, and they cycle through my head on every line of code I write, even to this day:

Continue reading “Lessons from an Old Coder”

Pop Quiz

I spent all day today dealing with too many different someone elses’ bad code, and it’s left me feeling irritable and grumpy and very elitist. I swear, most people really shouldn’t be allowed to program, ever.

So are you one of the good “programmers”? Are you actually solving more problems than you create? Take my “easy” ten-question pop quiz and find out!

  1. Which book is more important: Design Patterns or Antipatterns? Why?
  2. When you design any component — a class, an interface, a function, a module, a networked API, anything, in any programming language, in any environment — what’s the single most important consideration?
  3. What is the real purpose of comments?
  4. How would you go about trying to demonstrate that a piece of code must be or can’t possibly be the source of a bug? How about without unit tests? How about without strong typing either?
  5. Name at least three problems you’ve solved in the past using metaprogramming — that didn’t involve using your language’s version of “generic types” as the solution.
  6. Name at least five unrelated programming languages in which you’d be comfortable immediately switching to for your next programming project.
  7. It’s been said that design patterns are really just patches for defects in the programming language’s design. Is this true? Does it apply to all languages in all circumstances? Why or why not?
  8. For your most favorite programming language, list all the features and patterns that should usually be avoided most of the time.
  9. When is copy+paste actually the right technique for code reuse?
  10. What’s the single most important quality that all good code has, no matter what project, year, or programming language it was written in?

Answered them all? Great! Go back to coding, safe in the knowledge that your code probably doesn’t completely suck. Probably.

Stuck? Can’t answer some of them? Sorry. They’re not intended to be easy questions you can just pop the answers to right out of college. Keep working on that experience level and expertise, and maybe someday you’ll be able to answer the rest.

(But if you’re really stuck, here’s a hint: Go look up Harold Abelson’s most famous quote, and see if that teaches you anything more about the right answers.)

Some thoughts on Islam

There was a time that I was mostly innocent of knowing anything about Islam.

I remember learning about Islam in school in the ’80s; it was a religion practiced by a bunch of people in parts of the world I’d never been to, lumped in my mind with Hinduism and Buddhism and Shintoism into the category of “other weird religions.”  My, how times change.

The only real interaction I had with Islam was over the Israel/Palestinian crisis.  I am unabashedly a supporter of Israel.  That’s what being half-Jewish gets you, really.  I’m not a hard-liner about it, but Israel has a right to exist, and I viewed the Islamic world’s hard position on Israel and a lot of the PLO’s actions in the ’90s with extreme skepticism.  The Israelis needed their home, and the Palestinians, well, they were Arabs and had an entire Middle East to live in:  They didn’t need that tiny, tiny strip of land.

Then 9/11 happened.

I remember watching the towers fall.  I was an adult, twenty-five years old, standing in a bathrobe in front of a TV trying to make sense of the impossible pictures and death.  It was like a bad action movie, only it was real, and those dots falling out of the collapsing towers were real, live human beings, plummeting to their deaths.  My father was in Washington, DC during the attacks, and watched the third plane strike the Pentagon out the State Department window.  And then the last plane crashed out in Schwenksville, its valiant passengers daring to try to do what was right, and etching their names in the pantheon of American heroes.

And I remember very distinctly watching, on that very same day, video of Palestinians dancing, dancing, dancing, and cheering in the streets.  Celebrating the deaths of another man.  And I thought to myself — regardless of religion — who does that?  Who dances when another man dies?

In that moment, Islam became a dirty word.

Good men don’t dance in the streets when their fellow men are murdered.  Therefore, these men I see cannot be good.

In five seconds of video, Islam went from a “religion of peace” to an absolute evil.  The Palestinian claim to Israeli land?  Forfeit, null, and void.  The Arabic claims of mistreatment at the hands of Americans?  Voided.  The claim that Islam was on equal footing with all other religions?  An absolute falsehood.

I was then supportive of efforts to seek out Bin Laden.  The perpetrators of that evil had to be found, and stopped.  And while I tried hard to be reasonably fair, it was impossible for me to give Islam an equal shake with every other religion.  It had perpetrated an unfathomable evil, and though there were those who claimed it was still a religion of peace, that the Wahhabists who wrought that terrible crime were unsupported by the majority, the video of the Palestinians dancing and celebrating spun on endless loop in my head, and contradicted any contrary claims about their religion.

But I am a researcher by nature, and I read.  To better understand our joint foe, I read about them:  About the origins of Islam and Mohammad, about the Sunni/Shia split, about its early spread, about the European and American mistakes there in the 19th and 20th centuries, about the birth of Wahhabism, about the origins of Israel and the Palestinian crisis, about Bin Laden and the growth of Al Qaida, and about Islam in its present day.

To my chagrin, many of the things that were predicates on which America founded its attacks in the Middle East in the early 2000s were false.  There were no weapons of mass destruction in Iraq.  Afghanistan was a failed state of guerrilla thugs, not a violent Islamic power bent on world domination.  The Iranian revolution was, frankly, more directly America’s fault than it was anything else, and they had every right to be angry over us propping up the Shah.

But still, I viewed Islam with considerable skepticism.  Knowing it better raised a lot of questions about it, but it was still an enemy at the gates, and it still had to be stopped.  Those 1.6 billion people were all either potential violent attackers or brainwashed accomplices or simply dupes.

I equally distinctly recall the moment my position on Islam changed.  Thank you, Mr. Khizr Khan.

I suppose I knew that there were Muslims in the military before Mr. Khan spoke at the Democratic National Convention.  I saw the crescents at Arlington National Cemetery.  But it didn’t come home quite the same way as it did when he spoke.  Here was a husband and wife, devoted parents who had lost their only son.  Their son had made the ultimate sacrifice:  He had joined the military, gone overseas at his country’s asking, and came back in a box draped with an American flag.  And far from being bitter, Mr. Khan was defiant.  Their family had offered the ultimate sacrifice for America, and the only thing that Mr. Khan asked, the only thing he insisted on, was respect for the Constitution and what it stood for.  Respect for America, for the rights and freedoms and truths it was founded on.  Respect for his home — and nothing about his religion.

He was an American first, and a Muslim second.

That moment struck me.  Somewhere in the back of my mind, I had always seen Islam as an overriding force:  Its adherents were Muslim before all else, and therefore couldn’t really be human first.  They couldn’t be humane first.  And they certainly couldn’t be American first.  But here was Khizr Khan, and he and his wife had sacrificed more for the belief that all men are created equal than anyone I knew had.  Here was a man shaking a copy of the Constitution on live TV, and insisting that it was more important than who belonged to which religion, that its insistence of freedoms and rights mattered more than our petty squabbles, that its assurances and guarantees were worth any price.  Here was a good man holding up that document I hold so dear and insisting that it was worth the ultimate sacrifice — that he had paid and I had not.

Over the course of the next month, my animosities crumbled.  I read and I read and I read and I read, and a decade of hateful walls began to fall down.

Today, I still have some skepticism of Islam.  But it’s mostly academic:  I have some real, hard questions about its founding, and equally hard questions about its early spread.  I have no good answers about the Israel/Palestine mess.  And many of the bad things I had formerly attributed to Islam I now rightly attribute to problems in traditional Arabic culture, such as the region’s abysmally poor record on women’s rights.

But all of those are isolated components.  1.6 billion people mostly view Islam as a peaceful, stabilizing force, and I now respect that as it is.  There’s a tiny fraction of a percentage of those people that are troublemakers, and while a tiny fraction of a percentage is large in absolute numbers when multiplied by 1.6 billion, it’s still a tiny fraction of a percentage.  Christianity is neither better nor worse on its percentages.  Most Muslims want the same things I want:  To have a home, to have a job, to have a daily meal, to have a spouse, to raise their families, to watch their children learn and grow, to live in a peaceful place, to have meaning in their lives.

Which is a very long and roundabout way of saying that I finally see Muslims for simply what they are:  People.

Not evil monsters, not villains, not caricatures, not a violent force to be opposed at all costs, and certainly not the standing army in an impending clash of civilizations:  The followers of Islam are people, other human beings, mostly good most of the time just like anyone else, and neither more nor less than that.

It’s a shame it took me so long to get there.