Monday, September 25, 2006

Taggable Interface

Usual information organization involves trees or even linear ordering.
For useful info this is damaging, as it adds structure which is not there.

Better idea is to allow user to perform easy clustering, or tagging in primitive form. Well, it is easier to say than to do, but HTML/JS might be the proper way to do it.

Autopsy

The death was caused by over-posting. One meessage a week should have been enough.

Thursday, September 21, 2006

The End.

This blog is dead.

Maerialistic World

Time and again one seemingly impossible bug turns into a simple typo, replaced by another, now absolutey, definitely impossible bug.

Again, everything is clear, all two parameters set, all files generated and checked - yet - -lblah not found.

That's life.

Wednesday, September 20, 2006

Anger iControl is Futile

Know how to program.. what's this? Able to write some programs, half-working, full-crashing? Simplest change leads to a work-day loss at best, and forever dead program usually.

Compexity is out of control, it is all like going over a minefield (or a Mandelbrot set)

Leningrad combined with high-volume discussion on where to go for post-doc (in chinese) is just a nice finishing on top of the picture.

Monty Python

Other peoples' interests sometime slip into here, and leave a trail of links -

A nice collection found in LJ here:
(needs to be sorted, though, meanwhile - as is)


1. Гитлер в Англии
2. Спам
3. married
4. Murderes
5. Археология сегодня
6. Французский скетч
7. Мышинная проблема
8. Bicycle repairman!
9. Самая отвратительня семья в Британии
10.Mosquito Hunting
11 Программа "деньги"
12 A Man With Three Buttocks
13. Матрасы
14 Как противоречить людям
15 Кража телеведущего
16. Interesting people
17. Контрабандист
18 Мясо
19. Прием на работу
20. Язык жестов
21. Танец ударов рыбой
22. Кофе с Тони Вильямсом
23. Епископ!! (The Bishop!!!)
24. Семаформная версия
25. Красная шапочка
26. Вальс
27. Артур "две хижины" Джексон
28. Лётная школа
29.I Wish to Report a Burglary
30.Confuse-A-Cat Ltd.
31.Johann Gambolputty
32. Cкучная жизнь брокера
33.How To Do It
34.Концерт Чайковского
35. Побег
36. Пингвины
37 Раздевание
38. Слова
39. Уроки итальянского
40. Министерство глупой походки (телеверсия)
41. Spectrum
42. Грабитель
43. У меня болят мозги!
44. The Llama
45. Deja Vu
46. Донор
47. Офис (телеверсия)
48. Теннис
49. Бросание в реку
50. Сырный магазин
51. Оскар Уайлд
52. Боксер
53.Camel Spotting
54. Грязный викарий
55. Рождество в раю
56. Комната ожидания
57.Королева Виктория
58. Книжный магазин
59.Забег королев викторий
60. Туристское агенство


P.S.

Todo - Configuration and Interaction

Finally, when rendering sort of works, it;s time to make all the bunch easily installable, otherwise it is stuck on my notebook.. not grid'y enough.


  • Make the system configurable in XML - TinyXml

  • SCons - use .ice files to build stuff.



Then, some sort of feedback from the user should be possible.

  • New cubes remove old ones, enabling editing

  • Additional interface for commands from the user - similar to how it works now but in the opposite direction

Overflow

When something happens one can assume it is magick and try random modifications to fix it. Better way is to find what is so specific about the situation where problem happens - and check the edge conditions.

Often the two approaches get combined in one - desperately do random changes, and explain why it worked from the materialistic standpoint (once it worked, that's it).

In this particular case, when normal is exactly aligned with X, Y or Z, char gets overflowed and the normal starts pointing the other way. Stupid.

Tuesday, September 19, 2006

Uniform Bugs


The project got so many levels of indirection that even the simplest operations produce obscure, difficult to trace bugs. The worst patr about the bugs is that they appear where least excpected. Propagation algotithms is what I have been doing for 5 years, and calculation normals is trivial part of it.. Yet, normals are flipping at will at random places.

Source code shows no problem (it is just 7 lines in all, scattered across server/client/proxy-client/applet). So WooDoo and temorary support is pending.. changing a handful of clean lines into a couple-pages mess.

Ad-hoc Information organisation

A blog is usually linked to wider web, and is not expected to reference itself too much. Author is mostly concerned with what to present, occasionally supporting the text with some external references.

A page in a *wiki* most likely has links to another page of the same wiki. Hence, for proper "wikiing" one has to have very good idea of where things are, and how current writing is related to the rest of content.

Both are two sides of the same coin - organizing chunks of information. Blogs are organized automatically but not in a very useful manner (timeline), Wikis - by hand, so additional effort is required.

Tags seem to bring the two closer together - tags are much easier to add than links, and they can be used for adding structure automatically.

There should be the next stop, though... meanwhile, blogging.

Additional Commands Not Needed

Space is divided into cubes. Each cube goes to its own processing node, and gets converted into surface.

Now, we have a problem. Once surface changes, we need to detect what cubes to remove and what to leave where they are, independently from one another.

Possible solution is to mark cubes in the neibourhood of the modification for re-surfacing, so that they automatically propagate over new surface. Old surface, can be used as seeds, with added benifit of being automatically removed afterwards.

All this solution requires is a bit more robust Cuber.

Middle East, Pre-WW2



This was hard.

Once I have seen a beautiful collection of images from Israel.
It was posted by a user in a community.

Pictures from Israel

Now I found them again, which involved getting a new browser, sifting through old web pages and coming up with clever google searches.

Finally, everything boiled down to Old Photos, remembering the user sensen and asking google for "site:sensen.livejournal.com".

GZIPOutpitStream & GZIPInputStream

In Java, there is a Stream interface to ZLIB compression. In order to use it, though, it seems like you have to create and .finish() both ends of the stream once in a while.

Here are several solutions.

WriteUnsigned stuff

Why there is a function readUnsignedInt() but there is only writeInt() and no function writeUnsignedInt()?

Well, because writeUnsignedInt() and writeInt() would do same thing anyway - just dump the integer in question bit-by-bit. (Swapping bytes, matbe)

Monday, September 18, 2006

Java or C++

After ice and applet problem surfaced, I had to decide how to do the communication.

  • Do the whole ting in the coordinator itself in c++

  • Write additional code for an 'server-side proxy' to connect to the applet with usual TCP connection and with Ice protocol to to the coordinator.


Currently, I decided to take the second route because:

  • Socket programming is easier in Java, especially as the other side is also Java.

  • Serialization of objects is straightforward, thaere are no endianess issues. (ok, there are, but handled by Ice)

  • Standalone communication module is needed anyway, as coordinator will most likely be running on a firewalled machine

Scons Jar()

If a java file contains more than one class, javac uses $ (dollar sign) as a separator between class names, so the resulting classes look like:

TopClass.class
TopClass$InnerClass.class


Now, I want to put the classes into a .jar, so I do the following:

classes = env.Java(...)
env.Jar('all.jar', classes)


Sure enough, all.jar ends up containing only TopClass.class. Why? Because if I try

classes = ["TopClass.class", "TopClass$InnerClass.class"]
env.Jar('all.jar', classes)


I get parse error in the first line because "$InnerClass.class" is interpreted as a variable either by scons or by python.. (well, otoh usual python does not have any problems with the first line)

Let's see what people from the news group tell us, and use a shell script meanwhile.

Zeroc and Applets

ZeroC Internet communication engine is cool.
I could make several comuting nodes collaborate with each other quite fast and in a robust way, which is quite amazing given my (lack of) programming skills.

The results of the computation are to be visualized on the web, using a web applet. I have found out too late that it is currently not possible.

Options are:

- Pay USD10k and get it developed by ZeroC.
- Use debugger to fix it myself (looks like a minor issue - just catch an Exception.
- Write this particular line of communication without Ice at all.

My guess would be 3 then 2.. 1 sounds too much.

Honda CB-125T Revived! (real picture later)

Well, at least something useful is done today. My first bike again alive and kicking, even if it is 5 am and I had to pull it around campus for a while. Othervise, it would have emptied the new battery and ruined starter.

Now the tank is full, carburator sort of live and the dust is wiped away... feels good.

Blog - 17/47

Have forgotten what I wanted to write about.

3 am. Again. But let it be. What a moody journal.

When I waste time, it is always .17 or .47 on my watches.
Always.

What is distraction And how to fight it

1. (oblig.) Writing a blog.
2. Fining out what people who I don't give a shit about think of issues I never knew existed in the first place.
3. Persuading myself it has some merit in it... .


Is it possible to arrange everything by interests? Or even just arrange? Google Destop Search and friends can sure find anything, but at least I should remenber that this anything is there, and remember to use it.

Some sort of map comes to mind.

First problem is to tell a good distraction from a bad one. Or, tell good and bad in general. (Here we've got a nice example of distraction proper, btw)

Second problem appears after we got some guidelines - and it is to follow them. Can bad guidelines be worse than none at all? Probably. But at least following them gives skill of staying on-topic.

So.. back to work then.

Ad-hoc software development

Each application works by interacting with something - calling this or that function, or, on a higher scale - opening a file, connecting over network..

So the idea is to write some minimum of code which uses all such interactions, but does not do anything except for testing them out.
Often, while writing such code, it occurs that there is a better way. Then it is easy to change the course as no important code was yet planned and written.

Once the interaction works and the rest is obvious, I quickly add the rest, knowing that all the needed stuff is ready to be used whenever needed.

This is the fastest way to build unreliable software without any planning whatsoever.

Anger control and APPLET tag

It never pays to be angry.. and yet happens all the time.
Java (Applet) combined with loud chinese Conversation is a sure recipie

so, here is the cure:
http://www.w3schools.com/tags/tag_applet.asp
<applet height="700" width="700" archive="all.jar" codebase="code/" code="MainApplet.class">

where all.jar - archive, whose name can be manipulated for versioning
code/ - path inside the archive
MainApplet.class - note the ".class" suffix.

Collaboratively editable in-game worlds

Massively multiplayer game:
http://secondlife.com/

Opensource single/multiplayer FPS -
http://www.cubeengine.com/

Sunday, September 17, 2006

scons Java classpath

For some reason, defining custom classpath in scons is (a bit) difficult:
from:
http://scons.tigris.org/issues/show_bug.cgi?id=1009

env = Environment()
env.Append(JAVACFLAGS = ["-cp", ice_dir+"lib/Ice.jar"])
env.Java("code", ".");

AttributeError: SConsEnvironment instance has no attribute 'Java':

if SCons does not know where Java is, it will not create 'Java' 'BUILDER'.

Even if java is in the general $PATH, scons might still miss it as it only searches python's path, which is for some reason different.

In /scons/ ... /posix.py, it says:
env['ENV']['PATH'] = '/usr/local/bin:/bin:/usr/bin'

which probably means only these locations are searched for java.

changing it to:
env['ENV']['PATH'] = os.environ['PATH']

hepls.