Engineers for Social Impact: A unique fellowship program

Program: Engineers For Social Impact (Website)
E4SI
Engineers for Social Impact is a unique fellowship program to connect the best engineering talent to the most credible social enterprises that drive market-based solutions to development in India.

In 2008, an eminent panel of judges will select 5 E4SI Fellows to gain from challenging immersion experiences in partner social enterprises. In addition, they will join a select cohort of outstanding young leaders committed to social impact and build valuable relationships with leaders in the development sector.E4SI partner social enterprises (founded by alumni from schools such as Harvard, Wharton, INSEAD and IIT) are leaders in the sectors of Education, Energy, Health, Micro-finance and Multiple Bottom-line Investment Advisory.

The application is open to current undergraduate students at select Indian engineering schools.

Application Deadline: March 2, 2008

Website: E4SI

Java Technology: Part-1

Java Technology:

Java technology is both a high-level, object-oriented programming language and a platform. Java technology is based on the concept of a single Java Virtual Machine (JVM) — a translator between the language and the underlying software and hardware. All implementations of the programming language must emulate the JVM, enabling Java programs to run on any system that has a version of the JVM.

The Java programming language is unusual because Java programs are both compiled (translated into an intermediate language called Java bytecode) and interpreted (bytecode parsed and run by the JVM). Compilation occurs once, and interpretation happens each time the program runs. Compiled bytecode is a form of optimized machine code for the JVM; the interpreter is an implementation of the JVM.

The Java platform is a software-only platform that runs on top of various hardware-based platforms. It comes in three versions (see Multiple editions of the Java platform, below). It consists of the JVM and the Java Application Programming Interface (API), a large collection of ready-made software components (classes) that ease the development and deployment of applets and applications, including robust, secure, and interoperable enterprise applications. It spans everything from basic objects to networking and security and XML generation and Web services. The Java API is grouped into libraries of related classes and interfaces; the libraries are known as packages.

Along with the Java API, every full implementation of the Java platform includes:

  • Development tools for compiling, running, monitoring, debugging, and documenting applications.
  • Standard mechanisms for deploying applications to users.
  • User interface toolkits that make it possible to create sophisticated graphical user interfaces
  • Integration libraries that enable database access and manipulation of remote objects.

Java technology was developed by Sun Microsystems. The Java Community Process (JCP), an open organization of international Java developers and licensees, develops and revises Java technology specifications, reference implementations, and technology compatibility kits. In 2007, Sun made the bulk of its core Java technology available as open-source software under the GNU general public license version 2 (GPLv2).

Source : IBM DeveloperWorks

Tomboy-Panel for quick access of notes

TomboyTomboy

The Ubuntu desktop comes preloaded with a fantastic note-taking application called Tomboy.

While the application can be easily accessed from the desktop Applications menu (under the Accessories sub-menu), it can me cumbersome to have to remember to launch this application each time a desktop session is started.

Fortunately, the tomboy application can be added to the desktop panel in a convenient form. Just right click on an empty area of the panel, and choose Add To Panel. In the resulting window, under the Accessories section, find and double click the Tomboy Notes. Now you should have a little notepad icon in your desktop panel. Click on this icon to access all your notes instantly, or to create new notes.

Using this method will also ensure that the Tomboy application gets added to your panel on every startup, ensuring that you’ll always have quick access to your notes.

addrepo – Easiest way to add APT repositories

addrepo is a simple command line interface for easily adding APT repositories to your sources.list

Install addrepo in Ubuntu

This is very simple process just use the following two commands

sudo wget http://mac4deb.googlepages.com/addrepo -O /usr/bin/addrepo

sudo chmod +x /usr/bin/addrepo

Using addrepo

addrepo [repository]

Now you just replace ‘[repository]’ with a repository name

addrepo example

addrepo deb http://dl.google.com/linux/deb/ stable non-free

It already includes ’sudo,’ so adding sudo before you enter the command is not necessary.

Commands Recap

sudo wget http://mac4deb.googlepages.com/addrepo -O /usr/bin/addrepo

sudo chmod +x /usr/bin/addrepo

Lanmap – Network discovery tool

Lanmap Listens to all available traffic on the interface of your choice, figures out who’s talking to who, how much, using which protocols.This information is then put into a nice human-readable 2d image (various formats are available) which can be used to understand a network’s topology.

Install lanmap in Ubuntu

sudo aptitude install lanmap

This will complete the installation

Using lanmap

lanmap syntax

lanmap [-o directory] [-e program] [-T {png,gif,svg}] [-f filtetr] [-D {#,all,raw}] [-r seconds]

[-i {?,*wildcard*,iface}] [-h] [-v] [-V]

lanmap example

lanmap -i eth0 -r 30 -T png -o /tmp/

This will create a lanmap.png file under tmp folder

lanmap available options

-o directory – The directory in which to save the generated images. Default is the current directory.

-e program – The program to use to generate images. Default is twopi.

-T {png,gif,svg} – Output image format. Default is png.

-f filter – Traffic filter, in libpcap syntax.

-D {#,all,raw} – Debug mode; lots of output, use with caution. #: payload bytes to dump (default: 0)

-r seconds – Set the time interval between 2 consecutive graph generations. Default is 60 seconds.

-i {?,*wildcard*,iface} – Interface to use: ?: list all devices and exit *3Com*: use the first NIC with

“3Com” in it

-V – Version info.

-vv – Verbose mode, up to 3 levels (-vv, -vv09:21 29/11/2007v).

-h – Help message.

Java Programming Style Guide

Introduction

The Java language gives you all the room you need to write code that would be very difficult for others to understand. Java also permits you to write code that is very easy to understand. Most development teams would prefer the latter.

A style guide provides provides a map so that the code generated by a group of programmers will be consistent and, therefore, easier to read and maintain. Many people do not care for the style guide offered by Sun. This document is one alternative.

This document covers most areas where there could be confusion or difference of opinion. Areas that have never been a problem in our experience are undocumented.

1 – Formatting

1.1 – Indentation

  • All indents are four spaces. All indenting is done with spaces, not tabs.
  • Matching braces always line up vertically in the same column as their construct.
  • All if, while and for statements must use braces even if they control just one statement.

1.2 – Spacing

  • All method names should be immediately followed by a left parenthesis.
  • All array dereferences should be immediately followed by a left square bracket.
  • Binary operators should have a space on either side.
  • Unary operators should be immediately preceded or followed by their operand.
  • Commas and semicolons are always followed by whitespace.
  • All casts should be written with no spaces.
  • The keywords if, while, for, switch, and catch must be followed by a space.

1.3 – Class Member Ordering

class Order
{
// fields

// constructors

// methods
}

1.4 – Maximum Line Length

Avoid making lines longer than 120 characters.

1.5 – Parentheses

Parentheses should be used in expressions not only to specify order of precedence, but also to help simplify the expression. When in doubt, parenthesize.

2 – Identifiers

All identifiers use letters (‘A’ through ‘Z’ and ‘a’ through ‘z’) and numbers (‘0’ through ‘9’) only. No underscores, dollar signs or non-ascii characters.

2.1 – Classes and Interfaces

All class and interface identifiers will use mixed case. The first letter of each word in the name will be uppercase, including the first letter of the name. All other letters will be in lowercase, except in the case of an acronym, which will be all upper case.

2.2 – Packages

Package names will use lower case characters only. Try to keep the length under eight (8) characters. Multi-word package names should be avoided.

2.3 – All Other Identifiers

  • All other identifiers, including (but not limited to) fields, local variables, methods and parameters, will use the following naming convention. This includes identifiers for constants.
  • The first letter of each word in the name will be uppercase, except for the first letter of the name. All other letters will be in lowercase, except in the case of an embedded acronym, which will be all uppercase. Leading acronyms are all lower case.
  • Hungarian notation and scope identification are not allowed.
  • Test code is permitted to use underscores in identifiers for methods and fields.

3 – Coding

3.1 – Constructs to Avoid

  • Never use do..while.
  • Never use return in the middle of a method.
  • Never use continue.
  • Never use break other than in a switch statement.

3.2 – Do Not Compound Increment Or Decrement Operators

  • Use a separate line for an increment or decrement.
  • Never use pre-increment or pre-decrement

3.3 – Initialization

Declare variables as close as possible to where they are used.

3.4 – Access

All fields must be private, except for some constants.

4 – Self-Documenting Code

“Any fool can write code that a computer can understand. Good programmers write code that humans can understand.”

— Martin Fowler, Refactoring: Improving the Design of Existing Code

Rather than trying to document how you perform a complex algorithm, try to make the algorithm easier to read by introducing more identifiers. This helps in the future in case the algorithm changes but someone forgets to change the documentation.

Source: JavaRanch