Just for anyone interested: Sweden actually stopped conscription in 2010, switching to a fully volunteer-based professional force. After the Russian invasion of Ukraine in 2014, opinions began to change and conscription was reintroduced in 2017. The number of conscripts per year is much lower than it used to be (~5K last year compared to ~27K in 1997), but is planned to increase to ~10K/year by the early 2030's.
I teach debugging in all my courses. The best systematic approach to give broken code to students, both in activities and on tests. Students are exposed to common errors for each and every topic. I collect examples of mistakes from previous years and from Stack Exchange.
I also demonstrate how to debug. It is combination of making accidental mistakes during live coding and introducing intentional mistakes that I show how to identify and fix.
After reading this post and the link there on the ‘Feynman Method’, I’ve decided to read Polya’s ‘How to Solve it’ [1]. I say this as someone who did his BSc in pure mathematics, MSc in CS and has worked as a programmer for a number of years. I meant to read it back in university, but I instead decided to keep applying the ‘Feynman method’, which I find for me is less efficient and more error prone due to my comparatively lower intelligence. The principles in the book shouldn’t be too hard to apply to both coding and debugging code.
They say you can’t teach an old dog new tricks, and you can’t increase IQ, but I’ve recently burnt a lot of actually quite simple coding interviews due to things like a missed edge case, and I wonder whether I can discipline myself to do things in a more disciplined and systematic fashion with this book. Not only for Leetcode/Hackerrank style questions, but for work as well.
On the topic of getting burned on edge cases I myself am in the same boat. I’m very much a speedy, excited programmer. I want to build the thing and see if it works afterwards. This can make me a bit sloppy especially in a time boxed coding problem.
What I’ve done to improve this to pretty good effect is follow this rough formula on problems:
- ask questions
- write out assumptions
- come up with a basic solution (pseudocode)
- see if i can come up with edge cases or converse examples that break my solution/assumptions
- code while stopping occasionally to repeat the previous step
- walk through the code manually with some examples
After doing this a bunch I’ve actually internalized a lot of the edge cases or errors I might have missed before. So I think I am slowly teaching myself to be more precise for these types of questions. It’s slow going but decently effective.
It’s hard to balance how much you should write on paper in place of just coding. Coding in itself allows you to explore the problem, but induces its own cognitive overhead, which might distract you from important insights about the direction you’re taking.
I replied prematurely. It definitely looks like we’re in the same boat regarding programming style. I wonder whether I can apply this with measurable results. It would be nice if it were easier to compare your completion time with others on Leetcode and Hackerrank so that the improvement could be measured.
EDIT: Some context about myself so as to not misrepresent myself as some sort of expert. I’ve been prepping while working full time for 6 months. I was really quite bad at doing the problems initially and now can pretty much knock out most problems without too much trouble. Planning to start interviewing in a month or two.
IMO comparing against yourself over time would be more productive. I say that cause it would definitely stress me out personally if I knew I was in the 10th percentile or whatever. And then that negative attitude could snowball into stopping practice.
If you do want an objective measure for FAANG I think Facebook recommends being able to complete 2 Medium level LC problems in 35 minutes. But again, it’s real hard to mimic the real interview environment of explaining yourself, being able to ask questions, etc. I did find mock interviews helpful early on to refine my process before just grinding problems.
The lessons from the book are especially helpful when I feel stuck in debugging; I’ll think through the guidelines and they get me unstuck almost every time. For example, yesterday I started feeling stuck trying to figure out why my tests were failing, and I realized I was failing to follow the “stop thinking and look” guideline. We tend to theorize way too much about what may be happening when we should simply look to see what is actually happening.
In my case, soylent-like products (specifically what used to be called Joylent) helped me a lot when I was really quite depressed. I could often go without eating several days simply because I couldn't get myself together enough to source any kind of food. Having a stash of Joylent meant I could get a sort-of balanced meal with minimal effort, which really improved my physical health and enabled me to take better care of my mental health too.
There are various reasons, some of which will require time to checkout. One is that soy is a phytoestrogen [1]. So the studies show there could be some issues with men eating soy at high levels. Googling provides a lot of arguments founded in reasoning for and against.
Another issue is that soy requires heavy agriculture and processing [2]. This can harm the environment in much the same macro ways as beef production. The chemicals used in processing soy into tofu and other products can be bad. Again, processing arguments go both ways (though soy is poisonous in its raw form [3]).
So right now many, myself included, advocate minimizing soy. You can't get away from it. Thanks to several US administrations soy is huge business. Just watch it. It might be that its good for you. Right now the soy debate is much like the egg debate of the 80s. I leave you with Lewis Black's commentary on food nutrition: https://www.youtube.com/watch?v=tXS5GBuk-GQ
Considering that soy is being fed to cattle, by definition, soy cannot harm the environment in the "same" macro ways as beef production. Beef production is an order of magnitude more, and anyone who substitutes soy for beef is doing a favour to the environment.
I too was caught by surprise by that kudos button. It seems to be a very poor design choice if your aim is to measure the amount of "genuine" kudos you get...
The problem isn't that it is unfair to people who suffer of epilepsy, the problem is that it could be DANGEROUS to people who suffer of epilepsy. Someone who is blind can't be harmed by being unable to see this particular visualization.
If it's so DANGEROUS why isn't there some kind of active display filter available to dampen temporal frequencies between 2 and 55Hz?
That, and--though it wouldn't have helped in this case--the most I heard about epilepsy complaints is on forums with flashy animated GIF images. Why do they browse with GIF animation enabled? Really, if it's such a health hazard, and images posted on a forum can give you dangerous seizures, why would you take a risk and trust on the goodwill of the community and take your chances with the occasional troll?
I don't want to dismiss the problem, not at all, I just wonder about the victim mentality displayed and lack of proactiveness.
Especially the display filter. If it's an actual health hazard, you shouldn't be asking people not to show flashing imagery on their sites, you should be taking action yourself, making sure your computer display is unable to display this imagery. Any kind of modern 3D GFX card should easily be able to detect flashing areas and dampen and/or motion blur them so they're safe, without much processing power needed. You'll be erring on the side of caution of course, so some video content might be degraded (though with a well-designed filter this should be minimal) so you'll want a key-combo to (at your own risk) temporarily disable the filter (with a parental lock for the children, of course).
Yeah, it would be great if everyone who had epilepsy was up to hacking their video card driver to simulate an e-ink display's slow updates. I'm interested to hear what modifications you've made to your own system software to make it suit your preferences.
Except that it's not even that. In firefox there is just a setting that disables animating gifs, if this is something that is affecting a significant number of people at any significant level of danger, then why don't people disable it?
It seems to me that the most likely explanation is that the risk is so minimal that people with epilepsy aren't even willing to give up lolcat gifs for it, though it is possible that people are unable to conceive of a setting existing to disable a largely unnecessary feature in a piece of software.
If it is a significant danger, and people don't realize you can disable it, then that seems to indicate a significant failing of the entire system, from doctors to parents to people taking care of themselves properly. I really want to believe that it isn't the case.
It might be worth looking at http://www.khanacademy.org/ for an effort in web learning. At this point it's mostly short youtube videos (quite a few of them) concentrating on one concept spanning math, physics, economics and some others. You can also create an account and get a personal "map" to see how you are progressing (were you go from basic concepts, and then build from them). The guy in charge wants to have videos about every possible subject and have one such knowledge map for them. Eventually, I think he also wants to be able to have online tutors helping individual students in the future.
I realize my explanation probably doesn't do it any justice so I instead refer you to http://www.youtube.com/user/khanacademy (the video in there) which should give a better overview of it all. There is also a longer video somewhere that has even more details.
I just thought I would share, maybe someone here will like it or find it useful.
The model M keyboard I'm using right now actually came from the trash, all that was wrong with it was some ribbon cable being loose (very easy to fix). The fact that this keyboard is actually older than me just shows how durable they are.
Also it is pretty loud, I'm used to it, but whenever I'm talking with friends over voice chat they begin to complain about it.
Just for anyone interested: Sweden actually stopped conscription in 2010, switching to a fully volunteer-based professional force. After the Russian invasion of Ukraine in 2014, opinions began to change and conscription was reintroduced in 2017. The number of conscripts per year is much lower than it used to be (~5K last year compared to ~27K in 1997), but is planned to increase to ~10K/year by the early 2030's.