Author Topic: Programming Megathread  (Read 106432 times)

Scratch
It's so easy.
It isn't actually - there's no Print block :-D
And Malbolge.
It's impossible.
« Last Edit: December 31, 2015, 02:16:17 PM by lolguy1553 »

It isn't actually - there's no Print block :-D
there's no console to print to, why would there be? and why would that make it easier...

I don't know if this is uncharted territory, but does anyone here know what BASIC is?
Just wondering.
I've used a flavor of it. Also I'm sure a lot of people here know of it because it's not a terribly old language. It's not terribly new either but you get the point.


I'm guessing most Java programmers here are using Eclipse? Because if anyone is using BlueJ I'd really like to send someone the game I'm working on for school in the future. I could probably figure out how to get a working .jar file of it but it'd be less work for everyone I guess if someone runs it off the compiler.

I'm pretty excited about it so far because it's a text-based RPG, and most of the stuff that I thought would be hard to program (i.e., turn-based combat) is a lot simpler than I thought. I'm probably going to need some help tidying it up though.

I'm guessing most Java programmers here are using Eclipse? Because if anyone is using BlueJ I'd really like to send someone the game I'm working on for school in the future. I could probably figure out how to get a working .jar file of it but it'd be less work for everyone I guess if someone runs it off the compiler.

I'm pretty excited about it so far because it's a text-based RPG, and most of the stuff that I thought would be hard to program (i.e., turn-based combat) is a lot simpler than I thought. I'm probably going to need some help tidying it up though.
I personally use Eclipse

I personally use Eclipse

Yeah, Eclipse is definitely better, but as someone who has used both, BlueJ is pretty good if Java is your first language. It's kind of like training wheels, I guess.

Now I'd feel more comfortable in Eclipse, but I have to use BlueJ for this class. It's not until after the intro course the java classes at my school we use it since it wouldn't make sense to learn how to use another compiler in the middle of a big project.


NetBeans is good
I was thinking of trying out NetBeans sometime in the future
Isnt it an IDE for Web Dev.?

I was thinking of trying out NetBeans sometime in the future
Isnt it an IDE for Web Dev.?

nah, it has java, c++ and c stuff

Anyone here extremely experience with Javascript?
If so, I got a question for you that Ive had since I started learning the language.
You know how to create an object using a constructor is
Code: [Select]
var object = new Object();?
I was wondering if its possible to add arguments into the parenthesis of the object constructor. Thanks!
that just creates an "Object" object
Object is the class from which more specialized types inherit. I think pretty much all languages with object-oriented features have something like this. for example, Python's object or Java's java.lang.Object. and usually in these cases you don't have to explicitly say that the class inherits from that class, it's just assumed
these root classes define some methods and maybe properties that all classes should have, but there's not often a reason to use them yourself. you might never have any reason to type what you have in that code block there

and to answer your actual question, it can take arguments

> var o = new Object();
> o
Object {}

> var o = new Object(12);
> o
Number {[[PrimitiveValue]]: 12}

> var o = new Object(true);
> o
Boolean {[[PrimitiveValue]]: true}


but under normal circumstances you'd be better off just using primitives


And Malbolge.
It's impossible.
someone actually made 99 bottles of beer on the wall in malbolge
that's no easy feat

Ah good this is still alive. I have a question regarding python.

a = input("Enter tax rate ")
b = input("Enter amount paid ")
c = input("Enter how many times paid ")
d = a*b
print(d)

I write this but when it goes to multiply it just says
Quote
Traceback (most recent call last):
  File "<pyshell#5>", line 1, in <module>
    d = a*b
TypeError: can't multiply sequence by non-int of type 'str'
any idea how to fix this?

Ah good this is still alive. I have a question regarding python.

a = input("Enter tax rate ")
b = input("Enter amount paid ")
c = input("Enter how many times paid ")
d = a*b
print(d)

I write this but when it goes to multiply it just says  any idea how to fix this?
Try

a = input("Enter tax rate ")
b = input("Enter amount paid ")
c = input("Enter how many times paid ")

a = int(a)
b = int(b)
c = int(c)

d = a*b
print(d)

(Disclaimer: I don't know python, I just did a quick search on how to typecast in it)