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
fritz
Jul 26, 2003

Dessert Rose posted:

According to some mathematical theorem, 7 is a large enough n to get a perfect shuffle.

https://en.wikipedia.org/wiki/Persi_Diaconis

i saw a talk by him once, he was talking about fair coins and modeling tosses and how he glued dental floss to the side of a coin to measure how many times it would spin around in the air

Adbot
ADBOT LOVES YOU

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
i've finally been on the other side of the programming interview

it sucks. it went not great and it just felt like i was failing the interviewee by not phrasing my questions properly.

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

MALE SHOEGAZE posted:

i've finally been on the other side of the programming interview

it sucks. it went not great and it just felt like i was failing the interviewee by not phrasing my questions properly.

i have done this a few times now, enough that i feel like i should be good at it, but i'm still not. you were failing the interviewee. so did i.

i think probably the least worst way to do those sort of things is to practice a shitload on your coworkers, both ones you do and don't respect. that way you'll get a basis of comparison

Soricidus
Oct 21, 2010
freedom-hating statist shill

MALE SHOEGAZE posted:

i've finally been on the other side of the programming interview

it sucks. it went not great and it just felt like i was failing the interviewee by not phrasing my questions properly.

don't feel bad about it. approximately 100% of software requirements are imprecise, misleading, or just plain inaccurate, so lobbing them poorly-phrased interview questions is probably a great way to find out how well a candidate copes with real-world situations

Stringent
Dec 22, 2004


image text goes here

MALE SHOEGAZE posted:

still trying to come up with questions to ask people to find out if they know how to program good

next time i'm in a position of having to interview people i'm going set up a VM with exercism on it, and watch them set up an environment and do the exercises for their language of choice.

bobbilljim
May 29, 2013

this christmas feels like the very first christmas to me
:shittydog::shittydog::shittydog:

BiohazrD posted:

code:
int count = 51;
int cards = {1, 2, ..., 52};

while(drawCards)
{
  int cardToDraw = rand(0, count);
  int cardDrawn = cards[cardToDraw];
  cards[cardToDraw] = cards[count];
  count--;
}
no duplicates ever, memory efficient and runtime is nice and quick because you avoid "removing" elements from the array (which just creates new arrays)

if you need an easy way to keep track of cards already drawn, set cards[count] to cardDrawn and bam, everything past count is a list of cards already drawn

can this get the same card twice or am i too daft to understand it

suffix
Jul 27, 2013

Wheeee!

MALE SHOEGAZE posted:

i've finally been on the other side of the programming interview

it sucks. it went not great and it just felt like i was failing the interviewee by not phrasing my questions properly.

interviewers are like adults: pretty big and intimidating until you become one and realize they don't know poo poo

Corla Plankun
May 8, 2007

improve the lives of everyone
it swaps the drawn card to the end and decrijments the "deck" size so you can't draw it

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Luigi Thirty posted:

now as soon as someone writes a lisp machine emulator and I dig out one of those 400-key symbolics keyboards

they already exist

CADR for the CADR (with some updates too)

Meroko for the TI Explorer

and OpenGenera (still commercial, something like $5K, and only for DEC Alpha) for Symbolics Genera

someone used the DEC Alpha assembly source included with OpenGenera to generate an x86_64 version of the emulator core and people have gotten that to run on Linux and OS X talking to an X server

tef
May 30, 2004

-> some l-system crap ->

kalstrams posted:

any suggestions, for python 2, to make program read itself and copy that somewhere else? the idea is that my program makes a thing, and it should make also a script including all the code in it so that one could just run it and replicate the result, given they have installed python and relevant public libraries on their own

code:
with open(__file__) as src, open("butt") as dest:
    dest.writelines(src.readlines()

bobbilljim
May 29, 2013

this christmas feels like the very first christmas to me
:shittydog::shittydog::shittydog:

Corla Plankun posted:

it swaps the drawn card to the end and decrijments the "deck" size so you can't draw it

OH

thanks. I didn't realize cards[count] was kind of getting swapped back in to the 'remaining' zone

Flaming June
Oct 21, 2004

MALE SHOEGAZE posted:

i've finally been on the other side of the programming interview

it sucks. it went not great and it just felt like i was failing the interviewee by not phrasing my questions properly.

it is not so bad if you just let the other coworkers ask the major technical stuff and you just do "cultural fit" BS questions instead

Luigi Thirty
Apr 30, 2006

Emergency confection port.

eschaton posted:

they already exist

CADR for the CADR (with some updates too)

Meroko for the TI Explorer

and OpenGenera (still commercial, something like $5K, and only for DEC Alpha) for Symbolics Genera

someone used the DEC Alpha assembly source included with OpenGenera to generate an x86_64 version of the emulator core and people have gotten that to run on Linux and OS X talking to an X server

oh

oh Jesus

reminds me I never did get the HP 3000 I use as a nightstand working

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Luigi Thirty posted:

oh

oh Jesus

reminds me I never did get the HP 3000 I use as a nightstand working

you know you at least want to give CADR and Meroko a try

they're based on the original microcoded CPU design for the Lisp Machine, which had eight 74LS181 ALU chips at its core

Meroko, since the Explorer used NuBus, doesn't just do an accurate emulation of the CPU; it does a bus-transaction-accurate simulation of the entire Explorer, including things like parity checking. as a result it runs only a few times faster than a real Explorer on top-tier hardware.

plus the Explorer has USER AIDS:



come on, you know you want to

1K Dollar Chair
Nov 20, 2014
does anyone here interview terrified undergrad students

just got rejected from athena health and after the interview I feel like a dumbass shithead that's never gonna get a job. The question started as a dice on a piece of graph paper; how would you represent this idea in code. I made the dice an object, gave it data members like current face up value, current grid location, etc, etc. I was feeling good. Then I was asked to pathfind the dice. The greedy algo didn't work (value on top face was considered cost of taking said path) and then I realized I was basically being asked to do Djikstra's / A* off the top and I kind of melted down.

help im gay and dumb

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

1K Dollar Chair posted:

does anyone here interview terrified undergrad students

just got rejected from athena health and after the interview I feel like a dumbass shithead that's never gonna get a job. The question started as a dice on a piece of graph paper; how would you represent this idea in code. I made the dice an object, gave it data members like current face up value, current grid location, etc, etc. I was feeling good. Then I was asked to pathfind the dice. The greedy algo didn't work (value on top face was considered cost of taking said path) and then I realized I was basically being asked to do Djikstra's / A* off the top and I kind of melted down.

help im gay and dumb

LOL that sounds harder that my interview at Amazon so don't sweat it and just keep trying.

sarehu
Apr 20, 2007

(call/cc call/cc)

1K Dollar Chair posted:

does anyone here interview terrified undergrad students

just got rejected from athena health and after the interview I feel like a dumbass shithead that's never gonna get a job. The question started as a dice on a piece of graph paper; how would you represent this idea in code. I made the dice an object, gave it data members like current face up value, current grid location, etc, etc. I was feeling good. Then I was asked to pathfind the dice. The greedy algo didn't work (value on top face was considered cost of taking said path) and then I realized I was basically being asked to do Djikstra's / A* off the top and I kind of melted down.

help im gay and dumb

I interviewed at Athena Health, while I was doing a coding on the computer the interviewer made fun of me to a coworker within earshot for using the Dvorak layout.

Also they use Perl and are dumb.

Stringent
Dec 22, 2004


image text goes here

sarehu posted:

I interviewed at Athena Health, while I was doing a coding on the computer the interviewer made fun of me to a coworker within earshot for using the Dvorak layout.

that seems perfectly justifiable

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...
I used to have severe wrist pain from using a keyboard for more than a couple of hours, I did a lot of stretching every hour and it helped but always hurt at least somewhat

switched to Dvorak and now i can go entire weeks without feeling wrist pain

so, no, not justifiable

cinci zoo sniper
Mar 15, 2013




making fun of for using certain keyboard layout is just not justifiable period

sarehu
Apr 20, 2007

(call/cc call/cc)
Unless it's Colemak or some French layout.

cinci zoo sniper
Mar 15, 2013




i've got no idea why would you mock any layout as long as person can type reasonably well on it

pepito sanchez
Apr 3, 2004
I'm not mexican
dvorak cures wrist pain

djikstra claims self-esteem

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

kalstrams posted:

i've got no idea why would you mock any layout as long as person can type reasonably well on it

the pro-dvorak people are obnoxious, so i'm okay with mocking them

Soricidus
Oct 21, 2010
freedom-hating statist shill
I like the slavonic dances but the keyboard layout is definitely one of his weaker works

sarehu
Apr 20, 2007

(call/cc call/cc)
As a Dvorak user I can tell you being a Dvorak user is like being in a secret club -- when you meet another one, there's that unnecessary bit of implicit telepathy like that which you'd share with a fresh clone, where you know what each other's thinking: that Dvorak isn't really better than Qwerty but it's our little secret.

MononcQc
May 29, 2007

Dessert Rose posted:

I used to have severe wrist pain from using a keyboard for more than a couple of hours, I did a lot of stretching every hour and it helped but always hurt at least somewhat

switched to Dvorak and now i can go entire weeks without feeling wrist pain

so, no, not justifiable

I switched to vim for that. Instant fix.

Bloody
Mar 3, 2013

source code pro is good and very needs suiting, thanks op

Bloody
Mar 3, 2013

btw why ityool 2015 are computer graphics still a left-handed coordinate system with 0,0 being the top-left corner

so dumb

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
speaking of secret minority clubs amongst programmers, you should totally try using a proportional font for your code.

it sounds like sacrilege but honestly there's really no reason you have to use a monospace font for source code - most of the reason people still do is inertia.

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

Bloody posted:

btw why ityool 2015 are computer graphics still a left-handed coordinate system with 0,0 being the top-left corner

so dumb

serious question (because i am dumb): what should it be?

Bloody
Mar 3, 2013

prefect posted:

serious question (because i am dumb): what should it be?

everything else done on a cartesian coordinate plane is right-handed, where 0,0 is the bottom left corner. the difference being that positive increments in y are up in a RH plane vs down in a LH plane

theres probably a good reason it's LH but i wish it was RH because then projecting poo poo from some arbitrary RH plane to the bounds of a bitmap would be less obnoxious

(i am rolling my own plotting library)

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

Bloody posted:

theres probably a good reason it's LH but i wish it was RH because then projecting poo poo from some arbitrary RH plane to the bounds of a bitmap would be less obnoxious

line printers print starting at the top of the paper and move downwards. it's natural to transfer the same conventions to an electronic screen.

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

Jabor posted:

line printers print starting at the top of the paper and move downwards. it's natural to transfer the same conventions to an electronic screen.

this makes sense. but on the occasions where i have to come in contact with these kinds of coordinates, i always have trouble thinking of the y axis as positive numbers

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


Jabor posted:

line printers print starting at the top of the paper and move downwards. it's natural to transfer the same conventions to an electronic screen.

isn't it to do with the start point for the draw on a crt? not much point having a printer if you haven't yet decided how to draw the thing you want to print after all

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

Powerful Two-Hander posted:

isn't it to do with the start point for the draw on a crt? not much point having a printer if you haven't yet decided how to draw the thing you want to print after all

what came first, printers or crts?

Bloody
Mar 3, 2013

printers

fritz
Jul 26, 2003

Bloody posted:

(i am rolling my own plotting library)


:barf:

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


prefect posted:

what came first, printers or crts?

depends on your definition of printers probably. did the gutenberg press use line based printing?

probably not because 1 in 4 pages isnt just 'pc load letter what the gently caress does that mean' printed 100 times

Adbot
ADBOT LOVES YOU

Bloody
Mar 3, 2013


tbf its really not that bad. idk why there's like no tolerable plotting libraries that'll plot real-time data, so i had to make my own. you can like kind of hack matlab into doing it and apparently matplotlib as well but it's janky, bad, and slow

so i rolled my own in .net that'll plot data at many Ksps at 30 fps without issue

stupid details are being a complete pain in the rear end though like axis labels that are numerically accurate and stuff

  • Locked thread