00:00 - 16:0016:00 - 00:00
01:17
hfp: Hey guys we added
factory_girl_rails
to our Gemfile. It installed v 4.4.1 but now rspec won't run. It returns this error: /Users/hfp/edx/cs169.1x/SaaS.1/hw4/myrottenpotatoes-hw4/config/application.rb:7:in
require': cannot load such file -- active_resource/railtie (LoadError)`. Is it because Factory_girl_rails 4.4.1 doesn't work with Rails 3.2?
aakhedr_: MMan: could you please have a look at this thread here? edx-cs169-1x.stackexchange.com/questions/2585/…
02:31
AmandaC537: Another question, I'm having problems with my routes. I am failing three of my tests (unfortunately causing 100/500) because it can't find the routes
AmandaC537: The message is: No route matches {:action=>"similar", :controller=>"movies", :movie_id=>nil}
05:01
TomResh: I am getting the error during bundle install nokogiri gem fails to install saying libxml2 version 2.6.21 or higher is required
e-jambon: I can't check right now, but if you check EdX course / online ressources / VM there is a link to the github somewhere and there is a script being used.
05:26
lroca88: This way is working, but when I use Movie.stub(:find).and_return (@current_movie) is giving me this error:
migane: you may try first to fake results in before each, then call should_receive(:method).with(parameters).and_return(fake_results)
lroca88: phamh9090_ : Failure/Error: get :same_director, {:id => '1'} TypeError: can't convert Symbol into Integer
Lohhari: i made an instance method out of Movie#similar, but i'm not sure if it's the rails way of thinking
06:25
06:39
Lohhari: true. i guess the options are Movie.similar(movie), Movie.similar(id) or Movie#similar(). in a way the first makes most sense
migane: and maybe also trouble in the database as implicit it relies on the id being coupled with the director
Lohhari: in a real situation you would obviously have a Director table and the Movie table would contain a director_id
migane: don't say it too loudly otherwise we will have a part 3 Saas course with really advanced topics
Lohhari: i watched some of the "basic stuff you should know inside out before you start" videos yesterday. sheesh. i took the functional programming in scala course a couple of years ago and those were the most advanced topics
migane: I've taken recently a functional scheme programming, my gosh it was terribly difficult. with graphs, trees, and so on. Much more difficult than ruby, for me at least.
Lohhari: yes, my first university programming course was in scheme. i had a hard time grasping the thinking
migane: I had no university programming course, it did not exist at the time I was at the university
migane: I've begin programming in 1973, but all from the try it yourself method, you know, so that I'm missing all those basic stuff: patterns, and so on.
migane: I've took some courses while at companies. In France, that was the only way to go at that time.
Lohhari: the actual computer science program was only created in 1986 in Helsinki University of Technology
migane: I don't remember in France, I think probably they were created first in Institute of Technology, then in High Schools, then in University. not sure though.
migane: sure, I have about the same difficulty to understand sms that recursion on graphs in scheme, so to say.
Lohhari: but a 63yo frenchman who studies fp and chats in fluent english in IRC. i sincerely wish there were more people like you :)
migane: At the very beginning it was not perfored cards, it was perfored ruban, so no way to modify the program if you made a mistake. If was in hexadecimal on truly huge machines.
Lohhari: i have to say that my experience with a lot of frenchmen that they are not very open towards non-french speakers. and the government tries to enforce it
migane: the problem in France is that the language course are terribly inefficient. When I was in school, I was taught German, but it was as Goethe spoke it. Imagine the first time I went at butcher's in Germany, not only able to buy a single piece of meat, but I could talk about nifty details of Kant philosophy during hours, not obvious place it in party if you know what I mean.
Lohhari: i work for an international software company and about a third of our small office personnel in france have the confidence to write us in english. 2/3 have to use interpreters. it's strange
Lohhari: then again, i heard of this finnish guy who had lived in france for a couple of years and still had problems getting a baguette from his baker
Lohhari: well the software is for the construction domain so those guys are construction engineers i believe
e-jambon: I could not cope with the idiots around, migane, sincerly. I would just not bother mentioning that is.
e-jambon: My own sister tells me every few days a new "today a guy" story... I believe one must be tired of male behavior sometimes...
Lohhari: we also have a french guy working in english at our office here in finland so i know it's possible ;) still, there are 5 spaniards for that 1 frenchman
e-jambon: Well, the fact is you're right about the government not particularly welcoming French polyglot people. But I'm afraid the reason is not the one you might expect. It's all about their own mediocrity.
Lohhari: government mediocrity is most certainly an universal problem. it just manifests in different ways
Lohhari: but i would think there's still a bit of the world domination complex left. the french government refuses to speak the universal language and the anglophone governments refuse to use the universal measuring units
e-jambon: None so far. I might consider bootstrap though, because it's pretty complete and understandable, with grunt uncss to clean everything.
e-jambon: Lohhari: It is somewhat true, but the fact is : our leaders just were not polyglot (at least the a huge majority) and still are not.
e-jambon: Lohhari: They would not let polyglot people take the stage, because they would sound...ridiculous (and they are, sincerly).
e-jambon: It's even worse : they try and use words they clearly do not understand. Simple words that is.
e-jambon: I particularly like "time" instead of "weather". (same word in french, litteral translation but... won't work).
e-jambon: I can give you so many examples of people trying to sound doctorate about things using english term they OBVIOUSLY do not understand....
Lohhari: my spanish often sounds rediculous when i just try to translate an english (or finnish) language sentence word by word
e-jambon: My ex boss convincing someone that he did send an email "Yes I sent it. It was in your mail". Next 3 minutes : - why did you not email it ? - I did - then I did not receive - I tell you it is in your mail - but you just said...- no I said it's in your mail. - doh. So email or mail ? - Yes, mail. ... Now imagine sitting there and you'll get the picture.
e-jambon: Migane, how many times did you actually explain / or refrained from explaining that word != world.
migane: That's my problem. I cannot refrain. Yesterday in a hangout, I was told that Frenchies are very telling... So not sure it was something good or bad...
migane: It is hard for me to imagine that people have ideas about other people witout even knowing them. but c'est la vie!
e-jambon: Ever explained a Frenchie that "internet c'est un net de nets" , after they used the term "net" a dozen time in a "pseudo" technical discussion, just to see their face ?
migane: Imagine better, translate of the technical words into French, then use it in a discussion, you will enjoy much more the faces around you :-)
Lohhari: there's a government agency in finland whose job is to create new words to the finnish language to match new words in other languages, mostly technical terms in english. they create the term and everyone keeps using the english word
e-jambon: It is VERY funny. I regularly hear "But...that's not how it works, because there is XXXX", XXXX being the english translation of that exact same word I just explained to them in French for 2 minutes.
e-jambon: Right. But you two do know what to swap means. French people, for the extreme large majority, think that swap is savon (soap).
Lohhari: sometimes we get into trouble with the pronunciation though. i had to think for a moment what the lecturer meant when he talked about [laib] folder (lib/)
e-jambon: Yeah like the famous french word : Dihellhell (stands for dll). That's another funny word. I heard soooo many techies using it but not understanding why I was talking about libraries....
e-jambon: This morning I'll go get my 5yo kids. Before driving them to school I asked : "Do you know the Shadocks" and my daughter answered :
migane: sure, I have the cd, very difficult to go to the high level. It has a Mother day gift. Somethimes I wonder if my children think I was born at the same time as Vercingetorix
Lohhari: but in the nordic countries we have the huge benefit of not dubbing anything besides children's programs. everything on tv is in the original language
e-jambon: Lohhari, isn't it usual to leave the country a couple years when you're done studying (or near the end of them) ?
e-jambon: I think spending some time abroad is the exception in France. No one ever suggested to me it was even a possibility.
Lohhari: yeah, i know a lot of people who have gone to france and other european countries from finland through erasmus
e-jambon: Sadly, none of my teachers ever mentioned Erasmus. It was too late when I discovered its existence (in the 90s)
09:50
VijayU: hey, just a weird query, if I touch 75% can it considered as pass or should I score 76 to get passed..?
MimiBambino_: On HW4, can someone tell me what file I should past the Cucumber tests from PasteBin into?
Lohhari: one way is to write cucumber tests to test the views and rspec tests to test the controllers and the models
Lohhari: so rspec calls methods and checks return values (and instance variables). cucumber fills fields and clicks buttons and examines the resulting URL's and page content
demoniszcze: but should I alternate between writing bdd and tdd or is it ok to write, say, all the steps definitions first, and then concentrate on rspec
Lohhari: well, in theory at least you are supposed to write all tests before you write the corresponding implementation
Lohhari: is if you're planning to rspec-test a line of code, you should not that line before you have the rspec test
demoniszcze: so whenever I need to add code to controllers/models I should write rspec for it first (red), then write the code itself (green), then refactor
Lohhari: but sometimes you're not going to write an rspec test, for instance when you're defining the view
1 hour later…
12:35
demoniszcze: Lohhari: Should same_director view have all the functionality that index view has (sorting, session etc.)?
demoniszcze: especially since you have to reimplement most of the movies#index in same_director#index
13:48
14:34
blackratdog__: and from the other side of the fence, a new Rails testing book :-p pragprog.com/book/nrtest2/rails-4-test-prescriptions
aakhedr: I need urgent assistance with libv8 - for 2 days now I cannot resolve this neither on my mac nor on the VM
15:38
demoniszcze: hm should I add another action to movies controller that handles no director info or is it possible to do it inside the same_director action?
demoniszcze: but for the movies that don't have director the show action fails - it complains about not having a proper route
demoniszcze: match 'movies/director/:director', to: 'movies#same_director', as: :same_director, via: :get
demoniszcze: the problem occurs with movies that don't have it - the show view can't be rendered because link_to links to same_director_path(@movie.director)
Stevos: Never mind the table rows counr question I posted earlier. I'd made a mistake in my CSS selector. Got it now.
demoniszcze: @movie.director here is nil => /movies/director so it matches the regular /movies/:id route which fails -> can't find a movie with id = director
phamh9090_: I think the movie all have director (empty string), maybe your dbase is not updated to include director.
demoniszcze: phamh : yeah, it's nil by default, I can make it use empty string but I don't think it will help with routing issue
migane: the problem is that somehow you should be able to get at the movie, and one way to do it securely is to use its id, which surely exists because you come from the show page.
demoniszcze: so the idea here is that my route should look like this: match 'movies/:id/director/:director' => 'movies#same_director', :as => :same_director
00:00 - 16:0016:00 - 00:00
« first day (50 days earlier) ← previous day next day → last day (1086 days later) »