tag:blogger.com,1999:blog-64696933202199232732024-03-14T01:37:46.886-04:00Berlin Brown and Software DevelopmentA Blog about Software Development. Software development is the act of developing a software product.Berlin Brown Discussionshttp://www.blogger.com/profile/14524539202704556506noreply@blogger.comBlogger257125tag:blogger.com,1999:blog-6469693320219923273.post-79292956416522969272023-12-30T03:09:00.004-05:002024-01-16T07:15:19.848-05:00Open Source Language Models<p> Here are some open source language models.<br /><br /><a href="https://www.datacamp.com/blog/top-open-source-llms">https://www.datacamp.com/blog/top-open-source-llms</a></p><p>See on Twitter: <a href="https://twitter.com/BerlinBrownMech">https://twitter.com/BerlinBrownMech</a></p><p>And random pov pic</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibHti6hyphenhyphenmfv61V8th-Z5HZj6RAMkXESKaH4_CP0Sadiy_5b3tNJWCy3ztermZRF94QO5Ch112yyi5heCqj39z_iHly_vaKawHG5Dclam9VCWX0IsUvoH64yI2VJWbnw7h1_lprl3CrWHfqWD1BThDqoGDQM4d6QOBWhAdoTs6inSwcs6YZXxNuLt6Vhk7E/s800/shadows.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="600" data-original-width="800" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibHti6hyphenhyphenmfv61V8th-Z5HZj6RAMkXESKaH4_CP0Sadiy_5b3tNJWCy3ztermZRF94QO5Ch112yyi5heCqj39z_iHly_vaKawHG5Dclam9VCWX0IsUvoH64yI2VJWbnw7h1_lprl3CrWHfqWD1BThDqoGDQM4d6QOBWhAdoTs6inSwcs6YZXxNuLt6Vhk7E/w400-h300/shadows.png" width="400" /></a></div><br /><p><br /><br /></p>Berlin Brown Discussionshttp://www.blogger.com/profile/14524539202704556506noreply@blogger.com0tag:blogger.com,1999:blog-6469693320219923273.post-69983693991288826942023-12-25T09:53:00.002-05:002023-12-28T16:05:36.326-05:00Opening up this blog again<p> See my posts here and twitter.</p><p>Here is a poem for you.</p><p>The chaos lives among us</p><p>For the chaos is real</p><p>The math is real<br /><br />twitter/x:<br /><br />https://twitter.com/BerlinBrownMech</p>Berlin Brown Discussionshttp://www.blogger.com/profile/14524539202704556506noreply@blogger.com0tag:blogger.com,1999:blog-6469693320219923273.post-26766150067215717562017-04-14T11:02:00.004-04:002017-04-14T11:02:48.399-04:00On Unit Testing, Java TDD for developers to writeIt has been a while, let's kick off 2017 with a blog entry.<br />
<br />
<span style="color: rgba(0, 0, 0, 0.701961); font-family: "Source Serif Pro", serif; font-size: 21px;">I have read and I am reading about four or five posts a day about unit testing. It really has been a long time obsession for me. I have moved past the technical and practical considerations on unit testing frameworks and done with the debates with "should you use Junit or Mockito or Karma?" I am more interested in the psychology of unit testing, who does it, likes it, hates it? It really is one of those easy to learn, hard to master concepts. For example, many many may play chess when they are young and can end up being horribly chess players most of their life, I am part of that majority. Unfortunately, I have never played chess and sat down for hours and tried to master it. I never see the common patterns or have a developed end game. I mostly just play with a knowledge of the basic rules. Following good unit testing practices within your software development shop is a lot like playing chess. It is easy to learn and difficult master. Actually, there are a lot of big differences, chess is a game, chess is not coding, and people take their software development very seriously. So if you don't master unit testing, but are able to complete your job tasks, some might argue that is an acceptable risk in the world of software development. And why master chess or master unit testing? If developers are fine without unit testing, then why even suggest it. Some developers just don't want to invest the energy to master the practice. And in some development shops, there is no hard requirement to do so.</span><br />
<span style="color: rgba(0, 0, 0, 0.701961); font-family: "Source Serif Pro", serif; font-size: 21px;"><br /></span>
<span style="color: rgba(0, 0, 0, 0.701961); font-family: "Source Serif Pro", serif; font-size: 21px;">I am not going to convince you to write unit tests with this one post, I will leave that up to software guru Martin Fowler and the people at ThoughtWorks who have written large tomes on the subject. But I will present my thoughts on why some developers won't write unit tests but why they should. Those developers and architects that do advocate unit testing generally fall into that category where they have written just enough unit tests to find it useful and they generally love the practice, they also encourage others to follow along. I am sort of in that camp, I have almost become religious about it. I can't imagine my real code without unit tests and I just feel guilty by only testing through manual functional testing.</span><br />
<span style="color: rgba(0, 0, 0, 0.701961); font-family: "Source Serif Pro", serif; font-size: 21px;"><br /></span>
<span style="color: rgba(0, 0, 0, 0.701961); font-family: "Source Serif Pro", serif; font-size: 21px;">Jeff Atwood of Coding Horror wrote a short blog post on the topic, "I Pity the Fool Who Doesn't Write Unit Tests". Here is the one blurb that stuck out for me, "Even if you only agree with a quarter of the items on that list-- and I'd say at least half of them are true in my experience-- that is a huge step forward for software developers". And this one, "It's more fun to code with them than without". That is the essence of this unit testing religion, we can't force it on developers and we can't force developers to write unit tests only a certain way. I and many others don't believe in the practice of 100% coverage. You will rarely get there anyway, depending on the project or company. Some will argue that you shouldn't break the rule on non-determinism and this is a big one. Basically, the unit test should return the same output every time you run the test. You should avoid breaking this rule for unit tests but you can still write and add automated integration tests to your suite and not waste time, combine a collection of unit tests and integration tests. A simple integration test might test connecting to your REST microservice and validating the HTTP status code. At that point, your test moves into the integration testing category. If you connect to the database, run a particular SQL statement and validate data model returned from the SQL invocation, then your test is basically integration. Both scenarios are not units are non-deterministic but I would still consider them to be useful. Also, as a start for new developers getting familiar with unit testing, writing integration tests may be more familiar to them than decomposing or refactoring their code for a real unit test. There is a benefit in database or HTTP integration tests, you can add them to a test suite and run them in a automated form after a code change and after a build. Even bad tests can be useful.</span><br />
<span style="color: rgba(0, 0, 0, 0.701961); font-family: "Source Serif Pro", serif; font-size: 21px;"><br /></span>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: rgba(0, 0, 0, 0.701961); font-family: "Source Serif Pro", serif; font-size: 21px; font-stretch: inherit; font-variant-numeric: inherit; line-height: 32px; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
Misko Hevery is creator of one of the most popular JavaScript frameworks to emerge in the last couple of years. It is a Google project that he started working as an Agile Coach. As he puts it, he wants to maintain the high level of automated testing culture at Google. Most of his published articles are not about AngularJs but on the benefits of automated testing. I can only imagine that he developed the MVC JavaScript framework because the old crop of frameworks were a pain to work with for developers. They were not testable.</div>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: rgba(0, 0, 0, 0.701961); font-family: "Source Serif Pro", serif; font-size: 21px; font-stretch: inherit; font-variant-numeric: inherit; line-height: 32px; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
I have given my advocacy speech on unit testing, but how do I use it, what practices do I follow?</div>
<ul style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: rgba(0, 0, 0, 0.701961); font-family: "Source Serif Pro", serif; font-size: 21px; font-stretch: inherit; font-variant-numeric: inherit; line-height: 32px; list-style-image: initial; list-style-position: initial; margin: 3.2rem 0px; outline: 0px; padding: 0px; vertical-align: baseline;">
<li style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 2.4rem 0px 2.4rem 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;">For every piece of new code, I formulate a unit test case. New code could include my model structure or interface into my Java services. This is critical, unit testing encourages you to write testable early code. Meaning, I try to use interfaces and abstract classes which allow me to inject mock objects early in the development process.</li>
<li style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 2.4rem 0px 2.4rem 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;">For local development, I can build, write code, write and update my unit tests and then run the automated suite of tests. The key part is re-running the test suite. Normally I want my unit tests to pass, if they don't pass then I can look at my code and refactor. Also, the code I write today, I can run a year from now, I should expect the same result.</li>
<li style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 2.4rem 0px 2.4rem 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;">As you are writing your unit tests. Have fun, this is not production code, the unit tests don't run in production, you can test input as little or as much as possible.</li>
<li style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 2.4rem 0px 2.4rem 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;">I try to avoid unit tests around code that doesn't do anything. Write unit tests around your modules that have some kind of behavior. We shouldn't write model POJO code with setters and getters, but there is no reason to test a setter method. It is more fun to code around the real functionality.</li>
<li style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 2.4rem 0px 2.4rem 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;">Writing unit tests also encourages the developer to write testable code</li>
<li style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 2.4rem 0px 2.4rem 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;">Write Java code that doesn't use static methods or variables. Imagine that, try writing code that doesn't make use of the static keyword. Why would you do this? Static, class level routines are procedural and inherently hard to test. You can override their functionality, they are completely class level.</li>
<li style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 2.4rem 0px 2.4rem 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;">Writing unit tests encourages refactoring. Some refactoring may include the use of OOP techniques. Use interfaces and abstract classes.</li>
<li style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 2.4rem 0px 2.4rem 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;">Use a DI/Dependency Injection framework like AngularJS (yea I called AngularJS DI), Spring or Guice. DI frameworks encourages the container to create new objects for you. Managing objects on your own and using the 'new' operator encourages untestable code.</li>
</ul>
<div style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; color: rgba(0, 0, 0, 0.701961); font-family: "Source Serif Pro", serif; font-size: 21px; font-stretch: inherit; font-variant-numeric: inherit; line-height: 32px; margin-bottom: 3.2rem; margin-top: 3.2rem; outline: 0px; padding: 0px; vertical-align: baseline;">
In Summary, see what Jeff Atwood, Martin Fowler and Misko Hevery have said about Unit Testing. And we pity the fool that don't do it.</div>
Berlin Brown Discussionshttp://www.blogger.com/profile/14524539202704556506noreply@blogger.com0tag:blogger.com,1999:blog-6469693320219923273.post-89751521216383348712014-05-08T20:09:00.001-04:002014-05-08T20:09:20.792-04:00This is my XSS hack servlet<!-- HTML generated using hilite.me --><div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><table><tr><td><pre style="margin: 0; line-height: 125%"> 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31</pre></td><td><pre style="margin: 0; line-height: 125%"><span style="color: #008800; font-weight: bold">public</span> <span style="color: #008800; font-weight: bold">class</span> <span style="color: #BB0066; font-weight: bold">SimpleServletXSS</span> <span style="color: #008800; font-weight: bold">extends</span> HttpServlet <span style="color: #333333">{</span>
<span style="color: #008800; font-weight: bold">private</span> <span style="color: #008800; font-weight: bold">static</span> <span style="color: #008800; font-weight: bold">final</span> <span style="color: #333399; font-weight: bold">long</span> serialVersionUID <span style="color: #333333">=</span> <span style="color: #0000DD; font-weight: bold">1L</span><span style="color: #333333">;</span>
<span style="color: #555555; font-weight: bold">@Override</span>
<span style="color: #008800; font-weight: bold">public</span> <span style="color: #333399; font-weight: bold">void</span> <span style="color: #0066BB; font-weight: bold">doGet</span><span style="color: #333333">(</span><span style="color: #008800; font-weight: bold">final</span> HttpServletRequest request<span style="color: #333333">,</span> <span style="color: #008800; font-weight: bold">final</span> HttpServletResponse response<span style="color: #333333">)</span> <span style="color: #008800; font-weight: bold">throws</span> ServletException<span style="color: #333333">,</span> IOException <span style="color: #333333">{</span>
doPost<span style="color: #333333">(</span>request<span style="color: #333333">,</span> response<span style="color: #333333">);</span>
<span style="color: #333333">}</span>
<span style="color: #555555; font-weight: bold">@Override</span>
<span style="color: #008800; font-weight: bold">public</span> <span style="color: #333399; font-weight: bold">void</span> <span style="color: #0066BB; font-weight: bold">doPost</span><span style="color: #333333">(</span><span style="color: #008800; font-weight: bold">final</span> HttpServletRequest request<span style="color: #333333">,</span> <span style="color: #008800; font-weight: bold">final</span> HttpServletResponse response<span style="color: #333333">)</span> <span style="color: #008800; font-weight: bold">throws</span> ServletException<span style="color: #333333">,</span> IOException <span style="color: #333333">{</span>
<span style="color: #008800; font-weight: bold">final</span> StringBuffer buf <span style="color: #333333">=</span> <span style="color: #008800; font-weight: bold">new</span> StringBuffer<span style="color: #333333">();</span>
<span style="color: #008800; font-weight: bold">final</span> String method <span style="color: #333333">=</span> request<span style="color: #333333">.</span><span style="color: #0000CC">getMethod</span><span style="color: #333333">();</span>
buf<span style="color: #333333">.</span><span style="color: #0000CC">append</span><span style="color: #333333">(</span><span style="background-color: #fff0f0">"<html><head>\n<!-- HEAD -->\n</head>\n <body> <br /> <form method='post' action='SimpleServletXSS'>\n<textarea cols='40' rows='5' name='hack1'> &lt;script&gt; alert(\"XSS\");&lt;/script&gt; </textarea> <br /> <textarea cols='40' rows='5' name='hack2'>&lt;script&gt; alert(\"XSS\"); &lt;/script&gt; </textarea> \n<!-- DATA -->\n"</span><span style="color: #333333">);</span>
buf<span style="color: #333333">.</span><span style="color: #0000CC">append</span><span style="color: #333333">(</span><span style="background-color: #fff0f0">"<br /><input type='submit' value='SUBMIT'>"</span><span style="color: #333333">);</span>
buf<span style="color: #333333">.</span><span style="color: #0000CC">append</span><span style="color: #333333">(</span><span style="background-color: #fff0f0">"</form></body></html>"</span><span style="color: #333333">);</span>
<span style="color: #008800; font-weight: bold">final</span> String html <span style="color: #333333">=</span> buf<span style="color: #333333">.</span><span style="color: #0000CC">toString</span><span style="color: #333333">();</span>
<span style="color: #008800; font-weight: bold">final</span> PrintWriter out <span style="color: #333333">=</span> response<span style="color: #333333">.</span><span style="color: #0000CC">getWriter</span><span style="color: #333333">();</span>
<span style="color: #008800; font-weight: bold">if</span> <span style="color: #333333">(</span><span style="background-color: #fff0f0">"GET"</span><span style="color: #333333">.</span><span style="color: #0000CC">equalsIgnoreCase</span><span style="color: #333333">(</span>method<span style="color: #333333">))</span> <span style="color: #333333">{</span>
out<span style="color: #333333">.</span><span style="color: #0000CC">println</span><span style="color: #333333">(</span>html<span style="color: #333333">);</span>
<span style="color: #333333">}</span> <span style="color: #008800; font-weight: bold">else</span> <span style="color: #008800; font-weight: bold">if</span> <span style="color: #333333">(</span><span style="background-color: #fff0f0">"POST"</span><span style="color: #333333">.</span><span style="color: #0000CC">equalsIgnoreCase</span><span style="color: #333333">(</span>method<span style="color: #333333">))</span> <span style="color: #333333">{</span>
<span style="color: #008800; font-weight: bold">final</span> String head <span style="color: #333333">=</span> request<span style="color: #333333">.</span><span style="color: #0000CC">getParameter</span><span style="color: #333333">(</span><span style="background-color: #fff0f0">"hack1"</span><span style="color: #333333">);</span>
<span style="color: #008800; font-weight: bold">final</span> String data <span style="color: #333333">=</span> request<span style="color: #333333">.</span><span style="color: #0000CC">getParameter</span><span style="color: #333333">(</span><span style="background-color: #fff0f0">"hack2"</span><span style="color: #333333">);</span>
System<span style="color: #333333">.</span><span style="color: #0000CC">out</span><span style="color: #333333">.</span><span style="color: #0000CC">println</span><span style="color: #333333">(</span>head<span style="color: #333333">);</span>
System<span style="color: #333333">.</span><span style="color: #0000CC">out</span><span style="color: #333333">.</span><span style="color: #0000CC">println</span><span style="color: #333333">(</span>data<span style="color: #333333">);</span>
out<span style="color: #333333">.</span><span style="color: #0000CC">println</span><span style="color: #333333">(</span>html<span style="color: #333333">.</span><span style="color: #0000CC">replaceAll</span><span style="color: #333333">(</span><span style="background-color: #fff0f0">"<!-- HEAD -->"</span><span style="color: #333333">,</span> head<span style="color: #333333">).</span><span style="color: #0000CC">replaceAll</span><span style="color: #333333">(</span><span style="background-color: #fff0f0">"<!-- DATA -->"</span><span style="color: #333333">,</span> data<span style="color: #333333">));</span>
<span style="color: #333333">}</span> <span style="color: #008800; font-weight: bold">else</span> <span style="color: #333333">{</span>
<span style="color: #008800; font-weight: bold">throw</span> <span style="color: #008800; font-weight: bold">new</span> <span style="color: #0066BB; font-weight: bold">ServletException</span><span style="color: #333333">(</span><span style="background-color: #fff0f0">"Error"</span><span style="color: #333333">);</span>
<span style="color: #333333">}</span>
<span style="color: #333333">}</span>
<span style="color: #333333">}</span>
</pre></td></tr></table></div>
<br />
}<br />
<div>
<br /></div>
Berlin Brown Discussionshttp://www.blogger.com/profile/14524539202704556506noreply@blogger.com0tag:blogger.com,1999:blog-6469693320219923273.post-77115108503158939602013-02-07T20:35:00.000-05:002013-02-07T20:35:07.294-05:00Wolfram's Cellular Automata, A New Kind of Science and Example Squaring Rule (2)<a href="http://1.bp.blogspot.com/_syI_yyzTPG8/TSv2pRqWIVI/AAAAAAAAAe8/NDvfZ7k-cis/s1600/image_snow_atlanta.JPG"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5560809353895092562" src="http://1.bp.blogspot.com/_syI_yyzTPG8/TSv2pRqWIVI/AAAAAAAAAe8/NDvfZ7k-cis/s400/image_snow_atlanta.JPG" style="cursor: hand; cursor: pointer; display: block; height: 400px; margin: 0px auto 10px; text-align: center; width: 386px;" /></a><br />
<span style="font-weight: bold;">Overview - Playing the Game Of Life</span><br />
<br />
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 <span style="font-weight: bold;">xor $0x100, eax</span> 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 together and logic replicated to load programs into memory and then execute. The rules that control most digital devices are based on elementary Boolean rules. Cellular automata has a similar bottom-up approach, rules consist of simple programs (as Stephen Wolfram calls them) that apply to a set of cells on a grid.<br />
<a href="http://3.bp.blogspot.com/_syI_yyzTPG8/TS0KJBfXFiI/AAAAAAAAAfc/_ViKvRZaOl8/s1600/spi_vhdl_example_output.png"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5561112265007502882" src="http://3.bp.blogspot.com/_syI_yyzTPG8/TS0KJBfXFiI/AAAAAAAAAfc/_ViKvRZaOl8/s400/spi_vhdl_example_output.png" style="cursor: hand; cursor: pointer; display: block; height: 202px; margin: 0px auto 10px; text-align: center; width: 400px;" /></a><br />
<br />
Conway's Game of Life cellular automaton is one of the most prominent examples of cellular automata theory. The one dimensional program consists of a cell grid typically with several dozen or more rows and similar number of columns. Each cell on the grid has an on or off Boolean state. Every cell on the grid survives or dies to the next generation depending on the game of life rules. If there are too many neighbors surrounding a cell then the cell dies due to overcrowding. If there is only one neighbor cell, the base cell dies due to under-population. Activity on a particular cell is not interesting but when you run the entire system for many generations, a group of patterns begin to form.<br />
<br />
<span style="font-weight: bold;">More on Conway's Game of Life</span><br />
<br />
<a href="http://3.bp.blogspot.com/_syI_yyzTPG8/TSvw3gvLd-I/AAAAAAAAAes/4MitZvmuaL8/s1600/game_of_life_image1.png"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5560803001390299106" src="http://3.bp.blogspot.com/_syI_yyzTPG8/TSvw3gvLd-I/AAAAAAAAAes/4MitZvmuaL8/s400/game_of_life_image1.png" style="cursor: hand; cursor: pointer; display: block; height: 245px; margin: 0px auto 10px; text-align: center; width: 400px;" /></a><br />
<br />
<br />
<center>
<span style="font-size: 11px; font-style: italic;">Figure: Game of Life Output</span></center>
<br />
You may notice some common patterns in the figure. After so many iterations through the game of life rules, only a few cells tend to stay alive. We started with a large random number of alive cells and over time those cells died off. In a controlled environment you may begin with carefully placed live cells and monitor the patterns that emerge to model some other natural phenomena.<br />
<a href="http://4.bp.blogspot.com/_syI_yyzTPG8/TSvx4MjmQCI/AAAAAAAAAe0/bcDZeff1N6Y/s1600/game_of_life_rules.png"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5560804112664510498" src="http://4.bp.blogspot.com/_syI_yyzTPG8/TSvx4MjmQCI/AAAAAAAAAe0/bcDZeff1N6Y/s400/game_of_life_rules.png" style="cursor: hand; cursor: pointer; display: block; height: 295px; margin: 0px auto 10px; text-align: center; width: 395px;" /></a><br />
<br />
<br />
<center>
<span style="font-size: 11px; font-style: italic;">Figure: Common Game of Life Surviving and Oscillating Patterns</span></center>
<br />
<br />
<span style="font-weight: bold;">A New Kind of Science</span><br />
<br />
The name Stephan Wolfram has been mentioned several times in this post. He is the founder of Wolfram|Research, his company is known for the popular Mathematica software suite and Wolfram|Alpha knowledge engine. He did not initially discover cellular automata but recently he has been a prominent figure in its advocacy. He spent 10 years working on his book, A New Kind of Science. In the 1300 page tome, he discusses how cellular automata can be applied to every field of science from biology to physics. NKA is a detailed study of cellular automata programs.<br />
<br />
<span style="font-weight: bold;">Basic Cellular Automata</span><br />
<br />
<a href="http://2.bp.blogspot.com/_syI_yyzTPG8/TSv5J-_9lNI/AAAAAAAAAfM/DKgwmLwnQOA/s1600/ElementaryCA30Rules_750.gif"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5560812114844423378" src="http://2.bp.blogspot.com/_syI_yyzTPG8/TSv5J-_9lNI/AAAAAAAAAfM/DKgwmLwnQOA/s400/ElementaryCA30Rules_750.gif" style="cursor: hand; cursor: pointer; display: block; height: 57px; margin: 0px auto 10px; text-align: center; width: 400px;" /></a><br />
<br />
<br />
<center>
<span style="font-size: 11px; font-style: italic;">Figure: Wolfram's Elementary CA Rule 30. Look at 3 bit input and 1 bit output.</span></center>
<br />
<br />
The diagram above depicts the rule 30 program (or rule 30 elementary cellular automaton). There are 8 input states (2 ^ 3) and an output state of one or zero. If you look at the diagram from left to right. The first sequence of blocks on the left depict an input state of { 1 1 1 } with an output of 0. Given input of cells { 1 1 1}, the output will be set to 0. Subsequently, the next set of blocks consist of an input state of { 1 1 0 } with an output of 0.<br />
<br />
Here is python pseudo code for processing rule30 input:<br />
<pre style="background-color: #f3e9f3; font-size: 11px;">def rule30(inputCell_0, inputCell_1, inputCell_1): {
if inputCell_0 == 1 and inputCell_1 == 1 and inputCell_2 == 1
return 0:
else if inputCell_0 == 1 and inputCell_1 == 1 and inputCell_2 == 0:
return 0:
...
}
grid = new Grid(100, 100)
grid[row0, col50] = 1 # Enable first cell on row zero
for j until 100:
for i until 100:
valsForNextRow[i] = rule30(inputLastRow[i - 1], inputLastRow[i], inputLastRow[i + 1])</pre>
<br />
<br />
<pre style="background-color: #f3e9f3; font-size: 11px;">Example of first three cases using a boolean notation:
{ 1 1 1 } -> 0
{ 1 1 0 } -> 0
{ 1 0 1 } -> 0
...
Example of first few cases with Scala programming language:
class CellularAutomataRule extends Rule {
def rule(inputState:(Int, Int, Int)) : Rules.Output =
inputState match {
case (1, 1, 1) => 0
case (1, 1, 0) => 0
case (1, 0, 1) => 0
case (1, 0, 0) => 1
...
}
} // End of Rule</pre>
<br />
<br />
<br />
<center>
<span style="font-size: 11px; font-style: italic;">Figure: Scala Example with pattern matching</span></center>
<br />
<br />
<a href="http://2.bp.blogspot.com/_syI_yyzTPG8/TSz_BBVz7GI/AAAAAAAAAfU/ZMZmUPpCeio/s1600/input_rules_2.png"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5561100032900590690" src="http://2.bp.blogspot.com/_syI_yyzTPG8/TSz_BBVz7GI/AAAAAAAAAfU/ZMZmUPpCeio/s400/input_rules_2.png" style="cursor: hand; cursor: pointer; display: block; height: 168px; margin: 0px auto 10px; text-align: center; width: 300px;" /></a><br />
<br />
<br />
<center>
<span style="font-size: 11px; font-style: italic;">Figure: Elementary Automata Grid after several iterations, look at image from top to bottom</span></center>
<br />
<br />
<span style="font-weight: bold;">Cellular Automata and Squaring Application</span><br />
<br />
<span style="font-weight: bold;">How do you square two numbers?</span><br />
<br />
With most popular programming languages you could use infix notation providing an input parameter on the left and an input parameter on the right side of some arithmetic function. With Java, you might write the following code:<br />
<pre>int x = 4 * 4;
Output : 16</pre>
<br />
The above snippet is valid code used to multiply four times four with a result of sixteen but it does not say much about the native implementation of the multiplication operator. There are many layers involved with that particular function but they aren't visible to the developer. Is the function implemented and optimized by the compiler or implemented by the runtime environment? It is possible that the operating system may cache the result or build an implementation for the arithmetic operation. Ultimately for most basic integer multiplication or addition, those operations are performed at the hardware level. So how then does the hardware do it?<br />
<br />
In the figure depicted below is an AND gate and truth table, the gate takes two Boolean input values and returns the output AND operation. If one is entered in input A and zero is entered into input B, then the output C returned by the AND gate is one. An arithmetic logic unit may perform basic Boolean operations or possibly some form of basic arithmetic. An ALU may consist of AND, XOR and other similar simple gates combined to ultimately perform basic arithmetic, increment, decrement or jump operations. (Most of my comments focus on older generation basic circuits, modern circuit design may not use such techniques or basic components)<br />
<br />
<a href="http://1.bp.blogspot.com/_syI_yyzTPG8/TSvgqJWDstI/AAAAAAAAAeM/VjJaQXtTq8I/s1600/and_gate_example.JPG"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5560785179586573010" src="http://1.bp.blogspot.com/_syI_yyzTPG8/TSvgqJWDstI/AAAAAAAAAeM/VjJaQXtTq8I/s320/and_gate_example.JPG" style="cursor: hand; cursor: pointer; display: block; height: 115px; margin: 0px auto 10px; text-align: center; width: 246px;" /></a><br />
<br />
<br />
<center>
<span style="font-size: 11px; font-style: italic;">Figure: Boolean AND Gate, InputA, B and Output</span></center>
<br />
<br />
If you start from that basic piece of Java code 4 * 4, there are many levels of software and hardware layers that are involved to implement that operation and then return a result.<br />
<br />
I wanted to present basic Boolean arithmetic so that you can see how basic rules can lead to more complex patterns and behavior. One two input AND gate will generate a Boolean result. Several million logic circuits may be used to build a complete CPU. You may already be familiar with the Conway's game of life, an initial grid is created with a random number of initial live cells. We can use a simple cellular automata program to square two integers use the rules described in Wolfram's A New Kind of Science. After so many iterations, a common pattern will emerge and that pattern holds the result of N * N. In our squaring example we started with the input number of enabled cells (N = 4) and after so many iterations a pattern emerged that contained the squaring of the input. In many of Wolfram's Elementary rules, a binary sequence is used for input and output. With the general CA squaring rule, an input and output number ranging from 0 to 7 are defined for each cell.<br />
<br />
<span style="font-weight: bold;">Squaring Rule</span><br />
<a href="http://2.bp.blogspot.com/_syI_yyzTPG8/TSvoIPYQXWI/AAAAAAAAAec/rs5HE89DPY0/s1600/cellular_squaring_automata.png"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5560793393183874402" src="http://2.bp.blogspot.com/_syI_yyzTPG8/TSvoIPYQXWI/AAAAAAAAAec/rs5HE89DPY0/s320/cellular_squaring_automata.png" style="cursor: hand; cursor: pointer; display: block; height: 320px; margin: 0px auto 10px; text-align: center; width: 220px;" /></a><br />
<br />
<br />
<center>
<span style="font-size: 11px; font-style: italic;">Figure: Applet Visual Output Grid for Squaring Cellular Automata</span></center>
<br />
<pre style="background-color: #f3f3d1; font-size: 11px;">CellularAutomaton[{
{ 0, Blank[], 3} -> 0,
{ Blank[], 2, 3} -> 3,
{ 1, 1, 3 } -> 4,
{ Blank[], 1, 4} -> 4,
{ Alternatives[1, 2], 3, Blank[]} -> 5,
{ Pattern[$`p, Alternatives[0, 1]], 4, Blank[]} -> 7 - $`p,
{ 7, 2, 6} -> 3,
{ 7, Blank[], Blank[]} -> 7,
{ Blank[], 7, Pattern[$`p, Alternatives[1, 2]]} -> $`p,
{ Blank[], Pattern[$`p, Alternatives[5, 6]], Blank[]} -> 7 - $`p,
{ Alternatives[5, 6], Pattern[$`p, Alternatives[1, 2]], Blank[]} -> 7 - $`p,
{ Alternatives[5, 6], 0, 0} -> 1,
{ Blank[], Pattern[$`p, Alternatives[1, 2]], Blank[]} -> $`p,
{ Blank[], Blank[], Blank[]} -> 0}, {
...
Append[Table[1, {$CellContext`n$$}], 3], 0},
Table -> Expression to N
Append -> Table to 3</pre>
<br />
<br />
<br />
<center>
<span style="font-size: 11px; font-style: italic;">Figure: Notebook Source File For Mathematica, General CA Rule for Squaring Automaton</span></center>
<br />
<br />
The general rules for the squaring automaton are similar to the rules that were mentioned for the elementary rule30 program. Integer values (range 0 - 7) are used instead of binary inputs and outputs. The initial row and initial number of cells are represented by the input parameter (N = 4 in our example).<br />
<pre style="background-color: #f3e9f3; font-size: 11px;">Example Row: 0 0 0 0 0 3 3 3 3 1 0 0 0 0 </pre>
<br />
Besides the first row, the initial grid contains all zeros. On the next sequence, the CA rule for squaring is run against each cell on the second row. On the sequence after that, the CA rule is run against the third row and so on until the last row in the grid has been reached. With a 100 x 100 grid, the output pattern will emerge before row 100 is reached.<br />
<pre style="background-color: #f3e9f3; font-size: 11px;">class SquaringRule extends Rules.GeneralRule {
def ruleId() = 132
def rule(inputState:Rules.RuleInput) : Rules.Output =
inputState match {
case (0, _, 3) => 0
case (_, 2, 3) => 3
case (1, 1, 3) => 4
case (_, 1, 4) => 4
case (1 | 2, 3, _) => 5
case (0 | 1, 4, _) => 7 - inputState._1
case (7, 2, 6) => 3
case (7, _, _) => 7
case (_, 7, 1 | 2) => inputState._3
case (_, 5 | 6, _) => 7 - inputState._2
case (5 | 6, 1 | 2, _) => 7 - inputState._2
case (5 | 6, 0, 0) => 1
case (_, 1 | 2, _) => inputState._2
case _ => 0
}
} // End of Rule</pre>
<br />
<br />
<br />
<center>
<span style="font-size: 11px; font-style: italic;">Figure: Scala Source for Squaring Rule uses Pattern Matching</span></center>
<br />
<br />
<span style="font-weight: bold;">Applied Cellular Automata</span><br />
<br />
Cellular automata is often used with data compression, cryptography, artificial intelligence, urban planning, financial market modeling, music generation, and 3D terrain generation. If you are a software engineer, you may have to step back and consider how cellular automata patterns emerge and understand the nature of the dynamic system before looking for a typical software library. CA is not normally seen in everyday applications. Consider this when you look at some random pattern, don't think of the phenomenon as a random sequence of events that cannot be replicated, think of the event in terms of a cellular automaton. Try to imagine the rules that could model that natural behavior. Modeling seemingly random patterns is an area where cellular automata is being widely used. Urban planning departments are integrating geographic information systems (GIS) with cellular automata in an attempt to predict growth in an area of a city.<br />
<br />
<span style="font-weight: bold;">Summary</span><br />
<br />
The simple squaring example mentioned in this post merely gives you an overview of a basic cellular automata system. Scientists, biologists, computer scientists and software engineers want to find better ways to observe relationships and patterns that occur in our world. Review Stephen Wolfram's A New Kind of Science to give you an idea for what is possible with seemingly simple rules.<br />
<br />
<span style="font-weight: bold;">Source Code and Applet</span><br />
<br />
1. <a href="http://code.google.com/p/doingitwrongnotebook/wiki/CelluarAutomataSquaringApplet">doingitwrongnotebook/wiki/CelluarAutomataSquaringApplet</a><br />
2. <a href="http://doingitwrongnotebook.googlecode.com/svn/trunk/doingitwrong_phase2/scala2/GameOfLife/src/main/java/org/berlin/automata/squaring/">SVN source repository directory</a><br />
3. <a href="http://code.google.com/p/ainotebook/wiki/CelluarAutomataApplet">CelluarAutomataApplet - Test of Elementary Rules</a><br />
4. <a href="http://code.google.com/p/doingitwrongnotebook/wiki/GameOfLifeAppletScala">Game of Life Applet</a><br />
5. <a href="http://ainotebook.googlecode.com/files/automata_scala1.zip">Full Download Applet Examples (keywords: Scala, Rule30, Rule190, GameOfLife, Wolfram Squaring Rule)</a><br />
<br />
<a href="http://3.bp.blogspot.com/_syI_yyzTPG8/TSv4cdz4MmI/AAAAAAAAAfE/xz7w05JbENU/s1600/cellular_squaring_automata3.png"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5560811332841255522" src="http://3.bp.blogspot.com/_syI_yyzTPG8/TSv4cdz4MmI/AAAAAAAAAfE/xz7w05JbENU/s400/cellular_squaring_automata3.png" style="cursor: hand; cursor: pointer; display: block; height: 400px; margin: 0px auto 10px; text-align: center; width: 255px;" /></a><br />
<br />
<center>
<span style="font-size: 11px; font-style: italic;">Figure: Squaring Cellular Automaton Output, Input = 4 (top of grid), Output = 16 (pattern towards the bottom)</span></center>
<br />
<span style="font-weight: bold;">Resources</span><br />
1. <a href="http://www.wolframscience.com/">http://www.wolframscience.com/</a><br />
2. <a href="http://www.scala-lang.org/">http://www.scala-lang.org/ - Scala Programming Language</a><br />
<br />
--- Berlin Brown (2012)Berlin Brown Discussionshttp://www.blogger.com/profile/14524539202704556506noreply@blogger.com0tag:blogger.com,1999:blog-6469693320219923273.post-4721209739380704902013-01-29T18:26:00.002-05:002013-01-29T18:26:30.719-05:00Internals of the OpenJDK - HashMapHere is the implementation of HashMap from OpenJDK 6. It is interesting how simple it truly is. Essentially HashMap consists of an array called 'table'. On the 'put' call, we use the hashcode of the key and then call another hash function, then convert that into an index into the array. Place the 'value' object at the index array position.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-u_jpjN-xTIc/UQhacZnMxpI/AAAAAAAAA54/bByMg1wiWdU/s1600/screenshot_hashmap_jdk.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="640" src="http://4.bp.blogspot.com/-u_jpjN-xTIc/UQhacZnMxpI/AAAAAAAAA54/bByMg1wiWdU/s640/screenshot_hashmap_jdk.png" width="606" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">OpenJDK HashMap Implementation</td></tr>
</tbody></table>
<br />Berlin Brown Discussionshttp://www.blogger.com/profile/14524539202704556506noreply@blogger.com0tag:blogger.com,1999:blog-6469693320219923273.post-34771240059056771352012-12-21T09:05:00.001-05:002012-12-21T09:38:49.396-05:00Basic word frequency analysisHere are some interesting terms in the Democratic presidential debate from 2008:<br />
<br />
I believe we're at a defining moment in our history. Our nation is at war; our planet is in peril....<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-Xr0UYd7T8jE/UNRsnNPKfAI/AAAAAAAAA4g/WTovu1AbAiQ/s1600/dem_debate_hist.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="http://3.bp.blogspot.com/-Xr0UYd7T8jE/UNRsnNPKfAI/AAAAAAAAA4g/WTovu1AbAiQ/s640/dem_debate_hist.png" width="640" /></a></div>
<br />
-------------------------------<br />
<br />
Total Count of most terms : 9125<br />
Interesting Word Freq Count: 1952<br />
-------------------------------<br />
id=1 ct=112(39.16%) term=think<br />
id=2 ct=101(35.31%) term=applause<br />
id=3 ct=97(33.92%) term=clinton<br />
id=4 ct=97(33.92%) term=people<br />
id=5 ct=85(29.72%) term=senator<br />
id=6 ct=66(23.08%) term=health<br />
id=7 ct=62(21.68%) term=obama<br />
id=8 ct=56(19.58%) term=care<br />
id=9 ct=56(19.58%) term=blitzer<br />
id=10 ct=47(16.43%) term=right<br />
id=11 ct=44(15.38%) term=president<br />
id=12 ct=40(13.99%) term=country<br />
id=13 ct=35(12.24%) term=make<br />
id=14 ct=34(11.89%) term=plan<br />
id=15 ct=32(11.19%) term=question<br />
id=16 ct=30(10.49%) term=believe<br />
id=17 ct=30(10.49%) term=important<br />
id=18 ct=28(9.79%) term=issue<br />
id=19 ct=28(9.79%) term=take<br />
id=20 ct=27(9.44%) term=time<br />
id=21 ct=26(9.09%) term=years<br />
id=22 ct=26(9.09%) term=american<br />
id=23 ct=25(8.74%) term=first<br />
id=24 ct=24(8.39%) term=insurance<br />
id=25 ct=23(8.04%) term=bush<br />
id=26 ct=23(8.04%) term=part<br />
id=27 ct=21(7.34%) term=iraq<br />
id=28 ct=20(6.99%) term=year<br />
id=29 ct=20(6.99%) term=million<br />
id=30 ct=19(6.64%) term=need<br />
id=31 ct=19(6.64%) term=united<br />
id=32 ct=19(6.64%) term=states<br />
id=33 ct=18(6.29%) term=over<br />
id=34 ct=18(6.29%) term=able<br />
id=35 ct=17(5.94%) term=change<br />
id=36 ct=17(5.94%) term=immigration<br />
id=37 ct=17(5.94%) term=trying<br />
id=38 ct=17(5.94%) term=work<br />
id=39 ct=17(5.94%) term=clear<br />
id=40 ct=17(5.94%) term=loo<br />
<br />
Contrast this word frequency data with an Obama and Romney debate in 2012:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-1omLatuwbFE/UNRvIpimLSI/AAAAAAAAA44/MldOBRkhiLI/s1600/obama_romney.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="http://3.bp.blogspot.com/-1omLatuwbFE/UNRvIpimLSI/AAAAAAAAA44/MldOBRkhiLI/s640/obama_romney.png" width="640" /></a></div>
<br />
-------------------------------<br />
Total Count of most terms : 10361<br />
Interesting Word Freq Count: 1853<br />
-------------------------------<br />
id=1 ct=148(40.33%) term=romney<br />
id=2 ct=109(29.70%) term=people<br />
id=3 ct=106(28.88%) term=governor<br />
id=4 ct=102(27.79%) term=president<br />
id=5 ct=101(27.52%) term=make<br />
id=6 ct=89(24.25%) term=obama<br />
id=7 ct=86(23.43%) term=crowley<br />
id=8 ct=72(19.62%) term=jobs<br />
id=9 ct=71(19.35%) term=question<br />
id=10 ct=66(17.98%) term=years<br />
id=11 ct=44(11.99%) term=four<br />
id=12 ct=43(11.72%) term=think<br />
id=13 ct=41(11.17%) term=percent<br />
id=14 ct=40(10.90%) term=country<br />
id=15 ct=40(10.90%) term=energy<br />
id=16 ct=40(10.90%) term=last<br />
id=17 ct=35(9.54%) term=economy<br />
id=18 ct=34(9.26%) term=down<br />
id=19 ct=31(8.45%) term=right<br />
id=20 ct=31(8.45%) term=america<br />
id=21 ct=30(8.17%) term=back<br />
id=22 ct=28(7.63%) term=women<br />
id=23 ct=27(7.36%) term=time<br />
id=24 ct=26(7.08%) term=need<br />
id=25 ct=26(7.08%) term=believe<br />
id=26 ct=26(7.08%) term=able<br />
id=27 ct=26(7.08%) term=good<br />
id=28 ct=26(7.08%) term=million<br />
id=29 ct=25(6.81%) term=folks<br />
id=30 ct=25(6.81%) term=plan<br />
id=31 ct=24(6.54%) term=year<br />
id=32 ct=24(6.54%) term=number<br />
id=33 ct=24(6.54%) term=work<br />
id=34 ct=23(6.27%) term=cant<br />
id=35 ct=23(6.27%) term=american<br />
id=36 ct=23(6.27%) term=done<br />
id=37 ct=23(6.27%) term=small<br />
id=38 ct=23(6.27%) term=place<br />
id=39 ct=23(6.27%) term=part<br />
id=40 ct=22(5.99%) term=over<br />
<br />
And here is the GOP debate:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-fC80_-OzuL4/UNRx5mSmz5I/AAAAAAAAA5I/X7VD_UZLFvg/s1600/gop_debate.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="http://2.bp.blogspot.com/-fC80_-OzuL4/UNRx5mSmz5I/AAAAAAAAA5I/X7VD_UZLFvg/s640/gop_debate.png" width="640" /></a></div>
<br />
<br />
-------------------------------<br />
Total Count of most terms : 12322<br />
Interesting Word Freq Count: 2436<br />
-------------------------------<br />
id=1 ct=156(35.78%) term=king<br />
id=2 ct=103(23.62%) term=people<br />
id=3 ct=97(22.25%) term=right<br />
id=4 ct=93(21.33%) term=president<br />
id=5 ct=80(18.35%) term=question<br />
id=6 ct=74(16.97%) term=states<br />
id=7 ct=73(16.74%) term=government<br />
id=8 ct=57(13.07%) term=think<br />
id=9 ct=52(11.93%) term=need<br />
id=10 ct=51(11.70%) term=john<br />
id=11 ct=51(11.70%) term=governor<br />
id=12 ct=46(10.55%) term=country<br />
id=13 ct=46(10.55%) term=back<br />
id=14 ct=44(10.09%) term=united<br />
id=15 ct=43(9.86%) term=cain<br />
id=16 ct=43(9.86%) term=take<br />
id=17 ct=43(9.86%) term=romney<br />
id=18 ct=42(9.63%) term=hampshire<br />
id=19 ct=42(9.63%) term=paul<br />
id=20 ct=42(9.63%) term=first<br />
id=21 ct=41(9.40%) term=candidates<br />
id=22 ct=40(9.17%) term=jobs<br />
id=23 ct=39(8.94%) term=state<br />
id=24 ct=39(8.94%) term=time<br />
id=25 ct=39(8.94%) term=federal<br />
id=26 ct=38(8.72%) term=pawlenty<br />
id=27 ct=36(8.26%) term=down<br />
id=28 ct=35(8.03%) term=american<br />
id=29 ct=34(7.80%) term=believe<br />
id=30 ct=34(7.80%) term=america<br />
id=31 ct=34(7.80%) term=economy<br />
id=32 ct=33(7.57%) term=years<br />
id=33 ct=32(7.34%) term=obama<br />
id=34 ct=32(7.34%) term=bachmann<br />
id=35 ct=32(7.34%) term=applause<br />
id=36 ct=32(7.34%) term=money<br />
id=37 ct=31(7.11%) term=issue<br />
id=38 ct=31(7.11%) term=thank<br />
id=39 ct=30(6.88%) term=over<br />
id=40 ct=30(6.88%) term=santorum<br />
id=41 ct=30(6.88%) term=look<br />
id=42 ct=29(6.65%) term=program<br />
id=43 ct=28(6.42%) term=work<br />
id=44 ct=26(5.96%) term=things<br />
id=45 ct=26(5.96%) term=care<br />
id=46 ct=25(5.73%) term=make<br />
id=47 ct=25(5.73%) term=percent<br />
id=48 ct=25(5.73%) term=doing<br />
id=49 ct=24(5.50%) term=obamacare<br />
id=50 ct=24(5.50%) term=where<br />
id=51 ct=24(5.50%) term=administration<br />
id=52 ct=24(5.50%) term=national<br />
id=53 ct=24(5.50%) term=private<br />
id=54 ct=24(5.50%) term=other<br />
id=55 ct=23(5.28%) term=republican<br />
id=56 ct=23(5.28%) term=break<br />
id=57 ct=23(5.28%) term=congressman<br />
id=58 ct=23(5.28%) term=tonight<br />
id=59 ct=23(5.28%) term=senator<br />
id=60 ct=23(5.28%) term=questions<br />
id=61 ct=22(5.05%) term=gingrich<br />
id=62 ct=22(5.05%) term=issues<br />
id=63 ct=21(4.82%) term=medicare<br />
id=64 ct=20(4.59%) term=problem<br />
id=65 ct=20(4.59%) term=life<br />
id=66 ct=20(4.59%) term=cant<br />
id=67 ct=20(4.59%) term=wrong<br />
id=68 ct=20(4.59%) term=continue<br />
id=69 ct=20(4.59%) term=party<br />
id=70 ct=20(4.59%) term=tell<br />
id=71 ct=20(4.59%) term=done<br />
id=72 ct=20(4.59%) term=give<br />
id=73 ct=19(4.36%) term=answer<br />
id=74 ct=19(4.36%) term=start<br />
id=75 ct=19(4.36%) term=policy<br />
id=76 ct=19(4.36%) term=congress<br />
id=77 ct=19(4.36%) term=last<br />
id=78 ct=19(4.36%) term=speaker<br />
id=79 ct=18(4.13%) term=thing<br />
id=80 ct=18(4.13%) term=plan<br />
id=81 ct=18(4.13%) term=debate<br />
id=82 ct=18(4.13%) term=point<br />
id=83 ct=17(3.90%) term=shouldnt<br />
id=84 ct=17(3.90%) term=world<br />
id=85 ct=17(3.90%) term=could<br />
id=86 ct=17(3.90%) term=bill<br />
id=87 ct=17(3.90%) term=home<br />
id=88 ct=17(3.90%) term=little<br />
id=89 ct=16(3.67%) term=conversation<br />
id=90 ct=16(3.67%) term=support<br />
id=91 ct=16(3.67%) term=republicans<br />
id=92 ct=16(3.67%) term=didnt<br />
id=93 ct=16(3.67%) term=better<br />
id=94 ct=16(3.67%) term=maybe<br />
id=95 ct=16(3.67%) term=keep<br />
id=96 ct=15(3.44%) term=made<br />
id=97 ct=15(3.44%) term=year<br />
id=98 ct=15(3.44%) term=again<br />
<br />
Here are several job resumes:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-jPavHjw9UvQ/UNRzo0QDD_I/AAAAAAAAA5Y/14KVMbAhyt4/s1600/resume_hist.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="http://3.bp.blogspot.com/-jPavHjw9UvQ/UNRzo0QDD_I/AAAAAAAAA5Y/14KVMbAhyt4/s640/resume_hist.png" width="640" /></a></div>
<br />
<br />
<br />
-------------------------------<br />
Total Count of most terms : 1967<br />
Interesting Word Freq Count: 974<br />
-------------------------------<br />
id=1 ct=38(50.67%) term=software<br />
id=2 ct=21(28.00%) term=linux<br />
id=3 ct=20(26.67%) term=developed<br />
id=4 ct=20(26.67%) term=using<br />
id=5 ct=19(25.33%) term=data<br />
id=6 ct=16(21.33%) term=code<br />
id=7 ct=14(18.67%) term=experience<br />
id=8 ct=13(17.33%) term=engineer<br />
id=9 ct=12(16.00%) term=image<br />
id=10 ct=12(16.00%) term=computer<br />
id=11 ct=11(14.67%) term=java<br />
id=12 ct=10(13.33%) term=programming<br />
id=13 ct=10(13.33%) term=design<br />
id=14 ct=10(13.33%) term=windows<br />
id=15 ct=10(13.33%) term=metrics<br />
id=16 ct=10(13.33%) term=graphics<br />
id=17 ct=9(12.00%) term=languages<br />
id=18 ct=9(12.00%) term=realtime<br />
id=19 ct=9(12.00%) term=over<br />
id=20 ct=9(12.00%) term=maintained<br />
id=21 ct=9(12.00%) term=development<br />
id=22 ct=8(10.67%) term=developer<br />
id=23 ct=8(10.67%) term=used<br />
id=24 ct=8(10.67%) term=algorithms<br />
id=25 ct=8(10.67%) term=machine<br />
id=26 ct=7(9.33%) term=processing<br />
id=27 ct=7(9.33%) term=python<br />
id=28 ct=7(9.33%) term=team<br />
id=29 ct=7(9.33%) term=worked<br />
id=30 ct=7(9.33%) term=helped<br />
id=31 ct=7(9.33%) term=years<br />
id=32 ct=7(9.33%) term=university<br />
id=33 ct=7(9.33%) term=game<br />
id=34 ct=7(9.33%) term=perl<br />
id=35 ct=7(9.33%) term=google<br />
id=36 ct=6(8.00%) term=video<br />
id=37 ct=6(8.00%) term=project<br />
id=38 ct=6(8.00%) term=rendering<br />
id=39 ct=6(8.00%) term=monica<br />
id=40 ct=6(8.00%) term=learning<br />
id=41 ct=6(8.00%) term=senior<br />
id=42 ct=6(8.00%) term=product<br />
id=43 ct=6(8.00%) term=technology<br />
id=44 ct=6(8.00%) term=santa<br />
id=45 ct=6(8.00%) term=application<br />
id=46 ct=6(8.00%) term=engineering<br />
id=47 ct=6(8.00%) term=server<br />
id=48 ct=6(8.00%) term=skills<br />
id=49 ct=6(8.00%) term=shiraz<br />
id=50 ct=6(8.00%) term=research<br />
id=51 ct=5(6.67%) term=advanced<br />
id=52 ct=5(6.67%) term=animation<br />
id=53 ct=5(6.67%) term=applications<br />
id=54 ct=5(6.67%) term=designed<br />
id=55 ct=5(6.67%) term=pipeline<br />
id=56 ct=5(6.67%) term=towards<br />
id=57 ct=5(6.67%) term=port<br />
id=58 ct=5(6.67%) term=optimized<br />
id=59 ct=5(6.67%) term=networking<br />
id=60 ct=5(6.67%) term=audacity<br />
id=61 ct=5(6.67%) term=microsoft<br />
id=62 ct=5(6.67%) term=parallel<br />
id=63 ct=5(6.67%) term=audio<br />
id=64 ct=5(6.67%) term=network<br />
id=65 ct=5(6.67%) term=javascript<br />
id=66 ct=5(6.67%) term=aphrodite<br />
id=67 ct=5(6.67%) term=wrote<br />
id=68 ct=5(6.67%) term=implemented<br />
id=69 ct=5(6.67%) term=technical<br />
id=70 ct=5(6.67%) term=responsible<br />
id=71 ct=5(6.67%) term=custom<br />
id=72 ct=5(6.67%) term=systems<br />
id=73 ct=5(6.67%) term=other<br />
id=74 ct=5(6.67%) term=researched<br />
<div>
<br />
Here is some data on job descriptions:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-TBOShREymFs/UNR0csEfBlI/AAAAAAAAA5g/ZWfJYCjnvMs/s1600/job_desc.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="http://4.bp.blogspot.com/-TBOShREymFs/UNR0csEfBlI/AAAAAAAAA5g/ZWfJYCjnvMs/s640/job_desc.png" width="640" /></a></div>
<br />
<br />
-------------------------------<br />
Total Count of most terms : 918<br />
Interesting Word Freq Count: 479<br />
-------------------------------<br />
id=1 ct=23(92.00%) term=experience<br />
id=2 ct=13(52.00%) term=development<br />
id=3 ct=12(48.00%) term=software<br />
id=4 ct=12(48.00%) term=systems<br />
id=5 ct=10(40.00%) term=design<br />
id=6 ct=9(36.00%) term=security<br />
id=7 ct=8(32.00%) term=java<br />
id=8 ct=8(32.00%) term=skills<br />
id=9 ct=8(32.00%) term=plus<br />
id=10 ct=7(28.00%) term=required<br />
id=11 ct=7(28.00%) term=must<br />
id=12 ct=6(24.00%) term=projects<br />
id=13 ct=6(24.00%) term=computer<br />
id=14 ct=6(24.00%) term=strong<br />
id=15 ct=6(24.00%) term=network<br />
id=16 ct=6(24.00%) term=work<br />
id=17 ct=5(20.00%) term=netwitness<br />
id=18 ct=5(20.00%) term=applications<br />
id=19 ct=5(20.00%) term=team<br />
id=20 ct=5(20.00%) term=requirements<br />
id=21 ct=5(20.00%) term=spring<br />
id=22 ct=5(20.00%) term=science<br />
id=23 ct=5(20.00%) term=information<br />
id=24 ct=5(20.00%) term=solutions<br />
<div>
<br /></div>
</div>
Berlin Brown Discussionshttp://www.blogger.com/profile/14524539202704556506noreply@blogger.com0tag:blogger.com,1999:blog-6469693320219923273.post-46169422480812208622012-12-18T19:29:00.002-05:002012-12-19T15:22:09.547-05:00Just some code<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-aqa6pyWgBYg/UNEKP4DlFYI/AAAAAAAAA3o/CLMI3lQAqZs/s1600/just_some_code1.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="284" src="http://4.bp.blogspot.com/-aqa6pyWgBYg/UNEKP4DlFYI/AAAAAAAAA3o/CLMI3lQAqZs/s640/just_some_code1.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Just some code<br /></td></tr>
</tbody></table>
<br />Berlin Brown Discussionshttp://www.blogger.com/profile/14524539202704556506noreply@blogger.com0tag:blogger.com,1999:blog-6469693320219923273.post-42554620014976541542012-08-06T09:57:00.003-04:002012-08-06T09:57:46.990-04:00<br />
<div id="pname" style="background-color: white; font-family: arial, sans-serif; font-size: 39px; margin: 0px; padding: 0px;">
<a href="http://code.google.com/p/jdistprop/" style="color: #666666; text-decoration: none;">jdistprop</a></div>
<div id="psum" style="background-color: white; font-family: arial, sans-serif; font-size: 13px;">
<a href="http://code.google.com/p/jdistprop/" id="project_summary_link" style="color: #444444; text-decoration: none;">Distributed Property Files With Java</a></div>
<div id="psum" style="background-color: white; font-family: arial, sans-serif; font-size: 13px;">
<br /></div>
<br />
<span style="background-color: white; font-family: arial, sans-serif; font-size: 13px; line-height: 1.25em;">This project supports distributed property files for easy loading with Java projects.</span><br />
<br />
<div style="background-color: white; font-family: arial, sans-serif; font-size: 13px; line-height: 1.25em; max-width: 64em;">
This project is a solution to this problem:</div>
<div style="background-color: white; font-family: arial, sans-serif; font-size: 13px; line-height: 1.25em; max-width: 64em;">
In a J2EE environment, we are normally used to storing text in a property/resource file.</div>
<ul style="background-color: white; font-family: arial, sans-serif; font-size: 13px; max-width: 62em; padding-left: 25px;">
<li style="margin-bottom: 0.3em;">firstName=First Name</li>
<li style="margin-bottom: 0.3em;">someOtherData=This is the data to display on screen, from property file</li>
</ul>
<div style="background-color: white; font-family: arial, sans-serif; font-size: 13px; line-height: 1.25em; max-width: 64em;">
If you are in an environment, where it is difficult to update those property files on a regular basis, what architecture are developers using to change text/label content that would normally reside in a property file? Or let's say you need to change that content before re-deploying a property file change. One solution is to store that in a database? Are developers using memcache-db? Is that usually used for caching solutions?</div>
<div style="background-color: white; font-family: arial, sans-serif; font-size: 13px; line-height: 1.25em; max-width: 64em;">
Would you use a solution outside of the java framework? Like a key/value datastore? memcachedb?</div>
<div style="background-color: white; font-family: arial, sans-serif; font-size: 13px; line-height: 1.25em; max-width: 64em;">
<br /></div>
<div style="background-color: white; font-family: arial, sans-serif; font-size: 13px; line-height: 1.25em; max-width: 64em;">
<a href="http://code.google.com/p/jdistprop/" style="font-family: 'Times New Roman'; font-size: medium; line-height: normal;">http://code.google.com/p/jdistprop/</a>
</div>Berlin Brown Discussionshttp://www.blogger.com/profile/14524539202704556506noreply@blogger.com0tag:blogger.com,1999:blog-6469693320219923273.post-4199087162776982932012-04-07T20:37:00.004-04:002012-04-07T20:49:40.051-04:00Build a java virtual machine that is actually readable/modifiable for Win32Is it possible to build a Java virtual machine for Win32 in an sort of understandable way? It is mostly impossible. The OpenJDK build will take hours just to build and will take a day to prepare your environment. If you aren't a core JVM developer, who actually is going to take several days to prep their environment so that they can hack OpenJDK. The jikes RVM may work with cygwin/win32 but it is mostly designed for linux or some other open platform. You are really only left with JamVM. I was actually able to install all of the dependencies with cygwin and perform a build in 15 minutes. And then actually edit the C source, add a log statement, rebuild and run against a bytecode class file. JamVM is the only JVM project that is understandable (20-30 core C files) and the build actually works with a modern version of cygwin.<br />
<br />
I will go through some of the setup. It helps to actually install JamVM through cygwin. Full install.<br />
<br />
1. Run cygstart and use cygports as your cygwin repository. Cygports allows you access to more software packages.<br />
<br />
<a href="http://sourceware.org/cygwinports/">http://sourceware.org/cygwinports/</a>
<br />
<br />
cygstart -- /cygdrive/c/Users/bbrown/Downloads/setup.exe -K http://cygwinports.org/ports.gpg<br />
<br />
2. Select 'jamvm' and run through the installer.<br />
<br />
I am installed 'jamvm-1.5.3-5'<br />
<br />
3. Run cygstart -- /cygdrive/c/Users/bbrown/Downloads/setup.exe -K http://cygwinports.org/ports.gpg<br />
Again but this time select 'jamvm' source install. Double click on the text 'Keep' near jamvm.<br />
<br />
4. Change your directory to /usr/src. The source for jamvm is located in the src directory.<br />
<br />
5. Install jamvm-1.5.3-5 based on the source:<br />
<br />
Run cygport ./jamvm-1.5.3-5.cygport all<br />
<br />
6. Then run cygport ./jamvm-1.5.3-5.cygport prep<br />
<br />
7. Then run cygport ./jamvm-1.5.3-5.cygport compile<br />
<br />
8. Enter '/jamvm-1.5.3-5/build/src'<br />
9. Type 'make' and edit a C source file.<br />
<br />
10. javac -source 1.5 -target 1.5 Test.java<br />
11. Run jamvm.exe Test<br />
<br />
<b>Dependencies</b><br />
<br />
autoconf2.5-2.65-1+<br />
automake1.10-1.10.3-1+<br />
binutils-2.20.51-2+<br />
cygport-0.9.85-1+<br />
gawk-3.1.7-1+<br />
gcc4-core-4.3.4-3+<br />
libtool-2.2.7a-15+<br />
make-3.81-2+<br />
sed-4.2.1-1+<br />
<br />
<b>Some of the dependencies established through jamvm install:</b><br />
<br />
<br />
ecj<span class="Apple-tab-span" style="white-space: pre;"> </span>(3.5.2-1)<br />
gnome-icon-theme<span class="Apple-tab-span" style="white-space: pre;"> </span>(3.2.1.2-1)<br />
java-classpath<span class="Apple-tab-span" style="white-space: pre;"> </span>(0.98-2)<br />
java-ecj<span class="Apple-tab-span" style="white-space: pre;"> </span>(3.5.2-1)<br />
libgtk2.0_0<span class="Apple-tab-span" style="white-space: pre;"> </span>(2.24.10-1)<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
libjbig2<span class="Apple-tab-span" style="white-space: pre;"> </span>(2.0-11)<br />
libjpeg8<span class="Apple-tab-span" style="white-space: pre;"> </span>(8b-1)<br />
libpango1.0_0<span class="Apple-tab-span" style="white-space: pre;"> </span>(1.29.4-2)<br />
libpng14<span class="Apple-tab-span" style="white-space: pre;"> </span>(1.4.8-1)<br />
libtiff5<span class="Apple-tab-span" style="white-space: pre;"> </span>(3.9.4-1)<br />
libXext6<span class="Apple-tab-span" style="white-space: pre;"> </span>(1.3.0-1)<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
shared-mime-info<span class="Apple-tab-span" style="white-space: pre;"> </span>(1.0-1)<br />
xcursor-themes<span class="Apple-tab-span" style="white-space: pre;"> </span>(1.0.3-1)<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<br />
<br />
<b>Resources</b><br />
<b><br /></b><br />
[1] <a href="http://sourceware.org/cygwinports/">http://sourceware.org/cygwinports/</a><br />
[2] <a href="http://jamvm.sourceforge.net/">http://jamvm.sourceforge.net/</a> (1.5.3)<br />
<br />
<br />Berlin Brown Discussionshttp://www.blogger.com/profile/14524539202704556506noreply@blogger.com0tag:blogger.com,1999:blog-6469693320219923273.post-36902373916961724392012-04-01T18:44:00.001-04:002012-04-01T19:02:14.358-04:00Code snippet of the day: Haskell for the dumb idiot lazy programmers<div>
<div>
The euler project problem reads as such, "If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000."</div>
</div>
<div>
Here is one of many implementations in Haskell. I used a verbose recursive approach, iterate up to 1000 and then build a list with the items of interest. In this case, 'multiples of 3 or 5'. The first implementation contains a logging utility for writing a string at each iteration.</div>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-03GB8mYJre8/T3jZn5nPNAI/AAAAAAAAAo4/5WsjcqNpJlQ/s1600/euler1_haskell_verbose.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="517" src="http://4.bp.blogspot.com/-03GB8mYJre8/T3jZn5nPNAI/AAAAAAAAAo4/5WsjcqNpJlQ/s640/euler1_haskell_verbose.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Figure 1: Euler Problem1 in Haskell</td></tr>
</tbody></table>
<br />
Here is the second source snippet, I just wanted to provide something more practical, a log parsing example that you can run against your web log files.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-DVcTXfmv8_k/T3jZpCfem5I/AAAAAAAAApA/VLzqt8xo7No/s1600/math_services1.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="516" src="http://3.bp.blogspot.com/-DVcTXfmv8_k/T3jZpCfem5I/AAAAAAAAApA/VLzqt8xo7No/s640/math_services1.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Figure 2: Applied Haskell, simply read each line of a file, find a term and output the results to another file.</td></tr>
</tbody></table>
<br />
<div>
Source:</div>
<div>
<br /></div>
<div>
<a href="https://javanotebook.googlecode.com/svn/trunk/math/MathServices/docs/haskell">https://javanotebook.googlecode.com/svn/trunk/math/MathServices/docs/haskell</a></div>Berlin Brown Discussionshttp://www.blogger.com/profile/14524539202704556506noreply@blogger.com0tag:blogger.com,1999:blog-6469693320219923273.post-67263333192135996692012-03-23T16:41:00.003-04:002012-03-23T16:55:32.489-04:00Image and Code of the Day<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-XkvT7hmISl4/T2zf4Ps5aoI/AAAAAAAAAog/RCD9EXBB354/s1600/stats_sort_imagePow2.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="480" src="http://4.bp.blogspot.com/-XkvT7hmISl4/T2zf4Ps5aoI/AAAAAAAAAog/RCD9EXBB354/s640/stats_sort_imagePow2.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Fig 1: Graph of a 'worse case' number of operations, n^2.</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-p2k6bGoMTmQ/T2zfUA3hxQI/AAAAAAAAAoY/0NDeO2OybIY/s1600/stats_sort_image3log.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="480" src="http://3.bp.blogspot.com/-p2k6bGoMTmQ/T2zfUA3hxQI/AAAAAAAAAoY/0NDeO2OybIY/s640/stats_sort_image3log.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Fig 2: Quick Sort Number of Operations vs {n * log(n)} graph. Quick Sort average case is {n * log(n)}. During the quick sort simulation, the number of reported operations aligned with the average case {n*log(n)}.</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-nPSWGFJJ5sw/T2zg4Z3UPuI/AAAAAAAAAoo/EB6YUY0038c/s1600/source_r_stats_line_plot.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://1.bp.blogspot.com/-nPSWGFJJ5sw/T2zg4Z3UPuI/AAAAAAAAAoo/EB6YUY0038c/s1600/source_r_stats_line_plot.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Fig3: R Source for plot of line graph. Data consists of rows of tab delimited integer values.</td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-BF_Q15NXXMs/T2ze9fNGtNI/AAAAAAAAAoI/lX8zCLW6bT0/s1600/quick_sort_source_algo.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://3.bp.blogspot.com/-BF_Q15NXXMs/T2ze9fNGtNI/AAAAAAAAAoI/lX8zCLW6bT0/s1600/quick_sort_source_algo.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Fig 4: Quick Sort Source in Java</td></tr>
</tbody></table>Berlin Brown Discussionshttp://www.blogger.com/profile/14524539202704556506noreply@blogger.com0tag:blogger.com,1999:blog-6469693320219923273.post-12216798139711996582012-03-10T21:02:00.000-05:002012-03-10T21:02:16.711-05:00New Anime Reviews by Berlin Brown<br />
Anime is Japanese animation. Animation that is not necessarily targeted for kids. In fact, some Animation can be pretty rough and make a 40 year old squirm. Basically, Anime has characters and culture, stories, plots. If you like interesting stories, then you will like most of the popular Anime.<br />
<br />
What is the difference between Manga and Anime? I am American and usually just refer to anything that moves and is from Japan as "Anime" or Japanimation. But that isn't entirely accurate. There are some Anime TV series/movies that were Manga comic books in Japan and then made into movies. Manga to Anime. Manga is Comic Book in Japanese. If someone says, "Fullmetal Alchemist is a great Manga". I guess they could refer to the comic book version of Fullmetal or the TV adaptation. But normally they are referring to the comic book. Anime can be an animated series derived from a Manga.<br />
<br />
<span style="font-weight: bold;">Popular Adult Stuff</span><br />
<br />
There are many genres of Anime. I like the adult themed stuff. Horror, Cyberpunk, Sci/Fi etc. With the adult themed Anime, you get similar story lines, violence and action that you would get from a Hollywood blockbuster. The difference is that the Anime is animated. When you think Cyberpunk, think Blade Runner. Cyberpunk focuses on technology, cybernetics, robotics but culture is at a lowpoint. Popular cyberpunk Anime focuses on wealth by big corporations but poverty is rampant among the lower classes. You see this with series like Ghost in the Shell, Akira and Ergo Proxy. Why cyberpunk? It is for those that like technology, sci-fi and a bit of nihilism.<br />
<br />
<span style="font-weight: bold;">What is some popular Anime?</span><br />
<br />
Recent Updates:<br />
<br />
Hell Girl (7/10), Darker than Black (8/10), xxx holic (7/10),<br />
<br />
<span style="font-weight: bold;">Ghost in the Shell (theme Cyberpunk, rating = 11/10)</span> - Ghost in the Shell is the iconic Cyberpunk series. It is cyberpunk, alongside Blade Runner. I can't even review Ghost in the Shell. It is the best of the best and you should get as many of the TV series and movies as you can. I encourage you to watch every episode. That is my review. Ghost in the Shell is a story about cyborgs and robotics fighting crime. That is the core of the series. But my short synopsis doesn't do justice to the intricate story lines. Just watch it.<br />
<br />
<span style="font-weight: bold;">Ergo Proxy (theme Cyberpunk, 10/10)</span> - Ergo Proxy is popular but not as familiar as Ghost in the Shell. It is Cyberpunk with a mix of fantasy, horror and sci/fi. It is a long series and has a solid, dark theme. Ghost in the Shell is a detective cyberpunk series. Ergo Proxy is more fantasy and dystopia. Most of the series involves the main character running from the oppressive society.<br />
<br />
<span style="font-weight: bold;">Monster (theme Detective, rating 8/10) </span>- Monster is pretty basic detective/conspiracy story. A doctor is falsely accused of murder and other crimes. He goes on the lamb and tries to find the sadistic conspirator. I gave Monster a score of 8 because the stories are pretty basic and plain. But it still is an enjoyable series.<br />
<br />
<span style="font-weight: bold;">The Last Exile (theme Steampunk/Military/Flight?, rating 9/10)</span> - What is steampunk. Somehow in Japanese Anime world, steam and diesel? can be used to fly planes and control machines. Generally these steam punk series target a fictional time period around the early 1900s. Ironically, you have steam powered robots and other machines that seem quite advanced. Anyway, The Last Exile is a steam punk/flight series that focuses on two friends that are caught up in a war. A lot of the series focuses on their relationship and how the war tears them apart. It is solid Anime. Good story, animation. At times, there is too much a focus on the drama of their lives as opposed to the war going on.<br />
<span style="font-weight: bold;"><br />Pumpkin Scissors (theme Military/Detective?, rating 7/10)</span><br />
<span style="font-weight: bold;"><br />Heroic Age (theme Science Fiction)</span><br />
<br />
<span style="font-weight: bold;">Other Notable Shows:</span><br />
<br />
Black Lagoon (8/10, part fan service, lots of bad language)<br />
<br />
-- From Berlin Brown<br />
-- Vote Ron Paul 2012Berlin Brown Discussionshttp://www.blogger.com/profile/14524539202704556506noreply@blogger.com0tag:blogger.com,1999:blog-6469693320219923273.post-70472872428921512082012-03-10T20:49:00.001-05:002012-03-10T22:36:43.024-05:00House MDHouse MD is a good TV show<br />
<br />
-- berlin brown<br />
<br />
<a href="http://math-services.appspot.com/">http://math-services.appspot.com/</a>Berlin Brown Discussionshttp://www.blogger.com/profile/14524539202704556506noreply@blogger.com0tag:blogger.com,1999:blog-6469693320219923273.post-47750485135950778012012-02-07T09:10:00.001-05:002012-03-10T21:04:06.589-05:00Random Technology LinksHere are random technology links:<br />
<br />
[Jan 2012]<br />
<br />
<br />
http://nlpwp.org/book/chap-words.xhtml<br />
http://www.stanford.edu/class/cs242/readings/backus.pdf<br />
http://stackoverflow.com/questions/1962278/dealing-with-timestamps-in-r<br />
http://math.illinoisstate.edu/dhkim/rstuff/rtutor.html<br />
http://www.harding.edu/fmccown/r/<br />
http://www.rforge.net/rJava/<br />
http://www.rforge.net/rJava/<br />
http://www.ugo.com/games/strategy-games-top-50?page=5<br />
http://www.cs.uiuc.edu/~jeffe/teaching/algorithms/<br />
http://www.nlp-class.org/<br />
http://www.security-class.org/<br />
COLT: http://acs.lbl.gov/~hoschek/colt/<br />
http://weka.sourceforge.net/doc.dev/weka/classifiers/bayes/BayesNet.html<br />
http://apache-wicket.1842946.n4.nabble.com/Wicket-Session-grows-too-big-real-fast-td1875816.html<br />
http://www.keysbotzum.com (public)<br />
http://www.cell-auto.com/<br />
http://bayfiles.com/<br />
http://www.michael-noll.com/tutorials/running-hadoop-on-ubuntu-linux-single-node-cluster/<br />
http://linuxproblem.org/art_9.html<br />
http://www.mitpressjournals.org/doi/abs/10.1162/106454606775186446<br />
http://www.mitpressjournals.org/toc/artl/15/1<br />
http://en.wikipedia.org/wiki/Scilab<br />
http://www.it-weise.de<br />
http://apache-wicket.1842946.n4.nabble.com/When-to-use-getModelObject-getConvertedInput-getInput-td1853817.html<br />
http://www.cs.gsu.edu/<br />
http://www.gradsource.com/Historically-Black-College-Graduate-Schools.cfm?region=6<br />
http://blogs.msdn.com/b/brian_jones/archive/2005/06/27/433152.aspx<br />
http://www.cooldatasoft.com/wicket-menu-demo/wicket/bookmarkable/com.cooldatasoft.page.MultiLevelCssMenuDemo?43<br />
http://www.redbooks.ibm.com/abstracts/sg247672.html<br />
http://seleniumhq.org/download/<br />
http://www.grad.wisc.edu/education/completedegree/mguide.html<br />
http://www.ibm.com/developerworks/linux/library/l-r1/index.html<br />
http://nothings.org/writing/websucks.html<br />
http://imgur.com/eH22I<br />
http://www.mathjax.org/<br />
http://shemesh.larc.nasa.gov/fm/fm-what.html<br />
http://www.cse.unsw.edu.au/~pls/thesis-topics/ghcjava.html<br />
http://cstheory.stackexchange.com/questions/3253/what-books-should-everyone-read<br />
http://misko.hevery.com/2008/12/15/static-methods-are-death-to-testability/<br />
http://www.youtube.com/watch?v=uL2D3qzHtqY<br />
http://powerhouseanimation.blogspot.com/2010/12/powerhouse-animation-had-its-annual.html<br />
http://www.catswhocode.com/blog/best-practices-for-modern-javascript-development<br />
http://mysticweb-bucket.s3.amazonaws.com/presentations/java2days_2010/In%20depth%20with%20HTML5%20java2days%202010.pdf<br />
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.<br />
http://www-01.ibm.com/support/docview.wss?uid=swg21397805<br />
http://www.scienceforums.net/<br />
http://svn.apache.org/repos/asf/wicket/branches/wicket-1.4.13/<br />
http://javatechniques.com/blog/faster-deep-copies-of-java-objects/<br />
http://code.google.com/p/support/wiki/WikiSyntax<br />
http://www.cs.cf.ac.uk/Dave/PERL/node56.html<br />
http://weblogs.java.net/blog/2006/05/04/understanding-weak-references<br />
http://codetojoy.blogspot.com/2009/05/java-methods-protected-is-new-private.html<br />
http://logging.apache.org/log4j/1.2/manual.html<br />
http://commons.apache.org/collections/api-release/org/apache/commons/collections/list/FixedSizeList.html<br />
http://www.simplegravity.com/<br />
http://wicketbyexample.com/api/wicket/1.4.6/org/apache/wicket/protocol/http/pagestore/DiskPageStore.html<br />
http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html<br />
http://www.jroller.com/eyallupu/entry/spring_as_a_message_provider<br />
http://www.wicketframework.org/apidocs/wicket/settings/Settings.html<br />
http://code.google.com/p/doingitwrongnotebook/<br />
http://www.reddit.com/r/programming/comments/6nw57/.json<br />
http://sed.sourceforge.net/sed1line.txt<br />
http://kanji.washuu.org/<br />
http://brizzled.clapper.org/id/75<br />
http://jlhaslip.trap17.com/samples/tooltips/index.html<br />
http://www.cs.ubc.ca/wccce/Program03/papers/Toby.html<br />
http://vaultcal.jitresources.com/secure/pfs/staticweb/epntvlive.html?e=1262786369&h=0bdc7a4e66f207b8460a08068a569036<br />
http://java.dzone.com/articles/benefits-testable-code<br />
http://www.retards.org/projects/rot13/<br />
http://en.wikipedia.org/wiki/Web_crawler<br />
http://www.java2s.com/Code/Java/Swing-JFC/SwingworkerExample.htm<br />
http://misko.hevery.com/2009/10/01/cost-of-testing/<br />
http://www.slate.com/id/2181460/<br />
http://www.java2s.com/Open-Source/Java-Document/6.0-JDK-Modules-sun/tools/sun.tools.javap.htm<br />
http://www.physorg.com/news169998182.html<br />
http://wiki.yak.net/634<br />
http://www-01.ibm.com/support/docview.wss?rs=180&uid=swg24021527<br />
http://www.eclipse.org/tptp/home/documents/conferences/eclipseCon2009/712%5FProfilingTestingTPTP.pdf<br />
http://www.ibm.com/developerworks/websphere/techjournal/0403_johnson/0403_johnson.html<br />
http://dev.opera.com/articles/view/timing-and-synchronization-in-javascript/<br />
http://www.tobearchitect.com/tag/RAD%20Developer%20Rational%20IBM%20Java%20Performance<br />
http://blog.springsource.com/2007/11/14/annotated-web-mvc-controllers-in-spring-25/<br />
http://www-01.ibm.com/support/docview.wss?rs=180&uid=swg1PK29128<br />
http://www.javaworld.com/javaworld/javatips/jw-javatip130.html?page=3<br />
http://www.javaworld.com/javaworld/javatips/jw-javatip130.html?page=4<br />
http://www.javaworld.com/javaworld/javatips/jw-javatip106.html?page=1<br />
http://www.1t3xt.info/api/com/lowagie/text/Chunk.html<br />
http://www.1t3xt.info/examples/browse/?page=example&id=223<br />
http://www.thefrontside.net/crosscheck<br />
http://common-lisp.net/project/asdf-install/tutorial/setup.html<br />
http://sunsite.ualberta.ca/Documentation/Misc/htmldoc-1.8.23/htmldoc.html<br />
http://www.softcomplex.com/products/tigra_menu_gold/demo/frames/<br />
http://www.aptana.com/docs/index.php/Writing_to_the_Firebug_console<br />
http://the.taoofmac.com/space/blog/2006/11/04<br />
http://publib.boulder.ibm.com/infocenter/radhelp/v6r0m1/index.jsp?topic=/com.ibm.etools.struts.doc/topics/rstrdoc019.html<br />
http://software.complete.org/hslogger<br />
http://en.wikipedia.org/wiki/ASCII<br />
http://siteadminstuff.com/all-text.html#2<br />
http://tmate.org/svn/kb/examples/index.php<br />
http://www.nedbatchelder.com/text/quicksvn.html<br />
http://support.microsoft.com/kb/222064/<br />
http://www.computerhope.com/shortcut.htm#4<br />
http://www.yourhtmlsource.com/javascript/popupwindows.html<br />
<br />
--- Berlin Brown<br />
<br />Berlin Brown Discussionshttp://www.blogger.com/profile/14524539202704556506noreply@blogger.com0tag:blogger.com,1999:blog-6469693320219923273.post-65335442759242403392012-01-08T18:14:00.001-05:002012-01-08T18:14:45.766-05:00I am Zit Pomney and I am running for PresidentI am Zit Pomney and I am running for President. I have a vision for America. I want to bring jobs to this country. I know I am the front runner but I am a tough boy, I can take the attacks from the other candidates. I will get America back to work. I will work hard for America. America is a great place with great people. And we need to balance our budget<br />
<br />
<i>"I love how the current candidates don't actually say anything of substance 99.9% of the time. So I have created my fictional characters, meet Zit Pomney"</i>Berlin Brown Discussionshttp://www.blogger.com/profile/14524539202704556506noreply@blogger.com0tag:blogger.com,1999:blog-6469693320219923273.post-15755595516556808572012-01-06T23:35:00.001-05:002012-01-06T23:36:23.463-05:00Thirty second review of top modern TV showsThis is a short review of about a dozen top TV shows that have appeared in the last decade or so. I advise you purchase the DVD TV sets and watch them based on your own schedule.<br />
<br />
These aren't sorted in any particular order but the better shows will normally appear at the top.<br />
<br />
<br />
<ol>
<li><b>The Wire (10/10)</b> - (Urban gang land violence) So far the best TV show I have seen. It was getting predictable and dry towards the end of the series but I don't think there is any better show that feels "real". It is dark and gritty and highly watchable.</li>
<li><b>Dexter (9.9/10)</b> - (Almost comical look at a serial killer do-gooder) Dexter is the show about the serial killer that also happens to be a blood splatter analyst in the police department. Normally he finds another bad guy or serial killer and does away with him. It is also a dark series with lots of gore and sometimes it can be serious. But I tend to find some of it comical. The Wire is not comical at all, Dexter can be. It is comical in its sense of irony. The top serial killer just happens to work for the police. And it is a really good show, probably one of the best ever created.</li>
<li><b>Breaking Bad (9.5/10)</b> - (Chemist turned drug dealer) - Breaking Bad is the more serious version of Weeds. Walter White, the main character, is an obsessive, neurotic, family-loving middle-aged smart guy that is using his genius to sell drugs. He gets away with it most of the time, the other time everyone is out to kill him or screw him over. It is good maybe a little bit too stylized. There are too many moments of someone or something just sitting out in the dessert and we are supposed to appreciate the moment. </li>
<li><b>The Mentalist (9.1/10)</b> - (Really observant showman solves crimes) - You may disagree but I think this is the most complex show I have watched. Each episode is like a puzzle you have to figure. It is a smart program if you are into smart programs. Some of the characters are a bit dry and the later episodes are becoming too easy to figure out.</li>
<li><b>The Shield (9.3/10)</b> - (Bad but also Good cops try to get away mayhem) - If you google "The Shield", some consider it the "Cops version of the Wire" or the "White version of the Wire". That is basically what it is, a different look at urban warfare through the eyes of the cops. And also appears on network TV so it is less gritty than the Wire.</li>
<li><b>Star Trek TNG</b> (10/10) - Still the best sci-fi TV series out there.</li>
<li><b>Numb3rs</b> - (8.5/10) - Standard TV fare, predictable crime drama where they throw in math problems in solving the crime. </li>
</ol>Berlin Brown Discussionshttp://www.blogger.com/profile/14524539202704556506noreply@blogger.com0tag:blogger.com,1999:blog-6469693320219923273.post-17366298210220208122012-01-06T13:23:00.001-05:002013-02-16T01:08:27.518-05:00Python matplotlib plotting setup for cygwinMatplotlib is a popular python library for generating plot graphics. It works with cygwin win32 but some non-intuitive steps are required.<br />
<br />
<b>Install cygwin:</b><br />
<br />
CYGWIN_NT-5.1 1.7.9(0.237/5/3) 2011-03-29 10:10 i686 Cygwin<br />
I am using cygwin with setup 2.7.3<br />
<br />
<b>Install python through cygwin:</b><br />
<br />
This document describes installing python and matplot with cygwin. For most windows users and cygwin users, normally you would use the external python executable. I tend to prefer all of my script oriented applications running through cygwin including python.<br />
<br />
<br />
Python 2.6.5 (r265:79063, Jun 12 2010, 17:07:01)<br />
[GCC 4.3.4 20090804 (release) 1] on cygwin<br />
<br />
In the cygwin setup.exe installer, install:<br />
<br />
The freetype libs, python-gtk, python-tk, libpng<br />
<br />
<b>Download matplotlib from sourceforge:</b><br />
<br />
I am using the latest version matplotlib-1.1.0 as of 1/2012.<br />
<br />
<b>Issues with standard python install and cygwin:</b><br />
<br />
The typical 'python setup.py install' will not work with cygwin. You need to modify a configuration file and run some other additional commands.<br />
<br />
In the root directory of the expanded matplotlib directory, edit the setup.cfg.template configuration file.<br />
<br />
Around line 70 in the file is a commented line, uncomment the line such that you have:<br />
<br />
tkagg = False<br />
<br />
<b>Run install and watch it fail</b><br />
<b><br /></b>
Try running 'python setup.py install'<br />
<br />
It should fail with an error like the following:<br />
<br />
<br />
<pre style="background-color: white; font-size: 12px; max-width: 80em; padding-left: 0.7em; white-space: pre-wrap;"><i>2 [main] python 2796 C:\cygwin\bin\python.exe: *** fatal error - unable to remap C:\cygwin\bin\cyggfortran-3.dll to same address as parent: 0x18660000 != 0x69780000
Stack trace:</i></pre>
<br />
<br />
<b>Run the rebase command OUTSIDE OF THE TYPICAL CYGWIN ENV</b><br />
<b><br /></b>
Exit cygwin and close all cygwin instances including the one you are working with. You won't be using the typical cygwin prompt for the next command.<br />
<br />
In windows explorer, open the cmd.exe or windows command<br />
<br />
<br />
You will need to run rebaseall. First, shut down any long running processes like sshd, close all Cygwin prompts and so on.<br />
<br />
Type the following commands:<br />
<br />
cd \cygwin\bin<br />
ash<br />
PATH=. rebaseall -v<br />
<br />
...<br />
And you should get several lines of output.<br />
<br />
<b>Run install and watch it succeed</b><br />
<b><br /></b>
Try running 'python setup.py install' command again in the matplotlib directory<br />
<br />
<b>Running Example Program:</b><br />
<b><br /></b>
<br />
<div style="font-weight: bold;">
# python</div>
Python 2.6.5 (r265:79063, Jun 12 2010, 17:07:01)<br />
[GCC 4.3.4 20090804 (release) 1] on cygwin<br />
Type "help", "copyright", "credits" or "license" for more information.<br />
import matplotlib.pyplot as pyplot<br />
pyplot.pie([1,2,3])<br />
pyplot.show()<br />
<div style="display: inline !important;">
pyplot.savefig('f.png')</div>
pyplot.savefig('x.png')<br />
pyplot.savefig('x.eps')<br />
<br />
About Me (Berlin Brown resume):<br />
<a href="http://berlin2research.com/dyna/berlinbrown_java_resume/">http://berlin2research.com/dyna/berlinbrown_java_resume/</a><br />
<br />Berlin Brown Discussionshttp://www.blogger.com/profile/14524539202704556506noreply@blogger.com0tag:blogger.com,1999:blog-6469693320219923273.post-54210164732328830142012-01-02T00:12:00.004-05:002012-01-02T00:12:44.018-05:002012 Campaign, help from political science community<br />
<div style="background-color: white; font-family: verdana, arial, helvetica, sans-serif; font-size: small; margin-bottom: 5px; margin-top: 5px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
After this race is over, I wish a fair politic science group could look at the media's handling of this race.</div>
<div style="background-color: white; font-family: verdana, arial, helvetica, sans-serif; font-size: small; margin-bottom: 5px; margin-top: 5px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
Here are some BIG missteps in how the media handled this race:</div>
<ul style="background-color: white; font-family: verdana, arial, helvetica, sans-serif; font-size: small; list-style-image: initial; list-style-position: outside; margin-bottom: 10px; margin-left: 2em; margin-right: 2em; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">Sarah Palin, why prop her up at all?</li>
<li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">Rick Perry enters the race and within two weeks, he is a front runner</li>
<li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">Herman Cain, once again, why prop him up?</li>
<li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">And then Newt's rise</li>
<li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">Look at the criticism against Ron Paul.</li>
</ul>
<div style="background-color: white; font-family: verdana, arial, helvetica, sans-serif; font-size: small; margin-bottom: 5px; margin-top: 5px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
Someone could just look at the timing and wording of discussion on the candidates. It is obvious they have their favorites.</div>
<div style="background-color: white; font-family: verdana, arial, helvetica, sans-serif; font-size: small; margin-bottom: 5px; margin-top: 5px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
...</div>
<div style="background-color: white; font-family: verdana, arial, helvetica, sans-serif; font-size: small; margin-bottom: 5px; margin-top: 5px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
CNN and Fox didn't campaign for Ron Paul 24/7 like they did with other candidates. But they did have Ron Paul on their programs. Ron Paul had to defend his own platform. But CNN, Fox did the campaigning for the other candidates.</div>
<div style="background-color: white; font-family: verdana, arial, helvetica, sans-serif; font-size: small; margin-bottom: 5px; margin-top: 5px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
And it is easy to spot, just look at the amount of coverage, wording and discussion.</div>Berlin Brown Discussionshttp://www.blogger.com/profile/14524539202704556506noreply@blogger.com0tag:blogger.com,1999:blog-6469693320219923273.post-58962310140673628332011-12-31T04:04:00.003-05:002011-12-31T04:09:37.304-05:00DNA seen through the eyes of a coder, my takeSeveral 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).<br />
<br />
<a href="http://ds9a.nl/amazing-dna/">http://ds9a.nl/amazing-dna/</a>
<br />
<br />
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 right piece of the genome and transcribes it into RNA. The RNA is then translated into a sequence of amino acids, which together make up a protein the DNA coded for."<br />
<br />
I would analogize the DNA processing of the cell like so, DNA is a special type of hardware device and storage software. Imagine it is like a <b>VMWare like virtual machine</b>. Not only does it store important information about the cell, key blueprint information about how the cell should function. But DNA also has special software for <b>dynamically running other applications</b>. VMWare virtual machine has persistent information contained within its image file. But, the VMWare player can also execute the machine.<br />
<br />
The DNA virtual machine has the cron task launcher and only one cron job configured. The cron job program launches special software that makes a "web-service call to some remote server". The web-service message might be similar to mRNA and the content is based on core DNA data stored on the virtual machine. I used the analogy of a remote web-service call because DNA can't leave the nucleus so information and functions are sent remotely. During transcription, RNA is copied from DNA. Eventually, proteins are created. RNA has message information for which protein to create.<br />
<br />
So, during the lifecycle of the cell, cron jobs are running every 5 minutes. The cron job task launches an application reading information from DNA, then launches a web-service call. At the back-end server, the data from the web-service call (mRNA) is used with data from the server-side (tRNA). Some additional routines get kicked off on the back-end and eventually proteins are created. Proteins are also molecular chains that can be used as a structural component for the cell or used to for other cell tasks. There are sixty thousand different proteins in the human body [1].<br />
<br />
(Note: 5 mins is an arbitrary time period for my analogy, a cell can live several months or decades). <br />
<br />
[1] The Machinery of Life – Goodsell - 1993<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-nMyrgye0nlw/Tv7QQ2nGhfI/AAAAAAAAAnk/fVcN4PwLnwU/s1600/jmol_image_dna.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://1.bp.blogspot.com/-nMyrgye0nlw/Tv7QQ2nGhfI/AAAAAAAAAnk/fVcN4PwLnwU/s400/jmol_image_dna.png" width="315" /></a></div>
<br />Berlin Brown Discussionshttp://www.blogger.com/profile/14524539202704556506noreply@blogger.com0tag:blogger.com,1999:blog-6469693320219923273.post-85171257474571465582011-12-26T19:56:00.001-05:002011-12-29T00:05:05.685-05:00Lorenz Attractor 3D View<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-J_LmDsWIJGo/TvkXIG-tycI/AAAAAAAAAnY/YStJ71TZwZM/s1600/LorenzImageFromJava.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="542" src="http://2.bp.blogspot.com/-J_LmDsWIJGo/TvkXIG-tycI/AAAAAAAAAnY/YStJ71TZwZM/s640/LorenzImageFromJava.png" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://upload.wikimedia.org/wikipedia/en/math/a/e/b/aeb53d5ef06eba4ab271069851413897.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://upload.wikimedia.org/wikipedia/en/math/a/e/b/aeb53d5ef06eba4ab271069851413897.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://upload.wikimedia.org/wikipedia/en/math/7/4/f/74fe0bb652d9a426a1f601424c7c33b2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://upload.wikimedia.org/wikipedia/en/math/7/4/f/74fe0bb652d9a426a1f601424c7c33b2.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://upload.wikimedia.org/wikipedia/en/math/a/1/9/a197663f502ba9703ca12b39669a69f7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://upload.wikimedia.org/wikipedia/en/math/a/1/9/a197663f502ba9703ca12b39669a69f7.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<b>Resources:</b><br />
<b><br /></b><br />
[1] <a href="http://jvmnotebook.googlecode.com/svn/trunk/blog/java/Lorenz">http://jvmnotebook.googlecode.com/svn/trunk/blog/java/Lorenz</a><br />
<br />
[2] <a href="http://en.wikipedia.org/wiki/Lorenz_attractor">http://en.wikipedia.org/wiki/Lorenz_attractor</a>
<br />
<br />
[3] <a href="http://berlinbrown.github.com/newpages/applet2/applet2.html">http://berlinbrown.github.com/newpages/applet2/applet2.html</a><br />
<br />
[4] <a href="http://berlinbrown.github.com/">http://berlinbrown.github.com/</a> - Github projects<br />
<br />
----<br />
<br />
<span style="text-align: justify;">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.</span><br />
<br />Berlin Brown Discussionshttp://www.blogger.com/profile/14524539202704556506noreply@blogger.com0tag:blogger.com,1999:blog-6469693320219923273.post-88489388941160820262011-12-23T20:05:00.002-05:002011-12-31T00:55:59.044-05:00Ron Paul is the most racist candidate in 2012 by far<a href="http://www.youtube.com/watch?v=eMQmInReYlI" style="background-color: white; color: purple; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px;">http://www.youtube.com/watch?v=eMQmInReYlI</a><span style="background-color: white; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px;"> </span><br />
<br />
<span style="background-color: white; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px;">Summary of his remarks. </span><br />
<br />
<span style="background-color: white; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px;">Repeal drug laws and it will be a tremendous improvement for blacks snared in an injust system. </span><br />
<br />
<span style="background-color: white; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px;">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. </span><br />
<br />
<span style="background-color: white; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px;">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. </span><br />
<br />
<span style="background-color: white; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px;">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. </span><br />
<br />
<span style="background-color: white; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px;">Rosa Parks is one of his heros for engaging in peaceful civil disobedience against injust laws. </span><br />
<br />
<span style="background-color: white; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px;">Ron Paul has gotten the most black votes of any Republican candidate because he is against injustice. </span><br />
<br />
<span style="background-color: white; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px;">He will issue a presidential pardon to EVERYONE, black, white and otherwise convicted of non-violent drug "crimes". </span><br />
<br />
<span style="background-color: white; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px;">Libertarianism is about the individual, not the color of their skin. Paul is the anti-racist because he is the ONLY candidate that will protect people against vicious drug laws.</span><br />
<span style="background-color: white; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px;"><br /></span><br />
<span style="font-family: Georgia, 'Times New Roman', Times, serif;"><span style="font-size: 15px;">Edit: In recent news Kelly Clarkson supports Ron Paul for 2012. And not a bad song: Stronger.</span></span>Berlin Brown Discussionshttp://www.blogger.com/profile/14524539202704556506noreply@blogger.com0tag:blogger.com,1999:blog-6469693320219923273.post-3204139789048368252011-12-21T16:04:00.000-05:002013-02-14T20:58:28.138-05:00A Physics Example in Java: A Projectile Fired from a Cannon, 2D Particle Kinematics<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: left;">
Here is an example program that shows how to implement kinematic equations for projectile motion using Java and the Swing 2D graphics libraries.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-z-VFwSi3sCM/TvJH3GiS-vI/AAAAAAAAAm8/g3EGbXhc4LY/s1600/a1.gif" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://4.bp.blogspot.com/-z-VFwSi3sCM/TvJH3GiS-vI/AAAAAAAAAm8/g3EGbXhc4LY/s1600/a1.gif" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Equation used to plot projectile path along the X and Y axis</td></tr>
</tbody></table>
<br />
<div>
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.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-JZdNHcPI-ng/TvJLBgUAeTI/AAAAAAAAAnE/b7jqwxgAEyE/s1600/java_code_path.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="422" src="http://4.bp.blogspot.com/-JZdNHcPI-ng/TvJLBgUAeTI/AAAAAAAAAnE/b7jqwxgAEyE/s640/java_code_path.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Java code, DoSimulation routine, see s.i and s.k for the X/Y positions</td><td class="tr-caption" style="text-align: center;"><br /></td><td class="tr-caption" style="text-align: center;"><br /></td><td class="tr-caption" style="text-align: center;"><br /></td><td class="tr-caption" style="text-align: center;"><br /></td><td class="tr-caption" style="text-align: center;"><br /></td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-P1XBGx-2MmI/TvJL7j7toiI/AAAAAAAAAnM/9HlcCBCpnc4/s1600/physics_cannon_draw.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="640" src="http://4.bp.blogspot.com/-P1XBGx-2MmI/TvJL7j7toiI/AAAAAAAAAnM/9HlcCBCpnc4/s640/physics_cannon_draw.png" width="616" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Java 2D Cannon Physics Simulation</td></tr>
</tbody></table>
<br />
<b>Java Source</b><br />
<br />
<a href="https://jvmnotebook.googlecode.com/svn/trunk/blog/java/SimpleCannonPhysicsJava">https://jvmnotebook.googlecode.com/svn/trunk/blog/java/SimpleCannonPhysicsJava</a><br />
<br />
<br />
Based on code from: physics for game developers, David Bourg<br />
<br />
<a href="http://berlin2research.com/dyna/berlinbrown_java_resume/">http://berlin2research.com/dyna/berlinbrown_java_resume/</a><br />
<br />
----<br />
<br />
<div style="margin-bottom: 0.75em; margin-top: 0.75em; text-align: justify;">
So today we see man a highly evolved creature who not only acts but thinks and feels. All these thoughts, feelings and emotions are interrelated.</div>
<div style="margin-bottom: 0.75em; margin-top: 0.75em; text-align: justify;">
The body and the mind of man are so closely bound together that whatever affects one affects the other. An instantaneous change of mind instantly changes the muscles of the face. A violent thought instantly brings violent bodily movements.</div>
</div>
Berlin Brown Discussionshttp://www.blogger.com/profile/14524539202704556506noreply@blogger.com0tag:blogger.com,1999:blog-6469693320219923273.post-55266307173492875812011-12-18T21:55:00.001-05:002011-12-29T00:07:33.800-05:00Random Code Post of the Day (procedural haskell, parse file)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.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-ZLQyWHzuh7U/Tu6nFbkgRII/AAAAAAAAAms/wxMmssQVTvs/s1600/run_parse_log.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="564" src="http://3.bp.blogspot.com/-ZLQyWHzuh7U/Tu6nFbkgRII/AAAAAAAAAms/wxMmssQVTvs/s640/run_parse_log.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Haskell Source, open a file and search for a term</td></tr>
</tbody></table>
<br />
<b>Source</b><br />
<b><br /></b><br />
<a href="https://jvmnotebook.googlecode.com/svn/trunk/blog/haskell/RandomParseFile">https://jvmnotebook.googlecode.com/svn/trunk/blog/haskell/RandomParseFile</a><br />
<b><br /></b><br />
<b>----</b><br />
<b><br /></b><br />
<span style="text-align: justify; text-indent: 16px;">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.</span>Berlin Brown Discussionshttp://www.blogger.com/profile/14524539202704556506noreply@blogger.com0tag:blogger.com,1999:blog-6469693320219923273.post-17446456787667526712011-12-16T10:33:00.000-05:002011-12-29T00:09:50.666-05:00Implementing Example One from the Machine Learning Class in JavaAt 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.<br />
<br />
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.<br />
<br />
<b>Overview of example one:</b><br />
<br />
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.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-o7s5srlwbfU/TuthSDrIkgI/AAAAAAAAAl0/C9NkQ0UH_Ho/s1600/eq1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-o7s5srlwbfU/TuthSDrIkgI/AAAAAAAAAl0/C9NkQ0UH_Ho/s1600/eq1.png" /></a></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-JrM11e0gK2Q/TuthBeX33AI/AAAAAAAAAls/7CUgnEC83M4/s1600/gradient_descent_matlab.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://4.bp.blogspot.com/-JrM11e0gK2Q/TuthBeX33AI/AAAAAAAAAls/7CUgnEC83M4/s1600/gradient_descent_matlab.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Partial Approach for Gradient Descent with Octave</td></tr>
</tbody></table>
<b><br /></b><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-yzEAHbaSEdA/TuthezHMLQI/AAAAAAAAAl8/Dg3rJGL1VYo/s1600/b1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-yzEAHbaSEdA/TuthezHMLQI/AAAAAAAAAl8/Dg3rJGL1VYo/s1600/b1.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-ay4b_PaABFU/TuthteUQMHI/AAAAAAAAAmE/299koRPM1E0/s1600/c1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-ay4b_PaABFU/TuthteUQMHI/AAAAAAAAAmE/299koRPM1E0/s1600/c1.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
In the example, data points are read from a file and after running the example from Octave, this plot is generated.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-M0YnTDZypRA/TutjXz9OidI/AAAAAAAAAmM/OVce8eORtt4/s1600/plot_linear_line1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="388" src="http://3.bp.blogspot.com/-M0YnTDZypRA/TutjXz9OidI/AAAAAAAAAmM/OVce8eORtt4/s640/plot_linear_line1.png" width="640" /></a></div>
<br />
<b><br /></b><br />
<b>Overview of example one in Java:</b>
<br />
<b><br /></b><br />
The Java implementation as you might expect is more verbose than the Octave equivalent. Java doesn't include a matrix library in the standard toolkit so it took 5-10 lines more code to implement basic matrix multiplication as opposed to the seamless multiplication in Octave.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-bDdCkx_bx6I/TutkI5rgF1I/AAAAAAAAAmU/DaVMn7-I01M/s1600/java_octave_example1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="484" src="http://1.bp.blogspot.com/-bDdCkx_bx6I/TutkI5rgF1I/AAAAAAAAAmU/DaVMn7-I01M/s640/java_octave_example1.png" width="640" /></a></div>
<b><br /></b><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-va0G9LIpuhs/TutkeolY6BI/AAAAAAAAAmc/JaITo4dQFUE/s1600/java_example_screen_ml2.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="572" src="http://3.bp.blogspot.com/-va0G9LIpuhs/TutkeolY6BI/AAAAAAAAAmc/JaITo4dQFUE/s640/java_example_screen_ml2.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Java Swing Example of MlClass Ex1, regression line and data points</td></tr>
</tbody></table>
<br />
<b>Resources</b><br />
<br />
<a href="http://www.gnu.org/software/octave/">http://www.gnu.org/software/octave/</a>
<br />
<a href="http://www.ml-class.org/course/class/index">http://www.ml-class.org/course/class/index</a><br />
<br />
Note: I tried not to provide a full matlab implementation from the machine learning course as that wouldn't be fair to the students. Plus the implementation is in Java and really ideal for the actual course.<br />
<br />
<b>Source</b><br />
<b><br /></b><br />
<a href="http://jvmnotebook.googlecode.com/svn/trunk/blog/java/ConvertMachineLearningToJava/">http://jvmnotebook.googlecode.com/svn/trunk/blog/java/ConvertMachineLearningToJava/</a><br />
<br />
<b>Contact</b><br />
berlin dot brown at gmail.com<br />
<br />
"<span style="text-align: justify; text-indent: 16px;">In the tumultuous business of cutting-in and attending to a whale, there is much running backwards and forwards among the crew. Now hands are wanted here, and then again hands are wanted there. There is no staying in any one place; for at one and the same time everything has to be done everywhere. It is much the same with him who endeavors the description of the scene.</span><span style="text-align: justify; text-indent: 16px;"> "</span>Berlin Brown Discussionshttp://www.blogger.com/profile/14524539202704556506noreply@blogger.com0