Posts for Tuesday, February 9, 2010

Infibeam Rocks.

Some of you who follow me on twitter might remember something I tweeted about on Feb 6th:

Crap. Bought the wrong book on Infibeam and there's no way to cancel after making payment. Worse, I already have this book x-( #fail

This is essentially what happens when you buy stuff on the Internet at 5am after not sleeping all night preparing for an exam. I selected the (wrong) book, paid for it using Paypal, and soon afterwards, realised that I wanted the second part of this book (Foundation Analysis). Checked their FAQ to find to my dismay that they don't support cancellation of orders after payment has been made.

Needless to say, I'm a student, and students are poor(er). So I was sitting around semi-depressed wondering how to sell the book off at a minimal cost loss after I get it. On a whim, I decided to tweet about it (I generally don't tweet much; mostly passive reading).

After giving my exam, I noticed two missed calls on my phone from a strange number. I decided to wait for them (whoever they were) to call me again. A couple of hours later, I get another phone call; but this time it gets cut before I can pick it up. A few minutes later I get the following email:

Dear Nirbheek Chauhan ,

Order Id : [REMOVED]

Title : [REMOVED BOOK TITLE]

We have received your request for cancellation of above order through twitter.com. So we are offering you your ordered amount as prepaid credit to your Infibeam account which can be used for next purchase.

Please allow us for the same. So we can credit your account accordingly.

We also tried to reach you through given no. [REMOVED MOBILE NO.], but could not get response.

Thank you for shopping with us! You can contact us anytime using http://www.infibeam.com/ContactUs.action


Sincerely,

Infibeam.com Customer Service
Fresh Way to Buy, Sell and Rent

My reaction -- :O :D :O :D

Yesterday evening, they cancelled my order and refunded the amount I had paid as prepaid-credit which I can now use to buy the other book that I wanted to buy!

I don't know about you, but I'm very impressed by their customer service. The fact that they took the initiative to monitor twitter for tweets mentioning "Infibeam" for any problems that users face is a strong indication that they aren't just some random E-Store. They have definitely made permanent customer out of me!

On a related note, I've found that their book prices are usually less than or equal to those on flipkart.com . Another reason to use them ;)

Posts for Monday, February 8, 2010

Alma : 58

Hehe.... According to this verse, I guess even Lamanites can learn!

"Stand fast in the liberty wherewith God has made us free!"

Yeah... I think I'm gonna have that made into a poster, and hang it on my wall or something.

The big message of this chapter, and the few preceeding it, for me, would have to be "Rely on The Lord for your support."  Even when the Nephites were about to starve to death, and didn't know why they weren't receiving the strength they needed, they still turned to God and plead with Him to spare their lives, and to keep them faithful and strong...

and of course, The Lord obliged, and helped them take the city of Manti.

No matter the circumstances we find ourselves in, we must always turn to God and give thanks for that which he has given us.  The promised blessings for gratitude and thankfulness are great, and I imagine, even greater when done under distress.
avatar

Countdown to KDE 4.4 and the new KDE website: 1 day left

The new KDE website redesign is due any day now (with the release of KDE SC 4.4) and when it’s released you will be able to see how ideas were amalgamated from many different mockups and some which I’ve not had the records to post. The final design is different, much more aligned with the KDE "Air" branding, and most importantly a shared effort, like what open-source is meant to be. So don’t be too shocked if what is released is completely different.

Check out the latest mockup update here.

Past mockups viewable in full on my WIPUP profile.

Related posts:

  1. Countdown to KDE 4.4 and the new KDE website: 2 days left
  2. Countdown to KDE 4.4 and the new KDE website: 4 days left
  3. Countdown to KDE 4.4 and the new KDE website

Posts for Sunday, February 7, 2010

Incorporeal configuration changes

Over the past couple days, I have made a metric ton of changes to incorporeal.org and its services, many related to Apache and SSL. Notably, website access was probably a bit brittle over the past 24 hours. If anything seems out of the ordinary, please let me know.

What does all that crap actually mean?

I run open source software. A lot of it, I guess it comes close to 95% of my daily software usage. I run Firefox, Linux and a bunch of other free software things. I also support Creative Commons by making all my stuff licensed under free and simple licenses. But I am somewhat of a techy which admittedly most people ain't.

For most people the whole discussion about free software and open source and open knowledge and participatory culture is just hogwash: Why would they care about whether their software comes from some company or some guy in his/her basement? It's not like commercial software costs money (it doesn't, you just download it). What people care about is that the tools work.

This often leads to discussions about "freedom" and other fluffy, abstract words that lead absolutely nowhere due to lack of understanding, different definitions of words or general not-giving-a-shit-iness. Why is it so hard to explain the situation for the free software people and why is it so hard to understand as the average guy?

The problem is actually quite simple: For the tech person that says "but you can edit the source code!" this doesn't just mean that you can edit the source code, it means that you have regained access to the important means of production. In a world where software rules (like the virtual/online space) software is the same as a big ass factory is in the real world.

For the non-programmer, non-techy person that is sometimes hard to understand: What is the use of having source code if you cannot program anyways? That doesn't help, does it?

In fact it does. Let's try to milk this a little more till we get something clearer (and yes, I did just intentionally kill that metaphor ;-)).

Using free software is like getting back to a somewhat pre-industrialized world. No longer do you have to buy things at a big ass store, you can make things yourself. Imaging that when you need a certain tool, you can just build it yourself.

A reply could be: "But I don't want to have to make all my tools by myself!". Another one "But I don't have the skills!". And both points of view are absolutely valid, in fact, I agree with both of them. I don't have the skills to build all I need and I don't want to have to. Industrialized production has its merits! On the other hand, that is a somewhat wrong conclusion.

Having access to the source code does not mean that you have to do everything yourself. Let's try to bring the example to the real world.

Imagine a workshop. Not just one like the one you might have at home in your basement with a few basic tools to fix your bike. A bigger room with "real" machines, machines like say laser cutters and stuff like that. Machines experts use in their workplace. Of course you do not have the skills to use those machines. Maybe some but probably not all of them. But on one wall of the room is a big shelf, a library of "recipes" that allow you to build stuff that other people (that did in fact know how to deal with the machines) designed: You need a special screw so you go to the library, take out the construction manual and just walk through it. You take a piece of metal, you put it into a lathe and program it like the recipe says, a few minutes later you have your screw.

"But", I hear some people say (this is in fact just a figure of speech, I am not hearing voices ;-)), "if the screw I need isn't there, I'm [pun alert] I am still screwed!". Not at all my friend. You take the recipe of something similar, look who wrote it, go to that person and ask him/her: "Hello, you designed this thing which is kinda like the thing I need, could you maybe design something similar to it with the following properties?". And in order to show the other person that you respect their time, you can also add "I'd pay for your time.".

That is open source. It does not mean that you have to do everything yourself. It does also not mean that you cannot just build stuff and sell it to people: Building a bicycle is a pain in the ass and if you can do it well, you can sell those products to people that just don't want to do it themselves. The point is that people can modify it, change things, build on top of the knowledge of others, there always is money in betting an people being lazy or short of time ;-).

So don't focus on open source software being about some kind of "freedom", nobody cares about freedom (look at how many devices Apple sells!). Show them that open source is basically just the old tradition of science and engineering applied to real life (well in the case of software the "virtual life" obviously). It's basically just what you do with your neighbors: Each has something to offer, you throw all different abilities into a pot and see what kind of soup comes out.

Creating multi-page PDF files with GIMP and `convert`

Occasionally I have to sign some document (old style, with a pen) and send it electronically. Sometimes those are multi-page documents. Since it is uncommon to send it back as multiple image files after scanning, and multi-page image formats are uncommon as well, I’d like to send them as PDF file. Before I discovered this method, I used to insert the scanned images into OpenOffice Writer, and then create the PDF with it. This works, but it is a bit cumbersome to tell OpenOffice Writer to maximise the images (eliminating page borders, etc.), especially when there are a lot of pages. It just doesn’t feel like a real solution.

So, here we go:

Prerequisites:

  • GIMP (I’m currently at version 2.6.8, but this will probably work with older versions as well)
  • GraphicsMagick (tested with 1.3.8) or ImageMagick (tested with 6.5.8.8)

Procedure:

  1. Get the scanned pages opened as layers of one image in GIMP. If they are available as files already, you can use File / Open as Layers….
  2. Make sure that the layers are ordered in the following way: Page 1 must be the bottom layer, the last page must be the top layer. You can reorder them via the “Layers” dialogue (activate it via the Windows / Dockable Dialogues menu if you don’t see it)
  3. Save As… and choose “MNG animation” or just add “.mng” to the filename. (In case you are wondering, MNG is the animated counterpart to PNG).
    A dialogue window saying “MNG plug-in can only handle layers as animation frames” will come up – choose “Save as Animation” here and press the Export button. In the next dialogue you don’t need to make any changes to the defaults, just press the Save button.
  4. Now, open a console window and simply enter
    convert document.mng document.pdf

That’s it – you now have your PDF file ready for sending!

Update (2010-02-08):
As chithanh pointed out in comment 1, there is another convenient way to accomplish the same. It does not involve GIMP, but instead requires pdftk to concatenate PDF files. Please see comment 2 for details.

avatar

Countdown to KDE 4.4 and the new KDE website: 2 days left

Only 2 days left until the KDE SC 4.4 is released, but apparently the website design is due out on the 8th! Yes, that’s tomorrow. Today’s update shows a stage in the mockup which is natural to designers – the rejection stage. A new idea (in this case, minimalism) is chosen and we try out something new to see if we like it.

View the full update here. Full progress can be seen on my WIPUP profile.

Related posts:

  1. Countdown to KDE 4.4 and the new KDE website: 4 days left
  2. Countdown to KDE 4.4 and the new KDE website: 3 days left
  3. Countdown to KDE 4.4 and the new KDE website: 5 days left

Posts for Saturday, February 6, 2010

Shameless self-plugging

I was busy recently and released the first episode of my podcast, you can check it out here.
avatar

Countdown to KDE 4.4 and the new KDE website: 3 days left

Yep, it’s just 3 days left until KDE SC 4.4 is released and we see even more polish on yesterday’s design for the KDE website. We’ve now shaped it into a full design and we’re debating which ideas we like from this and which should be thrown away.

Click here to check it out. As usual the full progress can be seen on the WIPUP profile.

Related posts:

  1. Countdown to KDE 4.4 and the new KDE website: 2 days left
  2. Countdown to KDE 4.4 and the new KDE website: 4 days left
  3. Countdown to KDE 4.4 and the new KDE website: 1 day left

Posts for Friday, February 5, 2010

avatar

I missed this perfectly healthy rotating kitchen?

<object height="360" width="480"><param name="allowfullscreen" value="true"><param name="allowscriptaccess" value="always"><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=7887463&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=00ADEF&amp;fullscreen=1"><embed allowfullscreen="true" allowscriptaccess="always" height="360" src="http://vimeo.com/moogaloop.swf?clip_id=7887463&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" width="480"></embed></object>

Related posts:

  1. TEDIndia: The thrilling potential of SixthSense technology by Pranav Mistry – how could I have missed this?

avatar

Countdown to KDE 4.4 and the new KDE website: 4 days left

Another day and we continue to see development on the KDE website redesign. We’re fleshing out the KDE webdesign mockup seen yesterday into a full page and it’s taking shape slowly but surely.

Check it out here.

As usual you can see the full series (3 in total now) on my WIPUP profile.

Related posts:

  1. Countdown to KDE 4.4 and the new KDE website: 2 days left
  2. Countdown to KDE 4.4 and the new KDE website
  3. Countdown to KDE 4.4 and the new KDE website: 3 days left

avatar

Syslinux from Linux!

This post tells you how to launch syslinux from a Master Boot Record (MBR).

Recently I was locked out of a customer-provided laptop with their development environment, and access to their source code repository via vpn.  I suspect their domain controller propagated an update last time I was on the vpn which has locked me out.

They're overseas and about 12 hours flight time away, so with their permission I used ntpasswd to reset the Administrator password.  The boot CD (downloadable as an iso) uses syslinux, which is fine, except that instead of wasting CD-Rs I like to use USB keys.

I copied the contents to a blank FAT32-formatted usb key, but it has no boot sector yet.  I installed grub and tried to make a grub menu file from the syslinux.cfg with these tips for converting a syslinux .cfg file to a grub .conf file.  I failed because the syslinux.cfg has the line:
 append rw vga=1 initrd=initrd.cgz,scsi.cgz

And I don't know how to append the two cgz's into one grub initrd line.  Normally grub uses an initrd like this:
 initrd /initrd.cgz


So I decided to install syslinux from linux.  The man page makes it look easy:
 syslinux [-sfr] [-d directory] [-o offset] device

When I ran "syslinux /dev/sdd1" and booted the laptop with this usb key, it just gave me a blank cursor blink.  This is because the laptop is looking in the MBR of the usb key and finding nothing.  The syslinux man page shows some hints:
Booting from a FAT partition on a hard disk
SYSLINUX  can  boot  from  a  FAT  filesystem  partition on a hard disk
(including FAT32). The installation procedure is identical to the  pro-
cedure  for installing it on a floppy, and should work under either DOS
or Linux. To boot from a partition, SYSLINUX needs to be launched  from
a  Master  Boot  Record  or  another  boot loader, just like DOS itself
would. A sample master boot sector (mbr.bin) is included with SYSLINUX.
Well, that's nice to know, but how do I put that on my usb key?  Follow these steps:

1. Start with a FAT32 formatted usb key (it can have other data on it) and some syslinux-based boot image.  I'm using the latest ntpasswd iso cd080802.  Unpack the contents to the root of the usb key.

2. Copy a boot sector to the code image of the MBR of your to-be-booted usb key:
sudo dd if=/usr/share/syslinux/mbr.bin of=/dev/sdd bs=440 count=1
  • /dev/sdd is my usb key
  • Look at Wikipedia for an explanation of the MBR layout
  • your mbr.bin might be in a different location.  It should come installed with syslinux

3. Run syslinux to make the partition bootable:
 sudo syslinux /dev/sdd1


4. Mark the partition as bootable (may not be necessary)
 sudo fdisk /dev/sdd

Select a, 1, w to make the first partition bootable.  CHECK THESE OPTIONS FIRST!

5. Insert USB key to your PC / laptop and boot (so long as your BIOS is setup and capable!)

Posts for Thursday, February 4, 2010

Henry Rollins "Spoken Word" at the Schlachthof in Bremen

Yesterday Annette, some friends and me went to see Henry Rollins at the Schlachthof in Bremen.

It's somewhat hard to describe what Henry Rollins does on his spoken word gigs. Most people might just know him from his Bands (Black Flag or the Rollins Band) and his singing style might lead to them thinking that listening to him talk for 3 hours might be someone hard, but I can assure you: You'll have a really enjoyable time!

Henry just talks, a lot about his travels all over the world (that guy has seen a lot of this planet), but it's not just some guy telling you that some country has an interesting rock or whatever. He meanders through different events and travels, talks about people he met all over the world, without being boring or preaching. It's funny but not really comedy. It's a love letter to what human beings are capable of and it's a list of things to hate about the human race. It mixes different fragments of culture together and before you know it all those seemingly disjointed aspects tie together to a bigger picture, to someone pointing your noses at problems and wonders of the world.

I've seen Henry Rollins a few times at different spoken word gigs and he never disappoints: There's no phoning it in, no boring recital of a "funny" talk. It's just this guy, with a bottle of water and a microphone talking with you for three hours, and you talking about the world and about how it can be a better place.
avatar

Countdown to KDE 4.4 and the new KDE website: 5 days left

Right, it’s a day later and it’s time to see where we’ve gotten with the redesign of the KDE website.

As most of you noticed yesterday, the main gripes were with the header of the design. Today’s update is a small but necessary one – one that shows the start of a new design idea. Very often the start of a design determines its success at the end, and people may or may not take an instant like/dislike to it.

I’d like to stress to those that perhaps didn’t quite get it that this work has already been done, I’m simply posting it out of good humour and I thought people would be interested.

Well, here it is.

Previous entries can be viewed in the WIPUP profile page.

Related posts:

  1. Countdown to KDE 4.4 and the new KDE website: 4 days left
  2. Countdown to KDE 4.4 and the new KDE website: 3 days left
  3. Countdown to KDE 4.4 and the new KDE website: 2 days left

Robyn is 2

So my little angel is now 2 years old :) She had a nice birthday and was very excited by present opening for the first time .... ominous. It only seems like yesterday she arrived!

Anyway, one big party to look forward to next weekend. Should be fun!

terminfo merged into NetBSD

It's taken some time, but my terminfo implementation is now  merged into NetBSD :)

No doubt there will be some fallout and flames, but it's all about bringing some needed modernization into NetBSD!

Posts for Wednesday, February 3, 2010

avatar

How to Restrict Access to Terminal Servers

After finally completing my Group Policy re-write for Windows 7 this week I have gone back to working on the plans for our migration to Exchange 2010. Currently we do use an Exchange 2003 server but only a few users are on it and it is only there to provide compatibility for a couple of specialised programs that are on our Terminal Servers. With the move to Exchange for all users possibly the biggest change will be that now all users have a Windows user account potentially allowing them access to the Terminal Servers when they shouldn’t have any.

In order to do this you could make use of the builtin group called ‘Remote Desktop Users’ which aslong as your using Windows 2003 R2 should have been setup when you installed the Terminal Servers role and by default has permission to connect remotely to any Terminal Server.

It is also possible to customise which users and groups can connect remotely to a Terminal Server so you make your life easier and reuse existing groups to control access, or setup multiple groups if you wanted to limit certain users from connecting to particular Terminal Servers. To do this you can either edit the Local Security Policy on each Terminal Server or apply the changes via Group Policy, the option you are looking for to set this via Group Policy can be seen below (the Local Policy method is also very similar to this and should be easy enough to find):

Allow log on through Remote Desktop Services

Enable the 'Allow log on through Remote Desktop Services' Option

Inside this you can add all the users and groups who should have remote access.

While this may seem like all that is needed and while all the users and groups specified can now logon to the Terminal Servers you apply this to you will likely also find that infact *any* user can still login to the Terminal Servers. To correct this we need to make one final change as by default anyone in the Users group can access the server due to the ‘Allow log on locally option’.

Allow log on locally

Remove the Users group from the 'Allow log on locally' option

While you might be concerned about the warnings given in the ‘Explain this’ tab advising you to not remove users, if you read the relevant section on the link provided it explains that it is safe to do this aslong as you dont remove important users from the list and aslong as users who should have access are granted permission to do so elsewhere.

Hopefully if this has all worked you now have a Terminal Services environment where only those users explicitly allowed can gain access.

avatar

libQtGdata

I was trying to sync some google stuff (some contacts and calendars) with korganizer and kaddressbook there are nice plugins for libgcal to get an akonadi google resource. Unfortunately I was unable to fully sync both the calendars and the contacts. This are known issues but there has been no activity in the git repository for quite some time.

When taking a look at the gdata API the API seems OK and best of all well documented. So I started yet another project: libQtGdata. The aim of the project is to provide a base class to login to google and have some modular system that allows for extension to each of the google API’s, so not limited to contacts or calendars but also youtube, feedburner….. etc.

There currently isn’t much and it is quite a mess but logging in already works. Now I now the code is not very clean but after 4 weeks of intensive C coding it takes a little time to write neat code in Qt again.

avatar

Countdown to KDE 4.4 and the new KDE website

I like dabbling in web development and design and so I was quite happy to be able to participate in the redesign of the new KDE.org website due to release in conjunction with KDE SC 4.4 on February 9th. This was what I was working on during the past week and I must say I’ve learned and experienced quite a lot from trying to contribute.

So every day, including today, I will release an image showing stages in the process of creating the KDE webdesign mockup. They can be found in a newly setup WIPUP project, which can be seen in full at my WIPUP profile.

Today we start off with the original mockup (not done by me) from a user with the alias it-s. Have a peek.

Related posts:

  1. Countdown to KDE 4.4 and the new KDE website: 4 days left
  2. Countdown to KDE 4.4 and the new KDE website: 1 day left
  3. Countdown to KDE 4.4 and the new KDE website: 2 days left

Posts for Tuesday, February 2, 2010

avatar

OpenSSH: Reuse existing connections / Reverse tunnel

OpenSSHYou often hear the phrase “the swiss knife of …”. Well, for networking, OpenSSH clearly deserves that title in my opinion. Besides the obvious feature of providing secure logins with different options for mutual authentication, it can also be used to transfer files. It is also a core component of software like git, which depend on ssh to securely push changes instead of reinventing their own server and dealing with the whole authentication/authorization stuff once again.
I’ve blogged about using SSH to access hosts behind a firewall/router more conveniently, and I really suggest you sit down and read the manpage front-to-back, it will probably be rewarding for your current workflow.

Reusing a connection
Anyway, today I wanted to present another advanced feature, one I only stumbled upon while learning for an upcoming exam. The slides mentioned the possibility to share connections on one SSH-channel (to the same destination, obviously). Now, why do you need more than one connection in the first place? Well, sometimes you just need the space, and using screen just doesn’t cut it. Or you use git or scp to the same host you’re logged in already interactively. In that case, you just have to establish one connection and any further connection will use the first one. The benefit? Login is way faster, almost instantly, because the whole handshake and authentication doesn’t have to take place again. The caveat: You’ll have to close your master-connection last, otherwise the other connections will drop too. For me that’s no problem, since the host I use most of the time is also the host I’ve got a session open with 24/7 (IRC).

I’m just gonna show the fully automated version here, though you can use it manually as well, just when you need it. A better description can be found here. To automate it, put this in your ~/.ssh/config (you don’t have a config yet? shocking!):
ControlMaster auto
ControlPath /tmp/%r@%h:%p
As usual, you can put it at the very top to apply for all hosts or you can activate it for specific hosts by putting below a Host declaration. Now all you have to do is use ssh host as usual. You’ll see it’s working when you terminate the connection:
Shared connection to host.de closed.

Reverse tunnel
Yes, you can tunnel with OpenSSH. You can even have it act as a SOCKS proxy, which is really neat when combined with Firefox-plugins like FoxyProxy. But you can also reverse-tunnel your way out of a closed network (or NATed network for that matter) when you don’t have access to any intermediate host (like the router/firewall). It’s easy:
ssh -NR 12345:localhost:22 home.deThis assumes you’re issuing the command from the machine that you want to access (from home) later on. It will bind the port 12345 on home.de so that it is forwarded to port 22 (SSH) on the local host. Yeah, it requires some reverse thinking too to get it right ;) The -N-switch prevents a login, by the way. Obviously it is of little use if your home.de has a flaky dialup connection, so you might want to reverse-tunnel to a stable endpoint (or use something like autossh).

Alma : 57

Yet another great strategy-based chapter.   I'm kind of tired right now, and this chapter wasn't really loaded with doctrinal insights, but I will say that if there's any question about whether or not obedience has its rewards, you'll have to read verses 21-27.  Definitely makes me want to both learn about and obey my Heavenly Father more.

QGraphicsScene used as a QAbstractItemView II


Again some thoughts about this complex topic, but this time with content not as last time when i accidentally published an unfinished article – i’m very sorry for that.

updated diagram illustrating the QGraphicsScene used as a QAbstractItemModel

the primary difference to the last one i published is that there is the other view i’ve integrated into the automate project – the ‘TreeView’

extending QGraphicsItem to be used with a QAbstractItemModel

Q: what is this section about (in a few words)?

A: now as QGraphicsItem is used to represent QModelIndex‘es they need a way to query data from the Model, this is how it can be done

in qt4 there are a few different classes using QGraphicsItem as a base class. originally i wanted to extend the items with virtual inheritance [1] but then the ‘dreaded diamond‘ problem showed me that it can’t be done since i could NOT change the way a QGraphicsTextItem would inherit from QGraphicsItem (read: i couldn’t add the keyword virtual between

‘public _here_ QGraphicsItem’

and if that can’t be done the virtual inheritance can’t be used). of course one could now change the qt core library but that would be wrong ‘in concept’ since my application should be able to be used with any version (for example qt 4.4) not just one single version i’ve changed.

so after hours of figuring i came up with the class GraphicsItemModelExtension [2], it makes use of pure virtual functions and since QGraphicsItem(s) do have a data() and setData() function which is exactly the same function name used with the Model i had to rethink the function calls. now data() and setData() for the Model used from a QModelIndex via GraphicsItemModelExtension are named modelData()/setModelData() instead.

but what makes you want to use the GraphicsitemModelExtension class? in contrast to my previous attempt it stores the QPersistentModelIndex and you don’t have to rely on an existing scene() which is then casted from a QGraphicsScene into a GraphicsScene which then would provide a Model* which finally would be used to query data.

the basic concept after adding an item to the QGraphicsScene is that one needs to query data right in the constructor, for instance you need various properties as ‘label’ or ‘color’. since the normal item now has index() it can instantly (even when not added into a scene() yet) query the Model for data. NOTE: right after an item is added to a QGraphicsScene it does NOT have a scene() yet, if you try to query scene() from a constructor of a QGraphicsItem you WILL get NULL which was a big flaw in my previous implmenetaions. but now that problem is gone and because of the nature of pure virtual functions (yes QGraphicsItemModelExtenstion is actually an abstract base class) it helps to design new custom GraphicItems.

again ‘why i used properties instead of another hierarchy layer’

in the automate [3] project i had a TreeView which does have several columns and one can display one property per column, this is done by the data(..) implementation and is quite easy, just see my code. however in the spring random map generator project [4] i need the properties not in one row per column but instead all properties should be top down with:

module name
propertyName propertyValue (displayed by a delegate)
propertyName propertyValue (displayed by a delegate)
propertyName propertyValue (displayed by a delegate)

so i can’t use the data(..) function as i did last time. now i need one QModelIndex per row but my model currently does not have properties as QModelIndex’es at all. so what should i do? i’m still not sure about this… but as soon as i found a nice solution i will write about it.

links

[1] http://www.parashift.com/c++-faq-lite/multiple-inheritance.html

[2] http://github.com/qknight/springrts.com-random-map-generator/blob/master/src/frontend/GraphicsItemModelExtension.cpp

[3] http://github.com/qknight/automate

[4] http://github.com/qknight/springrts.com-random-map-generator

Posts for Monday, February 1, 2010

avatar

Sanctuaries

Ok, it all started with my friend Chetan letting this out yesterday:

"Windows will never be virus-free. Those anti-virus companies need to survive, don't they?"

Hmmm. That one reminded me of this one:

"World will never be rid of wars. The weapons industry needs them!"

The mention of war led to remind me of this one:

"Not everything man does is evil to nature. After all, some of us DO try and help and preserve animals. There ARE sanctuaries."

Right. Like there would be a need for sanctuaries if man hadn't threatened their existence in the first place!

This led to Vika remembering someone saying this:

"Americans didn't massacre the Indians. They're helping them preserve their culture.."

Like Vika says... nifty!

the future of the internet


before thinking about ‘the future of the internet’ let’s have a look what the ‘internet’ actually is. the internet consists of two low level protocols, that is: tcp and udp and the most prominent protocol ip. and many other protocols are building on this, as http for instance. you are currently reading this blog page using http, that means you are also connected to the internet.

if you want to be a part of the internet you need a internet address – in short an ‘ip address‘. since most of use are using ipv4 that means often ppl share one ip which is bad since you can’t address some person sharing an ip with someone else directly. Sharing usually means NAT – network address translation – and it also means that the internet does not work correctly. NAT is a failure and was never meant to be in the original design of the internet.

say you call your friend and he has no phone in his room – but one at his mother’s room. usually you can’t call between  [22,8] o’clock. the same thing is true for nat – you usually can’t reach the other person directly.

the only possible solution to this problem is ipv6. however we fail to integrate it. we currently fail at a lot of things (germany 2010):

  • apply ipv6 a standard before others do it (and we have to accept their policies & concepts)
  • removing 24h disconnects for dsl
  • creating balanced upload/download links
  • instead of forcing providers to make dsl uptime 99.9%, we still heavily rely on the telephone system which has in comparison far better service guarantees (for instance dialing 112)
  • have more applications using osi-layer 5 (session layer) instead of binding a session to ip:tcp states

So ‘what was the internet again’?

Actually the internet is much more than just what you can do with your browser using http. Before looking at http in detail let’s have a look at popular protocols which do NOT use http.

  • the first thing which comes into my mind are all the network implementations for games which most often use UDP and in some rare cases use TCP. this is a very big class of applications
  • then we have SIP and similar implementations as ’speech over ip’ in short VOIP. most internet providers tend to like SIP. gamers often use TeamSpeak or Mumble but there is skype folks as well. the most notable difference between all sip like implementations and skype is that skype’s implementation bases on a p2p structure but since it is closed source one can only speculate how chat and speech is using this framework.
  • then there are the chat clients in various flavors ranging from irc & psyc and to IM protocols as xmpp(jabber), irc, msn, aim & others. these chat clients – more often than not – have also webinterfaces which let’s YOU access the service via http as well. using http is a very interesting approach since it uses http for that and http usually DOES NOT WORK WELL with such an service but we’ll have a look at that later
  • p2p filesharing which is (at least bandwidth wise) the most popular internet service. i think about bittorrent (kademlia) or other similar concepts (this does not include services like rapidshare!).
  • last but not least there is a concept  known as ‘middle ware‘.
    for a very long time i did not understand the importance of having a ‘middle ware’ when designing internet protocols. corba and it various implementations for what one would call a ‘middle ware’ and from the protocol designer’s point of view it gives you a very high degree of object interoperability.

    • when a game developer has to write network code usually the choice tends to UDP since the laggy nature of TCP flow control can’t be ignored when one uses a internet connection with lots of packet loss. however UDP basically does not care for lost packages at all which kind of ‘overcompensates’ the problem one wants to solve. so most developers extend UDP until all needed features are there. when the network code is done and objects as players interact with other players via the network (read ip here) the game developer basically has created his own ‘middle ware’.
    • the concept using a ‘middle ware’ is very easy to understand: you don’t want to care what the network looks like you just know it’s there but instead of writing parsers for tcp or udp streams with ‘object serialization‘ and ‘object marshaling‘ one can just use an adapter in the programming language of choice which handles all this. of course using custom types here is most often not as easy as using core types as ‘int’, ‘double’, ‘float’ and ’string’ but handled in most cases.

http problems

so after looking at the use case of ip let’s have a look at http and what problems http has and how they are solved. the biggest issue using http is not the performance hit introduced by html/xml and bandwidth loss on the other hand. instead the biggest issue when using http is the fact that http is a ‘polling’ only protocol so a client might download a webpage as: http://www.lastlog.de but then closes the connection. this works well when you only want to look at webpages and if you are only interested in client side events as mouseclicks & similar. but if you want to implement an interactive chat using http it gets more complicated since you would have to query the server every second for new messages from other users (even if there was no new message at all). the server CANNOT connect to your browser and tell you about ‘the new message’ right away as it is done in all the IM protocols.

so there are some new concepts as spdy:// from google [1] but there are other similar ideas as well. all lead to a next generation http protocol with callback capabilities. opera for instance features ‘a socket in the browser‘ which is a interesting concept. both concepts transform the ‘user’ from a pure consumer into a ‘consumer/producer’.

in the first days most internet providers had ‘terms’ in their ‘terms and agreements‘ which forced you to offer no webservices with your private internet connection. the situation since the internet was introduced has changed and providers now sell devices as the fritz-box with DDNS clients for services as dyndns.org preinstalled. this change needs to be extended further as the classic pattern of ‘private’ and ‘commercial’ usage merge more every day. it gets hard to distinguish between the service levels needed for either of the two scenarios. we need to extend:

  • service guarantees (uptime/bandwidth)
  • extend upload (currently internet connections are pure consumer connections)
  • extended QoS guarantees where i think of ‘big bandwidth but high latency‘ vs. ‘small bandwidth with low latency‘ since the normal ‘telephone line’ will vanish soon we need some way of backup line for emergencies of various kinds

So after some history, what makes opera with websockets revolutionary? It’s the ‘ease of use’ to put content online. You don’t need a provider to host your stuff, just host it yourself! But there are pitfals as upload bandwidth is small even with VDSL, i don’t know why… my scale of guesses range from:

  • ‘reducing costs since most users are consumers’ to
  • forcing users to ’shut up’ and to sell enterprise servers for much money

there are many points for both sides and i don’t have much background to make a good guess.

Some final thoughts:

  • Currently I’m waiting for a revolution: the upcomming ‘ipv6′ could make skype ‘vanish’ since traversing NAT is the biggest problem in creating a ‘free clone’ of skype (this is also valid for SIP). also filesharing as p2p will work much better.
  • http will be extended with something like spdy:// very soon, which will make ajax programming pattern much more powerful
  • the normal browser will not host only some ajax scripts but will also host parts of the database and programs nowadays running on the webservers only and therefore turn into a local webserver. the first step was ajax, the second step needed is spdy:// and the third step to make this work will be adapted software for webservers to run in such a scenario. looking at the success of http is that it is a easy to use protocol with working standards and it can pass nearly every firewall. it basically hosts all kind of services. the next big step will be to make the browser to look like a application. again – the first step is something like google docs, the second step was making it a tv with plugins as flash. the next revolution for example is compiling c/c++ code in a way that it runs on top of the flash plugin [2]. in the end the browser and any normal host application merge…
  • flash will vanish – since the biggest use case is streaming videos and commercials, so guess what users will disable once most videos are played using the in-browser player (which has also huge performance improvements)?

links

[1] http://www.chromium.org/spdy/spdy-whitepaper

[2] http://www.flashmagazine.com/news/detail/play_doom_online_-_thanks_to_adobe_alchemy/

Posts for Sunday, January 31, 2010

avatar

In this day and age I expect 7 hours minimum of battery life being connected to the internet for all devices.

Related posts:I’m in ur Hong Kong airport, stealin’ ur wifi, departing to Toronto in 3 hours. Related posts:
  1. I’m in ur Hong Kong airport, stealin’ ur wifi, departing to Toronto in 3 hours.

Posts for Saturday, January 30, 2010

Joined identi.ca

It has finally happened — I succumbed to the microblogging craze!

Until now I never felt any urge to use a microblogging platform, because I think that if something is worth telling, you should tell it right and that SMS'ing the world in general is rather stupid. The only real use I can think of would be to join a group you belong to communicate there when writing a blog post or e-mail would be too much.

So, now that I plan to actively participate in FSFE (and hopefully FSFE Slovenia soon) and therefore found a use for it, I created an identi.ca account.

This being said, I still think people are (ab)using this medium way too much for just outright garbage...

hook out >> trying to figure out how to get Gnash to work in Konqueror
<!--break-->

fake a dual monitor display!

Wouldn’t we all love to have a beefy workstation with at least two giant lcd monitors? Alas, I have a slim laptop with a small screen. And another laptop, almost 10 years old, albeit with a nice and large screen. I naturally prefer to use the newer machine for performance, but it also means making do with a small monitor.

I can tell you it’s a real pain to author latex documents this way, I can’t fit both the kile and evince on the screen at the same time. It wasn’t until recently that it hit me what I was doing wrong. There are three processes involved here:

  1. Document editor.
  2. Compiler (I run a loop that invokes make continuously in the background).
  3. Document viewer.

Come to think of it, this applies just as well to coding if you think “running the code” on the last step.

Well, X11 is a display server, for peet’s sake! So you have the editor on the workstation, but then you log in from the other laptop (with the larger screen) and run evince to display there.

Just do:

oldlaptop$ ssh -XYC workstation

Don’t ask me why -Y, I don’t know, but that’s how I get my ubuntu to allow remote connections.

avatar

WIPUP on Trac

Yesterday saw a burst of activity as far as WIPUP commits were concerned, but most importantly I’ve said goodbye to the proprietary Assembla project management tool we were using before and set-up our very own in-house service "Trac", courtesy of our lovely host.

Trac’s main use is in ticket tracking – a way for users to report bugs and wishlists they have with the website. However like any respectable project manager it also comes with a wiki, on which you can find the brand new Eadrax roadmap, so you can see what fancyness is coming up ahead. So if you’re playing with WIPUP already and see something you don’t think is quite right go check out trac.

Oh and if you missed the sneak peak showing BBCode and resizable forms, check it out now.

Related posts:

  1. WIPUP 14.01.10 released!
  2. Dogfooding WIPUP
  3. SocialDesktop Competition Update: Wipup

Posts for Friday, January 29, 2010

Alma : 56 - Courage, Faith

Ya know...  The explanations of the strategy of war really is interesting to me.  But when I come across verses like these, I simply can't help but get chills.

I actually tear up when reading these verses.  I guess it's kind of the whole underdog syndrome.  Ya know... When there's a conflict, or a competition, and the odds are overwhelmingly in favor of the stronger party.  Yet through some miracle, or intense desire, or whatever, the weaker party begins to gain advantage...  Not sure why, but that always gets me...

And in this case, we're talking about a huge seasoned army against 2,000 young guys who hadn't fought before.  What a scene that must have been....  For Helaman to say, "never before had I seen such great courage, nay not amongst all the Nephites", that must have been quite the experience.

...and then, of course, for them to continue on in their word, and go out to fight - only to have an overwhelming victory and not lose one soul.  Wow.  I want to hear that story told by Helaman himself someday.

What a great, great example of courage and faith.  Take that and apply it personally, and there are all sorts of applications where we might feel weak, or insecure, or scared to take on our personal demons which, to our sight, are as big, and numberless as an army of experienced warriors bent on our demise.

Yet just as those warriors took courage in what they knew to be right, and being armed with the truth of their own divine birthright, and as such, being protected by almighty God himself, and while trusting their very lives to His will, exerting everything within their power...

...they conquered their enemy - against all odds.

Just as the 2,000 Stripling Warriors did, we too, can most assuredly overcome and claim our victory.

What a fabulous, fabulous chapter.

Faunus is alive!

Finally, after an epic battle with disk encryption, the kernel and initramfs — my brand spanking new shiney matt ThinkPad is up and running!

World, be prepared for Faunus — the horned god of the forest!!!

Compiling even KDE on this puppy was a dream. I find it surreal how quiet and cool it is even when put under loads as high as 5 and 8 :3

hook out >> gotta run to the faculty for a meeting

Posts for Thursday, January 28, 2010

avatar

How dumb is Slashdot?

OK that title is a bit provocative.  I enjoy reading Slashdot as much as the next guy, and I'd always laughed at the comments about Slashdot readers being dumb, but this post got me rolling my eyes in frustration: "2 Displays and 2 Workspaces With Linux and X?"

The OP asks about buying a second monitor and setting up two screens - one large desktop or separate X screens.  Firstly, I would expect a question like this from an Ubuntu noob, followed by lots of answers like RTFM, Google it, see this FAQ, etc.

However on Slashdot, there are so many people who still don't realise that one large desktop doesn't mean windows have to maximise to two screens.  So few people seem to know about xinerama and yet they're still giving advice!  Someone said that "Windows 7's easy dual monitor setup lets you maximise to one window - can Linux do that?" (sheesh, only for years now...)

Slashdot users have some fantastic, intersting, and informative posts.  Unfortunately, unlike a regular email list where only the people who might actually know the answer reply, everybody on Slashdot wants to reply.

Quad Erat Rant-astrandum!
avatar

bash.rss to feedburner

According to the statistics many of you use my bash.org rss feed. The traffic generated by this feed has grown over the last year and right now it is around 70% of the total traffic of this website (around 600MB a month).

Just out of principle this is a bit much for a RSS feed so I decided to move the feed to feedburner. Thanks to a .htaccess rule the feed is already forwarded. This means that current subscribers to the feed should not notice anything ;)

Happy reading :-)

avatar

Debian adventures

This is post is a rant. So don’t complain, I warned you.

<rant>
On my laptop (Macbook 4,1) I run Debian testing/experimental which was running quite smoothly since I installed it apart from the couple few weeks.

The first problem I faced was java not running inside browsers. Firefox, Iceweasel, Opera, google-chrome…nothing. I spent at least 2 hours installing/uninstalling various java packages, moving plugins to new locations and I couldn’t get it to work. I was furiously googling about the issue until I hit the jackpot: squeeze : in case you have no network connection with java apps …

Today I upgraded xserver-xorg-input-synaptics from 1.2.0-2 to 1.2.1-1. Even though it is a minor version bump a kind fairy also told me to reboot…I rebooted and my touchpad was not working properly, tapping was lost, I couldn’t use synclient because shared memory config (SHM) was not activated and so on and so on. My dynamic config using hal was there, /var/log/Xorg.0.log said that I was using the proper device and lshal showed correct settings for the device. I read /usr/share/doc/xserver-xorg-input-synaptics/NEWS.Debian.gz nothing new. After some googling another jackpot: Bug#564211: xserver-xorg-input-synaptics: Lost tapping after upgrading to 1.2.1-1. For some reason touchpad config has moved to udev from hal and the maintainers didn’t think it was important enough that needed to be documented someplace or put it in README.Debian…

The last issue I am having is with linux-image-2.6.32-trunk-686-bigmem not working correctly with KMS and failing with DRM.
[ 0.967942] [drm] set up 15M of stolen space
[ 0.968030] nommu_map_sg: overflow 13d800000+4096 of device mask ffffffff
[ 0.968085] [drm:drm_agp_bind_pages] *ERROR* Failed to bind AGP memory: -12
[ 0.968159] [drm:i915_driver_load] *ERROR* failed to init modeset
[ 0.973067] i915: probe of 0000:00:02.0 failed with error -28

linux-image-2.6.32-trunk-686 works fine with those though.
[ 0.973466] [drm] set up 15M of stolen space
[ 1.907642] [drm] TV-16: set mode NTSC 480i 0
[ 2.137173] [drm] LVDS-8: set mode 1280x800 1f
[ 2.193497] Console: switching to colour frame buffer device 160x50
[ 2.197435] fb0: inteldrmfb frame buffer device
[ 2.197436] registered panic notifier
[ 2.197442] [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0

Xorg is amazingly sluggish using linux-image-2.6.32-trunk-686-bigmem kernel. I search the debian bugs database and noone seems to have reported such an issue. But google came up with: [G35/KMS] DRM failure during boot (linux 2.6.31->2.6.32 regression). The issue looks solved so I will try and report it to Debian and see what comes out of it…
*Update* Bug Report: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=567352

If you dare to comment saying “that’s what you get for using experimental” I really hope and curse you to spend 3 hours today to try and figure out what has changed in a minor version upgrade of one of your installed packages.
Even worse, if you are on those guys that kept telling me “don’t use stable, testing is stable as a rock, never had a problem in years…” then I curse you to spend a whole day trying to reconfigure something with no documentation :P
<rant></rant>

avatar

Firefox Personas

Firefox Persona's - inevitable Bling Bling or worthwhile (but still Bling Bling)?

If you don't know what I'm talking about, I just upgraded Mozilla Firefox to version 3.6.  The what's new? page is different this time.  Instead of the usual congratulations, security notes and links, I'm greeted with "Thanks for supporting Mozilla’s mission of encouraging openness, innovation and opportunity on the Web!" and "Choose Your Persona".


If you mouse-over any of the "persona" thumbnails, Firefox's theme changes dynamically. Cool.  Note only that but there's been quite a bit of design effort into making these personas look sleek, integrated, and elegant.

From This

To This!

I would be happy with the old Netscape look for years to come (why did they need to keep changing the logo anyway?) but I guess the iPod yungun's of today are attracted to shiny silver objects, and that goes for the software world too.  In the age of "I'll buy anything new from Apple just  because it's cool" it's inevitable that Firefox adds some chrome!

Alma : 56 - Covenants

With all that I've noticed about making covenants this time around, I can't help but notice that this chapter has some very interesting words.

I really do wonder where the line is with covenants we make.  In the days of the Book of Mormon, people would rather die than lie or break a covenant.  This is made abundantly clear with the ealier wars with Zarahemnah, and with the Lamanites letting 1000+ of their warriors die, after ignorantly saying (and evidently covenanting) that they would fight at the next city no matter what, while they were travelling toward the city of Noah...  and these are the wicked people.  I'm sure the righteous people took their covenants even more seriously.  So, with that said, what about today?

By today's standards, even righteous people I know make and break covenants all the time.  They lie, and are lazy, and even the best people I personally know really don't consider a white lie all that bad.  When people say they'll be somewhere to help someone at a specific time, and they don't show up - people just don't care that much...  It's almost expected that when people talk, they're lying.

So, you might be thinking right now, "The oaths and covenants made by the people back then were done officially, and it was way more important back then", or something like that...  But I really don't know if that's the case.

In this post, I argue the case that Zarahemnah, when faced with death, would rather let his armies die than tell a lie to his enemy.  That was in the heat of battle, too.... with someone he HATED!  Think about it.  Imagine you're in a fight with your worst enemy, who you would kill, should you be given the chance.  You are using not only all YOUR faculties to kill him, but you've got a band of friends which are actively doing the same.  When faced with the opportunity to tell a lie, and gain an advantage, would you?

Seems to me that in this case, almost every person I personally know would do so, including myself (being totally honest).

So.. Where's the line?  Today, we have no problem lying and enjoying ourselves doing so, and back then, people would rather let their worst enemy kill them than tell a simple lie.

So, back to this chapter...  In verses 7 and 8, Helaman declares to Moroni that he would rather have the people of Ammon stay warm in their homes while battles rage on all around them, even when they're willing to help out - all because of the covenant they made to not fight anymore.  I can't help but think that the covenant they made was a little naive.  Captain Moroni is claimed to be one of the most righteous people in the Book of Mormon, and he spends most of his life fighting.  I guess that is where the question comes in....  where's the line?  We obviously should honor word and "make our word our bond", but when it comes to honoring something you said when you didn't know any better, is it better to honor your word, and let your brethren die because of it?  Or is it better to go back on your word and help your country survive?

I guess I'm nit-picking pretty crazily right now, but I guess it's just a pet-peeve of mine, and the more I read about covenants, the more obvious it becomes of the dichotomy between our times and theirs.

I also can't help but bring to mind the fact that God never changes - and I wonder what He thinks of this.

I'll write more about the rest of this chapter later.
avatar

Emerge multiple packages at once

You may or may not already know about this feature, but you can emerge multiple packages at once in Gentoo.  If you have any semi-recent machine (2 years old or newer) you should definitely be using it.

Being source based - and hence compiling everything before you install it - any build time speed improvements are welcome.  We already have the -j option which can be passed to make via make.conf:
MAKEOPTS="-j3"
Various sources say to set this number j = N(CPU) + 1 or j = 2N(CPU) + 1.  I find the former is sufficient.

But what about configure?  Before you compile a package, you have to configure it, which typically can only use one CPU.  In addition there are other operations that are disk-intensive while not being CPU intensive (for instance, unpacking source code).  And finally some packages are just "broken" and internally set -j1.

So it would be nice to build (unrelated) packages simultaneously.  While one configure script is running, another could be compiling, further utilising those MeGaHurTz you paid so dearly for!  Recently I tested this for the first time.  I ran emerge like so:
$ emerge -vauDN --jobs=2 world

After looking through the output, this is how it proceeds:
Total: 70 packages (66 upgrades, 1 new, 3 reinstalls, 3 uninstalls), Size of downloads: 0 kB
Conflict: 23 blocks
Portage tree and overlays:
[0] /usr/portage
[1] /usr/local/portage

>>> Verifying ebuild manifests
>>> Starting parallel fetch
>>> Emerging (1 of 70) x11-libs/qt-xmlpatterns-4.6.1
>>> Emerging (2 of 70) sys-devel/binutils-2.20
>>> Jobs: 0 of 70 complete, 2 running Load avg: 5.56, 2.53, 1.67

And just to prove that two packages are emerging:
$ genlop -c

Currently merging 2 out of 70

* sys-devel/binutils-2.20

current merge time: 1 minute and 27 seconds.
ETA: less than a minute.

Currently merging 1 out of 70

* x11-libs/qt-xmlpatterns-4.6.1

current merge time: 1 minute and 28 seconds.
ETA: less than a minute.

A little while later, my load average settles down around 4.8:
>>> Installing (18 of 70) dev-python/pytz-2010b
>>> Installing (16 of 70) x11-libs/qt-script-4.6.1
>>> Emerging (19 of 70) dev-util/subversion-1.6.9
>>> Emerging (20 of 70) dev-lang/python-2.6.4-r1
>>> Jobs: 17 of 70 complete, 1 running Load avg: 4.84, 4.84, 3.94

You may come across some packages that are interactive, such as skype, which forces you to view and accept their EULA.  In that case the concurrent jobs are disabled.  If you wish to go ahead with all non-interactive jobs (a good idea!) run emerge like so:

$ emerge -vauDN --jobs=2 --accept-properties=-interactive world

Note this feature is not supported in older versions of portage.  I tested with sys-apps/portage-2.1.7.16
avatar

Listing packages installed from overlays

Gentoo provides an official package repository, and the mechanism for creating third-party repositories, called overlays.  Overlays can be home-made, developer-made, community-made, you name it!

It occurred to me that I wanted to list all installed packages that come from overlays.  (I'm doing some house cleaning, so I'm removing overlays I don't need anymore).  There appears to be no way to generate this list via equery (the "gentoolkit" method of doing various package queries).

This one-liner should do the trick.

$ for i in /var/db/pkg/*/*; do if ! grep gentoo $i/repository >/dev/null; then echo -e "`basename $i`\t`cat $i/repository`"; fi; done

The output of which looks (only slightly messy) like:
revoco-0.5    Orpheus Local Overlay
synce-gvfs-0.3.1    SynCE
synce-serial-9999    SynCE
synce-trayicon-0.14    SynCE
nautilussvn-0.12_beta1-r2    Orpheus Local Overlay
evolution-data-server-2.28.2    Orpheus Local Overlay
gnome-hearts-0.3    Orpheus Local Overlay
nautilus-python-0.5.1    rion
nautilussvn-0.12_beta1_p2    Orpheus Local Overlay
mozilla-thunderbird-bin-3.0_beta2    Orpheus Local Overlay
libgii-1.0.2    Orpheus Local Overlay
grub-0.97-r9    rion
usb-rndis-lite-0.11    SynCE
xorg-server-1.7.4    Orpheus Local Overlay

You can see here that I have various packages installed from the SynCE overlay, the rion overlay and my homespun "Orpheus" overlay.

It assumes your overlay was set up correctly with the file profiles/repo_name containing the overlay name, at the time of install (not available in earlier versions of portage).
avatar

iPad, what about you?

Now I really couldn’t resist. Really – and if you haven’t heard of it yet I guess Apple needs to get more fanboys, or at least ones who talk more. The iPad was released yesterday, and is the embodiment of magical Apple orgasm. Here’s a picture. Apple loves pictures.

Apple iPad

Yep, it’s simply one big iPod/iPhone with a bad accent.

I preach the economics of technology. Simply put I am mostly ridiculed for that theory by anybody who’s glimpsed at economics and doesn’t know much about technology. On the other hand it turns out that everybody I’ve talked to who does keep a close eye on the tech industry agrees almost instantly that yes, the success of products in the technology market are due to developer interest, and only developer interest in the long-run. Now I remain a firm believer of this myself and have been trying to find exceptions to this rule. One that was suggested was the Apple iPod, which as we all know was a runaway success. However seeing that lately the traditional iPods have started to phase out in favour of iPod Touches (where all the developer interest is) this example simply reaffirms my theory. The other fine suggestion was an interesting one, too – computer games. These, I believe, have a much longer period until developer interest deals the final blow – and in some cases are completely consumer-determined. These are an anomaly. I challenge people to find others.

But but but – for the rest the theory will apply. So why don’t we look at the iPad from the perspective of a producer-determined success?

If anything, Apple hit the jackpot. It’s not a secret that developers have been looking forward until the time we had a sensible tablet platform to work wonders on. When Apple decided to allow iPhone apps to run on it natively unchanged, not only does this mean that developers don’t need to bother about learning a brand new system (simplifying things a bit here), it also means that porting over applications are quick and easy. 140,000 applications immediately available to a consumer? I’ll take that, thank you very much.

I’m not too knowledgable about Apple products but I do know that iPhones can be “jailbroken” – a way of breaking your deal with Apple to enjoy a bit more freedom. If this iPad can be jailbroken to run third-party applications that don’t have the Jobs seal of approval and bypass other random restrictions I’m sure will exist, that’ll blow developer interest sky-high.

One thing many people seem to confuse developer interest with is that they think the degree of developer freedom is proportional to the interest received. No, this is not true. Developer interest arises and shifts prone to as many factors and more as consumers. If a developer thinks consumers will like it, regardless if they do or don’t, they will devote time to the product. So despite the face analysis that the iPad has 140,000 developers already upfront (on the assumption that there is on average 1 developer per app) we can’t ignore the other main factors.

In the beginning I mentioned that developers have been looking forward until we had a sensible tablet platform – so when I say other main factors, this is the one I’m talking about. Once they get over the fact that it’s quite simply a fat iPod Touch looks-wise, we’ll have to question whether or not the time is ripe for a tablet platform to come or if this is just going to be classed as another failed attempt to make a tablet successful and the “perfect” tablet is yet to come. What determines how other developers see this is how well Apple has upgraded the in-house apps to take advantage of the bigger screen.

Well folks, as you can see even though we’ve not once considered the consumer’s point of view it doesn’t get us much closer to guessing how successful it’ll be. No – the economics of technology should not be shunned to a corner and disrespected but instead embraced as a new way to look at success in technology.

Related posts:

  1. The economics of technology
  2. On the nth day of Christmas, my true love gave to me nx, (n-1)x, (n-2)x…
  3. The Google Operating System – Chrome.

Posts for Wednesday, January 27, 2010

Alma : 55

I love Moroni's strategy.  With God on his side, he seems almost unstoppable.

So Ammoron decides to be a jerk about the letter-sending, and what-not, so Moroni's like, "Dude...  You did NOT just say that!  A'ight, then, we'll see who gets to keep prisoners around here!!"

Let's see what could have gone wrong with this strategy....

  • An enemy on the inside could have been woken up during the exchange of weapons, and killed all the prisoners and kept the Nephites from gaining control of the city.

  • The Lamanites could have not taken of the wine given them, suspected something, and taken Laman (the good Lamanite) and his posse all prisoners, or could have killed them.

  • The prisoners could have been moved, and Laman and his posse could have been taken prisoner..



I dunno.. Maybe I'm stretching it.  My point is - Moroni took a pretty big risk doing what he did, but it worked - and he ended up not only freeing his own people from prison, but also gaining that many more prisoners without killing or hurting anyone!  He also re-took another city in the process!

I guess, when you've got the Lord on your side, it's a good idea to follow the Spirit (which I'm sure Moroni did), and take the risk.
avatar

How to check if you are editing GPO’s using a local, or central store

After my previous posts about preparing to build a new Group Policy for Windows 7 and about setting up the Central Store it occurred to me that it may be useful to actually check that when we edit the GPO that we are actually using the admx files from our Central Store rather than those stored locally. This may not seem important until you think that Windows Vista, Server 2008, Windows 7 and Windows Server 2008 R2 all ship with different versions of the ADMX files so you want to avoid a situation where you are building your GPO and dont realise that you are missing potentially useful options.

Thankfully it is very simple to see if you are using the ADMX files from your Central Store or not:

ADMX Files being loaded locally

This shows the ADMX files are being loaded locally

ADMX Files being loaded from the Central Store

This shows the ADMX files being loaded from the Central Store

avatar

When Dell Doesn't Deliver

I've never had a "bad" experience from Dell (Australia) with the exception of the outsourced sometimes hard-to-understand technical support.  So it is interesting to watch what happens when Dell doesn't deliver the way they promise.

Here's the sequence of events.  For the record, I do not and have never worked for Dell, nor do I receive any free or discounted goods or services from them.

14 April 2008

Ordered Dell Precision M6300 laptop including a Logitech MX Revolution cordless laser mouse with CompleteCover Guard and Next Business Day Onsite warranty.

November 2009

The mouse stopped charging (charging light flashes red when placed on charger).  I didn't do anything at the time since I was busy.

12 January 2010

My first contact with Dell about the mouse.  Was transferred from their usual warranty number (Indian speaker) to the "premium" warranty area (Australian speaker).  Was told a new mouse would be here in 2 days.

18 January 2010

Received email from TNS requesting I complete a survey regarding my recent call.
Completed the survey on the same day.  I noted in one of the survey questions that the issue was "unresolved" since I had not received the replacement part

<= 22 January 2010

Decided to call Dell again to find out about the mouse.  Warranty told me that the part had not been sent, and it would have to be handled by Logitech.  They transferred me to Logitech who took details of the mouse and told me to expect a new one up to two weeks later.

27 January 2010

Received a call from Dell regarding the survey I completed.  The caller asked if I had received the part, and offered to get the original person ("Nick") to look into it.  He asked if I had a mouse to use in the mean time (I said yes).

27 January 2010

Received a call from Nick from Dell.  He asked about the part and said he would check with Logitech and get back to me.

27 January 2010

The mouse arrived in the afternoon!  I called Dell to let them know they could stop looking for it!

So it took 9 days to respond to the survey.  The replacement mouse was here in around one week, although not in the next business day as the warranty implied.  But then, it was an accessory and not a typical spare component of the laptop.

And in case you're wondering about the Gold Phone Technical Support, apparently it's the difference between speaking to someone in India vs someone in Austrlia.  The "Pro" warranty personnel even answers the phone "This is <name> in Sydney".

Posts for Tuesday, January 26, 2010

Working remotely

I'm sitting here in Canada trying to work for my employer back in the US for a month. It's been a few weeks already, and I'm surprisingly pleased (or pleasantly surprised) with how well it's working. At the same time, certain aspects of this rather suck.

One huge obstacle so far is (of course) Windows. Aside from the Linux server that I convinced IT to let me run out of a closet, the whole place is Microsoft. Whatever MS VPN software we're using is slow, clunky, unreliable, and generally annoying.

At one point I tried to fetch a file from a network drive and watched it download at 0.2 k/sec. Then I had someone back home copy it onto my Linux box, and I downloaded from there at 120 k/sec. The Windows and Linux servers are in the same room in the same building behind the same network connection; I don't understand how VPN overhead slowed things down by that many orders of magnitude.

After connecting to VPN, there's about a 25% chance that Outlook will be able to connect to the Exchange server at work. Generally I have to fire up the VPN, turn it off, turn it on, turn it off, turn it on and then Outlook will find it. Sometimes I close Outlook, but it lives on as a zombie, futilely hammering away at the server but unable to find it, until I CTRL-ALT-DEL and kill it. This is with Office 2007.

But the work I do on the Linux server is (of course) easy. No problems whatsoever. Working over SSH is how I did things when I was sitting in my office anyways. I tunnel in and use local GUI SQL clients. I put VirtualBox on my laptop and I do a bunch of stuff in a Linux VM and rsync it back home with no problems. I can edit files over SSH right in Emacs as if they were on my local box, if I care to.

Sometimes I wonder if my dislike of Microsoft is irrational. Any belief that is caused by or results in a strong emotional response should be subject to questioning. Then reality comes waltzing by and reminds me that no, MS software really does suck.

I've worked for this company for over two years before moving. I don't know how well I'd be doing if this was a company I just started with. It's hard to see how important face-to-face communication is until it's impossible. Email is OK, but the benefit of knowing people in person and knowing how they talk and how they think really goes a long way to being able to interpret and understand plaintext communication.

Alma : 54 - Moroni's Anger

Wow...  Moroni doesn't mix words, does he...  Reading this through as much of an objective filter as possible, I'd say there's some serious judgements going on.  Moroni blatantly calls Ammoron a "child of hell", and tells him that his brother went to hell.  heh...  Pretty gutsy, if ya ask me.  Going off of what the prophets of the Book of Mormon have said concerning Captain Moroni, I'd say I have no room to doubt anything having to do with his status before God, passing judgments or not.  A serious study of Captain Moroni would certainly prove to be very fruitful of spiritual insights.

I wonder what it would take to have a testimony as strong Moroni's.  He states in no uncertain terms that he "will give you battle even until you are destroyed from off the face of the earth."  I believe he meant it.

Anyway...  I'd really enjoy a good study of the life of Captain Moroni, even from the little we know of it.
avatar

Setting up a basic test lab using VMware

One of my favourite features in VMware Workstation that I have found recently is the ability to create a ‘team’ of virtual machines. What this does is allow you to have one or more virtual machines running on a virtual LAN, essentially allowing you to setup a private test network where you for example run test domain controllers or any network application and as long as you have the network setup correctly there is no way for anything to ‘leak’ out onto your production network.

Ive been using this to run a simple test network with two virtual machines to help develop and test a new Group Policy for our Windows 7 deployment later this year. In one virtual machine I have Windows Server 2003 running as a Domain Controller and as a Router/DHCP Server (this VM effectively becomes our virtual LAN’s gateway for internet access and so needs two network interfaces – one to connect to hosts network and gain internet access and the other to connect to the internal virtual LAN), and in the other I have Windows 7 setup as a member of the test domain.

Once you have your virtual machines ready to go we are ready to create our Team and add the virtual machines to it. In VMware go to File -> New -> Team to launch the New Team Wizard. Give the Team a name and decide where you want to store the configuration file then add the virtual machines you want in the Team (you can always add and remove virtual machines to and from Team at any point). Next you need to add at least one LAN Segment, this is basically the virtual LAN that will connect our Domain Controller to our Windows 7 virtual machine (any any other VM’s you add), you can has multiple segments, all with different network speeds if you want to simulate a larger, multi-site network but for our simple lab it is easiest to just use one segment. Finally you need to which network adaptor connects to which network (virtual or otherwise), this can be a confusing if you are not used to networking and VMware so here is a screenshot of my configuration that you can use as a base.

My VMware Team Network Configuration

My VMware Team Network Configuration

The important thing here is to make sure that one network adaptor of the Domain Controller is on the Virtual LAN with the Windows 7 VM (and that if you have already run the network setup wizard after installing the network router/DHCP roles on the Domain Controller you make sure you select the correct adaptor – dont worry, it can always be changed if you get it wrong). Also, assuming you want all the machines in your Team to be able to access the internet then you will need to map the Internet facing adaptor on your Domain Controller to the host machines network, my recommendation is to use NAT here to ensure your Virtual Network remains isolated although aslong as you are careful when you configure the Domain Controller’s routing you can use Bridged networking.

And there we go, you should now have a simple, but very useful Virtual lab environment that you can use like me to test new Group Policy options, or really anything (ive been running the new Sharepoint 2010 beta in another test network), you can even extend the lab with additional LAN Segments to represent remote sites (with simulated packet loss too if you want), the Team options give you a lot of options if you want to expand your lab, the only limitation is how fast your computer is!

avatar

foaf

Some time ago I learned about the foaf-project, I did like the project back then but I never took the time to write my own foaf.rdf. Well now it is created. Very basic but I hope it will be extended soon.

Since my recent social network activity the step to foaf was, in my eyes, also a logical one. But it does seem that a lot more people have facebook than foaf….

One of the nice things about foaf, if you are interested in semantic web stuff, is that it is in constant development there are discussions on the mailing list about how to structure the data etc or why things should change. This makes it a very dynamic project.

As you can see I do not yet have any foaf:knows elements in my foaf.rdf but lets hope that soon will change so a semantic network can span around me.

avatar

The Sarc Mark available for Linux?

Raise your hand if you’ve seen this little gem:

That’s the latest addition to the English language (The Guardian). Used like the rest of the Mark brothers (Mr Question Mark and his annoying sister Little Miss Exclamation Mark) Mr Sarc’s purpose is to denote sarcasm. Now instead of using various to-be-deprecated techniques such as the sarcasm tag </sarcasm> vague emoticons or my personal favourite "No shit, Sherlock", we have a standard to look towards that will appear whenever you hit ctrl-. (that’s full-stop). Of course you’d have to pay some US company 2USD to get it there (please, please don’t tell me you actually tried it just now).

I was wondering if anybody took the initiative to create a font with support for this on Linux – others might see it as a complete waste of time and resources but I can’t wait to write my next essay with this in it.

Related posts:

  1. rtm – a Command Line Tool for RememberTheMilk
  2. Hello. I hacked the GIS website.

New York City – KDE SC 4.4 Release Event

Anyone living in NYC up for putting together KDE SC 4.4 release shenanigans? It would be around Feb 9th, probably a day or two after, I suppose.

Posts for Monday, January 25, 2010

Wpa_gui is Underrated

A hot topic in the community is wireless management. There’s a whole lot of buzz about NetworkManager, Wicd, dbus, frontends, PolicyKit, plasmoids, and the whole modicum of dizzying names and acronyms. Let me tell you about my mobile laptop’s wifi setup and why it’s easier and slimmer than any of the classic bloat.

I use wpa_supplicant’s optional wpa_gui. It’s a tiny Qt app that has a tray icon and a command line switch to start in the tray. Wpa_supplicant is required for all modern wireless connections and is always running in the background no matter what. Wpa_gui simply connects to wpa_gui’s socket and tells it what to do. I like having wpa_gui in my system tray so that I can reconfigure wifi networks easily.

zx2c4@ZX2C4-Laptop ~ $ cat ~/.kde/Autostart/wpagui.sh
wpa_gui -t

And check it out:

A simple, somewhat ugly, but extremely functional info display. I can connect to new networks with a simple double click:

And presto it connects to the wifi network. I can also configure all of the highly advanced encryption profiles that wpa_supplicant supports. All of this is easily accessible in my tray:

If I did not want wpa_gui -t running all the time, I could pretty easily make this into a little quick launch plasma button, and it would start up nearly as fast, because wpa_gui is so light weight.

This is how I do wireless. I have never had any trouble, and I can connect to wifi networks anywhere I go with ease. It remembers the connections and the priorities that I assign, and I have not seen any system simpler or easier than this.

For wired networking, netplug calls my ethernet setup scripts when I plug in an ethernet cable. No tinkering required. For my cellphone internet via bluetooth, I run “pon nokia” and my ppp chatscript does all the rest. This could easily be tied to a little menu button in my launcher.

I’m bloat free, and networking dynamically on the go with my laptop does not require any advanced timely tinkering.

Why are you all using NM, wicd, etc instead of good ol’ wpa_gui?

Planet Larry is not officially affiliated with Gentoo Linux. Original artwork and logos copyright Gentoo Foundation. Yadda, yadda, yadda.