news

2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 FOSS documentation emacs fedora foss freedom gnome haskell laptop photo ruby travel verilog vhdl vlsi xmonad


[Published in Open Source For You (OSFY) magazine, September 2013 edition.]

CUnit is a free and open source, unit testing, software framework written in C. It provides a very simple interface to write unit tests, and has a number of assertions for testing data and functions.

CUnit is created as a library that links with the user’s code under test. It is packaged and is available in most GNU/Linux distributions. It has been released under the LGPLv2+ license. You can install it on Fedora, for example, using the following command:

$ sudo yum install CUnit

The CUnit framework helps manage test cases, the test registry, and test suites. A systematic approach is to write unit tests for your code, initialize the CUnit test registry, add the test suites to the test registry, and then add the unit tests to the suites. Set-up and clean-up functions can be written for each test suite. All the test suites can be executed together or can be run selectively. The user interface method to run the tests needs to be decided before executing them. The test registry needs to be cleaned up before returning the error condition and exiting from the test run. Consider the following simple example:

#include <CUnit/CUnit.h>

int init_suite(void)  { return 0; }
int clean_suite(void) { return 0; }

int
is_even (int x)
{
  return (x % 2 == 0);
}

void
test_is_even (void)
{
  CU_ASSERT(is_even(1)  == 0);
  CU_ASSERT(is_even(2)  == 1);
  CU_ASSERT(is_even(3)  == 0);
}

int
main (void)
{
   CU_pSuite pSuite = NULL;

   /* Initialize CUnit test registry */
   if (CUE_SUCCESS != CU_initialize_registry())
      return CU_get_error();

   /* Add suite to registry */
   pSuite = CU_add_suite("Basic_Test_Suite", init_suite, clean_suite);
   if (NULL == pSuite) {
      CU_cleanup_registry();
      return CU_get_error();
      }

   /* add test to suite */
   if ((NULL == CU_add_test(pSuite, "test_is_even", test_is_even)))
   {
      CU_cleanup_registry();
      return CU_get_error();
   }

   /* Run tests using Basic interface */
   CU_basic_run_tests();

   /* Clean up registry and return */
   CU_cleanup_registry();
   return CU_get_error();
}

You can compile the above code using:

$ gcc basic.c -o basic -lcunit -lcurses

The above step can also be abstracted and automated in a Makefile for subsequent compilation and testing, as follows:

CC = gcc
CUNIT_LDFLAGS = -lcunit -lcurses

objects = basic

all:
	$(foreach file,$(objects), $(CC) $(file).c -o $(file) $(CUNIT_LDFLAGS) ;)

clean:
	rm -f *~ *.o $(objects)

You can type ‘make’ in the terminal to compile the code, as follows:

$ make
gcc basic.c -o basic -lcunit -lcurses ;

On execution, you get the following output:

$ ./basic 


     CUnit - A unit testing framework for C - Version 2.1-2
     http://cunit.sourceforge.net/



Run Summary:    Type  Total    Ran Passed Failed Inactive
              suites      1      1    n/a      0        0
               tests      1      1      1      0        0
             asserts      3      3      3      0      n/a

Elapsed time =    0.000 seconds

The above example uses the Basic interface output from CUnit. A number of assertions have been defined in CUnit/CUnit.h file. Some of them are:

CU_ASSERT(int expression) CU_ASSERT_FATAL(int expression) Check expression is non-zero
CU_ASSERT_TRUE(value) CU_ASSERT_TRUE_FATAL(value) Check value is non-zero
CU_ASSERT_FALSE(value) CU_ASSERT_FALSE_FATAL(value) Check value is zero
CU_ASSERT_EQUAL(actual, expected) CU_ASSERT_EQUAL_FATAL(actual, expected) Check actual == expected
CU_ASSERT_NOT_EQUAL(actual, expected) CU_ASSERT_NOT_EQUAL_FATAL(actual, expected) Check actual != expected
CU_ASSERT_PTR_NULL(value) CU_ASSERT_PTR_NULL_FATAL(value) Check pointer == NULL
CU_ASSERT_PTR_NOT_NULL(value) CU_ASSERT_PTR_NOT_NULL_FATAL(value) Check pointer != NULL
CU_ASSERT_STRING_EQUAL(actual, expected) CU_ASSERT_STRING_EQUAL_FATAL(actual, expected) Check actual == expected

The Automated interface dumps the output of the test results to an XML file. The following code snippet is used for the Automated interface:

   /* Run tests using the Automated interface */
   CU_automated_run_tests();

The compilation step is similar to the Basic example. The output is dumped to the CUnitAutomated-Results.xml file, which contains the following:

<?xml version="1.0" ?> 
<?xml-stylesheet type="text/xsl" href="CUnit-Run.xsl" ?> 
<!DOCTYPE CUNIT_TEST_RUN_REPORT SYSTEM "CUnit-Run.dtd"> 
<CUNIT_TEST_RUN_REPORT> 
  <CUNIT_HEADER/> 
  <CUNIT_RESULT_LISTING> 
    <CUNIT_RUN_SUITE> 
      <CUNIT_RUN_SUITE_SUCCESS> 
        <SUITE_NAME> Basic_Test_Suite </SUITE_NAME> 
        <CUNIT_RUN_TEST_RECORD> 
          <CUNIT_RUN_TEST_SUCCESS> 
            <TEST_NAME> test_is_even </TEST_NAME> 
          </CUNIT_RUN_TEST_SUCCESS> 
        </CUNIT_RUN_TEST_RECORD> 
      </CUNIT_RUN_SUITE_SUCCESS> 
    </CUNIT_RUN_SUITE> 
  </CUNIT_RESULT_LISTING>
  <CUNIT_RUN_SUMMARY> 
    <CUNIT_RUN_SUMMARY_RECORD> 
      <TYPE> Suites </TYPE> 
      <TOTAL> 1 </TOTAL> 
      <RUN> 1 </RUN> 
      <SUCCEEDED> - NA - </SUCCEEDED> 
      <FAILED> 0 </FAILED> 
      <INACTIVE> 0 </INACTIVE> 
    </CUNIT_RUN_SUMMARY_RECORD> 
    <CUNIT_RUN_SUMMARY_RECORD> 
      <TYPE> Test Cases </TYPE> 
      <TOTAL> 1 </TOTAL> 
      <RUN> 1 </RUN> 
      <SUCCEEDED> 1 </SUCCEEDED> 
      <FAILED> 0 </FAILED> 
      <INACTIVE> 0 </INACTIVE> 
    </CUNIT_RUN_SUMMARY_RECORD> 
    <CUNIT_RUN_SUMMARY_RECORD> 
      <TYPE> Assertions </TYPE> 
      <TOTAL> 3 </TOTAL> 
      <RUN> 3 </RUN> 
      <SUCCEEDED> 3 </SUCCEEDED> 
      <FAILED> 0 </FAILED> 
      <INACTIVE> n/a </INACTIVE> 
    </CUNIT_RUN_SUMMARY_RECORD> 
  </CUNIT_RUN_SUMMARY> 
  <CUNIT_FOOTER> File Generated By CUnit v2.1-2 - Tue Jun 25 16:01:49 2013
 </CUNIT_FOOTER> 
</CUNIT_TEST_RUN_REPORT>

If you wish to specify the output XML filename, it can be set using the following command:

   CU_set_output_filename("Even")
   CU_automated_run_tests();

The above XML output is dumped to a ‘Even-Results.xml’ file. The Basic and Automated interfaces are non-interactive modes to run the tests. The interactive Console mode of running tests can be initiated by using the following command:

   /* Run tests in interactive Console mode */
   CU_console_run_tests();

On compilation and execution, the following menu is shown in the terminal:

 $  ./console 


      CUnit - A Unit testing framework for C - Version 2.1-2
	      http://cunit.sourceforge.net/


 ***************** CUNIT CONSOLE - MAIN MENU ******************************
 (R)un  (S)elect  (L)ist  (A)ctivate  (F)ailures  (O)ptions  (H)elp  (Q)uit
 Enter command: 

This allows you to run all the test suites, or select a suite to be executed. You can list all the registered suites, and also select one to modify it. You can activate or deactivate a suite, and can view any failures from the previous test run. The other interactive ‘Curses’ mode can be invoked using:

    /* Run tests in interactive Curses mode */
    CU_curses_run_tests();

A screenshot of the Curses interface is shown below:

CUnit curses screenshot

Let’s suppose you have the following code snippet where the third assert fails:

void
test_is_even (void)
{
  CU_ASSERT(is_even(1)  == 0);
  CU_ASSERT(is_even(2)  == 1);
  CU_ASSERT(is_even(4)  == 0);
  CU_ASSERT(is_even(3)  == 0);
}

On executing the above, you will get:

$ ./error 


     CUnit - A unit testing framework for C - Version 2.1-2
     http://cunit.sourceforge.net/


Suite Basic_Test_Suite, Test test_is_even had failures:
    1. error.c:17  - is_even(4) == 0

Run Summary:    Type  Total    Ran Passed Failed Inactive
              suites      1      1    n/a      0        0
               tests      1      1      0      1        0
             asserts      4      4      3      1      n/a

Elapsed time =    0.000 seconds

If you wish to terminate the execution of the test when an error occurs, you can use the code shown below:

...
void
test_is_even (void)
{
  CU_ASSERT(is_even(1)  == 0);
  CU_ASSERT(is_even(2)  == 1);
  CU_ASSERT_TRUE_FATAL(is_even(4)  == 0);
  CU_ASSERT(is_even(3)  == 0);
}

int
main (void)
{
  ...
  CU_set_error_action(CUEA_FAIL);
  ...
}

The corresponding output is shown below:

 ./error-fail 


     CUnit - A unit testing framework for C - Version 2.1-2
     http://cunit.sourceforge.net/


Suite Basic_Test_Suite, Test test_is_even had failures:
    1. error-fail.c:17  - CU_ASSERT_TRUE_FATAL(is_even(4) == 0)

Run Summary:    Type  Total    Ran Passed Failed Inactive
              suites      1      1    n/a      0        0
               tests      1      1      0      1        0
             asserts      3      3      2      1      n/a

Elapsed time =    0.000 seconds

The test execution stopped after the third assert failed. The different options for error actions are:

Error value Meaning
CUEA_IGNORE Continue on error
CUEA_FAIL Stop on error
CUEA_ABORT Call exit() on error

You can refer the CUnit Programmers Guide and API documentation to know more about CUnit.

[Published in Open Source For You (OSFY) magazine, August 2013 edition.]

Emacs is a popular text editor that can be extended and customized. Haskell is a statically typed, functional programming language. Haskell-mode is a Emacs major mode that provides support to write and use Haskell programs. This article explains interesting features and tips on using Haskell-mode with GNU Emacs.

You can install Haskell-mode using your distribution package manager. For example, on Fedora you can use:

$ sudo yum install emacs-haskell-mode

Mode

You can enter Haskell-mode when opening a Haskell source file that has an extension .hs, or it can be started within Emacs using:

M-x haskell-mode

On the modeline, you will now see “(Haskell)”, indicating that the Haskell mode has been activated. You can enter the indent mode using:

M-x haskell-indent-mode

The modeline will now show “(Haskell Ind)”.

Interpreter

To load a Haskell source file into the interpreter, use C-c C-l. It will create a new buffer, load the module in the current buffer and give a prompt to work with. Consider the following Square.hs program:

square :: Int -> int
square x = x * x

Opening a Square.hs file in an Emacs buffer, and running C-c C-l will produce the following in a new buffer:

GHCi, version 7.0.4: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> :load "/home/guest/Square.hs"
[1 of 1] Compiling Main             ( /home/guest/Square.hs, interpreted )
Ok, modules loaded: Main.
*Main> 

If you have multiple buffers opened within Emacs, you can directly switch from the (Haskell) mode buffer to the Haskell interpreter using C-c C-z.

Insertions

The equal to (=) sign can be inserted, and the function type can be neatly aligned with the C-c C-= key stroke. If you type the following function:

volume :: Int -> Int -> Int
volume x

… and keep the cursor after ‘x’ and type C-c C-=, the equal to sign is inserted, and the code gets neatly aligned:

volume   :: Int -> Int -> Int
volume x = 

In the following code snippet, after ‘y’, if you hit Return followed by C-c C-|, a guard symbol is inserted:

max :: (Ord a) => a -> a -> a
max x y
 |

After inserting the second guard in the above example, the ‘otherwise’ keyword can be inserted and the code is aligned using C-c C-o:

max :: (Ord a) => a -> a -> a
max x y
 | x > y     = x
 | otherwise = 

The ‘where’ clause is produced using C-c C-w. In the following example, pressing return after ‘r’, and using C-c C-w inserts the ‘where’ clause:

circleArea :: Float -> Float
circleArea r = pi * r * r
    where 

You can insert the type annotation for a function using C-u C-c C-t. Consider the sphereVolume function:

sphereVolume r = 4 / 3 * pi * r * r * r
    where pi = 3.1412

Placing the cursor on ‘sphereVolume’ and typing C-u C-c C-t produces the following:

sphereVolume :: Fractional a => a -> a
sphereVolume r = 4 / 3 * pi * r * r * r
    where pi = 3.1412

Formatting

There are a number of shortcut commands that are useful for indentation. Let’s suppose you have the following function with the cursor position indicated by ‘_’:

greeting :: String -> String
greeting x = "Hello" ++ x ++
_

Hitting TAB will take you through the different possible positions for inserting code. When you press TAB for the first time, the cursor will move under ‘Hello’; if you wish to complete the string concatenation (++), issue the following code:

greeting :: String -> String
greeting x = "Hello" ++ x ++
       	     _

Hitting TAB again prepends ‘greeting’ and the cursor will be placed under ‘x’ for you to add another test condition, as follows:

greeting :: String -> String
greeting x = "Hello" ++ x ++
greeting _

Hitting TAB again will move the cursor to the first column if you want to add any text:

greeting :: String -> String
greeting x = "Hello" ++ x ++
_

As you keep hitting TAB again and again, the above sequence will repeat. Comments in Haskell begin with ’- -’.

one -- 1
two -- 2
three -- 3
four -- 4
five -- 5
six -- 6
seven -- 7

After marking the above region, use M-x align-regexp followed by ’–’ for the regexp, and the comments will be aligned:

one    -- 1
two    -- 2
three  -- 3
four   -- 4
five   -- 5
six    -- 6
seven  -- 7

C-c C-. helps align the code neatly. Consider the Area.hs program:

area :: Int -> Int -> Int
area breadth height = breadth * height

After marking the above program, and using C-c C-., the code becomes:

area                :: Int -> Int -> Int
area breadth height = breadth * height

Query

To know the Haskell-mode version, use M-x haskell-version. As an example:

  Using haskell-mode version v2.8.0

C-c C-i on a symbol will prompt for getting information about the symbol. For example, ‘Show info of (default Int):’ lists the following:

data Int = GHC.Types.I# GHC.Prim.Int# 	-- Defined in GHC.Types
instance Bounded Int -- Defined in GHC.Enum
instance Enum Int -- Defined in GHC.Enum
instance Eq Int -- Defined in GHC.Base
instance Integral Int -- Defined in GHC.Real
instance Num Int -- Defined in GHC.Num
instance Ord Int -- Defined in GHC.Base
instance Read Int -- Defined in GHC.Read
instance Real Int -- Defined in GHC.Real
instance Show Int -- Defined in GHC.Show

C-c C-t will obtain the type of the symbol with the prompt ‘Show type of (default pi):’. For example:

pi :: Floating a => a

C-c TAB on a symbol returns its definition at the interpreter prompt, as follows:

*Main> :info sphereVolume
sphereVolume :: Fractional a => a -> a
  	-- Defined at /home/guest/Sphere.hs:1:1-12

To find haddock information for a symbol, you can use C-c C-d. Searching for ‘Float’, for example, opens up file:///usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Types.html on Fedora.

To use the Hayoo search engine, you can use M-x haskell-hayoo. It will prompt with:

  Hayoo query:

The query responses are shown in a browser. Similarily, the Hoogle engine can be queried using M-x haskell-hoogle. If you searched for ‘show’, it will open the URL http://www.haskell.org/hoogle/?q=show with the search results.

Files ending with .lhs are literate Haskell programs. You can use Richard Bird style to separate text and code as follows:

Insert blank line before the code
 
> quicksort :: Ord a => [a] -> [a]
> quicksort []     = []
> quicksort (p:xs) = (quicksort lesser) ++ [p] ++ (quicksort greater)
>    where
>        lesser  = filter (< p) xs
>        greater = filter (>= p) xs

Insert blank line after the code

The modeline will indicate that you are in the ‘(LitHaskell/bird)’ minor mode.

The hasktag package needs to be installed to help generate TAGS file for source files. For example:

$ hasktags Test.hs

It will create both tags and TAGS files. You can use M-. in the Haskell buffer to search for a tag.

Checks

HLint is a tool that provides suggestions to improve Haskell programs. C-c C-v helps to run hlint on a buffer. Make sure you have the tool installed on your system before using it. For example, running C-c C-v on the above literate quicksort Haskell program suggests:

-*- mode: compilation; default-directory: "~/" -*-
Compilation started at Thu Jun  6 21:31:54

hlint QuickSort.lhs
QuickSort.lhs:6:22: Warning: Redundant bracket
Found:
  (quicksort lesser) ++ [p] ++ (quicksort greater)
Why not:
  quicksort lesser ++ [p] ++ (quicksort greater)

QuickSort.lhs:6:44: Warning: Redundant bracket
Found:
  [p] ++ (quicksort greater)
Why not:
  [p] ++ quicksort greater

2 suggestions

Compilation exited abnormally with code 1 at Thu Jun  6 21:31:54

[Published in Electronics For You (EFY) magazine, March 2013 edition.]

This tutorial demonstrates the use of eqntott software with some code examples.

eqntott (short for ‘equation to truth table’) is a software tool that can generate truth tables from Boolean equations, which can be used for programmable logic array (PLA) programming. It was initially written at Berkeley, and ported to work on GNU/Linux. It is released under the new BSD license.

Consider a simple AND example:

NAME = and;
INORDER = a b;
OUTORDER = c;

c = a & b;

Here NAME refers to the name of the PLA, and is called ‘and’. INORDER lists the input order of elements, while OUTORDER has the list of outputs in the truth table. Copy this example in a text editor and save it as ‘and.eqn.’

To run the above example, use ‘cd’ command in order to go to the directory where the example is saved. Now run the following command:

$ eqntott and.eqn

You will get the output as:

.i 2
.o 1
.p 1
11  1 
.e

’.i’ in the output refers to the number of inputs defined, which refers to ‘a’ and ‘b’ in the above example. ’.o’ corresponds to the number of output variables, which is ‘c’. ’.p’ is the number of product terms. The truth table generated shows that the output is ‘1’ when bothe inputs are ‘1’.

You can use ’-l’ option with eqntott to output the PLA name, input, and output elements.

$ eqntott -l and.eqn

The output will be:

.i 2
.o 1
.na and
.ilb  a b
.ob  c
.p 1
11  1 
.e

The name of the PLA is mentioned next to ’.na’ in the output. The order of inputs and outputs in the truth table is also listed.

The following expressions are allowed in the equations for eqntott:

Expression Meaning
& Logical AND operation
| Logical OR operation
! Logical NOT operation
ZERO or 0 False or the value zero
ONE or 1 True or the value one
() To enclose any expression
? Don’t care condition
name Any input/output in the expression

The half adder circuit adds two binary digits, and produces a sum and a carry. It can be implemented as follows:

NAME = half_adder;
INORDER = a b;
OUTORDER = s c;
c = a & b;
s = (!a & b) | (a & !b);

When the above equation is run with eqntott:

$ eqntott -l half_adder.eqn

The output will be:

.i 2
.o 2
.na half_adder
.ilb  a b
.ob  s c
.p 3
01  1 0 
10  1 0 
11  0 1 
.e

The sum is represented by ’s’ and carry with ‘c.’ When either the sum or carry is ‘1’, the sum is ‘1’ and carry is ‘0’. When both the sum and carry are ‘1’, then the sum is ‘0’ and carry is ‘1’.

The output of eqntott can be customized using the ’-.key’ argument. The default option is the string ‘iopte’. A few key code options with their output meaning are given below:

Character Output
e .e
f .f output-number input-number
h Human readable format
i .i number of inputs
l Truth table with PLA name, inputs and outputs
o .o number of outputs
p .p number-of-product-terms
v eqntott version number
S PLA connectivity summary

If the half adder example is run with the following key options:

$ eqntott -.lhptv half_adder.eqn

The output will be:

.na half_adder
.ilb  a b
.ob  s c
2 inputs, 2 outputs, 3 product terms.
s	!a	b
s	a	!b
c	a	b
.p 3
01  1 0 
10  1 0 
11  0 1 
eqntott 9.0

The PLA connectivity summary can be displayed using the ’-.S’ key code option. When used with ‘and.eqn’ example as:

$ eqntott -.S and.eqn

The output will be:

PLA Connectivity Summary
#pterms	input
1	b
1	a
#pterms	output
1	c
#out	#in	product term expression
1	2	a & b

’-s’ option allows you to use an output variable in another expression. Consider, for example:

NAME = s;
INORDER = a b;
OUTORDER = d;

c = a | b;
d = !c;

When you run the above example with ’-s’ option as:

$ eqntott -l -s s.eqn

The output will be:

.i 3
.o 2
.na s
.ilb  a b c
.ob  d c
.p 3
00-  1 0 
-1-  0 1 
1--  0 1 
.e

When both the inputs ‘a’ and ‘b’ are zero, then the output ‘c’ is zero and ‘d’ is ‘1’. If either ‘a’ and ‘b’ is ‘1’, ‘c’ is ‘1’ and ‘d’ is ‘0’.

’-f’ option allows an input to also be present in the output, and used as though the value was observed at different times. Consider, for example:

NAME = f;
INORDER = a;
OUTORDER = a;

a = !a;

When you execute the above example as:

$ eqntott -l -f f.eqn

The output will be:

.i 1
.o 1
.na f
.ilb  a
.ob  a
.p 1
.f 1 1
0  1 
.e

The truth table output is ‘1’ only when the input is ‘0’. The ’-s’ and ’-f’ options are mutually exclusive.

eqntott can attempt to minimize the logic terms in the equations. ’-r’ option will try to reduce the minterms in the output. Consider the example:

NAME = reduce;
INORDER = x y;
OUTORDER = z;

z = x & y | x;

When you use the above example with ’-l’ option as:

$ eqntott -l reduce.eqn

The output will be:

.i 2
.o 1
.na reduce
.ilb  x y
.ob  z
.p 2
1-  1 
11  1 
.e

Using ’-r’ option, eqntott will try to minimize the truth table output:

$ eqntott -l -r reduce.eqn

The output will be:

.i 2
.o 1
.na reduce
.ilb  x y
.ob  z
.p 1
1-  1 
.e

The output ‘z’ is ‘1’ whenever ‘x’ is ‘1’.

You can define expressions using ‘define’ keyword. The XOR logic takes two binary inputs, and returns ‘1’ only when either input is ‘1’ but not both. It can be expressed as:

#define xor(a,b) (a&!b | !a&b)

NAME = xor;
INORDER = a b;
OUTORDER = c;

c = xor (a,b);

On running the example as:

$ eqntott -l xor.eqn

The output will be:

.i 2
.o 1
.na xor
.ilb  a b
.ob  c
.p 2
01  1 
10  1 
.e

As a final example, consider generating an odd parity bit for three inputs. The parity bit is set to ‘1’ when the number of ‘1’s’ in the input is even, so as to make the total number of ‘1’s’ odd. We can define the logic using:

#define xor(a,b) (a&!b | !a&b)

NAME = parity;
INORDER = x y z;
OUTORDER = p;

p = !( xor (xor(x,y), z) );

When you run the above example with ’-l’ and ’-s’ option as:

$ eqntott -l -s parity.eqn

The output will be:

.i 3
.o 1
.na parity
.ilb  x y z
.ob  p
.p 4
000  1 
011  1 
101  1 
110  1 
.e

You can refer the manual page of eqntott for more documentation. Sources are available from the eqntott webpage.

I am happy to announce my first self-published book on working with free and open source software projects, titled, “i want 2 do project. tell me wat 2 do.”

Shaks with book

Topics covered in the book:

  1. Mailing List Guidelines
  2. Attention to Detail
  3. Project Communication
  4. Project Guidelines
  5. Development Guidelines
  6. Methodology of Work
  7. Tools
  8. Reading and Writing
  9. Art of Making Presentations
  10. Sustenance

The product details are as follows:

  • Price: ₹ 399
  • Pages: 135 pages
  • Publisher: Self-published (June 2014)
  • Language: English
  • ISBN-13: 978-93-5174-187-9
  • Size: 6 x 9 inches
  • Binding: Paperback (Perfect Binding)
  • Availability: In Stock (Indian edition)

You can order the book at pothi.com:

http://pothi.com/pothi/book/shakthi-kannan-i-want-2-do-project-tell-me-wat-2-do

The home page for the book is at:

http://shakthimaan.com/what-to-do.html

If you have any comments or queries, please feel free to write to me at author@shakthimaan.com.

Steps to install VirtualBox 4.3.10 on Fedora 20. You need to first open a terminal and become root user:

$ su -
Password:
#

Install dkms package:

# yum install dkms

If Virtual Machine Manager is running, stop the same, and uninstall it.

# yum remove virt-manager

Remove the KVM modules if already loaded:

# rmmod kvm_intel

Download and install rpmfusion-free repo from rpmfusion.org:

# yum install rpmfusion-free-release-20.noarch.rpm

Install VirtualBox:

# yum install VirtualBox

Install the required VirtualBox kernel module for your running kernel. For example, on Fedora 20 with kernel 3.11.10-301, you can run:

# yum install kmod-VirtualBox-3.11.10-301.fc20.x86_64

Load the vboxdrv driver:

# modprobe vboxdrv

You can now start VirtualBox and use it. To convert Virt-manager images to VirtualBox, you can use:

$ VBoxManage convertdd ubuntu1204-lts.img ubuntu1204-lts.vdi
Red Hat, Westford
Residence Inn
Boeing Lufthansa

More photos available in my /gallery.

A Fedora workshop was organised at St. Joseph’s College of Engineering, Chennai, Tamil Nadu, India on Friday, June 14, 2013. The participants were students from the Master of Computer Applications (MCA) department.

The forenoon session began with an introduction to Free/Open Source Software (F/OSS) and Fedora. I explained the various project and communication guidelines that students need to follow, and mentioned the various Fedora sub-projects that they can contribute to. System architecture, and compilation concepts were also discussed. The need to use free and open standards was emphasized. Copyright, and licensing were briefly addressed.

MCA lab

After lunch, a programming lab session was held to see how students solve problems. Their code was reviewed, and suggestions for improvement were given. Klavaro was shown to students to learn touch typing. I also gave an overview of GCC using the “Introduction to GCC” presentation. The concept of using revision control systems was illustrated. A demo of Fedora 18 (x86_64) was shown, and the same was installed on the lab desktops.

Thanks to Prof. Parvathavarthini Mam for working with me in organizing this workshop. Thanks also to Prof. Shirley for managing the logistics.

Few photos taken during the trip are available in my /gallery.

A Fedora Activity Day was held at Sri Jayachamarajendra College Of Engineering, Mysore, Karnataka, India on Saturday, April 20, 2013.

SJCE

The agenda included talks in the morning, and practical sessions in the afternoon. I started the day’s proceedings on best practices to be followed when working with free/open source software projects, giving examples on effective project, and communication guidelines. The various Fedora sub-projects that students can contribute to were mentioned. This was followed by an introductory session on Python by Aravinda V K. The “Python: Introduction for Programmers” presentation was given to the students. Vijaykumar Koppad then gave an overview, and a demo of the Gluster file system.

After lunch, we had a Q&A session with the participants. Questions on working with free/open source software projects, differences between file systems, GNU/Linux distributions, and programming languages were answered. Basic installation and troubleshooting techniques were discussed. I addressed system architecture design concepts, compilation, cross-compilation, and revision control systems, and briefed them on copyright, and licensing. Students had brought their laptops to work on Python scripting, and GlusterFS. I also worked on few bug fixes, package builds for ARM, and package updates:

  • Bug 928059 - perl-Sys-CPU 0.54 tests fail on ARM
  • Bug 926079 - linsmith: Does not support aarch64 in f19 and rawhide
  • Bug 925483 - gputils: Does not support aarch64 in f19 and rawhide
  • Bug 922397 - flterm-debuginfo-1.2-1 is empty
  • Bug 925202 - csmith: Does not support aarch64 in f19 and rawhide
  • Bug 925247 - dgc: Does not support aarch64 in f19 and rawhide
  • Bug 925208 - CUnit: Does not support aarch64 in f19 and rawhide
  • Bug 901632 - ghc-smallcheck-1.0.2 is available
  • Bug 926213 - nesc: Does not support aarch64 in f19 and rawhide
  • Bug 953775 - ghc-data-inttrie-0.1.0 is available

Thanks to Vijay Bellur and Vijaykumar Koppad for working with me in organizing this workshop. Thanks also to the Fedora project for sponsoring my travel and accommodation.

Few photos taken during the trip are available in my /gallery.

Ajanta caves
Daulatabad fort
Ellora caves

More photos available in the respective albums - Ajanta caves, Daulatabad fort, and Ellora caves.

I had organized a Fedora and OpenStack workshop at P.E.S. College of Engineering, Nagsen Vana, Aurangabad, Maharashtra on Saturday, March 2, 2013.

P.E.S. College of Engineering

After a formal inauguration at 1000 IST, I introduced the students to communication guidelines, mailing list etiquette, and project guidelines using the “i-want-2-do-project. tell-me-wat-2-do” presentation. The different Fedora sub-projects to which they can contribute to were mentioned. I showed the various free/open source software tools available for them to learn and use. The career options with free/open source software were also discussed. I had asked them to write down any questions they had on the forenoon session, so I could answer them in the afternoon session. Few of their questions:

  • If I do a project in Java, what are my career options?
  • What is the difference between open source and Microsoft?
  • Is Linux popular only because of security, or are there other reasons too?
  • I am interested in mainframes. How should I learn?
  • I am interested in a career in animation. What free/open source software can I use?
  • What are the steps to become a good software engineer?
  • Can I patent a software product?

Post-lunch, I answered their queries in the Q&A session, to the best of my knowledge. I also gave them an introduction on copyright, trademark and patents, and mentioned that IANAL. I then introduced them to the architecture of OpenStack, explaining the individual components, and their functionality. The OpenStack Lab Guide was provided to them to setup their own OpenStack cloud. Some of them had brought their laptops to try it hands-on. I demonstrated the Horizon web interface after starting the required services.

Fedora Labs

All their computer labs have been migrated to Fedora 17. Thanks to Prof. Nitin Ujgare for working with me in organizing this workshop, and for maintaining the Fedora labs at the Institute. Aurangabad is around 230 km from Pune, and takes around 4 1/2 hours by road. There are frequent bus services between Pune and Aurangabad. You can book bus tickets at Maharashtra State Road Transport Corporation (MSRTC) web site. There are a number of historic places to visit in and around Aurangabad. Few photos taken during the trip are available in my /gallery.

« OLDER POSTS