Open Side Menu Go to the Top
Register
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

03-01-2014 , 08:36 PM
suzzer, you and I have very different email styles.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-01-2014 , 08:50 PM
PJo, it might help everyone if you say what NoSQL you are using.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-01-2014 , 10:04 PM
I never messed with jruby or rubinius. Pretty much everything you said is true. It's also why I don't bother looking at micro benchmarks.

Language wars are funny to me now a days.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-01-2014 , 10:05 PM
MongoDB.

To be honest Im pretty much just mapping out everything the same way I would in a SQL database, so the frustration of learning a new implementation is compounded by feeling like its useless.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-01-2014 , 10:08 PM
PJo336, I forgot to say before the "through" thing isn't a typical database relationship. It's just rails lingo to describe a certain type of association.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-01-2014 , 10:34 PM
dumb SEO question: How do you make your site include a table of contents of its pages in google search results, like this:
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-01-2014 , 10:56 PM
Quote:
Originally Posted by e i pi
I liked coursera more when you could access all of a classes videos after the course was over. Now when they reboot a class they close off access to the last one even if you were enrolled. I'm guessing it might be because theyre trying to monetize and have paid for certificates now & want to make it less easy to cheat.
This is a setting controlled by the professors in question. I don't know how much control they have, but I've seen classes that were shuttered up the instant they ended like you describe and others where you could "sign up" after the class was over and still see everything.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-01-2014 , 11:11 PM
gaming_mouse: I believe it's this:

https://support.google.com/webmaster...r/156184?hl=en
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-01-2014 , 11:13 PM
awesome ty
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-02-2014 , 06:49 AM
Quote:
Originally Posted by Shoe Lace
I never messed with jruby or rubinius. Pretty much everything you said is true. It's also why I don't bother looking at micro benchmarks.

Language wars are funny to me now a days.
That stupid article doesn't even attempt to compare apples to apples. Every new article from that series sits at the front page of HN for days and I don't recall anyone ever calling it out for the bs it propagates.

If that really is used to instigate more language wars, then that does well to display the fallacy of the debates. Attempting to extend "Language N is not for me" to "Language sucks in all cases" is as dense as it sounds.

Of course, you probably believe I have some issue with RoR. I don't have any issue with it. I take issue that it is often aggressively promoted as a beginners' framework when even dhh says it is not.

FWIW, the opinion of RoR from the people that use it is healthily divided. I haven't met many people that are RoR 4 Lifer's despite what the promotion would have you believe. Some love it, others think it's okay but that is where the job market is, and others wish the thing would die already. I've found that the RoR culture is a varied as normal. There is that adage about believing half of what you see and none of what you hear, and I think that especially goes for programming languages and getting information online. The HN / Reddit / Etc posters are an insignificant subset of the people going in and grinding it hardcore all day everyday. Think of it this way. If these were movers and shakers and doers, why the heck are they making 30 posts a day on these sites? (As an aside, you'd think that not a single woman programmer exists from reading HN, etc. I've been to a few meetups where there are quite a few, and even been to a few interviews where men were the minority)

Some RoR users I've met face-to-face simply love the language and the framework (well, some liked the idea they don't have to know much Ruby at all and that makes me sad, obv), and I certainly can't deny them the joy of waking up every morning happy, even if they began with the framework.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-02-2014 , 09:43 AM
He's also stated in presentations that you learn to appreciate frameworks more after you've gone through the pain of creating a site where you had to implement a lot of what rails gives you from the start on your own.

I think that's why I appreciate it. I just don't have to think about the 20 other things I used to think about every time I start a project. I just know for a fact that those decisions are made for me and are implemented really well.

I agree about HN too haha. That place feels like it has a ratio of 500 arm chair developers sitting in an ivory tower vs 1 developer who actually codes every day.

gaming_mouse,
It doesn't always happen quickly too, I find it to be pretty random. I've had ~60 pages indexed in google on one site over the course of about 3 months and it wasn't until that point where google decided to create that nicely categorized view of the site.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-03-2014 , 04:10 PM
man, I have my first big java exam today, and the practice test is ridiculous. the questions range from the ******ed (What keyword do you use to have a class implement an interface?) to the "wtf how would anyone know that" (How many methods does the interface MouseListener have?)

Got a 78 though, not bad without study.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-03-2014 , 05:31 PM
Quote:
Originally Posted by jmakinmecrzy
"wtf how would anyone know that" (How many methods does the interface MouseListener have?)
This prof should be fired.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-03-2014 , 05:39 PM
I don't think he writes his tests, but I thought that was one of the dumbest test questions I've ever seen. What am I gonna do, go through java docs and try to memorize every GUI interface?

Another dumb question was interface related and asked which following method does not exist for some random ass interface we haven't even used, and the answer was really not obvious at all. The choices were scan, seek, getSomethingReallyObvious, and some other really vague method.

Most of the questions are reasonable and easy, but a few of those really pissed me off and I'm almost definitely going to just have to guess because I'm not memorizing the entire god damn swing package.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-03-2014 , 06:41 PM
I would guess MouseListener has: Click, double-click, right-click, center-click, scroll, drag, drop, hover - and probably a few more I'm forgetting. Was it multiple choice?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-03-2014 , 08:13 PM
Yea it's mult choice thankfully. The options were 0, 1, 3, 5. Yea you can kind of reason it out that way - it's obviously not 0 or 1, so I was torn between 3 and 5, played it safe and guessed 5, and 5 was the answer.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-04-2014 , 01:53 AM
Got an 81, could've been worse. I'm getting a really solid handle on interfaces, design patterns, and inner/anonymous classes, all of which were giving me a lot of trouble the last few weeks because I haven't had time to devote to this class like I should. Threads gave me a little hiccup but I'll catch up. The only other thing we were tested on were i/o streams, and aggregation/inheritance/polymorphism which are pretty easy.

So far I'm liking the class but I think a multiple choice test format is a really awful way to test someone's programming knowledge. I really like practical tests.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-04-2014 , 09:05 AM
Multiple choice is fine for intro courses. Reading/debugging code and deciding the output is a very useful skill.

Also I think there would be better programmers if inheritance was not taught in school. Knowledge of threading and streams is pretty useful though!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-04-2014 , 11:07 AM
http://eng.joingrouper.com/blog/2014...ts-interactors

https://news.ycombinator.com/item?id=7335211

I forget if I ever wrote about how programmers don't necessarily get better as they gain more experience but this is a great example. Some dude thinks taking common logic out of controllers and models into separate classes is "advanced technique" in Rails, advocates use of an entirely trivial abstraction "interactor" to have a whole bunch of such classes inherit from this "interactor" base class and has the gall to argue about the advanced correctness of his architecture with the creator of Rails who seems perplexed by use of unnecessary abstractions.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-04-2014 , 11:15 AM
Quote:
Originally Posted by muttiah
Multiple choice is fine for intro courses. Reading/debugging code and deciding the output is a very useful skill.

Also I think there would be better programmers if inheritance was not taught in school. Knowledge of threading and streams is pretty useful though!
Why no inheritance? We're definitely taught not to rely too heavily on it, but that seems like a pretty crucial OOP concept.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-04-2014 , 11:30 AM
candybar,

That was a fun set of comments. I don't think he meant advanced as in it's an advanced pattern. It's just not something rails provides guides/convention for.

I liked DHH's version btw and I think DHH's second version would be ok if you ended up having to use that set of mailers in multiple controllers. It's a great example of adding an abstraction when you actually need it.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-04-2014 , 12:01 PM
Quote:
Originally Posted by candybar
http://eng.joingrouper.com/blog/2014...ts-interactors

https://news.ycombinator.com/item?id=7335211

I forget if I ever wrote about how programmers don't necessarily get better as they gain more experience but this is a great example. Some dude thinks taking common logic out of controllers and models into separate classes is "advanced technique" in Rails, advocates use of an entirely trivial abstraction "interactor" to have a whole bunch of such classes inherit from this "interactor" base class and has the gall to argue about the advanced correctness of his architecture with the creator of Rails who seems perplexed by use of unnecessary abstractions.
this is not just some random dude's thoughts here. the architecture he's proposing is related to DCI and is advocated by many, many experts, including uncle bob. the blog post itself isn't great, but the ideas in it are basically correct.

his criticsim of rails, specifically, is one shared by lots of knowledgeable rails experts -- in fact, there's a whole a sub-movement started by corey haines called the rails fast tests movement, which similarly advocates for pulling out business objects in POROs to ensure fast test suites.

this is the same old story as that thread shoe posted with DHH getting defensive about something else he was clearly wrong about. his go to line is that the normal rails way is ususally best and people trying to improve it are just over-complicating things. he's wrong here too, and rewriting a toy example proves nothing and just shows that he misses the point.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-04-2014 , 12:49 PM
He only rewrote a toy example because a toy example was provided in the blog post.

Btw I never had problems with test speeds. I use test unit (minitest) and fixtures. I test directly on active record models. The thing is I only modify the DB when I absolutely must. I think people forget that you can test with .valid? instead of .save in most cases and doing that alone makes a huge difference. I've also never had issues where I felt like fixtures were causing me to lose a lot of time or became serious pain points for testing.

There are plenty of other things you can do for tests too like telling postgres to run your test database as in memory db instead of on disk. Now your tests are super fast and it requires very little fooling around to get it flawlessly working in dev mode.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-04-2014 , 12:56 PM
Quote:
Originally Posted by Shoe Lace

There are plenty of other things you can do for tests too like telling postgres to run your test database as in memory db instead of on disk. Now your tests are super fast and it requires very little fooling around to get it flawlessly working in dev mode.
no no no no no.

you should NEVER have to do any of this, that's the point. if you're unit testing your domain code you should never have to think about or load rails or a database or any other nonsense.

and business logic doesn't belong in AR models. i'd say this is the primary sin of doing things the standard rails way. people went from fat controllers to fat AR models and felt all good about themselves, but fat AR models are almost as wrong as fat controllers.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-04-2014 , 01:13 PM
Well, for example how about this. Months ago my first non-trivial project was making a legit blog engine. It has some bells and whistles like read time estimates, split panel live markdown preview, auto save and all that fun stuff.

In my Article model I have a method called estimated_read_time. It is an instance method. So I can do: @article.estimated_read_time and get back the time it would take to read an article which I can happily render in a view.

I made a decision to do this server side because I wanted to be able to facet on an article's word count/read time with elastic search.

My article's model tests simply has a test that ensures the read time is correct given a certain reading rate since I made the rate an optional argument to the read time method.

You would totally argue that an article has no business containing such a method right? I mean, estimating a read time has nothing to do with articles.

It's really nothing more than a typical function that when you give it an input of a number (number of words) and a rate (read speed) it outputs a value which is the estimated word time in minutes. It has no state or side effects. It's pretty much the textbook definition of what a pure function is right?

The thing is, that's an ivory tower decision IMO. I'm not in the business of word processing where I'm using this read time estimate method on 15 different model types. If I did then it would clearly be a pain point and then I would solve it, and in this specific case I would probably end up just using a concern since that's the "rails way" and it's a great balance of proper'ish abstraction and DRYing out code.

Is it really worth creating a gem out of this that reports back these stats and maybe a few other "word related" methods. Maybe, that could be useful perhaps. But the problem never arose in my specific use case so I just put it on my model because for this project it makes sense.

If I went down that route it would be kind of annoying to use too unless I made a helper method in my article which does nothing but call out to the gem's function. So my code is more loosely coupled and portable but I didn't lose any complexity, I ended up gaining complexity.

Last edited by Shoe Lace; 03-04-2014 at 01:19 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m