Manish Chakravarty's Blog

Thoughts. Musings. Suggestions, Ramblings

Cowsay Man page: hilarious!
[info]manish_chaks
This is /NOT/ fiction.. have a look at the screenshot to know more ..
( and yes install it! )
cowsay(1)

                     cowsay(1)

NAME
       cowsay/cowthink - configurable speaking/thinking cow (and a bit more)

SYNOPSIS
       cowsay [-e eye_string] [-f cowfile] [-h] [-l] [-n] [-T
tongue_string] [-W column] [-bdgpstwy]

DESCRIPTION
       Cowsay  generates  an  ASCII  picture of a cow saying something
provided by the user.  If run with no arguments, it accepts standard
input, word-wraps the message given at about 40 columns, and prints
the cow saying the given message on
       standard output.

       To aid in the use of arbitrary messages with arbitrary
whitespace, use the -n option.  If it is specified, the given message
will not be word-wrapped.  This is possibly useful if you want to make
the cow think or speak in figlet(6).  If
       -n is specified, there must not be any command-line arguments
left after all the switches have been processed.

       The -W specifies roughly (where the message should be wrapped.
The default is equivalent to -W 40 i.e. wrap words at or before the
40th column.

       If any command-line arguments are left over after all switches
have been processed, they become the cow's message.  The program will
not accept standard input for a message in this case.

       There  are  several  provided  modes  which change the
appearance of the cow depending on its particular emotional/physical
state.  The -b option initiates Borg mode; -d causes the cow to appear
dead; -g invokes greedy mode; -p causes a
       state of paranoia to come over the cow; -s makes the cow appear
thoroughly stoned; -t yields a tired cow; -w is somewhat the opposite
of -t, and initiates wired mode; -y brings on the cow's youthful
appearance.


       The user may specify the -e option to select the appearance of
the cow's eyes, in which case the first two characters of the argument
string eye_string will be used.  The default eyes are 'oo'.   The
tongue  is  similarly  configurable
       through -T and tongue_string; it must be two characters and
does not appear by default.  However, it does appear in the 'dead' and
'stoned' modes.  Any configuration done by -e and -T will be lost if
one of the provided modes is used.

       The  -f option specifies a particular cow picture file
(``cowfile'') to use.  If the cowfile spec contains '/' then it will
be interpreted as a path relative to the current directory.
Otherwise, cowsay will search the path specified in
       the COWPATH environment variable.  To list all cowfiles on the
current COWPATH, invoke cowsay with the -l switch.

       If the program is invoked as cowthink then the cow will think
its message instead of saying it.

COWFILE FORMAT
       A cowfile is made up of a simple block of perl(1) code, which
assigns a picture of a cow to the variable $the_cow.  Should you wish
to customize the eyes or the tongue of the cow, then the variables
$eyes and $tongue may be  used.   The
       trail  leading  up  to  the  cow's  message  balloon is
composed of the character(s) in the $thoughts variable.  Any
backslashes must be reduplicated to prevent interpolation.  The name
of a cowfile should end with .cow, otherwise it is
       assumed not to be a cowfile.  Also, at-signs (``@'') must be
backslashed because that is what Perl 5 expects.

COMPATIBILITY WITH OLDER VERSIONS
       What older versions? :-)

       Version 3.x is fully backward-compatible with 2.x versions.  If
you're still using a 1.x version, consider upgrading.  And tell me
where you got the older versions, since I didn't exactly put them up
for world-wide access.

       Oh, just so you know, this manual page documents version 3.02 of cowsay.

ENVIRONMENT
       The COWPATH environment variable, if present, will be used to
search for cowfiles.  It contains a colon-separated list of
directories, much like PATH or MANPATH.  It should always contain the
/usr/local/share/cows directory, or at least
       a directory with a file called default.cow in it.

FILES
       /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_textproc_cowsay/work/destroot/opt/local/share/cows
holds  a sample set of cowfiles.  If your COWPATH is not explicitly
set, it automatically
       contains this directory.

BUGS
       If there are any, please notify the author at the address below.

AUTHOR
       Tony Monroe (tony@nog.net), with suggestions from Shannon Appel
(appel@CSUA.Berkeley.EDU) and contributions from Anthony Polito
(aspolito@CSUA.Berkeley.EDU).

SEE ALSO
       perl(1), wall(1), nwrite(1), figlet(6)

                                     $Date: 1999/11/04 19:50:40 $

                     cowsay(1)

--
Manish Chakravarty
Blog: manish-chaks.livejournal.com/
LinkedIn: www.linkedin.com/in/manishchakravarty
Twitter: twitter.com/ManishChaks
Facebook: www.facebook.com/manish.chakravarty

First Chapter for my selenium book
[info]manish_chaks
I have tentatively called the book "Selenium Internals"

You can download the book from here

please send your reviews, feedbacks, suggestions coming.

Look forward to posting one chapter everyday :)

Writing a book on selenium: Outline
[info]manish_chaks


Chapter 1 - Introduction
Goals
• Introduce participants to each other
• Establish the goals of the program
• Do a “warm up” on selenium
• Setup Environment ( IDE, repo etc )
Architecture

Chapter 2: Selenium Core
Goals
User should be able to…
• Write a simple test case in Selenese
• Demonstrate understanding of core and core-less
• Demonstrate understanding of core profiles
• Familiarity with various JS files
• Demonstrate how to build and deploy core part to Maven
Agenda
• Building the Selenium Core
Outline
• Explain the source tree layout
• Create sample HTML page
• Create Selenese test case
• Include the test case in the actual suite ( conditions configure for
specific browser etc)
• Building the selenium core
• Describe conversion
• looking at pom.xml for selenese ant task
• Describe important JS files which are part of Selenium Core.
• Describe how Selenium coreless creates profile
• Firebug
• Windows Registry
• difference between PI mode and non PI mode ( diff between the JS
files being loaded )
Links
• Starting with Selenium
• Setting up Apache on OS X
• Ajax Testing with Selenium using waitForCondition
• Agile Testing with Selenium

Notes
browser launcher, launcher util, WindowsUtils, creation of firefox
profile and extension, ie registry modification, fire bug extension,
fire fox 3 patch, iedoc.xml geberation with rhino
selenium-api.js, selenium-browserbot.js, selenium-remoterunner.js,
selenium-testrunner.js, different between PI mode loading and non-pi
mode loading of js files

Chapter 3 – Selenium Server
Goals
User should be able to demonstrate understanding of
• the source structure of Selenium Server
• how selenium server and selenium core talk to each other (Incase of
selenese test case – selenium-testrunner.js and driver commands )
• diff context paths in the selenium server
• how selenium server handles requests
Outline
• Talk about source structure of SS ( talk about selenium server =
(SeleniumCore +SeleniumCoreLess ))
• Describe architecture of the Selenium Server
• Describes the commands Selenium Core sends to Selenium Server
( Excercise: Do this with FireBug; involve students )
• How selenium server handles selenese test cases
• How selenium server handles test cases driven by driver
• Talk about SSL certificates.
Notes
proxy handler
static content handler (classpath resources)
cache content handler
selenium driver handler

Chapter 4 – Selenium Driver
Goals
User should be able to demonstrate and understanding of ….
• How selenium converts iedoc.xml XML to Java/ruby/python driver
interface and implementation with iedocXXX.xml xslt & Converting
selenese test case to Java test case with XLateHTML2Java and handling
special conditions while test case conversion
• How to run test cases from Java driver end.
• Selenium Driver <—> Selenium Server interactions
Outline
• From the XML doc generated in Chapter one, we will talk about how
code is generated out of it.
• In case of Java binding , how they are creating Java test case from
selenese test case.
• What if we dont want them to generate the system automatically?
• getEval (“WaitUntilPresent”)
• how to get rid of getEval and extending the Selenium driver
( inheritance OR composition )
• patterns (do, get , is )

Chapter 5 – Selenium Driver
Goals
User should be able to demonstrate and understanding of ….
• Understanding hooks
• Understanding how to extend the selenium core objects
• How things would differ from PI and non PI mode
Outline
• Taking the click and the wait ; such that click implicitly calls a
wait

Chapter 6 – Selenium Modes
Goals
User should be able to demonstrate and understanding of ….
• IEHTA/chrome #Running a functional test case under different
browsers
• Page ranking algorithm
• Multi-domain issues
• How to exclude files from injection
Outline
• Talk about IEHTA and Chrome modes
• Demonstrate running the functional tests under different browsers
Facilitated Discussion – “What are the major cross-browser issues have
you faced in general and with Selenium in particular?”

Chapter 7 (part 1) XPath
Goals
User should be able to demonstrate and understanding of ….
• difference between XPath implementation in IE and firefox
• how to change the XPath library used for IE
Outline
• Talk about XPath Implementation in IE and firefox
• Attendees will be asked to find out how to change the XPath library
for IE
• Explain the difference between the two javascript implementations
• Talk about the pros/cons of the native IE XPath implementation
( Including issues with MSXML )
NotesChapter

MSXML cannot deal with malformed HTML documents. That is why a
JavaScript library is needed to deal with XPath.

Chapter 8

This Chapter is more of discussions regarding Selenium issues
• Running selenium test cases in parallel (Selenium Grid)
• Slow JS
• Flex Driver
• Selenium-Flash demo Topics to vary wrt to time. Participation from
audience encouraged
Outline
• Demonstrate the stuff mentioned in the goals and talk in detail

Chapter 9: Wrap Up
Facilitated discussions regarding
• Twist

Conducting a traning programme on Selenium. Interested?
[info]manish_chaks


After the last months successful (and first meet ) of the Indian selenium user's group , I have decided to go ahead and hold a selenium training camp at the Bangalore TW office [1]

The meet was really good, there was 50+ attendance and as you know this was the first ever meet!


The outline can be found here.

Feel free to sign up. ( All you need to do is reply to the thread or reply to me directly )


[1] = some people have requested a web-based training solution as they cannot physically travel to Bangalore. I am looking at exploring all options.

Alert! VMware breaks with Debian upgrade + fix
[info]manish_chaks
I have VMPlayer installed on my debian lenny.

Here's the output of "uname -a" : Linux manish-laptop 2.6.26-2-686 #1
SMP Thu May 28 15:39:35 UTC 2009 i686 GNU/Linux
After the kernel upgrade from 2.6.26-1-686 to 2.6.26-2-686, the linux
headers are not installed ( if you installed linux-headers for the
previous kernel they stay as is but they are not upgraded)

VMPlayer (or any other flavor of VMWare) then breaks. You need to execute
"sudo apt-get install linux-headers-`uname -r`" which will fetch the
correct version of the linux headers.

The VMWare starts up, fixes the module stuff ( see attached
screenshot) and then boots up just fine.

I wonder why the Debian guys dont automatically install the newer
version of the headers when 1. The user already has an older version
of the kernel headers installed 2. An automatic upgrade does upgrade
the older kernel.

Snapshot of my desktop
[info]manish_chaks
My workspace becomes even more crowded......

What I am trying to do is launch firefox from within the code base
using a proxy server ( code's in eclipse)
Firefox has been custom-profiled to auto-load Venkman ( the window
with "JavaScript debugger") and that is being used to control the
recording and playback using the Selenium IDE (top left of right
screen) .. the recording/playback mechanism is behind-the-scenes (and
thus another use of Venkman)

Had a long hard day's work today

Google Chrome on Linux!
[info]manish_chaks
Took the latest build [1] of chromium for a swing. (this is not a
review since chrome for linux is not ready for primetime yet)

To test, I got down the latest build of Chromium for Linux.
Installation was as simple as downloading and unzipping the file and
then doing a "./chrome".
Everything looks fine, I have used for a while .. GMail, iGoogle,
Yahoo all opened and worked just fine. Changing the language in
iGoogle from English to Hindi cause Chrome to not display anything in
the browser, this was strange. This is probably some
internationalization issue in Chromium which would be fixed later.

I will spend more time with Chrome and will give you and update after
a while of using it more.

[1] = build.chromium.org/buildbot/snapshots/chromium-rel-linux/...

Twouble with Twitters: SuperNews!
[info]manish_chaks

Something malicious going on in gmail chat?
[info]manish_chaks
Just logged into gmail .. seeing strange names + the "Kasav" thing..
Are you facing a similar problem?

I'll hold for announcements in OSNews/ArsTechnica/Slashdot for more info on this

Video: Sun's Legacy
[info]manish_chaks
http://video.forbes.com/fvn/tech/sun-legacy

An amazing video.

www.thoughtworker.com
[info]manish_chaks
This is a fantastic site put up by the ThoughtWorks. It sends out a clear picture of who we are and what we do. It gives a very interesting glimpse into the life of a thoughtworker and why you should work with ths.

do check it out --> http://www.thoughtworker.com

Gmail is down!
[info]manish_chaks
I have been trying to access Gmail for the past quite some time now.
I am getting 503's


I am able to access GMail via mutt though.
I guess the mail servers are still up but the webservers are down.

Anatomy of the Ext4 Filesystem
[info]manish_chaks
http://www.ibm.com/developerworks/linux/library/l-anatomy-ext4/index.html?ca=dgr-lnxw07Anatomy-of-ext4&S_TACT=105AGX59&S_CMP=grsitelnxw07


Making Mingle sync with Jira and Bugzilla
[info]manish_chaks
I have been working on making working Mingle sync with Bugzilla and Jira
Click on the image to see a bigger version

I have had a considerable amount of success in writing a tool which helps me accomplish this with relative ease.

So now we have a link on the Mingle bar, clicking on which, your bugzilla instance will be synced to Mingle!

Have a look at the image below. The "Sync To Bugzilla" link is on the top right, next to my name.
BugzillaToMingleDemo

The tool can import all properties including comments and attachments from Bugzilla into Mingle.
A notable omission is that "Estimates" from bugzilla are not imported as of now.
Estimates from Bugzilla are not visible in Bugzilla's XML so we dont import it.

Anyway this is how an imported card looks:
ImportedIssue
(Click on the image to see a bigger version

With this tool, I hope that customers wanting to migrate to Mingle should face lesser barrierss to adoption.

Photo: A dog in front of a wedding house
[info]manish_chaks
/td>

The Matrix runs on windows!`
[info]manish_chaks
See this amazingly hilarious movie!

Open office plans not good say Australian scientist
[info]manish_chaks
Quote

"In 90 per cent of the research, the outcome of working in an
open-plan office was seen as negative, with open-plan offices causing
high levels of stress, conflict, high blood pressure, and a high staff
turnover.


"The high level of noise causes employees to lose concentration,
leading to low productivity, there are privacy issues because everyone
can see what you are doing on the computer or hear what you are saying
on the phone, and there is a feeling of insecurity.'
'


Source: http://www.news.com.au/business/story/0,27753,24906913-5017672,00.html


Makes for an intersting read. ThoughtWorks bangalore is by and large an open office space



Bday resolution: quit smoking cigarettes
[info]manish_chaks
While I clearly love smoking, I guess It'd be a good thing to do on my 25th bday

My Sony Digicam runs Linux!!!
[info]manish_chaks
Read an article on Slashdot about the Sony DSC-G3 which has WiFi and runs Linux.

I own a Sony DSC-H50


After digging up the Sony site, I found the the source code of the linux kernel and other stuff including BusyBox which runs on my camera!!!!!
Tags: ,

The pains of Debian Lenny
[info]manish_chaks
Let me describe my usage first:

I have an Acer Aspire 2920 subnotebook of my own , which I use for
- KDE4 development
- Some office work, which involves using IntelliJ Idea, Eclipse and some Ruby stuff. Essentially Sun JDK 6 stack and the ruby stack.
- I also use the computer for my personal use, and use Pidgin and Skype for keeping in touch with people.
- Some multimedia support for watching DVD's and listening to music.
- I am a heavy user of VMware. Ability to use Fusion Vm's from my mac are a must.

The problems with multiple gcc's and VMware server

I pulled in the KDE 4 Development packages for Debian and that resulted in two versions of gcc being installed.
Apparently the Debian kernel is compiled using gcc 4.1.3 and the KDE development stuff pulled in gcc 4.3.2 as well.
By default the "gcc" command is a symlink and is set to the latest version.

That proved a major pain. VMware server would try to compile its modules against the kernel and it would fail since the kernel is built using 4.1.3 but the system default compiler is set to gcc 4.3.2

Unlike Ubuntu, there is no update-alternatives --config gcc which I could to shift to another gcc version. I had to resort to ln -s /usr/bin/gcc-4.1 /usr/bin/gcc by hand to fix this. Yes this is fugly but then I had no other choice.

After fixing this problem VMware Server was able to compile it's module and it managed to install it
By the way, even after install VMWare Server was not functional.

Downloaded VMWare Player and the converted the VMWare player RPM to .deb using alien.

Confusion with "git"
After running an apt-get install git I expected to have the git command up and running in my system. Instead I get this:
manish-laptop:/home/manish# git
gitaction    gitkeys      gitps        gitrgrep     gitwhich    
gitdpkgname  gitmkdirs    gitregrep    gitunpack    gitwipe     
gitfm        gitmount     gitrfgrep    gitview      gitxgrep


Yes, git is not the git distributed source code management system, it acutally is a meta-package for gnuit, which is described as follows:
 gnuit (GNU Interactive Tools) is a set of interactive text-mode tools,
closely integrated with the shell.  It contains an extensible file
system browser (similar to Norton Commander and XTree), an ASCII/hex
file viewer, a process viewer/killer and some other related utilities
and shell scripts.  It can be used to increase the speed and
efficiency of most of the daily tasks such as copying and moving
files and directories, invoking editors, compressing and
uncompressing files, creating and expanding archives, compiling
programs, sending mail, etc.  It looks nice, has colors (if the
standard ANSI color sequences are supported) and is user-friendly.

Yeah right.
Dug up a little and found that git-core is the package to install to install git on your system.

VirtualBox pulls in odd kernel modules.
My system uses the following kernel
Linux manish-laptop 2.6.26-1-686 #1 SMP Mon Dec 15 18:15:07 UTC 2008 i686 GNU/Linux

Now when I started pulling in VirtualBox see what happens:

manish-laptop:/home/manish# apt-get autoremove
Reading package lists... Done
Building dependency tree      
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 41 not upgraded.
manish-laptop:/home/manish# apt-get install virtualbox
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Note, selecting virtualbox-ose instead of virtualbox
The following extra packages will be installed:
  virtualbox-ose virtualbox-ose-modules-2.6.26-1-486
Suggested packages:
  virtualbox-ose-source bridge-utils
Recommended packages:
  virtualbox-ose-modules
The following NEW packages will be installed:
  virtualbox-ose virtualbox-ose-modules-2.6.26-1-486
0 upgraded, 2 newly installed, 0 to remove and 41 not upgraded.
Need to get 0B/6850kB of archives.
After this operation, 21.8MB of additional disk space will be used.
Do you want to continue [Y/n]?

It's pulling in a 486-optimized kernel to run on my system.
I went ahead with the install nonetheless.

As expected it nicely put the 486 kernel in my grub boot entry. And this kernel had the vbox kernel modules loaded into memory.

The good things about Debian Lenny
  • Sounds works out of the box on my laptop, including the audio in/out jacks
  • Skype works flawlessly. Installed it using gdebi and the installation was flawless. One of the things that I really like about gdebi is that you can point it to a .deb file and it will pull in all the required dependencies for installing. It 's much better than the dpkg command for this particular purpose and for this particular purpose only :)









Home