Posts

Showing posts from March, 2011

Thoughts: Wicket, GIT

On Git: use git for any text file that you might perform edits on that isn't already part of an existing source control repository. Simply do: git init git add [some file or directory] git commit -m "adding message" Apache Wicket is a component based web framework for the Java platform. It has seen increased popularity over heavier frameworks like Struts and JSF. Here is a basic example: import org.apache.wicket.Application; import org.apache.wicket.PageParameters; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.list.ListItem; import org.apache.wicket.markup.html.list.ListView; import org.apache.wicket.model.CompoundPropertyModel; import org.apache.wicket.proxy.IProxyTargetLocator; import org.apache.wicket.proxy.LazyInitProxyFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.berlin.model.LoadableDetachableList; import org.berlin.model.SelectionOptionBean; impor...

Simple maven jetty config (supports start/stop)

Usage: 'mvn jetty:run' <dependency> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty</artifactId> <version>${jetty.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-util</artifactId> <version>${jetty.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-management</artifactId> <version>${jetty.version}</version> <scope>provided</scope> </dependency> <profiles> <profile> <id>local</id> <activation> <os> <family>windows</family> </os> </activation> ... <build> <plugins> <!-- Clean all jars before build --> <plugin> <artifactId>maven-cle...

Thoughts - Bottom Up AI

Overview The field of artificial intelligence in computer science focuses on many different areas of computing from computer vision to natural language processing. These top-down approaches typically concentrate on human behavior or other animal functions. In this article we look at a bottom-up approach to artificial life and how emergent cell behavior can produce interesting results. With this bottom-up alife approach, we are not interested in solving any particular task, but we are interested in observing the adaptive nature of the entities in our simulation. We also wanted to introduce those more familiar with software engineering to biological systems and evolutionary theory concepts. Life is all around us. Even with inorganic material it is possible that microscopic organisms are covering that surface. Moving forward if we want to study, analyze and work with artificial agents, we might consider systems that have evolved behavior over a series of steps. We should not necessari...

Updated software review - notes

In the software industry, as you might expect, we use a lot of software. Here is my cursory review of software I used recently. - Git (8/10) - the distributed source control tool - Not bad, looks useful, I have only done a couple of commits with it. From a cursory review, it looks like it would be useful for making commits locally without a need for some remote server system (like with subversion) - Eclipse LaTex Plugin (7/10) - works, doesn't crash, does what I need it to. - Eclipse Scala Plugin IDE (7/1) - works, crashes sometimes. I have a need for Scala development and this one of a handful of syntax highlighters - Notepad++ (10/10) - Awesome software. It highlights Haskell, nice. - Leksah (??/10) - So far, I haven't got into it. I don't like the GTK looks but it is a developer tool so it doesn't matter. I hope it does what I need.

Java static source code analysis - Part 2

Here is the source count output for the Oracle JDK Java libraries (jdk1.6.0 22) and various packages (java lang, swing, net) Larger projects, Oracle JDK 1.6.0.22 (src.zip) Oracle JDK 1.6.0.22 (src.zip) ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- Java 7209 244417 910071 931087 C 7 437 1304 3186 C/C++ Header 7 56 128 169 ------------------------------------------------------------------------------- SUM: 7223 244910 911503 934442 ------------------------------------------------------------------------------- $ src/java/lang/ Oracle JDK 1.6.0.22 (src.zip) 169 text files. 169 u...

Java static source code analysis (analysis of various open projects)

If you were ever curious about how many classes your top projects had, this post contains the source code line count for top open source Java projects. The listing is not any particular order, use your browser's find command to see the count for top projects like wicket, spring or hibernate. Maven and cloc tools were used to generate the output. # du -ha 1.9M ./ant-1.8.2.jar 16K ./ant-launcher-1.8.2.jar 436K ./antlr-2.7.6.jar 8.0K ./aopalliance-1.0.jar 44K ./asm-3.1.jar 172K ./bsf-2.3.0.jar 12K ./bytelist-1.0.6.jar 276K ./cglib-2.2.jar 3.1M ./clojure-1.2.0.jar 188K ./commons-beanutils-1.7.0.jar 32K ./commons-codec-1.2.jar 564K ./commons-collections-3.2.1.jar 60K ./commons-fileupload-1.2.1.jar 300K ./commons-httpclient-3.1.jar 88K ./commons-io-1.3.2.jar 276K ./commons-lang-2.5.jar 60K ./commons-logging-1.1.1.jar 240K ./constantine-0.6.jar 308K ./dom4j-1.6.1.jar 184K ./dwr-1.1.3.jar 860K ./freemarker-2.3.15.jar 62...

First example EVER on GTK and Haskell, Render Primitives

Image
I give you the first example on the Internet, rendering a primitive, point and rectangle. Next, double buffering. -- The Glorious Glasgow Haskell Compilation System, version 6.12.3 -- ghc --make SimpleCells.hs -- See: http://code.google.com/p/ainotebook/ -- -- Berlin Brown import Graphics.UI.Gtk import Graphics.UI.Gtk.Gdk.GC import Graphics.UI.Gtk hiding (Color, Point, Object) defaultFgColor :: Color defaultFgColor = Color 65535 65535 65535 defaultBgColor :: Color defaultBgColor = Color 0 0 0 renderScene d ev = do dw (w, h) gc let fg = Color (round (65535 * 205)) (round (65535 * 0)) (round (65535 * 0)) gcSetValues gc $ newGCValues { foreground = fg } drawPoint dw gc (120, 120) drawPoint dw gc (22, 22) drawRectangle dw gc True 20 20 20 20 return True main :: IO () main = do initGUI window drawing windowSetTitle window "Cells" containerAdd window drawing let bg = Color (round (65535 * 205)) (round (65535 * 205)) (round (65535 * 255))...

NOTES: Web Application Development Sucks (or at least frustrating)

I have been wanting to write this for a while, I believe ever since I started web development more than 15 years ago. Web Application Development is pretty frustrating mostly because of issues with the foundation technologies, HTML, CSS and JavaScript. Alone, they are pretty harmless and quite useful but when mixed together they seemed to step over their intended roles (CSS is pretty useless in a self-contained environment). The original intent of websites seemed to involve easily publishing text documents so that others could view information online. The documents also would have functionality to link to other documents. There you have a web of documents. The web of the mid-nineties was functional and didn't seem so bad. In 2011 so many features have been piled on top of past technology and now we are just left with this big pile of mud. Most content online is for presenting text information, like news reports or stock quotes, business profiles. But now businesses are put...

Haskell GTK on Windows (part 2)

Updated Blog Entry There seems to be some issues with the documentation as it relates to install GTK and Haskell (at least at present). There are two steps that need to be highlighted if they aren't already. Task-Remove Install Paths with Spaces: GTK has an windows installer like most windows apps and normally you would install the application/library to C:/Program[SPACE]Files/GTK[PLUS-SIGN]. Don't do that. The default install of GTK haskell win32 did not seem to work. I recommend the simple: Install to: C:/gtk Task-Setup mingw/bin in your PATH env: Also, you may need to use the mingw install that comes with the haskell platform. Navigate to Haskell Platform/mingw/bin and copy that path and add it to your PATH environment variable setting. Before doing this, you may see errors, cpp.exe is not found or other such compile errors. Adding mingw adds some of those compiler tools. Optional The glade/gtk bundle install to C:/gtk may not have all the dev libraries that you need. ...