This company sent me an email for an opening in Florida (I”m on the west coast). I get 20 to 30 such emails and phone calls each week from individuals/companies who are very likely not even stateside, but who have telephone exchanges up and down the east coast with call centers elsewhere. The shocker is this company’s presence as a “visa sponsor.” I have interviewed with more than one local LLC who gets me in the door with one hourly rate, then calls me, apologizing and asking me to accept a $10 to $20/hr drop in the rate I submitted for or interviewed for. I have gone to more than one interview conducted in a rent-by-hour office–and the tip off it was the same receptionist with DIFFERENT COMPANIES–neither of which knew the whereabouts of phone jacks etc. in the conference room! This is a business version of human trafficking.

]]>The algorithm is just the last part:

class OneWayCollection:

”’This is a collection where you can find the length, but

you can only walk through it once; you do not have random

access to the values.”’

def __init__(self, listOfValues):

self.length = len(listOfValues)

self.iterator = iter(listOfValues)

def length(self):

return self.length

def getNext(self):

return self.iterator.__next__()

orig_list = OneWayCollection(

[‘alpha’, ‘beta’, ‘gamma’, ‘delta’, ‘epsilon’, ‘zeta’])

def selectRandom(values, needed):

”’This returns ‘needed’ values selected uniformly at random from

‘values’, which can be a OneWayCollection.”’

result = []

available = values.length

assert needed < = available

while needed > 0:

item = values.getNext()

rand = random.random()

if rand < needed / available:

needed -= 1

result.append( item )

else:

available -= 1

return result

I had been getting confused between an algorithm for selecting k random items from a list of n items, and an algorithm for selecting a random item from a list with equal probability of selecting each item and WITHOUT having random access to the list.

First, an algorithm for selecting some number of random items from a list of items IN A RANDOM ORDER is as follows (in Python, since I tested it):

import math

import random

orig_list = [‘alpha’, ‘beta’, ‘gamma’, ‘delta’, ‘epsilon’, ‘zeta’]

def selectRandom(values, needed):

”’This returns a new list of ‘needed’ random values from

the list ‘values’. It ALSO shuffles the list values.

This executes in time proportional to needed, assuming that

swapping 2 positions in the list happens in constant time.”’

def swap(i,j):

”’Swaps the values at locations i and j in values.”’

temp = values[i]

values[i] = values[j]

values[j] = temp

available_to_choose = len(values)

assert needed <= available_to_choose

already_picked = 0

while ( already_picked < needed ):

# pick a random number from [0..available-1]

random_choice = math.floor( random.random() * available_to_choose )

# swap the cell at ‘already_picked’ with the one ‘random_choice’ after it

swap(already_picked, already_picked + random_choice)

available_to_choose -= 1

already_picked += 1

return values[0:needed]

I hate to say this, but I’m not changing anytime soon to the person that sent the email. Just another example of non standard English.

]]>I refuse to do business with them now. ]]>

Raj Paul

Andy Johnson

Ajay Venkat

Kishore Kumar

Firaas Khan

Shawn Parker

Arshad Ali

Derrick Galande

Ron Hussy

Mak Wilson

Abhay Singh

Raj Thakur

Daniel Smith

Axel Wayne