Open Side Menu Go to the Top
Register
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

05-12-2011 , 04:31 AM
Quote:
Originally Posted by Low Key
G'day, Programming LC thread!

I'm completely out of date in the realm of things programming (my last brush-up was about 10 years ago), and I'm curious what people are using to develop apps for a device like the iPad? A quick search says Objective-C, but I didn't know if anyone here had any experience in this sort of thing.

Many thanks, and many happy returns! ^_^
http://www.whitakerblackall.com/blog/first-six-months/

Good read about what a guy accomplished in 6 months trying to develop games having 0 experience in programming
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
05-12-2011 , 04:33 AM
Quote:
Originally Posted by kyleb
100% test coverage and testing for "everything" is a big waste of resources.
agreed.

the advantages of TDD are not that every possible case is tested (which is impossible anyway). i think the two main advantages, in order, are that you can refactor with confidence given a reasonable suite of tests, and that writing tests first forces you to design to interface rather than implementation.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
05-12-2011 , 05:33 AM
I always thought a decent model for testing is that you write a test for every bug you fix.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
05-12-2011 , 05:54 AM
Quote:
Originally Posted by Neil S
I always thought a decent model for testing is that you write a test for every bug you fix.
I agree with this. Also, I dont really agree that its ok to not have 100% code coverage. While I accept that 100% code coverage is near impossible, you should always aim for it (within reason).
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
05-12-2011 , 06:01 AM
Quote:
Originally Posted by Neil S
I always thought a decent model for testing is that you write a test for every bug you fix.
I think this is ok but it's good to be aware that fixes can have a domino effect on other parts of code so testing might need to be broader than that depending on the nature of the original bug.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
05-12-2011 , 06:48 AM
Quote:
Originally Posted by Gullanian
I think this is ok but it's good to be aware that fixes can have a domino effect on other parts of code so testing might need to be broader than that depending on the nature of the original bug.
The reason you should write tests for every bug IMO is because:

A bug must originate from an area of the code that did not have a test (or had a bad test), otherwise it would have been picked up when running the tests.

Therefore, once the bug is fixed, you need to write a test to fill in the hole in your testing suite. Then you must run the entire test suite. If you do not do this then your testing is essentially pointless.

If the bug you have just fixed breaks code in a different area of the application, the tests will pick it up.

---
I think that its better to just think of bugs as holes in your testing framework.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
05-12-2011 , 08:00 AM
Quote:
Originally Posted by MrWooster
I agree with this. Also, I dont really agree that its ok to not have 100% code coverage. While I accept that 100% code coverage is near impossible, you should always aim for it (within reason).
The problem with aiming for 100% coverage is you spend a lot of time testing things that are simple and obviously right, merely to meet a metric. You're wasting time not improving your code.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
05-12-2011 , 08:12 AM
Quote:
Originally Posted by Zurvan
The problem with aiming for 100% coverage is you spend a lot of time testing things that are simple and obviously right, merely to meet a metric. You're wasting time not improving your code.
I understand what you are saying, and you are right. If the time taken to right the tests exceeds the time saved, then you should not be writing tests for that area of the code. But I still think its a good philosophy to aim for 100% code coverage. Otherwise you can easily become complacent and code with the mentality of

only writing tests where they are really needed

rather than

only not writing tests where writing the test would have an actual negative impact on the project.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
05-12-2011 , 09:09 AM
Someone I know is well into a highly ambitious project which he cant test, he says it has tends of thousands, if not hundreds of thousands of test cases. He's just going to have to test it the best he can then fix bugs on release as they come to him!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
05-12-2011 , 09:54 AM
Quote:
Originally Posted by Neil S
I always thought a decent model for testing is that you write a test for every bug you fix.
I'd say this is the bare minimum lol

Quote:
The problem with aiming for 100% coverage is you spend a lot of time testing things that are simple and obviously right, merely to meet a metric. You're wasting time not improving your code.
This is mostly true but if the code has a long lifetime and is changed, refactored or modified in any way even trivial things can go wrong and it's a lot easier to find that by seeing "WTF test broken since this morning" than finding it manually especially because it is so trivial thing that you may not even look for it.

I've seen multiple posts in here along the lines of "I don't test for stuff that I never get wrong". That's all good and fine but you should never assume the code belongs to you and will only be changed by you.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
05-12-2011 , 10:02 AM
Quote:
Originally Posted by clowntable

I've seen multiple posts in here along the lines of "I don't test for stuff that I never get wrong". That's all good and fine but you should never assume the code belongs to you and will only be changed by you.

Just expanding on this, it might be the case that your code is dead simple and obvious to you, but that doesnt mean that someone else isnt going to come along and change it in such a way that it introduces a bug into the system.

If your project has many (or any) collaborators, testing becomes doubly important.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
05-12-2011 , 12:02 PM
Quote:
Originally Posted by Neil S
I always thought a decent model for testing is that you write a test for every bug you fix.
this could never qualify as TDD though, since you will never be writing a test first.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
05-13-2011 , 08:53 AM
Quote:
Originally Posted by gaming_mouse
this could never qualify as TDD though, since you will never be writing a test first.
True. I'd never say I did TDD.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
05-13-2011 , 11:50 AM
Venting time:

My company has a browser extension that integrates with Gmail. This is super easy on Chrome, since extensions there have direct access to the DOM. On Firefox, extensions are part of the "chrome", meaning DOM access is a pain in the ass (Note: It's possible it's easy and I'm just too stupid to figure it out).

After upgrading to FF4, it appears that none of the code that I painstakingly wrote last year that detects URL changes fires events any more, or FF doesn't call the same event listeners on tab changes or whatever. I have no idea. The documentation is awful.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
05-13-2011 , 10:55 PM
Yeah, ff4 has a lot of strange things happen. It is so hard to say what will happen one day to the next.

For example, I was coding a basic page, but every time I pulled up the code, it shot me straight to printscreen mode. There was no good reason for this to happen. The next day, everything worked normal.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
05-14-2011 , 04:01 AM
im pretty sure ff4 has been leaking memory on me, the thing slows to a crawl
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
05-14-2011 , 04:03 AM
firefox has memory leaks eh

WEIRD
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
05-14-2011 , 05:24 AM
I don't care what browser gets a NoScript equivalent first. Safari. Camino. I'll even take Chromium. Whatever gets it first gets me away from Firefox FOREVER.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
05-15-2011 , 02:32 PM
SeaMonkey has noScript on it, but I am not sure if that is like stabbing your eye in order to stop the pain of a stubbed toe.

It seems like firefox said: "Let's take everything that sucks about Chome and IE and combine them into one browser." It makes sense in a strange way if they are trying to gain market share.

The thing that really hurts me with ff4 is that it keeps uninstalling firebug. I have to reinstall it at least once a week. Firebug just came out with an update, so maybe it was a firebug issue and not a firefox issue.

But there does seem to be a NoScript of sort for Chrome and Opera:

http://www.ghacks.net/2010/02/02/ope...ative-blockit/

http://www.ghacks.net/2010/08/18/not...google-chrome/

Also, in Opera, it appears you can manually turn off/on all the js.

Not sure if that is close enough to NoScript to count though.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
05-15-2011 , 02:52 PM
NotScripts was one I'd looked at. Looking up why I turned it down: Inline scripts aren't blocked. Pretty big deal.

And I want to *allow* trusted scripts I want to run. Not have to allow any old thing or disallow everything.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
05-15-2011 , 04:33 PM
I like FF4 (as a browser) more than 3, but I still use Chrome.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
05-15-2011 , 06:02 PM
been looking to switch to chrome myself ever since ff4 came out. i want noscirpt myself too though

NoScript author's blog re:Chrome, which has a link to a forum thread
http://hackademix.net/2009/12/10/why...s-no-noscript/
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
05-15-2011 , 06:05 PM
My understanding, from reading the NotScripts explanations, is that Chrome does everything it can in an asynchronous way, which makes it difficult to *stop* things as opposed to simply reacting to them.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
05-15-2011 , 06:19 PM
What's so bad about FF4? (I'm still on 3.6 myself)
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
05-15-2011 , 07:06 PM
Better question, is what's so good about ff4.

It's faster than Opera.

I really hate using Chrome.

I really don't want to use IE.

I abhor Safari.

Basically, I don't feel like importing my bookmarks to another browser. ff4 has all those fun little items that I like to use, so it's better than the rest in that, but the gap is closing.

Basically, ff4 is slow, buggy, and ugly.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m