Pages

Of Computers, troubles and my Experiments with programming as a beginner.

Saturday, May 1, 2010

Facebook down ?

Well, I don't know yet how widespread this issue is, but I don't seem to be able to signup. And the message I get is, "Account Temporarily Unavailable." followed by a "Your account is currently unavailable due to a site issue. We expect this to be resolved shortly. Please try again in a few minutes."



Another screen read "Account Unavailable. Your account is temporarily unavailable due to site maintenance. It should be available again within a few hours. We apologize for the inconvenience."



Now, I don't know if this happens a lot, but yeah, I am not into social networking 24 x 7. :) So, I can wait till the site comes up. Also, I am not complaining, I know I use it for free.

Sunday, April 25, 2010

Integrating Facebook, Twitter and Your Blog

I was a little late to start Tweeting and using Facebook. I didn't have a lot of time in hand, and Orkut seemed good enough. But then sooner or later (as in my case), you will get swooped in and jump aboard the social networking bandwagon. Resistance is futile. :) It should be fine too, as long as you don't take the 'social networking 24 x 7' tag mobile service providers advertise, too seriously.

Integrating Twitter and FB:

I found this nice link on how to do this, and on reading the page in the link, found that it is not a biggie. If you know your way around Facebook applications, then you would not have landed on this page (or the aforementioned page for that.) So, I am assuming you need help or a simpler description. :D (I am assuming Google actually indexes this site. Otherwise no one will ever land here.)

1. The Twitter Facebook application

I don't know why, but I couldn't get this to work. From the comments on the application page on Facebook, a lot of other people couldn't get it to work either. A few screen shots are shown below:






2. The Selective Tweets Facebook application

This application allows you to selectively set tweets as your Facebook status. All you need to do is end your tweet with (or if you tweak the settings, just randomly place) a #fb sign.

I tried setting this up, and found that it didn't work as well. I was reading through the Help section, and went back to my Facebook Profile to find the tweet sitting there. :) Just impatience on my part. :D A nervous smile appears on my face. This is how the page should look, and there should be a prompt that follows that will look as shown below.





I am not sure why my username appeared thrice, but as long as it works, I am happy.

Displaying tweets on your Blog:

Wordpress blog:

I have tried it on my wordpress blog, and it works. Ok, this is no big deal either. There is a Widget - Twitter and all you need to do is put your username in there. A password is not required since what is displayed is publicly available anyway.

Blogger Blog:

Ok, I am sure there is a widget out there. Let me check on that and edit this post.

Ok, I found a gadget under featured called - Twitter updates by Blogger Buster. This works and is currently on display in this very blog. There is also this gadget called TwitPic Updates, but I haven't tried that yet.

Tuesday, April 13, 2010

My new Earphones-Philips SHE9700

Over the years I have used many earphones and a number of headphones. Some of them good, some of them, perhaps not so good.

The best ear-phone that I have probably used to date was (by Philips) the earphones that came with the first Philips discman, called Expanium, that my brother bought me from Europe almost 8 years back. (pic of the expanium, shown below) It even came with a wired remote. Very very cool for 8 years back.


Prior to this, I only had a walkman, and the earphones that came with that or the earphones that I purchased (if I remember correctly, Philips spare earphones used to be as cheap as 49 rupees :) ) were rather ordinary.

The Expanium, though a little bulky was a marked improvement over the cassette players, and could even play mp3. Now, as to how I don't own these earphones any longer is a story in itself, and I will save it for another post. Suffice to say that, I don't have these earphones any longer, functional or not. I found a picture of the earphones on the internet and here they are,




With in-ear earphones these days, the ones above might not look so cool, but believe me when I say that 8 years back, they set my imagination on fire. Now if only I had them today, or could buy one, I could compare them against the earphone I just bought. Moving on,

Panasonic Earphones:

Panasonic is yet another good brand when it comes to making earphones. My elder brother had a couple of Panasonic earphones that were extremely good. I had one myself, but it was a more basic model. Of these, I believe both had volume controls, excellent bass and a plastic carry case. I am a big fan of carry cases, for storing earphones when not in use.

Philips SHE9700:

Coming to the Philips 9700, which I just bought, and haven't stopped listening to, since I opened the pack, it is simply excellent. There are a number of reasons as to why I bought this earphone. I was also considering the slightly cheaper SHE9550, but decided against it for the following reasons:

  1. I wanted an earphone that I could use with my (Sony Ericcson) phone. This meant that I needed a cable that was short and not the usual 1.2 m. At the same time, I also needed an earphone with a longer cable, since I might also want to use the same earphone with say my Laptop. The 9700 offered the solution. It had a 0.6 m cable, and an 0.6 m extension cable. How awesome!! Exactly what I want.
  2. I was kinda hoping that I would get a carry case with the earphones. The 9700 offered that as well. Great!! (The 9550 also seems to be offering something called a cable winder. Looks neat. Not sure how it works though. (see pic below)
  3. I wanted an earphone that was a cut above the Creative EP630. Yes I was using the EP630 as the benchmark. And although I am sure many earphones would qualify for this, I needed one which was within my price range as well. :)
Put all that together and you get the 9700. Probably the only reason the 9550 didn't make it is because it didn't have flexibility in terms of the cable length.

First impressions:

The bass is simply wonderful. For checking this out, I compared the bass with some decent ear-phones:
1) iPod earphones (Altec Lansing ?)
2) Creative EP50
3) Sony Ericcson in ear. (well, might not be the original one :D)

The bass sounded much better than any of the above. Even otherwise, you can tell the difference in the sound quality. I played a couple of songs on my laptop and connected two earphones at a time (the laptop - Dell Studop XPS 16) has two earphone ports. I played 'Hosana' and a couple of songs from 'Karthik calling Karthik' (yes, yes :) ). The bass was very clearly evident in the 9700.

Some pics:


Some pics of the SHE9550:


Sunday, September 13, 2009

Interested in Linux - Ubuntu vs Fedora

Well, having been a Microsoft Windows user all my life, I have never explored UNIX or LINUX all that much. I have been curious but never felt compelled enough to go through the trouble of installing either or exploring them.
But, now I feel compelled and more than curious. Why ? Here's why:
1) Having worked on a Mac at work/office, I now see that it's not so difficult to move to another operating system. (It is another thing that I don't greatly appreciate the OS X and given a choice would any day still prefer Windows)
2) Having worked on the mac, and having worked on the Terminal on Mac, on which I try out UNIX scripts, I am really interested to get LINUX installed on my computer so I can play around with a few scripts.
3) Vista!! (Yes, one word sums up the frustrations and anger of millions of users world-wide, who have begun wondering if Microsoft has got its head in its arse.)
Now that I am interested in installing LINUX on my machine, I was wondering which one of them (oh, there are so many!!) to install. Finally I narrowed down to Fedora and Ubuntu. While the LINUX community I am sure is still split in opinion as to which is better, me being just a lay user and not a freak, decided that I will decide only on very basic parameters. Like my whim!! :)
So I considered it, and decided on Ubuntu. I am downloading Ubuntu as I write this post. It's amazing how things have changed in the one year in which I have had no access to a PC/Internet. Now, you can download these over torrents :) which is a relief!! because I always hated trying to download 600 MB files and getting stuck at 500 MB!!
I am also downloading Wubi and it sounds pretty cool. I think once I try out Ubuntu and feel that it's worth installing on my machine, I'll go ahead and create a partition and do it. As of now, I am relying on Wubi, which even does that thing of allowing you to choose between Windows and Ubuntu at startup :) (Dual boot)
More on Ubuntu ....later.

Saturday, August 15, 2009

Laptop Cooling Pad

Having bought the new Dell Studio XPS 16, laptop, which overheats like hell (for whatever reason, only god knows), I had to find a solution to this heating problem.

I was looking at The IT Depot website, when I found the following laptop cooling pads:

1) Belkin (F5L001 and F5L001-BLK -without hubs, F5L025qe - with hubs)
2) Targus (AWE12AP - with hubs and two fans)
3) Cooler Master (Notepal Infinite - with hubs, Notepal X1 - without hubs)

After much consideration and being tempted to buy Belkin, I finally settled for the Cooler Master Notepal X1. Things that influenced my decision

i) Mine is a 16" laptop. The belkin coolers looked rather small, though they would easily fit inside a laptop bag.
ii) It had varying speed fan.
iii) Belkin was more portable, but then I don't plan to carry around my laptop and the cooler. For people considering to do so, I would suggest Belkin as they are sleeker.
iv) I could have easily paid slightly more for the ones which had USB hubs, but I reckon I won't require 4 more USB ports when I already have 3 on my notebook.

There were laptop stands by Allsop, which really really sucked. Who in their right mind would want to buy them ?

Friday, August 14, 2009

Transferring Files over Ethernet

Here's the deal. I wanted to transfer about 25GB of data from one laptop to another.

One of the laptops is an HP Pavillion dv2000 and the other is a DELL Studio XPS 16"

Both computers are running Vista and I connected the two laptops with a CAT 5E patch cable. (length 1 m)

The files are getting transferred at ~ 375 KB/sec which is really really slow.

I checked the network cards on both the machines and they are as following

1) HP pavillion dv2000 - Marvell Yukon 88E8039 PCI-E Fast Ethernet Connection
2) Dell Studio XPS 16" - Broadcom Netlink Gigabit Ethernet

I am unable to understand as to why the transfer is so slow. I would have expected much faster transfer rates.

Madly googling to try and find out why, but most people who are faced with this problem are using some sort of router or another, which I am not.

Oh and btw, Windows Vista sucks!! Just waiting to get my free upgrade to Windows 7

Wednesday, May 14, 2008

004: Book1,Chapter 1,Program 4

Problem Statement:
1.4 Write a program that will print the following figure using suitable characters
---- ----
>>-------->
---- ----

Solution:
Yet another trick where you have to know to align characters. That's all. I'll be honest and tell you that, I achieved it using trial and error. I mean, no matter how well you count, the alignment screws up on it's own. :) Nothing better than running the program.

Program:
/*Program 1.1.4 */
#include stdio.h
/*This is a header file.*/
#include conio.h
/*This is another header file that we require for using getch()*/

int main()
{
printf("\n ---- ---- ");
printf("\n >>--------> ");
printf("\n ---- ---- ");
getch();
return 0;
}

Output:
---- ----
>>-------->
---- ----

Description:
Quite Simple again. Not much to explain. Do read up on 001 through 003 to get to know the previous programs.

printf()

Sunday, May 11, 2008

003:Book 1,Chapter 1,Program 3

Problem Statement:
1.3 Write a program using one printf statement to print the patter on asterisks as shown below
*
**
***

Solution:
Yet anoter program that tests to see if you have gotten your newline character memorised. :D

Program:
/*Program 1.1.3 */
#include stdio.h
/*This is a header file.*/
#include
/*This is another header file that we require for using getch()*/

int main()
{
printf("*\n**\n***");
getch();
return 0;
}

Output:
*
**
***

Description:
Simple stuff really. I don't reckon there's much to explain.



There is a problem with headers in all of my programs. They are supposed to be typed as lessthansybolheadername.hgreaterthansymbol. That messes with the code and hence the Less than and greater than symbol do not display. :(

Thursday, May 8, 2008

002:Book 1,Chapter 1,Program 2

Problem Statement:

1.2 Modify program 1.1 to provide border lines to the address

Solution:

This is just an extension of the previous program. It's a gimmick basically. All it teaches is to visualise the printf lines inside the " ".Because barring the \n - carriage return or newline, the content appears as such in the output.
Program:
/*Program 1.1.2 */
#include stdio.h
/*This is a header file.*/
#include conio.h
/*This is another header file that we require for using getch()*/

int main()
{
printf(" -----------------------");
printf("\n XYZ, ");
printf("\n 10, Downing Street, ");
printf("\n London, 123456 ");
printf("\n -----------------------");
getch();
return 0;
}
Output:
----------------------
XYZ,
10, Downing Street,
London, 123456
----------------------
Description:
You can achieve the same using a single printf statement too. But that's just left to the choice of the programmer. I have used multiple printf statements because it aids the presentation and you can visualise how the output will actually look.
To know more about these terms, click on them.
stdio.h
conio.h
getch()
/* */-Comment Lines
/n - Carriage Return

Monday, May 5, 2008

001: Book 1,Chapter 1,Problem 1

Problem statement:
1.1 Write a program that will print your mailing address in the following form:
First Line : Name
Second Line: Door No, Street
Third Line : City, Pin Code*


Solution:
All the program wants to test is if you know to use the new line character. That's all really.


Program:

/*Program 1.1.1 */
#include stdio.h
/ *This is a header file.*/
#include conio.h
/* This is another header file that we require for using getch()*/

int main()
{
printf("XYZ,\n10, Downing Street,\nLondon, 123456");
getch();
return 0;
}


Output:
XYZ,
10, Downing Street,
London, 123456

Description:
To know more about these terms, click on them.
stdio.h
conio.h
getch()
/* */-Comment Lines


*In India wa have a 6 digit Pin Code just as in USA they have a 5 digit Zip Code

Friday, May 2, 2008

Book1:Programming in ANSI C by E Balagurusamy

For convenience, I am labeling this book "Book1". Henceforth, I shall be referring to this book as Book 1. So all my posts that have the title Book1 correspond to this book. This is important because I shall be solving the Programming Exercises from each unit. To know the problem statement and to know the pre-requisites of the chapter, you are advised to know what book we are discussing.

Wednesday, March 26, 2008

conio.h Header

Conio.h is yet another header file. It is however, not a part of the C standard library and does not find place among the 24 ANSI C library headers. It is mainly used for console input,output. The Dev C++ compiler does not have this header by default and it has to be separately downloaded if required. It is not very popular actually.
Some of it's important member functions are kbhit, ungetch, getch, getche, putch and some more.
I primarily use getch function for the output to display on the console. It's actually the easiest way. Otherwise, what happens is the console window closes immediately after the output is displayed. In a program where a few inputs are required from the user, this might not be of immediate concern. However, even then you will not be able to visualise the final output. There are other ways of doing the same. We shall cover that later.
So the console now waits for you to press a key on your keyboard. Till then, you can sit and marvel at the output of your program. :)

Sunday, March 23, 2008

Stdio.h Header

stdio.h is the most commonly used header file in the C programming languge. It is used with a #define pre-processor compiler directive which is placed before the main() function.
It stands for standard input/output header. It is a part of the standard library and one of the 24 headers recognised in ANSI C. It contains some macro definitions, constants and delaration of functions.
Some of the functions include fclose , fopen , freopen , fdopen, remove , rename , rewind , tmpfile , clearerr , feof , ferror, fflush, fgetc, fgets, fputc, fputs, ftell, fseek, fsetpos, fread, fwrite, getc, getchar, gets, printf, vprintf, fprintf, vfprintf, perror, putc, putchar, fputchar, scanf, vscanf, fscanf, vfscanf, sscanf, vsscanf, setbuf, setvbuf, tmpnam, ungetc, puts.
In addition to the function delarations, it also has member constants and member variables.

Thursday, March 20, 2008

Printf() Function

printf() is a very commonly used funtion in C language. This is replaced in C++ by the cout, which is easier to write for a programmer. But printf() gives you control over the data type of the variable that you use. It writes to the standard output stream. It is contained in the C standard library. It can sometimes be used without having to include any header files. However, in some old compilers, it is found that stdio.h is to be included to be able to use printf.
printf stands for print formatted. The data type control can be achieved by means of format specifiers which are as follows,
%d for integers
%f for float
%u for unsigned integer
%e for double
%c for character
printf() has a syntax as follows:
printf("string" %d,variable);
the %d here in this syntax is an example. It can be replaced by other format specifiers.

Monday, March 17, 2008

Choosing a Compiler

When you get started with programming, it is enough to start with pen and paper approach. (Or, pencil and paper approach ;) if you like it.) In fact, I'd recommend this. This way, you are placing more emphasis on the logic rather than the nuances of your compiler. If you get started with programming on your computer directly, then error messages can be a distraction. So,I'd always recommend that we start out without actually trying to compile and execute a program. We shall do that in due time, but not just yet.
Once you get the basics of programming and are ready to code using the computer, then you need to choose the right compiler for you. If you plan to use C and then later on upgrade to C++, then Dev C++ is a natural choice. It's strong, it's user friendly and what's more, it's FREE. If you have facilities available at your place of education or something like that, even VC++ by Microsoft might be a good option as long as you can afford it.
For people who want to use only C, I'd still recommend Dev C++ because I hate using the Turbo C and the Borland C compilers. No, it's not just that I hate it. Loads of people hate it. These compilers are ancient and act up frequently. I am sure many people will still be ardent fans of these and I mean no disrespect. In their day and age, they were pretty good. But it's time we move on.

Thursday, March 13, 2008

A Brief Message...

What's this post about ? I have a blog dedicated to programming where I shall try and provide some information for people who don't know much of programming. But how do I go about doing that ? That's going to be addressed in this post.

For starters, this is not a replacement for books and is most definitely not meant as a substitute for books. It's meant to supplement the contents of the books. Also, if you are looking for quick help on syntax or things like that, this is definitely not the place you'd like to land in. However, if you have read and re-read books over and over again and still don't get what's being said or are not able to write your own program, then welcome. :)

I shall take some programs that will demonstrate some concepts of programming and try and explain the whole process, right from tackling the problem to writing the code to debugging and then finally making it work.

Sunday, March 9, 2008

Book: Let Us C by Yashwant Kanetkar

Let Us C by Yashwant Kanetkar is one of the most widely used books by Indian students who learn C programming. It is highly recommended by most people who have used it and gained from it. I have used the book myself and found that the exercises are quite challenging. Another feature about this book that I did not find in the Programming in ANSI C by Balagurusamy is that it had a couple of extra things that you will be using in real life. Such as,
  • C under Windows - something we should know to create real life applications in windows
  • Graphics under Windows - doesn't hurt to know that either.
  • Internet Programming -I haven't tried this out yet, but I am sure it's going to be interesting.
  • C under Linux
  • More Linux Programming

Thursday, March 6, 2008

Programming with C-Books

There are some great books available on how to get started on C Programming. For someone like me, who did not know programming till I was into college, getting started with a good book is of great importance. Here are some of the books that are in my opinion good, for a beginner:
  • Programming in ANSI C by E Balagurusamy (Well, this book is written by an Indian author and not many people might have heard of it. But then I started out with this book and have found it to be awesome.)
  • Let Us C by Yashvant Kanetkar (Again an Indian author. Supposed to be a good book. I have never used this book all that much, but it has some stuff that are considered really good.)
  • Programming with C by Byron Gottfried (An excellent book for C, but then, if you don't know your C, don't get started with this book. Once you have achieved basic proficiency, it's a good idea to start out with this book.)
  • C for Dummies by Dan Gookin (A very well written book that is also funny. :) )
  • C Programming by Kerninghan and Ritchie (A book, I have never used but have heard is excellent.)

Pick the book of your choice. In the end, it doesn't really matter which book you chose, as long as you know your programming fundamentals.If you learnt C from another book and think it was nice and easy to learn with, then do let me know.

Monday, March 3, 2008

About

Hi all. I am an engineering student. Although I am not a Computer Engineer myself, I love programming and experimenting as such. I would consider myself an average programmer who is capable of writing simple programs.
I am no programming guru though and cannot work magic with programs. But then being who I am, I felt that I can be of immense help to people like me-beginners who are interested in programming.
I love using C and somehow liked C++ even better. I am very new to Java and haven't explored the many possibilities just yet. Yet, I am sure I will continue learning.