mtn
MegaDork
9/26/10 6:41 p.m.
berkeleying java. Stupid berkeleying class that I have to take as it is required by my major. I hate this. Beyond that, its a weed-out class for the computer science majors. Us math majors hate it. I don't understand any of this. Been in the damn lab for three hours and am no closer to finishing the project.
/Rant.
Time to go home, eat, go to church, and come back and raise my blood pressure levels again.
Taiden
UltraDork
9/26/10 6:46 p.m.
I just sat down and wrote a python script to handle parsed RSS from the UFP module and then send it to my cell phone via email (over some random SMTP server).
It berkeleying sucked but now I get 'push' notifications for specific search queries within 15 minutes of them ending up on craigslist, which is pretty, well... shall we say: "tight"
But yeah, I hate programming too.
mtn
MegaDork
9/26/10 7:02 p.m.
Taiden wrote:
I just sat down and wrote a python script to handle parsed RSS from the UFP module and then send it to my cell phone via email (over some random SMTP server).
I understood "RSS" in that.
class CryBaby {
private String name;
public CryBaby (String baby) { this.name = baby; }
public String getName() { return this.name; }
}
class Whiner
extends CryBaby {
public Whiner(String name) { super(name); }
public String toString() { return getName() + " says WHHAAAAAAAAAA!!!"; }
public static int main(String[] args) {
CryBaby cb = new Whiner("mtn");
System.out.println(cb);
}
}
Taiden
UltraDork
9/26/10 7:32 p.m.
haha sorry my buddy is a software engineer so I feel like in order to get my point across I have to use as many acronyms as possible, then when I go talk to other people about what i'm doing it makes me look like a royal prick.
I really have no idea what I'm doing when it comes to programming, but I have managed to make things happen when I need to (almost never)
stroker
UltraDork
9/26/10 8:40 p.m.
My computer science major in 1977 lasted exactly three weeks for pretty much the same reason.
Luke
UberDork
9/26/10 10:37 p.m.
I had to take a required programming unit, once. In C++. Sucky as it was, it's always strangely satisfying when you finally do get a piece of code to work.
mtn
MegaDork
9/26/10 10:51 p.m.
Luke wrote:
I had to take a required programming unit, once. In C++. Sucky as it was, it's always strangely satisfying when you finally do get a piece of code to work.
I agree. But it is really upsetting when I pay attention, read the book, and then take 5 hours and not figure out what I'm supposed to do. And I see the computer science majors get it immediately. Its so easy too, I can say clearly what I want it to do. I write it out in pseudocode, and then try to code it. Doesn't work. And the debuggers who are supposed to be around to help us are no help, they're all talking way too advanced for me.
Errr, you're supposed to learn how to debug code properly yourself (one of my bugbears is that a lot of CS majors I interview can't debug to save their lives, so you're not alone ).
Some of us know their way around a programming language or five and I'm sure we'd be happy to answer a specific question or two...
mtn
MegaDork
9/26/10 11:30 p.m.
Well, its in java, from something called Robots by Becker. This is the guys website: http://www.learningwithrobots.com/
The robots are in a grid, and they can move, turn, pick things up, put things down, etc. There are also walls that they must go around or stop at. If they don't, they break.
The problem that I am having is the following:
A robot needs to "shovel snow" out of driveways. I have to write it as if I don't know how many driveways there are, or how wide or long they are.
Go to this link for a picture of what I'm trying to do: https://docs.google.com/drawings/edit?id=1r_wkeWlDpk5-TPSdvXfJjx3Wl6Na34TG8jbfcOxoY7Y&hl=en&authkey=CIWl0qEE&pli=1
I can get bits of it. I know how to make it clean up a single driveway, and find the first driveway, but I can't get it to go to the next one after that.
Any idea's? This is kinda a long shot probably...
mtn
MegaDork
9/26/10 11:33 p.m.
BoxheadTim wrote:
Errr, you're supposed to learn how to debug code properly yourself (one of my bugbears is that a lot of CS majors I interview can't debug to save their lives, so you're not alone
I can barely understand whats going on with the whole thing. It really makes my blood pressure rise thinking about it: Its a requirement for Math majors, but the teacher doesn't have any leniency with us. She teaches it to weed out the CS majors, but the ones hurting the most are Math guys.
Find some outside help. Go make friends with the guys getting it done in minutes because that website and the learning materials are not well produced.
Once you get the IDEA of object oriented, it goes much better. Have someone look at your p-code. I am guessing you are making it much more complicated than it really is (a fault I would then share with you)
btw "I can get bits of it. I know how to make it clean up a single driveway, and find the first driveway"
Back in the day, if you had the algorithm for find 1 and clean it, you would just repeat that until you couldn't find one.
Mind you, my code was always brute force; but we had nothing but SUN machines so I rarely ran out of processing power.
mtn wrote:
I can get bits of it. I know how to make it clean up a single driveway, and find the first driveway, but I can't get it to go to the next one after that.
Any idea's? This is kinda a long shot probably...
How do you find the first driveway? If you can find one, wouldn't you use the same method to find the next one?
That's normally the way you approach such a problem - break it down into its parts (find driveway, clean driveway), implement those parts separately and then combine them.
Dude, I'm in the same boat. I'm trying to learn C++. Not too bad, but i come out of every class thinking "What the berkley did I just do?" My buddy gave me crap and said C++ is the grade they expect you to get in the class.
mtn
MegaDork
9/27/10 12:22 a.m.
BoxheadTim wrote:
mtn wrote:
I can get bits of it. I know how to make it clean up a single driveway, and find the first driveway, but I can't get it to go to the next one after that.
Any idea's? This is kinda a long shot probably...
How do you find the first driveway? If you can find one, wouldn't you use the same method to find the next one?
That's normally the way you approach such a problem - break it down into its parts (find driveway, clean driveway), implement those parts separately and then combine them.
Yes, but once I find one I have to shovel it all out. I cannot get my if/while statements to work so that it will clean it out and then get back to finding driveways again.
Back to the lab at 7:30AM tomorrow.
mtn wrote:
Taiden wrote:
I just sat down and wrote a python script to handle parsed RSS from the UFP module and then send it to my cell phone via email (over some random SMTP server).
I understood "RSS" in that.
More than I understood...
It's been a while since I've looked at Java, but I get to debug lots of code...
Make sure your functions for finding a driveway and shoveling out a driveway will work for any given driveway. Make sure that you keep a list of which driveways you've found and which driveways you've cleared.
There's 2 ways to approach it, generally, unless I'm missing something.
1. find all driveways, then clear each driveway successively.
2. Find a driveway, clear it, find next driveway, etc. until you cannot find another driveway.
Don't give up!
Here's how much of a geek that I am... I might go home and play with those exercises just to brush up on Java.
mtn
MegaDork
9/27/10 1:10 p.m.
Thanks everyone.
The assignment was due this morning at 11AM, the lab opened at 8, I had class at 9. After about six hours of work yesterday, I was really no closer at the end of it than when I started when the lab closed. I didn't have high hopes of getting it in on time, or at all.
Fast forward to this morning, I play with it for 5 minutes using what code I already had, and said screw it and started over. 15 minutes later I had a program that compiled and ran as it was supposed to. Success
I want my six hours back
Programming lesson #1 - recognise when you're deep in a hole .
I've been programming for a good 25 years now and I still manage to dig myself into a hole from time to time.
Thats the funny thing about programming; sometimes you can spend a day on a program that will not work, and then you go back and BAM!.
I love most things to do with the C style of programming, I find it fun.
EricM
SuperDork
9/27/10 2:36 p.m.
I had to learn LISP while in college, you should be thankful for Java.
(I also however, write in PERL, Ruby on Rails, and good old C++)
I leaned a smidgen of Java in Grad school, it ain't great but it beats the hell out of some of the old stuff.
EricM wrote:
I had to learn LISP while in college, you should be thankful for Java.
(I also however, write in PERL, Ruby on Rails, and good old C++)
I've been coding for nearly 30 years. Try cutting your teeth on a 10,000 line nuclear physics simulation written in FORTRAN 3 on punch cards by a bunch of really bad coders. I suppose that's still easier than working in assembly code. "Good old C++" made me laugh and feel old at the same time.
The best advice I can give is to break the work into smaller, simplified pieces as much as possible, then fit the pieces together. I will be much easier to determine what isn't working properly that way.
I hate programming and all I have programmed in is Matlab.