The great evil that isn’t XNA and C# by Max

Anyone who knows me is aware that i’m an avid anti-microsoft person and that i prefer the open-source world and many things affiliated with it. But the fact is that i just recently started looking at C# and XNA and from a developing point of view it doesn’t seem all to bad.

Anyone used to Java will probably feel right at home. Most of the concepts seem to be there as well as some taken from PHP; Like the ability to assign default values to a function parameter and the foreach loop which is just lovely.

The reason why i’m looking at XNA is because of a mandatory course i’m taking at BTH. Otherwise i probably wouldn’t be looking at it in fear of closing myself into an environment i don’t like.

I’m not going to go as far as recommending XNA and C#. But, if you’re for some unknown reason forced into it, i guess you could be worse off.

Posted in Tech at September 3rd, 2010. No Comments.

Beware of deltaco by Max

Today i got tricked by a USB Type A to Mini B cable.  Sadly i can’t, at this moment say exact which model but i’m certain it’s listed on their webpage.

The reason why i was handling one of these monstrosities was simply because i was building a non-specific computer-related thing that was contained within a unspecified box. Through the wall of the box there was a small hole where the cable was supposed to run through. Smaller than both cable ends. This ofcourse mean that i had to cut of one of the end, insert the cable and then solder on a new connector.

Shouldn’t be too hard, i thought. What can go wrong?

Well, after long argous reasoning (not really), and hefty discussion combined with common sense ( happens all the time ).  I cut of the Type A connector; that is, the “normal” usb connector and then skinned the small cables within, clean and crisp. Now i had one end with a Mini B connector and on the other end a bloody stump with four different colored cables.  The standard red, green, white and black. Four different cables i had to reconnect again, in the right order.

Now, before i go on, i _know_ deltaco didn’t intend for their cables to be cut open and then put together again, but this is what existed and one makes due with what one has. And i’m pretty sure that the cable worked for what it was originally intended, but that’s not what this is about.

Right, so the cables were cut and i was supposed to solder them back on a new Type A connector looking exactly like the previous one. To figure out where each color belonged was a simple matter of taking the old, cut-off connector and measure which where went to what color and then soldering the cables in the exact same fashion. Which i did. And guess what?

It worked, perfectly. Suprising, huh?

The issue didn’t appear until i started working on box nr 2;  an exact replica of the previous one. Having another deltaco usb cable, identical to the previous one i did the exact same thing again. That is, except for the part where i measured what color went to what pin on the freshly cut of Type A connector. What i instead did was that i looked at the cable i just soldered and did the exact same thing. Massive misstake.

Naive as i am i thought that the the cables of the same brand, length and model would have the same wiring. Nope. As it turns out, the second one was, in lack of a better word, mirrored. This means — mainly — that the polarity is flipped, and that’s never a good thing.

For those who knows, one can smell if a computer-chip of any sort is burning or burnt in extreme cases there can be smoke. It’s a rather distinctive smell and it has brought pain and panic into IT-peoples hearts for centuries. Today, i was one of those people. Lest we forget.

Having  burnt something of value, one question quickly arose, and it can pretty much be summed as “WTF?”. I quickly realised what had happened after i checked the other Type A connector and i then spent the next couple of hours repairing and remaking some of the things that was working so well up until this point. One would think that a cable created in masses would have the same make, maybe i experienced a fluke. In any case. Todays lesson is: don’t trust USB color-codings, don’t even trust that two cables of the same kind and brand are the same. Well, that is, if they come from Deltaco.

Posted in Rambling, Tech at June 8th, 2010. 2 Comments.