Coredump

Work, play, and everything in-between.

Archive for the ‘linux’ tag

Twitter updates, via CLI

without comments

TwitterI’ve just started using Twitter, an up-and-coming web service that posts user status on the web, in IM and in SMS. The service also exposes its API, so it’s possible to build apps using it.

I found a nifty way of updating my Twitter status through the command line:

curl -u username:password -d status='status_goes_here' -s http://twitter.com/statuses/update.xml > /dev/null 2>&1

Written by Ian Dexter

March 20th, 2007 at 11:32 am

Posted in Play

Tagged with , , ,

Dell asks: ‘What Linux flavor do you want?’

without comments

After their IdeaStorm survey to gather customer feedback, and with the resounding call for Linux on Dell notebooks (and desktops), Dell is now asking what Linux flavor customer wants?

I think Dell would be better off coming up with different offerings, and become OS-agnostic. Then again, there are support costs involved (even if there are available community support infrastructures for one’s OS of choice), but the idea is to fit the product to the customer’s requirements. For example, for a Windows user who wants to make the shift to Linux, Dell with Ubuntu would be great. For experienced Linux users (from basic to intermediate), there should be choices between Fedora Core, Ubuntu or OpenSuse.

(I did not add the “paid” Linux variants, but those are better for corporate accounts, I guess.)

[Update] Here’s an even better idea: Dell should ensure that their hardware works with the kernel (and xorg, at least) out of the box.

Written by Ian Dexter

March 14th, 2007 at 10:15 am

Posted in Play

Tagged with ,

Who wrote the latest Linux kernel?

without comments

It turns out that about 2,000 developers contributed at least one patch to the 2.6.20 version of the kernel.

The study used the lines of code changed as a metric to determine the top contributions to the kernel code.

Interestingly, while kernel development was “spread out among a broad group of people, most of whom (were) paid for the work they do.” Not surprisingly, Red Hat, IBM, Novell and Oracle — top players in the Linux market — were among the top contributors. But it is also interesting to note that companies like Nokia and Sony also contributed portions to the code.

Definitely not the case of having too many cooks.

Written by Ian Dexter

March 6th, 2007 at 10:12 am

Posted in Play

Tagged with ,

FizzBuzz

without comments

Hmmm

In Bash, I would have done:

$ for i in `seq 100` ; do if [ `expr $i % 15` -eq 0 ] ; then echo FizzBuzz; elif [ `expr $i % 3` -eq 0 ]; then echo Fizz; elif [ `expr $i % 5` -eq 0 ]; then echo Buzz; else echo $i; fi; done

Then again, it took me about 10 minutes to do that. (I couldn’t get the ternary operator to work, somehow.) In C: about five minutes (rusty — I last used C way back in college {ages ago!}).

In a recent phone interview, I was asked to programmatically (in shell) rename a set of files. I blundered for about two minutes, and gave up in the end, saying I could probably do that by experimentation. I could fairly say I passed that interview. The point? Answering “FizzBuzz” questions does not reflect real-world situations — it’s how you approached the problem, even if you didn’t get the answer, that matters.

If I were an interviewer, I’d concentrate on the steps rather than the solution.

Written by Ian Dexter

March 1st, 2007 at 5:18 pm

Posted in Play

Tagged with , , ,

Trivial desktop customization

without comments

I’m currently playing with Devil’s Pie, a utility that matches windows and window events to a set of rules similar to Emacs’ (yikes! :P) S-expressions.

I installed Devil’s Pie on my work desktop (running FC6), thus:

$ sudo yum install devilspie

(I have previously organized my desktop with four workspaces: for browsing, remote SSH sessions, remote desktop sessions, and other tasks.) I then created a configuration file:

$ mkdir .devilspie && vi ~/.devilspie/workspaces.ds
   (debug)
   (if (is (application_name) "Firefox") (begin maximize (undecorate (set_workspace 1))))
   (if (is (application_name) "Terminal") (begin maximize (undecorate (set_workspace 2))))
   (if (matches (application_name) "^rdesktop.+") (begin center (maximize (set_workspace 3))))

and invoked Devil’s Pie: devilspie -d ~/.devilspie/workspaces.ds &. The (debug) line in the configuration is, heh, for debugging purposes so Devil’s Pie will print out events and other information, which I can then later use.

Seems pretty straightforward, though there isn’t much functionality that I can use. (Then again, my requirement is minimal: I just want to group apps to different workspaces to avoid clutter.) I can then drop Devil’s Pie in my X startup script, along with the other startup apps.

Written by Ian Dexter

February 27th, 2007 at 10:33 am

Posted in Play, Work

Tagged with , , , , ,