One Ring…

September 30, 2011 · Posted in Blog · Comment 

One Ring to add to the thousands of others, actually.

Yeah, it’s a (small) piece of chain mail, and yeah, I’m learning myself how to work this stuff.

It’s actually more complicated than it seems at first. Getting the first bit right is tricky, but once you have a piece of fabric (like the above), it gets easier. The rings will arrange themselves in their pattern more easily, and any mistakes you might have made become more obvious.

Also, it takes a LOT of time.

Eight

September 13, 2011 · Posted in Blog · Comment 

We all know that Microsoft has had a tradition with Windows, in which each good version is followed up by a horrible one. Windows 2000 was a good OS, ME was… Well, we all know. XP was (and still is) a good OS, Vista, well, even Microsoft admitted that it was crap. Windows 7 is good. But Windows 8…

Of course, somewhere along that line we could also mention Bob, but Bob was never officially released. Microsoft Bob was an attempt at a very easy-to-use version of Windows. You probably know the annoying paperclip from MS Office? The one that you feel compelled to axe-murder the nearest person every time he came up to offer you a tip? Yeah, he’s actually a leftover from Bob. Now imagine what the rest of Bob was like.

Anyway, I’ve read a few things about it before, and today a lenghty article has been published on the Dutch IT-news website Tweakers.net. It goes into details about the new interface that Microsoft is putting on Windows 8, called Metro. It is supposed to be (and well, actually is) the biggest makeover since Windows 95 (and quite possible earlier). It also looks like the most epically-sized mistake Microsoft has made since Windows 95.

Sure, the Metro interface looks all shiny. Integration between applications is definately something I can appreciate. And if this whole Metro interface ended up on smartphones and tablets, there’s not much negative stuff I can say about it. On such a device, the interface will work, and it’ll be all pretty and nice and great.

But not on a desktop.

The first big mistake is that apparantly, the Metro interface is just shoved down your throat and you can’t easily get around it. The “classic” interface with a desktop with icons and a task bar is still there, but is considered an application within the Metro interface, and not one you can go into by default. It’s no secret that running with multiple monitors has not always been optimally supported in Windows (the ever-present lack of native support for a taskbar on those extra monitors is a perfect example of that), but I fear that in Metro, the extra screen space that people like me have come to love can hardly be utilized at all.

Guys, the whole reason why I have more than one screen is that I have more space to put stuff in, not so that I can have the same things only with bigger icons and more empty space (which seems to be the trend that Microsoft has been following lately, along with many others).

Bringing in HTML5/JavaScript/CSS as a platform to develop Metro-applications is language abuse of pretty much the worst possible kind, and using Internet Explorer as the platform to run it on is arguably even worse. I can foresee Microsoft getting serious legal issues because with this, they are once again forcing IE down people’s throat rather than letting you choose which browser to use. The infamous browser selection screen, and especially the debacle that led to its creation, is an issue that is going to roar its head and spew fire like it hasn’t done before.

Just about every single existing application is going to be marked as legacy/outdated in this new Metro interface, and the new application store (yes, yet another one) will again be a perfect opportunity for Microsoft to siphon cash from the pockets of hard-working developers.

The perfectly good explorer-interface from Windows 7 has been desecrated by forcing the infamous Ribbon UI on it. The fact that the world has widely shown its disapproval of the ribbon once again doesn’t seem to bother Microsoft in the least. They’ll do whatever the fuck they like and what the actual users want is certainly none of their concern.

Casual computer users will probably accept the new interface that comes with Windows 8, be it with a bit of getting used to. But unless Windows 8 has at least the option to turn Metro the fuck off and just use the desktop environment that we’ve all come to know and love (which is especially true for power users), Microsoft’s latest stillborn creation will be right up there alongside ME, Vista, and quite possibly, Bob.

Solutions

September 10, 2011 · Posted in Blog, Electronics, Programming · Comment 

Lately, I’ve been putting quite a few hours in a little electronics project. It involves (amongst other things) a bunch of microcontrollers; primarily PIC18F2520 (or probably 18F2420 at a later point; it’s the same except for having less memory and being cheaper) but also an occasional PIC18F1330. These microcontrollers are supposed to talk to eachother using CAN.

CAN is a bus system that has some pretty neat features. It can handle a lot of devices, can achieve pretty good bit rates, it has very good error handling and bus arbitration functions, and so on. It was originally designed for use in vehicles (and in fact, any car manufactured in the last 10 or 20 years or so is largely built around tons of individual devices talking on a CAN bus) but of course there’s a lot of other situations in which the features offered by CAN are useful.

I’ve been trying out the new MPLAB X (which is still in beta). There are some major shortcomings, but overall it’s starting to look like a pretty good IDE, which is nice because I absolutely hate the old MPLAB. Compiling is done using Hi-Tech C.

Now, if you were to ask my opinion on Hi-Tech C a week or two ago, you’d get a pretty negative review. I’ve been having issues with it. Weird issues, like global variables not working (no matter what you write, they always read as 0 unless you access them via a pointer, which is a bit of a stupid and inefficient workaround). I’ve also been running it in Lite mode, rather than Pro, because in Pro mode it uses the big Omniscient Code Generation – an optimization technique which is actually quite good, except that it always seemed to turn out horribly bad code that performed nothing like it was supposed to.

It turned out that all of those issues were caused by the extended instruction set being enabled in the PIC’s configuration bits. What happens is that that bit doesn’t only make a few extra instructions available (8, in fact) that are primarily of interest to a C compiler, bit it also changes the way memory addressing is accomplished. Thus, if the extended instruction set is enabled while the compiler isn’t generating code that uses those extended instructions (or specifically, its way of addressing memory), things go wonky. Big time. Turn the extendend instruction set off, and everything works like a charm (OCG included, cutting the code size in half!). Today, I’m pretty darn happy with Hi-Tech C.

Of course, the user manual doesn’t make a single reference to the extended instruction set (I’d say this is exactly the sort of thing that should be mentioned in the manual, but yeah. It’s not).

Also, for the CAN part, I’ve been using a setup with the MCP2515 CAN controller IC, paired with an MCP2551 transceiver. By my initial look at the datasheets, this should have been easy, until the moment I got to actually using it and had to figure out how the bit timing configuration works (and it would seem that I havn’t been the only person to struggle with this). As it turns out, once you grasp it it’s simple enough, and since I havn’t been able to find a functional calculator tool on the Interwebz (just one for the older MCP2510, which isn’t entirely compatible), I might just find some time to write such a calculator.

Still, with the bit timing issue aside, the packets that one of two CAN nodes is transmitting don’t seem to be making it to the other end, for some reason. That’s a thing to figure out once I have the opportunity to put an oscilloscope in the mix and see what’s going on.