Monday, October 17, 2011

Siri : Putting iPhone to life

Siri is a Personal Assistant created by SRI International, which was later bought by Apple Inc. Before Apple bought Siri, SIRI International has already announced that they are going to launch Siri for Blackberry and Android also, but later on all the development efforts other than iOS platform were cancelled.

It employs Artificial Intelligence and Natural Language Processing Techniques. It is claimed that Siri adapts to individual's preferences and personalizes results over time.

I was when checking the experiences of the users of Siri on Web. I was quite amazed with the ability of Siri. It understands the voice, gives almost relevant answers and it is funny. Where as using one of the Android's digital Assistant,  I found that it has only a set of commands that it understands. It does not work as efficient as Siri.

Siri has quite a good interface. The tone timing is great. It helps one to understand when to start speaking and when siri has stopped listening to you. The timing seems to be perfect, though it sometimes takes longer time to respond in case of less availability of network.

Others have pointed out Siri’s adult-oriented humor, like when you ask it to “open the pod bay doors.” Siri understands the reference to Hal 9000, the rogue computer from 2001: A Space Odyssey, and says, “I’m sorry Joshua, I’m afraid I can’t do that (the line from the movie). Are you happy now?” If you ask for drugs, Siri recommends addiction treatment centers near you. If you want a “happy ending,” it shows you the nearest massage places.

I can only imagine how the Apple engineers planned for these answers. Did Steve Jobs ask them to put these words in Siri’s mouth? Anyway, here’s some dialogue between some kids and Siri.

Question: You’re a poop.
Siri: I guess you’re not happy

Q: Not at all
Siri: Sorry. I don’t understand. not at all.

Q: Find Kona’s pet food.
Siri: I found 15 pet stores. Thirteen of them are fairly close to you.

Q: Happy birthday Siri.
Siri: It’s my birthday?

Q: What is the tallest mountain in the U.S.?
Siri: Mount Mckinley.

Q: Who is the tallest person in the world.
Siri: Checking on that for you. Do you want me to search the web for you?

Q: What are you?
Siri: I’m just a humble virtual assistant.

Q: You’re weird.
Siri: If you insist.

Q: What are you doing?
Siri: Waiting for something to do.

Q: You’re cool.
Siri: That is correct. I use advanced heat dissipation techniques.

link:These questions are taken from here.

The Service of Siri is fully available in US now. It will work partially in Europe. This feature will not be available in India now. Apple has not stated any plans yet to roll this service in India, but seems that it is going to be soon.

Wednesday, October 12, 2011

Apple's iOS: Prospects after Steve

Now that Steve Jobs is resting in Peace, Can Apple really do cool things that made them the world's No.1 company and most desired products round the globe. The touch that Steve gave to the stuff that was designed by Apple is really great. But now when he is not there can Apple do it?

The USP of Apple's iPhone was its simple and efficient user interface, ie the iOS. The design of the interface was mostly driven from what Steve wanted it to be. Now when he is not there is there anyone who can take his place and do it. It has been already proven that Steve's place cannot be filled by anyone in the company. History says so.

So, what is the solution to it? I believe that iOS should be made open source. Like what Google has done with its Android OS. Making it Open source solves that major problem which is creativity. People can work on the issues they are facing and making the OS more user-friendly. This way not only make more and more organizations to come and use the software on different firmware but also add to more APPs to the AppStore.

What Google has done is made their Android OS free and let even the new companies and large firmware manufacturers to deploy this OS to their firmware. This has made Android more widely known and much more is that a lot of other companies other than Google are working on the OS to make it better and beautiful. This has led to much more independent developers to come and create APPS for that platform.

Though I know that everything started from iOS, but Apple should consider that if they don’t keep on innovating the others will keep on and they will soon be surpassed.

Tuesday, October 11, 2011

Unix/Linux File System: Overview

A conceptual understanding of file system can help a system administrator in adverse situations whereas can help a developer to debug certain implementations which are not working properly. Any how it can be applied in whatever one wants it to.

What is a File?
File is a collection of data items stored on a storage device, the storage device can be a hard-disk, a Compact Disk etc. Infact whatever that is going to be stored in a computer is in the form of a file. So, it is the last object in a file system tree.

Unix/Linux Supports various types of file systems.
1. EXT2: This is a UNIX file system. It has the concepts of blocks, inodes and directories.
2. EXT3: This is also a UNIX file system. The successor of EXT2 type. It provides Journing capabilites in addition to what EXT2 provides. Journaling helps in fast file system recovery.
3. ISOFS: The file system type used in compact disk.
4. TMPFS: The file system type used by temporary files.
5. SysFS: It is a RAM based file system. Mostly used in kenel related activites.
6. PROCFS: The proc file system acts as an interface to internal data structures in the kernel.
7. NFS: Network File System allows many users to share files at a common place by using cleint sever methodology.

What is a file system?
A file system is nothing but collection of two things:
1. User data
2. Meta data-stores file system structural information such as inodes, directories, permissions etc. I am going to talk about this in the next part of this article.

Above information is the basis of what i am going to talk about, INODES.

inodes
-An inode is a data structure in UNIX operating systems that contains important information pertaining to files within a file system. Almost 1% of the total disk space is allocated to inode tables.

The inode structure is relatively straight forward. This is the information an inode contains:
1. Inode number
2. Mode information which determines the file type and how the file's owner, its group, and others can access the file.
3. Number of links to the file
4. UID of the owner
5. Group ID (GID) of the owner
6. Size of the file
7. Actual number of blocks that the file uses
8. Time last modified
9. Time last accessed
10. Time last changed

so we can say that a inode contains all the infomation of a file except the file name and the actual data.
This was about file. What about the directory. A directory also have an inode number and that pointing to all the inodes that are present in that directory.It is typically not possible to map from an open file to the filename that was used to open it. The operating system immediately converts the filename to an inode number then discards the filename.

The data part is associated with something called an 'inode'. The inode carries the map of where the data is, the file permissions, etc. for the data.



                               .---------------> ! data ! ! data ! etc
                              /                  +---------! !------+
        ! permbits, etc ! data addresses !
       +-------------inode-------------+


The filename part carries a name and an associated inode number.

                         .--------------> ! permbits, etc ! addresses !
                        /                   +-------------inode-------------+
        ! filename ! inode # !
       +----------------------+

Monday, October 10, 2011

How Mainframe is changing Life?

After being trained in Mainframes with one of the premier organization, TCS, I was sent to Chennai with complete batch giving shocking news just 2 days before we were due to join Ahmadabad. We were told that there are certain "Critical Business Requirements" and to compensate these requirements they are sending us to Chennai.


I thought it could change life and I am going to work something really good and make myself worth working in TCS.


Now, I start my daily routine by waking up, doing my daily business, going to office, eat, and come back, eat again and then sleep. Oh you might be thinking that I missed the most important part of whole of my day, "WORK". But the truth is I didn’t forget, it is not anymore part of my schedule.


When I joined a project, I started up doing some excel sheet work. Then came some manual editing work on mainframes and then came the most fascinated and admired "Cycles". I have to run one or more cycle’s everyday of every week of every month. Nothing has changed; I have to just run them. Write the code in the most tedious way, though there is not much of the coding now done.


One was told to leave all his creativity and knowledge aside, start working like dumb, ask no question and follow the checklist perfectly. Now who cares if 80% of the world's code is written in COBOL? However nobody of them told that there are no new technological breakthrough happening in mainframe and COBOL. You are asked to work like other almost 50K odd people are working in the organization like sheep and cow.


I wanted to work in Networking, but I was told "NO" at all the points and passages I went. I was asked to work whatever that is assigned to me.


I am not saying that everyone who is working on mainframe is having the same kind of work, may be its just me or maybe not. If somebody is happy with whatever he is doing he has to keep doing it until he feels it’s worth doing it. I just wanted to let you know that this is what happened to me.

Tuesday, October 4, 2011

Yes to noSQL..!!


With Oracle diving in to the noSQL type of Databases, buzz for these kind of databases have increased. Oracle Corporation has announced that it is going to launch its noSQL Database soon. The website of ORACLE says, it would be available by mid-October for downloads as it is going to be open source.

Now let me talk something about noSQL first. noSQL can be abbreviated as "Not Only SQL". The noSQL is a class of database management systems that have come up in recent years that differ from typical class of RDBMSes. “noSQL” databases does not provides joins or schemas as RDBMSes. noSQL expands horizontally whereas RDBMSes expands vertically.

A broad range of services over Internet are using noSQL databases. Netflix, digg, Linkedin,Facebook etc are some of the big examples that have adopted noSQL as their choice of DB. There was buzz that Wikipedia should also use this kind of DB because it has a vast amount of data and this is the best solution for that range of data.

noSQL is a collection of key-value. This can be implemented using any programming language as Key-Value stores allow the application to store its data in schema-less way. The data can be stored in a data-type or object of any programming language. This also does not require any particular data-model.

Now, lets come to big question. Why to use noSQL databases instead of SQL databases?
The reason being the volume of data that they handle. Normal SQL Databases are good up to 10 million records and then they start become annoying. But if you have some Billion+ key-values to be stored then these kinds of databases are used. so these are best suited for Forums, blogs, social networking website, where there is huge amount of data and data needs to be fetched fast.
The much bigger question is Can noSQL replace SQL?
I believe this cannot happen at any point of time in near future of 5 to 10 years. SQL databases have their own importance in the IT industry. They are reliable, much more stable and are suitable to needs of the customers (most of them). Although both these target different solutions to different problems.

But the noSQL databases can be in conjunction with RDBMS databases. The data like (username, Order, Money) can be stored in RDBMS where as the application data, social network data, video data can be stored in noSQL databases(as these require performace).
Some of the most popular noSQL DBs are as follows:
  • MangoDB
  • BigTable
  • Apache Cassandra
  • Neo4J
  • MarkLogic
  • Exist
  • Hbase
  • db4o
The list may go on, but these are what most widely used...!!
The Feature set of noSQL as mentioned by Oracle are as follows:
·         Simple Data Model
    • Key-value pair data structure, keys are composed of Major & Minor keys
    • Easy-to-use Java API with simple Put, Delete and Get operations
·         Scalability
    • Automatic, hash-function based data partitioning and distribution
    • Intelligent NoSQL Database driver is topology and latency aware, providing optimal data access
·         Predictable behavior
    • ACID transactions, configurable globally and per operation
    • Bounded latency via B-tree caching and efficient query dispatching
·         High Availability
    • No single point of failure
    • Built-in, configurable replication
    • Resilient to single and multi-storage node failure
    • Disaster recovery via data center replication
·         Easy Administration
    • Web console or command line interface
    • System and node management
    • Shows system topology, status, current load, trailing and average latency, events and alerts.

Monday, October 3, 2011

Basics of UNIX


File and Directory Structure:
The Directory Structure of Unix/Linux based operating systems is Inverted Tree, where roots(/) are at the top and rest comes down heretically.  The file system looks like:
  • / — the slash / character alone denotes the root of the virtual filesystem tree.
  • /bin — stands for "binaries" and contains certain fundamental utilities, such as ls or cp, needed by all users.
  • /sbin — stands for "system (or "superuser") binaries" and contains fundamental utilities, such as init, usually needed to start, maintain and recover the system.
  • /etc — contains configuration files and system databases.
  • /dev — stands for "devices". Contains file representations of peripheral devices.
  • /home — contains the home directories for the users.
  • /mnt — contains filesystem mount points.
  • /lib — contains system libraries.
  • /root — the home directory for the super-user root.
  • /tmp — a place for temporary files. Many Unices clear this directory upon start up.
  • /usr — originally the directory holding user home directories, its use has changed, and it now holds executables, libraries, and shared resources that are not system critical, like the X Window System, KDE, Perl, etc. (The name "Unix System Resources" is a post hoc backronym). However, on some UNIX systems, some user accounts may still have a home directory that is a direct subdirectory of /usr, such as the default as in Minix.
  • /var — a short for "variable." A place for files that may change often.
  • /proc — contains all processing data (Process information about a running operating system).
  •  /opt — contains add-on software.
  • /media — default mount point for removable devices.
  • /srv — server data (data for services provided by system).
  • /boot — contains all the important files which are required for successful booting process.
  • /sys — contains information related to hardware.
For more information Please follow: http://en.wikipedia.org/wiki/Unix_directory_structure


Shortcuts of Shell
Following are the mail shortcuts that can be used in the K-shell of AIX for more productiveness:
  • To navigate with the prev and next commands : ESC + j and ESC + k
  • To navigate right to left and vice-versa in a command : ESC + h and ESC + l
  • To inserts chars between a already written command: ESC + h/l (this is to navigate) + i (this is to insert). Remember that the INSERT key doesn’t work here on shell for inserting. 
  • To auto-complete a file or directory name: ESC + \

VI editor
  • VI is an Editor used to edit files in the UNIX based system. Following are the mostly used features of VI: 
    • To open a file in VI editor : $vi <filename>
    • Note: This will open the file if it is present in the current directory or else it will create the file if the directory is not mentioned.
  • To insert in to the file once the file is open for editing : press i or press a or press INSERT Key
  • To quit from the vi editor one need to come to normal mode from the insert mode. Use ESC key to come to normal mode from Insert mode.
    • :q! --> to quit forcefully
    • :w! --> to write the content of the last edit to the file, forcefully
    • :wq! --> to write the content of the last edit to the file as well as quit, forcefully.
  • Use Following commands in Normal mode:
    • :set number --> to see the line numbers
    • :set nonumber -->to remove the line numbering
    • /<word> --> to search the word in the file
Basic Commands:
Following is the list of basic commands that can be used on almost all the UNIX based systems and enhances the productivity:
  • $cd --> To come to users own home directory from any location
  • $cd <directory path> --> To go to the specified directory path
  • $cd .. --> To go one level up in the directory structure.
  • $cd - --> To go the previous directory that one is working before working to the current directory.
    • Note:Please note the SPACE between cd .. and cd –
  • $touch <filename> --> Creates empty files, if the file is not present. If the file is present the access time stamp will be changed.
  • $mkdir <dir-name> --> To create a directory.
  • $mkdir –p <dir1/dir2/dir3> --> To create recursive directories. Using this dir2 is created in dir1 and dir3 is created in dir2.
  • $rm <filename> --> To delete a file. One will be prompted yes or no when this command is used.
  • $rm –rf <filename or dirname> --> To delete files or complete directories. It won’t prompt for yes or no before deleting the file or directory.
  • $man <command> --> To get information about a command. For example $man grep will give all the information regarding the grep command.
  • $cp <source> <destination> --> To copy a file or directory from source to destination.
  • $mv <source> <destination> --> To move a file or directory form source to destination.
  • $clear --> clears the prompt
  • $cat <filename> --> to view the content of the file.
  • $date --> prints the date on the prompt
  • $echo “String” --> prints the String on the prompt.
  • $grep <pattern> <filename> --> to search a pattern of strings within a filename.
    • Note: The various options of grep can be easily understood using the man page ie $man grep.
  • $cat <filename> | more --> To view a file which is more than one page long. RETURN (ENTER) key is used to scroll one line and SPACE key is used to scroll 1 Page.
  • $more <filename> --> works same as the above command.
Shell and Shell Script
A UNIX shell is a command-line interpreter or shell that provides a traditional user interface for the UNIX based operating system and for Unix-like systems. The shell that a user is using can be found using
$echo $SHELL
/bin/ksh
This means that K-shell is used by the user.
The most widely used Shells are as follows:
  • Korn Shell --> ksh
  • Bourne Shell --> bsh
  • Bourne Again Shell --> bash
  • C- Shell --> Csh
For reading and referring to the Shell Scripting please follow the below mentioned links as it is a long topic and cannot be covered in this completely.
Use of $
Following the table how $ can be used in a Shell Script.
$1 - $9
These variables are the positional parameters.
$0
The name of the command currently being executed.
$#
The number of positional arguments given to this invocation of the shell.

$? 
The exit status of the last command executed is given as a decimal string.  When a command completes successfully, it returns the exit status of 0 (zero), otherwise it returns a non-zero exit status.
$$
The process number of this shell - useful for including in filenames, to make them unique.
$!
The process id of the last command ran in the background.
$-
The current options supplied to this invocation of the shell.
$*
A string containing all the arguments to the shell, starting at $1.
$@
Same as above, except when quoted.

Sunday, October 2, 2011

Are you being Tracked??

As stated on Wikipedia.com "A zombie cookie is any HTTP cookie that is recreated after deletion from backups stored outside the web browser's dedicated cookie storage. This makes them very difficult to remove. These cookies may be installed on a web browser that has opted to not receive cookies since they do not completely rely on traditional cookies".

Almost all of the internet uses Adobe Flash Plugin to provide online video capabilities to the web. But this is not all what this is designed for. More than half of the internet’s top websites use a little known capability of Adobe’s Flash plug-in to track users and store information about them.

Flash cookies are used by many of the net’s top websites for a variety of purposes, from setting default volume levels on video players to assigning a unique ID to users that tracks them no matter what browser they use.

Websites can store up to 100K of information in the plug-in, 25 times what a browser cookie can hold. Sites like Pandora.com also use Flash’s storage capability to pre-load portions of songs or videos to ensure smooth playback.

Some Flash-cookie (LSO) properties in short...
- they are never expiring - staying on your computer for an unlimited time.
- by default they offer a storage of 100 KB (compare: Usual cookies 4 KB).
- browsers are not fully aware of LSO's, They often cannot be displayed or managed by browsers.
- via Flash they can access and store highly specific personal and technical information (system, user name, files,...).
- ability to send the stored information to the appropriate server, without user's permission.
- Flash applications do not need to be visible
- there is no easy way to tell which Flash-cookie sites are tracking you.
- shared folders allow cross-browser tracking, LSO's work in every flash-enabled application
- the Flash company doesn't provide a user-friendly way to manage LSO's, In fact it's incredible cumbersome.
- many domains and tracking companies make extensive use of Flash-cookies.

All modern browsers now include fine-grained controls to let users decide what cookies to accept and which to get rid of, but Flash cookies are handled differently. These are fixed through a web page on Adobe’s site, where the controls are not easily understood (There is a panel for Global Privacy Settings and another for Website Privacy Settings — the difference is unclear). In fact, the controls are so odd, the page has to tell you that it is the control, not just a tutorial on how to use the control.

There are ways, if you don't want to be tracked. One cool way is to use Private browsing, which is available in all major Browsers. There are tool available that can help you delete all the cookies, that is just for time being, because Technology is ever developing, who knows something new comes up another day and it will take up all your important browsing history.

Tools :
* Better Privacy extension for Firefox -
https://addons.mozilla.org/en-US/firefox/addon/6623
* Ccleaner - http://www.ccleaner.com/

I could not found any tool for Chrome. While browsing all of the browser setting for Chrome, i only found "Delete all Cookies". This thing worked it cleared all the cookies including the flash-cookies also.

Modify Windows Server Password Policy


So, while playing with Windows Server 2008 R2, I found the minimum password requirements to be a bit too stringent for a lab environment. If you find yourself in a similar predicament and wish to lower the password requirements to near-nothing (not recommended for production environments), then follow these steps:
  1. Open a command prompt
  2. Type 'secedit /export /cfg c:\temp.cfg' and hit enter
  3. Edit c:\temp.cfg in your favorite ASCII editor
    • Change the line "PasswordComplexity = 1" to "PasswordComplexity = 0"
    • Change "MinimumPasswordLength = 7" to a smaller value.
    • Save and close the file
  4. At a command prompt type "secedit /configure /db %windir%\security\local.sdb /cfg c:\temp.cfg /areas SECURITYPOLICY"
The new settings should be in place. Create an account and it won't bug you if the password is too short.