I compile, configure and test the software used on mainstream Linux distributions. I do this on a private distribution (for personal use) and at the moment it consists of slightly more than 1000 (no, this is not a typo) build scripts, which I have written myself. I maintain the init scripts and all package builds in the entire Linux distribution software stack - everything from the kernel, glibc, to the compiler toolchain all the way up to Xorg and KDE. I even wrote a scripted package manager to aid me in my task and automate the process, I haven't switched to it yet but plan to eventually. Needless to say, I know my way around Linux fairly well. Because I package so much of the Linux software stack I also know many of the dirty little secrets we hide from end users behind our crafted packages. Users are often oblivious about how much trouble package maintainers have to go through just to get their favorite application compiled, packaged and ready to be executed.
About 90% of the software projects I encounter are well behaved, well structured and well designed. It's that last 10% I spend 90% of my time with trying to get up and running, for whatever reason. This is what this post is all about - saving time and frustration.
My beef with the current state of open source/free software is the departure from traditional UNIX software engineering principles. Software projects today seem to ignore stuff like FHS (File Hierarchy Standard) and basics of the Unix Philosophy. One rule is - write simple parts connected by clean interfaces. I see this and other principles violated left and right, and blatant violations of FHS are not uncommon. Read the FHS, trust me - it won't take long. This will allow you to understand the beauty of the UNIX filesystem layout, there is practically a directory assigned for everything you might think of, and once you understand it you'll appreciate how elegant it is. People with a background on Windows systems rarely understand nor appreciate why the directory layout looks the way it does on UNIX-like operating systems but once you do I'm sure you'll grow to love the logic behind it. At first glance it looks cryptic, but there's a reason for that - and the benefits are still there today in spite of it's long history. It isn't as complex as you might think. For example, if you've written a library then it belongs in /lib or /usr/lib (depending on what kind of library it is, a core os library would belong in /lib while a less crucial library belongs in /usr/lib). Does your server program need to write data somewhere? Have a look at /var. Is your application a desktop application and need to write data somewhere? Do it in a dot directory somewhere in the users $HOME path. Do you have static data that should be availabe system-wide? Stick it in /usr/share. That's what the FHS is for - it describes the filesystem and what all these directories are meant for.
There are brilliant programmers out there who write excellent programs but some of them haven't taken the time to understand these basics, and thus their programs, brilliant though they might be, behave in undesirable ways. It isn't exactly fun to dig through someones code and patch it to conform to the FHS. For people who package software this makes your application high-maintenance. A piece of advice to software engineers - take a long hard look at the build scripts and .spec files used by distributions to build and package your program, if it's riddled with hacks just to get it packaged then you should probably consider simplifying and correcting the build framework.
If you're using the GNU autotool framework to build your software then make sure it respects all the standard configure switches, and more importantly make really sure that DESTDIR works as it's supposed to, you'd be surprised how many software projects that neglect this particular feature, but it's essential for packaging the program. For aestethic (and some practical) reasons - avoid CamelCase in program names, don't use version numbers in paths - and if you need to then opt for /usr/include/app/$VERSION rather than /usr/include/app-$VERSION, we have pkg-config for a reason - it's handy for locating package-specific directories, and simplifies management of multiple versions of a program or library on the same system - no need to clutter the top level /usr/include directory.
Use relative rather than absolute symlinks for "make install", you don't want symlinks to point to the wrong files which is what will probably happen if your application resides on a mounted filesystem, and if it doesn't then the symlink will be broken. It also makes chroot jails easier - although I wouldn't expect anyone to design their application with this in mind. In the end it's just cleaner and better to always use relative symlinks.
Do NOT change the API unless you also change the major version number. Be patient, and if you desperately want to make changes to your API then wait until you are ready to release the next major version. Why? Because that's what we (downstream) are expecting - API changes in major version changes. Let me clarify why. For example, lets assume your library is widely used by other projects, but you descide to push a major API change in a point release. Oblivious to this change downstream updates to the new point release thinking it's API compatible with the previous point release you made. It will take time before we realize a dozen other applications no longer compile due to the change. Now we have to downgrade and recompile once more. I'd love to tell you that we always read ChangeLog's but sadly some of us just don't have the time.
Do NOT use unstable, in-development libraries and core component. This causes endless misery due to constant breakage. Wait until the API and design has stabilized and please, please don't make dependencies to svn/git/cvs versions. Unless stable tarballs have been released then don't hook your code into it's API. Gnome has always been a real PITA because they do this, and I've occasionally had to pull code from CVS just to get "just the right version" to make it work. I get it - you want the latest and greatest features but please, do not torment downstream with dependencies to unreleased code.
Digitally sign your code, ALWAYS. Make this a habit. While most people who download your code probably won't verify the signature you'll be glad you signed it if your code distribution site is hacked. It happens, and when it does it's one hell of a task to figure out what was tampered with.
On a more personal note I'd want to encourage projects to stick to a single compression format for releases rather than making three or four identical tarballs compressed with different algorithms that need to be signed independently. My suggestion? Stick to gzip. It decompresses faster than any other algorithm and while it's very inefficent when compared to LZMA2 (.xz) you'll only need to do the one tarball and just about everyone will be able to decompress it. A couple of years from now xz might be widespread enough to justify the switch.
ALWAYS include a license. Preferably as file named a COPYING or LICENSE in the top-level directory. A tarball without one is like getting a wrapped present that has a suspicious ticking noise. Sure, it could be just a harmless clock but it could also be a bomb. By including a license you make your intentions clear so we don't have to worry about getting sued for packaging and distributing your program. Use a common and widely used license - legalese isn't always easy to understand so by using a common (and scrutinized) license we can be sure there aren't any hidden surprises behind the wording.
Describe your software and include an official URL for the project. As strange as this might seem a lot of projects neglect these simple details. A short paragraph in a README file is more than enough and it allows us to figure our what it's for because it isn't always obvious. It's hard to identify the purpose of program or library by a name such as libsnx. By also including an official project URL you'll also save us a lot of time trying to search for the upstream distribution website when it's time to update and we can then be sure we've got the right project. Often there are a lot of alternative programs to perform a given task.
Modularity is great. It's encouraged by standard UNIX practices, but as a project grows and becomes increasingly more complex modularity tends to show it's limitations. It isn't always practical to keep 100 modules in sync on the code level, especially if you start making API changes.
Off the top of my head, that's about it for now.
Friday, September 28, 2012
Excellent Games
I'm not what you would call a hardcore gamer, but I do play and I strongly favor the console - mostly because it's more comfortable to lie in bed with the controller rather than sitting in a chair in front of the the computer. Also, console games are more streamlined with less tweaking to be made to get the best experience, specifically the game controls are far more consistent on consoles than on the PC. To be sure, there are a few things you loose out on such as better graphics and game mods, but that's a sacrifice I gladly make. This is my list of games that I highly recommend for those who favor story-driven titles. I'm a Playstation 3 owner so unfortunately I'll only be listing games available for that console, but most of these are also avalable for the Xbox 360.
The Mass Effect games are among the best RPG's ever made. These are without question the cream of the crop among modern console titles. They're extremely polished and beautiful, have an engaging story and have great replay value. (Update: The first Mass Effect was recently released for the PS3 as a PSN download, making the whole series available on the Playstation 3 console. Previously the first Mass Effect game was a Xbox 360 exclusive title)
Fallout 3 and Fallout: New Vegas are great open-world games. The only real complaint I have about these games are how unstable they are. Fallout: New Vegas made vast improvements in stability, but Fallout 3 was horrendously unstable and buggy. That being said these games are so good that I managed to overlook these faults. You can spend hours upon hours playing these titles.
While I'm reluctant to include previous gen console titles in this list the fairly recent release of Metal Gear Solid HD Collection makes the entire game series available on the PS3, including the first PSOne (PSX) Metal Gear Solid game as a PSN download. The graphics of the first game obviously doesn't live up to the standard of current titles, not by a long shot, but the story alone makes it one of the best I've ever played. The HD Collection also makes the Playstation 2 games available in HD, while still not as impressive as Metal Gear Solid 4 (visually) the story alone makes them excellent value. These games are so good they rival Fallout and Mass Effect without breaking a sweat. I have my doubts about the upcoming Metal Gear Solid Rising because Solid Snake has been replaced by Raiden as the protagonist, but I hope it'll be a good game.
Skyrim is simply an awesome game. Much like the Fallout titles it's an open-world game that allows you to go anywhere you feel like going and do the missions you feel like doing. This game is all about exploring and adventure, but unlike Fallout the world has an roughly estimated 12th century setting with swordplay, magic, dragons and a GREAT story. I don't recommend Oblivion though because the leveling system is, in my opinion, fundamentally broken. I didn't even finish the game because of this. A lot of people would disagree, but I would ask these people to consider all the hoops you have to jump through to get a properly leveled character. It sort of ruins the experience when you have to stand and take a beating from a mudcrab for an hour just to level up your blocking skill. Oblivion is still a good game, with plenty of exploration and adventure, but it doesn't hold a candle to Skyrim.
I really enjoy survival horror games and I'm a big fan of the Resident Evil series. As such I am morally obligated to recommend the Dead Space trilogy. When you play these games you turn off the lights, sit back and just enjoy the horror. These are seriously creepy games with a great story line.
Mass Effect
The Mass Effect games are among the best RPG's ever made. These are without question the cream of the crop among modern console titles. They're extremely polished and beautiful, have an engaging story and have great replay value. (Update: The first Mass Effect was recently released for the PS3 as a PSN download, making the whole series available on the Playstation 3 console. Previously the first Mass Effect game was a Xbox 360 exclusive title)
Fallout
Fallout 3 and Fallout: New Vegas are great open-world games. The only real complaint I have about these games are how unstable they are. Fallout: New Vegas made vast improvements in stability, but Fallout 3 was horrendously unstable and buggy. That being said these games are so good that I managed to overlook these faults. You can spend hours upon hours playing these titles.
Metal Gear
While I'm reluctant to include previous gen console titles in this list the fairly recent release of Metal Gear Solid HD Collection makes the entire game series available on the PS3, including the first PSOne (PSX) Metal Gear Solid game as a PSN download. The graphics of the first game obviously doesn't live up to the standard of current titles, not by a long shot, but the story alone makes it one of the best I've ever played. The HD Collection also makes the Playstation 2 games available in HD, while still not as impressive as Metal Gear Solid 4 (visually) the story alone makes them excellent value. These games are so good they rival Fallout and Mass Effect without breaking a sweat. I have my doubts about the upcoming Metal Gear Solid Rising because Solid Snake has been replaced by Raiden as the protagonist, but I hope it'll be a good game.
Skyrim
Skyrim is simply an awesome game. Much like the Fallout titles it's an open-world game that allows you to go anywhere you feel like going and do the missions you feel like doing. This game is all about exploring and adventure, but unlike Fallout the world has an roughly estimated 12th century setting with swordplay, magic, dragons and a GREAT story. I don't recommend Oblivion though because the leveling system is, in my opinion, fundamentally broken. I didn't even finish the game because of this. A lot of people would disagree, but I would ask these people to consider all the hoops you have to jump through to get a properly leveled character. It sort of ruins the experience when you have to stand and take a beating from a mudcrab for an hour just to level up your blocking skill. Oblivion is still a good game, with plenty of exploration and adventure, but it doesn't hold a candle to Skyrim.
Dead Space
I really enjoy survival horror games and I'm a big fan of the Resident Evil series. As such I am morally obligated to recommend the Dead Space trilogy. When you play these games you turn off the lights, sit back and just enjoy the horror. These are seriously creepy games with a great story line.
Friday, March 16, 2012
Atheism and dogma
Argument: Can atheists rationally prove, absolutely, that there is no God? And if they can't, then why are they so dogmatic?
Anyone making the above argument does not understand atheism nor it's position fully. One key point is missing - the burden of proof lies with whomever is making the claim that God does exist. An atheist doesn't claim there is proof for or against the existence of God. When an atheist says there is no God what he probably means is - there is no evidence to support the claim. That is why many of us have such a strong conviction that God doesn't exist.
Neither scientists nor Christians can prove the existence or non-existence of God due to the unfalsifiability of the claim. Scientific theories must be falsifiable to be considered valid. By proof I mean providing evidence produced by the scientific method. Falsification is an important mechanism of the scientific method to separate superstition and pseudoscience from real science.
I'm sure you can find quite a few dogmatic atheists in placs like YouTube claiming they can prove God doesn't exist by, for example, reciting news articles about a baby being struck by lightning ("If God exists, and he is good, then why did he allow this terrible thing to happen?!!".. and so on). Bad events, however, do not prove one way or the other whether God exists (e.g. consider the "God is mysterious" statement). You can't test stuff like that scientifically, you need palpable evidence. This is also when classifications like strong and weak atheism comes into play. These youtubers often have a distinct belief that god doesn't exist (strong atheism) when atheism in general (weak atheism) is defined by it's lack of belief without any claims or denials being made. It's a subtle, but important difference. Ironically, strong atheism has belief-without-proof in common with religion.
So as an atheists can I rationally prove, absolutely, that there is no God? Of course not - no one can. Atheists don't have to prove it because, as I mentioned, the burden of proof lies with the religious folk. It's not simply a matter of copping out and passing the buck either - from an atheist point of view God is a non-factor in the natural world until solid evidence to the contrary is presented, and it never has. Not even once. It doesn't make sense to make claims about something that cannot possibly be known. People can speculate, sure, but that's a far cry from truth.
On a personal note, I call myself an agnostic atheist because I find that it's the most rational position for me. For example, I answer two key questions in the following manner:
Which I guess qualifies me as both atheist and agnostic. There is a lot of overlap between agnosticism and atheism so they are not mutually exclusive. When casually asked if I believe in God I tend to simply say no without elaborating, just to avoid the headaches. I also skip the agnostic part when asked about my lack of faith and simply go with atheist; unless, of course, I'm invested in a deeper conversation about religion. This lazy way of labeling myself as simply an atheist is something I have in common with many others, both weak and strong atheists alike.
Anyone making the above argument does not understand atheism nor it's position fully. One key point is missing - the burden of proof lies with whomever is making the claim that God does exist. An atheist doesn't claim there is proof for or against the existence of God. When an atheist says there is no God what he probably means is - there is no evidence to support the claim. That is why many of us have such a strong conviction that God doesn't exist.
“That which can be asserted without evidence, can be dismissed without evidence.” ― Christopher Hitchens
Neither scientists nor Christians can prove the existence or non-existence of God due to the unfalsifiability of the claim. Scientific theories must be falsifiable to be considered valid. By proof I mean providing evidence produced by the scientific method. Falsification is an important mechanism of the scientific method to separate superstition and pseudoscience from real science.
I'm sure you can find quite a few dogmatic atheists in placs like YouTube claiming they can prove God doesn't exist by, for example, reciting news articles about a baby being struck by lightning ("If God exists, and he is good, then why did he allow this terrible thing to happen?!!".. and so on). Bad events, however, do not prove one way or the other whether God exists (e.g. consider the "God is mysterious" statement). You can't test stuff like that scientifically, you need palpable evidence. This is also when classifications like strong and weak atheism comes into play. These youtubers often have a distinct belief that god doesn't exist (strong atheism) when atheism in general (weak atheism) is defined by it's lack of belief without any claims or denials being made. It's a subtle, but important difference. Ironically, strong atheism has belief-without-proof in common with religion.
So as an atheists can I rationally prove, absolutely, that there is no God? Of course not - no one can. Atheists don't have to prove it because, as I mentioned, the burden of proof lies with the religious folk. It's not simply a matter of copping out and passing the buck either - from an atheist point of view God is a non-factor in the natural world until solid evidence to the contrary is presented, and it never has. Not even once. It doesn't make sense to make claims about something that cannot possibly be known. People can speculate, sure, but that's a far cry from truth.
On a personal note, I call myself an agnostic atheist because I find that it's the most rational position for me. For example, I answer two key questions in the following manner:
Question #1: Do you believe in God?
Answer: No - I see no reason to believe due to lack of evidence. (Atheism)
Question #2: Does God exist?
Answer: I don't know if a god exist - because God is by definition unknowable. (Agnosticism)
Which I guess qualifies me as both atheist and agnostic. There is a lot of overlap between agnosticism and atheism so they are not mutually exclusive. When casually asked if I believe in God I tend to simply say no without elaborating, just to avoid the headaches. I also skip the agnostic part when asked about my lack of faith and simply go with atheist; unless, of course, I'm invested in a deeper conversation about religion. This lazy way of labeling myself as simply an atheist is something I have in common with many others, both weak and strong atheists alike.
Saturday, July 23, 2011
About Trolls
Like many people I occasionally enjoy watching YouTube. As an atheist I particularly enjoy atheist related videos, like those made by AronRa, Thunderf00t, TheThinkingAtheist, BionicDance and philhellenes. So imagine my surprise when Thunderf00t indirectly exposed a troll with his latest video Girl prays to CAUSE Japanese earthquake (he was using bits of her video to make a point and linking to the original in the description of the video). Her video turned out to be very controversial. The only problem is that Thunderf00t happens to be very popular and his subscriber base number in the six digits. As you might imagine, TamTamPamela (the handle of the youtuber in question) got some attention. A metric crapload of attention, and more than she could handle; especially when her personal info was discovered and posted for the world to see, they call this "dropping someone's docs". People were so outraged by her that they had pizzas ordered in her name and delivered to her home, and she probably got more than a few nasty phone calls. For TamTam it was the final straw so she came clean about being a troll to put an end to the mess and shortly thereafter she closed down her YouTube account.
Now, what's interesting to me is that some youtubers rallied to her defense calling her videos satire, even though she specifically came clean as being a troll. There's a difference between satire and trolling. Satire is basically ridicule, irony and sarcasm. Sometimes subtle, sometimes blatant and typically very obvious.
If you've ever been on Usenet and frequented a major newsgroup you will almost certainly have come across more than a few trolls. But to those who are confused about what, exactly, a troll is and what they do - here's my explanation.
It's the girl who sleeps with your boyfriend not because she wants him, or even because she hates you, but because she wants to destroy your relationship. It's the guy who lets the air out of your tires just to mess with you and not out of revenge for something you might have done. It's the kind of person who throws a rock at a bird just because he thinks it's funny and he's also the guy who might enjoy poking a sharp stick at a caged animal. I'm sure most of you know the type, they're mean-spirited people you avoid on a regular basis or simply wish you didn't know. That's what a troll really is. A dictionary lookup of the term internet troll reads as follows "someone who posts controversial and usually irrelevant or off-topic messages in an online community, such as an online discussion forum or chat room, with the intention of baiting other users into an emotional response[1] or to generally disrupt normal on-topic discussion.", what the dictionary doesn't tell you is why they do it, put simply - they get off on it. The only real way to handle a troll is to ignore them, regardless of what bullshit they post. Don't even respond once, because if you give any hint they've got your attention they'll just redouble their efforts. And these assholes can stick around for years.
Why anyone would defend such a person is beyond me. Take this holier-than-thou, pretentious asshole for example. The only reason he's defending TamTamPamela is, I'm guessing, because she's cute or because he's a troll himself. So he has to be the knight in shining armor sticking it to the man (Thunderf00t). Only problem is that TamTamPamela is a troll, she even admitted so herself, and she wasn't doing satire. Way to go, asshat.
Now, what's interesting to me is that some youtubers rallied to her defense calling her videos satire, even though she specifically came clean as being a troll. There's a difference between satire and trolling. Satire is basically ridicule, irony and sarcasm. Sometimes subtle, sometimes blatant and typically very obvious.
If you've ever been on Usenet and frequented a major newsgroup you will almost certainly have come across more than a few trolls. But to those who are confused about what, exactly, a troll is and what they do - here's my explanation.
It's the girl who sleeps with your boyfriend not because she wants him, or even because she hates you, but because she wants to destroy your relationship. It's the guy who lets the air out of your tires just to mess with you and not out of revenge for something you might have done. It's the kind of person who throws a rock at a bird just because he thinks it's funny and he's also the guy who might enjoy poking a sharp stick at a caged animal. I'm sure most of you know the type, they're mean-spirited people you avoid on a regular basis or simply wish you didn't know. That's what a troll really is. A dictionary lookup of the term internet troll reads as follows "someone who posts controversial and usually irrelevant or off-topic messages in an online community, such as an online discussion forum or chat room, with the intention of baiting other users into an emotional response[1] or to generally disrupt normal on-topic discussion.", what the dictionary doesn't tell you is why they do it, put simply - they get off on it. The only real way to handle a troll is to ignore them, regardless of what bullshit they post. Don't even respond once, because if you give any hint they've got your attention they'll just redouble their efforts. And these assholes can stick around for years.
Why anyone would defend such a person is beyond me. Take this holier-than-thou, pretentious asshole for example. The only reason he's defending TamTamPamela is, I'm guessing, because she's cute or because he's a troll himself. So he has to be the knight in shining armor sticking it to the man (Thunderf00t). Only problem is that TamTamPamela is a troll, she even admitted so herself, and she wasn't doing satire. Way to go, asshat.
On Delphi 2010
I don't often use Windows for anything significant at home except for playing a handful of games (I generally prefer consoles like the PS3). Some odd exceptions are video editing/encoding with VirtualDub and on certain rare occasions even programming. For programming I like Delphi in particular. Not because I have any serious projects - work related or otherwise - but because I just have fun doing it. The first time I did some real programming was on MS-DOS with Turbo Pascal (BBS related hacking) and later I went on to use Delphi on Windows. Delphi 3 was the first version I used on Windows and I later upgraded to Delphi 7 after a short period of using 6 (the free version). To give you an example, my last project was a MDI code editor for programmers with a built in IRC client, mail client, hex editor and syntax highlighting for dozens of languages. It even had RSA encryption for public key cryptography and AES for symmetric encryption as well as SHA hashing (all encryption based on TPLockBox components). It was all for fun you understand, and I never really finished it, although it was perfectly usable for my own purposes. All of it contained in a single executable of about 600kb in size, it used .ini files for settings so it could carry it's configuration along on a USB thumbdrive. Fun eh? Anyway, I'm getting carried away..
Not too long ago I got my hands on a copy of Delphi 2010... interesting I thought, could it still be as good for RAD programming as I remembered it? Sadly no. Delphi 2010 doesn't have the polish 7 had. The help system, for example, is mostly useless. In Delphi 7 you could place the cursor on just about any object property, hit F1, and you would have all the information you needed instantly pop up about that particular property. Embarcadero redesigned the help system completely and now you often just get a (mostly) empty page, and sometimes the help page only shows you C++ specific information. Not too helpful if all you do is Object Pascal.
2010 also has a lot more bugs, on more than one occasion I've encountered a bug that more or less locks delphi up with an error that says something along the lines of "can't set focus on invisible Window", I've had seemingly random form errors when I've used TListView's that produce broken executables. Simply restarting Delphi and recompiling fixes the problem, embarrasing, but this is just one of several wierd bugs I never encountered in Delphi 7. 2010 also has a crapload of pointless junk added to it, like Mono and Gtk#. I've never even seen a serious attempt at making applications on the Mono platform. Embarcadero's Delphi also uses a lot more Microsoft technologies than it used to, it even installs a minimalistic version of Visual Studio for reasons I fail to understand, apparently it augments Delphi in some fashion. And the previously mentioned (and useless) help system, which I believe is based on something called Microsoft Document Explorer. Microsoft has retired the old .hlp system in Vista/7 so I understand why they've changed it, but considering how poorly the new one works, I think Embarcadero should've developed their own documentation system.
Delphi 2010 is still a fairly decent environment, but it's a far cry from the Delphi I used to know. If you're getting nostalgic and feel like doing some hacking on Embarcadero's Delphi, I'd advise you to just let it go - It'll only depress you if you came from Delphi 7 or earlier. Admittedly, Embarcadero has added some really cool features, but what use are they if they couldn't even get the basics right?
Thumbs down.
Not too long ago I got my hands on a copy of Delphi 2010... interesting I thought, could it still be as good for RAD programming as I remembered it? Sadly no. Delphi 2010 doesn't have the polish 7 had. The help system, for example, is mostly useless. In Delphi 7 you could place the cursor on just about any object property, hit F1, and you would have all the information you needed instantly pop up about that particular property. Embarcadero redesigned the help system completely and now you often just get a (mostly) empty page, and sometimes the help page only shows you C++ specific information. Not too helpful if all you do is Object Pascal.
2010 also has a lot more bugs, on more than one occasion I've encountered a bug that more or less locks delphi up with an error that says something along the lines of "can't set focus on invisible Window", I've had seemingly random form errors when I've used TListView's that produce broken executables. Simply restarting Delphi and recompiling fixes the problem, embarrasing, but this is just one of several wierd bugs I never encountered in Delphi 7. 2010 also has a crapload of pointless junk added to it, like Mono and Gtk#. I've never even seen a serious attempt at making applications on the Mono platform. Embarcadero's Delphi also uses a lot more Microsoft technologies than it used to, it even installs a minimalistic version of Visual Studio for reasons I fail to understand, apparently it augments Delphi in some fashion. And the previously mentioned (and useless) help system, which I believe is based on something called Microsoft Document Explorer. Microsoft has retired the old .hlp system in Vista/7 so I understand why they've changed it, but considering how poorly the new one works, I think Embarcadero should've developed their own documentation system.
Delphi 2010 is still a fairly decent environment, but it's a far cry from the Delphi I used to know. If you're getting nostalgic and feel like doing some hacking on Embarcadero's Delphi, I'd advise you to just let it go - It'll only depress you if you came from Delphi 7 or earlier. Admittedly, Embarcadero has added some really cool features, but what use are they if they couldn't even get the basics right?
Thumbs down.
Monday, January 4, 2010
CAT-5e vs. CAT-6
In an effort to improve network performance on my home network I did some cable testing. I was curious whether or not it was worth spending a little extra money to buy CAT-6 cable instead of CAT-5e - in short, no, it isn't. On my network I have an Linksys WRT610n router, my main computer, a small Mini-ITX server and a Laptop - all of which have Gigabit ethernet interfaces. The WRT610n is a Wireless-N router equipped with a 4-port gigabit switch. My testing was done between the Mini-ITX server (a VIA EPIA m700 clocked at 1GHz on a C7 processor with a 2-port integrated VIA Velocity ethernet controller). The via-velocity driver had to be patched to add NAPI support and some other fixes. Beyond that everything was running vanilla Linux without tweaking. My main computer has a 2-port integrated RealTek 8111C/DL ethernet controller on the mobo.
The parameters I used were "spray -l 8828 -c 100000 -d 1 10.10.10.10". This command sends 100000 packets with a length of 8828 bytes and a 1 millisecond delay between packets. 8828 bytes was literally the largest packet i could send - down to the byte - without experiencing packet loss. It's worth noting that I also had to use the 1 millisecond delay to avoid packet loss. Without it the hardware simply couldn't cope.
CAT-5e
Run #1:
Run #2:
Run #3:
CAT-6
Run #1:
Run #2:
Run #3:
As you can see CAT-6 didn't give me a performance boost and that's probably because there are bottlenecks preventing better speeds. The bottlenecks might be anything from the router, the ethernet controllers or their drivers. So there you have it. CAT-5e should serve you just as well as CAT-6 unless you have hardware capable of reaching optimal Gigabit ethernet performance. This is very unlikely unless you buy very expensive gear. The theoretical limit of Gigabit ethernet is about 125MB/s, on my LAN I only reached about 96MB/s. These ethernet controllers were integrated on the motherboard so that's what most people would use, but you could spend some cash on expensive Intel adapters with dedicated processors for packet processing. It would probably give you a boost - but few people would do this, and I doubt many would even go as far as I did and patch the via-velocity driver (which is known to suck ass).
Even if you do spend some extra cash on high-end ethernet adapters you still have to account for disk I/O speeds which will also be a limiting factor during file transfer (but it wasn't in my test because spray doesn't read nor write to disk). I was only able to reach about 50MB/s during a file transfer which is about half of the 96MB/s I got using spray, and that's probably because of the disk I/O bottleneck on both ends.
Update1: I conducted a new test (on CAT-6) in which I replaced the Linksys router with a Netgear Gigabit switch, so now I get about 113MB/s and the test finishes about 2 seconds faster, from about 9 down to 7 seconds for transferring 100000 packets of 8828 in length. I never tested with CAT-5e to see if I've exceeded the cable limit. Here's the output:
So the conclusion still stands, don't worry about CAT-5e vs CAT-6 because there are almost definitely bigger bottlenecks elsewhere.
Update2: This article summed it up very well.
Update3 (2016-09-20): I've done a lot more testing since I first published this post and since then I've bought more powerful hardware. My router is now a Ubiquiti EdgeRouter PoE, the switch is an HP 1820-8G (Layer 2) - a convenient accessory to my HP MicroServer Gen8 (dual Broadcom adapters) running CentOS 7 and LACP truncated ports. My client computer is a dual processor HP Z820 Workstation with integrated Intel adapters (only one is used in testing). This time around I did benchmarks with iperf3 rather than the aging spray and I used iperf's --format parameter to get the results in KBytes to make a comparison to the old results easier. Here's the output:
I've managed to improve performance a little by getting better hardware and still the cabling is pretty much the same (CAT-6). In my first run of tests I managed to reach about 750Mbit, the second time i reached about 880Mbit and finally in this latest test just about 950Mbit. At this point there isn't all that much more I can do and the performance gains get smaller and smaller. At work I did rudimentary gigabit performance testing over CAT-5 and managed to reach about 960Mbit (albeit with high end networking gear, far better than I have at home) so even cables that old can still stand up very well today. This time, I did get around to testing a CAT-5e cable with my current hardware and the results are as expected:
The parameters I used were "spray -l 8828 -c 100000 -d 1 10.10.10.10". This command sends 100000 packets with a length of 8828 bytes and a 1 millisecond delay between packets. 8828 bytes was literally the largest packet i could send - down to the byte - without experiencing packet loss. It's worth noting that I also had to use the 1 millisecond delay to avoid packet loss. Without it the hardware simply couldn't cope.
CAT-5e
Run #1:
sending 100000 packets of length 8828 to 10.10.10.10...
in 9.20 seconds elapsed time,
0 packets (0.00%) dropped.
Sent: 10866 packets/sec, 95932.7 KBytes/sec
Recvd: 10803 packets/sec, 95369.5 KBytes/sec
Run #2:
sending 100000 packets of length 8828 to 10.10.10.10...
in 9.17 seconds elapsed time,
0 packets (0.00%) dropped.
Sent: 10901 packets/sec, 96236.3 KBytes/sec
Recvd: 10837 packets/sec, 95669.5 KBytes/sec
Run #3:
sending 100000 packets of length 8828 to 10.10.10.10...
in 9.16 seconds elapsed time,
0 packets (0.00%) dropped.
Sent: 10914 packets/sec, 96350.9 KBytes/sec
Recvd: 10849 packets/sec, 95782.7 KBytes/sec
CAT-6
Run #1:
sending 100000 packets of length 8828 to 10.10.10.10...
in 9.11 seconds elapsed time,
0 packets (0.00%) dropped.
Sent: 10976 packets/sec, 96900.9 KBytes/sec
Recvd: 10911 packets/sec, 96326.6 KBytes/sec
Run #2:
sending 100000 packets of length 8828 to 10.10.10.10...
in 9.17 seconds elapsed time,
0 packets (0.00%) dropped.
Sent: 10903 packets/sec, 96252.9 KBytes/sec
Recvd: 10838 packets/sec, 95685.9 KBytes/sec
Run #3:
sending 100000 packets of length 8828 to 10.10.10.10...
in 9.24 seconds elapsed time,
0 packets (0.00%) dropped.
Sent: 10821 packets/sec, 95536.1 KBytes/sec
Recvd: 10758 packets/sec, 94977.2 KBytes/sec
As you can see CAT-6 didn't give me a performance boost and that's probably because there are bottlenecks preventing better speeds. The bottlenecks might be anything from the router, the ethernet controllers or their drivers. So there you have it. CAT-5e should serve you just as well as CAT-6 unless you have hardware capable of reaching optimal Gigabit ethernet performance. This is very unlikely unless you buy very expensive gear. The theoretical limit of Gigabit ethernet is about 125MB/s, on my LAN I only reached about 96MB/s. These ethernet controllers were integrated on the motherboard so that's what most people would use, but you could spend some cash on expensive Intel adapters with dedicated processors for packet processing. It would probably give you a boost - but few people would do this, and I doubt many would even go as far as I did and patch the via-velocity driver (which is known to suck ass).
Even if you do spend some extra cash on high-end ethernet adapters you still have to account for disk I/O speeds which will also be a limiting factor during file transfer (but it wasn't in my test because spray doesn't read nor write to disk). I was only able to reach about 50MB/s during a file transfer which is about half of the 96MB/s I got using spray, and that's probably because of the disk I/O bottleneck on both ends.
Update1: I conducted a new test (on CAT-6) in which I replaced the Linksys router with a Netgear Gigabit switch, so now I get about 113MB/s and the test finishes about 2 seconds faster, from about 9 down to 7 seconds for transferring 100000 packets of 8828 in length. I never tested with CAT-5e to see if I've exceeded the cable limit. Here's the output:
sending 100000 packets of length 8828 to 10.10.10.10...
in 7.84 seconds elapsed time,
0 packets (0.00%) dropped.
Sent: 12760 packets/sec, 112645.5 KBytes/sec
Recvd: 12851 packets/sec, 113451.6 KBytes/sec
So the conclusion still stands, don't worry about CAT-5e vs CAT-6 because there are almost definitely bigger bottlenecks elsewhere.
Update2: This article summed it up very well.
Update3 (2016-09-20): I've done a lot more testing since I first published this post and since then I've bought more powerful hardware. My router is now a Ubiquiti EdgeRouter PoE, the switch is an HP 1820-8G (Layer 2) - a convenient accessory to my HP MicroServer Gen8 (dual Broadcom adapters) running CentOS 7 and LACP truncated ports. My client computer is a dual processor HP Z820 Workstation with integrated Intel adapters (only one is used in testing). This time around I did benchmarks with iperf3 rather than the aging spray and I used iperf's --format parameter to get the results in KBytes to make a comparison to the old results easier. Here's the output:
Connecting to host 10.10.10.10, port 5201 [ 4] local 10.10.10.193 port 49270 connected to 10.10.10.10 port 5201 [ ID] Interval Transfer Bandwidth [ 4] 0.00-1.00 sec 112 MBytes 114144 KBytes/sec [ 4] 1.00-2.02 sec 115 MBytes 115755 KBytes/sec [ 4] 2.02-3.00 sec 112 MBytes 115820 KBytes/sec [ 4] 3.00-4.00 sec 113 MBytes 115781 KBytes/sec [ 4] 4.00-5.00 sec 113 MBytes 115702 KBytes/sec [ 4] 5.00-6.00 sec 113 MBytes 115769 KBytes/sec [ 4] 6.00-7.00 sec 113 MBytes 115678 KBytes/sec [ 4] 7.00-8.00 sec 113 MBytes 115793 KBytes/sec [ 4] 8.00-9.01 sec 113 MBytes 115678 KBytes/sec [ 4] 9.01-10.00 sec 113 MBytes 115769 KBytes/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth [ 4] 0.00-10.00 sec 1.10 GBytes 115589 KBytes/sec sender [ 4] 0.00-10.00 sec 1.10 GBytes 115589 KBytes/sec receive r iperf Done.
I've managed to improve performance a little by getting better hardware and still the cabling is pretty much the same (CAT-6). In my first run of tests I managed to reach about 750Mbit, the second time i reached about 880Mbit and finally in this latest test just about 950Mbit. At this point there isn't all that much more I can do and the performance gains get smaller and smaller. At work I did rudimentary gigabit performance testing over CAT-5 and managed to reach about 960Mbit (albeit with high end networking gear, far better than I have at home) so even cables that old can still stand up very well today. This time, I did get around to testing a CAT-5e cable with my current hardware and the results are as expected:
Connecting to host 10.10.10.10, port 5201 [ 4] local 10.10.10.193 port 49342 connected to 10.10.10.10 port 5201 [ ID] Interval Transfer Bandwidth [ 4] 0.00-1.01 sec 114 MBytes 114619 KBytes/sec [ 4] 1.01-2.01 sec 113 MBytes 115513 KBytes/sec [ 4] 2.01-3.01 sec 113 MBytes 115769 KBytes/sec [ 4] 3.01-4.01 sec 113 MBytes 115641 KBytes/sec [ 4] 4.01-5.01 sec 113 MBytes 115690 KBytes/sec [ 4] 5.01-6.01 sec 113 MBytes 115641 KBytes/sec [ 4] 6.01-7.01 sec 113 MBytes 115641 KBytes/sec [ 4] 7.01-8.01 sec 113 MBytes 115769 KBytes/sec [ 4] 8.01-9.01 sec 113 MBytes 115641 KBytes/sec [ 4] 9.01-10.00 sec 113 MBytes 115641 KBytes/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth [ 4] 0.00-10.00 sec 1.10 GBytes 115555 KBytes/sec sender [ 4] 0.00-10.00 sec 1.10 GBytes 115555 KBytes/sec receive r iperf Done.Pretty much the same, about 950Mbit. So there you have it, confirmed several times over - hardware is generally what gets you performance, not cables. Once you get close to the gigabit speed limit there's also no point in investing in more expensive gear to get even further because you'll be paying through the nose just to get those extra few megabits - at that point the main argument for buying better gear is features (VLAN support for example) and long-term stability. Of course, 10Gbit ethernet is a different matter - old CAT-5 cabling should (in theory) start experiencing some serious packet loss but for me that remains untested.
Saturday, June 13, 2009
Mono - does it suck?
I just stumbled across an amusing rant in my RSS reader: Here we go again - Why Mono doesn't suck. Why do I find it amusing? Because this is probably the most disillusioned rant I've read in years. It goes from ranting about "anti-Mono movements", "Software Terrorism" to quoting Thomas Jefferson to accusations about persecution. Many gems in this piece I tell you. Extremist and bias is what I peg this sort of thing as, and it really is quite funny. He starts by claiming that he'll address certain points of concern like why Mono is not a threat to free software. Of course, in the end, he does no such thing.
Subscribe to:
Posts (Atom)