Getting started with Eclipse

Hey everyone,

In this post, I will discuss how to create projects within Eclipse.

Once Eclipse is installed (but I’m using portable version) and when you firstly run it. Follow the steps in order to create java projects :

1 – Click File menu or right click on the Project explorer.

2 – Select New menu and choose ‘Java Project’.

‘New Java Project’ wizard will open. The very first field is Project name, give it a meaningful project name. In this example, I’m giving it “Hello_World”. Make sure the latest or default JRE option is selected in JRE group. Then click ‘Next’ button. Next form allows you to check and modify Java build settings which you don’t really need to worry about now and simply click the ‘Finish’ button.

Now you can see your Project in Project Explorer. Double click on it, now you will see ‘src’ node right under the Project. Right click on ‘src’ node, select New menu and choose ‘Class’. ‘New Java Class’ wizard will open. Ignoring other advance fields, Simply enter the name of class in Class field. In this example, I’m using “HelloWorld”. Make sure modifier field is set to public and Superclass field is java.lang.Object. Also, tick the check box with public static void main(String[] args) and click ‘Finish’ button.

A new ‘HelloWorld.java’ tab will open in editor with code :

Right after the line : public static void main (String[] args)

Add another line : System.out.println(“Hello World”);

And all together, It should look like this :

To run it, right click anywhere in the HelloWorld.java tab, select ‘Run As’ menu and choose ‘Java Application’.

That’s it for this post. I will come up with more Java tasks for my portfolio work. PK!

Update 2011

Hello everyone,

YES! I’m back. This is my first update for year 2011. Okay, I know it’s April and I haven’t update anything here.

Now, I’m near to end of my first year of BSc (Hons) Computing at University of Wales, Newport and I’m loving it. Now I can say I’m living my dream. Study over here is way better than I thought of, lecturers are very knowledgeable and next to calm. I’m just grabbing their knowledge with both hands. Moreover being a member of Cognitive Robotics Research Centre, I have learnt loads from other members and it feels great to learn and work with researchers working on billion pounds project like RoboSkin. Digital Forensics, latest addition to my list of interest. Yea, I know my list is getting too big, But after knowing some awesome projects going in University, I just can’t help after all I’m a Science lover and I’m really glad to have these ‘Masters’ as my lecturers.

I have learnt loads in last few months that includes Vision Processing for Robots ( Specifically Nao Robots for RoboCup ) , Digital Forensics, Computer Networks, Arduino, Lego NXT and much more. I will be updating about them one by one.

Just one more month, I will be free from middle of June to September and I’m planning to start work on my idea to develop a software using CMUSphinx, FreeTTS, Java Media Framework and few more APIs. It’s not just limited to Java technology, there will be lots of C, C++, Javascript programming and HTML rendering. On other side, I might also go part time job in software development to earn some first hand experience in UK based company. But for now, I’m more focused on my assignments.

Thats it for now and I will be updating soon.

~Puneet Kalra

Back To Basics : Number Systems

Hello everyone,

In this post, I will be talking about Number Systems. Yes, Even after researching and discussing on such advance topics like Speech Recognition, Image processing etc. I’m still posting this basic but very important thing for hackers, Wait! Chill, I’m using first term for hackers. Those who are into Computing.

Being honest, I have worked hundreds of times on Number Systems but I never tried to explore things behind them and used to just convert from one number system to other and Simply make them work for me.

So in this post, I’m not going to tell you how to convert from Binary ( A Number System ) to Hexadecimal ( Another one) or anyother. This one is going to be about advantages and disadvantages of each Number System. Also, Why and where do we need use these Number Systems.

From the invention ( 5th and 6th Century ) of Numbers by Aryabhata and revised by Brahmagupta, We have many Number Systems in this world, But obviously i’m not going to talk about all of them. So here’s the list of Number Systems that i have researched ( Little bit only ) on : Decimal, Binary, Hexadecimal and Octal.

Decimal:

Has a base of power 10, Uses “1234567890” to represent numbers. Easily readable. Used by humans. Easily manipulated. When it comes to computing, Can not work on its own, Uses other number system according to the situation. No benefits on Computing aspect.

Binary:

Has a base of power 2, Uses “1” or “0” to represent numbers. Always works on core, But hard to read because of confusing “1” n “0” representation as well as representations can be really huge sometimes. *Very important point* Used when representation needs finite width like 8, 16, 32 and 64 bits (Example : Memory Cells, Registers etc.) and processors understands binary only.

Hexadecimal:

Has a base of power 16, Uses “0123456789ABCDEF” to represent numbers. Fastest at manipulation work than any other number system. So common used for Encryption, Image Processing and other processes, Where date is huge but needs to be manipulated very quickly. Used when short and human friendly representation is required. Each character in Hexadecimal representation 4 binary digits (Nibble).

Octal:

Has a base of power 8, Uses “01234567” to represent numbers. The actual invention of motives that we use to describe Hexadecimal. Used when representation needs to be short and in numbers only ( Example: CHMOD – File permissions in Unix ). Second most used by humans after Decimals. Each character in Octal representation 3 binary digits.

** Most important, Usage of these number systems varies on terms like Signed and Unsigned values, Magnitudes and Specially when it comes to embedded systems.

I will be posting more advantages, disadvantages and specific examples of Usage of these number systems in comments 🙂

That’s it for today,

Puneet Kalra