Skip to content

Instantly share code, notes, and snippets.

@jpgneves
Last active December 22, 2015 10:39
Show Gist options
  • Select an option

  • Save jpgneves/6460521 to your computer and use it in GitHub Desktop.

Select an option

Save jpgneves/6460521 to your computer and use it in GitHub Desktop.
eclipse-mode.el
(defun eclipse-mode ()
(npex))
(defun npex ()
(run-at-time (format "%d min" (random 60))
nil
'do-npex))
(defun do-npex ()
(let ((line (random 800)))
(message-box "Null pointer exception in %s.class:%d"
(npex-make-file-name) line))
(npex))
(defun npex-make-file-name ()
(let ((words '("Editor" "Show" "Spline" "Emacs" "Reticulator"
"Foo" "Bar" "Baz" "Concatenator" "Spelunker"
"Glorbificator" "Factory" "Mock" "Herp" "Abstract"
"Helper" "Parent" "Child" "Frame" "Object" "Window"
"Eclipse" "Java" "Bean" "Enterprise" "Visitor"
"List" "Array" "String" "Interface" "Implementation"
"Abstraction" "Reader" "Writer" "Class" "Static" "Basic"
"Decorator" "Strategy" "Swing" "Oracle"))
(name-length (+ (random 6) 1))
(name '()))
(while (< (length name) name-length)
(setq name (cons (nth (random (length words)) words) name)))
(mapconcat 'identity name "")))
(eclipse-mode)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment