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

10-29-2014 , 10:06 AM
I'm kinda surprised by these answers. I think the topic of pay is a huge thing to avoid in interviews. The strategy I have always used is to do as well in the interview as possible, and then after once they make an offer, then you negotiate. It is usually a back and forth type call with an HR or recruiter type person and the process simplifies down to strictly speaking about compensation and coming to an agreement.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-29-2014 , 02:13 PM
Quote:
Originally Posted by kerowo
Friend of mine is applying at Salesforce and is writing an entire app for them, scheduled to take a week...
Interesting form of outsourcing...I'd turn it in GPLed.

Realized a couple of days ago that my new desk can be turned into a standing desk...trying that a couple of hours/day now...also running a little python script at the moment that collects tweets from the 1% sample and stores them in MongoDB*. If my rough estimate is right I should have 20ish GB of data to play with tomorrow...yay

Which reminds me...since this is just a crude test I'm just running the script and ctr+c-ing it after 24h. Then play with the data and think about a decent data collection strategy. I'm assuming the default way of having a script that you can run for N-time is just turning it into a deamon?

*just picked it because it's supereasy to dump the JSON you get from the API into the DB. I'll think about a good DB and the like later (SQL Schema shouldn't be too hard to construct for Tweets). Eventually I'll probably want to go the whole "Data Warehouse" route and ETL data from different sources (thinking of also using Thrift maybe)

Last edited by clowntable; 10-29-2014 at 02:24 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-30-2014 , 09:48 PM
In regards to the pay issue, the company I work for doesn't exactly look like a place that earns or pays much money. I mean, it was pretty obvious to me just from walking to the interview room that they weren't going to pay much money.

In other news, I got 2 rejection letters today.

One from about a month and a half ago, where the guy on the phone was "shocked" that I wasn't working at a better job "considering my knowledge and experience." This rejection letter felt rather pointless since the promised interview was never set up. I probably would have begged out anyways.

The second was from last week's interview. The test was easy as cake, but they were talking a much higher level of difficulty at the interview, which I'm pretty confident I could handle.

The reason for both? My lack of experience. I mean, really? People are contacting me about mid-level and senior-level jobs, bringing me in for interviews, then finally looking at my resume to see I have no experience? I must be missing something obvious here, but I really don't know what.

Rejection letters really bother me. I'm going to make it clear from now on that I don't want to know if I didn't get the job. I tend to forget about the experience and move on. I don't appreciate the reminder.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-30-2014 , 09:58 PM
I think asking for no rejection letter is a terrible idea. It signals all kinds of negative qualities that will make getting the job harder. It also conveys weakness which also won't help you.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-30-2014 , 10:11 PM
Do you prefer to leave code like:

doHoldem("nl")
doHoldem("limit")

or write the functions:

doNlHoldem()
doLimitHoldem()
?

It's a choice between having more methods or having to remember the calling conventions. And aesthetics. The implementation would be about the same either way, no big if statement or anything.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-30-2014 , 10:16 PM
I prefer making them separate methods, especially if it is a public interface. Making the interface easy to understand and use is the most important thing.

If they share a lot of logic, you might have a private method that takes the parameter. So...

Code:
public:
doNlHoldem()
doLimitHoldem()

private:
doHoldem(gameType)

implementation:
doNlHoldem()
{
  doHoldem("nl")
}

doLimitHoldem()
{
  doHoldem("limit")
}

doHoldem(gameType)
{
  ... stuff ...
}

Last edited by Benholio; 10-30-2014 at 10:23 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-30-2014 , 10:28 PM
Lol the first way is so java.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-31-2014 , 12:03 AM
Quote:
Originally Posted by blackize5
I think asking for no rejection letter is a terrible idea. It signals all kinds of negative qualities that will make getting the job harder. It also conveys weakness which also won't help you.
What if they say something like "We'll let you know either way. We don't like to leave people hanging"?

I guess I still can't, but I really don't see the point.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-31-2014 , 12:07 AM
I think I'd rather have two methods. One Limit, one NL. Think about it if you wanted to add more and more variations. Passing a single string is sort of odd since you'd have a game loop that is some method of Limt, NL, PL, SL, etc. I think that, long term, the reuse will be much easier with methods. There is nothing wrong with {str : func()} to represent the same thing though. That will kill off the if statements, plus the player can choose a game by entering a string.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-31-2014 , 08:52 AM
I agree you can't say anything, but I'm with you on rejection letters. So ****ing pointless. We'll send a follow up email within a couple of days saying either yea/nea. But the main goal of a rejection email, imo, is to let the person stop having false hope and give them closure on the experience.

A ****ing letter that takes 6 weeks doesn't do that and just makes the sender feel good with absolutely no benefit to the candidate.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-31-2014 , 09:00 AM
Quote:
Originally Posted by Benholio
I prefer making them separate methods, especially if it is a public interface. Making the interface easy to understand and use is the most important thing.
I would generally lean towards separate methods, but it depends on how you imagine the interface is going to be used.

For example say you were building some library that you were expecting other people to use and that you were expecting to add more support for future types of poker. If you make the methods like "doNlHoldem" it may make the life of your callers more difficult. It can mean they have annoying versioning issues where they have a really tight dependency on specific versions of your library.

If you do something like:

Code:
enum GameType {
  NL,
  LIMIT
}

doPoker(GameType gameType)
Then you kind of get the best of both worlds. It's still pretty easy for people to know how to call your method because you have the GameType enum (so they don't have to know magic strings) but the caller of your library can have a lot more flexibility in what versions of your code they use.

So if you added a new game "Omaha" they'd be able to compile against any version of your library and then just in their own code check if "Omaha" is in your GameType enum and handle the error dynamically on their end.

This is kind of a special circumstance but I've been working with a lot of open source projects the last couple of years and this is a sort of common problem.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-31-2014 , 09:17 AM
Instinctively, I'd first look at making it something along the lines of:

doHoldem(new NoLimitRuleSet());
doHoldem(new LimitRuleSet());

... and derive those from a polymorph base class. So you could put it into a factory.

Thinking ahead, particularly wrt Omaha variations, I'd explore if the decorator pattern would be more useful, though, and call it doPoker() as jjshabado did.

There are plenty YAGNI pitfalls along that road, though. So choose wisely.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-31-2014 , 10:35 AM
Random rambling: I created a stackoverflow account today.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-31-2014 , 12:09 PM
Quote:
Originally Posted by daveT
The reason for both? My lack of experience. I mean, really? People are contacting me about mid-level and senior-level jobs, bringing me in for interviews, then finally looking at my resume to see I have no experience? I must be missing something obvious here, but I really don't know what.
Dave,

Don't read too much into the reasoning. They feel like they have to let you know why so they just make up some reason. Usually a company is only interviewing for 1 position, so you could be a pretty awesome option, but if one guy is ahead of you, they give the position to that guy.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-31-2014 , 03:28 PM
Quote:
Originally Posted by jjshabado
Code:
enum GameType {
  NL,
  LIMIT
}

doPoker(GameType gameType)
Then you kind of get the best of both worlds. It's still pretty easy for people to know how to call your method because you have the GameType enum (so they don't have to know magic strings) but the caller of your library can have a lot more flexibility in what versions of your code they use.
I like it.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-31-2014 , 06:49 PM
Quote:
Originally Posted by Allen C
Do you prefer to leave code like:

doHoldem("nl")
doHoldem("limit")

or write the functions:

doNlHoldem()
doLimitHoldem()
?

It's a choice between having more methods or having to remember the calling conventions. And aesthetics. The implementation would be about the same either way, no big if statement or anything.
this is the equivalent of a new 2p2 poster asking: "when you get aces preflop, is it better to slowplay or go all in?"

there's just so much missing context and so many "it depends" factors

that said, i'd probably never do it by passing in strings. but whether you do it with named methods or something like kazana suggesed or something else entirely.... well, it depends.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-31-2014 , 07:47 PM
Quote:
Originally Posted by clowntable
Random rambling: I created a stackoverflow account today.
Sort of like mud wrestling. Fun to watch but not fun to do.

My rep is a bit over 350 after about two years.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-02-2014 , 12:19 AM
clowntable;

Is it time to update your avatar?



I like the old fish better.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-02-2014 , 12:20 AM
X posting from Excel topic

Trying to learn a little VBA and this is frustrating the hell out of me

Just looking to retrieve something from the HTML on a web page

Here is the Source



I want to retrieve the value $120

I'm trying this code

Public Sub GetWinningsDD()
Dim IE As New InternetExplorer
IE.Visible = False
IE.navigate "https://www.draftday.com/myGames.php"
Do
DoEvents
Loop Until IE.readyState = READYSTATE_COMPLETE
Dim Doc As HTMLDocument
Set Doc = IE.document
Dim sDD As String
sDD = Doc.getElementsByClassName("winning_value")(0).inn erText
Range("winnings_DD").Value = sDD
End Sub

But it keeps giving me an error

"Run time error 91
Object Variable or With Block variable not set"

With the debugger highlighting the sDD = Doc.getElementsByClassName("winning_value)(0).inne rText line as the problem

However when I change the class name to another class name in the source code, say "mygames", it returns the innerText for me with no problem. The weird thing is only some class names appear to work and some give me the error message above.

What is going on? Help anyone?

EDIT: for some reason innerText is showing up weird on the forum, it's not typed incorrectly FYI
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-02-2014 , 04:00 AM
Not super experience on scraping with VBA, but I think you need to specify the element in your code as well. The div you are calling is nested in another div, so there may be an issue there as well.

There's a few varieties of this in the link below, but they seem to be using this GetElementsByTagName along with the class name getter.

Code:
my_rate = ie.Document.getelementsbyclassname("br-col-2 br-apr")(1).getElementsByTagName("div")(0).innertext
http://stackoverflow.com/questions/2...msxml2-methods
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-02-2014 , 04:52 AM
I'm pulling sales data via the eBay API. I'm exporting with JSON, inserting into a JSON column in PostgreSQL, then processing it into normal tables with after-insert triggers. Some of the tables have PKs on order_id.

The bug, if I left it unfixed: When the end-user imports sales history again, the PK causes unique constraint error, which causes the transaction to fail. Preventing sales re-import is out of the question.

In order to allow sales history re-imports, I'm adding this to the triggers:

Code:
if t_oid not in (select order_id from my.table) then
....
If the order_id is already in the my.table, the function returns null and no data is added to the my.table.

This is fine up to a fairly small size, but will become a major issue when my.table gets large. If the my.table is 10,000 rows and I'm importing 1,000 sales, I'm looking at 10,000,000 non-indexed comparisons, which is far from desirable. Even with and index, I don't think this will scale well.

I'm either stuck with this or I am approaching this problem completely wrong. I don't see how it is possible to get around querying the table though. I could do partitioning, but automatically partitioning probably requires using C (hooray!) and rolling my own (boo!).
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-02-2014 , 05:25 AM
nvm.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-02-2014 , 08:09 AM
Quote:
Originally Posted by daveT
clowntable;

Is it time to update your avatar?



I like the old fish better.
Old one forever and always. LibreSSL, switch in the mail department and nginx seems to be gone with the next release. The nginx discussion is fairly interesting. Seems like they are doing some sick optimization work.

Quote:
The bug, if I left it unfixed: When the end-user imports sales history again, the PK causes unique constraint error, which causes the transaction to fail. Preventing sales re-import is out of the question.
Am I understanding your problem correctly? You basically want something like MySQL's "insert ignore" or basically you want to upsert? Maybe this is helpful?
http://www.the-art-of-web.com/sql/upsert/

Last edited by clowntable; 11-02-2014 at 08:20 AM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-02-2014 , 12:44 PM
Quote:
Originally Posted by NxtWrldChamp
X posting from Excel topic

Trying to learn a little VBA and this is frustrating the hell out of me

Just looking to retrieve something from the HTML on a web page

Here is the Source



I want to retrieve the value $120

I'm trying this code

Public Sub GetWinningsDD()
Dim IE As New InternetExplorer
IE.Visible = False
IE.navigate "https://www.draftday.com/myGames.php"
Do
DoEvents
Loop Until IE.readyState = READYSTATE_COMPLETE
Dim Doc As HTMLDocument
Set Doc = IE.document
Dim sDD As String
sDD = Doc.getElementsByClassName("winning_value")(0).inn erText
Range("winnings_DD").Value = sDD
End Sub

But it keeps giving me an error

"Run time error 91
Object Variable or With Block variable not set"

With the debugger highlighting the sDD = Doc.getElementsByClassName("winning_value)(0).inne rText line as the problem

However when I change the class name to another class name in the source code, say "mygames", it returns the innerText for me with no problem. The weird thing is only some class names appear to work and some give me the error message above.

What is going on? Help anyone?

EDIT: for some reason innerText is showing up weird on the forum, it's not typed incorrectly FYI
dear god.

try this instead: https://www.parsehub.com/

EDIT: as for your specific error, it's possible there are other DOM elms with the same class and one of those is first... also possible the page has iframes

Last edited by gaming_mouse; 11-02-2014 at 01:04 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-02-2014 , 12:48 PM
Quote:
Originally Posted by daveT
I'm pulling sales data via the eBay API. I'm exporting with JSON, inserting into a JSON column in PostgreSQL, then processing it into normal tables with after-insert triggers. Some of the tables have PKs on order_id.

The bug, if I left it unfixed: When the end-user imports sales history again, the PK causes unique constraint error, which causes the transaction to fail. Preventing sales re-import is out of the question.

In order to allow sales history re-imports, I'm adding this to the triggers:

Code:
if t_oid not in (select order_id from my.table) then
....
If the order_id is already in the my.table, the function returns null and no data is added to the my.table.

This is fine up to a fairly small size, but will become a major issue when my.table gets large. If the my.table is 10,000 rows and I'm importing 1,000 sales, I'm looking at 10,000,000 non-indexed comparisons, which is far from desirable. Even with and index, I don't think this will scale well.

I'm either stuck with this or I am approaching this problem completely wrong. I don't see how it is possible to get around querying the table though. I could do partitioning, but automatically partitioning probably requires using C (hooray!) and rolling my own (boo!).
can you give a specific example with a little sample data. i can't quite understand the problem.

based on what i do understand, though, it sounds like there would be a simpler solution.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m