Wednesday, April 27, 2011

Computer Number System

We know and use Decimal Number System in our day to day life.  Though daily we use computers, we may not think much about how computers understand numbers and their internals.  Looks like school day topics. But it's always good to refresh few basics.


We know Binary, Octal, Hexa Decimal etc.  Let's get into more details....


http://en.wikipedia.org/wiki/Computer_numbering_formats  


It covers 
00010111101010
01237635265376
3637ABCDEF8738


Happy Numbering...Number represents God?




Monday, April 25, 2011

Hash Table: index = f(key, arrayLength)

In computer science, a data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently.[1][2]
Different kinds of data structures are suited to different kinds of applications, and some are highly specialized to specific tasks. For example, B-trees are particularly well-suited for implementation of databases, while compiler implementations usually use hash tables to look up identifiers.


http://en.wikipedia.org/wiki/Associative_array
An associative array (also associative container, map, mapping, dictionary, finite map, and in query-processing an index or index file) is an abstract data type composed of a collection of unique keys and a collection of values, where each key is associated with one value (or set of values). The operation of finding the value associated with a key is called a lookup or indexing, and this is the most important operation supported by an associative array. The relationship between a key and its value is sometimes called a mapping or binding.


Hash Tables


http://en.wikipedia.org/wiki/Hash_table


Read & understand clearly about Hash tables, their use & applications.


hash table - internals
http://stackoverflow.com/questions/4453476/hash-how-does-it-work-internally




Hash table advantages:



In a well-dimensioned hash table, the average cost (number of instructions) for each lookup is independent of the number of elements stored in the table. Many hash table designs also allow arbitrary insertions and deletions of key-value pairs, at constant average (indeed, amortized[1]) cost per operation.[2][3]

In many situations, hash tables turn out to be more efficient than search trees or any other table lookup structure. For this reason, they are widely used in many kinds of computer software, particularly for associative arraysdatabase indexing,caches, and sets.



Hash Table Samples

JVM - Java Virtual Machine Internals

http://www.artima.com/insidejvm/ed2/index.html  - Good JVM Internals


Another must read book:



  • Effective Java™, Second Edition

  • By: Joshua Bloch
  • Publisher: Prentice Hall
  • Pub. Date: May 08, 2008
  • Print ISBN-10: 0-321-35668-3
  • Print ISBN-13: 978-0-321-35668-0
  • Web ISBN-10: 0-13-715002-4
  • Web ISBN-13: 978-0-13-715002-1
  • Pages in Print Edition: 384

Friday, April 15, 2011

Use Open Source Software, Donate and Contribute

Now a days we get lot of very useful softwares for personal use at free of cost. If you need to modify/distribute, please check the licensing terms clearly


You get so many open source applications free here. http://sourceforge.net/


Notable applications include, 7Zip for compressing and un-compressing and PDF Generator.  There are great softwares available for day to day use. Explore, Contribute and Donate.


GitHub - Save Your Personal Source Code

Keep your sample source codes in online. You get a source control for your code.


Create an account and maintain.

https://github.com/

Thursday, April 14, 2011

Character Sets & Unicode In Computers

While programming, we never think about unicode/characters etc, if we work mostly with US clients alone.


But if we work with Indian clients/Europe clients/Japanese clients, we will come to know, why this topic is of utmost importance. Every developer should know about this.


It does not make sense to have a string without knowing what encoding it uses.


For Complete details read the below links


http://www.joelonsoftware.com/articles/Unicode.html


.NET String Handling:


http://csharpindepth.com/Articles/General/Unicode.aspx


http://csharpindepth.com/Articles/General/strings.aspx