The Daily Parker

Politics, Weather, Photography, and the Dog

B is for BASIC

Blogging A to ZFor day 2 of the Blogging A-to-Z challenge, I'm going to talk about the first computer language I learned, which is still alive and kicking in the .NET universe decades after it first appeared on a MS-DOS 1.0 system disk: BASIC.

BASIC stands for "Beginner's All-Purpose Symbolic Instruction Code." The original specification came from John Kemeny and Thomas Kurtz at Dartmouth College in 1964. Today it's one of the core .NET languages included with Visual Studio as "VB.NET" (for "Visual BASIC," Microsoft's dialect of BASIC released in 1991).

Yesterday I showed you a "Hello, World" application written in C#. (You can download the source code here.)

Here's the VB.NET version:

Module Program

	Sub Main()
		Console.WriteLine("Hello, World!")
		Console.ReadKey()
	End Sub

End Module

What's different? Well, a lot of things: no braces, no include lines, no semicolon line endings...and that's just for a 2-line program.

But look at what's the same. Because this is a .NET program, the actual guts of it look almost exactly the same. There are two calls to different methods on the Console object, and except for the missing semicolons, they are identical to the calls in C#.

Here's the IL:

.method public static void  Main() cil managed
{
  .entrypoint
  .custom instance void [mscorlib]System.STAThreadAttribute::.ctor() = ( 01 00 00 00 ) 
  // Code size       19 (0x13)
  .maxstack  8
  IL_0000:  nop
  IL_0001:  ldstr      "Hello, World!"
  IL_0006:  call       void [mscorlib]System.Console::WriteLine(string)
  IL_000b:  nop
  IL_000c:  call       valuetype [mscorlib]System.ConsoleKeyInfo [mscorlib]System.Console::ReadKey()
  IL_0011:  pop
  IL_0012:  ret
} // end of method Program::Main

Wow. The IL is exactly the same. So both the VB.NET and C# code compile down to functionally identical assemblies.

And that's one of the most important characteristics of .NET: it lets you write code in any language you want (as long as someone has written a compiler for it), and run it on any platform you want (as long as there's a CLR for it).

I worked with Visual BASIC from versions 1 to 6, and then did one project in VB.NET before switching to C# in 2002. You really would need to pay me a lot of money to go back to it. I believe C# is more expressive, more concise, and more able to reflect my intentions than VB.NET.

But there is nothing wrong with VB.NET. If you want to use BASIC, enjoy. With the .NET ecosystem, it's up to you.

April come she will

Blogging A to ZThe A-to-Z Challenge starts tomorrow, and I'm all set to go with a list of 26 topics on programming with Microsoft .NET.

Now I just need to write the actual posts.

It's interesting to me how vacations don't actually lend themselves to much productivity, even when that's the explicit purpose of the vacation.

Anyway, if I do my job today, the first post will hit at noon UTC tomorrow. If I don't do my job today, it'll hit sometime later than that.

Politically-motivated Spam from an island nation's PR department?

Over the past few weeks I've gotten several emails from someone purporting to be "Jess Miller" in New Zealand, mentioning she'd noticed a post I did on the Maldives in 2012. That post reported on the violent coup d'état that overthrew the democratically elected government of the island nation just southwest of the Indian subcontinent. And just a few weeks ago, the military dissolved Parliament and threw the country into more unrest. The U.S. State Department has issued a level-2 caution. Understandably, tourism has declined somewhat, which is a pity because it's unlikely the country will exist after another 50 years of climate-change-induced sea-level rise.

Anyway, "Jess" sent me an email about my "wonderful blog post" and called out "a solid blog post [she'd] read in the past," which turned out to be the U.K. Foreign Office travel warning about the place.

Then there's the punchline: "Jess" wants to cross-post with her "best things to do in the Maldives" article on her own site.

I think the best thing to do in the Maldives right now is not to go there.

So, "Jess," your article is very attractive and I think a wonderful list of things to do once the government of the Maldives returns to civilian control, their economy stops its free-fall, tourists stop getting robbed in their hotel rooms, and climate change goes into reverse so they stop suffering the existential peril that is driving all these problems.

Any takers on a bet that "Jess" has funding from a Maldives tourist agency?

Blogging A-to-Z sign up tonight

I've narrowed my list down to four potential topics for the Blogging A-to-Z challenge:

  • U.S. Civics
  • Programming (with .NET)
  • Music
  • Places I've visited

I've got 26 topics lined up for each. I think they'll all be fun and relatively easy to do (though I'll have to start writing them at least a week ahead). But like a true INTP, I can't decide which to start with.

Sign-up is at 00:01 GMT tonight, or 6:01 pm Chicago time.

Blogging A to Z challenge...accepted

This year, The Daily Parker will participate in the Blogging A-to-Z challenge.

Since I've posted an average 1.31 times per day since the modern era* of this blog began in November 2005, and an average of 39.6 times every April, posting at least 26 entries this coming April isn't the challenge. (Also, given trends, it's possible my 6,000th modern-era post will be one of them.)

No, the challenge will be coming up with 26 entries on one specific topic, and making them worth reading. Keep reading to see (a) what topic I pick and (b) how I do.

Sign-up opens March 5th.

* braverman.org had a proto-blog starting in May 1998. Let that sink in. We didn't even call it "blogging" back then.

Twelve Years a Blogger

Today, by the way, is the 12th anniversary of the modern incarnation of this blog. (I had a proto-blog on braverman.org from 13 May 1998 until this app took over.)

This is the 5,766th post on The Daily Parker. I hope you've enjoyed at least 577 of them.

Crickets

There's a lot going on at Inner Drive Technology World Headquarters, so I haven't had a lot of time or energy to post this weekend. Regular posting should resume tomorrow.

Housekeeping

A year ago today I posted that the previous month, July 2016, was my worst blogging month in 5 years. Well, July 2017 was my best blogging month in 3½ years. The last month I posted 47 posts was January 2014 before I slowed down to the point where this past February I only posted 20 times for a rate of 0.74/day, a number not seen since November 2010.

I have some hypotheses why this happened, and why posting has rebounded. For now, though, I'll just say I've had three consecutive months of beating both the running 12-month average (1.21/day) and the all-time average posting rate (1.31/day).

The merry month of May

April seems to have gone quickly this year, but that could just be my advancing age. I'm hoping to have a little more inspiration this month to return to 40+ blog entries a month—i.e., the running average since November 2005. For the 12 months ending yesterday, my average (mean) has been 34.4 with a median of 35, just barely holding above 1.0 entries per day.

Of course, the total number of entries doesn't really matter if they're good. Deeply Trivial took part in last month's A-to-Z blogging challenge, and did a fantastic series on basic statistics that's worth reading. Her 26 entries (plus 5 bonus posts) provide almost a complete intro course in statistics. Start with X and then bounce back to A.

I'm also glad to see center-right commentator Andrew Sullivan back on the Internet, even if only once a week. His column from yesterday, "The Reactionary Temptation," is a must-read.

And, of course, Josh Marshall's frequent posts from the center-left will be vital in keeping tabs on the sub-surface wrigglings of the current administration.

May should see more activity on The Daily Parker for reasons I will get to later in the month. It's time to get writing again.