Programming

dark/light mode is an OS feature. My web app did not detect it until now.

Then I wouldn’t change it automatically. Personally I have different preferences for whether I want bright background dark font or vice versa depending on how long I have to look at the same screen/window.

Today I Iearned about git rerere

1 Like

Anyone have any experience with one of the websites that supposedly get people remote contract work?

Prepare to compete against $8/hr in India or the Philippines (or so I’ve heard).

Well, I’m going for it. I put my resume on indeed to start. Dragging my ass all the way across Southern California to get in someone else’s attic (what I’m doing right now in Claremont) is getting old and so am I.

I had some luck with indeed, also hired (but they may be more full time) and there’s a site called made in LA that might be promising. This was 2 years ago there may be more now.

I think ZipRecruiter is mostly useless and a scam. Cybercoders is absolutely a scam - stay away.

The best results I had were finding job listings online and applying. That will put you immediately in touch with recruiters who have plenty more job listings.

Check out job spring btw (and come see me for lunch if you come up - their building is a block away). I was vastly more impressed with their operation than anyone else.

I applied for a few things on indeed. Got one rejection back, haven’t heard on the others. I took a couple tests and got Expert! Hope that helps. I’ve got a better prospect that I hope pans out - last night one of my closest friends who has been a programmer for 30+ years sent my resume and a recommendation to a place he thinks is looking. I will look into jobspring - thanks. And lunch in Westwood sounds good. I want to go up there at some point with littlemicrodaughter. She is intending to xfer to UCLA after 2 years and worried about being locked into a major and not getting to take what she wants - I’d like her to talk to a UCLA counselor instead of the Santa Monica City College people.

In my experience this is definitely the way to do it, whenever possible. Good luck!

So, this exchange has derailed my moonlighting life from productive web programming to feverish obsession with Rust. It’s extremely interesting–I’m not sure how much of my fascination stems from being newly exposed to static typing in general vs the strange Rust-specific stuff, but it’s quite a mix.

As you surmised, it seems like there is a lot of mental effort required to track ownership of data and lifetime/type of references, which feels like good discipline but is painful for a beginner. In particular, any data organization that doesn’t look like a tree is hard or impossible to implement, because it’s generally forbidden for two pieces of code to have the ability to modify the same object. (There are apparently some tricks that I don’t quite grasp yet, but it’s generally true.)

On the plus side, I’ve been really pleasantly surprised by how expressive Rust is. The syntax includes a lot of pleasantly natural stuff (for x in vector, etc.). In addition (and this reminds me of a post suzzer made a month or two ago), the language doesn’t have exceptions–instead, they draw a sharp line between “panics,” which are intended to be unrecoverable errors that aren’t reasonable or safe to recover from, and everyday problems arising from getting bad data. So, for example, if you try to index outside the bounds of a vector, the program will panic and shut down, but if you try to parse a non-numeric string into a number, the function will just return str::Err. Moreover, the type of trying to parse a string into an int isn’t an int, it’s a separate type called Result, the value of which can either be Err or Ok(int). So the type checker effectively forces you to explicitly error-handle to access the result of your function.

There’s also a pumped-up enum data structure that allows each member to have its own data, which is paired up with a whole pattern-matching/switch-type syntax in a way that’s very readable and expresses conditional logic much more clearly than if/else.

1 Like

[quote=“goofyballer, post:532, topic:192, full:true”]
The equivalent Rust is
let x = match chancy_function(y){ Ok(answer) => answer, Err(e) => return e };

but that can all thankfully be shortened to let x = chancy_function(y)?; if all you’re going to do is propagate the error result (and assuming that the function you are in can return an error). The really neat thing is that the return type that can be Ok or Err is its own data type with various methods, so there’s a bunch of different stuff you can do in a concise and readable way:

let x = chancy_function(y).expect("panic with this message if there's an error");
let x = chancy_function(y).unwrap_or(default_value);
let x = chancy_function(y).map(f1).map(f2) // Mapping a good result and passing the error on

New record for my board game site today, 300 people online at once.

A ton of them italians, of course

1 Like

Could actually use some help/ideas here. I have about 450 people playing my site now at peak but my back end can’t keep up. Lots of complaints about (moderate) lag on actions and my cpu and memory is high, not crazy but up there.

To mitigate it I went from 2 cores 4gb to 4 cores 8gb and it did… nothing. More or less the graphs bounced right back. I’m sure a lot of it has to do with node being single threaded but like what can I do here to off load this or make this better? Throwing $ at it didn’t do shit. Its basically just a websocket server handling probably thousands of events per minute and it just can’t keep up.

My event loop latency remains at ~17ms which seems fine? I got nothing.

Sounds like you’re going to have to think about some kind of load balancing, does the architecture lend itself to running actual games on different servers while the lobbies and whatnot can run somewhere else?

If you have 4 cores you have to have 4 node child processes running. Otherwise there’s no point to 4 cores. I have a file that manages the processes and load balances between them (one process is master) - works great. (Unless node is smart enough to do this for you now - I’m out of the loop for a few years.)

DM me and I can help you. I’ll be bored at home anyway. Performance mysteries are fun.

If you already have 4 processes, then yeah you may need more instances and a load balancer. Or it could be data access or possibly a network choke point.

We kept running into all kinds of weird little DDOS throttles and stuff with our hosting provider - rackspace, then bracket. The annoying part was they’d always insist they had nothing like that running until we finally proved it to them.

There was one we never could figure out. We finally solved it by moving the node instances and play instance they called (4 node instances per 1 play instance X like 16 VMs I think across 2 datacenters) onto the same VM. Still bugs me and my coworkers to this day that we never figured that out. There was some kind of bottleneck between node and play that I’m sure must have been some hosting provider throttle crap.

We get throttled by MS trying to back up Office 365 data, those are fun conversations with the customer, we’re also seeing MS drop connections while trying to migrate data to Office 365, even more fun…

Not at all :expressionless: it holds all of the games and all of the chats in them in memory on one thread.

No idea how to do this =/ and the extra wrinkle is its all websockets.

I gave suzzer root why not go nuts

I just employed someone from freelancer.com in Romania for a small project who was cheap and very good. I told him to up his quote from about $50/day.

It’s difficult to compete against this.

Here’s the graph btw I’m super confused. 3pm yesterday is when I upgraded hardware.

I posted that famous pic of the dude in his underwear with a bunch of guns on a friend’s comment. FB post-banned me for a day for violating their posting guidelines. I appealed and won my appeal an hour ago. They’re showing the post and people are laughing at it. But I still can’t post. I even tried logging out and back in again.

Eventual consistency FTMFW.

I can’t even like things. That’s just douchey, Facebook.