Posts

Showing posts with the label java

Quick notes on Java profiling API

Image
Java Profilers normally change the bytecode of methods in classes as they are loaded by the JVM. See the instrument API. Also see the tijmp as an example memory profiler. http://download.oracle.com/javase/6/docs/api/java/lang/instrument/package-summary.html http://khelekore.org/jmp/tijmp/ ---- Because the Alimentive and Cerebral systems are farthest removed from each other, evolutionally, a large brain and a large stomach are a very unusual combination. Such an individual would be a combination of the Alimentive and Cerebral types and would have the Alimentive's fat body with a large highbrow head of the Cerebral. The [Pg 224]  possession of these two highly developed but opposite kinds of systems places their owner constantly in the predicament of deciding between the big meal he wants and the small one he knows he should have for good brain work. -- Ron Paul 2012

OpenJDK Hotspot, source code line count

Here are some notes, source code analysis of hotspot: # perl cloc-1.53.pl src 1786 text files. 1716 unique files. 121 files ignored. ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- C++ 673 64909 97522 340057 C/C++ Header 796 25928 49603 101144 XML 61 474 179 15360 Java 78 1908 2397 8663 C 11 1194 2327 7236 XSLT 7 560 166 4406 Assembly 6 89 36 2245 D 4 83 ...

Declarative programming introduction

"Haskell is a very elegant language, and the functional nature of it makes it a beautiful glue language... because the nature of Haskell as a language can make things clearer than many other programming languages" -- Mark C. Chu-Carroll of the ScienceBlogs "Haskell is a declarative language in that the program can be treated as a statement of facts, rather than as a set of commands that are sequenced in time" -- cdsmith Declarative programming is a programming paradigm that encourages that the programming logic describes what the program will do as opposed to how it will do it. Also, you don't define your programming logic in a sequence of steps like you normally would using an imperative style programming. Functional programming is considered declarative programming. With the imperative programming paradigm, one might do the following to reach a desired state. In Java (imperative style): final SavingsAccount savings = new SavingsAccount (); // ...

Wolfram's Cellular Automata, A New Kind of Science and Example Squaring Rule

Image
Overview - Playing the Game Of Life When most computer users upload a profile image from their desktop to Facebook's website they don't stop to think about the simple binary math rules that are fundamental to most digital devices. We realize that 4 gigabytes of RAM is more memory than 512 megabytes but we don't visualize the logic chips that are involved in an xor $0x100, eax operation for a 32-bit CISC processor. Software developers have to consider memory management or how a computer's operating system loads their programs into memory. They don't normally consider VHDL logic circuit designs, the data paths, arithmetic logic units or the millions of transistors that make up a modern CPU. Those low-level details have been intentionally hidden from the user application developer. The modern CPU may have changed dramatically over the last decade but at the heart of early digital computing were simple Boolean operations. These simple rules were combined togeth...

Standard Developer Toolkit - 2010 version

Image
I don't know if it is because I am getting older but I am starting to record my thoughts online or digitally so that I can easily go back to that record. I do this by posting blog posts on blogspot and through other subversion code repositories. One task that I have long neglected is creating a list of common developer tools. The toolkit suite contains a list of common software applications that a developer of any language or environment would need. Most of the software is open source of freely available. Obviously, different developers want or need different tools. Here is the list of packages that are essential for what I need. Yes, the list is bias with a emphasis on Java development. I marked the critical applications in bold. I would typically install of all of these tools on one machine over a long time period. Some of the tools seem similar in nature, for example, I do install Netbeans and Eclipse on the same machine. I may swap between the IDEs if there are tools ...

Practical AI: Machine Learning and Data Mining with Weka and Java

Image
Practical AI: Machine Learning and Data Mining with Weka and Java Most people tend to think of Artificial Intelligence with depictions of autonomous bipedal robots speaking and greeting humans in a monotone voice. The computer science field of Artificial Intelligence is far from that science fiction world that we see portrayed in the movies. The most prominent past AI research seems more like it would fit under a branch of mathematics and not computer science. AI research sub-fields include machine learning, data mining, computer vision, string match and indexing, search algorithms and neural networks. There is a new focus on not just faster search algorithms and pattern recognition, but building a relationship between computer science, neuroscience, philosophy, psychology, biology. AI is branching out beyond the algorithms and merging with those other general science and medical fields. Marvin Minsky, a prominent researcher in the AI field, called some of the previous interest...

Practical AI: Using ProgramD AIML platform

Image
Using ProgramD AIML bot as a personal assistant http://code.google.com/p/ainotebook/ Introduction ¶ ProgramD is a fully functional AIML bot engine that is implemented with Java. It supports multiple bots, it is easy to configure and runs in a GUI application and also under a J2EE environment. AIML, or Artificial Intelligence Markup Language, is an XML dialect for creating natural language software agents. When the AIML markup language is loaded for your bot, then you chat with the bot. Once you become familiar with the AIML format, you can then build a simple personal assistant bot. For Java developers, you may add Java keyword definitions or links to useful resources. Quickstart ¶ To use ProgramD, you can use the mirrored binary/source version provided on this site (programd .zip) or visit http://www.aitools.org/Program_D The version on this site includes jetty webserver configured with a programd web application. Launch the GUI application ¶ Navigate to: the HOME\bin direct...

Most recent software projects and why

Here are my recent open source projects: (Most of these are proof of concepts, source included projects. Use subversion to check out any project). botnodetoolkit - A complete Clojure/J2EE framework that makes it easy for developers to taking care of browser and server-side components. And other server applications. haskellnotebook - The Haskell Notebook (another Haskell Cookbook) contains some common and not so common Haskell programming idioms that are contained in a collection of working/compilable examples. There is also a collection of source code from other functional programming languages including Lisp and Erlang. This project is similar to other cookbook projects that you may find on the web for various other programming languages. iphonenotebook - Octanemech - simple opengl iphone demo. keywords: objectivec, opengl, iphone3, xcode jvmnotebook - The Java Virtual Machine ( Sun's JVM is called HotSpot ) is a java bytecode interpreter which is fast, portable an...

Google Testability Blog

http://misko.hevery.com/ Great testability blog

Modify javap to output to String, view decompiled information at runtime.

Image
I asked the following question on Stackoverflow: "I am working with an application webserver and have complicated classloading issues. I want to be able to download or print information that would normally get printed by javap (the methods, etc). I may also need to get the raw binary class data, to perform a binary diff. How would you do this?" I was not satisfied with the responses from stack. Sure, I could have used reflection to print information on a particular class from the web, but I was looking for the output from javap . Javap is essentially a decompiler that comes with Sun's set of Java tools, it is used to print the method names and other information for an associated class. It is a useful tool, how do you run the tool on code that is deployed on a server, at runtime? It seemed obvious that javap was written in Java, so I naturally assumed that the source was available with openjdk. Source for javap is available GPL licensed in the mercurial repository. Th...