odds and ends

OK, after this morning’s depressing Warren Ellis post, here’s some lighter stuff. Just a mix of stuff I’ve been meaning to mention, for one reason or another.

Google AdSense

I added Google AdSense to my blog back in 2010 and removed it in 2016. But I never closed out my account. So I did that this week. Now, I can finally get the $15 that Google owes me. (Normally, they don’t pay out until you hit $100, but if you close your account, they’ll pay out any balance, if it’s over $10.) I wonder how many small bloggers like me are still bothering with AdSense. For a while, a lot of people thought they could make good money by running a blog and putting AdSense on it. I’m wondering if any of them really did.

New Toys

I haven’t made much more progress in setting up my new laptop. I was too busy yesterday to even turn it on. Hopefully, I’ll have time to do some stuff with it this weekend. I did also just get a new Amazon Echo Dot (with clock). I don’t really have a good excuse for buying it. I had an old iHome alarm clock / iPhone dock on my nightstand that I couldn’t really use anymore, since it doesn’t fit the newer iPhones. And that was fine, really, since I don’t really need a clock on my nightstand. These days, I just plug my iPhone in, and use Sleep Cycle as my alarm clock. But, I don’t know, I guess I just wanted a small clock there that could play music or NPR or whatever. And it was only $35. I already have some experience with Alexa, since it’s supported on my Sonos speakers, but I turned off the mics on those, since it was getting accidentally triggered too often, and I didn’t really find it that useful. I’m going to play around with it some more on the Echo and see if there’s anything fun or useful that I can do with it.

Learning New Stuff

I finished the SharePoint Framework course that I was working through. That’s given me a good start, but there’s still a lot I need to figure out. I’m almost done with the React course on SharePoint that I’ve been watching and working through. Most of that course uses an online JavaScript environment, found at jscomplete.com, so you don’t need to set up your own dev environment. But I’m now at the point where I really do need to set up a dev environment to get any further. I considered a lot of options, but settled on using Homebrew on my Mac to set up Node.js. And I’m using Visual Studio Code as my text editor. So that’s good enough for now.

I may need to play with Node Version Manager at some point, but for now, I think that would be an unnecessary complication. And, on Windows, I want to look into setting something up under WSL2 at some point. Microsoft, helpfully, has a guide on how to do that. But, again, I’m probably not ready to dive into that just yet.

So that’s my “odds and ends” post for today. I could write up a bunch of other stuff, but it’s probably best if I stop for now and go eat some lunch. Then maybe take a nap.

SharePoint, React, Laptops, and so on

I mentioned a while back that I’m trying to learn about the (relatively) new SharePoint Framework (SPFx), for a project at work. I’ve made some progress with that, but I still have a way to go. I’ve done 5 of the 8 modules in this course from Microsoft. And I’ve watched a couple of Pluralsight videos, one from Sahil Malik and one from Danny Jessee. I’ve been doing that mostly on work time, since it’s specific to a work project.

SPFx relies on a number of related technologies, some of which I know and some of which I don’t. (And the ones I know, I don’t necessarily know that well.) So I decided to start digging into some related stuff, on my own time. I know pretty much nothing about React, and it looked interesting, so I decided to start learning that. I’ve watched one short Pluralsight video, that just gives an overview without getting into specifics. And now I’m working through a four-hour video course that goes into a little more detail. There’s a whole skill path for React on Pluralsight that would take about 40 hours to watch, if you went through it all. (And of course it would be much longer than that, if you actually followed along and worked through projects on your own.)

I got side-tracked off of React at one point when I was watching one of the Pluralsight videos on my old ThinkPad, and the battery suddenly died. I’ve had that laptop since 2011, and it’s starting to show its age. I’d only been watching the video for about 30 minutes, and the battery should have had a full charge when I started. So I started thinking about either replacing the battery on it, or just getting a new laptop. Replacing the battery on that particular model is really easy. And there were a bunch of options for a replacement battery on Amazon (though most of them looked kind of sketchy). But I started thinking about how old the laptop was, and how iffy off-brand replacement batteries can be. And I also started wondering if that laptop was going to be able to handle some the stuff I’m going to want to try out soon, like WSL 2. I’ve been hearing about that for a while, and it’s now been released as part of the Windows 10 2004 update. The old ThinkPad, surprisingly, has been able to keep current with Windows 10 updates so far, up to version 1909. But I have my doubts about whether or not it’s going to be able to deal with 2004. So, reluctantly, I started shopping for a new laptop.

This is a pretty common thing with me: I start trying to learn a new technology, and I get side-tracked shopping for a new laptop, or some new piece of software, or something. Anyway, I spent way too much time on that yesterday. This morning, I finally settled on the Lenovo Flex from Costco, for $750. It’s a bit of a compromise, since I’ll need to upgrade it to Windows 10 Pro, but I can still do that for $40 with my Microsoft company store access, which should still be good for the next week or two. Also, it’s a 2-in-1, which I don’t really need or want, but most Windows laptops seem to be touchscreen 2-in-1 models now, so I’ll give it a try. On the positive side, it’s got 16 GB of RAM, a 512 GB SSD, and an AMD Ryzen 7 CPU. (I haven’t really been keeping up with CPU news lately, but it looks like the AMD Ryzen 7 4700U is pretty good.) So I think it should be able to handle my fairly modest needs. I always feel a little guilty when I spend money on new hardware, but I’m trying to remember that, this year, I’ve spent nothing at all on travel, and I’m not likely to. If I’d gone to WonderCon this year, that would have cost me well over $1000, for hotel and airfare alone.

I was going to remark that I’d made it through a whole post without referencing COVID-19, but the travel comment above kind of does reference our current situation, so I guess that’s not true. COVID-19 definitely did affect my laptop shopping. In normal times, I probably would have gone out to Costco yesterday to see what laptop models they had on display. And I might have taken a trip to Best Buy too. Costco is still open, but I don’t really want to go there unless I have to. And Best Buy of course is still closed. So I settled on a mail-order laptop from Costco. They have a good return policy, if I need it.

SharePoint, Somerville, and so on

A little follow-up on some subjects from yesterday’s post:

I complained a bit yesterday about the “hundreds of files” pulled in on a new “Hello World” SharePoint Framework project. I checked today, and it’s actually more than 50,000 files, totaling up to about 500 MB. Scary. I’ve also been a little worried about all the security warnings issued by npm when scaffolding a SPFx project. Apparently that’s all fine though and I should just ignore them, according to this blog post. I guess none of the stuff that npm is checking is actually ever deployed to SharePoint, so it’s fine.

NJTV News tonight had a segment on restaurant and retail reopenings that spent some time talking about Somerville. I guess we’re likely to go ahead with the plan to close down Main Street to car traffic a few nights a week that I mentioned yesterday. I’ve still got some reservations about that, but nobody asked my opinion. (Yeah, I know, I could start attending town meetings. They’re virtual now, so I don’t even need to leave my couch. I’m still probably not going to do it though.)

One other benefit of having “attended” Microsoft Build this year: They’re letting attendees buy some stuff from the Microsoft company store. They’re only allowing purchases of digital goods, so no discounts on Surface hardware or anything like that. But I did pick up a few things at bargain prices. I got a Windows 10 Pro license for $40, and used it to upgrade my desktop PC from Home to Pro. And I got a one-year extension on my Microsoft 365 Family account for only $20. (That’s usually $100/year. I get the Home Use Program discount, which makes it $70/year. So $20 is really low.) And I got a two-year Xbox Live Gold sub for $50. (That’s usually $10/month or $60/year.)

I don’t know if I’ll actually get much use out of the Xbox Live Gold account. As I mentioned recently, I’ve had the Xbox for a year now, and I barely use it, except as a DVD/Blu-ray player. I’ll have to keep an eye on the Games with Gold stuff and see if they have anything I’m interested in. I really want to start playing video games again, but there’s so much other stuff to do too.

SharePoint, social distancing, civil unrest, and so on

I need to start a new SharePoint Online project at work soon. It’ll be an attempt to move an on-prem SharePoint 2013 site, with a fair amount of custom code, to SPO. I haven’t had time to learn much about SPO yet. I’ve taken a couple of pokes at it, but I’d been having trouble finding the right resources.

I “attended” Microsoft’s virtual Build conference this year, and had hoped for some useful SharePoint content, but there wasn’t much. About the only thing I could find was this session on the Microsoft 365 developer program. I already knew about that, and have an account, so that wasn’t too useful. It did, however, point me in the direction of a web page that (in turn) pointed me to this course on extending SharePoint. That seems to be what I need to get started.

I’m cautiously enthusiastic about learning this stuff, but I’m a little leery of the dev stack that they’re recommending. I have some limited experience with the tools they’re using (gulp, yeoman, node.js, and so on), but this stuff always seems like a house of cards to me. Too many different tools, all from different open source projects, pulling in possibly hundreds of different files, all just to get the scaffolding for a “Hello World” project up and running. Well, I need to remain positive and give it a try. I made it through the first “Hello World” example today, and I’m hoping I’ll have time to make some more progress tomorrow.

Since the dev stack includes node.js, I found myself visiting the node.js web site today. They’ve changed their home page to contain a Black Lives Matter message. (I’m not sure how long they’ll leave it up, so here’s a link to an archive.org snapshot.) We had a fairly small and very peaceful BLM march in Somerville over the weekend. And protests in NJ have mostly been peaceful, with some exceptions. I don’t have much to say about all this, other than that I hope something positive comes out of it all. I’m afraid that it’s going to get worse before it gets better though. (My own contribution to this situation was to start catching up on all the Black Lightning episodes on my TiVo. And to keep listening to the Invisible Man audiobook that I started a while back. So, not much, really.)

Meanwhile, NJ is starting to open back up a bit. Today actually marks three months since the first COVID-19 case in NJ, according to the newscast I just watched. I think that Murphy is acting with a reasonable level of caution, all things considered. I am worried about the “knuckleheads” who might push things a little too far and cause another spike in cases. I’ve actually been venturing out a bit more myself this week. I had a doctor’s appointment, then had to go to Quest for some blood work. And I’ve got a dentist’s appointment next week. It feels a little weird, going out and driving and stuff. I’m really wondering about how “armored up” the dentist and hygienist are going to be for my appointment. Dental work has got to  be pretty high-risk, given the level of contact necessary.

Here’s an article about the current state of things in downtown Somerville. And here’s one on a plan to close off Main Street to car traffic a few nights a week, and use the road for outdoor dining. It’s an interesting plan, though if it’s not implemented carefully, it could be a disaster. I want to see Somerville’s restaurants have a chance to do some business this summer, but not if it means that the whole street is crammed with people eating and drinking and spreading germs. If they can keep things reasonable and organized, maybe it’s not a bad idea. If things get crowded (like on a normal, pre-COVID-19, Friday night), then I’m going to be locking myself in my apartment and keeping the windows closed.

Larry Tesler

I have to admit that I didn’t know that much about Larry Tesler prior to his passing last week. I was generally aware of Xerox PARC, and their place in the history of personal computing. And I probably had heard at some point that Tesler was essentially the inventor of “copy and paste.” And I think I was vaguely aware that he’d worked on the Newton, maybe? But I don’t think I’d ever put that all together in my mind, and realized that this was all the same guy. Over the years, it looks like he’s worked on a number of really cool things, from Smalltalk to Object Pascal to the Newton.

I first saw the news of his death on Hacker News, which linked to an obituary on Gizmodo. The Hacker News thread has some pretty interesting anecdotes and conversation, including a number of comments from Alan Kay. There’s also an obituary in the NY Times, written by John Markoff. And there’s a nice remembrance from Adam Engst at the TidBITS site.

I don’t have anything useful or pithy to say. I’m just here marveling at how much this guy did, and what a good guy he apparently was.

New Year’s Day 2020

It’s almost 8 AM on New Year’s Day, so it’s time for my annual New Year’s self-review post. This has become a tradition for me; here’s a link to last year’s post, which includes links to a few previous years. This year is also the start of a new decade. I had a few thoughts on the past decade that I posted on Christmas, so I won’t rehash all of that here.

Health, Weight, and Sleep

I’ve got a bit of a headache this morning, and I’ve been fighting a cold (or something) since Thanksgiving. So I don’t feel very healthy. I have an appointment with my doctor on Friday, so hopefully he can let me know if I’ve got a big problem or just a stubborn cold. Looking back at last year’s post, I see that very little has changed. My average weight may have gone up by a pound or two. I’m usually coming in at 136 or 137 now, rather than 135, but that’s fine. My doctor would actually like to see me put on a few more pounds.

I’m continuing to track my weight and diet with Lose It every day. And I’m continuing to use my Apple Watch to track my exercise. I manage to fill my exercise ring on most days, and I generally fill my move ring about five days per week, on average. My move goal is currently at 500.

I’m still using Sleep Cycle to track my sleep. I guess I’m doing OK with sleep, but I do have some rough nights. I bought a bottle of melatonin gummies on Amazon a year ago, and I take two before bed occasionally. I think it helps. I don’t use it too often. Taking melatonin is probably safe, in moderation. I thought about getting a new mattress last year, but I’ve held off. I might go ahead with that this year.

I mentioned last year that I’d gotten a prescription for progressive lenses from my eye doctor. I did get that filled and I’ve been wearing those new glasses all year. Honestly, they haven’t helped much. I had my yearly checkup a few weeks back, and he suggested maybe trying computer bifocals, but I didn’t want to have to pay for another pair of glasses so soon, so we decided to wait and maybe try that next year.

I also mentioned last year that I should go get my hearing checked, and I never did that, so that should probably be near the top of my to-do list for this year.

Work and Professional Development

There’s not much to report on this. I’m doing fine at work. I got a very good performance review for 2019. I did a fair bit of work in Azure over the last year, so that was interesting.

Here’s a list of tech books that I read last year, from my Goodreads history:

  • ASP.NET Web API Security Essentials
  • Beginning Azure Functions: Building Scalable and Serverless Apps
  • C# and XML Primer
  • Instant Nancy Web Development
  • Learn Azure in a Month of Lunches
  • Take Control of Catalina
  • Take Control of Photos
  • Take Control of Upgrading to Catalina
  • Take Control of iOS 13 and iPadOS 13
  • The Pragmatic Programmer: From Journeyman to Master

That’s a pretty random list, but there were a few good ones in there. I think that I read all of those via my O’Reilly subscription that I get through my ACM membership, so I’m getting some value out of that.

I’m also still paying for a Pluralsight subscription. Checking my history there, it looks like I’m getting some value out of that too. Here’s the list of courses I watched in 2019:

  • IIS Administration Fundamentals
  • Microsoft Azure Developer: Create Serverless Functions
  • Getting Started with OAuth 2.0
  • Implementing and Managing Microsoft Azure Multi-factor Authentication
  • Microsoft Azure Developer: Securing Data
  • Fiddler
  • Microsoft Azure Developer: Implementing Application Logging with Diagnostic Logs
  • Instrument Application with Azure Monitor Application Insights
  • Microsoft Azure Developer: Monitoring Performance
  • Play by Play: Care and Maintenance of Development VMs
  • Beginning PowerShell Scripting for Developers
  • Managing Azure AD
  • Play by Play: Azure Beyond Websites
  • Play By Play: Azure Deployment with Scott Hanselman

Again, kind of a random list, but I learned some stuff.

For 2020, I’d like to learn a new programming language, but I’m not sure about which one. I’ve considered trying to learn Rust, but I’m not too enthusiastic about it. Maybe I should try to learn Swift? I don’t know. I’ll have to think about it.

Finance

I did a year-end financial review last weekend, and I’m in pretty good shape. I still kind of want to do a one-time sanity check with a good financial advisor, but I didn’t get around to that in 2019, so I should really try again in 2020. I also see in last year’s post that I wanted to read this book last year, and didn’t get around to it. So I should probably do that.

Reading

I wrote up a post just a few days ago on my reading plans for 2020, so I won’t rehash that. But I’ll go ahead and post a few book lists that I culled from my Goodreads year in books. I read 115 books this year, according to that. Most of them were comics / graphic novels.

Here’s a list of the stuff I read from The Great American Read list last year:

  • Catch-22
  • Gilead
  • Looking for Alaska
  • Pride and Prejudice
  • The Help
  • The Intuitionist
  • To Kill A Mockingbird
  • War and Peace

War and Peace took a lot of time to get through, so that was really my main reading accomplishment for 2019. I only read a few fiction books that weren’t related to my TGAR group:

  • Angels and Visitations
  • Pump Six and Other Stories
  • Zoo City

Of those, only Zoo City is actually a novel. So War and Peace, and the other TGAR books, really swallowed up a lot of my reading time. For non-fiction, I did get around to reading 10% Happier and Search Inside Yourself, both of which I’d mentioned in last year’s post as wanting to read. (I can’t say that I really stuck with my meditation practice in 2019 though. That’s something I may want to try again in 2020.)

Hardware

I got an iPhone XR about a year ago, along with a new Apple Watch. And my MacBook Air is only about a year and a half old. I bought a pair of AirPods in November, and they’re working fine. So I’m pretty well set for Apple gear. I’m not planning on giving Apple any more money in 2020, at least for hardware.

And I talked myself into buying an Xbox One back in May. At this point, I’m mostly just using it as a DVD and Blu-ray player. When I bought it, I kind of knew that I was going to be playing games on it for a couple of months, then lose interest, and that’s pretty much what happened. But it’s a decent Blu-ray player, so it’s not like it’s just gathering dust; it’s getting some use.

A friend bought me a new TV for Christmas, so I now have a new 43″ LG TV. That spurred a couple of related purchases, including a stand and a DAC so that I can route the digital audio output to my old analog receiver. It might spur one more purchase: a 4K Apple TV box. My current Apple TV box is the older one, that only outputs 1080p. (It looks like they still sell that one, as the Apple TV HD.) So maybe my earlier statement about not giving Apple any more money for hardware this year isn’t quite correct.

Summary

I have a bunch more stuff I’m thinking about, and that I could include here, but it’s now almost 10 AM. So I should wrap this up and maybe go out for a walk and get a cappuccino and a croissant from Starbucks or something like that.

 

Migrating from Mercurial to Git

Since Bitbucket announced back in August that they would be discontinuing support for Mercurial in 2020, I’ve had an item on my to-do list to convert all of my old Bitbucket Mercurial repos over to Git and move them to GitHub. Bitbucket did not provide any automated way to do this, so I’ve spent some time researching the possibilities and trying out different methods. I hit a few dead ends, but eventually found a way that worked for me. So I might as well share that here, for the benefit of anyone else who’s trying to do this.

A few preliminary notes:

  • I’m primarily a Windows user. I also have a MacBook, but I do most of my programming under Windows. So I wanted a method that would work under Windows.
  • My Mercurial repos are all pretty simple: multiple check-ins, but all in a single branch. (These are personal repos, not company repos where multiple programmers were working on them.)
  • My method was pretty similar to the one described in this blog post, from 2014, so I should give credit for that.

First, a few installs:

  1. Install Git for Windows. Any recent version should be fine. Be sure to install the bash shell.
  2. Install TortoiseHg. The most recent version should be fine. You don’t really need all the fancy Tortoise stuff here, but it’s the easiest way to get a good Mercurial install on Windows.
  3. Install Python 2.7. This probably won’t work with Python 3.x, so just install the latest version of 2.7.x. Make sure you add it to your path.

Now, from the git bash shell, run the following:

$ mkdir hg2git-work
$ cd hg2git-work
$ python -m pip install mercurial
$ git clone https://github.com/frej/fast-export.git

This will install Mercurial support for Python, then pull down hg-fast-export. That’s all the initial setup, really. The trick, I found, is using the git bash shell, which is close enough to a real bash shell for the rest of this stuff to work.

The next thing to do, which might or might not be necessary, is the create an “authors.txt” file to map your name/email from the old hg repo to the new git one. In my case, I created one with two lines that looks kind of like this:

"Andrew Huey <me@domain.com>"="Andrew Huey <me@users.noreply.github.com>"
"Andrew Huey <me@another-domain.com>"="Andrew Huey <me@users.noreply.github.com>"

This way, I’m mapping my real email addresses from Bitbucket to my private GitHub address. (My old Bitbucket repos were mostly private, but I’m making the new GitHub ones public.)

Let’s say you have a Mercurial repo in Bitbucket named “euler”. (That’s one of my repos, tracking my Project Euler work.) Now, do the following:

$ hg clone https://bitbucket.org/yourname/euler
$ mkdir euler-git
$ cd euler-git
$ git init
$ ../fast-export/hg-fast-export.sh -r ../euler --force -A ../authors.txt
$ git checkout HEAD

If all goes well, this should leave you with a nice new git repo, matching your hg repo. If you do not already have your GitHub credentials stored in your global Git config, you might now need to add them, either globally or locally. I won’t go into detail on that.

Next, you need rename or copy your .hgignore file to .gitignore. Both systems use pretty much the same format for ignore files, so you probably don’t need to edit it at all.

$ cp .hgignore .gitignore
$ git add .gitignore
$ git commit -m ".hgignore copied to .gitignore"

Now, you can just create a new target repo at GitHub, and push it up. Let’s assume your new repo is named “euler”.

$ git remote add origin https://github.com/username/euler.git
$ git push -u origin master

There are definitely other ways to do this, but this is the way that worked for me.

Calling a Dynamics AX WCF service from .NET Core

A big part of my job these days is interop between Dynamics AX and various external services/resources. A WCF service hosted in our AX environment is often a key part of that equation. With older .NET Framework applications, it’s easy to add a reference to a WCF web service. And I’ve done that so often that I could probably do it in my sleep. If I need to interface with a new AX service, I’ll generally just go through the “Add Service Reference” procedure, then copy & paste some code from a previous project and adjust it for my curent needs.

I was recently working on a new program that I decided to try to write using .NET Core instead of .NET Framework. It took me quite a while to figure out how to deal with calling an AX web service under .NET Core, so I thought I’d write it up, briefly, with a couple of sample code snippets.

First, there is a facility for adding a WCF service reference in a .NET Core 2 project in VS 2017. (I think this might have been missing in earlier versions of VS and/or earlier versions of .NET Core.) It’s pretty similar to the tool that works with .NET Framework projects, but there are a few key differences in the generated code. The biggest difference is that it doesn’t add anything to app.config/web.config, and in fact isn’t set up to read any configuration info from the config files at all. So you need to do the config in your code. (Of course, you can write your own code to read from your config file.) Anyway, it took a lot of trial and error before I figured out what I needed to do. There’s not as much documentation on this as there could be. So here’s a simple example, showing a bit of code (and config) from a .NET Framework project, and the equivalent code from a .NET Core project.

(I’m embedding it below as a Gist, since I can’t get WordPress to play nice with the XML config sample right now.)


// old way:
public async Task RunAsync()
{
CallContext context = new CallContext();
context.Company = "axcompany";
string pingResp = string.Empty;
var client = new XYZPurchInfoServiceClient();
var rv = await client.wsPingAsync(context);
pingResp = rv.response;
Console.WriteLine("Ping response: {0}", pingResp);
}
/* app.config:
<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="NetTcpBinding_XYZPurchInfoService" />
</netTcpBinding>
</bindings>
<client>
<endpoint address="net.tcp://myserver:8201/DynamicsAx/Services/XYZPurchInfoServices"
binding="netTcpBinding" bindingConfiguration="NetTcpBinding_XYZPurchInfoService"
contract="XYZPurchInfoSvcRef.XYZPurchInfoService" name="NetTcpBinding_XYZPurchInfoService">
<identity>
<userPrincipalName value="myservice@corp.local" />
</identity>
</endpoint>
</client>
</system.serviceModel>
*/
// new way:
CallContext context = new CallContext();
context.Company = "axcompany";
string pingResp = string.Empty;
var client = new XYZPurchInfoServiceClient(GetBinding(), GetEndpointAddr());
var rv = await client.wsPingAsync(context);
pingResp = rv.response;
Console.WriteLine("Ping response: {0}", pingResp);
private NetTcpBinding GetBinding()
{
var netTcpBinding = new NetTcpBinding();
netTcpBinding.Name = "NetTcpBinding_XYZPurchInfoService";
netTcpBinding.MaxBufferSize = int.MaxValue;
netTcpBinding.MaxReceivedMessageSize = int.MaxValue;
return netTcpBinding;
}
private EndpointAddress GetEndpointAddr()
{
string url = "net.tcp://myserver:8201/DynamicsAx/Services/XYZPurchInfoServices";
string user = "myservice@corp.local";
var uri = new Uri(url);
var epid = new UpnEndpointIdentity(user);
var addrHdrs = new AddressHeader[0];
var endpointAddr = new EndpointAddress(uri, epid, addrHdrs);
return endpointAddr;
}

view raw

wcf-example.cs

hosted with ❤ by GitHub

This example obviously isn’t applicable in all use cases. But I think it could point you in the right direction, if you’re trying to do this and you’re as befuddled as I was when I started this. I should also mention that reading the auto-generated code produced by the tool is somewhat useful, though the code is about as messy as most auto-generated code tends to be.

Some useful resources:

 

backing the wrong horse

I have a long history of “backing the wrong horse,” as it were, when faced with decisions between two competing products. I’m one of the idiots who bought an HD-DVD player, back when it wasn’t clear whether HD-DVD or Blu-ray would win out. I have a boxed copy of OS/2 around here somewhere. And so on.

And, when deciding between git and Github vs Mercurial and Bitbucket, I chose the latter. I had good reasons for doing so, of course. In the early days, the tooling for hg (Mercurial) on Windows was much better than the tooling for git. And, for a small company looking to host a handful of private repos (my situation at the time), Bitbucket was a better deal. (And also, for personal use, Bitbucket allowed private repos under their free accounts, while Github only allowed public repos for free.)

Well, of course, git won the git vs. hg battle some time ago. Bitbucket added support for git several years ago, which was inevitable. And Microsoft added git support to Visual Studio, and even to TFS. Then, they bought Github. But Mercurial has hung on as an alternative, and is still actively maintained.

But now, Bitbucket is dropping support for Mercurial. As of June 1, 2020 “users will not be able to use Mercurial features in Bitbucket or via its API and all Mercurial repositories will be removed.” So, I’ve got some time, but I’m going to have to convert my old hg repos to git eventually. And if I’m going to do that, I might as well move them to Github too, since Github now allows unlimited private repos under free accounts. It might even make sense to make a few of them public, if they’re not too embarrassing. There’s been a lot of talk over the last few years about how valuable it is to have some public code up on Github when looking for a new job. (Not that I’m looking, but I assume I will again, at some point.)

The thread about this on Hacker News has some interesting discussion on the history and evolution of version control, along with a fair number of pro-Mercurial comments. (And of course a lot of the usual stuff you’d expect in a Hacker News discussion thread…)

The Bitbucket announcement of this change includes links to a couple of tools that can (theoretically) help you migrate from hg to git. Hg-Git will probably be the easiest for me, since it says it’s included in TortoiseHg, which has always been my favorite tool for managing hg repos. (Which reminds me that I need to try TortoiseGit again.)

At work, I’m hosting some of my current code in Azure DevOps, under git repos. But a lot of my code is still in on-prem TFS servers, under TFVC. I kind of wish I could convert all of that stuff to git and get it in Azure DevOps, but some of it still needs to stay in TFS for various reasons. Sigh.

Microsoft Build

I wish I could have stayed in the Seattle area for MS Build, instead of coming back to NJ on Saturday. There have been some interesting announcements, including a new Windows terminal program, WSL 2, and .NET 5. At work, I’m still stuck using Windows 7 on my desktop and laptop, so I can’t use WSL, but I’d really like to. (At home, I have Windows 10 on my desktop and laptop, so I can use WSL at home, but I don’t have much need for it there.) Anyway, here’s hoping I can get one or both of my work machines upgraded or replaced at some point this year.

Microsoft, as expected, is pushing a lot of Azure stuff at Build. I should probably watch some videos from Build this week, but I don’t know when I can find the time for much of that. I’m already behind at work just from being away for three days last week. Maybe I can squeeze in the “All the Developer Things” clip from Scott Hanselman at some point today.