HN user

ktRolster

4,173 karma

Kate Thompson: best selling Amazon author

http://www.amazon.com/Zero-Bugs-Program-Faster-Thompson/dp/0996193308

Some Essays I've Written http://zerobugsandprogramfaster.net/essays/1.html

Posts23
Comments1,693
View on HN
mobile.twitter.com 7y ago

“Accelerated Responsible Disclosure” – Daniel J. Bernstein

ktRolster
1pts0
medium.com 8y ago

Hiring Behaviors That Would Work for Developers, Too

ktRolster
3pts0
www.zerobugsandprogramfaster.net 8y ago

The REal Brutalist StyLe

ktRolster
2pts0
www.jamesshore.com 9y ago

No Bugs agile technique (2010)

ktRolster
1pts0
www.wsj.com 9y ago

What to Watch for on Election Night

ktRolster
1pts0
www.wsj.com 9y ago

Rent increase, emigration, and price controls

ktRolster
1pts0
www.wsj.com 9y ago

Debates through History: how to do it right

ktRolster
1pts0
www.usenix.org 9y ago

Most critical failures the result of flawed error handling code [pdf]

ktRolster
2pts0
www.zerobugsandprogramfaster.net 9y ago

APL Tutorial

ktRolster
123pts55
arstechnica.com 10y ago

Judge Alsup Denies Oracle's JMOL [pdf]

ktRolster
11pts1
nvd.nist.gov 10y ago

Types of vulnerabilities over time

ktRolster
1pts0
deliberate-software.com 10y ago

Self Organizing Software Teams

ktRolster
1pts0
www.zerobugsandprogramfaster.net 10y ago

A Silk Purse from a Sow's Ear: Header Files Revealed

ktRolster
2pts0
blogs.msdn.microsoft.com 10y ago

Microsoft Team Zero Bug Bounce (2004)

ktRolster
1pts0
www.nervanasys.com 10y ago

Deep Reinforcement Learning Explained

ktRolster
121pts11
gamasutra.com 10y ago

John Carmack on Functional Programming

ktRolster
7pts2
www.zerobugsandprogramfaster.net 10y ago

How Great Programmers Avoid Bugs

ktRolster
2pts0
www.zerobugsandprogramfaster.net 10y ago

A Quick Look at PostgreSQL Source Code

ktRolster
96pts8
www.zerobugsandprogramfaster.net 10y ago

Interview with Marc Andressen

ktRolster
2pts0
www.zerobugsandprogramfaster.net 10y ago

The “No Obligations” Estimation Method

ktRolster
3pts0
www.computerworld.com 10y ago

Windows Only a Small Part of Microsoft's Revenue Now

ktRolster
2pts0
www.jamesshore.com 10y ago

James Shore describes what it's like to be on a “Zero Bug” Team (2010)

ktRolster
2pts0
www.brainpickings.org 10y ago

Einsten's Advice for Learning

ktRolster
2pts0

You can also add the --back option as an alias, so you don't need to type it in every time on systems where that is important. You could also use an environment variable to modify the behavior.

The GNU team did this when they added or changed behavior to the original tools. A lot of them have flags like -posix and such which give them a strict set of behaviors.

more-discoverable undo

I think he wanted more discoverable everything, the undo was just used as a particularly bad example on the iPhone.

He wants the world to be more discoverable, to modify our very culture so that learning is easy (an example he gave was with math, so it's not just a small, 'smart' percentage of the population who actually gets it, but everyone absorbs it from a young age).

His ideal vision is always described in very abstract terms. If he took the care to write it down precisely, what it should look like, I'm sure there would be hundreds eager to build it for him.

Look at Squeak. http://squeak.org/ The idea that you should be able to dig in and modify things is very powerful.

Another way to look at it is in terms of discoverability: you are at one level of understanding (using the phone, clicking on things), and it should lead you to a deeper level of understanding (perhaps moving things around, modifying them). At each level, there are hooks inviting you deeper, drawing you in. Ideally you get down low enough to start programming, to actually understanding how assembly and the CPU works, so there is no longer any area of magic.

Back in the 90s people used to have their pager connected to CERT to make sure they knew if anything happened. Of course no one uses pagers anymore, but there are places you should definitely pay attention to if you're looking at the software.

Let's be honest: the corporations that hire us will drop us as soon as it becomes convenient to the bottom line, and as likely as not without a severance package.

You owe it to yourself to get the best possible compensation package, because no one else will do it for you.

In retrospect (as the housing prices have mostly recovered: http://www.doctorhousingbubble.com/wp-content/uploads/2013/0... ), the hosing crisis can be seen as an irrational bubble, with the major problem being that the banks were under-capitalized for the risk they were taking on. After several years of injecting capital into the banks for several years, they are fine. Arguably the banks didn't worry about the risk because they trusted the government would help them out.

It's not dead simple, it just seems that way because the router already comes configured for it. If you had a router already configured with a default firewall, that would seem dead simple, too.

Hi! I can't imagine how you understood what I wrote. I specifically said to not use those C library string functions.

I fully admitted that string manipulation is absurdly bad and error-prone, then built on that by showing a way to make it better. Use ktStrcat() instead of strCat(), then you don't have to worry about truncation. Use ktSprintf() instead of snprintf(), then you don't have to worry about truncation. I wish you had understood.

Oh yeah, you're right.

Another thing I've done that will work if you have a lot of strcat(), is make a string struct:

    ktString {
       int len;
       int memlen;
       char *str;
    }
It keeps track of the string's actual length, and the size of the underlying buffer. Then you can 'override' the various string functions:
    bool ktStrcat(ktString s1, ktString s2);
    bool ktSprintf(ktString s1, ...);
These functions will take care of buffer-size checking, and reallocation if necessary. For cases where you need to interface with pre-existing libraries, you can return a cstring(). Make it a function/macro to enable you to change the struct definition in the future:
     #define ktCstr(x) (x)->str

then you can pass it into write() or whatever you need:
    write(sock, ktCstr(s), s->len);

OpenBSD takes a fairly minimalist approach, which is vaguely described here: http://www.freebsdforums.org/forums/showthread.php?threadid=... They basically replace the unsafe functions with things that are easier to use. Their idea is that it isn't the format of the C-string that causes security issues (null-terminated string), it's the poorly defined functions (with weird corner cases that are hard to get right). It's worked well for their use cases.

DJB did something similar in qmail, I don't recall the details but you can look at the source code as easily as I can, and it eliminated security problems.

When I'm working in Java, I find that most of my string parsing uses the split() function. This is a pain in C, because even if you had a split() function you'd need to deal with memory allocations. Most of these are solved with a memory pool. In my own library, I also added runtime, grammar-based parsing functionality. So to parse a CSV line you might do something like this:

    char *g = " S   -> WORD | WORD , S;"
              "WORD -> [^,]";
    results = parsegram(g, inputString);
Grammar parsing + memory pools makes string parsing in C easier than in Java. The biggest difficulty with this kind of library is to do it right, you need to be something of a unicode expert, and that's tough.

It was quite state-of-the-art at the time.

Most of the criticisms you hear about C today (type safety, memory safety, no garbage collection) were criticisms that C got when it was first invented.

In fact there are fewer criticisms of C than there used to be: a lot of the early criticism centered around syntax, but the C syntax kind of won, so you don't hear that anymore.

It's not just the mental ease, it's also the physical typing ease (and in some cases, the possibility).

For example, he points out that to connect C to existing parts of the system (which is the OS and OS level tools), all you have to do is call the functions. If you want to call a C library from a Java program, it's a lot more work. Furthermore, C has the capability of understanding Java structures (although it's awkward), but Java has no way of understanding C structures from within the language. There is no way to model a driver I/O port in Java, but in C there is.

The paper is worth thinking about. If you are creating a language, take interoperability between already existing languages into consideration. JNI is ok, but think how much better it could be if it did auto-marshalling of objects!

I would roll my own. I'm totally confident I can do it better than the OpenSSL team. Of course, I would see what I could do with GnuTLS, first.

In practice, OpenSSL should not be considered secure. At best it can be considered as a way to stop script kiddies.

Audits cost money. Tons of money. And they don't guarantee anything - bugs in OpenSSL have not been discovered for years despite thousands of people using the code, poring over it and billions depending on it.

Any reasonable audit of OpenSSL would have said, "Don't use it."

claiming that there is virtually no intellectual property protection for fonts in Germany, and how it would have been impossibly expensive to register for type protection… but somehow a lot of hobbyists and small fish managed to do it.

What kind of protection is there? I've read that claim before.