Archive for the 'Misc blog' Category

Disney mobile on sale in Japan (via Softbank)

Monday, March 3rd, 2008

Got my wife one of those, on the second day it went on sale ;)

Some pics:

Packaging is pretty luxurious and nice. Unlike usual softbank stuff. Disney mobile model number is DM001SH. (more…)

Final Fantasy Potion. Part 2 :)

Monday, March 3rd, 2008

Here's what is on sale in our local Jusco supermarket :) Well actually it was on sale for a couple of months already, but somehow I didn't have any desire to buy it. Finally bought it today.

Presenting! The Final Fantasy 7 10th anniversary Potion! :) On sale NOW in all big japanese supermarkets!

Cid Highwind

 and what about the color?

 

The potion is priced at 200yen, which is higher than usual 120-150 yen for similar "normal" drinks. The taste is.. well.. if you have ever drank Real Gold, you get the idea. If you haven't.. hm.. well it's a sugary taste, nothing special, remains in mouth for a pretty long time and makes me want to wash my mouth :) Unfortunately, nothing special, even remotely potion-like. I'd say.. may be 20hp. Doesn't worth spending timeline to drink unless you're level 2 paladin ;) or whatever

There are a plenty of can designs (not only Cid). All main character from FF7 Advent Children, I believe.

I have wrote about the "real" potion before, by the way.

My approach to GTD

Friday, September 21st, 2007

I'm a big fan of GTD, which stands for Getting Things Done and is an approach to getting organized at work, at home, and in you life in general. You are supposed to keep track of all tasks you are supposed to do, in their respectful contexts.

By following the GTD principles, you can radically reduce the amount of stress in your life just by knowing exactly what you have to do, when you can do it, and most importantly - that you're not forgetting anything that needs to be done.

I'm not going to talk about the GTD theory here anymore, and just would like to share how I process information (tasks, reporting to other people, etc) at my workplace. This system proved to be effective and easy to use. At least for me :)

I use 3 tools: my monitor, a calendar and a bunch of post-it-notes.

Here's a picture of how monitor looks like. And the explanation will follow:

monthumb-1.png

(more…)

Hard disks those days…

Tuesday, August 28th, 2007

I've been installing Windows Me for testing purposes today (to test site in IE 5.5) and here's a hillarious retro-message I have dug :) That's exactly the size of microSD card in my mobile phone. Man.. these were the days..

untitled.jpg

Was good while it lasted :)

Monday, August 20th, 2007

That was my second time I tried to play WoW :) Lasted about 4 months of paid account, of which I only actually played for about 2 weeks. Got to 19lv Druid, which is 2 levels more than my 17lv paladin some two years ago.. But it looks like these types of games with no ending where you just loose time in chunks with no apparent result are just not for me.

May be in next 2 years :)

picture-1.png

Flex 3 already??

Monday, June 11th, 2007

Bloody hell I'm shocked. It's been just a few months since Adobe released Flex 2 to the public, and I have started learning it - though with a HUGE lack of time to spare recently, didn't went very far - and now they release Flex 3 beta, with AIR support and even more userful features. So when the bloody hell will I be able to learn everything?? Oh well.. I guess everything in its time..

My World Map :)

Thursday, February 1st, 2007

Here's my world map. 5% of countries, just the amount of consumer tax in Japan :) (more…)

"Hidden" problems with inheritance in Rails (noob prob? :)

Tuesday, January 23rd, 2007

Yesterday I have discovered a pretty annoying mistake in my own projects design.

As I have wrote previousely (simple caching in Rails) , I had simple front page caching implemented for my site's front page. The caching code was defined in ApplicationController, which in turn was responsible for generating the front page content.

To put it simple, it looked like this:

class ApplicationController < ActionController::Base

caches_action :index
before_filter :index_cache_expirer, :only => [:index]

The code caches (and expires) action named :index. But, there is a may be invisible at first glance, but very big problem with this code.

The problem is that "caches_action :index" directive will propagate to all other pages on the site, effectively making all :index actions in all controllers to cache their content in the same way as the front page.

Even pages which must be avoided to be cached (like /admin area on multiuser sites). Here's a simple example - a multiuser blog with /admin/posts action, showing a list of blog posts for each user, depending on who is logged in. So, say, user "mike" logs in, and watches his posts list (which gets caches, since the caches_action :index gets propagated from ApplicationController to Admin::PostsController). Soon after that, a user "jane" logs into the same admin/posts trying to have a look at her posts list - only to get served a cached page containing lists of posts of user "mike"! The page will expire eventually and "jane" will get her list of posts, but think about the next user - he or she will get Jane's posts list instead, and so on, and so on.

One of the biggest probs is that this scenario doesn't work if you are working in development mode, because caching is only active in production mode by default! So it looks like that - you happily debug your code in development mode, deploy to public server, and the caching problems begin to appear.

Now, I didn't tell why exactly this gets propagated. But that's very easy to notice if you just look at, say, PostsController definition:

class Admin::PostsController < ApplicationController

See how PostsController inherits from ApplicationController, which in turn has caching to action :index implemented? Therefore, PostsController will have the same exact set of functionality as ApplicationController, including caching of its own :index action!

So, the point is - putting too much stuff into ApplicationController is definitely not a good idea, as well as it seems to be now very wise to use ApplicationController to render site's front page (in case this page has alot of custom functionality, caching and stuff like that).

Solution? It's pretty simple, at least for the caching problem I've been having. You just have to make a separate controller for front page only, and define all these front page specific stuff inside of that controller.

So, watch out for the "hidden" inheritance problems. And happy coding :)

Stupid bones :/

Friday, December 22nd, 2006

Well this really sucks. I had an accident today by crashing into a car which was turning to a side-street without actually watching if there's anyone on the walkway, while i was riding my bicycle on pedestrian walkway. The result is a nice acrobatic performance (i guess) and broken right collarbone so it will take 3 to 4 months until I can lift stuff again and 3 weeks until the bone will reconnnect again. I can type and stuff like that, but I guess it'll take some time before i will be able to code without taking rests every 10 bloody minutes. Well that really sucks but at least the jerk who was driving the car will get a very nice bill from his ensuranse company next year. Anyway, will try to get new bone grown ASAP :) Broken bones suck ;)

That's what I call swap :)

Wednesday, November 29th, 2006

Nuf' said :)

swap.jpg