Results tagged “java” from SweetFriday

The writer of this article, Neal Ford, apparently dislikes any comments and calls them "code smells".

He suggests that inline comments are unnecessary when method/function/procedure names are specific and they have one specific purpose.

Ford may be onto something here but he obsesses over the latest and supposedly greatest software methdologies. Some of the obsessions are dynamic languages, "agile" methodology, and "test/behaviour-driven" development. What I found worse was the re-labeling and mis-crediting of an old software development idea. Ford credits Kent Beck and calls it the "compose method" pattern but everyone else (at least those who know their history) will recognize it as a central idea in structured programming. This apparent pattern, really an old idea given a new name, describes the writing of smaller functions/methods with a clear, specific purpose. The beauty of structured programming is that it gives us a way to convert blocks of code into smaller functions.

Java Applets and Wikipedia

|
There is a proposal to allow the inclusion of Java applets into Wikipedia to increase interactivity. What this says to me is that the Web is not enough and that it is mainly a document system. Instead, the Wikipedians should build a proper desktop application for viewing Wikipedia articles and then separate it from the Web and HTML. This would allow them to display the information in a variety of forms and fix the flaws of the Web.

The first thing I would add is a way of linking to specific paragraphs or sentences. The second thing I would add is a proper discussion board system and possibly add an IRC chat component. For the chat component, I would also make it easy to paste snippets of the conversations into the discussion board. This is useful because you may have discussed an article with someone and then made changes to it, but everyone else would be unaware of your discussion unless they checked the discussion board and the discussion may have provided a rationale for why you made the change.

Java applets and more interactivity would be a fine addition to Wikipedia, but this is solving the wrong problem.

Martin Fowler wrote a brief article about composing regular expressions in order to make it easier to deal with individual "tokens" and to give them structure.

First Day of Processing Hack Week

|

And on the first day, omouse said, let the hacking begin...

First day of this Processing Hack Week got off to a rough start. Lots of development environment setup and the Maven build files were fully integrated into OhProcessing. They have also been submitted by jramsdale to the appropriate bug in the Processing bug database. We'll see how long till it becomes accepted in the main branch of Processing.

In OhProcessing I've been doing some general clean up: removing commented blocks of code that have no immediate value, refactoring a few snippets of similar code, etc. I also integrated a patch that adds support to the command-line for specifying a preferences file. This means that all text editor modes (such as processing-emacs) can now work without resorting to the workaround of copying a default preferences file to the sketch folder.

I also started coding a little tool that would have been useful for my class project last semester. It visualizes matrix transformations, so you can see how different rotations and translations affect your sketches.

Day two has begun, and the race is on to fix the bugs and code some awesome art :)

Someone over at Juice Analytics published a nifty little chart that uses Python and NodeBox. Each item in the chart is a bubble with a number. The idea is that the larger numbers have larger bubbles and are easier to see. Edward Tufte may have a thing or to say about this and would probably call it "chart junk", but let's assume it isn't.

While the visuals look cool, NodeBox only runs on Mac OS X at the moment. That just won't do! I'm running on GNU/Linux and I want some graphical goodness. I decided to convert it from the Python/NodeBox code to Processing. Processing is a visualization tool that is built on Java and runs on Windows, Mac OS X, and GNU/Linux.

The code isn't perfect and there is a lot of ugliness in terms of processing the data, but I'll be damned if this doesn't run on 3 platforms. Okay, okay, it looks a little off-center. It's close enough and it shows that Processing can handle all sorts of visuals. Since this is Processing, you can just click here to view the whole thing instead of a static image :)

In Processing Hack Week news...this past week, I've received two replies to my requests for task lists from the various Processing derivative projects. One from the Ruby-Processing developer and the other from the Clojure-Processing developer. The other news is that the GIT-repo for Processing is coming together.

For a course I was taking part-time at Ryerson University, I had to use the Processing language to create a 2d animation. I wasn't keen on Processing at first because the language looks like Java but it isn't that bad because Processing lets you avoid the Java stuff by supplying its own functions to use.

Today is ShoesFest and I am going to be trying to learn more about Ruby and Shoes but at the same time I will be hacking away at JavaScript and Java, improving Sandals.

That's the big surprise: Sandals. Sandals is going to be a clone of the Shoes toolkit except it will use a Java back-end named BeachHouse. The primary reason for this is because I need to practice my Java'ing, and the secondary reason is that I hope to eventually have JRuby and Jython using BeachHouse. So BeachHouse can be found in the beachhouse/ sub-directory of the Sandals source code package.

Unfortunately, Sandals uses Java's Swing components for some parts but I'm going to try and code up my own drawing methods for the tricky things that Shoes can do. We'll see how that goes later on today.

Happy Shoes hackin'

Links:

Squeak Break

|

I have taken the last two days off as a break from writing Java and JavaScript, and finally took a proper look at Squeak. It is impressive, and similar to working in Emacs in some ways (though much cooler).

The greatest feature of Squeak, and Emacs (and Lisps), is that the documentation for the language and environment is always around and accessible. If I don't know how a function works in Emacs or which methods an object has in Squeak, I can look it up while working in them. This has saved me from asking many stupid questions on the #emacs and #squeak IRC channels, heh.

Anyway, the break was needed because JavaScript reminded me of Scheme, and I had forgotten how horrible coding in Java can be (e.g. RedundantType x = new RedundantType...). Squeak's user interfaces may inspire Sandals in some ways, we shall see.

Check out the Squeak Language Reference

Lying on the Beach

|

Lying on the beach,
Sun cooking my bacon,
Putting on sandals, sifting sand,
I'm building a beach house today.

Oh, the ocean glows.
Can you see it now?
Guitars, surf boards, dancing people!
Party time on Java island!

Find recent content on the main index or look in the archives to find all content.

Creative Commons License
This weblog is licensed under a Creative Commons License.
Powered by Movable Type 4.1