Hacker News new | past | comments | ask | show | jobs | submit | cglouch's comments login

one nice thing about having the terminal within vim is that you can manipulate the output like any old buffer. So for instance if you want to copy something from the terminal into a script you're editing, you can yank the text from the terminal and paste it into your script, taking advantage of vim's editing features and without needing to move your mouse.


Do you regret doing your PhD in math? Reason I ask is that I thought about going to grad school for math but decided against it. It just seemed like it would be postponing the inevitable of finding a job that had little to do with my "passion". I definitely see the appeal of doing a PhD in a field with better industry employment prospects (e.g. AI in CS if you're into that), but less so for fields like pure math that aren't as employable outside of academia. I'm curious if you felt the experience was worth it, though


I did a PhD in math and if I were to do things again, I'd do applied math because I think I enjoy applied math at least as much as pure math (this is not true of everyone) while also having it have more obvious job prospects. I did pure math in part because I was told it was easier to go pure->applied than applied->pure. I still think that is true and was a not an unreasonable way to choose what to study. I fundamentally had a very good time in my PhD (I would absolutely describe it as fun, though that would only be part of the picture) and learned a ton and now am transitioning to applied math in exactly the manner that I had been told would be possible (though I feel like I did this more by luck than by it being systematically possible).


I wouldn't say I regret it, but that almost doesn't feel like an applicable word; it felt inevitable to me, so it's hard to imagine any other path. Like, at the end of undergrad, all I wanted to do was think about math all day, every day, and that's what I got to do for the next five years. There was no convincing 22-year-old me to do anything else. Only near the end did the novelty really start to wear off.

N.b. I'm in a very lucky position career-wise now. If that were not the case, maybe I would feel more regret.


I've found that I often get better results on google if I click "Tools" under the search bar and change "All results" to "Verbatim". It seems to force it to just do the query without as much of the magic.


They still haven't enabled Verbatim for Image searches though. The difference in results when switching from verbatim-text to images is shocking.


Yeah I have tried verbatim and it does seem to help a little in some cases. In others, it either shows totally irrelevant results or does not turn up any search results.

I wish I could do a grep style search on the web after removing all the social media and popular brands.


Even in verbatim it often results in it taking semantically similar words instead.

I'd much rather have it return no results.


I'm still using my "dumb phone" from 2010. I like it cause it has a physical keyboard, a long battery life, and I can drop it without worrying about breaking the screen. Plus I don't have to worry about the privacy issues that come from apps collecting data.

Honestly the only feature I feel like I'm missing out on is GPS. But I've actually found that not having GPS improves my sense of direction, since I force myself to actually learn the map of my surroundings instead of just always relying on the phone.


The two things I've missed without a smartphone is maps and the ability to find phone numbers and addresses of businesses on the fly. Other than that, there's no substantial reason to carry a smartphone. It's funny how much R&D was used up to build what essentially is a digital phone book.


I, on the other hand, don't use it to find phone numbers and addresses of businesses, but use it all the time to download and listen to podcasts. Each person might only have a couple of important uses, that doesn't mean the total set is small.


Using bit manipulation to calculate chess piece movements is really quite satisfying. If magic bitboards are too confusing, the precursor - "kindergarten bitboards" - are a bit easier to understand. I have a description here if anyone is curious: https://github.com/cglouch/snakefish#sliding-pieces

I think once you understand the principle behind kindergarten bitboards, magic bitboards start to make more sense. It's basically a more clever way of indexing into a precomputed move table, that takes advantage of the redundancy in occupancy states, and requires even fewer instructions to determine the index. Although it does still feel kinda magic!


Does anyone have any recommendations for learning to write modern, idiomatic C++? I used C++ in college for data structures and algorithms, so I have some familiarity with the basics. But we were mostly restricted to using C++98, and I'm not sure what the best practices look like these days with the changes introduced in 11, 14, and 17.


Effective Modern C++ by Scott Meyers is a good book that I've been supplementing with google searches. It goes over the main new features in '11 and '14 you would want to know.


+1 for this book. Also, if your company can afford it, having Meyers or Sutter coming on site to give a day or two lecture to a group about Modern C++ is worth it. They both have great handout material, give great lectures/presentations and are very approachable with (even idiotic) questions.

(disclaimer: I am an unattributed - due to company policy - interviewee for Meyers Effective Modern C++)

edit: grammar


Scott retired in 2015; I don't know if Scott is still active in terms of lectures/presentations:

http://www.aristeia.com/


Jon Kalb has told on CppCast that Scott is doing a presentation at CppNow, but totally unrelated to C++ (presentation skills workshop).

http://cppcast.com/2018/03/jon-kalb/


Aw, damn. It's been before 2014 I last saw him in person, so I have no idea. It's a shame, because he is a great presenter with an infectious energy about him that I found really engaging.


I can confirm that this book is a great starting point, having undertaken a similar project last year. Off the top of my head, the biggest change is move semantics, along with smart pointers. Once you have those concepts down the other pieces are comparatively quick to pick up.

I've always liked C++, but I think it's become a much more enjoyable language to use in the last decade.

Oh, while you're at it, check out the Passkey pattern[0], which is a nice way to avoid overuse of friend classes.

[0] https://stackoverflow.com/questions/3324248/how-to-name-this...


It's a good book, but I find his use of his good writing skills to try to smooth over the many terrible parts of the language a little irksome.



I am not an experienced C+++ programmer. That being said, I found Marc Gregoire's book to be pretty good. https://www.amazon.com/Professional-C-Marc-Gregoire/dp/11188...

The 3rd edition covers c++14. New version coming out in April covers C++17.


The super FAQ at by isocpp is very good. https://isocpp.org/faq




I found this a good (if short) primer on the latest features: https://www.amazon.com/11-14-Tips-Understand-novelties/dp/15...


in case anyone was curious how a bitboard chess engine works, I wrote one from scratch in python and included a writeup describing my general approach (mostly focused on the move generation aspect):

https://github.com/cglouch/snakefish

(I cheated a little by not implementing castling / en-passant since it's a pain, and my engine is still really slow, but hey it works!)


That was really interesting. Thanks for sharing!


The course itself is great too - CMU actually posts the video lectures on their website, and the labs are available as well:

http://www.cs.cmu.edu/afs/cs/academic/class/15213-s16/www/sc...

http://csapp.cs.cmu.edu/3e/labs.html


If you find out, let me know! One thing I'll caution you about is there's sometimes a bit of a disconnect between "doing math" as perceived by someone who studied e.g. CS versus someone who studied math. For some people, doing math means maybe doing some trigonometry or some basic stats; whereas others won't be satisfied unless they're working on algebraic k-theory or something similarly next level. For people in the former category, there are certainly jobs available with just a bachelors degree and ideally some programming skills, whereas for the latter, you'll almost certainly want a PhD (and even then you may not get to use that knowledge outside of academia, depending on your area of study.) You'll want to find out where you are on that spectrum, and how you feel about grad school / work life balance / etc.

Personally, I got a bachelors in math and ended up working as a software developer. There's enough overlap in the sort of thinking required that makes it reasonably enjoyable. I do wish I had more opportunities to use math in my job though!


> disconnect between "doing math" as perceived by someone who studied e.g. CS versus someone who studied math

In what sense? There are folks studying theory in CS departments who are by all intents and purposes 'pure' mathematicians.


I prefer listening to a familiar podcast to fall asleep. It's easier to do while lying down in bed and I can do it with my eyes closed, unlike TV/Netflix. The lack of visual stimulation is nice, at least for me.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: