Sunday, April 22, 2012

The Smell of an Old Book



Thinking about it, I really don't know
how to describe the aroma of old pages,
that unique smell when paper ages.

Perhaps as a coalescing of leather and ink.
Maybe as a blessing for those who read?

Whatever words are chosen,
an old book smells best when it's open!



D. Bagrecha
http://dkbakrecha.webs.com

Monday, March 26, 2012

Hum Bewafa Na The ..... D.Bagrecha


"Kuch Zindagi Bewafa thi,
kuch Teri DUA Main Farq tha"
"Kuch huM sy khata hoi,
kuch Teri Wafa Main Farq tha"

"Shayed kabhi huM dono aik ho he jatay,
Kuch Main bhi tha "ANAA" Main,
kuch teri "SADAA" Main Farq tha"

"To ny bhi dekha Shayed Mujhay zaMany ki taraha,
Kuch BHOOL gaye thay huM bhi,
kuch teri "NIGAAH" Main Farq tha"

"Bara Naaz kiya kartay thay taray piyar pay,
Kuch DIL k Haathon Majboor thy,
kuch Teri Chah Main Faraq tha..!
— ... DK ...

Sunday, March 4, 2012

Hacker and the Open Source Revolution


Hacker and the Open Source Revolution

This is corrects the confusion created by mainstream media between ‘hacker’ and ‘cracker’. It also considers the history, nature, attributes ethics and attire of hacker, plus more. Interested in being one yourself, or checking why other people treat you as if you don’t fit into ‘normal’ society?

The new generation of hackers are turning open source into powerful force in today’s computing world. They are the heirs to an earlier hacking culture that thrived in the 1960s and 1970s when computer were still new – part of a community that believed software should be shared and that all would benefit as a result. These expert programmers and networking wizards trace their lineage back to the first time sharing minicomputers and the earliest ARPAnet experiments. The members of this community coined the term ‘hacker’. Hackers build the internet and made the UNIX operating system what it is today. Hackers run Usenet and make the World Wide Web work.

Hackers sparked the open source revaluation
In 1991, Linus Torvalds sent a posting to an Internet news group, asking for advice on how to make a better operating system. His project was a hobby, he said, and world never be ‘big and professional’. In 1994, the first version of Linux was distributed.
In the spring of 1997, a group of leaders in the free software community assembled in California. The group included Eric Raymond, Tim O’Reilly, and VA Research president Larry Augustin, among others. At Eric Raymond’s insistence, the group agreed that what they lacked to a great extent was a marketing campaign devised to win mindshare, and not just market share. Out of this discussion came a new term to describe the software they were promoting: OPEN SOURCE.
In 1998, Microsoft’s anxiety lacked out through what is now known as the Halloween Documents. These documents comprised a series of confidential Microsoft memos on potential strategies relating to free software, open source software, and to Linux in particular. Among the leaked documents ware a series of response to the original memos. The leaked documents and responses were published by Eric Raymond during Halloween 1998.

So, who are these hackers?
A hacker is someone who enjoys exploring the details of computers and how to stretch their capabilities, as opposed to most users, who prefer to learn the minimum necessary. Originally, ‘hacker’ was a term of respect, used among computer programmers, designers, and engineers. The hacker was one who creates the original and ingenious programs. To programmers, ‘hackers’ connote mastery in the most literal sense: those who can make the computer do what they want it to – whether the computer wants to or not. Unfortunately, this term has been abused by the media to give it a negative connotation – of someone who break into systems, destroys data, steals copyrighted software and performs other destructive or illegal acts with computer and network. The term that accurately defines that’s kind of person is ‘cracker’.
Hackers carry stacks of ideas teetering in their heads at any given time. Their brains cannot stop collecting, consuming, or taking things apart, only to reassemble them again. But what seems to drive them is an intense ability, even a need, for analysis and organization. When hackers encounter a technology for the first time, they do not just absorb the general shape, but go straight for the details. They feed on the logic of technology. When they do communicate, they can speak and write with great precision about what they’ve learned.

The hacker attitude
Hackers solve problems and build things, and they believe in freedom and voluntary mutual help. The hacker mindset is not confined to the realm of software (or hardware). The hacker nature is independent of the particular medium the hacker works in. hackerism ideas have traveled beyond the computer industry. The ideals of the hacker culture could apply to almost any activity one pursues with passion. Burrell Smith, a key member of the team that created the Apple Macintosh computer, says, “Hacker can do almost anything and be a hacker. You can be hacker carpenter. It’s not necessarily high-tech. I think it has to do with craftsmanship and caring about what you’re doing”

Hacker Ethic
Wikipedia accurately explains the ‘Hacker ethic’ as a generic phrase that describes the moral values and philosophy that are standard in the hacker community. The early hacker culture and resulting philosophy originated at the Massachusetts Institute of Technology (MIT) in 1950s and 1960s. The term ‘Hacker ethic’ is attributed to journalist Steven Levy, as describe in his book titled ‘Hackers: Heroes of the computer Revolution’, written in 1984. The guideline of the hacker ethic make it easy to see how computer have evolved into the personal devices we know and rely upon today.
The hacker ethic was a “… new way of life, with a philosophy, an ethic and a dream.” However, the elements of the hacker ethic ware not openly debated and discussed; rather they were accepted and silently agreed upon.
Free and Open Source Software (FOSS) has evolved from the hacker ethics that described. The hackers who stay true to hacker ethics – especially the Hands-On Imperative – are usually support the free and open source software movement.
The general tenets of the hacker ethic are:
·         Access to computers – and anything that might teach you something about the way the world work – should be unlimited and total. Always yield to the Hands-On Imperative!
·         All information should be free.
·         Mistrust authority – promote decentralization.
·         Hackers wish to be judged by their hacking, not bogus criteria such as degrees, age, race, or position.
·         You can create art and beauty o computer
·         Computers can change your life for better,

The Hacker attire
Hacker dress for comfort, function, and minimal maintenance rather than for appearances (some, perhaps unfortunately, takes this to extremes and neglect personal hygiene). They have a very low tolerance for suits and other ‘business’ attire; in fact, it is not uncommon for hackers to quit a job rather than conform to dress code. When they are somehow pushed into conforming to dress code, they will find ways to subvert it, for example, by wearing absurd novelty ties. Most hackers I know consider a tie as a strangulation device that partially cuts off the blood supply to the brain… which explains the behavior of tie-wearers. A tic could not bestow upon you the reputation of a super-loser, a suit-wearing super-user with no clue – someone with root privileges on a UNIX system but no idea what is doing; the equivalent of three-year-old with an AK-47 for a toy. In times of dire stress, he may roll up his sleeves and loosen the tic about half an inch. It seldom helps.
Female hackers almost never ware visible makeup and many use none at all.

How to become a hacker
In his essay by the same name, Eric Steven Raymond lists out, among other things, the basic hacking for wannabe hackers. He recommends the following five languages – Python, Java, C/C++, Perl and Lisp.

Get Linux
The single most important step any newbie can take toward acquiring hacker skills is to get a copy of Linux on one of the BSD-Unixes, install it on a personal machine, and run it. Yes, there are other operating systems in the world besides UNIX/Linux. But they are distributed in binary – you can’t modify it. Trying to learn to hack on a windows machine is like trying to learn to dance while wearing a body cast. Besides, UNIX is the operating system of the Internet. While you can learn to use the Internet without knowing UNIX, you can’t be an internet hacker without understanding UNIX. For this reason, the hacker culture today is pretty strongly UNIX-centered.
So, bring up a Linux. Learn it. Run it. Tinker with it. Talk to internet with it. Read the code and modify it. You will get better programming tools (including C, LISP, Python and Perl) than any Microsoft operating system can dream of. You’ll have fun and you’ll soak up more knowledge than you realize, until you look back on it as an ace hacker.

So are you a Hacker?
You must earn the title of ‘Hacker’, rather than just claim it.

References
How to Become a Hacker, an essay by Eric Steven Raymond
Hackers: Heroes of computer Revolution, by Steven Levy
The Daemon, the GNU, and the Penguin, by Peter H.Salus
OpenSources, by Chris DiBona, Sam Ockman and Mark Stone
The New Hacker’s Dictionary, by Eric S Raymond, MIT Press
Biopunk: DIY Scientists Hack the Software Life, by Marcus Wohlsen
LINUX The complete magazine on Open Source FEBRUARY 2012

Dharmendra Bakrecha
http://dkbakrecha.webs.com/
 [Here you find PDF version]

Sunday, January 1, 2012

Why do I still serve you?


दो बातें एक सिपाही की
देश की सीमा पर लड़ते एक सेनानी की व्यथा का मार्मिक चित्रण.

Why do I still serve you?

How you play with us, did you ever see?
At Seven, I had decided what I wanted to be;
I would serve you to the end,
All these boundaries I would defend.

Now you make me look like a fool,
When at seventeen and just out of school;
Went to the place where they made "men out of boys"
Lived a tough life …sacrificed a few joys…

In those days, I would see my "civilian" friends,
Living a life with the fashion trends;
Enjoying their so called "college days"
While I sweated and bled in the sun and haze…
But I never thought twice about what where or why
All I knew was when the time came, I'd be ready to do or die.

At 21 and with my commission in hand,
Under the glory of the parade and the band,
I took the oath to protect you over land, air or sea,
And make the supreme sacrifice when the need came to be.

I stood there with a sense of recognition,
But on that day I never had the premonition,
that when the time came to give me my due,
You'd just say, "What is so great that you do?"

Long back you promised a well-to-do life;
And when I'm away, take care of my wife.
You came and saw the hardships I live through,
And I saw you make a note or two,
And I hoped you would realise the worth of me;
but now I know you'll never be able to see,
Because you only see the glorified life of mine,
Did you see the place where death looms all the time?
Did you meet the man standing guard in the snow?
The name of his newborn he does not know...
Did you meet the man whose father breathed his last?
While the sailor patrolled our seas so vast?

You still know I'll not be the one to raise my voice
I will stand tall and protect you in Punjab Himachal and Thois.

But that's just me you have in the sun and rain,
For now at twenty-four, you make me think again;
About the decision I made, seven years back;
Should I have chosen another life, some other track?

Will I tell my son to follow my lead?
Will I tell my son, you'll get all that you need?
This is the country you will serve
This country will give you all that you deserve?

I heard you tell the world "India is shining"
I told my men, that's a reason for us to be smiling
This is the India you and I will defend!
But tell me how long will you be able to pretend?
You go on promise all that you may,
But it's the souls of your own men you betray.

Did you read how some of our eminent citizens
Write about me and ridicule my very existence?
I ask you to please come and see what I do,
Come and have a look at what I go through
Live my life just for a day
Maybe you'll have something else to say?

I will still risk my life without a sigh
To keep your flag flying high
but today I ask myself a question or two…
Oh India…. Why do I still serve you?

कोई भी मूल्य एवं संस्कृति तब तक जीवित नहीं रह सकती जब तक वह आचरण में नहीं है.

( Source )

 http://dkbakrecha.webs.com
dkbakrecha@gmail.com


Wednesday, December 21, 2011

VB.NET: - Subroutines and functions


Subroutines and functions
Subroutines
     A subroutine is a block of statements that carries out a well-defined task. The block of statements is placed within a set of “Sub..........End Sub” statements and can be invoked by name.
Example
            Sub ShowDate()
                  MsgBox(now())
            End Sub

The above subroutine displays the current date in the massage box and can be called by its name ShowDate().
The statements in a subroutine are executed, and when the End Sub statement is reached, control return to the calling program. It’s possible to exit a subroutine prematurely with the exit sub statement.
All variables declared with in a subroutine are local to those subroutines. When the subroutine exits, all the variables declared in it cease to exit.

Functions
     A function is similar to subroutine, but a function return a result. Subroutines perform a task and don’t report anything to the calling program; functions commonly carry out calculation and report the result.
Because they return values, functions, like variable, have type (return data type). The value we pass back to calling program from a function is called return value, and its type must match the type of the function.
Function, accept arguments, just like subroutine. The statements that make up a function are placed in a set of “Function..........End Function” statement.
The result of a function is returned to the calling program with the return statement. The first time a return statement is executed. The function terminated and control is return to the calling program.
Example
      Function NextDay() as Date
            Nextday = date ADD(DateInterval.Day,1,Now())
      End Function

     Similar to variable, a custom function has a name, which must be unique in its scope. If we declare a function in a form, the function name must be unique in the form. If we declare a function as public or friend, its name must be unique in the project. Functions have the same scope rules as variables and can be prefixed by many of some keyboards. In effect, we can modify the default scope of a function with the keywords Public, Private, Protected, Friend and ProtectedFriend.

Arguments
     Subroutines and Functions aren’t entirely isolated from the rest of the application. Must procedure accept arguments from the calling program. Recall that an argument is a value we pass to procedure and on which the procedure usually act. This is how subroutines and functions communicate with the rest of an application.
     Functions also accept arguments, in many cases more than one.
Example
     The function Min(), for instance, accepts two numbers and return the smaller are :-
      Function Min(ByVal a As Integer, ByVal b As Integer) As Single
            Min=IIF(a<b;a,b)
      End Function
IFF() function is a built in function that evaluates the first argument, which is logically expression. If the expression is true, IFF() function return second argument; if the expression is False, IFF() return the third argument.

Argument passing Mechanisms
     One of the most important issues is writing procedure is the mechanism use to pass arguments. The examples so far have used the default mechanism, passing arguments by value. The other mechanism is passing them by reference.
       1. Passing argument by value:
When we pass an argument by value, the procedure sees only a copy of argument. The benefits of passing argument by value are isolated from the procedure, and only the code segment in which they are declared can change the values. This is the default argument passing mechanism in vb.net.
     To specify the argument that will by pass by value, use the ByVal keyword in front of the argument name. If we omit the ByVal keyword, the editor will insert it automatically, since it is the default option.
Example
     Function Degree(ByVal celcius As Single) As Single
            Degree= (9/5)*celcius + 32
      End Function
Note1: When we pass arguments to a procedure by reference, we’re actually passing the variable itself. Any changes made to the argument by the procedure we be permanent. When we pass arguments by value, the procedure gets a copy if the variable, which is discarded when the procedure ends. Any changes made to the argument by the procedure won’t affect the variable of the calling program.
Note2: When we pass an array as argument to a procedure, the array is always passed by reference even if we specify the ByVal keyword. The reason for this is that it would take a machine sometime to create a copy of array. Since a copy of array must also live in memory, passing too many arrays back and forth by value would depend our system’s memory.

       2. Passing Argument by Reference
Passing argument by reference gives the procedure access to actual variable. The calling procedure passes the address of the variables in memory to that the procedure can change its value permanently. With VB6.0 is the Default argument passing mechanism.
     Example
            Function ADD(ByRef num1 as Integer,ByRef num2 as Integer) As Integer
                  ADD = num1 + num2
                  num1 = 0
                  num2 = 0
            End Function
     This function adds two numbers and then sets them to zero.

VB.NET - Array

Array
     A standard structure for storing data in any programming language is the array. Array can hold set of data of the same type (a set of numbers, a series of data, and so on). An array has a name, as does a variable, and the value store in it can be access by an index.
Declaring array
     Array must be declared with the dim (or public, or private) statement followed by the name of the array and the index of the last element in the array in parentheses.
Example
     Dim arr(15) as Integer
Initializing arrays
     Just as, initializing variables, we can initialize arrays.
     Syntax: =   Dim arr_name As DataType = {entry1, entry2 ….. entry n}

Types of array
In VB.NET the array classified into following types:-
       1. One Dimensional Array: - is used to store data in one flow. At declaring time of this type of array, we use only one subscript.
Example:  Dim marks(5) as integer
In above example, we declare a one dimensional array type integer and name marks. In this, we use one subscript which size is 5.

       2. Two Dimensional Arrays: - we use two subscripts at the declaring time of this array. We separate these subscripts by comma.
Example: dim officeCount (40,5) as Byte
In the above example, we declare a two dimensional array named officeCount. In this first subscripts hold 0 to 40 and second subscript hold 0 to 5 elements. This array has total (40+1) * (5 + 1) = 246 elements.
Two dimensional arrays are also called Rectangle array.
       3. Multi Dimensional Array: - the types of array which use more than two subscripts is called multidimensional array. Visual Basic supports 32 dimensional (subscripts) in array.
Example:  Dim arr(p,q,r,s) as integer

       4. Jagged Array: - Jagged array is the combinations of many arrays. In this each array have different length. A type of array, which each element is a separate array, is called jagged array.
Example:
Dim colors(2)() as Integer
colors(0) = new string{“Red”,”Green”,”Blue”}
colors(1) = new string{“Black”,”white”}
colors(2) = new string{“Yellow”,”Gray”,”Cyan”,”Orange”}



Nathuram Godse - The Man Who Killed Gandhi

Nathuram Godse - The Man Who Killed Gandhi (The Other Side of The Story)