Two Plus Two Publishing LLC
Two Plus Two Publishing LLC
 

Go Back   Two Plus Two Poker Forums > >

Notices

Programming Discussions about computer programming

Reply
 
Thread Tools Display Modes
Old 05-12-2011, 04:31 AM   #326
freedom18
adept
 
freedom18's Avatar
 
Join Date: Apr 2006
Location: Tokyo
Posts: 1,141
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by Low Key View Post
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
freedom18 is offline   Reply With Quote
Old 05-12-2011, 04:33 AM   #327
gaming_mouse
Carpal \'Tunnel
 
gaming_mouse's Avatar
 
Join Date: Oct 2004
Location: taking notes on u (see profile)
Posts: 13,782
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by kyleb View Post
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.
gaming_mouse is offline   Reply With Quote
Old 05-12-2011, 05:33 AM   #328
Neil S
King of the sidebar
 
Neil S's Avatar
 
Join Date: Sep 2004
Location: Northern Virginia
Posts: 18,898
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I always thought a decent model for testing is that you write a test for every bug you fix.
Neil S is offline   Reply With Quote
Old 05-12-2011, 05:54 AM   #329
MrWooster
veteran
 
MrWooster's Avatar
 
Join Date: Mar 2007
Location: Shoving AK
Posts: 2,984
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by Neil S View Post
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).
MrWooster is offline   Reply With Quote
Old 05-12-2011, 06:01 AM   #330
Gullanian
Carpal \'Tunnel
 
Gullanian's Avatar
 
Join Date: Dec 2006
Location: London
Posts: 14,008
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by Neil S View Post
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.
Gullanian is offline   Reply With Quote
Old 05-12-2011, 06:48 AM   #331
MrWooster
veteran
 
MrWooster's Avatar
 
Join Date: Mar 2007
Location: Shoving AK
Posts: 2,984
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by Gullanian View Post
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.
MrWooster is offline   Reply With Quote
Old 05-12-2011, 08:00 AM   #332
Zurvan
Retired
 
Zurvan's Avatar
 
Join Date: Apr 2005
Location: On the front porch, yelling at kids
Posts: 32,281
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by MrWooster View Post
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.
Zurvan is offline   Reply With Quote
Old 05-12-2011, 08:12 AM   #333
MrWooster
veteran
 
MrWooster's Avatar
 
Join Date: Mar 2007
Location: Shoving AK
Posts: 2,984
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by Zurvan View Post
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.
MrWooster is offline   Reply With Quote
Old 05-12-2011, 09:09 AM   #334
Gullanian
Carpal \'Tunnel
 
Gullanian's Avatar
 
Join Date: Dec 2006
Location: London
Posts: 14,008
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

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!
Gullanian is offline   Reply With Quote
Old 05-12-2011, 09:54 AM   #335
clowntable
Carpal \'Tunnel
 
clowntable's Avatar
 
Join Date: Jun 2006
Location: 39, 46, 56, 59, 191
Posts: 45,562
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by Neil S View Post
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.
clowntable is offline   Reply With Quote
Old 05-12-2011, 10:02 AM   #336
MrWooster
veteran
 
MrWooster's Avatar
 
Join Date: Mar 2007
Location: Shoving AK
Posts: 2,984
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by clowntable View Post

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.
MrWooster is offline   Reply With Quote
Old 05-12-2011, 12:02 PM   #337
gaming_mouse
Carpal \'Tunnel
 
gaming_mouse's Avatar
 
Join Date: Oct 2004
Location: taking notes on u (see profile)
Posts: 13,782
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by Neil S View Post
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.
gaming_mouse is offline   Reply With Quote
Old 05-13-2011, 08:53 AM   #338
Neil S
King of the sidebar
 
Neil S's Avatar
 
Join Date: Sep 2004
Location: Northern Virginia
Posts: 18,898
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

Quote:
Originally Posted by gaming_mouse View Post
this could never qualify as TDD though, since you will never be writing a test first.
True. I'd never say I did TDD.
Neil S is offline   Reply With Quote
Old 05-13-2011, 11:50 AM   #339
Zurvan
Retired
 
Zurvan's Avatar
 
Join Date: Apr 2005
Location: On the front porch, yelling at kids
Posts: 32,281
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

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.
Zurvan is offline   Reply With Quote
Old 05-13-2011, 10:55 PM   #340
daveT
S.A.G.E. Master
 
daveT's Avatar
 
Join Date: Jun 2005
Location: La La Land
Posts: 23,158
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

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.
daveT is offline   Reply With Quote
Old 05-14-2011, 04:01 AM   #341
greg nice
Carpal \'Tunnel
 
greg nice's Avatar
 
Join Date: Aug 2004
Posts: 9,462
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

im pretty sure ff4 has been leaking memory on me, the thing slows to a crawl
greg nice is offline   Reply With Quote
Old 05-14-2011, 04:03 AM   #342
kyleb
Carpal \'Tunnel
 
kyleb's Avatar
 
Join Date: Sep 2004
Location: Seattle
Posts: 39,036
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

firefox has memory leaks eh

WEIRD
kyleb is offline   Reply With Quote
Old 05-14-2011, 05:24 AM   #343
Neil S
King of the sidebar
 
Neil S's Avatar
 
Join Date: Sep 2004
Location: Northern Virginia
Posts: 18,898
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

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.
Neil S is offline   Reply With Quote
Old 05-15-2011, 02:32 PM   #344
daveT
S.A.G.E. Master
 
daveT's Avatar
 
Join Date: Jun 2005
Location: La La Land
Posts: 23,158
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

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.
daveT is offline   Reply With Quote
Old 05-15-2011, 02:52 PM   #345
Neil S
King of the sidebar
 
Neil S's Avatar
 
Join Date: Sep 2004
Location: Northern Virginia
Posts: 18,898
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

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.
Neil S is offline   Reply With Quote
Old 05-15-2011, 04:33 PM   #346
Zurvan
Retired
 
Zurvan's Avatar
 
Join Date: Apr 2005
Location: On the front porch, yelling at kids
Posts: 32,281
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

I like FF4 (as a browser) more than 3, but I still use Chrome.
Zurvan is offline   Reply With Quote
Old 05-15-2011, 06:02 PM   #347
greg nice
Carpal \'Tunnel
 
greg nice's Avatar
 
Join Date: Aug 2004
Posts: 9,462
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

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/
greg nice is offline   Reply With Quote
Old 05-15-2011, 06:05 PM   #348
Neil S
King of the sidebar
 
Neil S's Avatar
 
Join Date: Sep 2004
Location: Northern Virginia
Posts: 18,898
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

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.
Neil S is offline   Reply With Quote
Old 05-15-2011, 06:19 PM   #349
_dave_
_Pooh_Bah_
 
Join Date: Feb 2005
Location: UK (or what remains of it)
Posts: 12,944
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

What's so bad about FF4? (I'm still on 3.6 myself)
_dave_ is offline   Reply With Quote
Old 05-15-2011, 07:06 PM   #350
daveT
S.A.G.E. Master
 
daveT's Avatar
 
Join Date: Jun 2005
Location: La La Land
Posts: 23,158
Re: ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

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.
daveT is offline   Reply With Quote

Reply
      

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Forum Jump


All times are GMT -4. The time now is 04:19 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright © 2008-2017, Two Plus Two Interactive
 
 
Poker Players - Streaming Live Online