Fucking terrible

May 3, 2009 · Posted in Blog · Comment 

I am NEVER touching anything from Western Digital again.

Well, except maybe for the purpose of destroying it.

I have two of their wretched pieces of shit that they dare to call a hard drive, both roughly a year old. One has completely failed about a month ago and the other one seems close to doing exactly the same. I managed to rescue nearly all data from the first disk, and I’m evacuating the second one right now (to whatever spare disk space I can find; those two disks made up the bulk of my storage space).

Using these pathetic excuses for a piece of hardware is utterly impossible without getting a very strong urge to throw them out a window from the top floor of the highest building you can find.

Die, WD. Die the most slow and painful death you could possibly imagine. Then come back from the grave and die the same death again. Repeat until the end of time.

Theme

April 26, 2009 · Posted in Blog · 1 Comment 

I’ve been playing around with the theme of the site a bit. I felt that the previous theme, while not looking bad at all, was too difficult to read (and too difficult to make stuff appear how I want it to appear). Also, since it was intended for a much older version of the blogging software, things didn’t really work 100% anymore. I’m almost satisfied with this one now, and will probably stick to it :)

Also, don’t forget the post(s) below this one!

Edit (27-04): I’ve tweaked the template a bit further and upgraded the software as well. I’m going to stick with how it is for now :)

Playing

April 26, 2009 · Posted in Electronics · Comment 

Lately I have, largely out of a lack of better things to spend time on, been playing around with PICs a bit. Since you are probably asking questions such as ‘what the hell is a PIC?’, or ‘why does it sound like a Dutch word for penis?’, here’s a short explanation. A PIC is a small chip that is essentially a tiny computer. It has a CPU, memory to store a program in, RAM, and usually a number of peripherals like an UART (a module to communicate on an RS-232 line), USB, timers, EEPROM memory for more long-term storage of data (such as configuration), and so on. They vary from the extremely small PIC10F200, which has only 4 pins that can be used for I/O (say, blinking a LED) to large 32-bit chips that run at 80 MHz or more and have more than 100 pins. The most popular series however are the PIC16, and more recently, the PIC18 series.

As for why it sounds like a Dutch word for penis, I have no idea. PIC could stand for Programmable Integrated Circuit, Peripheral Interface Controller, or a whole lot of similar acronyms (but according to Microchip, it doesn’t really mean anything).

Developing stuff on a PIC is a whole lot different than normally developing software. For starters, you’re not just developing software, but the hardware as well. This means that at least a basic knowledge of electronics is invaluable, and with that comes things like knowing which parts or ICs may be useful for your project and probably at some point you’ll want to be able of designing your own printed circuit board (and making those/having them made for you). Second, it’s great to have software on your PC, but you’d probably rather have the software on the PIC – so you need a programmer. A programmer is a device that does exactly that – it ‘uploads’ software to the PIC. There are lots of programmers on the market, but what I’ve been using so far is the Wisp648 sold by voti.nl, combined with Bumblebee as PC-side software.

The fun part however is the actual programming for the PIC. Microchip offers some free development tools (MPLAB), but I never liked that, and you’re going to be stuck to using assembly. Writing a program in assembly isn’t as bad as it sounds – especially if you have programming experience and the program remains small – but on a larger chip, say, a PIC18F4550, assembly quickly becomes a huge, unmanagable mess. That is when you will realize that a higher programming language would be great, and for this type of thing, C is probably the best choice. There are a number of C compilers for PICs on the market, but most are staggeringly expensive, and come with a lot of proprietary stuff, so you’ll be stuck with that particular package for the remainder of your natural life. There is, however, a great alternative: SDCC, the Small Device C Compiler. It supports all the most common PIC16/PIC18 devices, but there’s a great lack of documentation and source code, so you’ll have to figure out a lot on your own.

Not that figuring out stuff on your own is uncommon: developing hardware (and software) can be pretty much a trial-and-error process.

Installing SDCC is pretty simple, both for Linux and Windows (yes, it works on more than one platform! hooray!). To work, SDCC will also need the gputils package, which is again pretty straight forward to install. I do strongly suggest that you enable the option to include the binaries in the PATH variable in Windows, it makes life easier. After installation, you’ll probably be thinking ‘okay, what next?’ and that’s were it gets funny.

Since you’re doing stuff for an embedded device, this version of C is not something you can really compare to what you use to write software for your PC. Sure, the syntax is identical, and most of the standard C libraries are implemented (printf, math, stdio, …) but that’s about it. Half of the code you write will be directly accessing registers on the PIC (since they control all functions of the device). Half of the time you’ll be looking up stuff in the datasheet (which is usually over 400 pages) and the other half you’ll be wondering how the heck you are going to debug your code – after all it’s running on a small, isolated chip and getting anything at all on your computer screen isn’t quite as easy as with ‘regular’ software. Then there’s the limitations of the device – you probably have a lot of functionality you’d like to include, and only so much I/O pints to work with, and only a limited amount of code memory and RAM. Especially when using C, it’s easy to run out of any of those. Also, everything you’re doing is quite low-level code – you’re directly telling the chip which pins are doing what, handling interrupts, and so on – no fancy multithreading or whatever.

For debugging/testing purposes, I’ve also been playing with this tool. It simulates a PIC processor on your PC and behaves (almost) identical to it. You can see what each register and memory locations (or ‘general-purpose register’) is doing as your program runs, how much time everything is taking, and so on. Of course you can never rely 100% on a simulation (after all, on the PIC there are loads of variables that the simulation tool does not include) but it is extremely useful. Unfortunately it’s not a free tool, but the basic home-use version is only € 29 and it seems to be the best PIC simulator I’ve seen so far (and also by far the most user-friendly, which is great because I want to be developing the software, not spending 3 weeks learning to use the simulation tool).

Altogether there’s an amazingly steep learning curve, but that only makes the satisfaction all the greater when you’ve got your first ‘blink a LED’ (the PIC equivalent of  ‘hello world’) working. And, of course, there’s a huge number of useful things you can do.

Note: as said before, there is an amazing lack of documentation and source code for this kind of stuff. Also for the electronics part: my father works with electronics, so I had already picked up a thing or two, but if you have zero knowledge on this kind of thing, you’re mostly on your own. Depending on how much time I have and whether I feel like it, I might be writing some tutorials and sample code/libraries for use with SDCC, which will probably show up in the menu bar on the right (but when something goes online, it’ll be posted here too, of course :) ).

Towels

April 17, 2009 · Posted in Blog · Comment 

Omg! Two posts in a very short time!

I would just like to make you aware of the fact that, at the time of writing, there are 38 days left until Towel Day (which will be on May 25th). Towel Day is a tribute to, and memorial for, Douglas Adams, the author of (amongst others) the Hitchiker’s Guide to the Galaxy, which, if you handn’t noticed yet, is one of the more brilliant five-part trilogies this world has to offer.

If you hadn’t, I strongly encourage you to read it ;)

(Also, I recently watched the original 1981 TV series, which unfortunately is only 6 episodes. As you can expect from a TV programme from that time, the quality isn’t really what people are used to nowadays, and the books are infinitely much better, but if you liked the books (in particular the first two, because the series more or less covers those) it’s worth checking out.)

Progress

April 17, 2009 · Posted in Blog · Comment 

Article about Windows 7 on Tweakers.net (Dutch)

I (sort of) read the article, and one sentence immediately stood out from the rest:

“De werkbalk is door de Microsoft-ontwikkelaars flink onder handen genomen en het resultaat kan gezien worden als een van de belangrijkste vernieuwingen van Windows.”

English: “The task bar has been drastically overhauled by the Microsoft-developers and the result can be considered one of the most important innovations in Windows.”

Great. A whole new OS release, and the most important new feature is a task bar that looks a little different.

When will Microsoft learn that people are not willing to spend money on a product that only makes progress for the sake of making progress? I mean,  if the taskbar image is the most important thing you can change, you should really consider just not making a new version for a while because apparantly what you have is good as it is.

Just look at Microsoft Office. Personally I’m using Office XP, partly because I can’t be bothered to get a newer version, but also because the one I have works just fine for me. I’m used to how this version works, I can generally find what I need quickly, and it’s easily got all the features I’d ever need to use. Upgrading would mean having to get used to a different interface, having to learn how things have changed since previous versions – not to mention the pricetag – and what do I get in return? A couple new features that I didn’t want anyway? The .docx file format? I don’t even want .docx, .doc is doing what it’s designed for perfectly well, and is in much more widespread use.

The same basic thing goes for Windows Vista or Windows 7. I just can’t see any reason why I’d want to use those over XP. Again, it’d only be a lot of effort to get used to those systems while I’m used to XP and I like working with XP. The only reasonably valid argument I can find for “up”grading is that XP is (relatively) old, but however old it may be, it’s working fine (well – usually – but that goes for any Windows version). And having more of my PC’s resources used up by the OS isn’t really a selling point either (Microsoft advertises that Windows 7 is lightweight and can also run on netbooks – but why does a lightweight OS need to take up 16 gigabytes of hard drive space? XP fits on a single CD for fuck sake, and I can think of a thousand more interesting things to fill my hard drives with).

Other applications are pretty much the same for me. I don’t usually bother installing a patch for a minor upgrade or fix (as long as it’s not a bug or whatever that has been bothering me). If I see there’s a new version I usually check out the changelog first, so that I know if it’s worth bothering to upgrade, and if it is, I know what has actually changed.

Oh well, maybe I’ll just switch to Linux some day. I’m already strongly considering making a dual-boot thingy, partly because some things are just easier to do in Linux. And until then, I ain’t upgrading anything unless it’s of at least some advantage to me to do so.

If it ain’t broke, don’t fix it.

00, 06

March 10, 2009 · Posted in Blog · Comment 

A recent TV show that mentioned something about efficient use of energy – I don’t recall exactly which, but there’s lots of those nowadays – once again made me think about the subject.

People keep searching for more efficient, more clean ways of getting energy. Obviously fossil fuels will only last so long and power needs to come from somewhere. All existing forms of ‘green’ power have their downsides – biogas and related methods still rely on burning stuff, wind power requires ugly structures, solar power is often not efficient enough, and nearly all known methods require so much energy produce that it won’y pay off for a good while to come. And in the meanwhile, the only viable solution we will have for the next 30 or so years, nuclear power, is falsely being regarded as dangerous by many. At the lack of an alternative everybody just sticks to what they know, and mankind happily keeps on consuming.

The real issue however is not energy production. The real issue is not the lack of decent food, water, health care and schooling in the so-called third world countries. The real issue is not the unwillingness of the modern man to reach out and help another man, nor is is it the economy or poor moral values in younger generations. The real issue is simply the source of all those problems: mankind itself.

The human being is above all a selfish creature that seeks nothing but its own pleasure. It will do so by indulging in food, engaging in activities it percieves as fun, and by pursuing the primary goal of any living thing: survival through procreation. In this process it keeps on consuming the natural resources of the planet it lives on without regard of the future, without regard of the ‘big picture’. The result? A heavily over-populated planet, that is in no way mentally prepared to face change.

Shortage of food is not created by a supply that is too small, but by a demand too large. Sickness does not spread due to the lack of a cure, but rather because it gets the perfect chance to do so in a densely populated environment. Lack of sufficient energy and natural resources comes not from a supply that is too small or inefficient, but from overuse of what is available. The problem behind every problem is simply that the human species is too large – but does anyone dare to face it?

No, instead we keep giving to so-called charity and search the cures for diseases, so that our numbers may grow even further and that we live even longer. The weakest aspects of the human mind, most notably morality and pointless fear of the inevitable end, has brought nature’s job of natural selection to a near standstill simply because we cannot stand to see another man die. For billions of years nature has kept a perfect balance on this planet, but at some point one species broke that circle in endless pursuit of larger numbers and longer life. Only a few hundred years ago a man would have been considered very old if he reached the age of 25, whereas if a single person of that age dies nowadays it gets proclaimed as a tragedy.

The solution is simple. I am not sure as to if it is still the case today, but at least once there was a Chinese law forbidding any couple to have more than a single child. Imagine that that would be the case once again, worldwide. In addition, allow anyone to end his or her life if he wishes so, do not attempt to treat an illness that will be fatal anyhow. Stop attempting to improve the duration of life and stop attempting to do so in so-called third-world countries, but let nature do what it is best at for a change.

In a matter of somewhere between 40 and 60 years the world’s human population will have been halved. Global energy usage is at a point where nuclear fusion and/or solar power will easily be capable of sustaining the relatively low needs, and there is no emission at all. Reduced need for space allows forests to recover as well as allow many kinds of animals to flourish once again. Yes, the economy will have “suffered” – but only because of a globally smaller demand – remember that growth for the sake of growth is pointless. Instead of spending 20 or so years waiting for the end a man just accepts his death as a natural part of existence, not as something to be feared; partly because of the realization that an individual who is unable to contribute to society is nothing but a burden to it. However smaller, the quality of life for the remaining human kind is much higher, no longer facing self-caused destruction.

At the present course, there may one day be more efficient forms of producing energy (or rather, obtaining it). Increased availabilty only stimulates use, and the population doubles every hundred or so years – in addition to living longer and longer. Natural resources and food will become scarce and it is only a matter of time before major issues – including war – arise. And it will be either war, harsh environmental conditions, or shortage of food that forcibly kills off most of the precious little planet.

For billions of years the sole purpose – if you can call it a purpose – of life has been nothing but survival and procreation. Finally, life has reached the point where, in order for it to survive, it must realize that endless survival may very well cause extinction, whereas death eventually makes way for survival.

It arrived

February 3, 2009 · Posted in Blog, Random Things · Comment 

Well, I’ve finally got the parcel I mentioned in my previous post.

The box:

The actual content of the box (it was nearly impossible to get the picture sharper, the thing is very small):

For reference, I’ve added a pencil in this picture:

And then, I’m not even going to use it. I made a little mistake with the part number, giving me these instead of a slightly different one (which is the only one I can use).

Shipping madness

January 30, 2009 · Posted in Blog, Random Things · Comment 

Admittedly, two posts within 24 hours is kind of a lot for me. As you may have noticed I have no schedule regarding posts on this site whatsoever, and I just post something whenever I feel like doing so and have a subject to post about. It turns out that that just happened twice in a relatively short time.

Anyway, here’s the deal. Recently, I ordered a load of small parts. As my order was large enough (>€20) shipping is free, which I think is a great policy; now if I forget to order something at one point, I’ll just place a second order, maybe add some extra stuff so it’s at least €20 (spend €10 on stuff and pay a final of €20 with shipping, or just spend €20 on stuff and get shipping free is an easy choice) and be done with it; instead of making sure I added all the correct items. Just because making sure everything is 100% OK is kind of a big deal with >400 small items.

It turns out that they only had 1 piece in stock of an item, however I ordered two. Out of >400, it was the only item that they didn’t have right away, so they shipped out everything else and the last item would be delivered later when they have it. Note that we’re talking about a very very small item here, priced at about € 0,70, and the ‘you might loose it between the coins in your wallet’-kind of small. You’d expect the second one to arrive by regular mail in a bubble-wrap envelope or something. As the first parcel came in, I found the first piece and discovered that I accidently ordered the wrong part number, so that first part goes on the shelf and I don’t really care about whether or not I still get the second one.

I placed a second order with the correct part number, and a couple of other things where I accidently ordered too few, and that follow-up order came in last Tuesday.

Just after I came back upstairs I noticed I have an e-mail. Apparantly they still shipped that one, € 0,70 part to me.

In a ~€ 8 parcel.

Since the shipping cost’s on them, I do sometimes wonder how companies like these ever make profit. I might even make a picture of it when it comes in.

This kind of reminds me of this TDWTF article (however while searching that one again I also came across this forum thread which is infinitely more brilliant, especially the post from a guy named ‘Cyrz’).

Bandwith

January 29, 2009 · Posted in Blog, Random Things · Comment 

As this article (Dutch) says, the American internet provider Cox Communications is planning to loose a lot of customers. If the network is busy, they want to give a lower priority to p2p-traffic. The FCC will probably deal with it quickly, so this company is acting stupid in at least  four different ways:

  1. First, they are giving themselves a bad name and a bad reputation. Existing customers who are faced with this policy will leave, and new customers are scared off at  the idea that they pay for an x amount of bandwith but won’t actually get it if they use too much of  it.
  2. They know, from the example of Comcast, that the FCC will deal with it quickly enough and that this new policy of theirs won’t last long. That makes the previous point, and the next one, even worse.
  3. Therefore, all they are really saying is ‘Hey look guys, our network sucks. It can’t handle it if everyone actually uses what we are promising they can use.’ Of course, that will be equally bad for their customer base as #1.
  4. Cox Communications? Seriously guys, what the fuck is that name supposed to mean? That name even implies that they support p2p use, for downloading pr0nz0rs.

Americans, sometimes… :P

Worse than sucks

January 13, 2009 · Posted in Blog · 1 Comment 

Okay, I’ve just tried out the Windows 7 beta, and here’s my conclusion.

If you think Windows Vista sucks, and you do think so because it’s the truth, please, do not bother to try Windows 7. You’ll be able to count the number of improvements over Vista on one hand, and you’re probably not going to need any fingers.

Seriously, Microsoft. When are you finally going to learn? All you did was rushing Windows 7 because nobody wants Vista. You rushed it so bad that it isn’t really anything new.

Please, Microsoft. Please. Take a few steps back. Take XP as a base and use that for the next edition of Windows. Don’t rush it, don’t add all the graphical bullshit that is really everything Vista/Win7 is, just stick to XP and add the few good things from the newer versions to it (such as DX10 support).

Everybody likes XP because it’s pretty stable, and it just works. I, and many others with me, seriously prefer the classic Windows UI over all the shit that was added since Vista because it’s easy to use, not too much bullshit, it doesn’t look all that bad, and it’s very resource-friendly. The ‘classic’ theme in Vista/Win7 don’t even look anything like it.

So much features in Vista/Win7 are unneeded for most of the people, and the few who do want them always prefer a better 3rd-party tool for the job. If I wanted to encrypt my data, I’d trust an external tool that has proven to be reliable, offers me enough options,  is known not to have any serious flaws or backdoors, and has a good reputation. Instead of that BitLocker thing, because it’s either turned on or off and you don’t really have any idea what’s going on. BitLocker is only as good as the security of the rest of the OS (and considering Microsoft’s reputation, OS security in Windows is something that should never be trusted).

I already know that I’m just going to stick to XP, and if Microsoft continues on this tour, I might swap to openSUSE or some other Linux distro in the long run. Because in the end I want an OS with a GUI that I’m comfortable with to use, that doesn’t eat all of my system’s resources (and trust me that it goes fast with 3 screens) – and therefore offers the features I need and not the features nobody ever uses, and just works. Vista and Windnows 7 offer none of that.

« Previous PageNext Page »