Getting started with Ruby – Part 5

Hi in my previous article Getting started with Ruby – Part 4 I covered Hashes & blocks. Today I will take you through the various forms of loops in Ruby.
Read More →

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Getting started with Ruby – Part 4 – Hashes & Blocks

In my previous article Getting started with Ruby – Part 3 I started with Collections and covered basics of Ranges & Arrays. Like I mentioned towards the end of the article (in case you couldn’t manage to reach the end) I will start with one of the most commonly used Collection objects in Ruby, namely Hashes.
Read More →

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Getting started with Ruby – Part 3 – Collections, Ranges & Arrays

In my previous article Getting started with Ruby – Part 2 I introduced you all to Ruby & its philosophy and I started out with data type classes in Ruby. I was able to give you an overview about Strings & Numbers in ruby. Today I will start with Collections.
Read More →

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Getting started with Ruby – Part 2 – Introduction & Philosophy

Hi again, this is part 2 of my series of articles to help beginners getting started with the Ruby programming language. At this point of time I would like to quote the definition of Ruby from the Ruby-Lang official website.

A dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write.

I know I had already quoted Ruby’s definition from wikipedia in my previous article ‘Getting started with Ruby – Part 1‘, but that was more of a technical definition. Here I wanted to draw your attention to Yukihiro Matsumoto‘s, popularly known as Matz’s philosophy behind creating Ruby, which is making programming as simple & natural as humanely possible. We will be witnessing that very soon.
Read More →

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Getting started with Ruby – Part 1

Before we get started with Ruby, let me first give you a brief on who I am, I am Dhruva Sagar, a software engineer having a little over 4 years of professional experience having worked in technologies in and around Java, Javascript, Adobe Flex, PHP and Ruby. I have always been fascinated by programming languages and have been eager to learn new ones and I can also code comfortably in Perl, Python & Groovy, however I haven’t worked extensively on these. Right now I am working in a startup Artha42 Innovations Private Limited and am having the best time of my life!
Read More →

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Moving to Ubuntu

I have worked on quite a few Linux distros, Redhat, Knoppix, BackTrack, PHLAK, ubuntu, etc. But most of the times I did that only to explore the realm of Linux and see for myself what the wonder is all about and explore a little more for the particular distro’s utilities, and not to actually shift myself completely to using it solely, since I have been accustomed to using windows and the various softwares that I use on windows for doing various tasks.

In the last few years I have had a huge inclination towards open source applications simply because they are good! I have found most open source applications to be really very good, highly usable, highly useful and really a source of inspiration for a fellow developer like myself and several others out there. The fact that you create a software for your benefit and release as open source and then other great developers from across the world who may share your interests in the tool can actually contribute to your application and help it become better is simply superb. This is what makes open source applications even better than commercial applications in the long run (most of the times). Also open source applications have a much better chance of enhancing and adding functionality that users wish for compared to commercial applications and this also makes them better over the long run.

The more I have been shifting to using alternate open source applications, the more I have been inclined towards moving to using a linux distro on my system as I no longer am restricted to the windows environment which is rather rigid and inflexible for my liking to say the least, and as a developer I also have a better environment under linux for using, appreciating, and even enhancing or contributing to open source applications!

I bought my laptop about a year back and it came with pre-installed Windows Vista (licensed version). Although I was rather frustrated by the various issues of the operating system, but the fact that several of the softwares I used previously were (at the time) not compatible either fully or partially to Vista added to my frustration. During this frustrating period I also found open source applications to be rather quicker to becoming compatible to Vista’s environment compared to several commercial applications that I used, which increased my appreciation for them.

My laptop has 1GB RAM and I really believe that it is not that low, but Windows Vista completely undermines my belief at most times. I have often found that Vista itself hogs about 60% of my memory and to my surprise that is huge! Perhaps it could be due to the various applications I have installed on my system and the various settings pertaining to the visual aspects of the operating system that were perhaps making Vista hog a little more of my memory that it would under normal conditions, but still in my opinion this sucked!

But for a long period of time I still continued using Windows Vista for the simple reason that I had already built quite a huge data repository (books, softwares, videos, music) which I normally keep on my system and now separating a 10GB or so partition for a linux would be a little cumbersome. Slowly and steadily most of the applications I used became Vista compatible and that added to my comfort to just continue using Vista as it is and just patiently put up with whatever memory hassles I have and I also thought if it gets a little out of hand, I could perhaps even even go for a memory upgrade and that would make things better. To be honest, it was simply easier to let Vista control the system rather than me having to go out of the way to control the system, at least under the circumstances.

For many who would know, I joined SAP Labs India about a month back and so far my time here has been quite interesting, I am part of a nice and enthusiastic team and there is quite a lot that I am and will learn here, if things go well. Here my colleagues introduced me to Wubi, it seemed almost magical how I could simply install ubuntu on my system and have windows treat it just like any other software! That spared me the hassle of creating a separate partition by rearranging my data somehow (which would have been a rather difficult process in my circumstances).

There was simply no reason for me to look back now. I installed Ubuntu and now for the past 1 week I have not looked at Windows Vista even once on my laptop. It’s not that I haven’t worked on linux before, as I have told you that I have worked on several distros for experimenting and learning purposes in the past, but after having worked on Windows Vista for about a year and then shifting to Ubuntu truly helped me see the incredibly huge difference myself. Ubuntu is simply miles ahead of Windows Vista (now I am not going to go into an argument, this is only a matter of personal belief), it is really cool and so swift, It’s almost as if I have upgraded my memory!!!

Only after using Ubuntu have I realized again that 1GB is indeed a lot of memory! In fact this reminded me about my first computer which had 32MB of RAM! of which I wrote an entry yesterday describing a comical incident I had when I tried to clean my data on my computer. Ubuntu is really a very good distro with all the tools one would need for a desktop. You can easily search for different applications from the add/remove applications dialog in the Ubuntu community and install them. Ubuntu also provides free security upgrades. Using Ubuntu one can very easily configure and manage not just a simple user desktop machine but even high end servers in a matter of minutes. With the really cool and interactive environment it provides, it really makes your desktop fun to interact with. The performance of Ubuntu over the desktop is really awesome.

My overall experience in these past days using Ubuntu has been really incredible and I would suggest each and every Windows user to atleast try Ubuntu using Wubi (if you haven’t already), it really doesn’t get any simpler than this and it will make your life really easy if you have difficulties, like I did, for separating partitions. In my opinion everyone should experience using Ubuntu at least once and see how they can very easily move to using Ubuntu while still being as productive (perhaps even more) as you were while you were on Windows! The Ubuntu community is also simply superb you will find great support there for all your problems (if you have any) and also find all the softwares you could need to do anything you would want to.

Do let me know what your opinions on the same are and what are your experiences using Ubuntu or any other distro for the same reason, and let me know how you liked this post. Until then, have a nice time guys and keep coding :).

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Cleaning data on my computer

I remember my first computer which I had when I was in about 4th standard (that would be about 15 years back if I am right), if I remember correctly. It was a real source of entertainment for me at the time. Although I did enjoy playing basic dos games on it for long durations a lot, but I remember that computer and most importantly it’s exact configuration because of a really hilarious incident that happened with me! ( Well considering my age at that time and my level of understanding of the computer, it really was hilarious, not that dumb 😀 )

The computer I had at that time had a 504MB HDD, 32MB RAM, one 31/2 in Floppy drive, A 15″ black & white monitor. And it was running Windows 3.1! This particular incident happened on one fine day when while I was transferring some files from several of my loved floppy disks that I got from a friends place and I suddenly realized that I had an awful mess in the C:\. I had so many files there that I had no clue about! I was dead sure many of them were ‘useless’ and I never used them and certainly would never need them in the future!

So I decided that it was time enough that I should clean it all up and have a really organized and tidy C:\! It took me a lot of time and patience to carefully chose files that were ‘useless’ and the ones that were ‘useful’ the ones that I had put there myself and I used often, wallpapers and games, and deleted all the ‘useless’ files. As simple as that.

Some of the files that got deleted from the C:\ were autoexec.bat (what a weird name! :D, I do not want anything executed by itself!!!), and other important (well important for Windows!) files like boot.ini etc etc. After I cleaned everything up I felt really nice, it felt that now I really own the computer! (literally!), after all I should know each and every file that is there! The only files that I needn’t bother about were in the windows folder, those I needn’t mess with, that’s the windows!

So I cleaned up all my data in C:\ and it felt like I did a really cool job, played a few games like dave, prince 1, for some more time and enjoyed a lot playing on it (for the last time…). After I was through I shut down my pc and sweetly went back to doing my homework. I completed my homework really quickly (since I had to get back to the games! ) and quickly got back on my comp only to start it and get all sorts of errors and it won’t boot up. It was so weird! :D. I tried a lot of things, got the command prompt as well but couldn’t get the windows up and running. That’s when I knew I was in trouble!!!

It had taken a lot of convincing my dad to actually get him to arrange a pc from his company which he would get at a reasonable price. And it wasn’t the fact that I had ruined the pc that was worrying me. It was the fact that this would give him the chance to have it returned back so I could get back to my studies and not waste my time on it anymore, the computer, the noises and the games really annoyed him anyways! Well that’s what happened :).

It’s not that I changed a lot after that, I had my hands at a lot of pcs at the school labs! Me and my friends did lots and lots of cool things there :). Played loads of games! And we knew exactly how to fool the lab assistant into thinking that we’re actually learning MS Office!!!

It was one really hilarious thing that happened, I laugh a lot even today thinking of what happened.

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Calculating a MD5, SHA1, SHA256, SHA384, SHA512 Hash in C#

Following my previous post in which I showed you how to calculate a corresponding Hash in Java, here I am giving another implementation through a simple function for calculating a Hash in C#.
Read More →

VN:F [1.9.22_1171]
Rating: 5.0/5 (1 vote cast)
VN:F [1.9.22_1171]
Rating: +1 (from 1 vote)

Calculating a MD5, SHA1, SHA256, SHA384, SHA512 Hash in Java

Hi, today I will show you with examples how to evaluate Hashes in Java programming languages. I hope this information comes in useful for many people.

Java which is my favorite programming language because of sheer simplicity, vastness and ease with which you can customize and extend existing libraries to suit your needs.
Read More →

VN:F [1.9.22_1171]
Rating: 5.0/5 (3 votes cast)
VN:F [1.9.22_1171]
Rating: +1 (from 1 vote)