Open Side Menu Go to the Top
Register
edx: Free education available edx: Free education available

10-12-2012 , 05:57 PM
Just finished Week 2's problem set for the 6.00x course. Pretty interesting. Took me a lot longer than expected based on the initial description.
edx: Free education available Quote
10-12-2012 , 07:39 PM
The SaaS HW1 is proving to be a pretty big challenge. I'm trying to write all of the programs in Java first since that's my most comfortable language, and then convert to Ruby based on a lot of research online. But yarrrrr it is not going smoothly so far.
edx: Free education available Quote
10-13-2012 , 03:41 AM
Quote:
Originally Posted by soccerargentina10
dave are you taking the PGM class? doing it with octave? what are your thoughts on it?
I tried the PGM class out during the first heat, but I didn't finish. Word is that PGM is one of the few courses not dumbed down.

I plan to do the course again, but I have way too much on my plate right now to bother. Yes, I will do it in Octave. The reasoning why is because I don't have a good understanding of the math involved, and I'd rather not fight Python to figure it out.

Quote:
Originally Posted by Shoe Lace
Just finished Week 2's problem set for the 6.00x course. Pretty interesting. Took me a lot longer than expected based on the initial description.
You are a real tease... What was the question, so we can all LOL at you for thinking its hard?

Quote:
Originally Posted by Go_Blue
The SaaS HW1 is proving to be a pretty big challenge. I'm trying to write all of the programs in Java first since that's my most comfortable language, and then convert to Ruby based on a lot of research online. But yarrrrr it is not going smoothly so far.
I could be wrong here, but I would NOT touch that class right now. The reasoning is that you aren't buying into just a language, but an entire culture surrounding this and similar languages, which is violently anti-corporate (JAVA), and at least my own impression is that programming in JAVA is much slower than RoR.

The fact is that you are going to be doing every single homework assignment twice + try to learn a somewhat difficult language while you are facing a continuously steeper learning curve.

I'm not trying to be offensive to you, but you have little chance of completing this class. I'm only passing a lesson to you that I wasted too many hours learning: wait until you are actually ready, and learning Ruby would be a pretty good first step. If the teachers in the FAQ say you should only be spending 5 hours on a programming assignment, and you are spending 20 to 30, you probably aren't ready. Aside from learning Ruby, I would also suggest learning some systems design for controlling complexity, but I hope someone else can weigh in here.
edx: Free education available Quote
10-13-2012 , 09:14 AM
It was a 3 part problem and each part is graded separately. It was based on recursion and bisection searching.

Part 1 was to calculate a credit card balance after a year if a person only pays the minimum monthly payment. Assume you have a known balance, annualInterestRate and monthlyPaymentRate variables setup for you (the edx platform will run your code with a bunch of random values for those variables and your code has to pass). Both the annual and monthly rates are percents.

You had to output the minimum monthly payment and remaining balance for each month and then at the end get the total paid and remaining balance.

Part 2 is a program that calculates the minimum fixed monthly payment needed to pay off a credit card balance in a year. The fixed number can't change. The variables balance and annualInterestRate will be filled with random values for the test cases.

The program should output only 1 thing and that's the lowest payment. You should start with 10 as a fixed payment and increment the payments by 10 until it meets the requirements.

Part 3 is the same as part 2 except you need to use bisection searching to solve the problem. For part 3 they provide you with a little bit of help too.

The low guess is the balance / 12.
The high guess is the (balance * (1 + monthlyInterestRate)^12) / 12.
The monthlyInterestRate is just the annualInterestRate divided by 12.

The solution needs to be accurate down to 1 cent.

The problem set is due on the 15th so you might want to PM me your solution dave if you decide to take a crack at it until 16th to honor their honor code, then on the 16th we can post our solutions here. It's in Python 2.7 and you can't use anything except definitions, while loops, for loops and if statements but you can set your own variables of int, float or string type. That is the stuff they've covered so far.
edx: Free education available Quote
10-13-2012 , 10:01 AM
Quote:
Originally Posted by daveT
I tried the PGM class out during the first heat, but I didn't finish. Word is that PGM is one of the few courses not dumbed down.

I plan to do the course again, but I have way too much on my plate right now to bother. Yes, I will do it in Octave. The reasoning why is because I don't have a good understanding of the math involved, and I'd rather not fight Python to figure it out.



You are a real tease... What was the question, so we can all LOL at you for thinking its hard?



I could be wrong here, but I would NOT touch that class right now. The reasoning is that you aren't buying into just a language, but an entire culture surrounding this and similar languages, which is violently anti-corporate (JAVA), and at least my own impression is that programming in JAVA is much slower than RoR.

The fact is that you are going to be doing every single homework assignment twice + try to learn a somewhat difficult language while you are facing a continuously steeper learning curve.

I'm not trying to be offensive to you, but you have little chance of completing this class. I'm only passing a lesson to you that I wasted too many hours learning: wait until you are actually ready, and learning Ruby would be a pretty good first step. If the teachers in the FAQ say you should only be spending 5 hours on a programming assignment, and you are spending 20 to 30, you probably aren't ready. Aside from learning Ruby, I would also suggest learning some systems design for controlling complexity, but I hope someone else can weigh in here.
Yeah, I actually agree now that you put it that way. I finished that SaaS class with what was actually a really high grade by sort of forcing the material down my throat, but feel like I would've taken a lot more from it if I had more "maturity," i.e. prior experience with web development, databases, and possibly networking. Then the things "tie together." If you're having a hard time with the first assignment, you should drop it. Even if you manage to get a high grade, you simply won't get as much out of it as you should, and will constantly be in "WTF is this ****" mode, which in the future I would like to avoid when possible.

Last edited by alex23; 10-13-2012 at 10:11 AM.
edx: Free education available Quote
10-13-2012 , 04:28 PM
Quote:

I could be wrong here, but I would NOT touch that class right now. The reasoning is that you aren't buying into just a language, but an entire culture surrounding this and similar languages, which is violently anti-corporate (JAVA), and at least my own impression is that programming in JAVA is much slower than RoR.

The fact is that you are going to be doing every single homework assignment twice + try to learn a somewhat difficult language while you are facing a continuously steeper learning curve.

I'm not trying to be offensive to you, but you have little chance of completing this class. I'm only passing a lesson to you that I wasted too many hours learning: wait until you are actually ready, and learning Ruby would be a pretty good first step. If the teachers in the FAQ say you should only be spending 5 hours on a programming assignment, and you are spending 20 to 30, you probably aren't ready. Aside from learning Ruby, I would also suggest learning some systems design for controlling complexity, but I hope someone else can weigh in here.
Thanks for the post. I think you are right that I need to get more solid fundamentals before taking a class like this. For example, I don't have a lot of experience with data structures other than with arrays, so when they brought up hash tables I had to do a lot of research on them. Next quarter (at school) I am taking a class on data structures which should prepare me well for this type of class. I really like my class on machine programming (solving bitwise operator puzzles and understanding assembler code, etc), so I think I may re-focus my energy on learning C.

As a FYI, this is the program where I ran into a wall: I spent a few hours writing it in Java which was a fun, but I don't know how to do it in Ruby. Maybe you guys will get a kick out of trying to write it--I'm sure it's pretty basic for some of you:

Quote:

HW 1-3: ANAGRAMS

An anagram is a word obtained by rearranging the letters of another word. For example, "rats", "tars", and "star" are anagrams of one another, as are "dictionary" and "indicatory". We will call any array of single-word anagrams an anagram group. For instance, ["rats", "tars", "star"] is an anagram group, as is["dictionary"].

Write a method combine_anagrams(words) that, given an array of strings words, groups the input words into anagram groups. Case doesn't matter in classifying strings as anagrams (but case should be preserved in the output), and the order of the anagrams in the groups doesn't matter. The output should be an array of anagram groups (i.e. an array of arrays).

Code skeleton:

def combine_anagrams(words)
# your code here
end
Example test case:

# input: ['cars', 'for', 'potatoes', 'racs', 'four','scar', 'creams', 'scream']
# output: [ ["cars", "racs", "scar"],
# ["four"],
# ["for"],
# ["potatoes"],
# ["creams", "scream"] ]
edx: Free education available Quote
10-13-2012 , 04:49 PM
That looks like a loop specific problem. In the 6.00x class, the textbook went over a palindrome example but we didn't get to arrays yet. This was part of week 2. Your problem set seems a bit more complex but it's basically the same concept.

It's a divide and conquer problem based around a loop although in the palindrome example it was recursion. Just break the problem down into very small manageable mini-problems. Solve those and then put those solutions together to solve your real problem.
edx: Free education available Quote
10-13-2012 , 06:00 PM
Quote:
Originally Posted by Shoe Lace
That looks like a loop specific problem. In the 6.00x class, the textbook went over a palindrome example but we didn't get to arrays yet. This was part of week 2. Your problem set seems a bit more complex but it's basically the same concept.

It's a divide and conquer problem based around a loop although in the palindrome example it was recursion. Just break the problem down into very small manageable mini-problems. Solve those and then put those solutions together to solve your real problem.
There was a palindrome problem in the HW for this class which I first wrote in java. Below is how I wrote it in java. I didn't try to convert it to ruby yet. Anyway, I suppose I'm derailing this thread with my own coding stuff, so I'll move on.

Code:
import java.util.*; 
public class Palindrome {

	public static void main(String[] args) {
		Scanner input = new Scanner (System.in); 
		
		String s; 
		
		
		
		System.out.println ("Enter a word");
		s = input.next(); 
	
		Palindrome.yourPalindrome(s); 
		
	}

	public static void yourPalindrome(String YourString) {
		int i; 
		int j;
		int count =0; 
	
		for (i=0, j = YourString.length()-1; i<YourString.length(); i++, j--) {
			  if (YourString.charAt(i)!=YourString.charAt(j)){
				  System.out.print ("This is not a palindrome") ;
				  break;
			  }
			  if (YourString.charAt(i)==YourString.charAt(j)) {
				  count++; 
				  
			  }
			  if (count == YourString.length())
			  System.out.print ("This is a plaindrome");
			
		}
		
		 
		
	}
		
	}
edx: Free education available Quote
10-13-2012 , 06:06 PM
What is giving you trouble on the anagram problem?
edx: Free education available Quote
10-13-2012 , 06:09 PM
Taking input into an array and then sorting that array into different arrays.

Edit- Because they are entering multiple strings, it seems that first you'd have them enter those strings into one array, and then you'd divide that array into multiple arrays each containing common anagrams.
edx: Free education available Quote
10-13-2012 , 06:20 PM
I don't know ruby but from the example you posted it looks like the initial word list is an array already. Are they expecting input from a prompt that you need to convert to an array or can you just put an array of words defined somewhere?

If you need to make an array from strings which came in as input from the user you can just append them. I don't know the syntax for Ruby but appending to an array is something that most languages support. Usually it's a push method.
edx: Free education available Quote
10-13-2012 , 07:00 PM
Quote:
Originally Posted by Shoe Lace
It was a 3 part problem and each part is graded separately. It was based on recursion and bisection searching.

Part 1 was to calculate a credit card balance after a year if a person only pays the minimum monthly payment. Assume you have a known balance, annualInterestRate and monthlyPaymentRate variables setup for you (the edx platform will run your code with a bunch of random values for those variables and your code has to pass). Both the annual and monthly rates are percents.

You had to output the minimum monthly payment and remaining balance for each month and then at the end get the total paid and remaining balance.

Part 2 is a program that calculates the minimum fixed monthly payment needed to pay off a credit card balance in a year. The fixed number can't change. The variables balance and annualInterestRate will be filled with random values for the test cases.

The program should output only 1 thing and that's the lowest payment. You should start with 10 as a fixed payment and increment the payments by 10 until it meets the requirements.

Part 3 is the same as part 2 except you need to use bisection searching to solve the problem. For part 3 they provide you with a little bit of help too.

The low guess is the balance / 12.
The high guess is the (balance * (1 + monthlyInterestRate)^12) / 12.
The monthlyInterestRate is just the annualInterestRate divided by 12.

The solution needs to be accurate down to 1 cent.

The problem set is due on the 15th so you might want to PM me your solution dave if you decide to take a crack at it until 16th to honor their honor code, then on the 16th we can post our solutions here. It's in Python 2.7 and you can't use anything except definitions, while loops, for loops and if statements but you can set your own variables of int, float or string type. That is the stuff they've covered so far.
Oh. They are using the same things they were using in the hw back one year ago. I'll go look it up the problem set and post an answer on the 16th. If I had known they didn't change anything, I would have signed up for it just to do the hw and get the cert.

Nice thing is that you'll end up doing something similar to what Go_Blue is doing by creating a naive AI scrabble game. That was a real fun program to work on.
edx: Free education available Quote
10-13-2012 , 07:04 PM
It might not be too late to sign up. The first week didn't have a real problem set, it was just setting up IDLE (the python IDE/build they want you to use). There are also "finger exercises" sprinkled about between the lectures but if you know the material already you should be able to do them without listening to the lectures.
edx: Free education available Quote
10-13-2012 , 09:51 PM
Quote:
Originally Posted by Shoe Lace
It might not be too late to sign up. The first week didn't have a real problem set, it was just setting up IDLE (the python IDE/build they want you to use). There are also "finger exercises" sprinkled about between the lectures but if you know the material already you should be able to do them without listening to the lectures.
Fine. Not too difficult so far. What I like is how they force you to generalize your work so it works in all cases. This is one thing that coursera didn't do a good job of checking. They always said to generalize, but the grade would be perfectly valid if you specified the answer to the particular question.
edx: Free education available Quote
10-14-2012 , 06:29 AM
Has anyone done the project for the AI class? It's due today and I was at a conference untill late yesterday...dunno if I should start or not. Would need to be done by the time football kicks off since I plan on watching 7h of Redzone :P
edx: Free education available Quote
10-14-2012 , 07:03 AM
Quote:
Originally Posted by Go_Blue
Thanks for the post. I think you are right that I need to get more solid fundamentals before taking a class like this. For example, I don't have a lot of experience with data structures other than with arrays, so when they brought up hash tables I had to do a lot of research on them. Next quarter (at school) I am taking a class on data structures which should prepare me well for this type of class. I really like my class on machine programming (solving bitwise operator puzzles and understanding assembler code, etc), so I think I may re-focus my energy on learning C.

As a FYI, this is the program where I ran into a wall: I spent a few hours writing it in Java which was a fun, but I don't know how to do it in Ruby. Maybe you guys will get a kick out of trying to write it--I'm sure it's pretty basic for some of you:
Can't you make a hash table where each string maps to the sorted string? If not that, I think you do something along those lines.
edx: Free education available Quote
10-14-2012 , 08:43 AM
Also if anyone is doing AI...do not underestimate the CSP homework which is due today...first part with the multiple subparts is pretty tricky/you'll need a bunch of paper. I missed small things that cost me time quite a bit.
edx: Free education available Quote
10-14-2012 , 09:15 AM
Quote:
Originally Posted by daveT
Fine. Not too difficult so far. What I like is how they force you to generalize your work so it works in all cases. This is one thing that coursera didn't do a good job of checking. They always said to generalize, but the grade would be perfectly valid if you specified the answer to the particular question.
Yeah. Actually I'm happy they do this for other reasons. I had a submission pass 2 tests out of the 10 or 15. After fixing my mistake I was surprised it managed to pass 2 tests, it was sheer luck.
edx: Free education available Quote
10-14-2012 , 12:22 PM
Quote:
Originally Posted by clowntable
Also if anyone is doing AI...do not underestimate the CSP homework which is due today...first part with the multiple subparts is pretty tricky/you'll need a bunch of paper. I missed small things that cost me time quite a bit.
I managed to get through without pen and paper, but it was somewhat complicated and did push back my starting the project. Actually, I have one missing answer, progress meter reads about 95%, and that'll have to do. I'm hoping to get through enough of the project today to stay in range for the 80% certificate.
edx: Free education available Quote
10-14-2012 , 06:31 PM
Quote:
Originally Posted by Shoe Lace
Yeah. Actually I'm happy they do this for other reasons. I had a submission pass 2 tests out of the 10 or 15. After fixing my mistake I was surprised it managed to pass 2 tests, it was sheer luck.
Not happy because I can't submit the homework right now due the HTTP overload.

MIT doesn't scale.
edx: Free education available Quote
10-14-2012 , 06:37 PM
I guess a lot of people are trying to tackle the assignments on the weekend. I'm 99% sure you have until tomorrow at 10pm EST to complete them, it's documented in one of the intro PDFs they give you.
edx: Free education available Quote
10-14-2012 , 06:46 PM
They have a section that says if there is a massive error, then send an email with the code, screen shot of the error, and screen shot of a correct-answer output. I'll try to submit it again later tonight or follow whatever email instructions they send back.

Eh. HW1? Not worried yet.

How sloppy was your bisection solution?

edit: mine looks like a python ran over by a bus.
edx: Free education available Quote
10-14-2012 , 06:49 PM
I'll PM it to you since you've been through the course already.

Edit:
Sent.

I also converted both parts of the problem set to a self contained html/javascript version today for fun. Added some minor features as well. I'll post a link to it here on the 16th.

Let me see yours (wow, that sounds dirty).

Last edited by Shoe Lace; 10-14-2012 at 06:57 PM.
edx: Free education available Quote
10-14-2012 , 07:04 PM
I sent mine, and yeah, sending code to a stranger is as dirty feeling as it sounds. lol
edx: Free education available Quote
10-15-2012 , 08:43 PM
So the CS50x course started today. Watched the first 2 lectures and am in the middle of answering the optional questions.

I'm !ultra! impressed so far. I never really tried too hard to understand binary to decimal conversions before but their method just clicked instantly. The lead guy is amazing at explaining things in a way that agrees with how I think too.

I'm seriously really looking forward to this and doing CS50x alongside 6.00x certainly won't be a mistake. There's likely going to be some overlap but I think a lot of what's covered in both will help you understand the material in both even better.
edx: Free education available Quote

      
m