Labels

Monday, December 3, 2012

Setting up maven in fedora

Hii Friends,

 Setting up Maven in fedora is really simple if you know how to do it.  This post is for people who is new to Maven and to those who haven't set up Maven before.

There is only Few Steps you have to follow to set up Maven in fedora.

1. Download Maven 3.0.4 (Binary tar.gz) from here. http://maven.apache.org/download.html  
 
2.  Extract the tar.gz file and get the path of the directory. 

E.g. - /home/vinu/software/apache-maven-3.0.4

3. Now we have to add the path in to the bash profile

       go to the bash profile    [vinu@localhost ~]$ vi .bash_profile 
 


Add the M2_HOME after the JAVA_HOME in the bash_profile 


export JAVA_HOME=/home/vinu/software/Compressed/jdk1.7.0_09
export M2_HOME=/home/vinu/software/apache-maven-3.0.4
PATH=$PATH:$HOME/.local/bin:$HOME/bin:$JAVA_HOME/bin:$M2_HOME/bin
export PATH


4. And don't forget to Source the bash profile

[vinu@localhost ~]$ source .bash_profile
         
Okiii we are done setting up Maven :) just to check whether it works properly type this in the terminal
[vinu@localhost ~]$  mvn --version

Hope you get something similar to this 

Apache Maven 3.0.4 (r1232337; 2012-01-17 14:14:56+0530)
Maven home: /home/vinu/software/apache-maven-3.0.4
Java version: 1.7.0_09, vendor: Oracle Corporation
Java home: /home/vinu/software/Compressed/jdk1.7.0_09/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.3.4-5.fc17.x86_64", arch: "amd64", family: "unix"



hahah thats all ..........................
Its really Simple :) if u guys have any questions or any thing feel free to put a comment 

Have Fun friends.

Wednesday, November 14, 2012

Best Korean Drama

Hiii friends,


Korean dramas are really nice and interesting than the others. I am kind of addicted to Korean dramas, From all the Korean dramas I have watch so far these are my favorites.  First I though of give ranks for the Best Korean dramas but its really hard coz I love all most of them a lot. 

I have already put a post in 'Playful kiss' so I'm not planing to write it in here.


Boys Over flowers

This is the Korean drama most of the people love. :D even me.This story is based  on  Group of four rich boys (F4) rules the school. Geum Jan Di a girl who is not rich but who never give up easily, got a scholarship to attend the same school as F4. story gets sooo interesting after this point. Geum Jan Di changes every thing and gets in to soo much trouble because of F4. Its a really interesting story. Anyone who love 'Kim Hyun Joong' or 'Lee Min Ho '  will love this drama for sure. 



Rooftop Prince

 This is the Most Funniest Korean drama I have watched. Best Time travel drama I have watch. Very long time a go Crown prince  and 3 of his trusted people mistakenly time travel to the 21st century  ,  the purpose of this is to find the truth behind how his beloved princess die. even How much i love the drama I really HATE THE ENDING :(  its really sad.  BEST thing about this drama is these 4 people LOVE omurice , after watching this I even tried making omurice (even though it didn't come the way it should ) . Cant wait till i got to eat yummy omurice.



Faith 

This is one of the latest dramas I have watched. It’s also a time travel drama (but can't beat the Rooftop prince). Long time a ago crown princess get hurt and they send a general through a door(door only opens very few time)  to the future ( they think as heaven) to get a doctor to save the princess. After the doctor saves the princess and trying to go back to the future the door get closed and doc stuck in the past. I was a bit confused in the middle but it’s a very interesting story. In the end I thought it will be same as the rooftop prince (sad ending) but It was a great Happy ending.



Protect the boss

 This is also a very interesting drama, great love story. Part I love the most in this drama is when boy confess to the girl. Girl tries to reason why she can’t like him. (Don’t mind the dots it means there are some more parts in it)

Boy - …….. I love U soo much …………….
Girl - …  Number One is
Boy – ohh there is Number 2 alsoo ????? ( in a sad mood )
Love this part a lot in this drama.





You're Beautiful

  This is one of the famous dramas. Worse part of this dram is I love other two Guys than the Main actor.  Love Jeremy sooooooo much I even cried a lot when he was telling that song. Wonder why this girl is soo stupid and didn’t notice that the other guy has already found out her secret. Even this is one of my favorite dramas I cried a lot watching it.  I recommend this drama to anyone who is interested in watching Korean drama.
 




Since this post is getting so long than I expected I just add the names and pic's of my favorite Korean dramas

Princess hours

  prosecutor princess

 Full house

city hunter 

 shining inheritance

 Coffee prince

Dream high 

lie to me

 My girl

personal taste 


Mary stayed all night

These are just few of my favorites if you guys know any other interesting  one let me know to :)
Have fun friends

Monday, November 5, 2012

Clean Code : Meaningful Names

Hi friends,

This post is also about How We Write Clean Code.
when we write clean code First thing we should consider is putting meaningful names. This is a pretty simple thing, only thing you have to do is just think of some thing nice and matching to what they do (variable, function or classes). If u have watch Smurf its just like that you give names that exactly match with their personality.

There are few things you have to consider when giving names.

- Use intention Revealing Names

when you or some one read you variable name they should get What you was planing to do with it.

- Avoid Disinformation

You have to be more careful when you tring to put Small names for variables, it should be more clear to others what you are tring to say. Clearly Do Not use soo much of small names in your code

Eg-:  If u write a code like this, can you say what is this A is really equal to is it zero or an another variable ???




- Use Pronounceable Names

 If you can Read the variable name loud in front of others without sounding like an idiot then there is No Problem. Just put names that you can pronuce Eg -: Do not use something like this 'genymdhms' (generation date, year, month, day, hour, minute and second)

- Use Searchable Names

When you write a big codes its not so easy to find variable and constants if you haven't name them properly .
Eg -: if you have just put 7 as the working Days of the week instead of putting a constant 'WORKING_DAYS_OF_THE_WEEK' ,when you want to change the working days you have to check all the 7 's in the code. You will be in trouble if the code contain so many 7's :(

- Class Names

 Classes and objects should have noun or noun phrase names like Customer, WikiPage,Account, and AddressParser.

- Method Names

  When you write a method make sure that you use verb or verb phrase like 'deletePage'

when you are writing names don't use much cute names that only you can get. may be some people get the what you meant but not all.Cuteness in code often appears in the form of colloquialisms or slang. Eg -: don’t use the name whack() to mean kill().

These are just a few things that you have to worry when putting a name. These are just Simple things that make your code much more readable and clean.
Hope you guys get the idea of how to put a good name :D

Be happy Always friends.

Saturday, October 20, 2012

What is Clean Code

Hi Friends,

These days I'm reading a book about clean code. so thought of sharing some new things I have learned. Thing I was wondering when reading was, Why do we write Bad codes????  What is Clean Code???

 WHY do we write bad code?? 

  • Can be because of the rush, deadline is so near and have to do to complete so many functionalists.
  •  Boss would be angry with you if you took the time to clean up your code.
  • Perhaps you were just tired of working on this program and wanted it to be over. 


Some times when we write codes we think of cleaning up the code later after we done writing the whole program or some times we plan to do it tomorrow or many be next week. like wise when we delay to clean the code , code get more messy and difficult to clean the mess. 

LeBlanc’s law: Later equals never.


What is clean Code???


what is clean code? this is the Big question I had when I was reading. Simply if You write a piece of code that should be easily understandable for others. code should be elegant and efficient. The logic should be straightforward to make it hard for bugs to hide.

  •  Contains no duplication;
  •  Expresses all the design ideas that are in the system
This is the 'Big' Dave Thomas's idea about the clean code,
" Clean code can be read, and enhanced by a developer other than its original author. It has unit and acceptance tests. It has meaningful names. It provides one way rather than many ways for doing one thing. It has minimal dependencies, which are explicitly defined, and provides a clear and minimal API. Code should be literate since depending on the  language, not all necessary information can be expressed clearly in code alone "
“Big” Dave Thomas, founder of OTI, godfather of the Eclipse strategy

After reading this post hope You guys get an idea of What is clean code.
Have Fun :)
  



Playful Kiss


Playful kiss Korean drama , this is one of my favorite Korean drama. A girl(Oh Ha Ni) who has a crush on a genies boy  (Baek Seung Jo). Every episode in this drama is really fun. All the crazy things the Oh ha ni doing, sometimes i feel really sorry about her. but she is really a cute character in the drama. Baek Seung Jo he is little rude in the start , he is a serious and genies character. The person i really Love in this drama is Baek Seung Jo's MOM she is the BEST mom ever. she helps Oh ha Ni to get his sons heart. MOM is 100% cool love her lodes she makes the whole story interesting.  Baek Seung Jo's little brother is really cute but he is also a serious character like his elder brother.



Cast
  • Kim Hyun Joong as Baek Seung Jo
  • Jung So Min as Oh Ha Ni
  • Jung Hye Young as Hwang Geum Hee (Seung Jo's mother)
  • Choi Won Hong as Baek Eun Jo (Seung Jo's brother)

Monday, October 8, 2012

Setting up a Moodle Site


Hi Friends,


I have learned how to setup the moodle and play around with it. It is really simple to install and use. Moodle is an Open source, Course Management System (CMS) also known as a Learning Management System (LMS). There are so many things you can do using moodle :)


Lets see how to install Moodle to the local machine.(in similar way you can setup it in a web server)

  •  First of all Go to the Moodle web site and download the required Moodle package.( Before downloading check the required PHP and Mysql versions)
  • If you are using xampp put the unzipped file(moodle) in to the htdocs.
  • Create a database as MoodleDB(can give any name ) and change the collation to UTF8_Unicode_ci
Now its almost done , now only few more steps to do to finish installing Moodle.

STEP 1
it's simple few steps more , just go to chrome and type 
http://localhost/moodle/ 
(Make sure the Apache is  running )

You will get this installation page , choose English and click next. click on next to all the other pages until u get in to the step 2

STEP 2

Give the database name as MoodleDB (one we created in the beginning), Give the username and password. leave the other fields as it is. and click on next.
Click on the continue button until u get into step 3

STEP 3


 Fill the necessary details and click on Update profile

STEP4



Give a name for the site and fill other details and click on Save changers.
Now we are done installing moodle to the local machine. You can play around with it and find new interesting features in it.

 hope you guys can install it using those steps easily Have fun friends.