Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 87 88 [89] 90 91

Author Topic: Programming Help Thread (For Dummies)  (Read 100398 times)

Levi

  • Bay Watcher
  • Is a fish.
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #1320 on: February 07, 2015, 12:57:05 am »

This may be a slight derail, but the code I posted earlier was found by one of my classmates who took it and handed it in after changing my name on it. He didn't know it was me despite my name on it and he had a big eye opener when he found out I was Highmax. My lifelong dream of someone going up to me and saying "Wait... YOU'RE Highmax!?" has come true... And all it took was posting my homework online. I'm tempted to post more incomplete code on here so if he finds it again, it won't work and he doesn't get to copy-paste it

Haha crazy.  I hope it turns out okay, I was once a TA and I remember keeping an eye on things like if two students assignments were similar.
Logged
Avid Gamer | Goldfish Enthusiast | Canadian | Professional Layabout

highmax28

  • Bay Watcher
  • I think this is what they call a tantrum spiral...
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #1321 on: February 07, 2015, 01:00:53 am »

This may be a slight derail, but the code I posted earlier was found by one of my classmates who took it and handed it in after changing my name on it. He didn't know it was me despite my name on it and he had a big eye opener when he found out I was Highmax. My lifelong dream of someone going up to me and saying "Wait... YOU'RE Highmax!?" has come true... And all it took was posting my homework online. I'm tempted to post more incomplete code on here so if he finds it again, it won't work and he doesn't get to copy-paste it

Haha crazy.  I hope it turns out okay, I was once a TA and I remember keeping an eye on things like if two students assignments were similar.
I'm tempted to have him as my partner since its supposed to be done in pairs, so he can search for the codes I need looked up on the textbook since he has the PDF version and I'll type it out. He seems VERY good at finding things
Logged
just shot him with a balistic arrow, i think he will get stuned from that >.>

"Guardian" and Sigfriend Of Necrothreat
Jee wilikers, I think Highmax is near invulnerable, must have been dunked in the river styx like achilles was.
Just make sure he wears a boot.

Sappho

  • Bay Watcher
  • AKA Aira; Legendary Female Gamer
    • View Profile
    • Aira Plays Games
Re: Programming Help Thread (For Dummies)
« Reply #1322 on: February 08, 2015, 05:08:53 pm »

Hello coders! I've wanted to get into programming for ages, tried many times and failed... I'm in Edinburgh for 3 months with not too much work to do, so I think I'm going to give it another try. I'm partly inspired by the current Humble Book Bundle, which is all educational/creative stuff and includes 3 books on programming ("for kids"): Ruby at base, Python at BTA, and Javascript at $15. I've gone for top tier because this looks like an approach to teaching coding that might actually work for me (and there's lots of other interesting books as well). So if anyone else is in a similar situation, consider picking that up. I'll look through the books tonight and tomorrow and let you all know how good the books are.

Angle

  • Bay Watcher
  • 39 Indigo Spear Questions the Poor
    • View Profile
    • Agora Forum Demo!
Re: Programming Help Thread (For Dummies)
« Reply #1323 on: February 08, 2015, 05:28:49 pm »

Hmm. I taught myself by simply reading free tutorials n the internet, so you probably don't need those. You can buy them if you want, and they might be worthwhile.
Logged

Agora: open-source platform to facilitate complicated discussions between large numbers of people. Now with test site!

The Temple of the Elements: Quirky Dungeon Crawler

MagmaMcFry

  • Bay Watcher
  • [EXISTS]
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #1324 on: February 08, 2015, 07:03:12 pm »

I'd recommend a book for you, because 1) they're usually full of general information, not just tutorial-specific information, and 2) because good online tutorials are actually quite hard to come by, since uploading shitty tutorials is free, unlike publishing shitty books. I also recommend avoiding code-in-your-browser tutorials especially, because they don't show you the most important thing for beginners: how to write and execute code out of your own computer files.
Logged

Angle

  • Bay Watcher
  • 39 Indigo Spear Questions the Poor
    • View Profile
    • Agora Forum Demo!
Re: Programming Help Thread (For Dummies)
« Reply #1325 on: February 08, 2015, 07:37:11 pm »

I guess. Honestly I've never really had much trouble with the quality of my tutorials. I guess it's cause I use google, which is pretty good about finding the most popular, and thus usually the best? I dunno.

Sappho: What kind of programming are you looking to do? If it's just general stuff, I've heard python is pretty good for learning.
Logged

Agora: open-source platform to facilitate complicated discussions between large numbers of people. Now with test site!

The Temple of the Elements: Quirky Dungeon Crawler

Sappho

  • Bay Watcher
  • AKA Aira; Legendary Female Gamer
    • View Profile
    • Aira Plays Games
Re: Programming Help Thread (For Dummies)
« Reply #1326 on: February 09, 2015, 03:34:19 am »

I've tried to learn to program since I was little. I started with BASIC, then QBASIC, then VisualBasic. I even took a class in that one in high school. I read all the tutorials I could get my hands on, and I could just... never get my head around it. It never clicked. I could understand how to make an if...then statement, and that was about the limit. Every now and then I've gone back and tried again, but I could never seem to understand something fundamental about how it works, and I don't know what I'm missing. I've even had people try to teach me, but in general, they got frustrated when I failed to understand some basic concept, or were unable to explain programming terms without referring to other programming terms. I did make some progress in learning Inform (the IF engine), but even then, once I had to start doing anything abstract, I got lost really fast.

I'll be using code for games, if I ever get that far. Skyrunner was actually being quite helpful a while back with teaching me some bits and pieces of the RPGMaker code system, but I still kept hitting that wall. I'm hoping the approach these books takes, since it's designed for kids who don't know anything about how programs work, will be more helpful to me. Certainly I'll pop in here for questions as well. I am starting with python, since I've been told many times how it's good for beginners and people who think in words but have trouble with numbers.

Arx

  • Bay Watcher
  • Iron within, iron without.
    • View Profile
    • Art!
Re: Programming Help Thread (For Dummies)
« Reply #1327 on: February 09, 2015, 12:49:24 pm »

The two things my dad (professional prgramming teacher) has been touting recently are How to Think Like a Computer Scientist (okay, he's been touting that for about a decade) and interactivepython.org, which is a pretty cool thing: it has a number of textbooks on Python, and then allows you to complete the exercises in your browser, with a Python interpreter and all.
Logged

I am on Discord as Arx#2415.
Hail to the mind of man! / Fire in the sky
I've been waiting for you / On this day we die.

Chaos Armor

  • Bay Watcher
  • Grand Master Lurker
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #1328 on: February 09, 2015, 06:46:43 pm »

The Java Au Naturel book isn't a terrible place to start. It's a bit outdated, but it offers good examples.

And, it's FREE!

http://www.cs.ccsu.edu/~jones/book.htm

Or

This video tutorial series:

https://www.thenewboston.com/videos.php?cat=31

Of course, that's if you are willing to learn Java.
Logged
Lurking since 2009

Leerooooooooy walk forward twice

highmax28

  • Bay Watcher
  • I think this is what they call a tantrum spiral...
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #1329 on: February 10, 2015, 04:24:36 pm »

Nothing appears when I run it in firefox. Everything seems to be right... Right?

Code: [Select]
<html>
<head>
<!--Name: Spencer Durette
File Name: rainBucketMonitor.html
Date Last Modified: 2/10/2015
-->
</head>
<body>
<script type="text/javascript">
//Declare variables
var rain

//Welcome the user and explain what this program does
document.write("This program is used to tell you if you have to change the bucket of rain or not.");

//Prompts the user for the amonut of rain in the bucket
rain = prompt("How much rain is in the bucket in liters?","0");
rain = parseInt(rain);

//If the rain is greater then 20, the user is reminded to go empty the bucket
if rain >=20;
document.write("Please go empty the bucket, it is almost full!")

//Display Results
document.write("Please come back in ten minutes to record your rain value again");
</script>
</body>
</html>

Yes, this code is literally my assignment, where I literally have to prompt the user for an amonut of rain, and if its greater then or equal to 20 liters, it tells you to go change the bucket. At the end of it, it tells you to come back in ten minutes to do this again. SO useless... But homework is homework
Logged
just shot him with a balistic arrow, i think he will get stuned from that >.>

"Guardian" and Sigfriend Of Necrothreat
Jee wilikers, I think Highmax is near invulnerable, must have been dunked in the river styx like achilles was.
Just make sure he wears a boot.

Mephisto

  • Bay Watcher
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #1330 on: February 10, 2015, 04:46:09 pm »

Nothing appears when I run it in firefox. Everything seems to be right... Right?

You might want to read up on if statements in JavaScript.

Not trying to be rude - I would rather provide the tools to find out what's wrong than the solution.
Logged

highmax28

  • Bay Watcher
  • I think this is what they call a tantrum spiral...
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #1331 on: February 10, 2015, 05:20:16 pm »

Nothing appears when I run it in firefox. Everything seems to be right... Right?

You might want to read up on if statements in JavaScript.

Not trying to be rude - I would rather provide the tools to find out what's wrong than the solution.
Figured it out. Thanks!
Logged
just shot him with a balistic arrow, i think he will get stuned from that >.>

"Guardian" and Sigfriend Of Necrothreat
Jee wilikers, I think Highmax is near invulnerable, must have been dunked in the river styx like achilles was.
Just make sure he wears a boot.

Angle

  • Bay Watcher
  • 39 Indigo Spear Questions the Poor
    • View Profile
    • Agora Forum Demo!
Re: Programming Help Thread (For Dummies)
« Reply #1332 on: February 13, 2015, 05:21:21 pm »

Does anyone know how to deploy a Websocket endpoint class written in java to Tomcat 8? I have the class written, I just need to figure out how to put it in the server and make it work.
Logged

Agora: open-source platform to facilitate complicated discussions between large numbers of people. Now with test site!

The Temple of the Elements: Quirky Dungeon Crawler

miauw62

  • Bay Watcher
  • Every time you get ahead / it's just another hit
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #1333 on: February 17, 2015, 05:23:53 am »

The two things my dad (professional prgramming teacher) has been touting recently are How to Think Like a Computer Scientist (okay, he's been touting that for about a decade) and interactivepython.org, which is a pretty cool thing: it has a number of textbooks on Python, and then allows you to complete the exercises in your browser, with a Python interpreter and all.
I will second interactivepython. It doesn't teach you how to use Python, it teaches you how to program. Most programming knowledge is portable between languages.

It's also how I learned to program, so I can confirm that it's pretty good.
Logged

Quote from: NW_Kohaku
they wouldn't be able to tell the difference between the raving confessions of a mass murdering cannibal from a recipe to bake a pie.
Knowing Belgium, everyone will vote for themselves out of mistrust for anyone else, and some kind of weird direct democracy coalition will need to be formed from 11 million or so individuals.

highmax28

  • Bay Watcher
  • I think this is what they call a tantrum spiral...
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #1334 on: February 24, 2015, 03:55:22 pm »

More homework troubles. I'm attempting a for loop and I'm pretty sure somethings wrong with that or my if statement, because it stops working after two or three repeats (its supposed to go off 5 times). Its supposed to get 5 values, add them to the total which gets divided at the very end by 5 for the average and the highest and lowest values are kept.

Code: [Select]
<html>
<head>
<!--Program name: Temperature Gatherer
Name: Spencer Durette
Date last modified: 02-24-2015
-->
</head>
<body>
<script type="text/javascript">
// This program is designed to use a loop to gather five temperatures in different rooms

//Declare Variables
var count;
var temperature;
var highest = 0;
var lowest = 0;
var total = 0;
var AVERAGE = total/5;
var BR = "<br />"

// Start the loop, ask for the temperature. Stop at 5 values
for (count = 0; count < 5; count++) {
temperature =prompt("Enter the temperature:","21");

temperature = parseInt(temperature);
total = total+temperature;

//If the temperature exceeds the highest, it will become the highest. Likewise with the lowest.
//If no value is decided on either, then the values are automatically take the first value.
if (temperature > highest){
highest = temperature;
}
else if (highest == 0){
highest = temperature;
}
else if (temperature < lower){
lowest = temperature;
}
else if (lowest == 0){
lowest = temperature;
}
}
// Display results
document.write("The highest temperature is: " + highest +BR)
document.write("The lowest temperature is: " + lowest + BR)
document.write("The average temperature is: " + average + BR)

// Thank the user for using the program
document.write("Thank you for using our program!")
</script>
</body>
</html>

90% certain that I'm declaring the for loop wrong or not ending it properly
Logged
just shot him with a balistic arrow, i think he will get stuned from that >.>

"Guardian" and Sigfriend Of Necrothreat
Jee wilikers, I think Highmax is near invulnerable, must have been dunked in the river styx like achilles was.
Just make sure he wears a boot.
Pages: 1 ... 87 88 [89] 90 91