•  
      CommentAuthorSpode
    • CommentTimeMar 1st 2008
     

    If you've checked out my links page, you'll see my current daily reading material, and I very rarely comment on things I find, unless they really catch my attention - regurgitation is lazy. But enough stuff today made me want to do a small round up.

    On the Ubuntu side of things, Ars Technica have taken a quick look at "Wubi" in the up and coming Hardy Heron Ubuntu release. This allows you to install Ubuntu from inside Windows, into what appears to be a hard disk image, rather than a partition itself - much like the way VirtualBox or VMWare work.

    Over at Phoronix, they are taking a look at increasing battery life in Ubuntu. I noticed when running it on my Vaio, that is isn't as efficient as Windows XP, so a needed area of tweaking.

    Hackszine, which is very quickly becoming my favourite daily reads, pointed me in the direction of this wonderful commenting tip, which I'm sure will come in handy for the coders amongst us. Most people don't like my use of curly braces but I use the following format for the very reason that I can comment out the conditional and test the code without injecting anything extra.

    if ($foo == 'bar') { echo "My Manwich!"; }

    And one reason I have been a little slow on posts recently, is I've been fiddling around with the Slitaz linux distribution. After sending in some scripts to the developer, and having them tweaked and included, the distribution now fully supports mounting a USB stick by UUID as the home folder, as well as the automated ability to convert an ISO to a bootable USB stick, and make permanent changes to the readonly filesystem. The distribution is getting very close to its first "1.0" release, and at 22MB it's looking much better than any other slim-line distro I've seen, no matter how damned small it is.

    And finally, Lolly's ability to discuss complex topics in the forum has finally been uncovered.

    •  
      CommentAuthorLolly
    • CommentTimeMar 1st 2008 edited
     
    Posted By: Spode

    And finally, Lolly's ability to discuss complex topics in the forum has finally been uncovered.

    Hey! That's not fair! *climbs up onto Spode's shoulders and steals his hat*

    •  
      CommentAuthorSpode
    • CommentTimeMar 1st 2008
     

    Muhahahaha! Do you want a banana?

    • CommentAuthorRTT
    • CommentTimeMar 2nd 2008
     

    I've read the bit about code and commenting without "injecting anything extra" about 10 times and it still doesn't make any sense - examples? :erm2:

    •  
      CommentAuthorSpode
    • CommentTimeMar 2nd 2008
     
    Code still runs: //if ($foo == 'bar') { echo "My Manwich!"; }

    Doesn't

    //if ($foo == 'bar') { echo "My Manwich!"; }

    Does:

    //if ($foo == 'bar') { { //added echo "My Manwich!"; }

    Does:

    $foo = 'bar'; //added if ($foo == 'bar') { echo "My Manwich!"; }
    • CommentAuthorRTT
    • CommentTimeMar 2nd 2008 edited
     

    Ah, ok. The old K&R style, i.e.

    if (condition) { Do Something; }

    was designed to save screen space on old terminals. Why people still code like that is beyond me when we've all pretty much got a minimum of 1024 vertical pixels :P

    •  
      CommentAuthorSpode
    • CommentTimeMar 2nd 2008
     

    Well, I find it everywhere. Yet people tell me they hate the way I do it!

    • CommentAuthorSirkent
    • CommentTimeMar 3rd 2008
     

    I like having a curly brace on its own line, but I don't like your indentation ;-)
    I guess that's just personal preference, but then I hate using tabs to indent anyway, as you end up with extremely horizontal code. I now use 2 spaces for indentation and force Eclipse to render tabs as such.

    •  
      CommentAuthorSpode
    • CommentTimeMar 3rd 2008
     

    I like intending that way because I can just follow the lines down on the screen and see where different sections open/close. However, if your IDE allows collapsing, this reasoning becomes unnecessary.

    As RTT mentioned to me a while back, formatting is not a huge issue as you can always let your IDE reformat it on loading. Scite for instance has an option of replacing all tabs with double spaces - which I think it does by default.

    • CommentAuthorjjws
    • CommentTimeMar 14th 2008
     

    Err. Who's Vaio Spode?

    That was a lot of effort to make that point :S

 
Copyright Andrew Miller (Spode), 2008