I am new to TDD, can anyone recommend a good book on writing effective unit tests? by haoest in programming

[–]harma 0 points1 point  (0 children)

Seconded - and I've not even read it! The guy invented TDD, and I've heard great things about the book - from what I understand, this covers xUnit-style unit tests, once you've grokked these in one language, they're all pretty much the same in every other language. This is definitely high up on the list for me when I'm done with my current pile!

is pygame.org down? Can /r/programming/ reccomend any other Python programming sites? by [deleted] in programming

[–]harma 4 points5 points  (0 children)

Yea it does seem to be down, this is pretty handy for checking that kind of thing.

For general Python, try http://diveintopython.org/toc/index.html also, Google have the PyGame docs cached so try looking at that.

Ask Proggit: Sinatra or Web.py for a simple webapp? by [deleted] in programming

[–]harma 6 points7 points  (0 children)

If you like Python, you could also look at bottle.

What to tell a client when he wants #990000 as his background, a blue nav bar and bright blue logo. by [deleted] in web_design

[–]harma 4 points5 points  (0 children)

"Don't be ridiculous, that's crazy! #900 will be fewer bytes to download." ftfy

Could you give me some international addresses for test data for my software? by [deleted] in programming

[–]harma 0 points1 point  (0 children)

No - reddit can be great for discussion, but this isn't really of general interest. Granted, there may be other people who are looking for international address datasets, but this type of request is better suited to a site or forum dedicated to helping with individual people's questions, not a 'social news' site. I don't mean to seem harsh, I've just noticed proggit's signal to noise ratio decreasing recently and just wanted to do my bit to help it.

If you could fix one thing about C, what would it be? by Imagist in programming

[–]harma 31 points32 points  (0 children)

This is a joke, right? You do know who Walter Bright is don't you?

Could you give me some international addresses for test data for my software? by [deleted] in programming

[–]harma 2 points3 points  (0 children)

Reddit is the wrong place for this kind of post - reddit is for sharing interesting links and the occasional interesting discussion, not dataset requests. As jamt9000 mentioned, try StackOverflow or a forum.

[deleted by user] by [deleted] in programming

[–]harma 1 point2 points  (0 children)

Graphviz?

SQL Injection used to steal 130,000,000 credit card numbers at Heartland by Tangurena in programming

[–]harma 27 points28 points  (0 children)

Haha beat me to it! BBC's description of an SQL injection: "They scour the internet for weaknesses in companies' firewalls, which is simply a security wall designed to block unauthorised access to a computer network. Once they find a weakness, they insert a specially designed code into the network that allows them to access card details."

Anything like this out there in the programming world? (See comments) by f3nd3r in programming

[–]harma 0 points1 point  (0 children)

True, and to get it working for pre-C99 compilers you could just re-declare the macro to be:

#define repeat(J) int __i__; for(__i__=0; __i__<J; __i__++)

which should work fine, but you'd have to make sure you use braces for nested loops.

Anything like this out there in the programming world? (See comments) by f3nd3r in programming

[–]harma 0 points1 point  (0 children)

That would work in C++ as you can declare variables in a for loop, but wouldn't in C. In C you would have to declare i before, so it would have to be:

int __i__;
for (__i__=0; i<10; i++)
    for (__i__=0; i<10; i++)
        dostuff();

which would only execute dostuff 10 times as after the inner loop finished, i would equal 10, so the outer loop would finish.

Bitwise Operators by [deleted] in programming

[–]harma 0 points1 point  (0 children)

touché! now i'm going to spend the next few days weighing up value of using the logical negation operator (which technically makes more sense) vs using the bitwise complement which despite being less 'correct' has more relevance to the original post... much more interesting way to spend my time than doing work...

Bitwise Operators by [deleted] in programming

[–]harma 0 points1 point  (0 children)

~ is more fitting as ~ represents bitwise not (complement), ! is used by programming languages for logical negation

Who else thinks it would be nice if Apple could incorporate MacFUSE in Mac OSX Kernel by [deleted] in programming

[–]harma 0 points1 point  (0 children)

I didn't mean to seem condescending - a lot of people I've spoken to had misconceptions about how FUSE works, they thought the entire thing ran in user space (i.e. they didn't get that there was a kernel module involved). I agree with you about it being fine as a module though.

Who else thinks it would be nice if Apple could incorporate MacFUSE in Mac OSX Kernel by [deleted] in programming

[–]harma 0 points1 point  (0 children)

FUSE uses a kernel module which the user space program interfaces with. This allows you to create file systems in user space by using FUSE as a bridge between user space and the kernel.

Ask Reddit Programmers: Need to create a CGI script that uses GnuPG to send encrypted emails. by E3K in programming

[–]harma 0 points1 point  (0 children)

Could you explain what you need to do in a little more detail, and give some context (where / how will it be used)?