Labels

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.