Saturday, November 05, 2016

Length in bytes of Virtual Boy games

I'm exercising automation of data extraction. Here I have a bunch of files in different .7z files whose length I want to extract.
3D Tetris (U) [!]1048576
Galactic Pinball (JU) [!]1048576
Golf (U) [!]2097152
T&E Virtual Golf (J) [!]2097152
T&E Virtual Golf (J) [b1]2097152
Insane Mouse Mansion (J) [!]1048576
Jack Bros (J) [!]1048576
Jack Bros (U) [!]1048576
Jack Bros (U) [b1]1048576
Mario Clash (JU) [!]1048576
Mario Clash (JU) [b1]1048576
Mario's Tennis (JU) [!]524288
Mario's Tennis (JU) [a1]524288
Nester's Funky Bowling (U)2097152
Nester's Funky Bowling (U) [a1]2097152
Nester's Funky Bowling (U) [b1]2097154
Nester's Funky Bowling (U) [b2]2097124
Panic Bomber (J) [!]524288
Panic Bomber (U) [!]524288
Panic Bomber (U) [b1]524288
Panic Bomber (U) [h1]524288
Panic Bomber (U) [h2]524288
Blox V1.0 by KR155E (PD)1048576
Blox V1.1 by KR155E (PD)1048576
Croach, The (PD)65536
Etch-A-Sketch by Pat Daderko (PD)65536
Framebuffer Drawing Demo by Pat Daderko (PD)65536
GLOW Demo by KR155E (PD)65536
GLOW Demo by KR155E (PD) [a1]65536
Hello, World! Demo V1.0 by Amos Bieler (PD)65536
Hello, World! Demo V1.1 by Amos Bieler (PD)65536
Mario Flying Demo by Frostgiant (PD)65536
Matrix, The by Cooler (PD)65536
OBJ Pointer Demo by Dan Bergman (PD)1048576
Reality Boy Demo 1 (PD)524288
Reality Boy Demo 2 (PD)524288
Scaling Demo by Parasyte (PD)524288
Simon by Pat Daderko (PD)65536
Super Fighter Demo by KR155E (PD)65536
Tic Tac Toe by Pat Daderko (PD)65536
Tron VB by Pat Daderko (PD)65536
VB Rocks! Demo by KR155E (PD)65536
VeeBee Cursor Demo by David Williamson (PD)65536
Virtual Pong (PD)65536
Virtual-E Cursor Demo (PD)8192
Virtual-E Cursor Demo (PD) [a1]65536
Red Alarm (J) [!]1048576
Red Alarm (U) [!]1048576
Space Squash (J) [!]524288
Space Squash (J) [o1]2097152
Teleroboxer (JU) [!]1048576
Teleroboxer (JU) [T+Ger.4b_KR155E]1048576
V Tetris (J) [!]524288
Vertical Force (J) [!]1048576
Vertical Force (J) [b1]1048576
Vertical Force (U) [!]1048576
Vertical Force (U) [h1]1048576
Virtual Boy Wario Land (JU) [!]2097152
Virtual Fishing (J) [!]1048576
Virtual Fishing (J) [b1]1048576
Virtual League Baseball (U)1048576
Virtual League Baseball (U) [a1]1048576
Virtual League Baseball (U) [a1][b1]1048576
Virtual Pro Yakyuu '95 (J) [!]1048576
Waterworld (U) [!]2097152
Waterworld (U) [b1]2097152
keywords: virtual boy game sizes

Friday, February 20, 2015

Dead Simple Todo Tool - Open Source, Javascript, Web-Based



This is a python webserver + browser based very simple todo list tool
which augments a pen and paper based list with
- recording the dates of changes and
- infinite nesting plus reordering of items.
All the data and required media is stored locally.

How to

To run this, get Python 2 (e.g. Python 2.7.9),
run the script (`python`)
and open http://localhost:8001/todo.html in your browser.
The data is preserved over refreshes of the page and restarts of the server.


Do what you want with this (subject to the licenses of the tools used which I
did not read).


- Delete an entry
  Shift delete while it is in focus or backspace when the text is empty.
- Insert new entry below selected
  Hit enter.
- Insert new entry as child of current
  Hit shift+enter
- Insert new entry above selected
- Write '.' as the text in an entry to indent it by one level.
  Useful if you hit enter but meant shift+enter.
- Write ':' for the text to decrease the indentation.


This tool is basically
  Jon Berg's simple custom python http server +
  Manuele J Sarfatti's jQuery nestedSortable +
  font-awesome +
  contenteditable=true +
  a few jQuery hooks.


This Todo list favors simplicity and clarity over feature-richness and (over?) design.

- Paul Frischknecht, 2015/20/2

Monday, May 12, 2014

What's wrong with JavaServerFaces

When we click on the “homepage” link of the JSF entry in Maven Repository we are forwarded (from - I thought that company died long ago, but Oracle doesn’t bother fixing links) to
which currently showcases a picutre of a young man in front of the computer
enter image description here
and we are told he is probabaly working with JSF & PrimeFaces (PrimeFaces is “a popular JavaServer Faces (JSF) UI framework” that is also used in my project, I hope I’ll get to cover that too).
Now, to me, he doesn’t look like he is happily working on something interesting but rather trying hard to finally get-that-bloody-thing to work (already in the exhaustion/resigning phase – “damn, why doesn’t it work!? :(“).
This is comes close to how I feel about the series of tools I am writing about here (1).

So let’s get started tinkering about this web framework.

Wow, I cannot read on, obviously that webpage is not meant to be looked at when seriously trying to learn about jsf.

Looks like is not too bad a place to start.

To be continued…

(1): Combined with the feeling that “it cannot be so hard to make this better, let me show you”

Written with StackEdit.

What's wrong with Maven

In the project I have to work on mentioned in the last post, there are of course other technologies and tools used besides Hibernate that I have to learn (I do not come from a Java programming background so most of these are (though not conceptually) relatively new to me).
One of them is the buildtool Maven. Let’s see what flaws we can find with Maven:

  • It’s ironic how their philosophy is “don’t repeat yourself” yet they use xml for the configuration where up to half of the filesize comes from repeating words for the closing tags (yes I know that’s not what they mean).
  • They make users to define custom “properties” with custom tags. Within a pom.xml file you can write:


    where myfaces.version etc. is the name of the property I want to define. Not only do I have to repeat myself here, but the notation is not even used consistently to refer to properties and their values. In settings.xml, for a check whether a property matches some value, you write


    And we shall not forget that all the other tags used are static. I don’t even know how they got their dtd or xslt or whatever we have here to swallow this.

Btw: I have never liked and will never like xml for all its bloat and way too many ways to do things (with no visible benefits of one over the other): You can set data by:

  1. Using user defined tags.
  2. Using tag attributes.
  3. Using nested tags.
  4. Any weird combination thereof.

Also people don’t stick to one standard for writing lists of values. Sometimes they pack everything in an attribute value, leaving other programs to parse it (svg…), sometimes they go


repeating the outer word in singular in the inside, sometimes not:


Even worse, they sometimes even make use of the fact that <a>hi<br/>there</a> is parsed as one node with three children, two of them unnamed.

Proudly written with StackEdit.

Friday, May 09, 2014

Why Hibernate is a disaster

I am forced to work with this Java Object Relational Mapping “solution” (a collection of functions, annotations and configuration hell to try to fit the round peg of object oriented programming into the square hole of relational databases) for the next 4 months (2 already done - luckily). And I really have not much to say in its favor.

  • Read The use of annotations and strings to provide information is a bad choice. The former because it cannot be modified or easily read at runtime (only through awkward interfaces), the latter because it is only checked at runtime, which means never for the 90% of the code that are run 10% of the time (don’t comment with “well you need unit tests”).

  • The developers of Hibernate have never heard of the Law of Demeter.

    session.buildLockRequest().setLockMode(LockMode.PESSIMISTIC_WRITE).setTimeOut(1000 * 60).lock(entity);

    They used method chaining (the “builder pattern”) extensively.

  • The Criteria API is a distaster
    Tell me you get what these queries do without looking at the documentation:

    CriteriaQuery criteria = builder.createTupleQuery();
    Root personRoot = criteria.from( Person.class );
    Path idPath = personRoot.get( );
    Path agePath = personRoot.get( Person_.age );
    criteria.multiselect( idPath, agePath );
    criteria.where( builder.equal( personRoot.get( Person_.eyeColor ), "brown" ) );
    List tuples = em.createQuery( criteria ).getResultList();
    CriteriaQuery query = builder.createQuery();
    Root men = query.from( Person.class );
    Root women = query.from( Person.class );
    Predicate menRestriction = builder.and(
      builder.equal( men.get( Person_.gender ), Gender.MALE ),
      builder.equal( men.get( Person_.relationshipStatus ), RelationshipStatus.SINGLE )
    Predicate womenRestriction = builder.and(
      builder.equal( women.get( Person_.gender ), Gender.FEMALE ),
      builder.equal( women.get( Person_.relationshipStatus ), RelationshipStatus.SINGLE )
    query.where( builder.and( menRestriction, womenRestriction ) );

    and even if you do, tell me why I have to call “builder.” all the time.
    Well that’s because Java just wasn’t made for building code like that - which should have been clear from the start.
    Their older api seems to have been slightly better:

    List cats = sess.createCriteria(Cat.class)
        .add("name", "Fritz%") )
        .add( Restrictions.or(
            Restrictions.eq( "age", new Integer(0) ),
        ) )
    List cats = sess.createCriteria(Cat.class)
        .add( "name", new String[] { "Fritz", "Izi", "Pk" } ) )
        .add( Restrictions.disjunction()
            .add( Restrictions.isNull("age") )
            .add( Restrictions.eq("age", new Integer(0) ) )
            .add( Restrictions.eq("age", new Integer(1) ) )
            .add( Restrictions.eq("age", new Integer(2) ) )
        ) )

    But what does the word “Criteria” have to do with the notion of a database query?

  • Of their guides and docs I have looked at, the “Getting started guide (brief)” is a joke, “Getting started guide (full)” too and “Developer’s Guide” is hard to read, incomplete and full of spelling mistakes.

  • The javadoc documentation for the most important class “Session” is poorly written, e.g. referring to this interchangably (and patternless) with any of “the current session”, “this current session”, “the session”, “this session”.
  • From the javadoc

    Change the default for entities and proxies loaded into this session
    from modifiable to read-only mode, or from modifiable to read-only

    (Yes, it is twice the same.)

  • Flags are either documented as “Checks” or Questions:

    Check if the session is currently connected.

    Will entities and proxies that are loaded into this session be made read-only by default?

    (not to mention that javadoc doesn’t recognize the ? as ending a sentence and therefore goes on to find the next dot).

  • Spelling mistakes even in the javadoc: In Hibernate.Query:

    … to Hibernate types using hueristics.

  • In Query, the methods taking LockMode are not deprecated, unlike in Session.

  • Everything throws HibernateException, there is no way to differentiate between these programmatically excpet with their message strings - for which of course you will only know (if you are lucky) at runtime that you spelled them wrong.

  • getNamedParameters()
    Return the names of all named parameters of the query.

    Obviously, this method should have been called getNamedParameterNames() [let’s not discuss the poor naming choice], then the documentation would be moot. But if I read get(Named)Parameters, I think of getting their values.

  • The forum consists only of spam (first non-sticky entry in “Hibernate Users”: “Watch Frozen Online Free”). Which is also why I did not post all of that there.

I think I could go on. Unfortunately I don’t have the time nor the creativity to write as entertaining a rant as “PHP A fractal of bad design
Maybe I will wrap this up one more time once I’m done with it.

PS: Wow, the blogspot editor is annoying to use too, copying the style of the text I paste - can I turn that off? Please forgive the terrible formatting.

Edit: Now using to write my entries with markdown.

Friday, March 21, 2014

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

This was driving me nuts today -- trying to get Oracle SQL Developer 4 and/or a simple java code (in the style of ) to "connect" to a local Microsoft Access Database .mdb file. But I kept getting the not-very-helpful message

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

luckily, I have been able to sort out this problem with the help of


I have 32 bit office installed, so I didn't have the 64 bit Access Database odbc driver.
I love it when the biggest troubles in programming something are things like that.

I will change this.

Friday, March 14, 2014

Saving files is outdated

Some time ago, when disks where really slow or files where even stored on external, even slower devices (cassettes, floppy disks) it may have made sense to specify when exactly to save a file because you had to wait a considerable amount of time. However with modern harddrives and usb sticks and whatnot, this concern is out of the way. I hate it when I have to save files manually in any program, especially in text editors. First thing I do is look for an autosave plugin.

However, programs should allow as many levels of undo as possible and keep the history even after restarting a session.

vim can do this