View Posts

Next > Last >> Page 1 of 14

On Spring MVC

Posted by lucidfox.org at

I can already see what a pain it will be to maintain an existing application based on this atrocity of a framework.

It’s exactly like Oleg said: an application written in XML with configuration files written in Java.

Today’s Dream

Posted by lucidfox.org at

I have a feeling that what I remember from my dreams usually occurs in the last half-hour of sleeping or so.

In today’s dream, I was watching Stargate Atlantis on my grandmother’s TV (another recurring element). At first it was the usual kind of episode, with the season 2-3 opening, then things got weird.

One of the episodes, ostensibly a season opener — and I even remember vague imagery from it — used a different opening with modified music, which had a green tint rather than the usual blue and involved, among other things, my grandmother’s dacha. Somehow, the action later jumped to my parents’ bedroom, where I watch Stargate episodes at times, and I found myself also reading a newspaper (and discussing it with someone). The newspaper had pictures of a fictional Russian politician and portrayed him in negative light. His name was given, but I don’t remember it — all I remember is that he looked roughly like Marrick from The Ark of Truth.

The episode also somewhat echoed an imaginary Transformers episode I saw in an earlier dream.

After the discussion, and while still watching the episode, I looked at my face in a mirror and discovered that my beard, which I shaved off last evening, already grew back to a ridiculous length, and I had to shave it again — while still standing in the bedroom — first with a trimmer and then with a razor.

Admittedly, my hair does grow back too fast for me to keep up. Everywhere.

On WOTLK and WILD

Posted by lucidfox.org at

I finally downloaded and installed the thing — hopefully it will stop dreams about it.

On to level 55.

Having nothing to do, I went to bed earlier than usual — at 23:28. I spent that time on another WILD attempt, which I can now call semi-successful.

I started with the usual full-body relaxation, from the toes to the head, and as soon as I reached my eyes, I concentrated on the visions and stopped paying attention to both my body and external distractions. Eventually, after some hypnagogic imagery, there was a very short blackout that I don’t remember, after which I ended up not feeling anything, just moving along the road from the Gorodok shop to the Trade Center as a kind of disembodied observer.

And then TWANG! I dropped out, and suddenly weird but pleasant feelings of “electrification” started running through my entire body. I waited until they calmed down a bit, then recalled (with effort) the scene I dropped out of and continued to induce the vision. To avoid thinking about my limbs, I just imagined floating in the air on the street and pushing myself forward with force of will.

Twice along the way, I started feeling my imaginary arms — dream arms, if you will — going a bit back and forward while I could still feel lying in my bed. And both times, it once again ended in a TWANG! and weird cessation of the sensations that vocabulary lacks the words to describe. Also, there were three cases of “near-blackouts” when for a split second I thought I was about to lose my consciousness — before, that feeling rarely occurred when I was feeling sleepy after not getting enough sleep.

After that, I looked at the clock and saw that it was 00:14, and decided to just fall asleep as usual. I remember enough of the dream that followed to write it down. Which I’ll do in the next post.

Today’s Dream

Posted by lucidfox.org at

First, I accidentally saw some Russian TV series (of the usual variety with boring camera shots and wooden acting) that used the opening music from Stargate Atlantis overlaid onto an original video sequence. Needless to say, I was enraged.

Later, I was wandering around the microdistrict looking for a place where I could buy the European WOTLK. (Because — and that’s a real life fact here — only the Russian version is present in retail stores. Mind you — now this is from the dream once again — I checked an Internet shop before, but its delivery time was listed as one to two weeks, and I was understandably unimpressed.) I found it in a fictional location that has already been present in one dream before that — in that one, it was the site of a WoW-ish battle between some dwarves and… a different clan of dwarves, I think, although I don’t remember.

In both dreams, that fictional building displaced the square with my former school and the nearby hospital and kindergarten. This may be another emerging stock location. Its distinctive feature is a white hallway with windows at one side and doors at the other, resembling the school and hospital from Evangelion, as well as the actual school that the building replaces.

In this particular dream, one of the rooms behind the doors was a medical-looking office, in which I bought a WOTLK box using my Visa Electron. Incidentally, along with it, I also took another card out of my pocket: the white keycard I use to open the door at work. They commented on that.

And once again, I found myself unwilling to wake up because it would mean losing the newly-acquired game. In all seriousness, this has to stop. Today I’ll go to the nearest academ.org office, buy a WebMoney card, and just buy the bloody key online. Screw the box, and screw Blizzard retailers.

Added: While I could find neither the means to buy WebMoney cards nor the means to transfer from a Visa to a WebMoney account, amazingly enough, Blizzard made it possible to upgrade the account online. At long last… Now I’m looking at the download screen instead of playing the game for the 3 hours remaining before I sleep because I can’t play the TBC client with a WOTLK account. “Thanks”, Blizzard.

A Thought

Posted by lucidfox.org at

Sephi mentioned offhand in guild chat that she would like to marry a “pretty draenei male” in-game.

But in all seriousness… “pretty, draenei, male” is like “cheap, fast, high-quality”. It’s a “pick any two” thing.

Today’s Dream

Posted by lucidfox.org at

And once again it’s related to my activities in WoW just before going to sleep. It’s seriously getting irritating.

Helik (I think it was Helik) wanted to hold this week’s guild meeting in Un’Goro instead of the traditional Forest Song, so, while hopping through Un’Goro, I pointed out that many guild members will be too low-level to get there safely.

Today’s Dream

Posted by lucidfox.org at

As usual, there was something related to WoW — but the details escape me.

What imprinted in my mind was a navy-related scene, which occurred in a place resembling the coast of the Ob Sea, but with a steep slope resembling those I saw on the banks of the river Katun. A brand new vessel with newest technologies, painted white and red, specifically built for a captain who was an acquaintance of mine (in real life, I don’t know any captains), was being ceremonially put into the water. However, it fell on one side and nearly drowned, and it had to be taken out of the water and modified to remedy an unforeseen design flaw.

When it was launched the second time, it got out of control, and its weapons (what were they doing on a civilian vessel?) promptly started firing on battleships in the bay, sinking a few of them.

Apparently, this particular scene was invoked by my attempt to get onto The Kraken (brand new by WoW standards) from Stormwind Harbor just to see what would happen to me if I tried to sail to Northrend without the expansion. In the game, it teleported me back to the pier.

It’s interesting to note that so far, my dreams that I’ve written about here have been directly influenced by what I was doing just before falling asleep. Three years ago, I successfully induced a particular occurrence in a dream, although not quite the way I expected. Perhaps it’s time to repeat the experiment?

It’s also interesting to note that I hardly remembered anything about the dream at all immediately after getting up, and it “clicked” in my memory when I was viewing a completely unrelated picture about an hour later.

“How Do I Reset an Oracle Sequence?”

Posted by lucidfox.org at

When it comes to operations outside the scope of standard SQL, Oracle developers have a… strange perception of usability. Operations that should by all means be simple and intuitive often have highly counterintuitive solutions.

Question: How do I reset an Oracle sequence to its initial value?

The solution is, apparently, to use ALTER SEQUENCE to set its INCREMENT BY value to the negative of the current value, then select NEXTVAL from it, and use ALTER SEQUENCE again to set the increment value back to 1.

Really, it’s easier to just drop and recreate the sequence… Intuitive, all right.

And how do you generate SQL INSERT statements from a table in Aqua Data Studio? The answer is, obviously, to export the data to a delimited file, then re-import it, but instead of committing the changes to the database, select the “Preview INSERT statements” import method. And Stallman forbid you accidentally select different tables for export and import, because it will gleefully try to interpret the file as describing data from the wrong table, with predictable results.

Today’s Dream

Posted by lucidfox.org at

Occurred almost entirely in WoW, in my traditional deep immersion gaming fashion.

Erales lamented my inability to follow him to Northrend, so, eventually, I gave up and upgraded my account to WOTLK just to be able to visit Northrend, even though I was too low-level for it. After that, as we were standing in Stormwind Harbor, it turned out he didn’t like the zone where the ship went — so I teleported us both to Menethil (simply by thinking about it!) to board the ship bound for the other zone.

However, before we could, I noticed that my character was somehow level 64 (so far, only 48 in reality), which meant I was eligible for a death knight. I went to the character creation screen and started creating a draenei DK — fortunately, the random appearance that was there from the start more or less matched the one I wanted to play.

As I was waking up, I found myself unwilling to, on the grounds that all that would cease to exist and I would find myself once again with a TBC account and no death knight.

On WOTLK

Posted by lucidfox.org at

Shattrath is empty. It’s actually weird, after all the time it took me to grow accustomed to the Terrace of Lag. Everyone is in Northrend now — I’m only level 48 so I don’t care about the expansion much for now, but I can only imagine how lagadelic it is at the moment.

Well, at least it means that I can lead friends to Shattrath and roleplay there relatively uninterrupted now.

The old world is flooding with death knights. Stormwind, as the de facto RP hub of Argent Dawn, has suffered particularly. I’ve already met several stereotypical ones, one Mary Sue description, and roleplayed with one “nice” DK. I’m tempted to walk to a random draenei DK and ask how the heck this race-class combination makes sense.

And why did everyone decide they’re all undead, anyway? What are undead DKs, then — doubly undead?

Today’s Dreams

Posted by lucidfox.org at

Way too chaotic. I woke up three times, I think, and I hardly remember what happened between the awakenings. I don’t have a habit of getting up and reaching for the pen and notebook to write the keywords, although I do have them lying on my table specifically for that.

However, I remember that they were centered around Atlantis from Stargate Atlantis, which makes sense because I was reading episode summaries before I went to sleep. Also, in the dream, I mused how expensive the computer books I was interested in were, which also makes sense because I went to a bookstore on the way home yesterday and irritatedly noted the same thing.

Moonlight

Posted by lucidfox.org at

I still can’t find any satisfactory rational explanation for why so many people find moonlight romantic, myself included. For some, it extends to any kind of dim light, and they theorize that this is because, with the picture ahead of you being less clear, your brain has to “fill in the blanks”, and you can do that in any way you want.

However, I can’t stand candlelight, or dim lamps, for that matter. Although I do like artificial light sources that embellish the color white and make it look shiny, but that’s different — I like it for being surreal, not romantic.

Apparently, the word “moon” has become so associated in my mind with the words “lucid” and “dream” that whenever I hear one of them, the other two immediately spring up as well.

I like snowy winter nights, especially when there’s no cold wind. I like to stand under snowfall, with moonlight illuminating the surrounding snowdrifts and trees, turn on my player and listen to my favorite Mai-Otome songs, which almost seem to be designed to be heard that way. I want to hear Otome wa DO MY BEST deshou! on New Year’s Day, while I’m eating the traditional food.

When the moon is visible from my room at night, which (unfortunately) doesn’t happen often, I like to pull the curtains open, letting moonlight flow into the room, and lie naked under it, first on my back and then on my stomach, looking at the light caressing my skin. I’ve been doing that since 15, and this real-life fascination is where my character’s obsession with moonbaths in WoW stems from.

Old Dreams

Posted by lucidfox.org at

Written in Russian. I’m posting this mostly for myself, so I can one day rewrite the descriptions in English.

Today’s Dream

Posted by lucidfox.org at

I was at the Ring, going downstairs in the direction of the post office with someone and discussing a famous person, possibly a writer, who apparently lived in my neighborhood. We were discussing why anyone like that would live in such a mudhole.

I think my grandmother also made a brief appearance, possibly at the bus stop.

Later on, I was at a lecture in a hall resembling the one in the new sports complex, except it was a separate building in a fictitious location that nevertheless appeared in one of my earlier dreams. Suddenly, my father barged in and started arguing with the teacher, saying that his discipline (something math-related, possibly related to the theory of probability) had no practical applications.

Also, in the dream, someone on linux.org.ru found one of the websites made with our predecessors’ system, and people laughed at it.

How to Write an Unmaintainable CMS

Posted by lucidfox.org at

Everything written below comes from personal experience of maintaining a Java CMS written by our predecessors, who gave us next to no instructions regarding that pile of code.

  • Don’t use an ORM library. If someone calls you on it, tell them that there were no ORMs available in 2003. Instead, write your own ad-hoc, bug-ridden object mapping layer that only works with Oracle.
  • Don’t use reflection to automatically handle POJO classes being mapped without writing boilerplate code. Instead, ensure that every class has a corresponding DAO class consisting entirely of copy-pasted code to insert, fetch, and update database records on the JDBC and SQL level.
  • As such, for every new database table, add three new classes and two interfaces.
  • In the base class for all those, use a primary key field of type Object. Ensure that it can really mean BigDecimal, Long, or Integer depending on the context, even for the same class, so to actually get the number value of the primary key, you have to write something like Long.valueOf(obj.getPK().toString()).
  • Pass all data in non-generic Lists (admittedly, generics weren’t invented yet) without any comments about what type these Lists actually contain.
  • Ensure that the core CMS library, the individual websites, and the utility application used for copying the database between hosts all use different technologies. For bonus points, make the utility application use pure JDBC on the lowest level possible.
  • Use a helper library written by your predecessors whose source code is lost, so your successors will have to decompile it first.
  • Depend on an application framework but never use its core features, rather only helper classes and tag libraries.
  • In JSPs, use nondescriptive names for temporary variables holding objects being rendered, such as “obj” or “list”.
  • Instead of using the traditional MVC pattern and letting the controller select the view, link to JSPs and let these JSPs call “pseudo-controller” classes that do all the parameter processing and redirection.
  • Start the name of such a pseudo-controller class with an arbitrary letter combination and ensure that nobody knows what it means (such as “PL”). Give all instances of these classes an identical and equally arbitrary name (such as “UC”).
  • In said pseudo-controllers, don’t use POJOs to represent submitted form data. Instead, use a self-written form-parsing library that requires to create a member object for every request parameter. Make all these fields public and refer to them from JSPs, better several of them at once.
  • Inherit these pseudo-controllers, so that you can’t tell what form fields are being handled without going all the way to the top of the class hierarchy.
  • Include JSPs in other JSPs, and in the included ones, reference objects declared in the outer one.
  • Create new sites by copy-pasting old ones, so that common functionality added along the way ends up being spread instead of consolidated in the core library. Ensure that every new UI-related feature requires modifying every site in which it’s already implemented.
  • Hardcode application logic into JSPs, or into the obscurest classes you can find in random places.
  • Tie the core library to the common admin panel, requiring it to be redeployed every time something changes.
  • Make said admin panel ridden with editable features that don’t actually work because they weren’t implemented for this particular site but nevertheless can’t be disabled in the admin panel.
  • For every feature, write two classes in different packages that do the same thing but slightly differently.
  • Use lazy singletons everywhere. Inherit them and initialize them in the strangest of places so that everything breaks down if an include is forgotten.
  • Use a self-written authentication system that randomly clears the session upon authentication for an unclear reason, and make the authentication so mind-boggling as to make that particular quirk as unfixable as possible.
  • Make the admin panel (which every application depends on) cache the page tree for every single site that exists in the system upon loading, and write that part as inefficiently as possible, so that the server spends minutes reloading the application when it starts fetching page structures from the database.
  • Have three different ways of sending mail and make each application use one that its developer liked the most.
  • Upgrade the built-in proprietary JavaScript-based text editor with major pain, then downgrade it when it turns out that the customer bought the wrong version by accident.
  • Make the menu handler return URLs that end in “.jsp” even though such JSPs don’t really exist and are all handled by one three-line JSP per page type.
  • Require restarting the target server every time the utility copy application is used.
  • Hardcode full URLs in the database, so that a text replace function has to be built into the utility application specifically to replace those.
  • Make error messages that the end user sees as non-descriptive and user-unfriendly as possible. They’re sure going to be fascinated when trying to register an account to find out that “NAME_EXISTS”.
  • Hire a web designer who insists on using table layouts, tag soup HTML, split images and no doctype on the grounds that everything should be compatible with IE5. In 2008.

Today’s Dream

Posted by lucidfox.org at

Two parts.

In the first part, the annoying relatives were back, and we had another collective meal, during which some strange dot-like object started floating through the room, bouncing off walls. I thought that it could be a black hole, and that there could be ugly consequences for me if it touched me, so I went out of the room, and everyone else soon followed.

Later, they all went into the car, and I didn’t fit, much to my delight — so I used the excuse to remain outside.

I then went to the “pirated CD and DVD shop” from the video. They were showing a movie for passers-by — an Indiana Jones movie other than the real four. I noted this fact, but decided it could be some kind of Expanded Universe movie.

Later still, I was in a routed taxi, and for some reason, it was passing by our house (they don’t actually). I missed the stop, so I asked the driver to stop “somewhere close to it”. It stopped near a mini-shop, where I went to buy a two-liter bottle of Coca-Cola (never minding the fact that I was already carrying three one-liter ones), and I was immensely frustrated that only the vanilla version was available.

The second part of the dream was about France in the time of the musketeers, as depicted in Dumas novels. I find it interesting that this was the second time in a row when I dreamed of a pseudo-historical period after thinking about it that evening.

The SparkLife Gender Test

Posted by lucidfox.org at

It all adds up… we feel 4% certain that you are…
A Woman!
Compared to others…

50% more male than you — 7% like you — 43% more female than you

So, how am I supposed to interpret the results?

The questions are fairly random and not associated with gender roles, and the calculations are based on users who took the test before.

What can I say? This kind of “in-between” result is close to what I expected, although I thought it would slant towards male. However, it also worries me that when I forgot to answer one question the first time (because I didn’t know what the words “brass” and “knuckles” meant), and then went back to that page and answered it, my score changed to this from “2% certainty of female – 49% more male than you – 1% like you – 50% more female than you”.

The statistics for the questions are quite interesting for 8 million previous takes — given the law of large numbers, I expected such questions to have only slight deviations from 50% gender-wise, but at least one percentage reaches 57% (and I don’t doubt there are more). It’s interesting for the sole fact that it’s based purely on statistics, without presuppositions. The actual answer, however, it too unstable to slight variations in answers and thus should be taken with a grain of salt.

Images are pure Nightmare Fuel, so I’m not going to reproduce them here.

You can take the test here (requires registration).

Today’s Dream

Posted by lucidfox.org at

…involved Sephi introducing me to the mythical ancient Egypt, in particular the gods, while we literally were there.

Needless to say, it felt quite Stargatish.

“Sleep Enough.”

Posted by lucidfox.org at

Yesterday, after coming home from work, I took a three-hour nap, from 20:00 to 23:00. I honestly don’t remember what I dreamt about, only that there was a dream, and there was a dog in it. When I woke up, I tried to stand up, but my body didn’t move at first — and the apparent dissonance between the command to the muscles and its non-execution made me feel a bit dizzy for a few seconds.

When I stood up, I still was a little sleepy, and I felt I wasn’t completely in control of my movements. As I went to the kitchen, I involuntarily swung my hips so wide that even a night elf would probably find it obscene. I immediately went to Dreamviews and started reading about WBTB in haste — not that I was really in the state to effectively process information, but I was worried that the feeling would go away. I did reality checks as well.

Furthermore, I wanted to write everything down just to activate my motor memory. First I did that on #wookieepedia, much to the confusion of its users (duh), and then on #ld4all after some activity actually appeared on that channel. It turned out that the fact my eyes pulsated when I closed them meant I wasn’t getting enough sleep, so I was advised to simply fall asleep at 0:00 instead of trying to WILD.

This was probably right because I really don’t get enough sleep: I play WoW at evening until 1:00, then probably spend another 30 minutes falling asleep, and get up at 8:00. Could it be that it was the reason I hardly ever saw any dreams, let alone lucid ones?

However, when I went to sleep one hour earlier than normal (and actually at the time that would be healthy for me), I found out that I couldn’t fall asleep — I couldn’t stop thinking about lucid dreams. Moreover, even though I wasn’t deliberately trying to WILD (I wasn’t even lying on my back, I assumed the position I usually fall asleep in), I started feeling WILD-like sensations, such as full-body relaxation, numbness, and brain-generated imagery. Following the advice of Dreamviews, I didn’t try to force the images, but instead gently guided them in the general direction I wanted, while letting the brain draw the rest.

A few times, my arms and legs got tired of being in the same position for a long time, so I rolled to one side and the other interchangeably, and always, in about a minute, the sensations came back. I looked at the alarm clock, and it was showing 1:08. Apparently the quest to fall asleep quickly failed, so instead I embraced the sensations. Eventually, the “realism” of the visions increased; they were still rather fragmentary (blurriness is a concept that doesn’t really apply to this kind of imagery), but now it felt less like images painted in front of my eyelids and more like something I was looking at through my closed eyelids. Before the transition, I primarily saw the road from the bus stop to our house blocks, with the surrounding scenery. Now it was Stormwind City. As I let the imagery flow, I felt my body becoming even more numb and relaxed, and finally, as I stopped concentrating on it at all, the all too familiar sensation of falling into a dream.

Only whenever I feel that, I don’t actually fall into a dream. I know that it’s what it is — I almost don’t feel my body, and what I do feel seems like floating or falling through a void — and I know people can do that and discard real-life stimuli completely, switching entirely to imaginary feelings and thus completing the transition. But there was nothing in front of my eyes, even those images disappeared; there was only whiteness, suspiciously resembling static noise. However, after that, when the sensations passed and I returned to the very real stimuli of lying in my room (mind you, I did do reality checks, but I might as well not have), I fell asleep very quickly after that.

That time, I woke up two or three times in the night, each time for a trip to the toilet and back. There was a dream with two distinct parts.

  • One involved my father, his car, some of our acquaintances, and a trip from the bookstore-near-a-kindergarten to the town of Berdsk. There was something more — something significant. I don’t remember what.
  • The other part involved bad memories I’d rather not elaborate on.

Stargate Dream

Posted by lucidfox.org at

Today, I had another Stargate dream. In it, I was Daniel, among the original SG-1 from seasons 1-5 and 7. We were going through the Forest That Leads Anywhere (we have one around where I live) to a metal building behind the Institute of Mathematics.

O’Neill has left for a few minutes for some reason. In his absence, I said something about him that Teal’c found amusing, and in response, he hit me in the chest and back at once in such a way that I flipped in the air fell on my back. It wasn’t really painful, and I realized that it was a friendly gesture of approval, just weird in a Jaffa way.

In addition, there was a brief moment of lucidity (nothing significant) when I “slipped out of character” for a moment and thought, “What, am I Daniel in a Stargate dream again? This is getting old.”

I think the reason for this is that he’s the Stargate character I identify the most with, and for good reasons.

I’ve started a dreams page, where I’ll start gradually summarizing what I know about my dreams and the patterns that occur in them.

Next > Last >> Page 1 of 14