Posts

Showing posts from December, 2011

DNA seen through the eyes of a coder, my take

Image
Several years ago in 2008, a programmer researched DNA and  how the cell works. He gave a software related analogy on how it operates.  It was a great overview of the process with the biology language translated for engineers.  I constantly thought about the article and wanted to add my own spin on it.  The author didn't really do anything wrong, and it really is a great article, but I personally wish he would have given a one paragraph software analogy.  (With the core content, I am not a scientist so I can't really refute his research). http://ds9a.nl/amazing-dna/ I enjoyed the last view paragraphs at the end, "Now, DNA is not like a computer programming language. It really isn't. But there are some whopping analogies. We can view each cell as a CPU, running its own kernel. Each cell has a copy of the entire kernel, but choses to activate only the relevant parts. Which modules or drivers it loads, so to speak. If a cell needs to do something, it whips up the rig

Lorenz Attractor 3D View

Image
Resources: [1]  http://jvmnotebook.googlecode.com/svn/trunk/blog/java/Lorenz [2]  http://en.wikipedia.org/wiki/Lorenz_attractor [3]  http://berlinbrown.github.com/newpages/applet2/applet2.html [4]  http://berlinbrown.github.com/  - Github projects ---- Human life faces the same alternatives that confront all other forms of life—of adapting itself to the conditions under which it must live or becoming extinct. You have an advantage over the sagebrush in that you can move from your city or state or country to another, but after all that is not much of an advantage. For though you may improve your situation slightly you will still find that in any civilized country the main elements of your problem are the same.

Ron Paul is the most racist candidate in 2012 by far

http://www.youtube.com/watch?v=eMQmInReYlI   Summary of his remarks.  Repeal drug laws and it will be a tremendous improvement for blacks snared in an injust system.  Systems that are impartial will have no special punishments or rewards for people. Right no no one can deny blacks are punished by our justice system. That has to stop. Blacks are 14% of drug users, yet are 36% of those arrested for drugs.  We must get black men out of prison. The war on drugs is responsible for this. It cost $400 billion since the 1970s fighting drugs. Prohibition is a failure. Drug addiction is a disease and should be treated medically.  Death penalty is wrong, unjust, and racist. The rich never get it, the poor and minorities are far more likely to get the death penalty.  Rosa Parks is one of his heros for engaging in peaceful civil disobedience against injust laws.  Ron Paul has gotten the most black votes of any Republican candidate because he is against injustice.  He will issue a pr

A Physics Example in Java: A Projectile Fired from a Cannon, 2D Particle Kinematics

Image
Here is an example program that shows how to implement kinematic equations for projectile motion using Java and the Swing 2D graphics libraries. Equation used to plot projectile path along the X and Y axis The Java code for these equations are simple, here is the current implementation of the doSimulation routine. The routine calculates the X and Y positions of the projectile over time.  The project only consists of two classes, the class for rendering the simulation and initializing the application.  The other class contains logic for calculating the X and Y positions. Java code, DoSimulation routine, see s.i and s.k for the X/Y positions Java 2D Cannon Physics Simulation Java Source https://jvmnotebook.googlecode.com/svn/trunk/blog/java/SimpleCannonPhysicsJava Based on code from: physics for game developers, David Bourg http://berlin2research.com/dyna/berlinbrown_java_resume/ ---- So today we see man a highly evolved creature who not only acts

Random Code Post of the Day (procedural haskell, parse file)

Image
This is a random code post of the day, with haskell, read a log file, search for a term and then write when the term is found to another file. Haskell Source, open a file and search for a term Source https://jvmnotebook.googlecode.com/svn/trunk/blog/haskell/RandomParseFile ---- It was a cloudy, sultry afternoon; the seamen were lazily lounging about the decks, or vacantly gazing over into the lead-coloured waters. Queequeg and I were mildly employed weaving what is called a sword-mat, for an additional lashing to our boat. So still and subdued and yet somehow preluding was all the scene, and such an incantation of reverie lurked in the air, that each silent sailor seemed resolved into his own invisible self.

Implementing Example One from the Machine Learning Class in Java

Image
At the end of 2011, Stanford offered a free online machine learning course.  The course covered many aspects of machine learning including linear regression, neural networks, super vector machines, and anomaly detection. Octave is an open software platform for numerical applications that is compatible with Matlab.  Octave was the   tool of choice for the machine learning class, all of the programming exercises required that you submit Octave source. Overview of example one: The first example in the course is to implement one variable linear regression.  The regression in linear regression is a regression towards a mean or moving closer towards a mean. Partial Approach for Gradient Descent with Octave In the example, data points are read from a file and after running the example from Octave, this plot is generated. Overview of example one in Java: The Java implementation as you might expect is more verbose than the Octave equivalent.  Java doesn't includ

Quick LaTeX Equation Examples for use by programmers on windows, convert to PNG

Image
LaTeX/TeX is a complex documenting system that is mostly used in a academic setting but can also be used by anyone to convey information.  It is a complete system but a massive system that has been in development for decades so it isn't something that you skim over and become fluent in.  But I did want to provide some full setup scripts so you can add write an equation and add an image of that equation or pseudo code to your blog or word documents. Install Cygwin and tetex You can install all of the tex software through cygwin.  Use the cygwin easy click through install wizard.  Select all of the Publishing/tetex*  applications. 1.1 Install of tetex through Cygwin setup Install Cygwin, make and gcc and vim gcc and make aren't required for tetext but I use a make script to run tex.  Install gcc and make through the cygwin installer. Download my make script and example tex files http://jvmnotebook.googlecode.com/svn/trunk/blog/LatexEquations/src/ There are seve