Open Side Menu Go to the Top

09-12-2013 , 09:39 AM
Quote:
Originally Posted by Grue
Watch your browser support doing the background image that way though.
It's only an internal prototype so as long as it works in modern browsers (aka whatever my coworkers use) I can live with that.

CSS and making stuff look pretty isn't my job so all I'm concerned about is that it looks reasonable enough when someone else wants to try it to give me feedback
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
$25m Guaranteed WPM on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
09-12-2013 , 09:44 AM
Quote:
Originally Posted by adios
Not trying to be a wise ass but:

1. Pretty good pay
2. Contracting at first
3. Qualified implying to me hit the ground running with no learning curve.

Doesn't seem that desperate to me.
Well they were bitching about money a few weeks ago and still saying all our new blood had to come through infosys (who have mediocre front end devs).

So yeah I guess it's relative. I don't really know where the pay is, so I don't want to over sell it. I'm sure it's competitive.

Perm vs. contractor is a matter of getting a rec from the company. If you're good they'll find a way to convert. (This is true pretty much anywhere afaik.) The nice thing about contractor is getting paid for overtime - which there will be a lot of.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-12-2013 , 11:37 AM
Quote:
Originally Posted by suzzer99
If any of you node and/or angular rock stars are in the LA area (LAX-ish), or interested in relocating, my company is getting pretty desperate. Would probably be contract at first - pay is pretty good if you're qualified. It's a very laid back place to work where for the most part we all genuinely like each other.

Send me a PM if interested.
Does your porn star co-worker gf have other friends for interested applicants? Because that would be a perk that would turn heads way more than "unlimited vacation" or "free snack items"!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-12-2013 , 12:46 PM
suzzer,

thanks for your reply. i tried to re-reply but:

Quote:
Originally Posted by the man
suzzer99 has exceeded their stored private messages quota and cannot accept further messages until they clear some space.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-12-2013 , 03:02 PM
Quote:
Originally Posted by Larry Legend
Does your porn star co-worker gf have other friends for interested applicants? Because that would be a perk that would turn heads way more than "unlimited vacation" or "free snack items"!
Yeah her company is actually bringing someone in. Unfortunately she is the only ex-porn-star/programmer at the company afaik. I just told my boss I might now some people. A few of the posters on this forum would definitely be a huge asset to us.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-12-2013 , 04:01 PM
ok, general question:

I have a sort function that takes a compare function as an argument with the following spec:

- If cmp(a,b) < 0, a comes before b
- If cmp(a,b) == 0, a and b have equal priority
- If cmp(a,b) > 0, b comes before a

I have a working cmp that sorts the list how I want it. Shouldn't a function along the lines of "rcmp(a,b) return -(cmp(a,b))" allow me to reverse the list?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-12-2013 , 05:49 PM
I would think yes as long as cmp correctly implements an ordering, which should have the following properties:
  • Reflexive: for all v, v = v.
  • Antisymmetric: for all v and w, if (v < w) then (w > v); and if (v = w) then (w = v).
  • Transitive: for all v, w, and x, if (v ≤ w) and (w ≤ x), then v ≤ x.
Source:
http://algs4.cs.princeton.edu/21elementary/


You could also do "rcmp(a,b) return cmp(b,a)".
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-12-2013 , 06:56 PM
Yeah, it's just a subtraction of two integers. The thing I'm sorting is a list of lists, and I'm keying off one specific value. idk if this is another "lol JavaScript" thing or if I'm doing something dumb, but:

(leaving out calls to parseInt for clarity)

Code:
return a[2] - b[2] // returns the exact inverse of what I want
So, I tried to find a way to reverse the list, but all of the following return the original list in the order I read the values from the file, as opposed to just reversing the list:

Code:
return -(a[2]-b[2])
return b[2] - a[2]

function rcmp(a,b) { return -cmp(a,b)}
I don't get it.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-12-2013 , 08:37 PM
Since it is past midnight here:
Happy Programmers Day everyone (always the 256th day of the year in case anyone wonders)
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-12-2013 , 08:57 PM
nice
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-12-2013 , 08:58 PM
Xhad, are you actually sorting the list properly? My guess is you're doing something silly like returning a new sorted list instead of sorting the list itself.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-12-2013 , 09:37 PM
I'm using Array.sort which sorts the list in place and takes a comparator argument. so for instance, this sorts the Array in the exact opposite order from which I want it (which is different from the input order):

Code:
function cmp(a,b)
{
  return parseInt(a[2])-parseInt(b[2]);
}

edges.sort(cmp);
While this just leaves it in input order:

Code:
function cmp(a,b) 
{
  return parseInt(b[2])-parseInt(a[2]);
}

edges.sort(cmp);
And yes, exactly like that, where I swap b<->a and change nothing else.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-12-2013 , 11:07 PM
before i get carried away, Array.reverse() is not what you need, right? (meaning something like edges.sort(cmp).reverse() )
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-12-2013 , 11:14 PM
If I were just trying to get a job done, that would probably be fine. This is, however, for a class, in which I deliberately took on the handicap of not using my primary language, so I won't be entirely satsified until I know why any of the constructs I've proposed don't work. If the answer is wacky enough I may choose another language that isn't JS.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-12-2013 , 11:41 PM
Can you post some example input?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-13-2013 , 01:47 AM
Did you try to call your cmp functions with simple inputs, to make sure they return what you expect? How about inserting a console.log() statement into the cmp functions that prints the arguments and the return value? Then try sorting a small sample array.

Sorry if this is too obvious, I'm just thinking it must be some silly error like your rcmp function not returning a value.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-13-2013 , 01:49 PM
Has anyone had any experience with docker.io? Thinking of using it to make deployment a bit easier...
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-13-2013 , 03:42 PM
man, I can't seem to reproduce it in toy examples. I guess I'll have to do some more debugging to isolate the problem.

fwiw, that last code sample was a verbatim attempt. swap a and b, algorithm goes from working to not working. That alone is driving me nuts.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-13-2013 , 10:25 PM
It's very likely the case that the algorithm was never working and that its just 'coincidentally' giving you the output you want.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-13-2013 , 10:27 PM
Quote:
Originally Posted by Xhad
man, I can't seem to reproduce it in toy examples. I guess I'll have to do some more debugging to isolate the problem.

fwiw, that last code sample was a verbatim attempt. swap a and b, algorithm goes from working to not working. That alone is driving me nuts.
You may want to handle NaNs that can be returned by parseInt and if applicable, possibly even undefined/null array elements.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-14-2013 , 11:47 PM
Excuse my incredulity, but how is it possible for there to be 10+ different ways to set up a server and a) all of them are correct and b) all of them are absolutely wrong.

Isn't there an "total ****ing moron's guide to this stuff?" Isn't there a "best practices" and this is step a, b, c, d, and yes, in fact, this is the correct way. How is it possible that everyone has their own silly way of doing it? What kind of stupid world are we living in?

Is it true that you need to use Virtual Box in a Virtual Box just to run valgrand? Is it true that git is easy to use but nothing, and I mean, none of the tutorial work?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-14-2013 , 11:57 PM
Quote:
Originally Posted by daveT
Excuse my incredulity, but how is it possible for there to be 10+ different ways to make a web-facing database application and a) all of them are correct and b) all of them are absolutely wrong.
hth?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-15-2013 , 12:04 AM
Right now, I'm still trying to push index.html. The database stuff will get done in 12 months at the rate I'm going.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-15-2013 , 01:10 AM
Like this:

https://www.digitalocean.com/communi...erver-on-a-vps

I've already established that all of the DO articles are wrong, but this one in particular seems more wrong than it should be. Can't quite put my finger on it, but it seems way wrong, somehow.

Then there is this:

http://deadlytechnology.com/web-deve...ites-with-git/

and this:

http://marcqualie.com/2012/02/deploy...sites-with-git

and this:

http://www.filosophy.org/post/33/dea...it_deployment/

In particular, there is one part that is truly mystifying:

Code:
cat .ssh/id_rsa.pub | ssh [email protected] "cat >> ~/.ssh/authorized_keys"
While they both agree on the syntax, one article says do it on the server, and another says do it on the local machine. Other articles don't even mention it at all.

You can apparently do this to connect to your local machine (and this is private):

Code:
git remote add origin [email protected]:my-project.git
but you can also do this and it will also be private:

Code:
git remote add origin ssh://[email protected]/srv/git/project
Basically, they are all a bunch of silly contradictions.

I think I'll just nuke the machine again and start from scratch on the opinion that I screwed something up royally. Maybe I'll ask for a refund due to my stupidity and just use Heroku instead.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-15-2013 , 03:21 AM
Quote:
Originally Posted by daveT
Excuse my incredulity, but how is it possible for there to be 10+ different ways to set up a server and a) all of them are correct and b) all of them are absolutely wrong.
fwiw, i've found that learning sysadmin is the single most time consuming and frustrating part of being a programmer. your pain and outrage right now is essentially the reason why heroku exists and gets away with their prices.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
$25m Guaranteed WPM on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

      
m