Sunday, August 26, 2012

Blacken Java Library update

So, when I put Blacken to the side, I had posted code, but I was unhappy with it and I was feeling pretty down with the whole thing overall.

Not so anymore. I ran across someone speaking relatively highly about it. It encouraged me to fix it. I have someone developing it with me now. I have other people writing games using it.

Next month we release Blacken 1.1. It stomps all over the 1.0 release.

I'm planning to start writing an in-depth "Developing a Roguelike Game with Blacken" tutorial after the release.

(I'm putting aside NaNoWriMo this year to work on it. I've loved NaNoWriMo, but I need to finish the first pass of big edits to my first book and... well, so far it hasn't happened. I am committed that my next NaNoWriMo related task will be to replan and rewrite my first book. It'll be mostly a rewrite, but the bones are good. I'll be keeping the good things.)

So, yeah... major changes in priorities, but these things happen periodically. As they say, "Life is change."

This actually marks the second year with a Blacken release, as I released it to the community about a year ago next month. I actually expect 2012 to see a second release, as well, as I'm planning 1.2 to be a release to fix the nits that crop up while writing the tutorial.

Monday, December 19, 2011

An example of Java being broken-by-design

Java complaint: java.sql.Timestamp is based upon java.util.Date, so you can pass it to functions expecting a java.util.Date. The difference is that java.util.Date specifies time is millisecond-precise and java.sql.Timestamp specifies time is nanosecond-precise. They can both be assigned a value using using a millisecond-accurate function with the same name. However, if you compare a Date and a Timestamp initialized to the same millisecond-accurate time, they are never equal.

This means that while there is fancy object-oriented code-reuse arm-waving, if you actually try to use these classes in a generic manner things fail mysteriously. This is fundamental breakage in the design. First they "enforce type-safety" then if you actually rely upon type-safey you get bit in the ass.

This is documented (from http://docs.oracle.com/javase/7/docs/api/java/sql/Timestamp.html):
Due to the differences between the Timestamp class and the java.util.Date class mentioned above, it is recommended that code not view Timestamp values generically as an instance of java.util.Date. The inheritance relationship between Timestamp and java.util.Date really denotes implementation inheritance, and not type inheritance.
This gets me in a lather. Clearly being a child of java.util.Date means nothing.

What they should have done was have a Date-like interface specifying the getTime()/setTime(long) functions and defined that they accepted time in milliseconds and their epoch. Then we could use any getTime()/setTime() related function the same without caring about the advanced features it possessed.

As it is there are too many different ways to specify dates and they're all incompatible. It's almost easier to pass time around in milliseconds and convert to the desired type as-needed.

Sunday, November 27, 2011

Roguelike development deferred

For now all my roguelike projects are officially deferred for the indefinite future.

The Blacken Java library is on code.google.com. It is currently usable, and I may use it on a 7DRL at some point. There are no immediate plans for a full-scale roguelike.

The Python STEW Roguelike library ran in to trouble with the desire to go to Python 3. It also suffered from repeated redesigns. The dependency on full Unicode support -- while required for my goals -- further complicated things. Add to this many of my goals for it are now met with LibTCOD, and it just isn't high-priority.

The joy I get out of talking about writing projects is just as great as the joy I got out of talking about Roguelikes or my other projects when I managed to talk to someone who "got" it. More than this, the chance of an average person "getting" what I am talking about is so much higher that it is suddenly a joy to talk to complete strangers about my passion projects.

This site will remain the location for my random tech notes. The primary audience here has always only been me.

Friday, November 25, 2011

New writing blog

My writing/fiction work officially has a blog of its own.

S. W. Black, a blog named after my (current) fiction writing moniker.

Tuesday, August 31, 2010

A reStructuredText template for novel design using the Snowflake Method

This has been moved to my writing blog: http://swblack.blogspot.com/2010/08/why-authors-should-future-proof-their.html

[If you just want the goods, the original reStructuredText (.txt) template is available as well as a rich-text version that was uploaded to Google Docs.]

Why authors should future-proof their notes

This post has been moved to my writing blog: http://swblack.blogspot.com/2010/08/why-authors-should-future-proof-their.html

On the writing project

Until the end of NaNoWriMo 2010 this blog will also cover my writing projects. The success (or failure) of NaNoWriMo will determine whether I should think about having a separate literary blog in addition to this rather technical blog.

This "Projects and pastimes" blog has a history of being project notes, and usually fairly technical (when I'm not just ranting about some technology). If I'm going to pursue writing, it would make sense to keep the two separate. (As my spiritual blog will remain separate.)

At one point this blog was part of a personal blog. I've done the splitting before. I just wanted to warn folks.