No, they come with pre-trusted cert authorities. And any cert authority can issue a certificate for any domain. So, if somebody "convinces" Verisign to give them a cert for facebook.com, that's it, they are now facebook.com as far as every browser is concerned.
In fact, sites like Facebook and Google change their certs so often (probably due to load-balancing or the simple challenge of synchronizing a certificate over a global set of datacenters), it's practically a full-time job keeping track of whether this "new" cert is valid or not.
Now wait a minute, if you're concerned about years prior to 1, you need to be concerned about the fact that leap days as we know it didn't come about until the Gregorian calendar. At the very least, you should change that > 0 to > 1582 or so (depending on where you're calculating dates). The Julian calendar is a simple % 4, without the % 100 and % 400 stuff.
I've had sleeping problems since I was a teenager, and I've learned many, many tricks.
The main thing is, you need to give yourself extra room for slower reactions and worse decision making. Like, double the space you would normally give yourself. The next most important thing is, every two seconds or so, you should be saying to yourself, "HEY STUPID! STOP THINKING ABOUT WHATEVER WEIRD THING YOU WERE THINKING ABOUT AND PAY ATTENTION!" You'll need to say that to yourself again in another two seconds or so, once you get to a certain level of tired there's no way to stop it, but if you can keep the energy up to keep yelling at yourself you'll be fine.
I know, it's terrible, but I do what I can to not endanger other people's lives. I think my driving record over the last 14 years is a testament to the fact that my "tricks" are effective, but I have no illusions that I'm as safe as I could possibly be, and if I ever cause an accident I'll feel terrible. But I'm not going to consign myself to a shitty life just because the world isn't fair and makes no accommodation for people who can't sleep during normal hours. The world's not fair to me, I have to feel like shit all the time, the world's not fair to you, there's dangerous people like me on the road. That's just the way it is. If it's any consolation, statistically, this is eventually going to cause enough problems for me at work that I'll be fired, and no longer able to afford to drive. Then I'll be homeless and everybody will be safe again! Yay!
Oh, no doubt about it. 10-11 PM rolls around, and no matter how exhausted I've been all day, I come alive. I get ideas, I'm motivated to clean up the house, I get ideas for whatever programming project I'm working on, I want to call my friends--but it's time to crush all that energy down and go to bed, because I have to be to work at 8 AM. When I can go to bed at 4-5 AM and wake up around noon, everything is perfect.
Employers, however, do not give a single fuck. If you have trouble getting up in the morning, you're lazy. Why don't you just go to bed earlier, you dummy? Being an employer and being a morning person seem to have a high degree of correlation, and morning people generally have a very hard time empathizing with night people. Night people are "wrong" or something. I don't know, I don't care anymore. For right now, I'd rather have money than feel good. I've been poor. It's worse. A sleeping pill every night, and instead of it being impossible, I'm just blurry and kind of tired all the time.
I quit smoking because I don't want to get cancer, and I don't want to smell bad all the time, and I don't want to be out of breath walking up the stairs. That said, I loved smoking. I still miss it every day, but the risks are greater than the rewards.
Stop taking my sleeping pills? Hah. Have you ever been so tired that you get a sore throat? Or that you argue with yourself at a stop light, "no, don't close your eyes, I know it would feel really really good but if you do that you'll miss the green and might not wake up until somebody knocks on your window"? Your legs shake, you feel sick to your stomach, your palms sweat constantly, your eyes try to close with all their might until you can hear the muscles straining in your ears.
Now try feeling like that for months on end. Stop taking my sleeping pills? Fuck that shit, I'd rather die early.
Part of the problem is, there's a stigma attached to having a breathalyzer. Seems weird, but I got one for those times when I wasn't sure, and everybody who I told about it looked at me like my head was on fire. Some of them, right before they stumbled out of the bar to drive home.
Maybe your social circle is different, but people are, in general, fucking stupid. We'll purposefully pick the worst ways to do things out of bravado, or inertia, or whatever other dumb reason we can pull out of our ass. This law isn't a significant burden. If you're always sure, don't open the packaging on the $2 breathalyzer and you buy two of them your entire life. But it cuts through all the other bullshit, and means that people like me, who want a way to tell, can do so without worrying what their peers think. It takes a whole lot of not giving a fuck to go against the social norms, so don't think for a second there's not a ton of people out there who would behave more responsibly if they didn't fear being ridiculed for it.
Alcohol is far from the only drug that encourages severe lapses in judgement. Hell, I wouldn't even put it at #1 for that--go pop 10-20mg of Ambien and don't immediately get in bed. Have fun calling all your exes and fishing your keys out of the toilet in the morning. Don't step in the bowl of tomato soup with raw hamburger crumbled in it next to your bed.
I've never tried it myself so I can't speak for the actual effects like I can for Ambien, but people suck dick for crack. I've wanted a lot of things really really bad, and I've never considered sucking a dick for it--tell me those people are making that decision without personality modification. I can tell you that when you do coke, you're not yourself, not by a longshot, and it's easy to make terrible decisions on that too. I've seen my share of fights started or exacerbated by it. Just about any drug seems to shut down inhibitions. Maybe it's a part of the brain that's just not as able to cope with slightly-off chemistry, I don't know, but I do know they all have an effect to some degree.
Other drugs get lumped in with alcohol because when you're on other drugs, there's a good chance you're drunk too, and it's easy to test if you're currently drunk. The other tests only really tell if you're a user of those. I've also seen the cops show up when people were on stuff other than alcohol, and they had no clue, so chalk up at least a couple coke/other-induced incidents that aren't on the records.
The fact is, every drug I know of changes your personality to some degree or another. Pot is a major outlier, in that it has a very small effect (in an experienced user) and although it may make someone's thought process "dopey", it doesn't significantly effect the higher, rational decisions like, "should I fight this fucker for not passing me the frisbee?" or "should I steal this car?" But just because pot is relatively (not totally, not by a long shot, and I love me some weed) benign, don't let that fool you into thinking alcohol is the only drug that needs to be carefully controlled.
While you're right on the first one, try telling yourself the second one while watching me curse the motherfucker that keeps breaking into my house and moving my fucking keys.
I'll get that son of a bitch if it's the last thing I do (it will be the last thing I do).
And yeah, strange as it might be, not having to write redundant stuff actually makes it easier to read/write code. It's less that you have to keep in working memory.
It gives you some of the benefits of duck typing with very few of its drawbacks, and the reduced noise makes your code clearer. I know that seems counter-intuitive to you right now, but if you try it, you'll see the benefits, and realize that the type names appearing next to the declarations is, in most cases, redundant or irrelevant when it comes to actually understanding what the code does.
It's more of a fuzzy thing, but I started using it at my job, everybody hated it for two weeks, I gave no fucks and kept using it, now everybody uses it.
Because var still works within the type system and gives you compile-time errors, and casting to object is a massive sledgehammer that delays errors until runtime (with all of runtime error checking's glory, like only failing some of the time, which you can basically read as "never on a developer's machine, sometimes on TQA's machine, and always on a customer's machine (unless support is on the phone with them)"), and a stupid idea in general (I'm looking at you, Objective-C!).
Don't forget initializer lists, variadic templates, non-static data member initializers, finally fixing that Template> (note the >>) thing, rvalues, nullptr, strongly-typed enums, constructor improvements (holy god we don't have to rewrite every fucking thing every fucking time or split off into an::init()), user-defined literals which is crazy cool combined with templates and initializer lists, and lots of stuff I'm sure I'm forgetting about.
Since starting on C#, I've kind of felt like I'm back in the dark ages in C++, even as it remains my favorite language. I've already started using a lot of these improvements, and while C++ still has it's rough edges, the improvement in "fun" while coding is massive. No more for (some_container_type<vector<map<int, string> > >::reverse_iterator aargh = instance.begin(); aargh != instance.end(); ++aargh) for me!
Even though I disagree with the idea of spec-blessed DRM on the internet, you're absolutely right. I once heard road-rage as being caused by people making up imaginary rules in their own heads and then expecting everybody else to follow those rules. I examined my own road-rage (man I really wanted to use a less extreme term there, but weaseling out of it in a post about intellectual honesty...), and yep, turns out that's exactly what I was doing. My drives are much more serene now. I still slow down when people tailgate me though. Fuck those people, it's unsafe.
Anyway, I traffic isn't the only place people make up rules that suit them and then expect everyone else to follow those rules. Unless you're told to look for it, it's apparently a really big mental leap to realize what you're doing, because I guarantee you the majority of people you talk to about it will deny doing any such thing, and honestly believe their denial.
Compiled code is just very, very hard to read source code. Luckily, we've got these things called computers that can do all sorts of information processing, gathering millions of data points a second and sorting them for humans to interpret.
If it's impossible to implement securely in an open-source program, it's impossible to implement securely, period. There is nothing magical about machine instructions. A compiled program is just harder to interpret. For one person, out of the 7 billion on this planet. And then it's out there, forever and ever.
This entire debate is based on a fundamental misunderstanding of software.
I am both a freelance coder and have some seriously time-consuming solo hobbies. Even if I wasn't, and didn't, there's about 20 bands I've been meaning to check out before even considering entire new genres I want to step into, I couldn't possibly enumerate all the books I want to read, I'd like to have the time to learn to cook, and the time to actually cook, play with my cat because I'm sure the little time I can devote to it isn't enough for him, finally get my home automation stuff set up, work out, learn calculus and physics and statistics... and even if I wasn't interested in any of those things, I'm sure that I could find some use for the time.
I guess that's an essential difference between an extrovert and an introvert--I'd be ecstatic for more time without people's demands, whereas I guess for other people, time without people around is... worthless? I don't know. I'm usually pretty good at empathizing, but this is absolutely escaping me, I can't imagine not being able to find something to do without other people around during that time. Put me on a deserted island, and I'd still feel every instant passing like a kidney stone.
"Dammit, I've put all these charts and tables into an SQL database (you wouldn't believe the amount of crazy things you can do when you can search on just about any imaginable combination of criteria) and I can't share it because I don't feel like dealing with lawsuits, even if I'd win!" -- me, now.
Ran out of things to do? What the fuck! Days could be 90 hours long, and I'd still never feel like I had enough time. How could anyone ever run out of things to do?
No, they come with pre-trusted cert authorities. And any cert authority can issue a certificate for any domain. So, if somebody "convinces" Verisign to give them a cert for facebook.com, that's it, they are now facebook.com as far as every browser is concerned.
In fact, sites like Facebook and Google change their certs so often (probably due to load-balancing or the simple challenge of synchronizing a certificate over a global set of datacenters), it's practically a full-time job keeping track of whether this "new" cert is valid or not.
Now wait a minute, if you're concerned about years prior to 1, you need to be concerned about the fact that leap days as we know it didn't come about until the Gregorian calendar. At the very least, you should change that > 0 to > 1582 or so (depending on where you're calculating dates). The Julian calendar is a simple % 4, without the % 100 and % 400 stuff.
Posts like this are why I'm glad stories like this are posted every four years or so.
inLeapYear = year % 4 == 0 && (!(year % 100 == 0) || (year % 400 == 0))
The real fun starts when you try calculating pre-Gregorian dates.
SAY IT WITH YOUR CHEST
I've had sleeping problems since I was a teenager, and I've learned many, many tricks.
The main thing is, you need to give yourself extra room for slower reactions and worse decision making. Like, double the space you would normally give yourself. The next most important thing is, every two seconds or so, you should be saying to yourself, "HEY STUPID! STOP THINKING ABOUT WHATEVER WEIRD THING YOU WERE THINKING ABOUT AND PAY ATTENTION!" You'll need to say that to yourself again in another two seconds or so, once you get to a certain level of tired there's no way to stop it, but if you can keep the energy up to keep yelling at yourself you'll be fine.
I know, it's terrible, but I do what I can to not endanger other people's lives. I think my driving record over the last 14 years is a testament to the fact that my "tricks" are effective, but I have no illusions that I'm as safe as I could possibly be, and if I ever cause an accident I'll feel terrible. But I'm not going to consign myself to a shitty life just because the world isn't fair and makes no accommodation for people who can't sleep during normal hours. The world's not fair to me, I have to feel like shit all the time, the world's not fair to you, there's dangerous people like me on the road. That's just the way it is. If it's any consolation, statistically, this is eventually going to cause enough problems for me at work that I'll be fired, and no longer able to afford to drive. Then I'll be homeless and everybody will be safe again! Yay!
Oh, no doubt about it. 10-11 PM rolls around, and no matter how exhausted I've been all day, I come alive. I get ideas, I'm motivated to clean up the house, I get ideas for whatever programming project I'm working on, I want to call my friends--but it's time to crush all that energy down and go to bed, because I have to be to work at 8 AM. When I can go to bed at 4-5 AM and wake up around noon, everything is perfect.
Employers, however, do not give a single fuck. If you have trouble getting up in the morning, you're lazy. Why don't you just go to bed earlier, you dummy? Being an employer and being a morning person seem to have a high degree of correlation, and morning people generally have a very hard time empathizing with night people. Night people are "wrong" or something. I don't know, I don't care anymore. For right now, I'd rather have money than feel good. I've been poor. It's worse. A sleeping pill every night, and instead of it being impossible, I'm just blurry and kind of tired all the time.
I quit smoking because I don't want to get cancer, and I don't want to smell bad all the time, and I don't want to be out of breath walking up the stairs. That said, I loved smoking. I still miss it every day, but the risks are greater than the rewards.
Stop taking my sleeping pills? Hah. Have you ever been so tired that you get a sore throat? Or that you argue with yourself at a stop light, "no, don't close your eyes, I know it would feel really really good but if you do that you'll miss the green and might not wake up until somebody knocks on your window"? Your legs shake, you feel sick to your stomach, your palms sweat constantly, your eyes try to close with all their might until you can hear the muscles straining in your ears.
Now try feeling like that for months on end. Stop taking my sleeping pills? Fuck that shit, I'd rather die early.
Ahahaha I love your dad.
Because there's no way to tell the difference between you and that other group of folks until they kill you in a head-on collision.
Part of the problem is, there's a stigma attached to having a breathalyzer. Seems weird, but I got one for those times when I wasn't sure, and everybody who I told about it looked at me like my head was on fire. Some of them, right before they stumbled out of the bar to drive home.
Maybe your social circle is different, but people are, in general, fucking stupid. We'll purposefully pick the worst ways to do things out of bravado, or inertia, or whatever other dumb reason we can pull out of our ass. This law isn't a significant burden. If you're always sure, don't open the packaging on the $2 breathalyzer and you buy two of them your entire life. But it cuts through all the other bullshit, and means that people like me, who want a way to tell, can do so without worrying what their peers think. It takes a whole lot of not giving a fuck to go against the social norms, so don't think for a second there's not a ton of people out there who would behave more responsibly if they didn't fear being ridiculed for it.
Alcohol is far from the only drug that encourages severe lapses in judgement. Hell, I wouldn't even put it at #1 for that--go pop 10-20mg of Ambien and don't immediately get in bed. Have fun calling all your exes and fishing your keys out of the toilet in the morning. Don't step in the bowl of tomato soup with raw hamburger crumbled in it next to your bed.
I've never tried it myself so I can't speak for the actual effects like I can for Ambien, but people suck dick for crack. I've wanted a lot of things really really bad, and I've never considered sucking a dick for it--tell me those people are making that decision without personality modification. I can tell you that when you do coke, you're not yourself, not by a longshot, and it's easy to make terrible decisions on that too. I've seen my share of fights started or exacerbated by it. Just about any drug seems to shut down inhibitions. Maybe it's a part of the brain that's just not as able to cope with slightly-off chemistry, I don't know, but I do know they all have an effect to some degree.
Other drugs get lumped in with alcohol because when you're on other drugs, there's a good chance you're drunk too, and it's easy to test if you're currently drunk. The other tests only really tell if you're a user of those. I've also seen the cops show up when people were on stuff other than alcohol, and they had no clue, so chalk up at least a couple coke/other-induced incidents that aren't on the records.
The fact is, every drug I know of changes your personality to some degree or another. Pot is a major outlier, in that it has a very small effect (in an experienced user) and although it may make someone's thought process "dopey", it doesn't significantly effect the higher, rational decisions like, "should I fight this fucker for not passing me the frisbee?" or "should I steal this car?" But just because pot is relatively (not totally, not by a long shot, and I love me some weed) benign, don't let that fool you into thinking alcohol is the only drug that needs to be carefully controlled.
While you're right on the first one, try telling yourself the second one while watching me curse the motherfucker that keeps breaking into my house and moving my fucking keys.
I'll get that son of a bitch if it's the last thing I do (it will be the last thing I do).
*facepalm* .rbegin()/.rend()
And yeah, strange as it might be, not having to write redundant stuff actually makes it easier to read/write code. It's less that you have to keep in working memory.
It gives you some of the benefits of duck typing with very few of its drawbacks, and the reduced noise makes your code clearer. I know that seems counter-intuitive to you right now, but if you try it, you'll see the benefits, and realize that the type names appearing next to the declarations is, in most cases, redundant or irrelevant when it comes to actually understanding what the code does.
It's more of a fuzzy thing, but I started using it at my job, everybody hated it for two weeks, I gave no fucks and kept using it, now everybody uses it.
The majority of it is implemented. http://gcc.gnu.org/projects/cxx0x.html
(object) ~= (void*)
I mean that in spirit, not in actual details. Yes, I know there's about a billion, trillion ways they're different.
Because var still works within the type system and gives you compile-time errors, and casting to object is a massive sledgehammer that delays errors until runtime (with all of runtime error checking's glory, like only failing some of the time, which you can basically read as "never on a developer's machine, sometimes on TQA's machine, and always on a customer's machine (unless support is on the phone with them)"), and a stupid idea in general (I'm looking at you, Objective-C!).
Don't forget initializer lists, variadic templates, non-static data member initializers, finally fixing that Template> (note the >>) thing, rvalues, nullptr, strongly-typed enums, constructor improvements (holy god we don't have to rewrite every fucking thing every fucking time or split off into an ::init()), user-defined literals which is crazy cool combined with templates and initializer lists, and lots of stuff I'm sure I'm forgetting about.
Since starting on C#, I've kind of felt like I'm back in the dark ages in C++, even as it remains my favorite language. I've already started using a lot of these improvements, and while C++ still has it's rough edges, the improvement in "fun" while coding is massive. No more for (some_container_type<vector<map<int, string> > >::reverse_iterator aargh = instance.begin(); aargh != instance.end(); ++aargh) for me!
On overcritical Slashdot, pants pour hot grits down you!
Even though I disagree with the idea of spec-blessed DRM on the internet, you're absolutely right. I once heard road-rage as being caused by people making up imaginary rules in their own heads and then expecting everybody else to follow those rules. I examined my own road-rage (man I really wanted to use a less extreme term there, but weaseling out of it in a post about intellectual honesty ...), and yep, turns out that's exactly what I was doing. My drives are much more serene now. I still slow down when people tailgate me though. Fuck those people, it's unsafe.
Anyway, I traffic isn't the only place people make up rules that suit them and then expect everyone else to follow those rules. Unless you're told to look for it, it's apparently a really big mental leap to realize what you're doing, because I guarantee you the majority of people you talk to about it will deny doing any such thing, and honestly believe their denial.
Yeah, that's what they said about the music industry.
Compiled code is just very, very hard to read source code. Luckily, we've got these things called computers that can do all sorts of information processing, gathering millions of data points a second and sorting them for humans to interpret.
If it's impossible to implement securely in an open-source program, it's impossible to implement securely, period. There is nothing magical about machine instructions. A compiled program is just harder to interpret. For one person, out of the 7 billion on this planet. And then it's out there, forever and ever.
This entire debate is based on a fundamental misunderstanding of software.
I am both a freelance coder and have some seriously time-consuming solo hobbies. Even if I wasn't, and didn't, there's about 20 bands I've been meaning to check out before even considering entire new genres I want to step into, I couldn't possibly enumerate all the books I want to read, I'd like to have the time to learn to cook, and the time to actually cook, play with my cat because I'm sure the little time I can devote to it isn't enough for him, finally get my home automation stuff set up, work out, learn calculus and physics and statistics ... and even if I wasn't interested in any of those things, I'm sure that I could find some use for the time.
I guess that's an essential difference between an extrovert and an introvert--I'd be ecstatic for more time without people's demands, whereas I guess for other people, time without people around is ... worthless? I don't know. I'm usually pretty good at empathizing, but this is absolutely escaping me, I can't imagine not being able to find something to do without other people around during that time. Put me on a deserted island, and I'd still feel every instant passing like a kidney stone.
"Dammit, I've put all these charts and tables into an SQL database (you wouldn't believe the amount of crazy things you can do when you can search on just about any imaginable combination of criteria) and I can't share it because I don't feel like dealing with lawsuits, even if I'd win!" -- me, now.
Ran out of things to do? What the fuck! Days could be 90 hours long, and I'd still never feel like I had enough time. How could anyone ever run out of things to do?