585 karma · joined Jul 16, 2010 (16y ago) · 101 submissions
http://www.beyond-syntax.com/
1.
Introducing AWS PrivateLink for AWS Services(aws.amazon.com ↗)
5 points · by mjschultz · 9y ago · discuss
3.
Encyclopedia of things considered harmful(harmful.cat-v.org ↗)
1 points · by mjschultz · 11y ago · discuss
comment 11y ago · link · parent
* man page: http://manpages.ubuntu.com/manpages/trusty/man1/pollinate.1....
* Q&A style blog post: http://blog.dustinkirkland.com/2014/02/random-seeds-in-ubunt...
* A "why this is scary" blog post: https://tim.siosm.fr/blog/2014/04/25/why-not-ubuntu-14.04-lt...
comment 11y ago · link · parent
In the context of this thread, brghts states that this is dangerous because if you compile with -DNDEBUG the assert is optimized away.
So if I copy that code with the assert statement, it will be optimized away and your code no longer performs the NULL check. This is bad.
As you mention, beginners tend to copy code off the Internet and cause bugs. If you recognize this and claim to be teaching people you should not use bad practices in your example code. Period.
If you don't want to muddy the waters with your custom debug macros, then you should still play it safe when checking return values the a beginner may simply copy and think is correct.
[1]: http://c.learncodethehardway.org/book/krcritique.html#code--...
comment 11y ago · link · parent
> The problem is, as with every book with code ever in the universe, beginners will copy that code out and use it somewhere else and then the function is wrong.
Yet, if a beginner copied some of the code in this chapter they'd have the exact bug you are talking about here (using the NULL pointer returned from malloc()).
I think you should probably expand that into the safer checks (don't forget to free(line) if longest is NULL too!).
comment 12y ago · link · parent
comment 12y ago · link · parent
$ python -m timeit --setup "from collections import namedtuple; Point = namedtuple('Point', ['x', 'y']); p = Point(x=0, y=0)" "p.x + p.y"
1000000 loops, best of 3: 0.284 usec per loop
vs. $ python -m timeit --setup "p = {'x': 0, 'y': 0}" "p['x'] + p['y']"
10000000 loops, best of 3: 0.0737 usec per loop
Maybe the use isn't right because I agree with your belief that namedtuple is suppose to be more performant.comment 12y ago · link · parent
But the article does cover more than just the incident, I found the whole thing fairly interesting.
Beyond the passing knowledge I have from growing up in Chicago-land around the time and the Wikipedia article on the subject, I thought it contextualized the FCC policies around the time of the incident and how the hack worked (from a high level). It also pointed out other signal intrusions from the same period and the FCC/FBI's methods to track down the perpetrators.
comment 12y ago · link · parent
[1]: http://en.wikipedia.org/wiki/Max_Headroom_broadcast_signal_i...
16.
The Mystery of the Creepiest Television Hack(motherboard.vice.com ↗)
201 points · by mjschultz · 12y ago · 11 comments
comment 13y ago · link · parent
comment 13y ago · link · parent
The same thing happened to be when I ordered a MacBook back in 2007, where a few days later they announced better specs and I got a notification saying they updated my order to reflect the changes.
It's one of the reasons my next laptop will probably still be Apple.
comment 13y ago · link · parent
comment 13y ago · link · parent
Evidently, only 0.0085% of users toggle on the "Use a master password"
comment 13y ago · link · parent
There is a filter tab in the Disqus admin area, one of those tabs is "filter," here is the text around below the restricted words input box:
"Separate words with commas. You may use .* (dot asterisk) as wildcard, but be careful not to be too aggressive. For example, s.*ck will match suck, but also sock and stack. Words must be at least 3 characters in length.
Here is a sample list of restricted words[1]."
[1] http://mediacdn.disqus.com/1362527340/sample-badwords.txt
comment 13y ago · link · parent
(I wouldn't mind my bank using this, it's better than what they have in place...)
comment 13y ago · link · parent
Is it harsh? Would it be harsh to judge an authentication scheme that stores all passwords in plaintext? Server logs don't typically contain data that should be considered secret. IF this authentication scheme led to secret information being stored in a file that wasn't expected to be secure, that would be a major problem, wouldn't it?
This type of authentication hasn't stood up to a large amount of scrutiny, so it is important to think through some attack vectors that might be opened up. This was one I thought up, but it isn't an issue since the tokens are one-shot.
For the record, I like this authentication scheme but that doesn't mean it shouldn't be challenged.
comment 13y ago · link · parent
Hmmm, it looks like you might be right. I tried it earlier with one in a private window and it worked twice, but when I just tried again it was invalid/expired (though the email is 50 minutes old).
And I certainly agree that if the server is compromised you've got more problems, but in the IEEE example the server wasn't hacked they just made a mistake by making the logs available.
Edit: yup, I must have made a mistake (not closing private window or using non-private window) in my test.
comment 13y ago · link · parent
Usually username and password are sent via POST not GET so the logs don't have that data (unless you're IEEE and user GET and have your logs available through FTP).