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
Notorious b.s.d.
Jan 25, 2003

by Reene

more like dICK posted:

edit: I like a lot of Java now. I'm worried that makes me a bad or dumb person.

dumb? definitely not

bad? probably. after you've used a sane platform, it's hard not to get judgmental when you hear jackasses spout off about java in between tales of their amazing rails/django/php prowess.

Adbot
ADBOT LOVES YOU

Notorious b.s.d.
Jan 25, 2003

by Reene
the worst is crufty old unix CJs who bitch about java being slow

java is slow lol
*gets back to work on garbage shell script to coordinate yum operations*

tef
May 30, 2004

-> some l-system crap ->
oh god gc leaks in class loaders i'm having flashbacks

Notorious b.s.d.
Jan 25, 2003

by Reene

tef posted:

oh god gc leaks in class loaders i'm having flashbacks

yeah this is a serious problem even w/ tomcat

stop using containers guys. embed your container in your app, not the other way around. java doesn't need any external help to listen for http

Valeyard
Mar 30, 2012


Grimey Drawer

Notorious b.s.d. posted:

dumb? definitely not

bad? probably. after you've used a sane platform, it's hard not to get judgmental when you hear jackasses spout off about java in between tales of their amazing rails/django/php prowess.

django and java both own

Careful Drums
Oct 30, 2007

by FactsAreUseless
what in the gently caress are you guys talking about

signed,

a .net dev

GameCube
Nov 21, 2006

current javascript status: i just read the words "bubble up the DOM tree" and now i want to kill myself

Nomnom Cookie
Aug 30, 2009



Notorious b.s.d. posted:

the real answer to classloader/container hell: embed jetty in your app, run every component in its own jvm and its own unix service.

i used to poke fun at devs who did this until i tried it for myself in a hobby app. never, ever going back.

i had issues with storm because storm workers use the same classloader for everything. servlet classloading works pretty good imo for single-tenant

Valeyard
Mar 30, 2012


Grimey Drawer

Werthog 95 posted:

current javascript status: i just read the words "bubble up the DOM tree" and now i want to kill myself

event.stopPropagation(); erryday

Shaggar
Apr 26, 2006
my current javascript status is I have to figure out cors.

Pittsburgh Fentanyl Cloud
Apr 7, 2003


Shaggar posted:

my current javascript status is I have to figure out cors.

I have until tomorrow to fix a disaster in PL/SQL which involves writing four new functions and changing a gigantic procedure. lol

Notorious b.s.d.
Jan 25, 2003

by Reene

Kevin Mitnick P.E. posted:

i had issues with storm because storm workers use the same classloader for everything.

this happened to me, too. storm wants to keep everything in the same jvm, surprise surprise that's a multi-tenant setup that's gonna need complex classloaders

storm re-invents a lot of java wheels because it was written by a p-lang weenie. c.f. it jumps through insane hoops to avoid xml at any cost w/ all those python startup scripts

natharn marz is a cool dude but that doesn't excuse that mess

Notorious b.s.d.
Jan 25, 2003

by Reene

Careful Drums posted:

what in the gently caress are you guys talking about

signed,

a .net dev

.net "solves" the classloader hell problem by pushing it to a different level of abstraction, the AppDomain.

nobody uses appdomains.

GameCube
Nov 21, 2006

ugh goddammit

so

right now we're doing this

code:
$.getJson(url, callback)
which according to the jquery docs is equivalent to

code:
$.ajax({
    dataType: "json",
    url: url,
    success: callback
})
but the top one calls the callback while the bottom one does not. and i need to use the bottom so i can throw a timeout in there. what gives

Careful Drums
Oct 30, 2007

by FactsAreUseless
something else is going wrong because i've used callbacks like that bottom snippet. stupid question: 'callback' is a function right?

e: is it possible you're getting a 500 and the 'error' callback is happening instead?

Careful Drums fucked around with this message at 19:25 on Jun 5, 2014

Shaggar
Apr 26, 2006

Citizen Tayne posted:

I have until tomorrow to fix a disaster in PL/SQL which involves writing four new functions and changing a gigantic procedure. lol

lol that's gross

Asshole Masonanie
Oct 27, 2009

by vyelkin

Careful Drums posted:

something else is going wrong because i've used callbacks like that bottom snippet. stupid question: 'callback' is a function right?

yes it's a function. here it is in angular being used in our app right now:

code:
	$scope.init = function () {
		$.ajax({
			url: Globals.baseUrl + 'Rest/tileD/PendingData?forDate=' + Date.today().toString('yyyy-MM-dd'),
			method: 'get',
			dataType: 'json',
			success: function (result) {
				if (!result.isEmpty) {
					$scope.hours = result.Data[0][2];
					$scope.tasks = result.Data[0][1];
				}
				$scope.$apply();
			},
			error: function () {
				$scope.$apply();
			}
		});
	};

Shaggar
Apr 26, 2006

Werthog 95 posted:

ugh goddammit

so

right now we're doing this

code:
$.getJson(url, callback)
which according to the jquery docs is equivalent to

code:
$.ajax({
    dataType: "json",
    url: url,
    success: callback
})
but the top one calls the callback while the bottom one does not. and i need to use the bottom so i can throw a timeout in there. what gives

you're missing a semicolon at the end of that, otherwise its fine.

JavaScript code:
$.ajax({
	cache:false,
	type: "POST",
	url: secreturl,
	dataType: 'json',
	success: callback
		
});
litterrally using this right now and it works fine. its even cors!

here is how to enable cors in webapi
in WebApiConfig.cs
C# code:
config.EnableCors();
add enable cors attribute either per controller or per method
C# code:
[EnableCors("*", "*", "*")]

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Careful Drums posted:

what in the gently caress are you guys talking about

signed,

a .net dev


Notorious b.s.d. posted:

.net "solves" the classloader hell problem by pushing it to a different level of abstraction, the AppDomain.

nobody uses appdomains.


we use app domains

let me kill myself


marshaling bytes off the app domain boundaries

the things u have 2 do to process trillions of records a day

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Notorious b.s.d. posted:

.net "solves" the classloader hell problem by pushing it to a different level of abstraction, the AppDomain.

nobody uses appdomains.

fwiw we only use them b/c .net has the equivalent of dlopen but not dlclose (intentionally, apparently)

Nomnom Cookie
Aug 30, 2009



anyone who wants to unload DSOs has way too much faith in their ability to clean up after themselves

Notorious b.s.d.
Jan 25, 2003

by Reene

Malcolm XML posted:

fwiw we only use them b/c .net has the equivalent of dlopen but not dlclose (intentionally, apparently)

lol. so you are using appdomains only because you don't have classloaders.

(as with so many .net vs java differences, this seems like a case where .net makes different tradeoffs but isn't actually better or worse)

Notorious b.s.d.
Jan 25, 2003

by Reene

Kevin Mitnick P.E. posted:

anyone who wants to unload DSOs has way too much faith in their ability to clean up after themselves

i assume he meant unloading a .net assembly, not an actual old-school windows dll. that would be scary

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Notorious b.s.d. posted:

i assume he meant unloading a .net assembly, not an actual old-school windows dll. that would be scary

this is basically why they dont have dlclose and have the marshaling requirements but it's just a pita.

but tbh there is not really a better way to compile .net code on demand and load it

Whiskerando
Mar 13, 2011

we use angular and it's terrible. so are all the other js frameworks though and i think angular may be the least terrible of all of those. it's good for filtering, anyway...

Whiskerando
Mar 13, 2011

actually just never do web ui work. we had a chrome-specific lag issue and it wasn't due to our lovely js but rather a hiccup on rendering several :first-child css rules. wtf

Glomper Squeeman
Jun 11, 2006

The cat does not see the cliff.
if you ever have to work on a big enough web ui project that angular or requirejs seem like a good idea, you may have made some bad life choices

kill me

Nomnom Cookie
Aug 30, 2009



Malcolm XML posted:

compile .net code on demand and load it

i would be interested to hear the rationalizations of whoever thought this was a good idea

suffix
Jul 27, 2013

Wheeee!

FamDav posted:

no i mean like lets say i do some some poo poo like

$(selector).removeClass(class0).addClass(class1)

can i make any guarantees on the page never showing those elements w/out class1 or what

what i've heard is browsers will try to store up all the dom changes and do one redraw when your code returns, but i don't know if there's any guarantee

it has to reflow the page if you read layout information after you've changed the dom though, so you can trigger worst-case behavior by alternating reading and writing.

Valeyard
Mar 30, 2012


Grimey Drawer

FamDav posted:

no i mean like lets say i do some some poo poo like

$(selector).removeClass(class0).addClass(class1)

can i make any guarantees on the page never showing those elements w/out class1 or what

jQuery also has a .replaceWith() that might help you

Stringent
Dec 22, 2004


image text goes here

MagicBob posted:

if you ever have to work on a big enough web ui project that angular or requirejs seem like a good idea, you may have made some bad life choices

kill me

it's only going to become more common

Notorious b.s.d.
Jan 25, 2003

by Reene

Stringent posted:

it's only going to become more common

it's still true

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison

Werthog 95 posted:

the debugger breaks in a callback from a jquery function but the particular line it breaks on seems fine. no errors in the browser console anyway

oh and removing a comment fixed it :pwn:

I've seen this happen before when a space was actually the wrong character and the JS interpreter thought it was a line break, and helpfully attempted to parse the rest of a comment as an instruction

Nomnom Cookie
Aug 30, 2009



Werthog 95 posted:

so i'm trying to fix this javascript and i've never javascripted before

using the firefox debugger and it keeps breaking and offering no obvious reasoning as to why it broke. i have no breakpoints set so i assume it's an unhandled exception but i don't see any information about exceptions and i don't even know if javascript has exceptions

help

you must be using it wrong. javascript tools are JUST FINE and not a shitshow, a yosposter told me so

fritz
Jul 26, 2003

i had to update our deploy process yesterday because we're now dependent on a java thing and: no java runtime on the far end, so i just shoved a hundred megabytes of /usr/lib/java/default-java or w/ever in there and updated a couple environment variables and : it worked


but i feel like I'm in a state of sin somehow

Shaggar
Apr 26, 2006
if you didn't setup the server yourself, 99.999% of the time the java install will be hosed because its probably from a package manager, so copying the java bins is standard practice for deployment on Linux.

for windows theres really only the sun vm so its not a problem, but I still copy the binaries anyways cause theres no need for it to be integrated into the browser or os or anything.

ibm ships their own jvm with any of their products that use java (ex: notes/sametime/domino) so you don't need to install java separately.

copying the jvm with ur poo poo is pretty normal.

Shaggar
Apr 26, 2006
like you don't even need environmental variables if your thing is going to be the only thing using the jvm you copied (in fact its probably a good idea not to in case other people want to use other vms).

MrMoo
Sep 14, 2000

suffix posted:

what i've heard is browsers will try to store up all the dom changes and do one redraw when your code returns, but i don't know if there's any guarantee

There's better chance when executing after a RAF call.

Notorious b.s.d.
Jan 25, 2003

by Reene

fritz posted:

i had to update our deploy process yesterday because we're now dependent on a java thing and: no java runtime on the far end, so i just shoved a hundred megabytes of /usr/lib/java/default-java or w/ever in there and updated a couple environment variables and : it worked


but i feel like I'm in a state of sin somehow

you should be using cfg mgmt to set up prereqs

Adbot
ADBOT LOVES YOU

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY
copy-quotin into this thread cause there are a fair few UK devs itt who i respect n id like to know their opinion

coffeetable posted:

UK advice needed: I've been unemployed for nine months while learning software development, and a few weeks back I finally decided to put 10 resumes out there to see what the reaction was. Got 4 interviews off the back of it from all over the country, and that's panned out to two poor offers and one seemingly-decent one: £35k in the north of England for a small biotech company. They want me to join a two-man team who're developing a research-council backed project, with a look to leading it by the end of the year.

The pros for taking the job is that it would probably afford me much more responsibility than I'd find in an entry level position, that it'll make use of my maths background and that there's a small but non-zero chance of getting some publications off the back of it. The cons are that it's not London, it's nowhere near a good London salary, and that they probably wouldn't be offering me the position unless they were starved of decent developers.

The alternative is to back off for a few months and turn out another small project, and then go about applying for jobs properly, sending off hundreds of CVs every which way. Right now I'm leaning towards taking the job and staying with it for a year or so just to get some experience on my CV, then I can re-evaluate and consider a move to London. Does this seem sensible?

  • Locked thread