have not expanded my search out to LA yet, just in OC.
@microbet, I am the opposite. If i quit in the middle of something, by the next day I have no fucking idea what I was doing the day before and getting back in the right context takes me a half hour or more. Probably because my code isn’t very clean, but I am working on that.
Do you need a database? Could you do the same thing with a flat file?
post grunch:
Postgres and MySQL are both easy to get up and running on a Mac, essentially just downloading the package and running it. I believe both create applets in system preferences for starting and stopping the db. Last time I did it the documentation was pretty good about getting them up and running.
I’ve heard this advice before. I think it’s some writers advice (Hemingway?, Einstein?). I like the idea of knowing exactly what I’m going to do first thing tomorrow but I try to have a logical stopping place with a very simple next step.
It’s all bullshit. I save my bullshit for the beginning and end of the day, because other people expect me to respond to their bullshit, and get pissy if I don’t. If I stop in the middle of something, it means I couldn’t get it working. I had one guy the other day try to bullshit me that he had actually downloaded my code and modified it. He was opening the IDE, and the project was not found! Oh! What could have happened to it?! Oh, let’s look here! Oh, it’s gone! This is the guy I’m supposed to be working with, on a small team.
With other teams, it’s much worse. Within my larger team, we have a decent process, and a decent amount of work gets done. There is attention to process streamlining. When I interact with other teams, especially non-dev teams, it seems that many of the bullshit jobs are there because a particular job title was in vogue at some point, and ever since then, that department or person has existed only to make more work for itself and for other people, while not accomplishing anything of value. The trouble is, if they find out that you are a suck… competent and can produce their work for them, they will pounce and cc: this or that Director while asking for updates.
Best just to save money, make sure to have a place to land in case of a reorg where you do not fit, and be able to leave if you want. Then, the bullshit doesn’t matter as much.
I do this on purpose sometimes. I’ve solved a lot of problems in bed before going to sleep or in the shower. There’s like a whole class of problems that are solved better without a keyboard to distract you (tempting you to try just one more thing that’s definitely going to solve the problem…).
Semicolons are required after return statements, so JS automatically inserts a semicolon at the end of every line that starts with return (unless the line ends with an unclosed parenthesis/code block):
Thus, you are returning an empty expression rather than the call to React.createElement implied by the JSX, which is what the error message says. My VSCode flags the orphan element as unreachable code when I make this mistake (frequently). 99% sure that you can insert the line break after => without issue, and you can definitely insert it after (.
After I did pretty well on the takehome test for this company, they are skipping my video call interview and going straight to an onsite with the CTO. It is going to be a DevOps interview. What should I expect? Just be able to talk confidently and clearly about Docker, Kubernetes, etc.? Or is there more to it?
Yeah avoid anything deprecated. The current react-y way is to use this.props.x in the render method, instead of passing props tp state. Then the component will just re-render when the it gets new props. If you need to do some calculation you can stick that in the render method too.
You can use a memoize method if you want to fine-grain when things are recalculated/re-rerendered. But I don’t full understand that.
That’s not really true… it only shallow diffs. If you pass an object you need to track just use componentdidupdate (or the hook way which is more complicated).
Right - but if I put value={this.props.data.EmailAddress} somewhere in my render method, then if EmailAddress changes, the component will update. Which is usually what I want right?
That does work but in my experience most of the time a child component like that needs access to way more than one thing from a completed request so just pass it the whole data object and do comparisons on it. IDK whatever works.
Can someone give me some basic wisdom about SQL (Django/MySQL if it matters)? I have the following tables:
Entity:
id (int, pk)
canonical_name (string, blank is OK)
Names:
related_entity (foreign key to an Entity)
name (string)
Record:
id (int, pk)
type (charfield, maxlength=15, about 500 possible values)
url
associated_entity (ManyToMany relationship with Entity)
I have about a million entities and about 20 million records. Performance is… less than ideal. (filter operations take like 10 seconds. I think this is something broken, not poor performance, but I’m running a migration to change the name of a couple fields (including the manytomany) and it’s hanging for hours…) There are a few things I am considering to try to make it work better, but not sure what is worth the effort of doing and what isn’t:
I just learned that there are these things called indexes, which seem like they are probably useful for this situation;
The ManyToMany relationship is actually a OneorTwoToMany relationships. I could replace the associated_entity field with a first_associated_entity and an option second_associated_entity that would be 1-to-1;
The type field on Record is currently a string because I didn’t know all the possible types, but there are really only 500-ish types. I could convert this into an integer field.
The 20 million records are mostly not relevant to my application, so in practice I want to use the mega database as the source for a smaller database that will only have records of a particular type (call it a million per child database), with additional fields relevant to that type of record. Maybe that will make my performance problems go away? What is the time complexity of WHEREs?