1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Which language uses LEAST lines of code?

Discussion in 'Programming' started by tim987, Feb 8, 2009.

  1. #1
    If I wanted to create a basic blog script where i login to post daily news and users can comment, which Programming language should I use to code my blog script that will take use the LEAST lines of code?
    And how many lines of code approximately could my blog script use with that language?
     
    tim987, Feb 8, 2009 IP
  2. Christopher

    Christopher Peon

    Messages:
    482
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Just so we can understand the basis of your question, and help you, what is the reason you are looking for something with the least lines of code? Will you be coding this yourself and want it easy, or have very lmited space (which would really limit the usefulness of a blog and comments if it were that terribly small...). Just trying to get a good understanding here.

    I mean, there are lots of reasons to use different types of programming, but fewer lines isn't usually one of them.
     
    Christopher, Feb 8, 2009 IP
  3. tim987

    tim987 Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    yeah i want the least lines of code so it saves me time coz i work 8 hours a day and ill be coding in the limited personal time i have.

     
    tim987, Feb 8, 2009 IP
  4. wmfire

    wmfire Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Why write code by yourself while there are lots of scripts you can use for free?
     
    wmfire, Feb 8, 2009 IP
  5. Christopher

    Christopher Peon

    Messages:
    482
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #5
    How many lines of code don't usually equate to how fast you can write it... and especially doesn't equate to how long it takes to learn it :)

    php was the easiest to learn for me, and it's very flexible, scaleable, and works on many servers. You need to check with your host on that though. Many people like asp, and others. PHP and ASP are considered scripting languages, which are easier to learn that real program coding.

    With limited time though, you might look into getting something off the shelf. There are tons of ready made blogging programs, many are free, or even a blogging service where you can just sign up and start blogging away. Someone was just telling me about squarespace.com, they really liked it, I don't know much about it though, never used it myself.

    Still want a short language... check into Ruby. I don't use it myself, since I already know php, but I've been told it's terse and easy to learn.

    Good luck :)
     
    Christopher, Feb 8, 2009 IP
  6. mmerlinn

    mmerlinn Prominent Member

    Messages:
    3,197
    Likes Received:
    818
    Best Answers:
    7
    Trophy Points:
    320
    #6
    Typically the shorter the code, the more complex the commands. Complex commands typically take more debugging time because more things can go wrong.

    What I have found is that less complex commands (longer code) typically make programming faster overall. Note that this is not true in all cases nor for all programmers.
     
    mmerlinn, Feb 8, 2009 IP
  7. Ancient Dragon

    Ancient Dragon Peon

    Messages:
    192
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #7
    It also depends on your definition of "lines of code". For example, the C language hello world program could be written like this:
    
    #include <stdio.h>
    int main()
    {
        printf("Hello World\n");
    }
    
    Code (markup):
    or written like this:
    
    #include <stdio.h>
    int main() { printf("Hello World\n"); }
    
    Code (markup):
    The first program has 5 lines of code while the second program has only 2 lines -- and both programs do exactly the same thing.
     
    Ancient Dragon, Feb 8, 2009 IP