Wednesday, November 27, 2013

What killed News Debates.....

The days of 'saas-bahu' shows are long gone. Prime time television is dominated by a new breed of shows, at least to the best of my knowledge. This new breed is popularly known as talk show debates and I would like to dedicate this post to them.

I may not be writing such posts often, but a lot of such stuff keeps brewing in my mind of late. 
I started watching these shows two years ago; just as an attempt to know all the days affairs in a short time and remain updated about whatever is going on in the world. Seemed okay then, but now the same shows are taking a nasty turn and are offering its viewers anything but useful content.
Let us understand what all is going wrong in these shows....

The political parties that are sending their spokespersons to these shows no longer realize the importance of these shows as a medium to put forward agenda to the masses. All these so called spokespersons do is duck the questions; the shows slowly turn from being useful debates to hour long sessions of avoiding questions, finger pointing, talking off the topic, etc. Now I for once would pity these spokespersons, as they do sometimes have to defend the indefensible. But sometimes by the arguments of these people just gives the impression that they actually work for the opposite side, and are making silly arguments just to give the other side the advantage.

However, we cannot blame everything on the political parties... the competition among the channels is equally responsible for the downgrading of the shows. Sometimes, these shows focus not on the important topics, but the topics that might just work to boost TRPs. This again, will lead to repetitive debates, with nothing new coming out, combined with finger pointing or slug throwing depending on the topic. We might love the topics, but the content being discussed must be sensible.

Along with all these blunders, the biggest disadvantage news debates face is the format itself. Now, this is a format where the participants are expected to give straight responses and pick a single side. It is either black or white; one can never choose anything in between. That is when i start thinking that the days when print media was at a boom were much better; but i need to hold that thought right there, or i will get off topic...

There might be many other things that have actually killed news debates for me, and i would like to know more from others. 

I would also like to make it clear that I have taken care of not mentioning anyone or any channel personally, and there is no intention to offend anyone. These are just my views as a viewer. I also understand and respect the efforts of the channels, the party spokespersons and the anchors put in a lot of efforts to bring forward these shows. But, it is always easy to point out to the mistakes of others. Do point out to the mistakes I made in this post, if any, and do share your point of view in the comments below. Thanks!

Thursday, January 3, 2013

Far Cry 3 review

Being a fan of open-world first-person shooters, i was kind of looking forward to the release of Far Cry 3. 
First off, i must say, that the game has a good vibe and feel when one starts playing it. The plot set in the beginning was good, and it gives one the feeling to keep on paying, till a while, i must add. 
For people like me, a first person shooter is going out there and killing whoever the hell comes on the screen. But this game will want you to go slow, hide in the shadows, make a run for the sneak out path; pretty realistic, but, some what boring in a game. I must say that it feels a bit better once you get your hands dirtier. You must just get used to it.
So, this guy Jason (the player), is kidnapped by Vaas(some pirate). He somehow escapes from there, and finds himself between natives of the island, and goes out to rescue his friends. But, rescuing was not enough, he wanted to kill Vaas, and after doing that he goes after Hoyt Volker(the person who employs Vaas). Now i feel that Hoyt's character needed a bit of proper introduction. Moreover, the encounters with the villains could have been better. Jason was killed by Vaas like a  thousands of times after which he remains alive because of some reason or the other, gets boring i must say. Leaving that aside, the plot of the game is good when the main characters mental journey is shown. From being a confused prisoner, to going out there and taking on the bad guys like a pro, its all there. Not to forget the encounters with the native tribes of the island that make him believe that he is some kind of a warrior.
Things in the game like crafting bags for carrying more ammo and weapons by using skins of animals we can hunt can keep the game alive. Performance boosters can also be crafted using plants and stuff. Now that can make things interesting. 
I will go with 3/5 for Far Cry 3. It's a good game, but it does not have he ability to keep you playing more and more.

Monday, November 5, 2012

Vacuum cleaner Agent ( Java Code )

A Vacuum Cleaner Agent implementation was the project made by my group as a mini-project which was a part of out AI lab work.
Better explanations of  Agents and their types will be available on other sources online. This post is made by me in order to share the code with the view that it can be useful for other students and can be made better by people sitting out there.

Without wasting much time.... here is the code....



import java.lang.Math.*;
import java.awt.*;
import java.awt.event.*;
import java.util.Random;
import javax.swing.*;

/**
 *
 * @author TS
 */
public class vcai extends JFrame implements ActionListener {

    JTextField[][] b = new JTextField[10][10];
    JButton bt;
    //int count;
    int face;//1 u;2 d; 3 l; 4 r
    int i;
    int j;
    int moves;

 
 
    void move() {
        Random rn = new Random();
        int n = 4;
        int nface = Math.abs(rn.nextInt() % n);
     
                    System.out.println(nface);
        switch (face) {
            case 0:
                if (moves%5==0 || i + 1 > 9 || b[i + 1][j].getText().equalsIgnoreCase("o")) {
                    face = nface;
                    System.out.println(nface);
                } else {
                    b[i + 1][j].setText("A");
                    b[i][j].setText("c");
                    i = i + 1;
                }
                    moves=moves+1;
                break;
            case 1:
                if (moves%5==0 || i - 1 < 0 || b[i - 1][j].getText().equalsIgnoreCase("o")) {
                    face = nface;
                    System.out.println(nface);
                } else {
                    b[i - 1][j].setText("A");
                    b[i][j].setText("c");
                    i = i - 1;
                }
                    moves=moves+1;
                break;
            case 2:
                if (moves%5==0 || j - 1 < 0 || b[i][j - 1].getText().equalsIgnoreCase("o")) {
                    face = nface;
                    System.out.println(nface);
                } else {
                    b[i][j - 1].setText("A");
                    b[i][j].setText("c");
                    j = j - 1;
                }
                    moves=moves+1;
                break;
            case 3:
                if (moves%5==0 || j + 1 > 9 || b[i][j + 1].getText().equalsIgnoreCase("o")) {
                    face = nface;
                    System.out.println(nface);
                } else {
                    b[i][j + 1].setText("A");
                    b[i][j].setText("c");
                    j = j + 1;
                }
                    moves=moves+1;
                break;
        }
        if(moves%70==0) {
            JOptionPane.showMessageDialog(this, "step");
        }
    }

    //GroupLayout layout = new GroupLayout(getContentPane());
    //GroupLayout.Group[] g=new GroupLayout.Group[10];
    public vcai() {
        super("vacuum cleaner agent");
        bt = new JButton("Start");
        Container content = this.getContentPane();
        JPanel panel = new JPanel();
        panel.setLayout(new GridLayout(11, 10));
        for (int i = 0; i < 10; i++) {
            //g[i]=layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup());
            for (int j = 0; j < 10; j++) {
                b[i][j] = new JTextField();
                //b[i][j].setLocation((i*10)+10, (j*10)+10);
                panel.add(b[i][j], j);
            }
        }
        bt.addActionListener(this);
        content.add(new JLabel("A: Agent ; o: obstacle ; *: dirt"), BorderLayout.PAGE_END);
        content.add(bt, BorderLayout.AFTER_LINE_ENDS);
        content.add(panel);
        //getContentPane().setLayout(layout);
        //  pack();
        this.setSize(360, 400);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }

    @Override
    public void actionPerformed(ActionEvent be) {
        if (be.getActionCommand().equals(bt.getLabel())) {
            //System.out.println("this");
            placeAgent();
            //slp(5000);
            face = 3;
            int l[] = new int[2];
            i = l[0];
            j = l[1];
            moves=1;
            while (true) {
                move();
            }
        }
    }

    void placeAgent() {
        outerloop:
        for (int i = 0; i < 10; i++) {
            for (int j = 0; j < 10; j++) {
                if (b[i][j].getText().equalsIgnoreCase("")) {
                    b[i][j].setText("A");
                    break outerloop;
                }
            }
        }
    }


    int[] aloc() {
        int l[] = {0, 0};
        outerloop:
        for (int i = 0; i < 10; i++) {
            for (int j = 0; j < 10; j++) {
                if (b[i][j].getText().equalsIgnoreCase("A")) {
                    l[0] = i;
                    l[1] = j;
                    break outerloop;
                }
            }
        }
        return l;
    }

    public static void main(String[] args) {
        new vcai().setVisible(true);
    }
}


The project was made using java swing. The screenshots are given below.



The main idea behind the agent is to make it traverse through the whole room. Better implementations may be available for solving situations like a "cave created by obstacles" and "linear arrangement of obstacles" , but the approach used here is fairly simple. 

APPROACH: A random direction is chosen every five moves. This will overcome the problem of the agent getting stuck in a corner inside the cave of obstacles. The "five" moves are selected because the room is 10*10. a halfway number generally gives better results. 
Other assumptions are that the "o" in the textbox is an obstacle, "*" is dirt, "A" is agent, "c" is the traversed area.

SHORTCOMINGS: The implementation does not show the stepwise movement of the agent. A messagebox is displayed  every 70 moves to see the area traversed in the interim. 
There is no better way of stopping the program, except for the "STOP" option in netbeans (yes... it is made in netbeans).

Above are a few of the many shortcomings of the implementation.

DO HELP IMPROVE THE CODE AND HAVE BETTER IMPLEMENTATIONS. 

I declare that you are free to use the code and make changes to it but, this should not be used in a commercial manner, ie to make profit.


Monday, July 18, 2011

Google Plus: Social Networking in a new circle

“Some feel that it is combination of facebook and twitter....Lets take a sneak peak... ”

Man is a social animal. the growth of facebook from a small room to its current headquarters in california will explain a lot about the needs of man to be in a social network. As 2011 approached the user count of facebook grew upto 750 million. The website, originally created for harward students, slowly gained popularity owing to its unique approach and freshness. Independent records state that more people visited facebook than google for a particular weekend of march 2010.

The increasing demand of facebook rattled the cage of the web giant Google. The latter came up with a social networking site called Google+ as a comeback.The google plus service was launched on the 28th of june 2011 in an invite only testing phase. The existing users could invite friends to use the service, however this was suspended a day after there was an “insane demand” of accounts. The New York Times states it to be google’s biggest attempt to rival facebook.

…..is it similar to facebook or twitter??*

A few days after the Google+ service was available to the users, many were of the opinion that it was very similar to facebook (keeping in mind the user interface) and Twitter (keeping in mind the option available of adding people in circles just to ‘follow’ them). But, making a judgement based on these features alone will be a harsh on the still growing ‘circle’ of Google+. The feature of posting to friends or following people you find interesting is just a part of social networking, and having these features in Google+ should not make it similar to the other sites.

‘follow’ vs ‘add to circles’ (twitter vs G+)

It is common for people to follow celebrities and those they are interested in on the microblogging/social networking sute, twitter. However, what people wont get on twitter is filtering their followers and being able to share things to a particular ‘CIRCLE’ and not to everyone. It is good to have a feature that separates friends from family and all those special people from friends.

The feature of circles is said to be inspired with real life; quoting from the G+ website itself : You can choose to share some things with college buddies, others with your parents, and almost nothing with your boss. (Now.. is there anything that explains the advantages CIRCLES better than that ?? )

‘like’ vs ‘+1’ (facebook vs G+)

The one thing that some people are supposed to ‘like’ on facebook was the games on facebook, which are not there on Google+. But the latter provides a very good interface of managing friends into circles and ‘hangout’ with them or have a gorup chat opposed to the comparatively poor idea of groups on facebook. It was after the ‘hangouts’ (video chat) on Google+, facebook introduced the video chat (supported with skype). However unlike the HANGOUTS, the facebook user video chat with more than one person at the same time, or chat with the group and watch youtube videos along with them. After personally testing each of the video chatting service on different platforms, it was found out that that Facebook Video Chat was supported only on windows platform, by providing a .exe file for the plugin; however google+ hangouts run fine on linux distributions also using the google talk plugin and are more efficient compared to the facebook product.

cherry on the top

A few days after getting one’s hands dirty using Google+ , one might feel the picture has suddenly grown larger, with the ease of posting and sharing, and the satisfaction one will get after realizing the scope of the website. But, the ease of use and better performance accompanied with unlimited space to upload photos and videos ( yes, that too! ) are not the only things that give Google+ the ‘+1’. Yes, there is more ... a GREAT mobile app.

The native app of Google plus is currently available for android phones and is soon to be available for iPhones/iPads. The application has been tested by independent users and their performances have been compared with the native applications of other services such as facebook, and the apps of Google+ were found to be much faster. Also, the application does much more than just show notifications and provide a user interface for using the G+ service on the phone. The features also include ‘huddle’, which is very handy for chatting with a group of friends and also a feature of instant upload for Android; where every picture of video taken from the phone will be uploaded to the cloud as soon as it is taken. These uploads, of-course, are done to a private album, from where they can be edited and shared to whoever we want to. There are settings available for these ‘instant uploads’ which can be used either to disable the uploads, or upload only when the phone is charging and/or the phone is using a wi-fi network.

If the native application is not available for your phone, G+ can be browsed using the web-app access in the phone browser, however some platforms only support the basic XHTML site.

The Verdict:

Google+ was found out to be a very decent product for the end user, all the credit going to the rejuvenating features and a comparatively better performance. The social network has indeed evolved into something that goes well with human behaviour, and this change, as we talk now, has already started to be accepted and used by many on the World Wide Web.

*the views expressed in the articles are personal views of the author/s.
**Google+ is sometimes referred to as G+ at some places in the article.