Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...
my standard interview qs are usually along the lines of "implement String.Replace" but I don't actually name string.replace and i also don't say you can't use it

if they ask me if they can use it i give them the most mental points; if they don't ask, but just use it, i give them a few less mental points (because you're just being a smartass and wasting time, or you don't know to ask questions) and then i tell them they cant use it because i want to watch them write some code and see how they debug it

like the purpose of the question is to ask you to write something you've probably never written before, i obviously know how it's supposed to work or i wouldn't be asking, you can ask me questions, and then i get to watch you write and debug a method.

if you just bang it out because you memorized it, cool, now i have to come up with something you haven't seen

Adbot
ADBOT LOVES YOU

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...
library functions are a rich mine of interview questions specifically because you probably have never written the code that does that before because it's actually in the library

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...
like quick, implement string.contains

it's not as easy as you might think

Nomnom Cookie
Aug 30, 2009



string.indexof != -1

doesnt seem that bad. what kind of job do u interview for exactly?

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

Nomnom Cookie posted:

string.indexof != -1

doesnt seem that bad. what kind of job do u interview for exactly?

"cool, now do it without that function"

you know what i'm actually asking for, though, so after the first couple of times you do that you're just being annoying

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...
also i interview people to be on a development team

Nomnom Cookie
Aug 30, 2009



so now we're both annoyed, seems fair to me

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

Nomnom Cookie posted:

so now we're both annoyed, seems fair to me

i mean if you're going into the interview adversarially cool i guess?

i want to watch you write code so i know you have a decent coding and testing process, whether you successfully implement the algorithm is actually pretty insignificant

Nomnom Cookie
Aug 30, 2009



make it something fun then like generating a voronoi diagram

power botton
Nov 2, 2011

Nomnom Cookie posted:

make it something fun then like generating a voronoi diagram

d3.geom.voronoi()

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

Nomnom Cookie posted:

make it something fun then like generating a voronoi diagram

actually a pretty fantastic idea, i'll come up with some less boring ones

Nomnom Cookie
Aug 30, 2009



git clone trooper posted:

d3.geom.voronoi()

programming test for javascript devs: make an ajax call using raw xhr

jony neuemonic
Nov 13, 2009

Nomnom Cookie posted:

programming test for javascript devs: make an ajax call using raw xhr

it's really sad how many people would get tripped up by this

Notorious b.s.d.
Jan 25, 2003

by Reene

Dessert Rose posted:

library functions are a rich mine of interview questions specifically because you probably have never written the code that does that before because it's actually in the library

i don't write that code because it is already in the standard library

very little of business application programming involves designing novel algorithms or even implementing old ones

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

Notorious b.s.d. posted:

i don't write that code because it is already in the standard library

very little of business application programming involves designing novel algorithms or even implementing old ones

yeah i dont do the whole business application programming thing, so

Nomnom Cookie
Aug 30, 2009



Notorious b.s.d. posted:

i don't write that code because it is already in the standard library

very little of business application programming involves designing novel algorithms or even implementing old ones

this kind of thinking is how you get poo poo like solr cloud, that stores its "cluster state" in zookeeper and then has an ad hoc, informally-specified, bug-ridden, slow implementation of consensus for the data storage

JewKiller 3000
Nov 28, 2006

by Lowtax
well the pre-solr-cloud solution is usually to shard by primary key mod number of masters, and hope you have enough replicas for each one. then when you want to add more nodes, you have to reindex everything. so i guess it's an improvement over that

Nomnom Cookie
Aug 30, 2009



its possible that solr cloud is better than doing it yourself. iffy though. today i bounced a shard leader and when it came back up and everyone was synced, the leader had fewer documents than the replica. touch wood and pray it doesn't happen in prod

hubris.height
Jan 6, 2005

Pork Pro
i am a terrible programmer and have only done things of significance in python

i want to make a script that goes through every page of the YOSPOS music thread and stores the URLS in a txt file that I can then turn to html and create a playlist from.

for the first part of this, and imho the most challenging, i need to make a script to parse all the vid urls from the thread. what is the best language to use for this process and will i need to use something that can log me in to do this? thx in advance

yours in christ,

hubris

Stringent
Dec 22, 2004


image text goes here

hubris.height posted:

i am a terrible programmer and have only done things of significance in python

i want to make a script that goes through every page of the YOSPOS music thread and stores the URLS in a txt file that I can then turn to html and create a playlist from.

for the first part of this, and imho the most challenging, i need to make a script to parse all the vid urls from the thread. what is the best language to use for this process and will i need to use something that can log me in to do this? thx in advance

yours in christ,

hubris

mechanize/nokogiri makes this pretty trivial to do in ruby, iunno what the python equivalent is off the top of my head and hosed if i'm googling it

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
there's mechanize for python but I have no idea if it's any good

I've done similar things using requests and lxml

a cyberpunk goose
May 21, 2007

hubris.height posted:

i am a terrible programmer and have only done things of significance in python

i want to make a script that goes through every page of the YOSPOS music thread and stores the URLS in a txt file that I can then turn to html and create a playlist from.

for the first part of this, and imho the most challenging, i need to make a script to parse all the vid urls from the thread. what is the best language to use for this process and will i need to use something that can log me in to do this? thx in advance

yours in christ,

hubris

use BeautifulSoup to parse the html conveniently, pull next page urls and keep the loop goin

i know cuz i wrote an image scraper for the image thread like 2 years ago

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
so you're the one who did this. :ms:

a cyberpunk goose
May 21, 2007

Symbolic Butt posted:

so you're the one who did this. :ms:

lol someone saved this
hahahaha

yes that is mine

a cyberpunk goose
May 21, 2007

oct 3rd 2010

i wrote that script while also filming live TV

was chillin in a closet filming a city council meeting on the sony anycast x/y camera control thing, lots of downtime during presentations to the city planning committees etc so i'd just do stupid poo poo like this

thats my story

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
I found it when I was looking around urllib on google

makes you think the way your code was immortalized on the web like this

a cyberpunk goose
May 21, 2007

Symbolic Butt posted:

I found it when I was looking around urllib on google

makes you think the way your code was immortalized on the web like this

how did you feel bumpin into a script so specific

Mr SuperAwesome
Apr 6, 2011

im from the bad post police, and i'm afraid i have bad news
beautiful soup is legit i wrote a thing in that to check driving tetss and saved a bucnh of money. cheers beautiful soup

Notorious b.s.d.
Jan 25, 2003

by Reene

Nomnom Cookie posted:

this kind of thinking is how you get poo poo like solr cloud, that stores its "cluster state" in zookeeper and then has an ad hoc, informally-specified, bug-ridden, slow implementation of consensus for the data storage

if you set out to write a business application and you ended up reimplementing the ZAB consistency protocol for your distributed system holy poo poo you hosed up

also this is kind of an unknown unknowns situation. extended familiarity with red/black trees and "500 algorithm questions for java!" textbooks will not arm you with the knowledge you need to identify attempts to violate the CAP theorem or implement paxos.

i know just enough to know i'm dangerous and stay the gently caress away.

Notorious b.s.d. fucked around with this message at 07:31 on Oct 20, 2013

Notorious b.s.d.
Jan 25, 2003

by Reene

Nomnom Cookie posted:

its possible that solr cloud is better than doing it yourself. iffy though. today i bounced a shard leader and when it came back up and everyone was synced, the leader had fewer documents than the replica. touch wood and pray it doesn't happen in prod

how do you feel about elastic search

that's the new hotness that the dudes at $OLDJOB were trying to sell as a solr replacement. (i am pretty sure they just picked libraries/systems based on what got upvoted on HN though)

Nomnom Cookie
Aug 30, 2009



Notorious b.s.d. posted:

how do you feel about elastic search

that's the new hotness that the dudes at $OLDJOB were trying to sell as a solr replacement. (i am pretty sure they just picked libraries/systems based on what got upvoted on HN though)

I haven't used it at all, ever. i'm sure it's a viable alternative at the very least

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror

hubris.height posted:

i am a terrible programmer and have only done things of significance in python

i want to make a script that goes through every page of the YOSPOS music thread and stores the URLS in a txt file that I can then turn to html and create a playlist from.

for the first part of this, and imho the most challenging, i need to make a script to parse all the vid urls from the thread. what is the best language to use for this process and will i need to use something that can log me in to do this? thx in advance

yours in christ,

hubris

this is not a hard project so it would be a good opportunity (imo) to "dip your feet" into a real language. PHP could do this v easily with either the basic built-in curl_* functions, or, if you want to go fancy, the http extension and the HttpRequest class. you don't need to worry about logging in or anything, just copy your "bbuserid" and "bbpassword" cookies. regex the html for urls and you're done.

Socracheese
Oct 20, 2008

hubris.height posted:

i am a terrible programmer and have only done things of significance in python

i want to make a script that goes through every page of the YOSPOS music thread and stores the URLS in a txt file that I can then turn to html and create a playlist from.

for the first part of this, and imho the most challenging, i need to make a script to parse all the vid urls from the thread. what is the best language to use for this process and will i need to use something that can log me in to do this? thx in advance

yours in christ,

hubris

i did this once but with the pics thread to pick out all the image urls and figure out how many times they had been emptyquoted etc. I dont have the code anymore because it was some dumb poo poo 3 formats ago but i used some fairly standard html parser lib in python and it was really easy.

u just scrape the pages and dig through the html tags until u find the individual posts, then search/extract the youtube urls and put them in a list

uG
Apr 23, 2003

by Ralp
php and regexing html lol good one tbc

GameCube
Nov 21, 2006

if u can't see why regexing to pull some urls out of an html doc is ok then lol upon ye

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror
yeah nobody's talking about parsing HTML with regex here. you have a chunk of text and there are urls inside, that's all. regex is ideal

hubris.height
Jan 6, 2005

Pork Pro
ok i guess the only way to get it done is to get started. i was gonna template using the python beautiful soup script from earlier on the page but hell i'll take a look at php and see if i can't make this a thing

wish me luck

Socracheese
Oct 20, 2008

hubris.height posted:

i'll take a look at php


no dont!

Shaggar
Apr 26, 2006

hubris.height posted:

ok i guess the only way to get it done is to get started. i was gonna template using the python beautiful soup script from earlier on the page but hell i'll take a look at php and see if i can't make this a thing

wish me luck

use c# and htmlagilitypack

Adbot
ADBOT LOVES YOU

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Tiny Bug Child posted:

this is not a hard project so it would be a good opportunity (imo) to "dip your feet" into a real language. PHP could do this v easily with either the basic built-in curl_* functions, or, if you want to go fancy, the http extension and the HttpRequest class. you don't need to worry about logging in or anything, just copy your "bbuserid" and "bbpassword" cookies. regex the html for urls and you're done.

  • Locked thread