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
fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

the stupidest, most useless coworker i ever had had a phd in computer science and was previously the cto at a small tech company

Adbot
ADBOT LOVES YOU

MeruFM
Jul 27, 2010
I haven't interviewed at a good place that did not throw me into a gauntlet of 4-7 sessions at ~1 hour each.

The places that were shorter were either complete red flags for other reasons or let me go early because I obviously failed the first few.

Workaday Wizard
Oct 23, 2009

by Pragmatica
a friend of mine applied to a job and they gave him a take home exam on opengl. i read some of the questions and it was the kind of poo poo only a device driver developer would care about (super specific stuff).

this was a mobile game development position using cocos2d and unity

oh and the the exam was commissioned to some german company

Jerry Bindle
May 16, 2003
a while ago i was asking about the sanity of inserting Tcl in the tool chain for a project. the best solution i arrived at was to use tcljava to wrap the data up in a plain old java object.

but, it turns out i can also parse the data source as a Lisp list, i got the go-ahead to use Common Lisp + Hunchentoot instead of Java :getin:

Jerry Bindle fucked around with this message at 17:58 on Mar 22, 2015

Notorious b.s.d.
Jan 25, 2003

by Reene
wow you are a sadist

you just hate your coworkers

Jerry Bindle
May 16, 2003
yes and yes

i haven't committed to the CL idea yet, still considering tomcat+java. i've got a pro-con list going, right now the biggest CL con is "will never be able to hand off project"

leftist heap
Feb 28, 2013

Fun Shoe
that's not a con it's job security.

wait aren't you the guy who was thinking about bundling a java tcl interpreter just to interpret a tcl list literal (which is just like, {1 2 3} or whatever) and now you've moved on to doing the whole thing in CL? lol. have fun.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

who's going to do code review?

Soricidus
Oct 21, 2010
freedom-hating statist shill
choosing between a range of obscure languages instead of just writing a trivial parser is appropriate behavior for this thread

leftist heap
Feb 28, 2013

Fun Shoe
how to parse a tcl list in java:

step 1 - choose a cl implementation

Jerry Bindle
May 16, 2003
what would be The Right Way to parse a Tcl list in java? i'm aware that there is some kind of flex/bison java API's, but defining a grammar etc seems like a lot more work than using a Tcl interpreter.

Jerry Bindle
May 16, 2003

Subjunctive posted:

who's going to do code review?

some back ground info about me might help explain my terrible ideas, i have an EE degree and work with a bunch of other EE havers. our software projects are either embedded apps, or internal tools. so the code reviews are "does it work? ok good job"

Corla Plankun
May 8, 2007

improve the lives of everyone
as an EE teriblecoder i am obliged to tell you that you should really get some non-EE eyes to look at your stuff

you will thank yourself later

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
maybe that's why they're in the terrible programmer thread

distortion park
Apr 25, 2011


Barnyard Protein posted:

what would be The Right Way to parse a Tcl list in java? i'm aware that there is some kind of flex/bison java API's, but defining a grammar etc seems like a lot more work than using a Tcl interpreter.

this, but the opposite

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

Barnyard Protein posted:

what would be The Right Way to parse a Tcl list in java? i'm aware that there is some kind of flex/bison java API's, but defining a grammar etc seems like a lot more work than using a Tcl interpreter.

idk, it seems like a lot less work to me. you just have to read a list like {1 2 3 4} right?

leftist heap
Feb 28, 2013

Fun Shoe
this would probably be pretty trivial in antlr i dunno.

Jerry Bindle
May 16, 2003

fart simpson posted:

idk, it seems like a lot less work to me. you just have to read a list like {1 2 3 4} right?

nah, Tcl lists can be used to form trees. i posted this example before, here it is again for reference.

code:
{COMPONENT BOARD_NAME.PCB {ENVIRONMENT BOARD.PCB} {DETAIL 
{SUBCOMP 
{I SOME_PART_1.PRT JP1 {CN 1 NET_000A 2 NET_000B 3 NET_000C 4 NET_000D } } 
{I SOME_PART_2.PRT U1  {CN 1 NET_000B 2 NET_000A } } 
{I SOME_PART_3.PRT U2  {CN 1 NET_000C 2 NET_000D } } } } }

Jerry Bindle fucked around with this message at 21:34 on Mar 22, 2015

Soricidus
Oct 21, 2010
freedom-hating statist shill

Barnyard Protein posted:

nah, Tcl lists can be used to form trees. i posted this example before, here it is again for reference.

code:
{COMPONENT BOARD_NAME.PCB {ENVIRONMENT BOARD.PCB} {DETAIL 
{SUBCOMP 
{I SOME_PART_1.PRT JP1 {CN 1 NET_000A 2 NET_000B 3 NET_000C 4 NET_000D } } 
{I SOME_PART_2.PRT U1  {CN 1 NET_000B 2 NET_000A } } 
{I SOME_PART_3.PRT U1  {CN 1 NET_000C 2 NET_000D } } } } }

global replace {} with <list></list> and then treat it as the xml it should have been in the first place

Jerry Bindle
May 16, 2003

rrrrrrrrrrrt posted:

this would probably be pretty trivial in antlr i dunno.

antler looks like it'd be very useful to know how to use, thanks

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

Barnyard Protein posted:

nah, Tcl lists can be used to form trees. i posted this example before, here it is again for reference.

code:
{COMPONENT BOARD_NAME.PCB {ENVIRONMENT BOARD.PCB} {DETAIL 
{SUBCOMP 
{I SOME_PART_1.PRT JP1 {CN 1 NET_000A 2 NET_000B 3 NET_000C 4 NET_000D } } 
{I SOME_PART_2.PRT U1  {CN 1 NET_000B 2 NET_000A } } 
{I SOME_PART_3.PRT U2  {CN 1 NET_000C 2 NET_000D } } } } }

ok so you have to parse {1 2 3 4} but it can be recursive. doesnt seem to actually change very much

Notorious b.s.d.
Jan 25, 2003

by Reene
there's no need to even bother with antlr, lisp S-expressions are a format specifically designed for minimum parsing

there are pre-existing lisp plist parsers for java. when i googled it i found where people had done it as a "hello world"-type exercise. ridiculous overkill

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison

Soricidus posted:

global replace {} with <list></list> and then treat it as the xml it should have been in the first place

shaggar???

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

Notorious b.s.d. posted:

there's no need to even bother with antlr, lisp S-expressions are a format specifically designed for minimum parsing

there are pre-existing lisp plist parsers for java. when i googled it i found where people had done it as a "hello world"-type exercise. ridiculous overkill

yeah this is like babys first parser

akadajet
Sep 14, 2003

Soricidus posted:

global replace {} with <list></list> and then treat it as the xml it should have been in the first place

lmfao

Bloody
Mar 3, 2013


xml is so good that scala, aka java++, has xml literals

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

Bloody posted:

xml is so good that scala, aka java++, has xml literals

this is still really funny

jesus WEP
Oct 17, 2004



lol i did that too when i first read it

Shaggar
Apr 26, 2006

Soricidus posted:

global replace {} with <list></list> and then treat it as the xml it should have been in the first place

Share Bear
Apr 27, 2004

comin from a big scripting and apache webserver background stuff like embedding a webserver in your app is crazy poo poo

still don't know what the hell to do with maven really, it's an xml document evaluated as a script or some poo poo

Shaggar
Apr 26, 2006
actually that's exactly what it isn't. the xml is a definition of your project and the required plugins to build it. all the code is in the plugins and that separation of concerns makes for far more manageable builds.

build scripts are the worst.

MononcQc
May 29, 2007

Embedding web servers totally makes sense if your platform is able to do it in non-idiotic ways.

Share Bear
Apr 27, 2004

MononcQc posted:

Embedding web servers totally makes sense if your platform is able to do it in non-idiotic ways.

what is "non-idiotic"

Shaggar
Apr 26, 2006
basically using java and tomcat. altho it might be easier to just use jetty or a shared tomcat instance.

Shaggar
Apr 26, 2006
im trying to think of a scenario where I'd do it that way and the only thing i can think of is if im running a single java process with tomcat and other servers like maybe jms or something but idk why I'd do it that way.

Notorious b.s.d.
Jan 25, 2003

by Reene

Share Bear posted:

comin from a big scripting and apache webserver background stuff like embedding a webserver in your app is crazy poo poo

still don't know what the hell to do with maven really, it's an xml document evaluated as a script or some poo poo

jetty is actually even easier than embedded tomcat

Notorious b.s.d.
Jan 25, 2003

by Reene

Share Bear posted:

what is "non-idiotic"

code:
public class SimplestServer
{
    public static void main(String[] args) throws Exception
    {
        Server server = new Server(8080);
        server.start();
        server.join();
    }
}

EVGA Longoria
Dec 25, 2005

Let's go exploring!

uhhhh is it ever ok to pass the oauth token between clients?

i.e. i have a website that authenticates with oauth and gets an access token from google, does something, then passes this access token to the server in a form field, and the server then does something on google

this feels really skeevy to me but i'm not seeing it condemned as horrifying like i'd expect

Valeyard
Mar 30, 2012


Grimey Drawer

EVGA Longoria posted:

uhhhh is it ever ok to pass the oauth token between clients?

i.e. i have a website that authenticates with oauth and gets an access token from google, does something, then passes this access token to the server in a form field, and the server then does something on google

this feels really skeevy to me but i'm not seeing it condemned as horrifying like i'd expect

why not have google redirect (after the authentication) to some view where you can do whatever you need to on the backend, why go from google -> page -> backend

Adbot
ADBOT LOVES YOU

EVGA Longoria
Dec 25, 2005

Let's go exploring!

Valeyard posted:

why not have google redirect (after the authentication) to some view where you can do whatever you need to on the backend, why go from google -> page -> backend

it's the google picker

basically, if you select an actual "Google Document" which was written on google drive, it lets you just download it from a url, no authentication or anything

if you select something uploaded to google drive, you have to make a call to the export function to get a copy of the file

the front end has to make all of the API calls to start (to actually pick the file)

the backend is only involved in the case they select an uploaded file, at which point it needs to make an api call to retrieve the file

the client could handle all the downloading and sending of the files, but that seems like a really big waste (especially on mobile)

some existing code does this, which is why i'm asking. it would solve a lot to just use that code, but passing oauth tokens around skeeves me out

  • Locked thread