Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×

Comment Re:Levels (Score 2) 214

Have you been reading the "Clean Code" book? lol (or rather, have your coworkers been reading it and berating you because of it).

I like to divide code into two categories, code that 'does stuff' and 'glue code.' The goal is to minimize the glue code as much as possible, while still maintaining flexibility.

If you follow the rule of the Linux kernel development, "Each function should do one thing and do it well," then your code will be a lot closer to flexible almost immediately, even without building a framework around it.

Comment Levels (Score 4, Interesting) 214

First level is to be able to get the computer to do what you want. If you can do that, you have a career as a programmer.

Most people don't make it that far, so it's something. The next level is whether you can write readable code. A lot of programmers never learn to write readable code, but a good number of them do.

The next step is writing flexible software. Some programmers stuff everything into design patterns and think they made it flexible, but they're wrong. Other programmers try to make everything generic thinking it's flexible, but they're wrong (also, their code is probably hard to read). But writing code where small changes take little effort, and bigger changes take more effort......that is a rare skill indeed.

There are other ways of looking at it, but that's one way.

Comment The Toffee Approach (Score 2) 81

Why not let abuse take place online in virtual environments?

Because it sucks and leads to much more offline abusive behavior by otherwise good people after they have been repeatedly harassed.

Instead, this psychology of banning and throttling likely leads to more offline abusive real-life suffering.

The opposite is true. Because the natural abuser is inclined to fight through any system thrown at them, throttling and other attempts drain their energy more than simply letting them post would, leading to more relaxed (or at least less) behavior offline.

Not to mention, we all know that trolls online are probably losers who would never in a billion years have the nerve to say or do anything offensive offline...

Comment Re:Open source code is open for everyone (Score 5, Insightful) 211

Managed languages (like Java and C#) give you a "secure-by-default" memory and execution model that's a lot harder to accidentally mess up.

If you think managed languages will prevent you from leaving security vulnerabilities, you are either not writing significant server software, or your software has vulnerabilities.

The hardest security problems to solve aren't the overflows, it's the features given to users. Think of VB macro viruses, that spread wildly in a managed language. Wordpress is another example of software written in a managed language with tons of exploits.

There are so many examples of exploits in managed systems that it's a display of ignorance to claim otherwise. .Net is especially bad in this regard, not because C# is inherently more insecure, but because the community applauds and encourages ignorance, and even makes people feel bad for knowing things. See this presentation for an example. Notice (for example) his micro-agressions against people who understand garbage collection. The implication is you don't need to think about it, C# will take care of memory.......which if you take seriously, means you'll be leaking crap all over the place and someone like me will have to come clean it up for you.

Comment Re: Not their fault (Score 1) 397

It was in the low 50's (about 11C) outside on game day.

The balls were found at 10.5 psi, and the minimum Regulation pressure was 12.5 psi.

So, 84% of regulation pressure means (since pressure is proportional to temp, all other things being equal) that the balls would've had to be inflated in a 338K environment. Which is 150F.

I suppose the Pats could've inflated the balls in a sauna, but it's rather unlikely that the Refs would've failed to notice that the balls were hot enough to burn them when they checked the temps before the game.

In other words, no, the Pats cheated. Did their cheating matter in the end? Nope, the Colts sucked so much that day that the Pats could've played fair and won.

Alas, playing fair isn't something they're all that familiar with.

Comment Re:From TFA (Score 3, Informative) 211

Also, please note, it's not enough to call gethostby functions for this bug to be a vulnerability. For it to be a vulnerability, you need several things:

1) A (more or less) specific sequence of function calls. Merely calling gethostby* itself won't do it.
2) The eventual call to gethostby on a string supplied by a hostile user.
3) Have another buffer hostile users to fill (not overflow).
4) A weakness of your program structure that allows four bytes to reference the other buffer.
5) Include a service that runs things on the command line.

Exim allowed all of those. You might be able to get away without number 5 present, but the program would need some other weakness to make it exploitable.

Comment Re:From TFA (Score 1) 211

Don't they now? Web, ssh, FTP, IRC, plenty of servers call gethostby functions as part of standard operation.

You read incorrectly, I'll quote it again: "Most servers don't do a dns lookup of a remotely supplied address.

One of the examples they used was ping. Of course ping does a DNS lookup of the address supplied by the user, but unless you have inetd in a really weird configuration it won't be started remotely. If ping crashes, or even executes arbitrary commands because of a specially crafted command-line, it's not a security vulnerability.

Youtube

YouTube Ditches Flash For HTML5 Video By Default 225

An anonymous reader writes: YouTube today announced it has finally stopped using Adobe Flash by default. The site now uses its HTML5 video player by default in Google's Chrome, Microsoft's IE11, Apple's Safari 8, and in beta versions of Mozilla's Firefox browser. At the same time, YouTube is now also defaulting to its HTML5 player on the web. In fact, the company is deprecating the "old style" Flash object embeds and its Flash API, pointing users to the iFrame API instead, since the latter can adapt depending on the device and browser you're using.

Comment Re:From TFA (Score 2) 211

Here's a better explanation of the flaw. It's actually a fairly limited vulnerability:

At most sizeof(char *) bytes can be overwritten (ie, 4 bytes on 32-bit machines, and 8 bytes on 64-bit machines). Bytes can be overwritten only with digits ('0'...'9'), dots ('.'), and a terminating null character ('\0').

With only being able to overwrite 4 bytes max, you would think not much could be done, and indeed, mostly they were only able to make things crash. Most servers don't do dns lookup of a remotely supplied address, but mail-servers can, to verify the sender is correct.

Astonishingly, even without being able to write assembly shell-code, they were able to get the Exim mail server to execute arbitrary remote commands. That is the only vulnerability found so far.

Comment Re:Open source code is open for everyone (Score 2) 211

People who think that Java (or C#, or Python) language will fix their security problems write more security bugs than C programmers who work around the weaknesses of their language.

Similarly, people who think Java (or C#, or Javascript) will fix the problem of memory leaks, are probably leaking memory all over the place. Recently I've been fixing a bunch of memory leaks in Javascript.....if you attach something to the DOM, make sure you have a plan for getting it off, otherwise you're probably leaking.

Slashdot Top Deals

Love may laugh at locksmiths, but he has a profound respect for money bags. -- Sidney Paternoster, "The Folly of the Wise"

Working...