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

07-20-2013 , 08:48 AM
It took 10+ seconds to load for me too.

The site has serious problems with some versions of IE and Opera. I don't think they implemented #! correctly (which was a mistake to use to begin with IMO), because I've had other #! sites work fine with Opera.

It just loads the sub-page, shows the #! fragment and instantly redirects back to the root page but it loads the content in for each sub-page. It basically makes the site impossible to bookmark because it always shows the root URL regardless of what page you're on.

I like the black and white theme though because it brings even more focus to the photos and videos which seem to clearly be the focal point of the site.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-20-2013 , 09:59 AM
Thank you so very much guys!


** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-20-2013 , 03:09 PM
Quote:
Originally Posted by jjshabado
Pointing out to someone that questions that they called OOP questions aren't actually OOP questions just seems dickish. Why does it matter?

I don't think I would want to work with someone that corrects me on every meaningless mistake I make.
And I wouldn't want to work for someone who thinks that it is ok to have a non-technical person ask me questions about OOP.

Clearly shows that they value technical expertise very little.

Quote:
this +1000. i feel like as a general rule certain programmers are the worst offenders against this advice, and cannot help nitpicking on technical errors (about names, definitions, grammar, you name it) even when the intention and meaning of the person they're correcting is crystal clear. it's an insufferable trait.
You can politely answer the questions and point out that some of them aren't quite about OOP. There's other responses than "LOLWTF NOT AN OOP QUESTION HARAHR IMA REDDIT THIS ****"
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-20-2013 , 04:08 PM
Quote:
Originally Posted by jjshabado
Slightly unrelated I'd be unimpressed with a company that interviewed by pretending to be people they aren't. To me it's disrespectful of the idea that we're there to get to know each other and decide if this is a good fit.
There are jobs that require you to explain difficult ideas to people who don't know any better.

Simulation is certainly better than asking "What would you say to xzy person about..."

Quote:
I actually don't care about if the woman is an HR person or their best programmer I don't see the value in discussing if those questions are OOP or not.
Well, okay, now I'm having a huge drawn out discussion about what is or is not OOP with someone.

Quote:
Originally Posted by clowntable
And I wouldn't want to work for someone who thinks that it is ok to have a non-technical person ask me questions about OOP.

Clearly shows that they value technical expertise very little.


You can politely answer the questions and point out that some of them aren't quite about OOP. There's other responses than "LOLWTF NOT AN OOP QUESTION HARAHR IMA REDDIT THIS ****"
this and this...
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-20-2013 , 04:25 PM
Quote:
Originally Posted by LirvA
hi hi hi there. I was wondering if someone that knows about web site building/design could do me a favor? An indie band I really love made a new website, and they need constructive feedback, but I don't know **** about web sites. Anyone have any advice? Thanks.

http://www.chaoschaosmusic.com/
Using firefox. Most of the pages load okay for me. I am on a laptop and that top header is a bit too large for my taste since it takes up over 50% of my screen.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-20-2013 , 11:57 PM
Quote:
Originally Posted by LirvA
hi hi hi there. I was wondering if someone that knows about web site building/design could do me a favor? An indie band I really love made a new website, and they need constructive feedback, but I don't know **** about web sites. Anyone have any advice? Thanks.

http://www.chaoschaosmusic.com/
imo, when you click to one of the subpages such as news/photos/etc, the resulting page should show withOUT the main banner image. its a waste of screenspace

other than that i like the site, clean and simple
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-21-2013 , 01:23 AM
Anyone here happen to be an SRE (site reliability engineer)?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-21-2013 , 01:31 AM
yo

Last edited by tyler_cracker; 07-21-2013 at 01:31 AM. Reason: mas o menos
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-21-2013 , 07:38 PM
So, I have a really vague question about Git because I'm bad at it. My repository from this thread is getting a bit of attention now and I may be about to face my first non-trivial pull request from this guy. I haven't looked closely at his code and have no idea if I want it, but I do know that the changes are substantial enough that I'd want to at least test it on my own machine before merging it. Should I bypass github's pull request feature completely and just pull it to my own machine first? Is there anything special I should do so that this doesn't mess him up somehow?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-21-2013 , 08:00 PM
Quote:
Originally Posted by Xhad
Should I bypass github's pull request feature completely and just pull it to my own machine first?
yes.

Quote:
Is there anything special I should do so that this doesn't mess him up somehow?
no.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-21-2013 , 08:08 PM
xhad, this answers your questions: https://help.github.com/articles/merging-a-pull-request
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-21-2013 , 09:24 PM
ty both of you
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-22-2013 , 12:16 PM
Anyone want a no strings attached and free (no CC required) 2 day pass to code school?

http://go.codeschool.com/6wcnmw

What's in it for you?
Sign up in 5 seconds with an e-mail account and password then instantly get full access to dozens of ruby/js courses for 48 hours.

What's in it for me if you sign up with my affiliate code?
I get +2 days credited to my account.

What's in it for you? [part 2]
You also get the ability to get 2 free days added to your account even if you don't pay as they will give you your own affiliate code.

Last edited by Shoe Lace; 07-22-2013 at 12:23 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2013 , 05:12 AM
I was going to post a thread but I guess this is probably a better place for it. I think I learn better by doing so to learn python I decided to just kick off with a few projects and use stackoverflow [a lot]. None of them have been finished but I wrote them in a really noobish innefficient procedural way. Since then I have discovered the concept of OOP and watched as many beginner vids as I could find on the subject. The problem I am having is I can't seem to get my head around how I would implement OOP as a solution for one of my projects.

The main project I started was to scrape and process 'play by play' (although we wouldn't really call it that here in the UK) soccer data from the bbc website. Obviously the code is a huge mess as the data is so messy and variable to begin with. But I actually got it to work pretty well. Some games the number of shots were out by 1 or corners out by 1 but I ended up with a script that could give me a DB containing all subs made, all yellow and red cards, all penalties scored and missed, all corners, all goals, all shots on/off target. I think this is why I can't get my head around using an OOP approach - I ended up with so much different data and just muddled along in order to handle it.

I guess what I am after is either:
- some tutorial somewhere which details a more practical use of OOP than creating a person and giving him a dob and a surname.

- a good example of some code that would help me understand

- or most preferably just someone to give me an example in terms of my project of how OOP could/should be used.

A sample of the play by play (text commentary) is here - http://www.bbc.co.uk/sport/0/football/21992293 - near the bottom of the page.

My approach was (after finding the teams, squads and game urls) was to go through the text commentary element by element stripping the the time and using that and then searching for key words such as goal, corner, etc. I am at work at the moment but I could post a the code if necessary (not sure anyone would understand it as it was such a mess and before I recognised the necessity of comments)

I am pretty sure if I could get my head around this I could write it, but for some reason this is a huge mental block for me.

/noob
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2013 , 05:34 AM
evan, it's hard for me to even imagine what you are fundamentally trying to do based on that description. right now, it's basically like "hey i collected a bunch of unrelated random data and stored it." but why is that data important? how do the pieces of the data relate to one another in a larger context? lacking any conceptual focus will make it impossible to create a OO model.

so the first thing is to stop thinking about that web page, or the details of scraping. but how do *you* think about this stuff? why is this data imporant to you? what are you trying to do with it? that should begin to allow you to locate key concepts that you want to build your model around.

if you start by doing that i could probably give you more specific advice.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2013 , 06:28 AM
Quote:
Originally Posted by gaming_mouse
evan, it's hard for me to even imagine what you are fundamentally trying to do based on that description. right now, it's basically like "hey i collected a bunch of unrelated random data and stored it." but why is that data important? how do the pieces of the data relate to one another in a larger context? lacking any conceptual focus will make it impossible to create a OO model.

so the first thing is to stop thinking about that web page, or the details of scraping. but how do *you* think about this stuff? why is this data imporant to you? what are you trying to do with it? that should begin to allow you to locate key concepts that you want to build your model around.

if you start by doing that i could probably give you more specific advice.
Thanks for the reply.

It is a hard question for me to answer because I have almost no idea what I was thinking at the time. I think in my head it was

1. Scrape data put it in database
2. USE DATA ???

Which is obviously not helpful in anyway. I thought the tricky questions would arrive when I was building the part of my project that was going to use or analyse the data - the scraping kinda just seemed like the initial grunt work that allowed me to do something a bit cleverer.

I get the feeling I am not answering your question at all. One of my aims was to create a cleaned up timeline of each game. Showing all these key events and their time.

The more I think about this the more confused I get, sorry if I haven't really helped. I feel like I am thinking on level 0 here.

edit/ After thinking and re-reading your post. My plan (and infact what I did) was to create an events table in my db. Each event would be inserted with a team_id, game_id and some sort of time field (representing the game time when the event occured). So the code would just need to do this efficiently. I never really got to the stage of using the data for anything although that was obviously the plan.

Last edited by evanthething; 07-23-2013 at 06:38 AM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2013 , 08:11 AM
Quote:
Originally Posted by clowntable
And I wouldn't want to work for someone who thinks that it is ok to have a non-technical person ask me questions about OOP.

Clearly shows that they value technical expertise very little.
Unless you have very little technical expertise, like me
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2013 , 08:24 AM
Quote:
Originally Posted by evanthething
Thanks for the reply.

It is a hard question for me to answer because I have almost no idea what I was thinking at the time. I think in my head it was

1. Scrape data put it in database
2. USE DATA ???

Which is obviously not helpful in anyway. I thought the tricky questions would arrive when I was building the part of my project that was going to use or analyse the data - the scraping kinda just seemed like the initial grunt work that allowed me to do something a bit cleverer.

I get the feeling I am not answering your question at all. One of my aims was to create a cleaned up timeline of each game. Showing all these key events and their time.

The more I think about this the more confused I get, sorry if I haven't really helped. I feel like I am thinking on level 0 here.

edit/ After thinking and re-reading your post. My plan (and infact what I did) was to create an events table in my db. Each event would be inserted with a team_id, game_id and some sort of time field (representing the game time when the event occured). So the code would just need to do this efficiently. I never really got to the stage of using the data for anything although that was obviously the plan.
yes this makes sense.

you have two independent issues here:

1. what is the point of doing this to begin with? this is real "why?" and should be answered first. this isn't a coding thing, per se, it's just, like, life advice. once this is answered, you will have to tackle creating the OO model for the application you intend to build.

having said that, sometimes you just want to hack around, or maybe your only point was to scrape data because you wanted to practice scraping data. and then you noticed that your data scraping code, in itself, was messy and wanted to organize it better.

2. is there a good OO model for the data scraping task itself? almost surely there is, and i'll try to answer this later if i have some time. it would help though if you just list all the pieces of data you were collecting.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2013 , 08:33 AM
A few lines of the raw data before you start parsing it would be good too, showing some data you want and some you don't want.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2013 , 08:46 AM
1. I think you hit the nail on the head really, I think I learn better when I am doing rather than reading or watching so I was just messing around and had no real plan.

2. This is pretty much how the code I wrote worked but without the detail.

- I used beautifulsoup to get all of the text commentary.
- for loop to iterate through each entry of commentary
- then a bunch of if statements to determine what was being shown in that section of commentary. Lots of copying and pasting and repeating myself, which even back then I knew was bad.

The data I was collecting:

Corners
Shots
Goals
- Scored Penalties
- Missed Penalties
- Own Goals
Yellow Cards
Red Cards

For each game, obviously with an indicator to say which team the action belonged to. I wasn't doing anything in python with this data other than finding it and then writing it into my DB, in the following form.

- Code for the action (ie corners were 1, goals 2 etc or something like that)
- Code for the player (which linked to player table)
- Code for the team (which linked to team table containing all the teams and their division)
- Code for the game (which linked to a separate table which contained some more general info about each game)

Thinking back I have no idea how I actually did all of this given I had no idea what I was doing.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2013 , 08:56 AM
Quote:
Originally Posted by kerowo
A few lines of the raw data before you start parsing it would be good too, showing some data you want and some you don't want.
Hi,

http://www.bbc.co.uk/sport/0/football/21992293

From the top (excluding full time):

Quote:
90:00 +4:42 Corner taken left-footed by Robin van Persie from the right by-line, Rio Ferdinand takes a shot. Save made by Joe Hart.
My code took the time, converted that to a float and added the 'injury' time on.

-On the first (True) if statement [corner] it would activate once it saw the word corner and then use player name (RVP) to get the team id and then it would put all this data in the Events table in the DB.

- then on the next (True) if statement [shot] it would see the word shot, then find the player (and his id) use that to find the team id and then put that as another event in the DB.

I can remember running into lots of problems when the same timestamp (ie 90.00+4.42) contained 2 different corners. I also remember problems when the order of words was different, ie (RVP takes a corner, as opposed to, corner taken by RVP). I have no idea now how i solved these problems.

I will look for the code later and post it. Might prove for some pretty funny reading as it isn't commented in any useful way.

Thanks for the time and help everyone.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2013 , 06:31 PM
So I reworked the way I was minifying my angularjs app, pulled out jquery (used very sparingly) and angular to google's cdn, and now am basically serving up 3 different 70kb javascript files on the initial page load... and I'd imagine most people would have angular and jquery cached.

Is that pretty reasonable? It surely beats the 350kb slug I was rifling at people a couple of days ago.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2013 , 06:39 PM
Quote:
Originally Posted by Nchabazam
So I reworked the way I was minifying my angularjs app, pulled out jquery (used very sparingly) and angular to google's cdn, and now am basically serving up 3 different 70kb javascript files on the initial page load... and I'd imagine most people would have angular and jquery cached.

Is that pretty reasonable? It surely beats the 350kb slug I was rifling at people a couple of days ago.
i think that kind of size is pretty common and considered acceptable these days. personally i like to be much smaller, but if your customers are using desktops with decent internet connections i don't think it matters practically too much
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2013 , 06:44 PM
Quote:
Originally Posted by evanthething
Hi,

http://www.bbc.co.uk/sport/0/football/21992293

From the top (excluding full time):



My code took the time, converted that to a float and added the 'injury' time on.

-On the first (True) if statement [corner] it would activate once it saw the word corner and then use player name (RVP) to get the team id and then it would put all this data in the Events table in the DB.

- then on the next (True) if statement [shot] it would see the word shot, then find the player (and his id) use that to find the team id and then put that as another event in the DB.

I can remember running into lots of problems when the same timestamp (ie 90.00+4.42) contained 2 different corners. I also remember problems when the order of words was different, ie (RVP takes a corner, as opposed to, corner taken by RVP). I have no idea now how i solved these problems.

I will look for the code later and post it. Might prove for some pretty funny reading as it isn't commented in any useful way.

Thanks for the time and help everyone.
evan,

super cliffs version of a likely appropriate refactoring. first read this:

http://sourcemaking.com/refactoring/...h-polymorphism

so you'd create strategy objects for each of the event types you are trying to scrape. i'd have at least two methods on those objects: one for detecting if they applied to a given piece of text, and one for parsing the text to pull out the relevant data.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2013 , 10:01 PM
Omfg, my Das Keyboard is ready for pick up.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m