Posts

Open Source Language Models

Image
 Here are some open source language models. https://www.datacamp.com/blog/top-open-source-llms See on Twitter:  https://twitter.com/BerlinBrownMech And random pov pic

Opening up this blog again

 See my posts here and twitter. Here is a poem for you. The chaos lives among us For the chaos is real The math is real twitter/x: https://twitter.com/BerlinBrownMech See more here too: https://sites.google.com/view/berlinbrownhome/home

On Unit Testing, Java TDD for developers to write

It has been a while, let's kick off 2017 with a blog entry. 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 le...

This is my XSS hack servlet

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 public class SimpleServletXSS extends HttpServlet { private static final long serialVersionUID = 1L ; @Override public void doGet ( final HttpServletRequest request , final HttpServletResponse response ) throws ServletException , IOException { doPost ( request , response ); } @Override public void doPost ( final HttpServletRequest request , final HttpServletResponse response ) throws ServletException , IOException { final StringBuffer buf = new StringBuffer (); final String method = request . getMethod (); buf . append ( "<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(\...

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

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

Internals of the OpenJDK - HashMap

Image
Here 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. OpenJDK HashMap Implementation

Basic word frequency analysis

Image
Here are some interesting terms in the Democratic presidential debate from 2008: I believe we're at a defining moment in our history. Our nation is at war; our planet is in peril.... ------------------------------- Total Count of most terms : 9125 Interesting Word Freq Count: 1952 ------------------------------- id=1 ct=112(39.16%) term=think id=2 ct=101(35.31%) term=applause id=3 ct=97(33.92%) term=clinton id=4 ct=97(33.92%) term=people id=5 ct=85(29.72%) term=senator id=6 ct=66(23.08%) term=health id=7 ct=62(21.68%) term=obama id=8 ct=56(19.58%) term=care id=9 ct=56(19.58%) term=blitzer id=10 ct=47(16.43%) term=right id=11 ct=44(15.38%) term=president id=12 ct=40(13.99%) term=country id=13 ct=35(12.24%) term=make id=14 ct=34(11.89%) term=plan id=15 ct=32(11.19%) term=question id=16 ct=30(10.49%) term=believe id=17 ct=30(10.49%) term=important id=18 ct=28(9.79%) term=issue id=19 ct=28(9.79%) term=take id=20 ct=27(9.44%) term=time id=21 ct=26(9.09%) ...