<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://www.skepticats.com/LnBlog/themes/default/styles/rss.css" ?>
<rss version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/">
<channel>
<link>http://linlog.skepticats.com/feeds/Rants_news.xml</link>
<title>LinLog</title>
<description>Linux, Programming, and Computing in General</description>
<generator>LnBlog 1.0.0</generator>
<item>
<title>Coder self-esteem  </title>
<link>http://linlog.skepticats.com/entries/2012/01/Coder_self-esteem.php</link>
<description>
&lt;p&gt;You know, I've been making my a living writing software for over 10 years now.  If my resume is any indication, I'm pretty good at it.  But every now and then I still read something that gives me that. just for a minute, like maybe I've just been fooling myself all these years, like I'm actually completely inadequate as a software developer.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://games.slashdot.org/story/12/01/01/0148246/mame-running-in-chrome&quot;&gt;This Slashdot article&lt;/a&gt; gave me such a feeling.  It links to a Google case study that involved porting &lt;a href=&quot;http://mamedev.org/&quot;&gt;MAME&lt;/a&gt; to the Chrome Native Client.  The summary ends with this quote from the article: &amp;quot;The port of MAME was relatively challenging; combined with figuring out how to port SDL-based games and load resources in Native Client, the overall effort took us about 4 days to complete.&amp;quot;&lt;/p&gt;&lt;p&gt;Now, I don't follow Chrome development at all, so when I read this, I had absolutely no idea what the Native Client actually was.  My initial guess was that it was probably some API to access native libraries or hardware from JavaScript, or something like that.  So it sounded like &amp;quot;porting MAME&amp;quot; would entail porting the code to a different programming language, or a different set of APIs for audio and video, or some similar.  &lt;/p&gt;&lt;p&gt;That sounds like a pretty huge undertaking to me.  And they did it in &lt;em&gt;four days&lt;/em&gt;?!?  Wow!  I know Google is supposed to be all about hiring the best and the brightest, but that's just ridiculous.  I mean, that would take me &lt;em&gt;months&lt;/em&gt; to finish!  And even if I was already familiar with the internal workings of MAME and Chrome, it would still be a matter of weeks, not days.  How did they do it?  Are they really &lt;em&gt;that&lt;/em&gt; good?  Am I just some third-rate hack by comparison?&lt;/p&gt;&lt;p&gt;Well...turns out they're not actually &lt;em&gt;that&lt;/em&gt; good.  &lt;a href=&quot;http://games.slashdot.org/comments.pl?sid=2599082&amp;amp;cid=38555290&quot;&gt;This comment&lt;/a&gt; on the article sums it up nicely.  Turns out that the Native Client isn't actually a totally different API, but presents a POSIX-like API with support for compilers and build tools.  So really, this was less like porting MAME to something totally new and more like making it run on a different operating system.  And they didn't even do a &lt;em&gt;real&lt;/em&gt; production-quality port.  Instead, they simly removed several problematic parts of the code and just sort of &amp;quot;made it work.&amp;quot;  Granted, that's still a pretty impressive amount to accomplish in only 4 days, but it's hardly the super-human feat it seemed a first.&lt;/p&gt;&lt;p&gt;This sort of story is one of the things that's always bothered me about the culture of software development - it's full of tall tales.  Listening to the stories people tell, you'd think everyone was building big, impressive programs in a couple of days.  It's not until you pry for details that you realize that the impressive sounding thing is actually little more than a prototype.  Sure, Bob may have built a working C compiler over the weekend, but he doesn't mention that it can only reliably compile &amp;quot;Hello, world&amp;quot; so far.  &lt;/p&gt;&lt;p&gt;It's almost a lie by omission - you report a truncated version of your accomplishment and rely on an implicit comparison to something much more involved to make you sound super-human.  And I say &amp;quot;almost&amp;quot; because it's not just self-aggrandizers doing this.  In many cases, the tale just grows in the telling.  This case is an excellent example - Slashdot took an impressive sounding quote, stuck it in a brief summary, and made the whole thing sound bigger than it was.&lt;/p&gt;&lt;p&gt;I sometimes wonder what effect this sort of rhetoric has on beginning programmers.  Do they find it inspirational?  Does it make them want to become the &amp;quot;programming god&amp;quot; who accomplished this sounds-more-impressive-than-it-is feat?  Or is it discouraging?  Do they hear these stories and think, &amp;quot;I'd never be able to do something like that.&amp;quot;&lt;/p&gt;&lt;p&gt;Looking back, I think that it was kind of a progression for me.  When I was first learning to code, those stories sounded cool - &lt;em&gt;I&lt;/em&gt; could be the guy telling them one day.  Then, after a few years in the industry, they started to be discouraging.  I mean, I'd been doing this for &lt;em&gt;years&lt;/em&gt; and I &lt;em&gt;still&lt;/em&gt; wasn't the guy in those stories.  Now I'm over ten years in and I'm just skeptical.  Whenever I hear one of those stories, my first thought is, &amp;quot;So what's the catch?&amp;quot;  (Because, let's face it, there's &lt;em&gt;always&lt;/em&gt; a catch.)  &lt;/p&gt;&lt;p&gt;And the worst part is, I don't even know if that story should be inspiring or just sad.&lt;/p&gt;
</description>
<author>pageer@skepticats.com (Peter Geer)</author>
<comments>http://linlog.skepticats.com/entries/2012/01/06_2236/comments/</comments>
<guid>http://linlog.skepticats.com/entries/2012/01/06_2236/</guid>
</item>
<item>
<title>Pathological PHP   </title>
<link>http://linlog.skepticats.com/entries/2011/11/Pathological_PHP.php</link>
<description>
&lt;p&gt;You know what annoys me?  People with crazy ideas.  Especially when they pimp them like crazy.&lt;/p&gt;&lt;p&gt;That's why &lt;a href=&quot;http://www.dreamincode.net/forums/topic/198226-code-separation/&quot;&gt;this tutorial on &amp;quot;code separation&amp;quot;&lt;/a&gt; from a web forum I occasionally visit annoys me so much.  The author links to this thing like his life depends on it.  Whenever somebody has the nerve to post a code snippet that has both HTML and PHP in it, he brings it up.  Even if the code is just echoing a variable inside an HTML block.  It's ridiculous.  &lt;/p&gt;&lt;p&gt;Don't get the wrong idea - separation of concerns is obviously a good thing.  If you're outputting HTML and querying the database in the same file, you're doing things wrong.  But this guy takes it to absurd lengths and insists that you should &lt;em&gt;never&lt;/em&gt; have &lt;em&gt;any&lt;/em&gt; PHP code mixed in with your HTML.  Not even echo statements.&lt;/p&gt;&lt;p&gt;The real kicker is the content of this &amp;quot;tutorial&amp;quot;.  It's basically a half-baked template system that does nothing but string replacement of pre-defined placeholders.  At best, it grossly over simplifies the problem.  I suppose it does demonstrate that it's possible to output a page without having HTML and PHP in the same file (as if anyone really doubted that), but that's about it.&lt;/p&gt;&lt;p&gt;The thing that really bothers me about this approach is that the author promotes it results in code that's easier to understand than code that has both PHP and HTML in it.  Except that it's not.  The guy apparently just has a pathological fear of having two different languages in the same file.  it's completely irrational.&lt;/p&gt;&lt;p&gt;The problem with his approach is that it doesn't actually &lt;em&gt;solve&lt;/em&gt; the problem, but just moves it.  Sure, basic replacement like that it's fine for simple cases, but as soon as the requirements for your markup get more complicated, things blow up.  For example, how do you do conditionals?  Well, you have another template file and you do a check in your controller for which one to inject into the page.  What about loops?  Well, you have a template file for the loop content and you run the actual loop in your controller, build up the output, and inject that into the page. &lt;/p&gt;&lt;p&gt;The net result?  What would normally be a fairly simple page consisting of one template with a loop and two conditionals is now spread across six template (one main template, one for the loop body, and two for each if statement) and pushes all the display logic into the controller.  So instead of one &amp;quot;messy&amp;quot; template to sort through, you now have a seven-file maze that accomplishes the same thing.  &lt;/p&gt;&lt;p&gt;I find it difficult to see how this is any sort of improvement.  At best, it's just trading one type of complexity for another in the name of some abstract principle that mixing code and markup is evil.  Of course, if you want to follow that principle, you could always go the sane route and just use something like &lt;a href=&quot;http://www.smarty.net/&quot;&gt;Smarty&lt;/a&gt; instead.  But let's be honest - that's just using PHP code with a slightly different syntax.  It may be useful in some cases, but it's not really fundamentally different from just writing your template files in PHP.&lt;/p&gt;&lt;p&gt;Personally, I've come to be a believer in keeping things simple.  PHP &lt;em&gt;is&lt;/em&gt; a template system.  It was &lt;em&gt;originally designed&lt;/em&gt; as a template system.  It's good at it.  So there's no need to introduce additional layers of template abstraction - just stick with PHP.  There may be cases where things like Smarty are useful, but they're far from necessary.  And the half-baked templating systems like those advocated in that tutorial are just intellectual abortions.  There's no need to reinvent a less functional version of the wheel when you can just use a working, tested wheel.&lt;/p&gt;
</description>
<author>pageer@skepticats.com (Peter Geer)</author>
<comments>http://linlog.skepticats.com/entries/2011/11/28_1915/comments/</comments>
<guid>http://linlog.skepticats.com/entries/2011/11/28_1915/</guid>
</item>
<item>
<title>Post-vacation unhappiness   </title>
<link>http://linlog.skepticats.com/entries/2010/08/Post-vacation_unhappiness.php</link>
<description>
&lt;p&gt;On the heels of the &lt;a href=&quot;http://linlog.skepticats.com/entries/2010/07/Things_that_make_me_happy.php&quot;&gt;things that make me happy&lt;/a&gt;, here's something that makes me not so happy: when half your team quits while you're on vacation!&lt;/p&gt;&lt;p&gt;I spent the last week of July in Cape Cod, staying in a cabin by the beach.  It was very nice.  We relaxed a bit, saw some sites, did some shopping (they have a kick-ass used book store on Main St. in Hyannis), and generally enjoyed it a great deal.  It was nice to unplug for a while - I only used my laptop on twice all week, both times for less than an hour.&lt;/p&gt;&lt;p&gt;And what do I discover when I get back?  Our engineering team is deserting me.  We only had three software engineers (including me), one Flash designer, and one QA person.  Turns out both of the other engineers gave their notice while I was gone.  So now it's just me.  Sigh....  &lt;/p&gt;&lt;p&gt;I don't blame them - you've got to look out for your own career - but it leaves us in a really bad place.  Plus I'll miss having them around the office to talk to.  But on the up side, it won't be hard to stay in touch - they're both going to the same company, which is located in the same office park we're in now.&lt;/p&gt;
</description>
<author>pageer@skepticats.com (Peter Geer)</author>
<slash:comments>5</slash:comments>
<comments>http://linlog.skepticats.com/entries/2010/08/08_1845/comments/</comments>
<wfw:commentRss>http://linlog.skepticats.com/entries/2010/08/08_1845/comments/comments.xml</wfw:commentRss>
<guid>http://linlog.skepticats.com/entries/2010/08/08_1845/</guid>
</item>
<item>
<title>Making my games work  </title>
<link>http://linlog.skepticats.com/entries/2010/08/Making_my_games_work.php</link>
<description>
&lt;p&gt;Despite not considering myself a &amp;quot;gamer&amp;quot; (with the exception of &lt;a href=&quot;http://wesnoth.org/&quot;&gt;Battle for Wesnoth&lt;/a&gt;), I do have a bit of a weakness for &amp;quot;vintage&amp;quot; games, by which I mean the ones I played when I was in high-school and college.  While I don't have much time for games anymore, what with full-time employment and home ownership, I still like to come back to those old every now and then.  &lt;/p&gt;&lt;p&gt;Well, when I tried to fire up my PlayStation emulator, &lt;a href=&quot;http://epsxe.com/&quot;&gt;ePSXe&lt;/a&gt;, to mess around with my old copy of &lt;em&gt;Final Fantasy Tactics&lt;/em&gt;, I ran into a problem - I no longer have GTK+ 1.2 installed!  Apparently it was removed when I upgraded to Ubuntu 10.04 (or possibly even 9.10, I'm not sure).  However, according to &lt;a href=&quot;https://bugs.launchpad.net/ubuntu/+source/gtk+1.2/+bug/478219&quot;&gt;this LaunchPad bug&lt;/a&gt;, this particular issue is by design and will not be fixed.  That kind of stinks, because I have several old closed-source Linux-based games that depend in some way on GTK+ 1.2 (often for the Loki installer).  &lt;/p&gt;&lt;p&gt;This sort of thing is a little bit of a sore spot for me, and has been for some time.  On the one hand, I can understand te Ubuntu team's position: GTK+ 1.2 is &lt;em&gt;really&lt;/em&gt; old and has not been supported for some time.  You really shouldn't be using it anyway, so there's not much reason for them to expend any effort on it.&lt;/p&gt;&lt;p&gt;On the other hand, how much effort is it to maintain a package that's no longer being updated?  Why not at least make it available for those who need it?  This is the sort of user-hostile thinking that's always bothered me about the open-source community.  There's hardly any compatibility between anything.  Binary compatibility between library version is sketchy, as is package compatibility between distributions.  Even source compatibility breaks every few years as build tools and libraries evolve.  Ever try to compile a 10-year-old program with a non-trivial build process?  Good luck.&lt;/p&gt;&lt;p&gt;And that seems to be the attitude - &amp;quot;Good luck!  You're on your own.&amp;quot;  It's open-source, so you can always go out and fix it yourself, if you're a programmer, or hire someone to do it for you otherwise.  And while it's absolutely great that you can do that, should that really be an excuse for not giving users what they want or need?  Should the community &lt;em&gt;have&lt;/em&gt; to do it themselves when it's something that would be relatively easy for the project maintainers to set up?&lt;/p&gt;&lt;p&gt;Not that I can blame them.  As frustrating as decisions like this can be, you can't look a gift horse in the mouth.  The Ubuntu team is providing a high-quality product at no cost and with no strings attached.  They don't owe me a thing.  Which, I suppose, is why it's so great that members of the community can fix things themselves.  The circle is complete!&lt;/p&gt;&lt;p&gt;But anyhow, that's enough venting.  That LaunchPad thread had several posts describing how to install GTK+ 1.2 on 10.04.  I chose to use a PPA repository.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;sudo apt-add-repository ppa:adamkoczur/gtk1.2&lt;br /&gt;sudo apt-get update&lt;br /&gt;sudo apt-get install gtk+1.2&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Ta-da!  I'm now back at the point I was at a year or so ago when all of my old games actually worked.&lt;/p&gt;
</description>
<author>pageer@skepticats.com (Peter Geer)</author>
<comments>http://linlog.skepticats.com/entries/2010/08/03_2234/comments/</comments>
<guid>http://linlog.skepticats.com/entries/2010/08/03_2234/</guid>
</item>
<item>
<title>Kubuntu Intrepid: Another failed upgrade    </title>
<link>http://linlog.skepticats.com/entries/2008/11/Kubuntu_Intrepid_Another_failed_upgrade.php</link>
<description>
&lt;p&gt;Well, that sucked.&lt;/p&gt;&lt;p&gt;I upgraded my Kubuntu box at work from 8.04 to 8.10 on Monday morning.  It did not go well.  Not only did the experience waste several hours of my time getting my system back to a state where I could actually do some work, it left me feeling bitter and fed-up.&lt;/p&gt;&lt;p&gt;Not that the upgrade failed or anything - on the contrary.  The upgrade process itself was relatiely fast and painless.  So, in contrast to some of my previous upgrade experiences - which have left systems &lt;a href=&quot;http://linlog.skepticats.com/entries/2006/06/Upgrading_to_Dapper.php&quot;&gt;completely inoperable&lt;/a&gt; - this wasn't that bad.  It's just that, once the upgrade was done, nearly every customization I'd made to my desktop was broken.&lt;br /&gt;&lt;/p&gt;&lt;h3&gt;Broken Stuff&lt;/h3&gt;&lt;p&gt;As for the breakages, they were legion - at least it felt that way.  The 2 most annoying were the scrolling on my Logitech Marble Mouse trackball and KHotKeys.  It turns out the mouse scrolling was fixable by adding a line to my xorg.conf to disable some new half-working auto-configuration feature.  &lt;/p&gt;&lt;p&gt;KHotKeys, on the other hand, was a lost cause.  From what I've read, it just plain doesn't work right in KDE 4.  So, since key bindings are an absolute must-have feature for me, I worked around it by installing xbindkeys.  This works well enough, but it's a huge pain in the neck.  Now, not only do I have to recreate all my key bindings, but I have to look up the DBUS commands for all those built-in KDE functions rather than just picking them from a list.&lt;/p&gt;&lt;p&gt;Another annoying one was that the upgrade somehow broke the init scripts for my MySQL server.  I don't know how the heck that happened.  I tried uninstalling it, wiping the broken init scripts, and reinstalling, but they weren't recreated, which seemed odd to me.  I eventually ended up just doing a &lt;code&gt;dpgk --extract&lt;/code&gt; on the MySQL package and manually copying the scripts into place.&lt;/p&gt;&lt;p&gt;On another weird note, KDE and/or X11 has been randomly killing the buttons on my mouse.  I'll be working along fine and suddenly clicking a mouse button will no longer do anything.  It still moves, and the keyboard still responds, but clicking does nothing.  Restarting the X server resolves the problem, but that's cold comfort.  It seems to happen randomly - except for when I try to run Virtual Box, in which case it happens every time the VM loses focus.  Fortunately I'm more of a VMware person, so that's not a big deal, but it's still disquieting.&lt;br /&gt;&lt;/p&gt;&lt;h3&gt;KDE4 In General&lt;/h3&gt;&lt;p&gt;The other big pain-point is KDE 4.  To be perfectly blunt, I don't like it.  It has a few neat new features, but so far it doesn't seem worth the effort to upgrade.&lt;/p&gt;&lt;p&gt;The good parts that I've noticed so far seem to be small.  For instance, Dolphin has a couple of nice enhancements.  The one that sticks out is the graphical item-by-item highlighting.  It allows you to click a little plus/minus icon to select/deselect an item, so that you no longer need to hold the control key to do arbitrary muliple selects.  The media manager panel applet is nice too.  It pops up a list of inserted storage devices and allows you to mount and eject them.  I have to admit that I also really like the new &amp;quot;run&amp;quot; dialog.  It does program searching much like Katapult, but makes it easier to run arbitrary commands and select commands with similar names.  While it doesn't have some of the cool features supplied by Katapult's plugins, it's still quite good.&lt;/p&gt;&lt;p&gt;On the other hand, there are a lot of things I don't like (not counting the breakage).  For one, I think the new version of Konsole is a &lt;em&gt;huge&lt;/em&gt; step backward.  I can't access the menus with keyboard shortcuts, the &amp;quot;new tab from bookmark&amp;quot; feature is MIA, the session close buttons are gone, and generally everything I had gotten used to is missing.  &lt;/p&gt;&lt;p&gt;And then there's the new &amp;quot;kickoff&amp;quot; application menu.  I'm getting slightly more used to it, but I still don't like it.  It just feels a lot slower to access items using it.  This is only made worse by the &amp;quot;back&amp;quot; button for browsing sub-menus, which is &lt;em&gt;extremely&lt;/em&gt; hard to click when you're in a hurry (hint: Fitt's law doesn't apply on multi-monitor setups).&lt;/p&gt;&lt;p&gt;As for the &amp;quot;cool&amp;quot; new look of KDE 4...I'm not a fan.  Maybe it's just because I don't have any of the fancy desktop effects turned on on my system (a side-effect of the crappy integrated video card that's part of my tri-monitor setup), but I just don't think it looks good.  Yeah, the bare desktop itself is kind of nice looking, but the window theme is ugly as sin.  It's one of those &amp;quot;brushed metal&amp;quot; sort of looks, which I find even more depressing than Windows 95 gray.  It's too dark for my taste and far too monochromatic.  I also find the active window highlighting to be way too subtle to be helpful.  The icons also leave something to be desired.  They look &lt;em&gt;nice&lt;/em&gt;, but they don't look &lt;em&gt;distinct&lt;/em&gt; - even after a week, it takes me a second to figure out what some of them are supposed to represent.  It kind of defeats the entire point of icons.&lt;/p&gt;&lt;p&gt;As for the much touted Plasma, I'll grant them this - it &lt;em&gt;is&lt;/em&gt; pretty.  The panel and desktop plasmoids do pretty much all look nice.  Not that it matters to me, though, because I &lt;strong&gt;never&lt;/strong&gt; see my desktop - it's always covered with work.  And while the various applets and widgets may look pretty, approximately 90% of them are completely useless.  That's the problem with &lt;em&gt;all&lt;/em&gt; desktop widgets for &lt;em&gt;any&lt;/em&gt; platform.  I find that if a desktop widget actually provides enough valuable functionality to justify leaving a space open for it on the desktop, it's job is probably better served by a full-fledged applicaiton.  And if it's not important enough to make constantly visible, then why bother to put it on the desktop at all?  I'm never going to see it, so I might as well save the RAM and CPU cycles.&lt;br /&gt;&lt;/p&gt;&lt;h3&gt;Conclusion&lt;/h3&gt;&lt;p&gt;Overall, I guess Kubuntu 8.10 and KDE 4 aren't &lt;em&gt;bad&lt;/em&gt; systems.  But to be honest, I'm not impressed.  For the first time, I think that the new Kubuntu is &lt;strong&gt;not&lt;/strong&gt; an improvement.  In fact, I have no plans to upgrade the 3 Kubuntu boxes I have at home any time in the forseeable future.&lt;/p&gt;&lt;p&gt;The thing that's most disappointing to me about the upgrade to KDE 4 is that it &lt;em&gt;totally&lt;/em&gt; defeats my purpose in switching to KDE in the first place.  When I switched from the ROX desktop to KDE back in 2005, my main reason was that I was tired of having to build my own desktop.  ROX was great, but it was a small community and just didn't have the range of applications and degree of integration that KDE had.  You see, I always had this crazy idea that I could just use all KDE applications and everything would be tightly integrated and work well together and there would be harmony throughout my desktop.&lt;/p&gt;&lt;p&gt;However, more and more I've been finding that that just isn't true.  Part of the problem is that lots of KDE applications just aren't that good - many of them are missing functionality and have stability problems.  I find myself using fewer KDE applications all the time.  I dropped Quanta+ for Komodo Edit; I tried to like Konqueror, but it just doesn't hold a candle to Firefox or Opera; I recently tried to become a KPilot user, but was almost immediately forced to switch to JPilot; I finally got fed-up with Akregator and am just using the RSS reader in Opera's M2 mail client; I still use KMail, but not because I particularly like it - I just dislike it less than M2 or Thunderbird.  In fact, I think the only KDE app I would actually miss is Amarok.  (K3B is very good too, but I don't burn enough disks to care what program I use, just so long as it works.)  &lt;/p&gt;&lt;p&gt;So now I'm starting to wonder: What's the point of using KDE?  If I'm not using many KDE applications, and most of the ones I am using could be easily swapped out, it seems like there's nothing keeping me with it.  Maybe I should just switch to GNOME.  Or maybe Windows.  I have been wanting to get more into .NET development, and my tollerance for things not working has been falling over the years, so Windows is sounding better all the time.  &lt;/p&gt;&lt;p&gt;I think next weeek I'm going to have to reinstall my work machine.  Maybe a fresh install and a fresh KDE profile will give me a better experience.  Or perhaps I'll ditch Kubuntu and go for straight Ubuntu with GNOME.  Or perhaps I could take another look at ROX.  I don't know.  And while I'm at it, I think I might reinstall that old Windows partition I still have on that machine.  Maybe some time playing with a nice clean install of XP, or even Vista, if we have a spare copy, will give me a little perspective.  &lt;/p&gt;
</description>
<author>pageer@skepticats.com (Peter Geer)</author>
<slash:comments>5</slash:comments>
<comments>http://linlog.skepticats.com/entries/2008/11/07_2245/comments/</comments>
<wfw:commentRss>http://linlog.skepticats.com/entries/2008/11/07_2245/comments/comments.xml</wfw:commentRss>
<guid>http://linlog.skepticats.com/entries/2008/11/07_2245/</guid>
</item>
<item>
<title>PHP is developed by morons </title>
<link>http://linlog.skepticats.com/entries/2008/10/PHP_is_developed_by_morons.php</link>
<description>
&lt;p&gt;Well, it's official: the people who develop PHP are morons.  Or, rather, the people responsible for adding namespaces to PHP 5.3 are.&lt;/p&gt;&lt;p&gt;Why do I say this?  Because I just read an &lt;a href=&quot;http://developers.slashdot.org/article.pl?sid=08/10/26/1610259&quot;&gt;annoucnement on Slashdot&lt;/a&gt; that they've decided on the operator to use for separating namespace in PHP 5.3: the backslash (\).&lt;/p&gt;&lt;p&gt;Seriously?  The friggin' backslash?  What kind of choice is that?  Last I knew they'd pretty much decided to go with the double colon (::), like C++, which at least makes sense.  But the backslash?&lt;/p&gt;&lt;p&gt;What's worse, just look at the &lt;a href=&quot;http://wiki.php.net/rfc/namespaceseparator&quot;&gt;RFC listing the operators they were considering&lt;/a&gt;.  In addition to the backslash, they had the double star (&lt;code&gt;**&lt;/code&gt;), double caret (&lt;code&gt;^^&lt;/code&gt;), double percent (&lt;code&gt;%%&lt;/code&gt;), a shell prompt (&lt;code&gt;:&amp;gt;&lt;/code&gt;), a smiley face (&lt;code&gt;:)&lt;/code&gt;), and a triple colon (&lt;code&gt;:::&lt;/code&gt;).  For God's sake, it looks like they picked this list out of a hat.  They might as well have just used the string &lt;code&gt;NAMESPACESEPARATOR&lt;/code&gt;.  It's no less absurd than any of those.&lt;/p&gt;&lt;p&gt;Now, let's be realistic for a minute.  In terms of syntax, PHP is a &lt;em&gt;highly&lt;/em&gt; derivative language.  It's an amalgamation of Perl, C++, and Java, with a dash of a few other things thrown in.  &lt;/p&gt;&lt;p&gt;Given that heritage, there's really only a handful of choices for namespace separators that even make sense.  The first, and most natural, is the double colon (&lt;code&gt;::&lt;/code&gt;).  This is what C++ uses and it's already used for static methods and class members in PHP.  So the semantics of this can naturally be extended to the generic &amp;quot;scope resolution operator.&amp;quot;  Keeps things clean and simple.&lt;/p&gt;&lt;p&gt;The second choice is the dot (&lt;code&gt;.&lt;/code&gt;), which is what's used in Java, C#, Python, and many others.  This is a bit unnatural in PHP, as dot is the string concatenation operator, but it at least offers consistency with other related languages.&lt;/p&gt;&lt;p&gt;Third is...actually, that's it.  There are only 2 valid choices of namespace separator.  And the PHP namespace team didn't pick either one.  Nice work guys.&lt;/p&gt;&lt;p&gt;The Slashdot article also linked to an interesting consequence of the choice of backslash: &lt;a href=&quot;http://loveandtheft.org/2008/10/26/set-sail-for-fail-php-namespaces/&quot;&gt;it has the potential to mess up referencing classes in strings&lt;/a&gt;.  So if your class starts with, say, the letter &amp;quot;t&amp;quot; or &amp;quot;n&amp;quot;, you're going to have to be &lt;em&gt;very&lt;/em&gt; careful about using namespaces in conjunction with functions that accept a class name as a string.  Just what we needed.  As if PHP isn't messed up enough, now the behaviour of a function is going to depend on the names of your classes and the type of quotes you use.&lt;/p&gt;&lt;p&gt;I guess I'm going to have to bone up on my C#, because PHP seems to be going even farther off the deep end that before.  It was always a thrown-together language, but this is just silly.  The backslash is just a stupid choice for this operator and there's just no excuse for it.&lt;/p&gt;
</description>
<author>pageer@skepticats.com (Peter Geer)</author>
<slash:comments>1</slash:comments>
<comments>http://linlog.skepticats.com/entries/2008/10/27_1143/comments/</comments>
<wfw:commentRss>http://linlog.skepticats.com/entries/2008/10/27_1143/comments/comments.xml</wfw:commentRss>
<guid>http://linlog.skepticats.com/entries/2008/10/27_1143/</guid>
</item>
<item>
<title>Yes, PHP sucks, but it works </title>
<link>http://linlog.skepticats.com/entries/2008/05/Yes_PHP_sucks_but_it_works.php</link>
<description>
&lt;p&gt;Jeff Atwood had a really great blog entry on PHP the other day.  I think the title pretty much sums up the way I feel about it: &lt;a href=&quot;http://www.codinghorror.com/blog/archives/001119.html&quot;&gt;PHP Sucks, But It Doesn't Matter&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;I've been working with PHP for about 3 or 4 years now.  For the last 9 months, writing PHP code has been my day job.  And I've got to tell you, PHP really is kind of a crappy language.  It's so bad you can't even complain that PHP was poorly designed, because it quite clearly &lt;em&gt;wasn't&lt;/em&gt; designed.  In fact, I'm not even so sure it &amp;quot;evolved.&amp;quot;  Sometimes it seems like it just sort of mutated.&lt;/p&gt;&lt;p&gt;So, as Jeff said, nobody with an ounce of programming talent could thing that PHP is a &amp;quot;good&amp;quot; language in any objective sense.  It's just too hacked-up and thrown together.  It's the Visual Basic 6 of the web.  God knows much of the PHP code you find on the net is every bit as terrible as the VB6 code you find.  In fact, when you consider ill-conceived &amp;quot;features&amp;quot; like &lt;a href=&quot;http://www.php.net/features.safe-mode&quot;&gt;safe mode&lt;/a&gt; and &lt;a href=&quot;http://www.php.net/magic_quotes&quot;&gt;magic quotes&lt;/a&gt;, it even starts to make VB6 look good.&lt;/p&gt;&lt;p&gt;But all that is really beside the point.  At the end of the day, PHP does the job.  It might not have the orgasm-inspiring elegance of Ruby, but does it really need that?  These days, PHP has all the big features - decent object-orietation, a rich standard library including decent XML handling and database access layers, and a number of good &lt;abbr title=&quot;Model-View-Controller&quot;&gt;MVC&lt;/abbr&gt; frameworks.  In short, it has what it needs to allow decent developers to write good, solid, maintainable code.  PHP doesn't lend itself to elegance, but in the right hands, it can be &lt;em&gt;elegant enough&lt;/em&gt;.  And really, that's all that matters.&lt;/p&gt;
</description>
<author>pageer@skepticats.com (Peter Geer)</author>
<comments>http://linlog.skepticats.com/entries/2008/05/31_2331/comments/</comments>
<guid>http://linlog.skepticats.com/entries/2008/05/31_2331/</guid>
</item>
<item>
<title>Random binary breakage and a rant on compatibility </title>
<link>http://linlog.skepticats.com/entries/2008/02/Random_binary_breakage_and_a_rant_on_compatibility.php</link>
<description>
&lt;p&gt;I enjoy an occasional video game.  However, I am by no means a &amp;quot;gamer&amp;quot;, as evidenced by the fact that I don't have a copy of a single proprietary game published later than 2002.  Rather, I enjoy open-source games like &lt;a href=&quot;http://linlog.skepticats.com/entries/2006/01/Playing_Wesnoth.php&quot;&gt;Battle For Wesnoth&lt;/a&gt;, vintage games such as &lt;a href=&quot;http://linlog.skepticats.com/entries/2005/04/I_love_emulation.php&quot;&gt;Bandit Kings of Ancient China&lt;/a&gt; and &lt;a href=&quot;http://linlog.skepticats.com/entries/2006/08/Breaking_out_DOSbox.php&quot;&gt;Wing Commander&lt;/a&gt;, and the occasional old strategy game, such as my &lt;a href=&quot;http://linlog.skepticats.com/entries/2005/11/23_2311/&quot;&gt;old Loki games for Linux&lt;/a&gt;.  I also have a soft spot for emulated console games for the NES and Super NES.  I even break out an emulator for my old PlayStation disks every now and then.&lt;/p&gt;&lt;p&gt;Well, the other day the mood struck me to play one of my old PSX games, so I clicked the icon for the ePSXe PlayStation emulator in my application menu and waited...and waited...and waited.  And it never came up.  So I tried running it from a command prompt and...nothing happened.  And when I say &amp;quot;nothing&amp;quot;, I mean &lt;em&gt;nothing&lt;/em&gt; - no error message or output of any kind.  I just got my command prompt back immediately.&lt;/p&gt;&lt;p&gt;Mind you it had been a while since I'd used ePSXe, but there was no immediately obvious reason why it should fail.  It's installed in my home directory and has been sitting there, fully configured, for over a year.  I used it regularly for a few weeks back in September and October and it worked perfect.  Absolutely nothing has changed with it.&lt;/p&gt;&lt;p&gt;Fortunately, a little Googling turned up &lt;a href=&quot;http://ubuntuforums.org/showthread.php?t=95835&amp;amp;page=18&quot;&gt;this thread&lt;/a&gt; in the Ubuntu forums.  Apparently the ePSXe binary is compressed with UPX.  After installing the &lt;strong&gt;upx-ucl-beta&lt;/strong&gt; package via apt-get and running &lt;code&gt;upx -d /path/to/epsxe&lt;/code&gt; to decompress the binary, it worked as expected.  Apparently something about running UPX-compressed binaries changed between Ubuntu Feisty and Gutsy.  I have no idea what, though.&lt;/p&gt;&lt;p&gt;This actually leads into one of the things that really annoys me about Linus: binary compatibility.  It's also one of the reasons I prefer to stick with open-source software on Linux when at all possible.&lt;/p&gt;&lt;p&gt;In the Windows world, binary compatibility between releases is pretty good.  Granted there are always some applications that break, but given the sheer volume of code out there, Microsoft does a good job keeping that number relatively small.  In fact, if you've ever heard any of &lt;a href=&quot;http://blogs.msdn.com/oldnewthing/&quot;&gt;Raymond Chen's&lt;/a&gt; stories of application breakage between releases, you know that the Windows app compatibility team sometimes goes to truly heroic lengths to enable badly broken applications, many of which never should have worked in the first place, to keep functioning when a bug they depended on is fixed.  The &lt;a href=&quot;http://www.awprofessional.com/content/images/9780321440303/samplechapter/Chen_bonus_ch01.pdf&quot;&gt;sample chapter (PDF)&lt;/a&gt; from Raymond's book has some really great examples of this.  &lt;/p&gt;&lt;p&gt;In the Linux world, on the other hand, nobody seems to give a damn about maintaining compatibility.  If you have a binary that's a few years old, it may or may not work on a current system.  And if it doesn't, sometimes you can massage it into working, as was the case with ePSXe this time, and sometimes you can't.  Not that this should be surprising: some developers in the Linux world are so lazy they won't even allow you to change the paths to application support files - they just hard-code them into the binary at compile-time with preprocessor defines!  If they don't care if you can install the same binary in /usr or $HOME, why should they care if it works between distributions or even releases of the same distro?  The attitude seems to be, &amp;quot;Well, it's open-source anyway, so who cares how compatible the binaries are?&amp;quot;&lt;/p&gt;&lt;p&gt;But if we're going to be honest, even being open-source only goes so far.  Actively-maintained apps are usually OK, but have you ever tried to build an application that hasn't been maintained in 7 or 8 years from source?  It's pretty hit and miss.  Sure, if I really needed the app, had lots of spare time on my hands, and was familiar with the programming language and libraries it used, I could always &lt;em&gt;fix&lt;/em&gt; it to build in an up-to-date environment.  But for a regular user, that's simply not an option.  (And even for a programmer it may well be more trouble than it's worth.)&lt;/p&gt;&lt;p&gt;But as annoying as I find the general lack of compatibility, as much as I wish I could just run a damn executable without having to cross my fingers, I can understand why things are they way they are.  Quite simply, maintaining compatibility is hard.  It takes care and diligence and it can make it hard to fix certain problems or make certain types of improvements.  And really, when you're not getting paid for your work and have no real obligation to your users, you have to ask yourself if it's worth the effort.  Heck, even many commercial vendors aren't that serious about backward-compatibility.  Is it really reasonable to expect a loose association of unpaid volunteers to be any better?&lt;/p&gt;&lt;p&gt;But that's enough ranting for tonight.  There are ups and downs to every software system.  I'm just disgruntled that everything in my personal Linux-land seems to be 5 times more difficult than it needs to be lately.&lt;/p&gt;
</description>
<author>pageer@skepticats.com (Peter Geer)</author>
<comments>http://linlog.skepticats.com/entries/2008/02/11_2300/comments/</comments>
<guid>http://linlog.skepticats.com/entries/2008/02/11_2300/</guid>
</item>
<item>
<title>Screw encryption!  </title>
<link>http://linlog.skepticats.com/entries/2007/07/Screw_encryption_.php</link>
<description>
&lt;p&gt;On Friday, I said I was &lt;a href=&quot;http://linlog.skepticats.com/entries/2007/07/My_wireless_insecurity.php&quot;&gt;finally going to secure my wireless LAN&lt;/a&gt;.  As you can probably tell from the title of this post, that didn't go so well.  As of this writing, I am &lt;em&gt;still&lt;/em&gt; running an open system because that's the only configuration I can get to work with all three of my computers.&lt;/p&gt;&lt;p&gt;&lt;img alt=&quot;268023_d-link_switch.jpg&quot; title=&quot;268023_d-link_switch.jpg&quot; style=&quot;float: right; clear: none;&quot; src=&quot;http://linlog.skepticats.com/entries/2007/07/09_2045/268023_d-link_switch.jpg&quot; /&gt;I've spent several hours messing with this today, and it's put me in a really foul mood.  There was a time when I enjoyed messing around with my system configuration, but I just can't do it anymore.  I don't care that much about networking.  I have too many other things I want to spend my time on.  I just want my damn network to function and not let anyone who drives by eavesdrop on all my traffic.  Is that too much to ask?&lt;/p&gt;&lt;p&gt;My upgrade process started with a firmware update to my D-Link DI-524 C wireless router.  This update included WPA2 support, which was a nice bonus.  So my encryption options were now: nothing, WEP, WPA, WPA2, and something called WPA2-auto.  On the down side, it included no additional documentation, so I have no clude what this &amp;quot;WPA2-auto&amp;quot; is supposed to be.  But &amp;quot;auto&amp;quot; sounded promising, so I decided to go with that mode.&lt;/p&gt;&lt;p&gt;Turns out this was a bad idea.  According to &lt;a href=&quot;http://www.dslreports.com/forum/remark,15785388?hilite=di-624+wpa2-auto&quot;&gt;this forum thread&lt;/a&gt;, WPA2-auto doesn't seem to work consistently.  Unfortunately, I didn't discover this until I had spent a considerable amount of time trying to get my PC configuration right.  You see, I was misled because my laptop was able to connect one time while the router was in WPA2-auto mode.  That led me to assume that the problem was with my PCs, not the router.  Guess I should have Googled &lt;em&gt;first&lt;/em&gt;.&lt;/p&gt;&lt;p&gt;So, eventually, I ended up going with plain-old WPA.  The client configuration was a bit tricky for this.  You see, my laptop uses NDISwrapper, so I could just use KNetworkManager to enter the pre-shared key.  However, my desktops both have RaLink cards and use the rt2500 driver.  This driver &lt;em&gt;does not&lt;/em&gt; use the Linux wireless extensions and hence does not work with NetworkManager.  To configure these cards, you need to add some lines to your &lt;code&gt;/etc/network/interfaces&lt;/code&gt; file, as &lt;a href=&quot;https://help.ubuntu.com/community/WifiDocs/Driver/RalinkRT2500#head-af86b211b480d43b791cd9b4e698f96638d6d25f&quot;&gt;described here&lt;/a&gt;.  It works, but the down side is that it breaks NetworkManager.  However, since these are desktop PCs with 1 WiFi card connecting to 1 access point, that's not really a big deal. &lt;/p&gt;&lt;p&gt;While the desktops weren't that difficult (one I got the right router settings, that is), the laptop was another story.  I still haven't figured that one out yet.  Of course, I was out of energy by the time I got around to it, so I wasn't exactly in peak form.&lt;/p&gt;&lt;p&gt;The laptop has in integrated Broadcom card which, as I said becore, is configured to use NDISwrapper.  This means it works with KNetworkManager.  However, I couldn't get KNetworkManager to connect to the access point with WPA enabled.  I selected the encryption mode, entered the pre-shared key, and then the connection progress bar would hang at 28%.  The iwconfig output said that the card was associated with my access point, but I never got an IP address.&lt;/p&gt;&lt;p&gt;My current suspicion is that the laptop is using stale configuration data from my failed WPA2-auto attempt.  I had some problem with stale configuration on the desktops too.  For those, I just did a &lt;code&gt;/etc/init.d/networking stop&lt;/code&gt; and then unloaded the driver module, then reloaded and restarted.  That cleared everything up.  In this case, however, I'm thinking it's the data stored by KNetworkManager.  The only problem is, I have no clue whatsoever where I would look to find out.  The interface is really spartan and there's no obvious way to delete stale configurations.&lt;/p&gt;&lt;p&gt;There is still one big functionality question I'm left with: how do I get NetworkManager to centrally configure an access point for all users?  Both Sarah and I have our own accounts on the laptop, and I'd really like NetworkManager to automatically detect when our home network is present and connect to the access point at system start-up.  I'm thinking there &lt;em&gt;must&lt;/em&gt; be a way to do that, but there's nothing obvious in any of the configuration tools.&lt;/p&gt;
</description>
<author>pageer@skepticats.com (Peter Geer)</author>
<comments>http://linlog.skepticats.com/entries/2007/07/09_2045/comments/</comments>
<guid>http://linlog.skepticats.com/entries/2007/07/09_2045/</guid>
</item>
<item>
<title>Things I don't care about </title>
<link>http://linlog.skepticats.com/entries/2007/06/Things_I_don_t_care_about.php</link>
<description>
&lt;p&gt;Following in the spirit of &lt;a href=&quot;http://diveintomark.org/archives/2007/06/13/burned-out&quot;&gt;Mark Pilgrim's post from the other day&lt;/a&gt;, I thought I'd a short list of things I don't care about.  I do this mostly because I'm tired and grumpy, and it's hard to come up with positive, insightful commentary when you're tired and grumpy.&lt;/p&gt;&lt;p&gt;1) Safari on Windows.  Maybe it will be good for testing.  But then again, I didn't care about Safari when it was Mac-only, and I see no reason to change my attitude now.&lt;br /&gt;2) The iPhone.  Yeah, it looks very cool and it's probably much easier to use than any other cell phone on the market, but you can buy an &lt;em&gt;actual&lt;/em&gt; computer for less money.&lt;br /&gt;3) Font rendering.  &lt;a href=&quot;http://joelonsoftware.com/items/2007/06/12.html&quot;&gt;Joel Spolsky&lt;/a&gt; and &lt;a href=&quot;http://www.codinghorror.com/blog/archives/000884.html&quot;&gt;Jeff Atwook&lt;/a&gt; both commented the &amp;quot;revelation&amp;quot; that Safari for Windows was using Apple's font rendering engine instead of the Windows one.  I've heard many complaints about the font rendering on Linux too.  Who cares?  I never got the obsession some people have with how their fonts look.  As long as I can read it without getting eye strain, I'm happy.  Hell, half the time I &lt;em&gt;can't even tell the difference&lt;/em&gt; between two similar fonts.&lt;br /&gt;4) VB6 programmers.  I came across this link from a couple of years ago &lt;a href=&quot;http://www.ftponline.com/vsm/2004_04/magazine/departments/guestop/&quot;&gt;lamenting that .NET was killing hobbyist programmers&lt;/a&gt;.  It's an argument I've heard before: .NET is just too hard compared to VB6.  Well too bad.  Learn to freaking program.  VB6 seemed good 10 years ago, but in retrospect, it was nothing but a recipe for hideously bad code and huge magenta buttons.  Good ridance!  And I &lt;em&gt;was&lt;/em&gt; a VB6 programmer, so I'm allowed to say that.&lt;br /&gt;5) Out-sourcing/off-shoring.  I'm sick of hearing programmers wailing about their jobs being moved to India or China.  You know what?  If your job is really in danger from that, it probably sucked anyway.  Upgrade your skillset and next time don't work as a code monkey.&lt;/p&gt;
</description>
<author>pageer@skepticats.com (Peter Geer)</author>
<comments>http://linlog.skepticats.com/entries/2007/06/14_2337/comments/</comments>
<guid>http://linlog.skepticats.com/entries/2007/06/14_2337/</guid>
</item>
</channel>
</rss>
