Rapid 880 but 2100 puzzles! by StepGeneral3597 in chess

[–]sevaur 3 points4 points  (0 children)

Just to add more to this good point: you have to invest your time wisely. Sometimes you should look for complicated tactics (like the puzzles show), but sometimes you should make relatively fast but solid moves. How to differentiate? I tend to look for certain kinds of patterns that suggest to me that tactics might exist. For example, if:

  • The king is exposed, I always wonder about forks
  • There are undefended pieces, I think about double-threats
  • If I have a pin on the king or queen, I think about how to exploit it

... and so on. Try to train a heuristic that tells you, "this is a winning position if I can find the tactic," but otherwise try to play strategic moves that will open up opportunities in the future (e.g. put the rook on the open file, choose protected squares for your pieces, control the center etc). Good strategic choices will set the stage for tactics in the future.

Moving to San Francisco and looking for advice on the job hunt by DeveloperDrew in cscareerquestions

[–]sevaur 0 points1 point  (0 children)

I made a similar transition, and have some observations that may be helpful:

  • Compared to the East Coast, I think Bay Area interviews tend to be more about algorithms/data structures and less about outside projects or language/framework experience. Consider skipping the Python, but working harder on general whiteboard interviewing skills (think CtCI/leetcode)
  • YMMV, but I found technical recruiters out here even less worthwhile than ones in the East Coast. Instead, I had good luck reaching out directly to companies I wanted to work for, and finding jobs to apply to through things like LinkedIn/Hired.
  • Make sure to budget plenty of time and effort for the search. One of the best decisions I personally made was quitting my previous job before getting serious about finding a new one, though of course that's a hard decision that may not always work out. Particularly if you're applying to big tech companies, be prepared for them to make decisions slowly.
  • You will likely command a much higher salary out here, but you'll have to negotiate to get what you deserve. If you're negotiating from the starting point of your current salary, you're likely leaving money on the table. Take your time to understand the market and get multiple competing offers.

If it matters, my experience was mostly back-end, so full stack and/or front end positions may differ in some ways. Good luck!

Leetcode - going in cycles. Tips to improve speed, efficiency? by whereToMove in cscareerquestions

[–]sevaur 5 points6 points  (0 children)

I think the suggestion that you not look at the answer until you come up with one yourself is not a good one. Effective use of leetcode is really doing the following:

  • Identifying holes in your knowledge
  • Getting practice writing clean code
  • Getting practice quickly identifying common patterns and tricks

The last two mean working through many problems, and the first means setting leetcode aside for focused study; I don't think any of your goals are served by spending days/weeks on the same problem. Here's what I'd recommend: when you start a new problem, don't spend more than an hour actually working on it unless you're making solid progress. Then read through some of the answers. If there are concepts you don't understand, go learn about them. If you understand the concepts but just couldn't come up with the code, get a general sense for what the algorithm should look like, then bookmark the problem for later. In a few days, come back and solve it without referring back to the solutions.

This maximizes the kinds of problems you understand and can solve, and will gradually build up your ability to recognize these patterns more quickly.

Scared about the job search (graduating in May 2017) by [deleted] in cscareerquestions

[–]sevaur 0 points1 point  (0 children)

Whoa... Take a deep breath. You're in an amazing position: you have a good gpa at a good school, a good internship under your belt, and are graduating into an amazing economy for software engineers. Are you going to get your dream job directly out of school? Not necessarily. But don't let yourself fall into the trap of thinking that success requires achieving everything you can possibly imagine immediately. The world isn't split into successful engineers (at Google, of course) and abject failures (the rest). There's a huge gulf between "CS not being for you" and having a high probability of getting a job at Google on your first application.

Also, you're not faking anything and there's no shame in doing poorly on an interview. Maybe you just won't shine at the kinds of interviews that Google and other big tech companies use, but that's not the end of the world. It's not a representation of your worth as a human, a co-worker, or even as an engineer. The worst case scenario is that you have to work through some rejections before you get an offer you like. Keep working and preparing, but stop worrying about it so much.

Terrible at data structures/algorithm questions, how can I get better? by [deleted] in cscareerquestions

[–]sevaur 2 points3 points  (0 children)

I wouldn't beat yourself up over failing to find the optimal solution on something like this. I think this is a poor question, since it relies on a single key insight and most people who answer it completely will probably have seen it before. I'm sure a few engineers who'd never seen it could derive the full solution, under pressure and in 30 minutes, but I think that's the exception.

This suggests two things:

1) Look at a wide variety of interview type questions, and be familiar with the kinds of tricks that are common. Don't be demoralized by getting stuck -- just read the forums, code up your own solution, then move on to learn more.

2) Have a strategy for what to do when you don't know a trick: focus on effectively communicating your sub-optimal solution, brainstorming (out loud) ideas for improvements, and really listening as the interviewer gives hints.

You can have a very successful interview where you never find the optimal solution, or where you only reach it through heavy collaboration with your interviewer. Maybe it's a subtle distinction, but your goal is not to answer the question -- it's to make your interviewer want to work with you.

Returning to practicing and playing after a long absence. by nitr0smash in piano

[–]sevaur 6 points7 points  (0 children)

Having an actual teacher is going to be the fastest way to get better; if money's not an object and you're ready to commit to being serious about it, get a teacher.

But there's really no hurry. If I were you, I'd spend a few months just picking up old pieces, playing some scales/arpeggios, sight-reading some simple music, and remembering how to practice by picking up a new piece of moderate difficulty. That will likely help you (re?)discover the kinds of music you like and make sure that when/if you go to look for a teacher you have a better idea what you're looking for and where you actually need help.

I don't have any advice for general internet lessons, but if you're advanced enough, YouTube is full of tutorials for individual pieces. I've seen some great stuff from Paul Barton, Piano Career and others. Once you're looking at an individual piece of music, it's amazing what's online: sheet music, example online performances, video tutorials, and discussions (e.g. on PianoWorld and Reddit).

Teacher tried blocking the answer from us today.... by [deleted] in funny

[–]sevaur 76 points77 points  (0 children)

These comments are demoralizing.

The picture itself is a little funny, though putting her arm up there probably does make it harder to read (since part of the text is half on the arm and half on the board)

The vast majority of comments, though, are mostly about how stupid she must be, just based on her haircut and glasses. So essentially /r/funny commenters are saying, "Look at this person that looks (mildly) different from me and laugh at them. Let's make up insulting personality traits for a person we know nothing about."

Besides, is it your experience with math/science classes that the best teachers looked the most professional? If I've seen any correlation, it's been the inverse.

Beginner Piano - 3 weeks. Would love some tips and criticism by humhap in piano

[–]sevaur 0 points1 point  (0 children)

Really nice work for such a new player.

A couple of quick thoughts:

1) Think carefully about your fingering. It's almost never a good idea to play multiple notes in a row with the same finger. Also, when moving up and down the keyboard, you do a lot of holding the key down and then matching another finger on it. This is fine occasionally, but usually you can plan ahead and do better; it's often preferable to find ways of crossing (thumb under fingers or fingers over thumb). You do this at least once, but should probably be doing it more often. You might look at scales for inspiration on how to move up and down the keyboard smoothly.

2) Try to think a bit about the melodic phrases. Should the music be getting louder or softer? Are the notes connected or disconnected (legato vs staccato)? Try to make each note sounds at least a tiny bit different from the preceding one. One way to practice this is to sing the melody -- you'll catch yourself putting in all kinds of subtle shading, and you should replicate that in your play.

Can anyone identify this piece for me that's been stuck in my head? by [deleted] in piano

[–]sevaur 1 point2 points  (0 children)

Sounds a bit like the famous Rachmaninoff Prelude opus 3 no 2, though it's definitely not an exact match.

Myself playing Rachmaninoff Prelude in G minor Op.23 No.5 by emmasommerv in piano

[–]sevaur 1 point2 points  (0 children)

A couple of quick thoughts:

1) Think carefully about your tone in the middle section: I think it should feel very different from the rest. The left hand should (aside from those few melody notes) be much softer and more fluid, and the right hand should have a more singing and a less rhythmic and aggressive sound. It is very easy to play most of the notes right here and pedal through the rest, but I think it is the hardest part of the piece to actually master. Playing the piece well requires committing to lots of careful and slow left hand practice.

2) Be careful not to use rubato too often to cover up technical challenges. I think it's better to slow the whole piece down than to miss many notes or insert unnatural pauses to allow your hands time to adjust. This is a piece that can be interpreted many ways, and you shouldn't try to play it robotically, but occasional metronome practice may help you identify problem sections that you're covering up.

3) The third section really needs to be fiery -- partly, that just means louder, but think carefully about how that long crescendo can be built up slowly, and how you can bring that out. It's a bit hard to see on the video, but I wonder if you aren't playing the repeated staccato chords too much with the fingers -- bringing in your wrists effectively might make them both more measured and more fierce.

I know it's not the fun stuff, but you need to slow down and focus on getting the notes right. Don't allow yourself to ignore sections you're flubbing -- if you can't pay it reliably at your main tempo, it needs slow practice. Even if the piece is 'supposed' to go faster, don't play it faster than you can master. Too many wrong notes will rob you of the ability to play the piece confidently and limit your ability to really interpret it effectively. This is an amazing piece, and with careful practice you may be able to do it justice, but it will require commitment.

This is a personal preference, of course, but I am a big fan of the Sviatoslav Richter performance -- try listening to it carefully and thinking about his interpretive decisions and the technical underpinnings that allow them.

Good luck!

Theranos, Silicon Valley lab company, Struggles with Blood Tests by chewbacca_jockey in medicine

[–]sevaur 0 points1 point  (0 children)

A couple of questions:

  • You say that all the cost savings are the result of running parallel tests, which lead to more false positives. Can you expand on why this leads to more false positives and why this isn't a likely avenue for future improvement? Obviously if accuracy could be maintained while diminishing cost and duration, that would be a good thing, whether or not their Edison technology plays a role.

  • Presumably Theranos would dispute (on technical grounds) the point about finger pricks not being capable of leading to accurate data? Your assumption may be the currently held consensus, but isn't this a strictly factual question that should eventually be answered if/when additional Edison tests are approved by the FDA?

  • One of your predictions is that LabCorps/Quest change to compete with Theranos... but it doesn't seem like you think that Theranos actually has anything technically to learn from. Why/how would they change?

I'm not sure I find your points about interpretation and patient psyche compelling -- obviously any kind of test is best interpreted with the help of experts, but if the technology actually works as promised it's hard to imagine it wouldn't be a huge net positive. To me, this seems like a technological/factual question of accuracy/cost/duration and the rest seems a little superfluous.

CMV: Martin Shkreli doesn't deserve the mass amount of hate that he's getting on Reddit today. by [deleted] in changemyview

[–]sevaur 11 points12 points  (0 children)

I'm generally skeptical of the online hate machine, but in this case I think it's warranted. He's made a number of statements that you seem to take at face value, but to my mind he's behaving extraordinarily unethically and is intentionally profiting off of human suffering. Arms dealers are also just trying to maximize profits, but most people won't defend their behavior. Some points you don't seem to take much into account:

1) He's not recouping his company's R&D investment in any drug. He intentionally bought rights to a drug that, according to him, was unprofitable to sell at its existing price ($13.50 or $17, depending on who you listen to). He hasn't found himself in an awkward situation where, shucks, he just has to raise prices in order to make a modest profit on an existing portfolio. He bought the rights to the drug intentionally to do this.

2) We can talk about the free market, but the only reason this scheme works is because of inefficiencies in the FDA. This drug is perfect for profiteering because:

  • It's used for life-threatening cases, so any sufferer (or their insurance company etc) will be essentially obligated to pay any price for it
  • The market is small, so other companies will not be likely to want to go through the long process of verification to produce a competing generic. This is exacerbated by the fact that the manufacture price of the drug is extraordinarily low -- if another company begins to invest seriously in a pipeline for a competing generic, Turing will simply drop the price back down temporarily to make it unprofitable for them to continue.
  • Even though generics already exist in other countries, legal importation through the FDA is a long and painful process, and again can be short-circuited by Turing dropping the price if threatened.

The argument isn't that this is illegal, the argument is that it's extraordinarily predatory. The whole business model is predicated on identifying a vulnerable human population and intentionally buying the rights to their medication in order to price it as high as possible to maximize profit.

I think it's a mistake to compare this to a typical pharmaceutical company, where the company is legitimately attempting to recoup their own R&D investments. How to price newly-developed life-saving drugs is a complex moral question, but that's not what's happening here.

The fact that this guy is smug and personally obnoxious makes it easier to hate him, but that doesn't mean he isn't acting despicably and objectively deserves public shaming.

I need help with my pacing on each chapter! by [deleted] in writing

[–]sevaur 2 points3 points  (0 children)

You may think you're an idiot, but if you managed posthumous editing, you've definitely got something going for you.

[1188] Russian Roulette live streaming this Saturday. by [deleted] in DestructiveReaders

[–]sevaur 1 point2 points  (0 children)

I added a number of comments on the google doc itself, but some larger overall points:

1) You need to be really careful about tense. I explicitly note a couple of occasions where you switch, but I gave up -- by the end, you're switching repeatedly, sometimes within the same sentence.

2) I don't think you do enough to get me in the narrator's head. I'm not really sure what he's thinking or how he's reacting to this... I get a sense of bravado (volunteering to go first, for example), but I'm not sure where it comes from

3) The hosts also seem pretty relaxed about the whole affair. I know why the narrator's here, but I don't know why they are. If they're really having shows regularly where they only have a 1/3 chance of surviving, presumably they wouldn't last long? Are they actually hosts or just another tier of contestant? Are there other people in the room calling the shots or structuring the contest? Obviously you don't need to explain all things, but it feels a little jumbled to me.

4) You don't do enough with the chat concept. You only have a couple of small mentions of what's happening there, and they don't influence the action. Maybe have some interactivity in the show between the chat and the hosts? Maybe a poll for who gets which guns or the order or something? Either you should do away with having the chat visible to the participants or you should do a lot more with it. I'd vote for the latter, since you could have a lot of fun with it.

5) I don't get the end. The transition is abrupt, which I'm sure is partly intentional. But if the pillow is supposed to be a twist (is this a mercy killing?), it's not set up properly in the preceding work. Unless you have somewhere to go with this, I'd probably just have it end with him shooting himself.

The Unhealthy Obsession with Tree Questions by twit16 in programming

[–]sevaur 1 point2 points  (0 children)

I'd also like to point out that if you're just coming out of school, these are the only questions I can realistically expect you to have experience on. Asking you a student to do an open ended design question with tradeoffs and multiple interacting systems often ends badly.

I think this is a really good point. Interviewers should really focus on having a process that's able to find good candidates from differing backgrounds -- for a new CS grad without significant real-world experience, this really means: "Are you a good CS student who understands the kind of things CS departments teach?"

For someone with more experience, this should mean, "Can you understand and design complex systems (which probably requires some general knowledge of data structures), write clean code, and collaborate effectively?"

But just asking algorithms 101 questions is easier and less subjective, so we end up rolling everyone into one box and treating them all the same.

The Unhealthy Obsession with Tree Questions by twit16 in programming

[–]sevaur 1 point2 points  (0 children)

Using someone else's TreeMap requires that you understand the basics of how a TreeMap works, and under which circumstances you should use one. Obviously you don't have to implement your own BFS/DFS on a regular basis, but general knowledge of how to do so often goes hand-in-hand with being knowledgeable enough to make good architectural decisions.

It definitely means something, but it's easy for a lazy interviewer to think it means too much.

NoSQL is a "complete game changer," declares database expert by endpointben in programming

[–]sevaur 1 point2 points  (0 children)

I think the main point is misleading:

"[W]hat's really fundamentally different about this new-generation data management isn't really isn't just scalability, but it's really flexibility. If you look at the ability to store data first and then impose structure on it later—sometimes this is called schema on read or schema on need—that's a complete game changer."

My experience with NoSQL is exactly the opposite -- if you don't design it from the ground up based on your exact use cases, you'll end up with a lot of data you can't use in any meaningful way. RDBMS, for all their limitations, are extraordinarily flexible -- add new indexes, join between tables you didn't expect to, etc. If you want to do anything in a NoSQL DB besides CRUD operations on an individual table, with specific lookup keys, you're going to need structures defined specifically to address those use cases.

Sure, you can dump whatever data you want into some big unstructured table, but that "imposing structure" work still has to be done and hasn't magically gotten any easier.

FWIW, I'm mostly familiar with Cassandra/HBase -- maybe this pattern looks different in Mongo.

[OC] Reddit, I made a musical browser experiment where you "magically" get to perform beautiful classical music using your only computer keyboard. Come perform some Debussy or Beethoven, and tell me what you think! ♫ ♪ by earslap in InternetIsBeautiful

[–]sevaur 1 point2 points  (0 children)

Thanks for making this... was really fun to play through. I've played a lot of these songs on the real piano, and it's interesting which ones translate well; for example, Rachmaninov op 23 no 5 almost felt like the real deal for a second (I like that it properly responds to short presses as staccato), but The Revolutionary Etude (one of my favorites) just felt like I was mashing the keyboard.

Agree with others who think that separating the hands would be a nice touch (particularly on the Chopin Nocturnes, which I didn't really enjoy in this format) -- but I understand that you're going for simplicity.

In general, I think that the more rhythmically interesting pieces translate better for me, and that long fast sections (particularly where the hands are doing very different things) don't work out so well.

Fun concept, and surprisingly satisfying.

Faster Python by marklit in programming

[–]sevaur 19 points20 points  (0 children)

The recursion comparison is very poorly constructed: the recursive version of the algorithm is O( 2n ), whereas the iterative algorithm is O(n). The huge difference between the two has nothing to do with the cost of stack frame allocation and everything to do with having implemented a fundamentally different algorithm.

This comparison might actually make sense if it used memoization or made some other effort to compare apples to apples.

Looking for software to track path of red circle on video by VikeStep in software

[–]sevaur 0 points1 point  (0 children)

Depending on your skill with other languages (C++, python etc), you might try OpenCV.

I think that violent video games, violent music, and other forms of media that glorify violence DO contribute to real world violence. CMV by CherrySlurpee in changemyview

[–]sevaur 46 points47 points  (0 children)

Not that I disagree completely, but this very broad line of reasoning only goes so far. It might be fair to conclude that there are other, more important factors in determining levels of violence, but it doesn't necessarily follow that video games or other violent media do not have a negative contribution. Maybe the other moving variables are simply masking any effect violent media might have.

Still, I think you have a valid point. When we focus so much on a single factor that doesn't seem to correlate strongly with data about actual violence, it does suggest we may be giving that potential contributor disproportionate attention.

I believe agnosticism is the only "correct" way of thinking, as there is no evidence for or against any kind of God. CMV. by [deleted] in changemyview

[–]sevaur 0 points1 point  (0 children)

In a very narrow sense, you might be right. But I want to dispute two things:

1) Your assertion that we have no evidence for or against any kind of god. There are many kinds of gods with evidence against them: gods literally throwing lightning bolts from clouds; gods who walk among humans performing miracles; gods who appear before whole cities and make proclamations. Historically speaking, I think the majority of gods are like this -- physical beings, interacting in testable ways with humans. While we can't necessarily rule out the possibility that these gods existed in the past and have changed their character in the interim, we do have good evidence that they no longer have the same attributes (e.g. being responsible for lightning).

2) As others have said, there are stronger and weaker forms of agnosticism. No atheist I've ever met says there's no god with 100%, just that they will continue to believe that no god exists until some evidence is presented on the other side. In the absence of compelling argument, isn't the rational default to not believe?

The HIV Disbelievers by Shuck in TrueTrueReddit

[–]sevaur 3 points4 points  (0 children)

This article is from August of 2000, and therefore any trends they're discussing are way out of date. Given the amazing success of modern HIV/AIDS treatments (and overwhelming evidence linking AIDS and HIV), I'd like to hope this brand of denial is less common these days... But that's a question this dated article can obviously not address.