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

08-15-2013 , 12:59 PM
Quote:
Originally Posted by candybar
Karma works fine on Windows VMs hosted at Rackspace for us. This is a dev, not a CI environment, though I don't see how it would be much different. You can also use headless browsers (https://github.com/karma-runner/karm...tomjs-launcher) if that matters.
Our Rackspace env is Linux I'm pretty sure. Will check when I get to work.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-15-2013 , 02:48 PM
Quote:
Originally Posted by suzzer99
Yes, the problem is the test assertions are running before the calls are returned - but only on our angular pages. But I don't know if that's just because it's not smart enough to wait
I don't know much about Chai but it can't just know how to wait, assuming it's not written with the knowledge of how AngularJS works. Thinking from the testing framework author's perspective, it needs some kind of hook into your AngularJS app to know that a given action has completed (and done with processing all the associated events it's triggered) or you need to explicitly write tests asynchronously and wait for specific things to happen. I would assume by now there would be an AngularJS plugin or at least some documented way to handle asynchronicity more generically.

I assume this is an E2E test?

Quote:
Originally Posted by suzzer99
Our Rackspace env is Linux I'm pretty sure. Will check when I get to work.
This should be even easier - good luck! I've only used Karma with Jasmine so YMMV.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-15-2013 , 03:33 PM
It would be nice if I could just tell it to wait 5 seconds before running the test that's dependent on the Ajax calls returning. Our calls should come back that fast or it's an error anyway. But that doesn't seem to work.

From the docs and what people have told me, Zombie/Chai does seem to have some kind of provision where it somehow automatically knows to wait until Ajax calls return. But maybe that works with say a standard jQuery Ajax call that happens on dom-ready - but not with Angular.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-15-2013 , 04:36 PM
Quote:
Originally Posted by suzzer99
From the docs and what people have told me, Zombie/Chai does seem to have some kind of provision where it somehow automatically knows to wait until Ajax calls return. But maybe that works with say a standard jQuery Ajax call that happens on dom-ready - but not with Angular.
This is probably not robust enough to work with complex asynchronous codebases like AngularJS. AngularJS doesn't just give a callback to HttpRequest, after which everything is kosher. The callback itself puts events back on the queue to do some processing, which when it gets executed, may do the same thing, and so on indefinitely. So unless the framework knows what to wait for specifically, it's going to be tough for it to figure out when things are done.

Try googling for asynchronous testing with Chai. This may work:

http://chaijs.com/plugins/chai-as-promised
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-15-2013 , 09:46 PM
Quote:
Originally Posted by gaming_mouse
That's what is confounding about the guy. He writes the intro to that book, but he gets into arguments like this:

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

In fact, he was obsessing over that "No Macro" talk back then, and people were like "Dude, did you even listen to that talk?" I don't understand why he obsesses about that talk even after he was told he was wrong in his interpretation about it. Can't a guy say "Fine, I was wrong."?

I think that, deep down, he really wants to see a Lisp of some sort succeed and he's pretty hurt that Clojure didn't dominate Ruby on Rails at its unveiling. I can sort of get it if I look at it from this perspective: waiting for Lisp everyone loves is waiting for Hell to freeze over. He seems like a pretty emotional guy and all.

FWIW, Clojure does have a loop function.

And irt to the Google Group talk, I'll posit that what he ran into is the same things you'd run into today: Very very few people know what the **** they are doing in Clojure and generally talk **** even though they have no clue what they are talking about. Hell, I'm practically an expert compared to the baseline ("Duh... How do you install Java?"). Just post a question on SO and see all the silly sarcastic answers you'd get about "not good for concurrency," as if we all are running 70 cores at home and there would be no other reason to use the language.

Quote:
Originally Posted by gaming_mouse
and let's not forget the untold hours our dear dave has spent "working" in "massage" parlors
That note-taking program is wonderful, isn't it?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-15-2013 , 10:32 PM
re: guy being confounding

sounds like a simple case of nerds gonan nerd to me
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-16-2013 , 05:10 AM
Pretty sure the JVM is good enough at concurrency for me to not care (+I have faith that it'll get better if need be).

Quote:
Can't a guy say "Fine, I was wrong."?
Imo very few people can do this (and truely mean it)
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-16-2013 , 05:39 AM
Quote:
Originally Posted by daveT
That note-taking program is wonderful, isn't it?
ha! actually you enjoy of the privilege of having no notes, since you're so well known to me (in online land). your previous employment just struck me as surprising so i'll never forget it.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-17-2013 , 12:54 AM
We use an FTP server at work. The problem with FTP is that you can have a butt load of pictures, but to see them all, you have to click each individual link, so it takes a really long time to examine all the pictures.

So I wrote a 6 line javascript that pulls the images and displays them all on the page of image links. I was quite pleased to see you can run javascript through the url box.

Despite the length, this is one of the most satisfying programs I've written in a long time.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-17-2013 , 09:57 AM
Quote:
Originally Posted by daveT

Because of the length, this is one of the most satisfying programs I've written in a long time.
fyp

And yeah, every once in a while we programmers get to stop wrestling with the bureaucracy of the machine and do that magical thing where you tell the computer to do something that would take you forever on your own and the computer obeys you like a good butler.

Quote:
Originally Posted by Scripture
A computational process is indeed much like a sorcerer's idea of a spirit. It cannot be seen or touched. It is not composed of matter at all. However, it is very real. It can perform intellectual work. It can answer questions. It can affect the world by disbursing money at a bank or by controlling a robot arm in a factory. The programs we use to conjure processes are like a sorcerer's spells.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-17-2013 , 12:36 PM
So some recruiter I've talked to a couple times was dumb enough to forget to delete the amount of money they're billing the client in a job description he forwarded to me and he surely didn't notice. My usual rate is about 60% of it. My play?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-17-2013 , 12:48 PM
So if the amount they are billing the client is 100, your rate is 60.

That means that their gross margin is 40%. anywhere from 25-35% is standard. That might also be the amount they CAN get from the client, not necessarily what they would submit you at.

Basically multiply the amount they are billing the client by .30%, so if they are billing the client at $100/hr=*.30=30, 100-30=$70, subtract a bit for fees, etc. so 65-68 is a good rate for you if the client is being billed at $100.

Sometimes the amount that you CAN bill the client is the price for a absolute perfect fit person, but a lesser skilled person would be able to get the job done, and the price savings makes it worth it to the client. If you are the perfect fit for this job description and you are interested in it, you should increase your rate by about 10-15%.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-17-2013 , 02:18 PM
Quote:
Originally Posted by gaming_mouse
fyp

And yeah, every once in a while we programmers get to stop wrestling with the bureaucracy of the machine and do that magical thing where you tell the computer to do something that would take you forever on your own and the computer obeys you like a good butler.
And it is in these situations where calling javascript the assembly language of the web makes perfect sense, and can be interpreted as a wild eyed compliment.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-19-2013 , 04:28 AM
this is probably incredibly noobie-nerdish, but I don't care. Doing codecademy for java atm (have tried and given up on C++ and html a few times each before) and the assignment was as follows:

Code:
// On line 2, declare a variable myName and give it your name.

// On line 4, use console.log to print out the myName variable.

// On line 7, change the value of myName to be just the first 2 
// letters of your name.

// On line 9, use console.log to print out the myName variable.
to which I did:

Code:
// On line 2, declare a variable myName and give it your name.
var myName = "billiam";
// On line 4, use console.log to print out the myName variable.
console.log(myName)
// On line 7, change the value of myName to be just the first 2 
// letters of your name.
myName = myName.substring(0,2)
// On line 9, use console.log to print out the myName variable.
console.log(myName)
The bolded (which doesn't really show up, so it's line 7) is the part I'm all proud of. The way they explained how to do it made it seem like I was just supposed to change the variable value manually, not via substring, like:

myName = "bi"

But my way worked! Woo!!

Last edited by Low Key; 08-19-2013 at 04:30 AM. Reason: i'm missing semi-colons, aren't i?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-19-2013 , 08:03 AM
I assume you mean Javascript?

Nice work though. I'd love to see a longitudinal study that tracked CS students starting from the beginning. I'd wager that people that do something like you did here using substring do noticeably better long term since I think it demonstrates a more intuitive understanding of CS concepts (maybe, I could be way overstating this).

You are missing semi-colons - which Javascript is pretty forgiving about - but always having semi-colons is definitely a good practice for beginners to follow (I think we had an argument about this once for non-beginners - its hard to keep track of all of our arguments here).
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-19-2013 , 08:34 AM
Quote:
Originally Posted by jjshabado
I'd wager that people that do something like you did here using substring do noticeably better long term since I think it demonstrates a more intuitive understanding of CS concepts (maybe, I could be way overstating this).
i doubt you can conclude much one way or the other. it probably means that the lesson he just completed, for which this question set is the assignment, had examples showing how to use substring.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-19-2013 , 08:52 AM
Probably an "lolduh" question, but nonetheless:

I have two options ahead of me.

1. Graduate this December with a B.A. in Computer Science and a GPA of ~3.1

2. Graduate this May with a B.A. in Computer Science AND Math, and a GPA of ~3.3

Things to consider: I'm already 24 (will be 25 in May) and have been in school for obv quite a while (switched majors and took time off). With that being said, I already have $52k in loans and if I go till May, the extra loans + interest will be $60k+. My dream job would be doing high frequency trading. More realistically something data sciencey/machine learning.

Currently live at home = no rent, but a decent sized car payment/insurance. I have a pretty good/solid part time job for a pharmaceutical company, and get paid pretty well for a kid in college. I could easily go full-time and make a somewhat decent living out of it but I have 0 passion for the work.

What do you recommend? Is the 2nd major on my degree worth it for the extra time + money? I don't have many personal projects to show off to employers, although I do plan on working on that over the next 6months/year.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-19-2013 , 09:13 AM
Do you mean going to May will cost you around $8000? If you meant it would cost you an extra $60K, you should graduate as soon as ****ing possible.

I honestly don't know the answer. Personally, it would probably depend on the courses you're going to end up taking. If there's something really interesting - then go for it. Otherwise I'd probably just graduate with the CS degree and write my resume in a way that calls out your math knowledge (or find some project that highlights those skills and use that to demonstrate your math knowledge).
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-19-2013 , 09:20 AM
Going an extra semester will cost me ~$8k making a total of $60k when I graduate.

The one other factor I left out is that I would like to end up getting a Masters or PhD some time down the road.

Your response is interesting though, that's not what I was expecting.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-19-2013 , 09:22 AM
Quote:
Originally Posted by gaming_mouse
i doubt you can conclude much one way or the other. it probably means that the lesson he just completed, for which this question set is the assignment, had examples showing how to use substring.
I was thinking more generally about students that 'get' using advanced functions or mutating/operating on existing variables even when a specific function hasn't been spelled out to them.

Even with a substring lesson I bet there are still a bunch of students who would do the above assignment with the myName = "bi"; solution.

Another common example is when students have to build an array of something (say convert a string of your name to an array of single letters) and they just hardcode the size of the array instead of figuring it out dynamically.

Still, you could easily be right that there's not much to conclude there. At least not much more than "People that do better on assignments at time X" are generally going to be better at a related task at time X+Y.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-19-2013 , 09:24 AM
Quote:
Originally Posted by derada4
Going an extra semester will cost me ~$8k making a total of $60k when I graduate.

The one other factor I left out is that I would like to end up getting a Masters or PhD some time down the road.

Your response is interesting though, that's not what I was expecting.
If you really think you're going to want to do a Masters or PhD it's probably worth it for the double major. Academia obviously likes academia metrics like degrees and GPAs.

The working world is much more varied. Some people really like academia metrics others don't. With a double degree and a better GPA you'll have an easier time getting a job. I just don't know if its $8,000 easier.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-19-2013 , 09:43 AM
Quote:
Originally Posted by jjshabado
I was thinking more generally about students that 'get' using advanced functions or mutating/operating on existing variables even when a specific function hasn't been spelled out to them.

Even with a substring lesson I bet there are still a bunch of students who would do the above assignment with the myName = "bi"; solution.

Another common example is when students have to build an array of something (say convert a string of your name to an array of single letters) and they just hardcode the size of the array instead of figuring it out dynamically.

Still, you could easily be right that there's not much to conclude there. At least not much more than "People that do better on assignments at time X" are generally going to be better at a related task at time X+Y.
i mean, the examples you're giving are so simple i'm inclined to say yes, if students aren't getting those things right from the start, they are probably not going to be great programmers. but otoh, if you are getting them, you have demonstrated basic competence and nothing more. if i saw some beginning student chaining together method calls without being told to, or passing around functions as objects on his own, then i would think wow, that shows some promise.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-19-2013 , 10:03 AM
I feel like we're talking about slightly different things. I'm not really talking about judging the skill of the person at that point in time (in terms of basic competence or showing promise). More about using the relative ease with which they learn and think about ways to have the computers do stuff for you dynamically to extrapolate out how good of a programmer they will be in the future.

Maybe a different example would help. Someone just learning to program that fails an assignment because they made a last minute change they didn't compile/test isn't that indicative of a poor programmer (they have a bad habit that can easily be overcome). I don't think categorizing students based on this type of error early in their learning would help predict their future abilities as programmers.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-19-2013 , 10:22 AM
If he's already showing this promise, he's probably under-cutting himself by using code academy.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
08-19-2013 , 10:26 AM
How do you determine a great programmer? Is it someone who is writing sick open source stuff being used by a ton of people, or is it the guy just shredding through relatively easy code incredibly efficiently/elegantly? Some combination of the two?

I'll prolly never try to tackle super complicated issues on my own, since so many people (at least in the ruby community) are already covering my ass. I do enjoy writing really well structured, easy to read/maintain code, and doing it quickly. Some of the stuff I've seen other significantly more experienced web developers write, is quite simply atrocious.

Anyway, I just started a blog to try to help people with some more complicated problems I've encountered in things like angular/rails, since most online resources don't really go through things like testing, or some of the more difficult fringe cases. I want to cover some end to end applications with slightly more complex features, including some test coverage. I'm sick of seeing terrible code everywhere I go :P
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m