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
Shaggar
Apr 26, 2006

Janitor Prime posted:

I did a thing to play around with the Maven release plugin and gently caress around some more with logback.

https://github.com/hiro2k/logback-twitter

nice

Adbot
ADBOT LOVES YOU

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

qntm posted:

then higher-than-normal is the new normal, pick a server at random :toot:

it's the new normal for the app server in question, but if it's just a network problem on that app server, failing out and letting the load balancer move traffic to another app server would be a better choice

same if it's a problem with the db cluster: failing out and letting the dns load balancer move traffic to another datacenter is probably better than having high error rates

but if you only have the one cluster, don't just fail hard

it's not a black-and-white issue, and it's an interview question with no good answer, just an open-ended discussion about tradeoffs

FamDav
Mar 29, 2008
isnt the right answer "how dare you speak to me you cj" and go back to coding up your bespoke runtime configuration system for c based around xml macros

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

FamDav posted:

isnt the right answer "how dare you speak to me you cj" and go back to coding up your bespoke runtime configuration system for c based around xml macros

nah, by making computer systems that handle faults sensibly and correctly you can make operating them cheaper and put cjs out of jobs

Innocent Bystander
May 8, 2007
Born in the LOLbarn.
a guy asks for a algorithm book and cormen doesn't even get brought up?

also, I got asked this question at two different shops: Find the intersection between two strings (in C). What is its runtime? If I gave an O(n) solution, they would ask me to give a O(n^2) solution, if I gave an O(n^2) solution they asked me to do it in O(n). hth

FamDav
Mar 29, 2008

Innocent Bystander posted:

a guy asks for a algorithm book and cormen doesn't even get brought up?

also, I got asked this question at two different shops: Find the intersection between two strings (in C). What is its runtime? If I gave an O(n) solution, they would ask me to give a O(n^2) solution, if I gave an O(n^2) solution they asked me to do it in O(n). hth

you mean where the prefix of one is the suffix of the other? or like can a string be a substring of another.

Innocent Bystander
May 8, 2007
Born in the LOLbarn.
ah yes, that was a bit vague

it was find the set of characters found in string 1 and in string 2. return it! (exclamation was my emphasis)

FamDav
Mar 29, 2008

Innocent Bystander posted:

ah yes, that was a bit vague

it was find the set of characters found in string 1 and in string 2. return it! (exclamation was my emphasis)

are you talking longest common subsequence or are actually the set of characters.

Innocent Bystander
May 8, 2007
Born in the LOLbarn.
the set, not longest common subsequence. its not a hard problem. can you find longest common subsequence in O(n)?

FamDav
Mar 29, 2008

Innocent Bystander posted:

the set, not longest common subsequence. its not a hard problem. can you find longest common subsequence in O(n)?

no which is what had me confused.

you can find it in n^2 with extra space

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
E nm misread

tef
May 30, 2004

-> some l-system crap ->

Innocent Bystander posted:

also, I got asked this question at two different shops: Find the intersection between two strings (in C). What is its runtime? If I gave an O(n) solution, they would ask me to give a O(n^2) solution, if I gave an O(n^2) solution they asked me to do it in O(n). hth


so you want to find the common elements between two lists of characters

option a) use a hash table, or a array

option b) if list is sorted, merge the common elements.

option c) two nested for loops

common subset? build a suffix tree i think eh it's 6 am

Shy
Mar 20, 2010

nvm

Shy fucked around with this message at 22:46 on Feb 12, 2014

oh no blimp issue
Feb 23, 2011

so i want to write some sort of image filter thing to make images look like the original gameboy screen which had a weird 2 bit monochrome swamp green display
the trouble being i#ve no idea how to start going about this

like, i think i can convert an image to 2 bit monochrome easy enough its just the weird green colour thats im not sure about
also the gameboy has small gaps between its pixels i dont even know how to go about doing, a graphics shader maybe?

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Innocent Bystander posted:

a guy asks for a algorithm book and cormen doesn't even get brought up?

also, I got asked this question at two different shops: Find the intersection between two strings (in C). What is its runtime? If I gave an O(n) solution, they would ask me to give a O(n^2) solution, if I gave an O(n^2) solution they asked me to do it in O(n). hth

clrs is not a good book to self study
it's a reference style textbook designed around having a full university course filling in the blanks and providing motivation (and TAoCP is a better reference anyway)

Skeina et al is a much more complete way of learning a whole bunch of data structures/algorithms since it provides guidance and analysis together

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

tef posted:

so you want to find the common elements between two lists of characters

option a) use a hash table, or a array

option b) if list is sorted, merge the common elements.

option c) two nested for loops

common subset? build a suffix tree i think eh it's 6 am

is this for set or multiset instersection tho

tef
May 30, 2004

-> some l-system crap ->

Malcolm XML posted:

is this for set or multiset instersection tho

does it make a difference?

a) use a hash, keep count of how many elements are in a set. find the intersection of hash keys + sum of hash values (or same but use array with counts)

b) if mutiset is expressed as sorted string, merge them, skipping ones that only appear in one string, keeping duplicates

c) two for loops

tef
May 30, 2004

-> some l-system crap ->
what *are* joins?

https://www.youtube.com/watch?v=Kh0Y2hVe_bw

Necc0
Jun 30, 2005

by exmarx
Broken Cake

Awia posted:

so i want to write some sort of image filter thing to make images look like the original gameboy screen which had a weird 2 bit monochrome swamp green display
the trouble being i#ve no idea how to start going about this

like, i think i can convert an image to 2 bit monochrome easy enough its just the weird green colour thats im not sure about
also the gameboy has small gaps between its pixels i dont even know how to go about doing, a graphics shader maybe?

im not sure what youre asking for here? if you want to code it up yourself just add in the pixel gaps yourself. if you use a shader doesnt that defeat the point of coding it yourself?

FamDav
Mar 29, 2008

Awia posted:

so i want to write some sort of image filter thing to make images look like the original gameboy screen which had a weird 2 bit monochrome swamp green display
the trouble being i#ve no idea how to start going about this

like, i think i can convert an image to 2 bit monochrome easy enough its just the weird green colour thats im not sure about
also the gameboy has small gaps between its pixels i dont even know how to go about doing, a graphics shader maybe?

for 2 bit monochrome, you want to threshold on pixel color.

for spacing, you probably first want to down sample the image then set like every nth row and column of pixels to off, or you could space everything out.

distortion park
Apr 25, 2011


how big can a java class get before it should start setting off warning bells?

asking for a friend

MononcQc
May 29, 2007

whenever it's big enough to need its own file

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

pointsofdata posted:

how big can a java class get before it should start setting off warning bells?

asking for a friend

one responsibility, keep it SOLID

Doc Block
Apr 15, 2003
Fun Shoe

Awia posted:

so i want to write some sort of image filter thing to make images look like the original gameboy screen which had a weird 2 bit monochrome swamp green display
the trouble being i#ve no idea how to start going about this

like, i think i can convert an image to 2 bit monochrome easy enough its just the weird green colour thats im not sure about
also the gameboy has small gaps between its pixels i dont even know how to go about doing, a graphics shader maybe?

Downsample the original image, then convert to 2 bit monochrome. Then convert back to 32-bit color, using appropriate green values instead of just 4 shades of gray.

Then stretch the image back out to the desired final resolution using nearest neighbor filtering, and insert a pixel or two of empty space between the fake LCD pixels.

tef
May 30, 2004

-> some l-system crap ->

pointsofdata posted:

how big can a java class get before it should start setting off warning bells?

asking for a friend

size/lines of code is a pretty good metric for software complexity, but not reliability, or correctness[1]. unfortunately, sometimes things have to be a bit long, or a bit complex, to capture the problem and manage the details.

it's much easier to talk about good style and bad smells, instead of short and long code.

- a class with lots and lots of internal state is a good alarm bell
- a class with more than 10 methods can be bad, but sometimes you have methods for sugar.
- a class that has lots of subclasses might be ok, but sometimes it's good to move them out into their own files too.

the thing is, the longer the code is, you're more likely to see these things.

[1] http://www.cs.du.edu/~snarayan/sada/teaching/COMP3705/lecture/p1/corbw-1.pdf

Shaggar
Apr 26, 2006
if the code is too long u will be able to smell it

FamDav
Mar 29, 2008
droopy code be like droopy pussy

touched by too many people and STANKY

Nomnom Cookie
Aug 30, 2009



Cocoa Crispies posted:

one responsibility, keep it SOLID

  1. S: good poo poo
  2. O: dumb
  3. L: ok I guess
  4. I: gently caress yeah
  5. D: more good poo poo

my favorite design pattern is chain of responsibility

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

Kevin Mitnick P.E. posted:

  1. S: good poo poo
  2. O: dumb
  3. L: ok I guess
  4. I: gently caress yeah
  5. D: more good poo poo

my favorite design pattern is chain of responsibility

if you don't want to get hit by a chain take some goddamn responsibility?

oh no blimp issue
Feb 23, 2011

Doc Block posted:

Downsample the original image, then convert to 2 bit monochrome. Then convert back to 32-bit color, using appropriate green values instead of just 4 shades of gray.

Then stretch the image back out to the desired final resolution using nearest neighbor filtering, and insert a pixel or two of empty space between the fake LCD pixels.

genius, thanks

EAT THE EGGS RICOLA
May 29, 2008

I'm in Canadan and I have a super good offer for a position, but I need an enhanced reliability clearance (which is not hard to get but my boss will be contacted as part of it). Do I tell him that I'm jumping ship or do I lie and tell him that I'm going to do contract work on the side or what help

Nomnom Cookie
Aug 30, 2009



EAT THE EGGS RICOLA posted:

I'm in Canadan and I have a super good offer for a position, but I need an enhanced reliability clearance (which is not hard to get but my boss will be contacted as part of it). Do I tell him that I'm jumping ship or do I lie and tell him that I'm going to do contract work on the side or what help

tell him it's so you can be a canadian super spy, eh

EAT THE EGGS RICOLA
May 29, 2008

Kevin Mitnick P.E. posted:

tell him it's so you can be a canadian super spy, eh

I got an offer working with the bearhat police too! But that's not the one I'm taking (and it would have taken a secret clearance)

Corla Plankun
May 8, 2007

improve the lives of everyone
is working as a software developer in "testing" as dull as it sounds?

i'm considering a job in building automated tests but i am having a hard time imagining that as anything but the boringest job ever

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Corla Plankun posted:

is working as a software developer in "testing" as dull as it sounds?

i'm considering a job in building automated tests but i am having a hard time imagining that as anything but the boringest job ever

Do yhou enjoy building automated tests???

Nomnom Cookie
Aug 30, 2009



Corla Plankun posted:

is working as a software developer in "testing" as dull as it sounds?

i'm considering a job in building automated tests but i am having a hard time imagining that as anything but the boringest job ever

depends if you get to write cool tools or if you get to write the unit tests the leads are too valuable to waste their time on

fritz
Jul 26, 2003

tef posted:

so you want to find the common elements between two lists of characters

option a) use a hash table, or a array

option b) if list is sorted, merge the common elements.

option c) two nested for loops

common subset? build a suffix tree i think eh it's 6 am

a. is gonna have a log factor and c. is quadratic right? b. is only linear if youre presorted.

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

fritz posted:

a. is gonna have a log factor and c. is quadratic right? b. is only linear if youre presorted.

hashtables are constant timeif you've got a good hash function and the data's not pathological

on ASCII strings you can just use a 128-entry array instead.

FamDav
Mar 29, 2008
coffeetable when are you gonna start interviewing

move to seattle its the only way

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
march-ish it's looking like

projects are wrapping up + i no longer feel *completely* incompetent + home life is finally starting to get to me. only took six months :v:

  • Locked thread