« first day (384 days earlier)      last day (4416 days later) » 

user11126
4:30 PM
 
5:40 PM
argh @MattChan sometimes I really hate Ruby
 
user11126
haha
 
I just have no idea what all the method names are I'm looking for
 
user11126
the docs can be confusing... especially if you just jump right into rails
 
user11126
sometimes i still get confused whether something is part of ruby or rails
 
I have to write a Cucumber test case that 'goes to the edit page' for a certain movie title
but then I have to find the id that goes with this title
I 'think' I've managed to figure out how to get the object of that movie, but then I have to get out the id and interpolate a string that's the path
without using print statements to check what the heck its doing
perhaps I should turn on the debugger and have a peak inside
 
user11126
5:47 PM
you're debugging a test?
 
hehe, I have no idea what stuff I have access to
 
user11126
oh hey there's blood coming out of my nose
 
user11126
brb
 
woops...
 
user11126
okay back
 
5:51 PM
I somehow managed to get it working :P
 
user11126
all dried... must be the air and summer weather
 
hope your nose stopped bleeding by the way :P
 
user11126
what did you do to get it working?
 
when /^the edit page for "(.+)"/
  m = Movie.find_by_title($1)
  "/movies/#{m.id}/edit"
but now I want to query my activerecord model to get the director from a certain movie
no clue how to make it search by movie title
 
user11126
Movie.find_by_director "someone" ?
 
user11126
5:54 PM
oh, you mean like @movie.director?
 
ah now I get where that find_by_ ... comes from
yeah, I previously used something silly I saw somewhere, which probably return an array, rather than the object
and that array obviously didn't have an attribute called director
 
user11126
find_by_attr also returns nil if it can't find the object for you
 
user11126
whereas find(:id) raises an exception if no records match
 
expected #<String:103694550> => "Ridley Scott"
got #<String:103688790> => "Ridley Scott"
D'oh!
@movie.director.should be arg2 doesn't work as I expected
 
user11126
hmm.... different instances?
 
user11126
5:57 PM
they don't point to the same obj in memory?
 
well yeah, one is the one I got from the database, the other is arg2
Compared using equal?, which compares object identity,
      but expected and actual are not the same object. Use
      'actual.should == expected' if you don't care about
      object identity in this example.
 
user11126
i see
 
now everything passes :)
Feature: search for movies by director

  As a movie buff
  So that I can find movies with my favorite director
  I want to include and serach on director information in movies I enter

Background: movies in database

  Given the following movies exist:
  | title        | rating | director     | release_date |
  | Star Wars    | PG     | George Lucas |   1977-05-25 |
  | Blade Runner | PG     | Ridley Scott |   1982-06-25 |
  | Alien        | R      |              |   1979-05-25 |
  | THX-1138     | R      | George Lucas |   1971-03-11 |
That was my test case
now I have to implement two others, and actually make them work
because I'm rather flabbergasted the update step 'did' something
ah yeah, the update function is pretty generic, so I reckon it should work
 
user11126
cool
 
The second lets you click a new link on a movie details page "Find Movies
With Same Director", and shows all movies that share the same director as the
displayed movie. For this you'll have to modify the existing Show Movie view,
and you'll have to add a route, view and controller method for Find With Same
Director.
That's my next assignment
pfff, what a way to get these tools shoved down your throat :P
 
user11126
6:02 PM
heh, it's the best way to learn
 
user11126
and easily be frustrated
 
user11126
> Give a man a program, frustrate him for a day. Teach a man to program, frustrate him for a lifetime.
3
 
well, I have to write a 'spec' though I'm not sure how that works :P
@MattChan lol
 
user11126
ew, specs... i don't like writing stuff....
 
user11126
rspec? i don't know how that works
 
6:05 PM
holy smokes, I just updated my view and BAM there's my director column
I like that
@MattChan me neither, so only one way to find out
hi @VPeric
 
Hullo @Ivo
 
@VPeric I got my ass kicked by the PGM and NLP homework, boy that's a little out of my comfort zone
thank god for Github :P
 
Haven't yet had a chance to look at NLP, I was on the mountains for the weekend.
 
@VPeric I thought I'd hate it, but the probability stuff they do is pretty related to the other courses
its just the regex that I haven't wrapped my head around yet
 
And actually, the enrollment closed March 18th, so I guess I'm not taking it after all.
So, I have just Algorithms and Game Theory then.
 
6:09 PM
Well I watched a video of GT, and decided it wasn't for me
 
I have it in school right now, actually, so I figured it'd be useful.
I was really interested in NLP too, but.. ah well.
 
the same for Crypto
@VPeric I can always send you the material
the assignment was quite interesting
 
user11126
natural language processing?
 
@MattChan Yep.
@IvoFlipse Perhaps, sure, is it really that interesting?
 
user11126
@IvoFlipse did you see that flag?
 
6:12 PM
@MattChan on Fitness? yeah, I wanted to leave it for y'all :P
@VPeric we had to parse random files for email addresses and phone numbers
 
user11126
and @NathanWheeler just went on vacation
 
I had no idea how to tackle it, but a github repo gave me the solution, so I studied that instead
there's also Greg
 
@IvoFlipse I once saw a regex for parsing all legal e-mails.. it's huge.
 
user11126
regex is awesome
 
yep :D
 
user11126
6:20 PM
@IvoFlipse i should send you my "compressed and obfuscated" perl program
 
user11126
we had a project in our class where we had to use perl to parse Doom 3 deathmatch log files
 
user11126
and there were three different contests.... i won the one for shortest perl program
 
user11126
our lecturer opened it up in class and everyone just flipped out
 
user11126
i'll dig it up later tonight, gotta head out now for a dentist appointment
 
@MattChan good luck
@VPeric well this one wasn't really large, but it got a perfect score
 
6:25 PM
@IvoFlipse Nice; it's because the standard is actually so huge, most addresses could probably be caught by a simple regex.
 
Oh, I've got a new homework from an AI class too, it's to write a player playing Gobblet (something like 3-d "connect 4")
 
how did you end up solving the nonogram?
 
Badly.. as in, I didn't solve it. :)
But my approach was the right one.
 
awh too bad
the CSP one? well if you didn't solve it, it wasn't entirely ;P
to cheer you up, I haven't solved robotics homework for this week yet
 
6:33 PM
Well, good start, I just should have implemented more checking methods to further restrict the domain.
right, lets move this to Fake Programmers
 
 
4 hours later…
10:06 PM
What the hell, Cucumber has been working all evening and now it decides to crap out on me?!?
 
@VPeric The simple regex is wrong unless it's REALLY simple. "Is there stuff on both sides of an '@'? yes. good to go!"
if(m/.\@./) { # good } else { # bad or at least old-fashioned enough to be worth rejecting }
 
10:21 PM
@freiheit notice anything strange in this error message: pastebin.com/7CZJa38A
its about as generic as they can get :S
 
@IvoFlipse that looks pretty typical for a language parsing error to me... I'd look on line 3 of js_dsl.js. Looks like an unbalanced block or quote
 
Yeah, if only it would mention which file...
 
10:38 PM
what the hell @freiheit, the problem was in the output, which gets generated
 
@IvoFlipse So, then, not in a file?
 
well that creates a ton of files, no idea why it started giving problems :(
I blame github :P
 
11:23 PM
@Sklivvz you tell me if that calculator is any good, if they don't give more information, than how am I supposed to know?
 
11:59 PM
@IvoFlipse I don't know - you are the experts on nutrition and fitness, surely you can give me some idea on where the original resources are?
 
@Sklivvz I was merely mocking you, since its very Skeptical of you to ask it :P
 

« first day (384 days earlier)      last day (4416 days later) »