Search Results

Search found 204 results on 9 pages for 'theo moore'.

Page 1/9 | 1 2 3 4 5 6 7 8 9  | Next Page >

  • moore's law and quadratic algorithm

    - by damon
    I was going thru a video (from coursera - by sedgewick) in which he argues that you cannot sustain Moore's law using a quadratic algorithm.He elaborates like this In year 197* you build a computer of power X ,and need to count N objects.This takes M days According to Moore's law,you have a computer of power 2X after 1.5 years.But now you have 2N objects to count. If you use a quadratic algorithm, In year 197*+1.5 ,it takes (4M)/2 = 2M days 4M because the algorithm is quadratic,and division by 2 because of doubling computer power. I find this hard to understand.I tried to work thru this as below To count N objects using comp=X , it takes M days. -> N/X = M After 1.5 yrs ,you need to count 2N objects using comp=2X -> 2N/(2X) -> N/X -> M days where do I go wrong? can someone please help me understand?

    Read the article

  • sample java code for approximate string matching or boyer-moore extended for approximate string matc

    - by Dolphin
    Hi I need to find 1.mismatch(incorrectly played notes), 2.insertion(additional played), & 3.deletion (missed notes), in a music piece (e.g. note pitches [string values] stored in a table) against a reference music piece. This is either possible through exact string matching algorithms or dynamic programming/ approximate string matching algos. However I realised that approximate string matching is more appropriate for my problem due to identifying mismatch, insertion, deletion of notes. Or an extended version of Boyer-moore to support approx. string matching. Is there any link for sample java code I can try out approximate string matching? I find complex explanations and equations - but I hope I could do well with some sample code and simple explanations. Or can I find any sample java code on boyer-moore extended for approx. string matching? I understand the boyer-moore concept, but having troubles with adjusting it to support approx. string matching (i.e. to support mismatch, insertion, deletion). Also what is the most efficient approx. string matching algorithm (like boyer-moore in exact string matching algo)? Greatly appreciate any insight/ suggestions. Many thanks in advance

    Read the article

  • La loi de Moore a-t-elle encore un avenir ? Oui, répond un ingénieur, si les développeurs se mettent

    La loi de Moore est elle encore pertinente ? Plus pour les CPU, répond un responsable de Nvidia qui appelle au développement de la programmation parallèle Bill Dally est un des ingénieurs les plus importants de Nvidia. Dans une tribune publiée dans le magasine Forbes, l'ingénieur en chef doute fortement que la loi de Moore puisse encore s'appliquer aux processeurs (CPU) : « Les performances des CPUs ne peuvent plus doubler tous les 18 mois », constate-t-il, « et cela va poser un grave problème à de nombreuses industries qui reposent sur cette croissance des performances ». Optimiste, Bill Dally en tire cependant une raison d'espérer « La bonne nouvelle, c'e...

    Read the article

  • Don Knuth and MMIXAL vs. Chuck Moore and Forth -- Algorithms and Ideal Machines -- was there cross-pollination / influence in their ideas / work?

    - by AKE
    Question: To what extent is it known (or believed) that Chuck Moore and Don Knuth had influence on each other's thoughts on ideal machines, or their work on algorithms? I'm interested in citations, interviews, articles, links, or any other sort of evidence. It could also be evidence of the form of A and B here suggest that Moore might have borrowed or influenced C and D from Knuth here, or vice versa. (Opinions are of course welcome, but references / links would be better!) Context: Until fairly recently, I have been primarily familiar with Knuth's work on algorithms and computing models, mostly through TAOCP but also through his interviews and other writings. However, the more I have been using Forth, the more I am struck by both the power of a stack-based machine model, and the way in which the spareness of the model makes fundamental algorithmic improvements more readily apparent. A lot of what Knuth has done in fundamental analysis of algorithms has, it seems to me, a very similar flavour, and I can easily imagine that in a parallel universe, Knuth might perhaps have chosen Forth as his computing model. That's the software / algorithms / programming side of things. When it comes to "ideal computing machines", Knuth in the 70s came up with the MIX computer model, and then, collaborating with designers of state-of-the-art RISC chips through the 90s, updated this with the modern MMIX model and its attendant assembly language MMIXAL. Meanwhile, Moore, having been using and refining Forth as a language, but using it on top of whatever processor happened to be in the computer he was programming, began to imagine a world in which the efficiency and value of stack-based programming were reflected in hardware. So he went on in the 80s to develop his own stack-based hardware chips, defining the term MISC (Minimal Instruction Set Computers) along the way, and ending up eventually with the first Forth chip, the MuP21. Both are brilliant men with keen insight into the art of programming and algorithms, and both work at the intersection between algorithms, programs, and bare metal hardware (i.e. hardware without the clutter of operating systems). Which leads me to the headlined question... Question:To what extent is it known (or believed) that Chuck Moore and Don Knuth had influence on each other's thoughts on ideal machines, or their work on algorithms?

    Read the article

  • Low hanging fruit where "a sufficiently smart compiler" is needed to get us back to Moore's Law?

    - by jamie
    Paul Graham argues that: It would be great if a startup could give us something of the old Moore's Law back, by writing software that could make a large number of CPUs look to the developer like one very fast CPU. ... The most ambitious is to try to do it automatically: to write a compiler that will parallelize our code for us. There's a name for this compiler, the sufficiently smart compiler, and it is a byword for impossibility. But is it really impossible? Can someone provide a concrete example where a paralellizing compiler would solve a pain point? Web-apps don't appear to be a problem: just run a bunch of Node processes. Real-time raytracing isn't a problem: the programmers are writing multi-threaded, SIMD assembly language quite happily (indeed, some might complain if we make it easier!). The holy grail is to be able to accelerate any program, be it MySQL, Garage Band, or Quicken. I'm looking for a middle ground: is there a real-world problem that you have experienced where a "smart-enough" compiler would have provided a real benefit, i.e that someone would pay for?

    Read the article

  • What is the effect of this order_by clause?

    - by bread
    I don't understand what this order_by clause is doing and whether I need it or not: select c.customerid, c.firstname, c.lastname, i.order_date, i.item, i.price from items_ordered i, customers c where i.customerid = c.customerid group by c.customerid, i.item, i.order_date order by i.order_date desc; This produces this data: 10330 Shawn Dalton 30-Jun-1999 Pogo stick 28.00 10101 John Gray 30-Jun-1999 Raft 58.00 10410 Mary Ann Howell 30-Jan-2000 Unicycle 192.50 10101 John Gray 30-Dec-1999 Hoola Hoop 14.75 10449 Isabela Moore 29-Feb-2000 Flashlight 4.50 10410 Mary Ann Howell 28-Oct-1999 Sleeping Bag 89.22 10339 Anthony Sanchez 27-Jul-1999 Umbrella 4.50 10449 Isabela Moore 22-Dec-1999 Canoe 280.00 10298 Leroy Brown 19-Sep-1999 Lantern 29.00 10449 Isabela Moore 19-Mar-2000 Canoe paddle 40.00 10413 Donald Davids 19-Jan-2000 Lawnchair 32.00 10330 Shawn Dalton 19-Apr-2000 Shovel 16.75 10439 Conrad Giles 18-Sep-1999 Tent 88.00 10298 Leroy Brown 18-Mar-2000 Pocket Knife 22.38 10299 Elroy Keller 18-Jan-2000 Inflatable Mattress 38.00 10438 Kevin Smith 18-Jan-2000 Tent 79.99 10101 John Gray 18-Aug-1999 Rain Coat 18.30 10449 Isabela Moore 15-Dec-1999 Bicycle 380.50 10439 Conrad Giles 14-Aug-1999 Ski Poles 25.50 10449 Isabela Moore 13-Aug-1999 Unicycle 180.79 10101 John Gray 08-Mar-2000 Sleeping Bag 88.70 10299 Elroy Keller 06-Jul-1999 Parachute 1250.00 10438 Kevin Smith 02-Nov-1999 Pillow 8.50 10101 John Gray 02-Jan-2000 Lantern 16.00 10315 Lisa Jones 02-Feb-2000 Compass 8.00 10449 Isabela Moore 01-Sep-1999 Snow Shoes 45.00 10438 Kevin Smith 01-Nov-1999 Umbrella 6.75 10298 Leroy Brown 01-Jul-1999 Skateboard 33.00 10101 John Gray 01-Jul-1999 Life Vest 125.00 10330 Shawn Dalton 01-Jan-2000 Flashlight 28.00 10298 Leroy Brown 01-Dec-1999 Helmet 22.00 10298 Leroy Brown 01-Apr-2000 Ear Muffs 12.50 While if I remove the order_by clause completely, as in this query: select c.customerid, c.firstname, c.lastname, i.order_date, i.item, i.price from items_ordered i, customers c where i.customerid = c.customerid group by c.customerid, i.item, i.order_date; I get these results: 10101 John Gray 30-Dec-1999 Hoola Hoop 14.75 10101 John Gray 02-Jan-2000 Lantern 16.00 10101 John Gray 01-Jul-1999 Life Vest 125.00 10101 John Gray 30-Jun-1999 Raft 58.00 10101 John Gray 18-Aug-1999 Rain Coat 18.30 10101 John Gray 08-Mar-2000 Sleeping Bag 88.70 10298 Leroy Brown 01-Apr-2000 Ear Muffs 12.50 10298 Leroy Brown 01-Dec-1999 Helmet 22.00 10298 Leroy Brown 19-Sep-1999 Lantern 29.00 10298 Leroy Brown 18-Mar-2000 Pocket Knife 22.38 10298 Leroy Brown 01-Jul-1999 Skateboard 33.00 10299 Elroy Keller 18-Jan-2000 Inflatable Mattress 38.00 10299 Elroy Keller 06-Jul-1999 Parachute 1250.00 10315 Lisa Jones 02-Feb-2000 Compass 8.00 10330 Shawn Dalton 01-Jan-2000 Flashlight 28.00 10330 Shawn Dalton 30-Jun-1999 Pogo stick 28.00 10330 Shawn Dalton 19-Apr-2000 Shovel 16.75 10339 Anthony Sanchez 27-Jul-1999 Umbrella 4.50 10410 Mary Ann Howell 28-Oct-1999 Sleeping Bag 89.22 10410 Mary Ann Howell 30-Jan-2000 Unicycle 192.50 10413 Donald Davids 19-Jan-2000 Lawnchair 32.00 10438 Kevin Smith 02-Nov-1999 Pillow 8.50 10438 Kevin Smith 18-Jan-2000 Tent 79.99 10438 Kevin Smith 01-Nov-1999 Umbrella 6.75 10439 Conrad Giles 14-Aug-1999 Ski Poles 25.50 10439 Conrad Giles 18-Sep-1999 Tent 88.00 10449 Isabela Moore 15-Dec-1999 Bicycle 380.50 10449 Isabela Moore 22-Dec-1999 Canoe 280.00 10449 Isabela Moore 19-Mar-2000 Canoe paddle 40.00 10449 Isabela Moore 29-Feb-2000 Flashlight 4.50 10449 Isabela Moore 01-Sep-1999 Snow Shoes 45.00 10449 Isabela Moore 13-Aug-1999 Unicycle 180.79 I'm not sure what the order_by is doing here and if it's having the intended effects.

    Read the article

  • Setting an instanced class property overwrites the property in all instances.

    - by Peter Moore
    I have two instances of a class. Setting a property in the first instance will set it for the second instance too. Why? It shouldn't. The property is not a "prototype property". Check the code below, what happens to Peter Griffin? Two objects are created and given the name "Peter Griffin" and "Roger Moore" but the alert boxes will say "Peter Moore" and "Roger Moore". What happened to Peter Griffin? var BaseClass = function(){ this.name = ""; this.data = {}; this.data.lastname = ""; } var ExtendedClass = function(){ this.setName = function(fname, lname){ this.name = fname; this.data.lastname = lname; } this.hello = function(){ alert("Full name: " + this.name + " " + this.data.lastname); } } ExtendedClass.prototype = new BaseClass(); pilot = new ExtendedClass(); driver = new ExtendedClass(); pilot.setName("Peter", "Griffin"); driver.setName("Roger", "Moore"); pilot.hello(); // Full name: Peter Moore driver.hello(); // Full name: Roger Moore

    Read the article

  • grub does not display activity during boot

    - by Dale E. Moore
    Prior to Ubuntu 11.04 I could configure grub so that after the menu is displayed and the system is booting detail of the boot activity appears. Now there's just a blank screen between the menu and gdm login. How do I coax Ubuntu 11.04 to display the boot activity? Dale E. Moore Oh yeah; I asked the same question here http://ubuntuforums.org/showthread.php?t=1760753 and they didn't know the answer. This question was asked here https://answers.launchpad.net/ubuntu/+source/grub2/+question/160511 too, with no new insight.

    Read the article

  • Navbar List Items Not Showing in Internet Explorer 6

    - by Theo
    Hi everyone, I have a bit of a problem with a navbar not displaying correctly in IE6. http://classicpartsltd.com/ - this is the page, and if you hover over a nav item such as 'Goggles' in IE6 you will see that some of the list items are showing up, but that they will in IE7 and IE8... Does anyone know why this would be the case? Many thanks, Theo.

    Read the article

  • JPA - How to truncate tables between unit tests

    - by Theo
    I want to cleanup the database after every test case without rolling back the transaction. I have tried DBUnit's DatabaseOperation.DELETE_ALL, but it does not work if a deletion violates a foreign key constraint. I know that I can disable foreign key checks, but that would also disable the checks for the tests (which I want to prevent). I'm using JUnit 4, JPA 2.0 (Eclipselink), and Derby's in-memory database. Any ideas? Thanks, Theo

    Read the article

  • How can I split Excel data from one row into multiple rows

    - by Lenny
    Good afternoon, Is there a way to split data from one row and store to separate rows? I have a large file that contains scheduling information and I'm trying to develop a list that comprises each combination of course, day, term and period per line. For example I have a file similiar to this: Crs:Sn Title Tchr TchrName Room Days Terms Periods 7014:01 English I 678 JUNG 300 M,T,W,R,F 3,4 2,3 1034:02 English II 123 MOORE 352 M,T,W,R,F 3 4 7144:02 Algebra 238 VYSOTSKY 352 M,T,W,R,F 3,4 3,4 0180:06 Pub Speaking 23 ROSEN 228 M,T,W,R,F 3,4 5 7200:03 PE I 244 HARILAOU GYM 4 M,T,W,R,F 1,2,3 3 2101:01 Physics/Lab 441 JONES 348 M,T,W,R,F 1,2,3,4 2,3 Should extract to this in an excel file: Crs:Sn Title Tchr# Tchr Room Days Terms Period 7014:01 English I 678 JUNG 300 M 3 2 7014:01 English I 678 JUNG 300 T 3 2 7014:01 English I 678 JUNG 300 W 3 2 7014:01 English I 678 JUNG 300 R 3 2 7014:01 English I 678 JUNG 300 F 3 2 7014:01 English I 678 JUNG 300 M 4 2 7014:01 English I 678 JUNG 300 T 4 2 7014:01 English I 678 JUNG 300 W 4 2 7014:01 English I 678 JUNG 300 R 4 2 7014:01 English I 678 JUNG 300 F 4 2 7014:01 English I 678 JUNG 300 M 3 3 7014:01 English I 678 JUNG 300 T 3 3 7014:01 English I 678 JUNG 300 W 3 3 7014:01 English I 678 JUNG 300 R 3 3 7014:01 English I 678 JUNG 300 F 3 3 7014:01 English I 678 JUNG 300 M 4 3 7014:01 English I 678 JUNG 300 T 4 3 7014:01 English I 678 JUNG 300 W 4 3 7014:01 English I 678 JUNG 300 R 4 3 7014:01 English I 678 JUNG 300 F 4 3 1034:02 English II 123 MOORE 352 M 3 4 1034:02 English II 123 MOORE 352 T 3 4 1034:02 English II 123 MOORE 352 W 3 4 1034:02 English II 123 MOORE 352 R 3 4 1034:02 English II 123 MOORE 352 F 3 4 7144:02 Algebra 238 VYSOTSKY 352 M 3 3 7144:02 Algebra 238 VYSOTSKY 352 T 3 3 7144:02 Algebra 238 VYSOTSKY 352 W 3 3 7144:02 Algebra 238 VYSOTSKY 352 R 3 3 7144:02 Algebra 238 VYSOTSKY 352 F 3 3 7144:02 Algebra 238 VYSOTSKY 352 M 4 3 7144:02 Algebra 238 VYSOTSKY 352 T 4 3 7144:02 Algebra 238 VYSOTSKY 352 W 4 3 7144:02 Algebra 238 VYSOTSKY 352 R 4 3 7144:02 Algebra 238 VYSOTSKY 352 F 4 3 7144:02 Algebra 238 VYSOTSKY 352 M 3 4 7144:02 Algebra 238 VYSOTSKY 352 T 3 4 7144:02 Algebra 238 VYSOTSKY 352 W 3 4 7144:02 Algebra 238 VYSOTSKY 352 R 3 4 7144:02 Algebra 238 VYSOTSKY 352 F 3 4 7144:02 Algebra 238 VYSOTSKY 352 M 4 4 7144:02 Algebra 238 VYSOTSKY 352 T 4 4 7144:02 Algebra 238 VYSOTSKY 352 W 4 4 7144:02 Algebra 238 VYSOTSKY 352 R 4 4 7144:02 Algebra 238 VYSOTSKY 352 F 4 4 0180:06 Pub Speaking 23 ROSEN 228 M 3 5 0180:06 Pub Speaking 23 ROSEN 228 T 3 5 0180:06 Pub Speaking 23 ROSEN 228 W 3 5 0180:06 Pub Speaking 23 ROSEN 228 R 3 5 0180:06 Pub Speaking 23 ROSEN 228 F 3 5 0180:06 Pub Speaking 23 ROSEN 228 M 4 5 0180:06 Pub Speaking 23 ROSEN 228 T 4 5 0180:06 Pub Speaking 23 ROSEN 228 W 4 5 0180:06 Pub Speaking 23 ROSEN 228 R 4 5 0180:06 Pub Speaking 23 ROSEN 228 F 4 5 7200:03 PE I 244 HARILAOU GYM 4 M 1 3 7200:03 PE I 244 HARILAOU GYM 4 M 2 3 7200:03 PE I 244 HARILAOU GYM 4 M 3 3 7200:03 PE I 244 HARILAOU GYM 4 T 1 3 7200:03 PE I 244 HARILAOU GYM 4 T 2 3 7200:03 PE I 244 HARILAOU GYM 4 T 3 3 7200:03 PE I 244 HARILAOU GYM 4 W 1 3 7200:03 PE I 244 HARILAOU GYM 4 W 2 3 7200:03 PE I 244 HARILAOU GYM 4 W 3 3 7200:03 PE I 244 HARILAOU GYM 4 R 1 3 7200:03 PE I 244 HARILAOU GYM 4 R 2 3 7200:03 PE I 244 HARILAOU GYM 4 R 3 3 7200:03 PE I 244 HARILAOU GYM 4 F 1 3 7200:03 PE I 244 HARILAOU GYM 4 F 2 3 7200:03 PE I 244 HARILAOU GYM 4 F 3 3 2101:01 Physics/Lab 441 JONES 348 M 1 2 2101:01 Physics/Lab 441 JONES 348 M 2 2 2101:01 Physics/Lab 441 JONES 348 M 3 2 2101:01 Physics/Lab 441 JONES 348 M 4 2 2101:01 Physics/Lab 441 JONES 348 T 1 2 2101:01 Physics/Lab 441 JONES 348 T 2 2 2101:01 Physics/Lab 441 JONES 348 T 3 2 2101:01 Physics/Lab 441 JONES 348 T 4 2 2101:01 Physics/Lab 441 JONES 348 W 1 2 2101:01 Physics/Lab 441 JONES 348 W 2 2 2101:01 Physics/Lab 441 JONES 348 W 3 2 2101:01 Physics/Lab 441 JONES 348 W 4 2 2101:01 Physics/Lab 441 JONES 348 R 1 2 2101:01 Physics/Lab 441 JONES 348 R 2 2 2101:01 Physics/Lab 441 JONES 348 R 3 2 2101:01 Physics/Lab 441 JONES 348 R 4 2 2101:01 Physics/Lab 441 JONES 348 F 1 2 2101:01 Physics/Lab 441 JONES 348 F 2 2 2101:01 Physics/Lab 441 JONES 348 F 3 2 2101:01 Physics/Lab 441 JONES 348 F 4 2 2101:01 Physics/Lab 441 JONES 348 M 1 3 2101:01 Physics/Lab 441 JONES 348 M 2 3 2101:01 Physics/Lab 441 JONES 348 M 3 3 2101:01 Physics/Lab 441 JONES 348 M 4 3 2101:01 Physics/Lab 441 JONES 348 T 1 3 2101:01 Physics/Lab 441 JONES 348 T 2 3 2101:01 Physics/Lab 441 JONES 348 T 3 3 2101:01 Physics/Lab 441 JONES 348 T 4 3 2101:01 Physics/Lab 441 JONES 348 W 1 3 2101:01 Physics/Lab 441 JONES 348 W 2 3 2101:01 Physics/Lab 441 JONES 348 W 3 3 2101:01 Physics/Lab 441 JONES 348 W 4 3 2101:01 Physics/Lab 441 JONES 348 R 1 3 2101:01 Physics/Lab 441 JONES 348 R 2 3 2101:01 Physics/Lab 441 JONES 348 R 3 3 2101:01 Physics/Lab 441 JONES 348 R 4 3 2101:01 Physics/Lab 441 JONES 348 F 1 3 2101:01 Physics/Lab 441 JONES 348 F 2 3 2101:01 Physics/Lab 441 JONES 348 F 3 3 2101:01 Physics/Lab 441 JONES 348 F 4 3 I'm trying to avoid going line by line separating the data. I'm not well versed on the VBA functionality of Excel, but would like to get started using it. Any help would be greatly appreciated.

    Read the article

  • Wiki-fying a text using LPeg

    - by Stigma
    Long story coming up, but I'll try to keep it brief. I have many pure-text paragraphs which I extract from a system and re-output in wiki format so that the copying of said data is not such an arduous task. This all goes really well, except that there are no automatic references being generated for the 'topics' we have pages for, which end up needing to be added by reading through all the text and adding it in manually by changing Topic to [[Topic]]. First requirement: each topic is only to be made clickable once, which is the first occurrence. Otherwise, it would become a really spammy linkfest, which would detract from readability. To avoid issues with topics that start with the same words Second requirement: overlapping topic names should be handled in such a way that the most 'precise' topic gets the link, and in later occurrences, the less precise topics do not get linked, since they're likely not correct. Example: topics = { "Project", "Mary", "Mr. Moore", "Project Omega"} input = "Mary and Mr. Moore work together on Project Omega. Mr. Moore hates both Mary and Project Omega, but Mary simply loves the Project." output = function_to_be_written(input) -- "[[Mary]] and [[Mr. Moore]] work together on [[Project Omega]]. Mr. Moore hates both Mary and Project Omega, but Mary simply loves the [[Project]]." Now, I quickly figured out a simple or complicated string.gsub() could not get me what I need to satisfy the second requirement, as it provides no way to say 'Consider this match as if it did not happen - I want you to backtrack further'. I need the engine to do something akin to: input = "abc def ghi" -- Looping over the input would, in this order, match the following strings: -- 1) abc def ghi -- 2) abc def -- 3) abc -- 4) def ghi -- 5) def -- 6) ghi Once a string matches an actual topic and has not been replaced before by its wikified version, it is replaced. If this topic has been replaced by a wikified version before, don't replace, but simply continue the matching at the end of the topic. (So for a topic "abc def", it would test "ghi" next in both cases.) Thus I arrive at LPeg. I have read up on it, played with it, but it is considerably complex, and while I think I need to use lpeg.Cmt and lpeg.Cs somehow, I am unable to mix the two properly to make what I want to do work. I am refraining from posting my practice attempts as they are of miserable quality and probably more likely to confuse anyone than assist in clarifying my problem. (Why do I want to use a PEG instead of writing a triple-nested loop myself? Because I don't want to, and it is a great excuse to learn PEGs.. except that I am in over my head a bit. Unless it is not possible with LPeg, the first is not an option.)

    Read the article

  • Converting array to Drupal format

    - by theo
    Hi all, This statement gives me the value I want in Drupal (namely the last user role): global $user; return (end($user->roles)); however I need to convert it to this format: return array( 0 => array('value' => value for value), // You'll usually want to stop here. Provide more values // if you want your 'default value' to be multi-valued: 1 => array('value' => value for value), 2 => ... ); and I've got no idea how to (also, is this format a multidimensional array?)... Any ideas? Thanks for any help, Theo.

    Read the article

  • LWJGL - Eclipse error [on hold]

    - by Zarkopafilis
    When I try to run my lwjgl project, an error pops . Here is the log file: # A fatal error has been detected by the Java Runtime Environment: # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8fcc0a, pid=5612, tid=900 # JRE version: 6.0_16-b01 Java VM: Java HotSpot(TM) Client VM (14.2-b01 mixed mode windows-x86 ) Problematic frame: V [jvm.dll+0xfcc0a] # If you would like to submit a bug report, please visit: http://java.sun.com/webapps/bugreport/crash.jsp # --------------- T H R E A D --------------- Current thread (0x016b9000): JavaThread "main" [_thread_in_vm, id=900, stack(0x00160000,0x001b0000)] siginfo: ExceptionCode=0xc0000005, reading address 0x00000000 Registers: EAX=0x00000000, EBX=0x00000000, ECX=0x00000006, EDX=0x00000000 ESP=0x001af4d4, EBP=0x001af524, ESI=0x016b9000, EDI=0x016b9110 EIP=0x6d8fcc0a, EFLAGS=0x00010246 Top of Stack: (sp=0x001af4d4) 0x001af4d4: 6da44bd8 016b9110 00000000 001af668 0x001af4e4: ffffffff 22200000 001af620 76ec39c2 0x001af4f4: 001af524 6d801086 0000000b 001afd34 0x001af504: 016b9000 016dd990 016b9000 00000000 0x001af514: 001af5f4 6d9ee000 6d9ef2f0 ffffffff 0x001af524: 001af58c 10008c85 016b9110 00000000 0x001af534: 00000000 000a0554 00000000 00000024 0x001af544: 00000000 00000000 001af6ac 00000000 Instructions: (pc=0x6d8fcc0a) 0x6d8fcbfa: e8 e8 d0 1d 08 00 8b 45 10 c7 45 d8 0b 00 00 00 0x6d8fcc0a: 8b 00 8b 48 08 0f b7 51 26 8b 40 0c 8b 4c 90 20 Stack: [0x00160000,0x001b0000], sp=0x001af4d4, free space=317k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [jvm.dll+0xfcc0a] C [lwjgl.dll+0x8c85] C [USER32.dll+0x18876] C [USER32.dll+0x170f4] C [USER32.dll+0x1119e] C [ntdll.dll+0x460ce] C [USER32.dll+0x10e29] C [USER32.dll+0x10e84] C [lwjgl.dll+0x1cf0] j org.lwjgl.opengl.WindowsDisplay.createWindow(Lorg/lwjgl/opengl/DrawableLWJGL;Lorg/lwjgl/opengl/DisplayMode;Ljava/awt/Canvas;II)V+102 j org.lwjgl.opengl.Display.createWindow()V+71 j org.lwjgl.opengl.Display.create(Lorg/lwjgl/opengl/PixelFormat;Lorg/lwjgl/opengl/Drawable;Lorg/lwjgl/opengl/ContextAttribs;)V+72 j org.lwjgl.opengl.Display.create(Lorg/lwjgl/opengl/PixelFormat;)V+12 j org.lwjgl.opengl.Display.create()V+7 j zarkopafilis.koding.io.javafx.Main.main([Ljava/lang/String;)V+16 v ~StubRoutines::call_stub V [jvm.dll+0xecf9c] V [jvm.dll+0x1741e1] V [jvm.dll+0xed01d] V [jvm.dll+0xf5be5] V [jvm.dll+0xfd83d] C [javaw.exe+0x2155] C [javaw.exe+0x833e] C [kernel32.dll+0x51154] C [ntdll.dll+0x5b2b9] C [ntdll.dll+0x5b28c] Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j org.lwjgl.opengl.WindowsDisplay.nCreateWindow(IIIIZZJ)J+0 j org.lwjgl.opengl.WindowsDisplay.createWindow(Lorg/lwjgl/opengl/DrawableLWJGL;Lorg/lwjgl/opengl/DisplayMode;Ljava/awt/Canvas;II)V+102 j org.lwjgl.opengl.Display.createWindow()V+71 j org.lwjgl.opengl.Display.create(Lorg/lwjgl/opengl/PixelFormat;Lorg/lwjgl/opengl/Drawable;Lorg/lwjgl/opengl/ContextAttribs;)V+72 j org.lwjgl.opengl.Display.create(Lorg/lwjgl/opengl/PixelFormat;)V+12 j org.lwjgl.opengl.Display.create()V+7 j zarkopafilis.koding.io.javafx.Main.main([Ljava/lang/String;)V+16 v ~StubRoutines::call_stub --------------- P R O C E S S --------------- Java Threads: ( = current thread ) 0x0179a400 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=4460, stack(0x0b900000,0x0b950000)] 0x01795400 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5264, stack(0x0b8b0000,0x0b900000)] 0x01790c00 JavaThread "Attach Listener" daemon [_thread_blocked, id=6080, stack(0x0b860000,0x0b8b0000)] 0x01786400 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=1204, stack(0x0b810000,0x0b860000)] 0x01759c00 JavaThread "Finalizer" daemon [_thread_blocked, id=5772, stack(0x0b7c0000,0x0b810000)] 0x01755000 JavaThread "Reference Handler" daemon [_thread_blocked, id=4696, stack(0x01640000,0x01690000)] =0x016b9000 JavaThread "main" [_thread_in_vm, id=900, stack(0x00160000,0x001b0000)] Other Threads: 0x01751c00 VMThread [stack: 0x015f0000,0x01640000] [id=4052] 0x0179c800 WatcherThread [stack: 0x0b950000,0x0b9a0000] [id=3340] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap def new generation total 960K, used 816K [0x037c0000, 0x038c0000, 0x03ca0000) eden space 896K, 91% used [0x037c0000, 0x0388c2c0, 0x038a0000) from space 64K, 0% used [0x038a0000, 0x038a0000, 0x038b0000) to space 64K, 0% used [0x038b0000, 0x038b0000, 0x038c0000) tenured generation total 4096K, used 0K [0x03ca0000, 0x040a0000, 0x077c0000) the space 4096K, 0% used [0x03ca0000, 0x03ca0000, 0x03ca0200, 0x040a0000) compacting perm gen total 12288K, used 2143K [0x077c0000, 0x083c0000, 0x0b7c0000) the space 12288K, 17% used [0x077c0000, 0x079d7e38, 0x079d8000, 0x083c0000) No shared spaces configured. Dynamic libraries: 0x00400000 - 0x00424000 C:\Program Files\Java\jre6\bin\javaw.exe 0x77550000 - 0x7768e000 C:\Windows\SYSTEM32\ntdll.dll 0x75a80000 - 0x75b54000 C:\Windows\system32\kernel32.dll 0x758d0000 - 0x7591b000 C:\Windows\system32\KERNELBASE.dll 0x759e0000 - 0x75a80000 C:\Windows\system32\ADVAPI32.dll 0x76070000 - 0x7611c000 C:\Windows\system32\msvcrt.dll 0x77250000 - 0x77269000 C:\Windows\SYSTEM32\sechost.dll 0x771a0000 - 0x77241000 C:\Windows\system32\RPCRT4.dll 0x76eb0000 - 0x76f79000 C:\Windows\system32\USER32.dll 0x76e60000 - 0x76eae000 C:\Windows\system32\GDI32.dll 0x77770000 - 0x7777a000 C:\Windows\system32\LPK.dll 0x75fd0000 - 0x7606e000 C:\Windows\system32\USP10.dll 0x770b0000 - 0x770cf000 C:\Windows\system32\IMM32.DLL 0x770d0000 - 0x7719c000 C:\Windows\system32\MSCTF.dll 0x7c340000 - 0x7c396000 C:\Program Files\Java\jre6\bin\msvcr71.dll 0x6d800000 - 0x6da8b000 C:\Program Files\Java\jre6\bin\client\jvm.dll 0x73a00000 - 0x73a32000 C:\Windows\system32\WINMM.dll 0x75610000 - 0x7565b000 C:\Windows\system32\apphelp.dll 0x6d7b0000 - 0x6d7bc000 C:\Program Files\Java\jre6\bin\verify.dll 0x6d330000 - 0x6d34f000 C:\Program Files\Java\jre6\bin\java.dll 0x6d290000 - 0x6d298000 C:\Program Files\Java\jre6\bin\hpi.dll 0x776e0000 - 0x776e5000 C:\Windows\system32\PSAPI.DLL 0x6d7f0000 - 0x6d7ff000 C:\Program Files\Java\jre6\bin\zip.dll 0x10000000 - 0x1004c000 C:\Users\theo\Desktop\workspace\JavaFX1\lib\natives\windows\lwjgl.dll 0x5d170000 - 0x5d238000 C:\Windows\system32\OPENGL32.dll 0x6e7b0000 - 0x6e7d2000 C:\Windows\system32\GLU32.dll 0x70620000 - 0x70707000 C:\Windows\system32\DDRAW.dll 0x70610000 - 0x70616000 C:\Windows\system32\DCIMAN32.dll 0x75b60000 - 0x75cfd000 C:\Windows\system32\SETUPAPI.dll 0x759b0000 - 0x759d7000 C:\Windows\system32\CFGMGR32.dll 0x76d70000 - 0x76dff000 C:\Windows\system32\OLEAUT32.dll 0x75db0000 - 0x75f0c000 C:\Windows\system32\ole32.dll 0x758b0000 - 0x758c2000 C:\Windows\system32\DEVOBJ.dll 0x74060000 - 0x74073000 C:\Windows\system32\dwmapi.dll 0x74b60000 - 0x74b69000 C:\Windows\system32\VERSION.dll 0x745f0000 - 0x7478e000 C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7600.16661_none_420fe3fa2b8113bd\COMCTL32.dll 0x75d50000 - 0x75da7000 C:\Windows\system32\SHLWAPI.dll 0x74370000 - 0x743b0000 C:\Windows\system32\uxtheme.dll 0x22200000 - 0x22206000 C:\Program Files\ESET\ESET Smart Security\eplgHooks.dll VM Arguments: jvm_args: -Djava.library.path=C:\Users\theo\Desktop\workspace\JavaFX1\lib\natives\windows -Dfile.encoding=Cp1253 java_command: zarkopafilis.koding.io.javafx.Main Launcher Type: SUN_STANDARD Environment Variables: PATH=C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:/Program Files/Java/jre6/lib/i386;C:\Perl\site\bin;C:\Perl\bin;C:\Ruby200\bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Windows Live\Shared;C:\Users\theo\Desktop\eclipse; USERNAME=theo OS=Windows_NT PROCESSOR_IDENTIFIER=x86 Family 6 Model 37 Stepping 5, GenuineIntel --------------- S Y S T E M --------------- OS: Windows 7 Build 7600 CPU:total 4 (8 cores per cpu, 2 threads per core) family 6 model 37 stepping 5, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, ht Memory: 4k page, physical 2097151k(1257972k free), swap 4194303k(4194303k free) vm_info: Java HotSpot(TM) Client VM (14.2-b01) for windows-x86 JRE (1.6.0_16-b01), built on Jul 31 2009 11:26:58 by "java_re" with MS VC++ 7.1 time: Wed Oct 23 22:00:12 2013 elapsed time: 0 seconds Code: Display.setDisplayMode(new DisplayMode(800,600)); Display.create();//Error here I am using JDK 6

    Read the article

  • Android SDK PATH Error: doesn´t find home directory [migrated]

    - by THeo Oliveira
    I use Ubuntu 12.10 and I tried to follow this guide Install android sdk and eclipse in Ubuntu 12.04 but I keep getting this error: Error: The AVD manager normally uses the user's profile directory to store AVD files. However it failed to find the default profile directory. To fix this, please set the environment variable ANDROID_SDK_HOME to a valid path such as ¨~¨. Any ideas how can I fix this?

    Read the article

  • Alice In Wonderland: Good, but not Great

    - by Theo Moore
    We went to see Alice In Wonderland today. We both like Tim Burton a lot (the stranger the better) and like Johnny Depp very well also. After seeing all the previews and such, we were fired up to see this film. Honestly, I thought it was good but not great. I was prepared to be wow-ed, but I wasn't. Perhaps I expected too much. I did like it, but I'll not own it nor would I expect to see it again...unless someone I know decides they want to see it. I was about to say something to reassure you that I wasn't going to provide any spoilers but two things occurred to me: one, I never give spoilers and two, why worry about spoilers for a film that so closely follows a book? My comments about the film are hard to describe, but the basic gist is that it doesn't really feel like it..."works" to me. I can't get any more specific than that, much as I'd like to do so. Something about it seems sort of disjointed and not in that Alice way you'd expect. My only specific comment is that I didn't like the actor who plays Alice very well. She was very flat and just didn't sell he character to me. She seemed a bit, well, plastic. Depp was as good as you'd expect him to be, I am happy to say. Obviously Lewis Carroll couldn't have imagined this made into film, but I can't help thinking that he'd see this and say that Depp was the perfect Mad Hatter. So, I'd definitely recommend seeing it (we saw it in 3D which was cool, but not really necessary) at least once, but don't be surprised if you're kinda meh afterwards.

    Read the article

  • Android SDK PATH Error: doesn´t find home directory

    - by THeo Oliveira
    I use Ubuntu 12.10 and I tried to follow this guide Install android sdk and eclipse in Ubuntu 12.04 but I keep getting this error: Error: The AVD manager normally uses the user's profile directory to store AVD files. However it failed to find the default profile directory. To fix this, please set the environment variable ANDROID_SDK_HOME to a valid path such as ¨~¨. Any ideas how can I fix this?

    Read the article

  • GWB: 5 yr anniversary

    - by Theo Moore
    Wow, just realized it's my 5 year anniverary on GeeksWithBlogs. Hard to believe so much time has passed. I paged back through some of my early posts, curious what sort of things about which I used to post. It's also interesting to see how my focus has changed and what really hasn't. I was also reminded that Chris Williams and I have been friends for that long. I don't blog nearly as often now as I used to do, but I still really like the GWB community, and I am honoured to be allowed to continue to be a part of it. Another 5 years ahead (or more), I hope. :-)

    Read the article

  • DopeWarz 2010

    - by Theo Moore
    A few (6?) weeks ago, I started a project that I've always wanted to do. I am doing a re-write of the old VB6 game DopeWars with a partner in crime. I loved that game and spent many, many hours wasting time playing it years ago. I liked it so much, I even registered it (it was $5...even then, that wasn't much to spend). The VB6 version itself was a port of the old DOS game DrugWars (never go to play that). I needed a game project to work on as it's been far too long since I've done any game work. There is surprising amount of logic built into the game (there is the way I'm writing it, anyway) with what is really a minimal interface. My design goal was to have an object model that could be easily adapted to any interface and so far, I've managed to do that. I am even considering a web-based version that could run via Facebook (no clue how to do that...yet). I've enlisted the help of one of my DBA buddies to work on the interface while I am working on the object model. So far, this arrangement has gone well. The logical separation of concerns allows for us to collaborate easily. Once we get to the Facebook step, it will be great to have a DBA "on staff" to help that part off of the ground. The object model is probably about 60% complete with quite a bit of testing to go. More on this as we go....

    Read the article

  • Flash removal and installation issue

    - by Theo
    I'm having this issue trying to uninstall and/or upgrade the Adobe flash player plug-in. Here's what I've ran through the terminal: $ sudo apt-get install -f Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required: linux-headers-3.0.0-13-generic libgladeui-1-11 linux-headers-3.0.0-19-generic linux-headers-3.0.0-13 linux-headers-3.0.0-19 erlang-base Use 'apt-get autoremove' to remove them. The following packages will be REMOVED: adobe-flashplugin 0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded. 1 not fully installed or removed. After this operation, 10.2 MB disk space will be freed. Do you want to continue [Y/n]? y (Reading database ... 375840 files and directories currently installed.) Removing adobe-flashplugin ... update-alternatives: error: no alternatives for iceape-flashplugin. update-alternatives: error: no alternatives for iceape-flashplugin. dpkg: error processing adobe-flashplugin (--remove): subprocess installed pre-removal script returned error exit status 2 No apport report written because MaxReports is reached already postinst called with argument `abort-remove' dpkg: error while cleaning up: subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: adobe-flashplugin E: Sub-process /usr/bin/dpkg returned an error code (1) Please advise if you can. Let me know if there is any other info you need.

    Read the article

  • Codestock: Apparently Powershell ain't got the power

    - by Theo Moore
    I checked on the status of voting on the Codestock (www.codestock.org) site this week. I was surpised to see that none of the Powershell sessions were among leaders in voting. Now, I confess that I am somewhat biased (my session is on Powershell), but that said, I thought it odd. I was under the impression that Powershell had a strong following and that many people were using it. I suppose the voting reflects a stronger developer community that might not make use of Powershell to degree some others might. I am a huge fan of Powershell and I am constantly impressed with the things it can do. In my case, I use it as lightweight functional testing harness for web pages. I use it in this capacity at work and for work I do for the Carbonated Comics (www.carbonatedcomics.com) site as well. If anyone still hasn't registered, do us a favor and vote for a Powershell session, K?

    Read the article

  • crunchbang: it takes up *how* much memory?!?!

    - by Theo Moore
    I've been trying many distros of Linux lately, trying to find something I like for my netbook. I started out with Ubuntu, and I can tell you I am a big fan. Ubuntu is now fast to install, much simpler to administer, and pretty light resource-wise. My original install was the standard 32 bit version of 9.04. I tried the netbook remix version of this release, but it was very, very slow. Even the full-blown version used only about 200mb. Much better than the almost 800 that the recommended Windows y version took. Once the newest release of Ubuntu was released, I decided to try the netbook remx of 10.04. It used even less RAM; only about 150mb. I thought I'd found my OS. I certainly settled in and prepared to use it forever. Then, someone I know suggested I try cunchbang. It is the most minimalistic UI I've ever seen, using Openbox rather than Gnome or KDE. Very slick, simple and clean. Since I am using the alpha of the most recent version (using Debian Squeeze), the apps provided for you are few...although more will be provided soon. You do have a word processor, etc., although not the OpenOffice you would normally get in Ubuntu. But the best part? 48MB. That's it. 48mb fully loaded, supporting what I can "hotel services". It's fast, boots quick, and believe it or not, I can even do Java-based development....on my netbook! Pretty slick.   More on it as I use it.

    Read the article

  • .NET Demon 1.0 Released

    - by theo.spears
    Today we're officially releasing version 1.0 of .NET Demon, the Visual Studio Extension Alex Davies and I have been working on for the last 6 months. There have been beta versions available for a while, but we have now released the first "official" version and made it available to purchase. If you haven't yet tried the tool, it's all about reducing the time between when you write a line of code and when you are able to try it out so you don't have to wait: Continuous compilation We use spare CPU cycles on your machine to compile your code in the background when you make changes, so assemblies are up to date whenever you want to run them. Some clever logic means we only recompile code which may have been affected by your changes. Continuous save .NET Demon can perform background saving, so you don't lose any work in case of crashes or power failures, and are less likely to forget to commit changed files. Continuous testing (Experimental) The testing tool in .NET Demon watches which code you change in your solution, and automatically reruns tests which are impacted, so you learn about any breaking changes as quickly as possible. It also gives you inline test coverage information inside Visual Studio. Continuous testing is still experimental - it will work fine in many cases, but we know it's not yet perfect. Releasing version 1.0 doesn't mean we're pausing development or pushing out improvements. We will still be regularly providing new versions with improved functionality and fixes for any bugs people come across. Visit the .NET Demon product page to download

    Read the article

  • Sharing configuration settings between Windows Azure roles

    - by theo.spears
    If you are working on a medium-large Windows Azure project it's likely it will involve more than one role, for example separate web and worker roles. Unfortunately although all the windows azure configuration settings are stored in a single cscfg file, there is no way to share configuration settings between multiple roles. This means you have to duplicate common settings like connection strings across all your roles. There is an open Connect issue about this topic, but Microsoft have not said when they will fix it. In the mean time I've put together a dirty dirty hack cunning workaround that creates a fake role containing your shared configuration settings, and copies it to all roles as part of the build process. Here's how you set it up: 1. Download the zip file attached to this post, and unzip it into the folder containing your Azure project (not your solution folder). 2. Edit your csdef and cscfg files to include the placeholder project ServiceDefinition.csdef<?xml version="1.0" encoding="utf-8"?> <ServiceDefinition name="AzureSpendNotifier" http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition%22"http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition"> <WorkerRole name="GLOBAL"> <ConfigurationSettings> <Setting name="ExampleSetting" /> </ConfigurationSettings> </WorkerRole> <WorkerRole name="MyWorker"> <ConfigurationSettings> </ConfigurationSettings> </WorkerRole> <WebRole name="MyWeb"> <Sites> <Site name="Web"> <Bindings> <Binding name="WebEndpoint" endpointName="WebEndpoint" /> </Bindings> </Site> </Sites> <ConfigurationSettings> </ConfigurationSettings> </WebRole> </ServiceDefinition> ServiceConfiguration.cscfg<?xml version="1.0" encoding="utf-8"?> <ServiceConfiguration serviceName="AzureSpendNotifier" xmlns=http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration osFamily="1" osVersion="*"> <Role name="GLOBAL"> <ConfigurationSettings> <Setting name="ExampleSetting" value="Hello World" /> </ConfigurationSettings> <Instances count="1" /> </Role> <Role name="MyWorker"> <Instances count="1" /> <ConfigurationSettings> </ConfigurationSettings> </Role> <Role name="MyWeb"> <Instances count="1" /> <ConfigurationSettings> </ConfigurationSettings> </Role> </ServiceConfiguration> It is important that all your roles contain a ConfigurationSettings entry in both cscfg and csdef files, even if it's empty- otherwise the shared configuration settings will not be inserted. 3. Open your azure deployment (.ccproj) project in notepad, and add the highlighted line below: ... <Import Project="$(CloudExtensionsDir)Microsoft.CloudService.targets" /> <Import Project="globalsettings/globalsettings.targets" /> </Project> It is important you add this below the Microsoft.CloudService.targets import line, as it replaces some of the rules defined in that file. Visual studio will prompt you to reload the project, say yes. At this point you will have a new Azure role called 'GLOBAL' with settings you can edit through the visual studio properties panel as normal. This role will never be deployed, but any settings you add to it will be copied to all your other roles when deployed or tested locally within visual studio.

    Read the article

  • Learnings from trying to write better software: Loud errors from the very start

    - by theo.spears
    Microsoft made a very small number of backwards incompatible changes between .NET 1.1 and 2.0, because they wanted to make it as easy and safe as possible to port applications to the new runtime. (Here’s a list.) However, one thing they did change was what happens when a background thread fails with an unhanded exception - in .NET 1.1 nothing happened, the thread terminated, and the application continued oblivious. Try the same trick in .NET 2.0 and the entire application, including all threads, will rudely terminate. There are three reasons for this. Firstly if a background thread has crashed, it may have left the entire application in an inconsistent state, in a way that will affect other threads. It’s better to terminate the entire application than continue and have the application perform actions based on a broken state, for example take customer orders, or write corrupt files to disk.  Secondly, during software development, it is far better for errors to be loud and obtrusive. Even if you have unit tests and integration tests (and you should), a key part of ensuring software works properly is to actually try using it, both through systematic testing and through the casual use all software gets by its developers during use. Subtle errors are easy to miss if you are not actually doing real work using the application, loud errors are obvious. Thirdly, and most importantly, even if catching and swallowing exceptions indiscriminately doesn't cause any problems in your application, the presence of unexpected exceptions shows you do not fully understand the behavior of your code. The currently released version of your application may be absolutely correct. However, because your mental model of the behavior is wrong, any future change you make to the program could and probably will introduce critical errors.  This applies to more than just exceptions causing threads to exit, any unexpected state should make the application blow up in an un-ignorable way. The worst thing you can do is silently swallow errors and continue. And let's be clear, writing to a log file does not count as blowing up in an un-ignorable way.  This is all simple as long as the call stack only contains your code, but when your functions start to be called by third party or .NET framework code, it's surprisingly easy for exceptions to start vanishing. Let's look at two examples.   1. Windows forms drag drop events  Usually if you throw an exception from a winforms event handler it will bring up the "application has crashed" dialog with abort and continue options. This is a good default behavior - the error is big and loud, but it is possible for the user to ignore the error and hopefully save their data, if somehow this bug makes it past testing. However drag and drop are different - throw an exception from one of these and it will just be silently swallowed with no explanation.  By the way, it's not just drag and drop events. Timer events do it too.  You can research how exceptions are treated in different handlers and code appropriately, but the safest and most user friendly approach is to always catch exceptions in your event handlers and show your own error message. I'll talk about one good approach to handling these exceptions at the end of this post.   2. SSMS integration for SQL Tab Magic  A while back wrote an SSMS add-in called SQL Tab Magic (learn more about the process here). It works by listening to certain SSMS events and remembering what documents are opened and closed. I deployed it internally and it was used for a few months by a number of people without problems, so I was reasonably confident in its quality. Before releasing I made a few cleanups, including introducing error reporting. Bam. A few days later I was looking at over 1,000 error reports in my inbox. In turns out I wasn't handling table designers properly. The exceptions were there, but again SSMS was helpfully swallowing them all for me, so I was blissfully unaware. Had I made my errors loud from the start, I would have noticed these issues long before and fixed them.   Handling exceptions  Now you are systematically catching exceptions throughout your application, you need to do something with them. I've tried 3 options: log them, alert the user, and automatically send them home.  There are a few good options for logging in .NET. The most widespread is Apache log4net, which provides a very capable and configurable logging framework. There is also NLog which has a compatible interface, with a greater emphasis on fluent rather than XML configuration.  Alerting the user serves two purposes. Firstly it means they understand their action has failed to they don't just assume it worked (Silent file copy failure is a problem if you then delete the originals) or that they should keep waiting for a background task to complete. Secondly, it means the users can report the bug to your support team, and then you can fix it. This means the message you show the user should contain the information you need as a developer to identify and fix it. And the user will probably just send you a screenshot of the dialog, so it shouldn't be hidden by scroll bars.  This leads us to the third option, automatically sending error reports home. By automatic I mean with minimal effort on the part of the user, rather than doing it silently behind their backs. The advantage of this is you can send back far more detailed and precise information than you can expect a user to include in an email, and by making it easier to report errors, you make it more likely users will do so.  We do this using a great tool called SmartAssembly (full disclosure: this is a product made by Red Gate). It captures complete stack traces including the values of all local variables and then allows the user to send all this information back with a single click. We also capture log files to help understand what lead up to the error. We then use the free SmartAssembly Sync for Jira to dedupe these reports and raise them as bugs in our bug tracking system.  The combined effect of loud errors during development and then automatic error reporting once software is deployed allows us to find and fix more bugs, correct misunderstandings on how our software works, and overall is a key piece in delivering higher quality software. However it is no substitute for having motivated cunning testers in the building - and we're looking to hire more of those too.   If you found this post interesting you should follow me on twitter.  

    Read the article

1 2 3 4 5 6 7 8 9  | Next Page >