Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

Which language to pick...?


ghost's Avatar
0 0

Hi. I want to know what programming language you think would be best to start off with for someone who's never programmed before.

I already know some HTML and Javascript, and don't really want to do anymore website stuff like PHP.

Which language would be the easiest for me to learn?

Any help is much appreciated :D


shadowls's Avatar
You Like this!
90 0

Well my opinion is that c++ is in a middle class level for learning, but if you pick c, you can accomplish a lot when you master it. I am not that good, i am just learning, but i am able to code simple stuff. later i will be able to do more. So i think you should try C.


ghost's Avatar
0 0

Great, thanks.


shadowls's Avatar
You Like this!
90 0

NO problem.


ghost's Avatar
0 0

Python is a very easy language to get into. Very nice way of writing code.

C++ is a bit more complicated to get into but it's not too bad. I had only basic python experience and I am currently learning C++. Not really that hard to get into.

I can't comment on any other languages besides those. I can't say a bad thing about either python or c++ either. Just pick a language you like and get really good at it.


ghost's Avatar
0 0

Right. I'll probably try C and Python, and see which one I like out of them.

Thanks for your suggestions :)


ghost's Avatar
0 0

DO ASSEMBLY!!1!!11@ONEONE

lol i'm just kidding… don't do assembly you will just conuje the hack out of your self….


ghost's Avatar
0 0

alka wrote: DO ASSEMBLY!!1!!11@ONEONE

lol i'm just kidding… don't do assembly you will just conuje the hack out of your self….

hehe :right:


shadowls's Avatar
You Like this!
90 0

Surgeonz wrote: [quote]alka wrote: DO ASSEMBLY!!1!!11@ONEONE

lol i'm just kidding… don't do assembly you will just conuje the hack out of your self….

hehe :right:[/quote]

There is a michael in the house!!!


yours31f's Avatar
Retired
10 0

I like C++ you can be secretive with certain codes.:ninja:


ghost's Avatar
0 0

umm…if your a new programmer and your comparing C language to python….then just pick python cause C is definately gonna be more difficult for you…once you master C its great and alll but i recommend python or Perl for you as a begginner so you don't get bored midway through b/c of the difficulty and yet the fact you can't code anything too interesting in it without having a fair knowledge of it, Both Perl and Python are very simple you can learn them quite fast and will never be bored. C languages take a bit more dedication. Anyways…just my opinion..-peace


fuser's Avatar
Member
0 -1

for beginners, the best is usually python or ruby or java.

i prefer python as it's easy and fast, ruby is easier as it's syntax is almost english but it's slower.

for more serious programming, C++ is good.


shadowls's Avatar
You Like this!
90 0

another language that is easy to pick up is perl. It has few concept to learn and one understand it will be easy.


clone4's Avatar
Perl-6 Wisdom Seeker
0 0

perl is great to stary with, simple, easy, but despite that very very useful… it will help you a lot later, to undestand other languages


ghost's Avatar
0 0

Ok thanks for all your suggestions.

In the end I went for Python, and I just coded my first thing lol. It's not very interesting, just a "Guess the number" game. And it's always the same number… o.O

guess=0
while guess!=number:
    if guess==0:
        guess=input("Guess a number ")
    elif guess<number:
        guess=input("Higher! ")
    elif guess>number:
        guess=input("Lower! ")
print"Well done!"```

:D

ghost's Avatar
0 0

Is there a way of generating a random number, say between 1 and 100?

So in the above code I could have markupnumber=[random number between 1 and 100]


ghost's Avatar
0 0

I couldn't see anyone talking about VB "Visual Basic" which was build over Basic , I believe it is the simplest to learn and the learning curve is much higher than any other language , it is very robust and not that bad when speed matters. nothing can compete with C++ when it comes to speed , but hey speed is not always number one priority. VB reverses the process of programming, you start by building the user interface first then start the coding . in any other language you deal with coding first then worry about the user interface. one bad thing I could say, since it is coming from MicroTheft , the security is some what a problem .


webspider's Avatar
Member
0 0

@Surgeonz: Add as first line of your code markupimport random. Use then in the line which generates the number markupnumber = randrange(1, 100)


ghost's Avatar
0 0

Thank you :D


webspider's Avatar
Member
0 0

@MrDoom119: I have to agree with you there: Visual Basic is really easy to learn. Creating a nice GUI and being a RAD language (create a prank in 10 minutes with C++!) are the best things of it. But it runs only on windows properly (with properly I mean proper speed, so no WINE) , it teaches you bad programming habits and it's not optimal for everything. So I started Python and C++ and love them even more than VB.


ghost's Avatar
0 0

Hmm ok. Maybe I'll try VB next…

And there's one problem: that code that you gave me; I think I might have entered it wrong. When I run it on the Python Shell, it just resets the shell and nothing happens. My code is:

number = randrange(1, 100)
guess=0
while guess!=number:
    if guess==0:
        guess=input("Guess a number ")
    elif guess<number:
        guess=input("Higher! ")
    elif guess>number:
        guess=input("Lower! ")
print"Well done!"```

webspider's Avatar
Member
0 0

Oh shit, I forgot that you need to set the seed, too. Just markupseed() before the line with the number. If there's still an error, use random.randint(1, 100) or randint(1, 100) at the line where the parser creates the number.


ghost's Avatar
0 0

Now I get > NameError: name 'seed' is not defined

My code is now:

seed()
number = randrange(1, 100)
guess=0
while guess!=number:
    if guess==0:
        guess=input("Guess a number ")
    elif guess<number:
        guess=input("Higher! ")
    elif guess>number:
        guess=input("Lower! ")
print"Well done!"


ghost's Avatar
0 0

OK I got it, thank you.


webspider's Avatar
Member
0 0

No problem! Glad to see one python coder more here.


ghost's Avatar
0 0

Surgeonz wrote: Hi. I want to know what programming language you think would be best to start off with for someone who's never programmed before.

I already know some HTML and JavaScript, and don't really want to do anymore website stuff like PHP.

Which language would be the easiest for me to learn?

Any help is much appreciated :D

No one can really tell you what is actually best. If you want easy, you could always go for Visual Basic, but that isn't necessarily going to be what is best.

The first thing is to look at what you want to do. Where do you eventually want to end up?? Specifics. C and Python are very popular for a bunch of stuff, but what would your "dream" be?

Just read how the languages are different, or study generic high level language syntax/logic (apparently people have a hard time understanding the concept of loops and subroutines). Compare things like portability and size, and limitations (like security). If cost is an issue, post back and I'll find a free/legit version of what you want.


ghost's Avatar
0 0

I've done very similar game in C++

if you want to start poking around with c++, pm me about source code for it…


ghost's Avatar
0 0

Right ok :) Thanks


ghost's Avatar
0 0

Surgeonz: Nice code. I've seen a few people do this game, with verying degrees of 'sucess'. Your's is a good design.

Just one helpful tip: You should always use raw_input() to get info from the user. Using input() actually treats what you enter as something to be evaluated. For example, I can hack your game by entering the word number at the prompt.

Guess a number number
Well done!

It might seem unimportant, but if you're writing a password prompt it matters. Here's how I interpreted your code. Use find and replace to switch [tb] with four spaces.

import random
random.seed()
while True:
[tb]number = random.randrange(1, 100)
[tb]guess=0
[tb]while guess!=number:
[tb][tb]if guess==0:
[tb][tb][tb]guess=input("Guess a number ")
[tb][tb]elif guess<number:
[tb][tb][tb]guess=input("Higher! ")
[tb][tb]elif guess>number:
[tb][tb][tb]guess=input("Lower! ")
[tb]print"Well done!"