Rays of wisdom


Stickies for an ageing brain

Simplify your code using Dictionaries

Published by Marian on Tuesday, November 11, 2008 7:12 PM

Too complicated conditions?

if ([[self stateName] isEqual:@"Square"])
{
if (self.clockwise)
{
return @"Animating around four points, clockwise";
}
else
{
return @"Animating around four points, anti-clockwise";
}
}
else if ([[self stateName] isEqual:@"Triangle"])
{
if (self.clockwise)
{
return @"Animating around three points, clockwise";
}
else
{
return @"Animating around three points, anti-clockwise";
}
}

or

if ([[stateController stateName] isEqual:@"Square"])
{
[path fill];
}
else if ([[stateController stateName] isEqual:@"Triangle"])
{
[path stroke];
}


Keep it simple!



return [self.selectedItem objectForKey:[self clockwiseKey]];

and

SEL drawSelector = NSSelectorFromString(
[stateController.selectedItem objectForKey:@"drawSelector"]);
[path performSelector:drawSelector withObject:nil];


Source

Back

Published by Marian on 3:06 AM

I'm back, with a new theme layout, and hopefully with more content.

Another Personality Test

Published by Marian on Thursday, March 15, 2007 8:06 PM

Personality Disorder Test Results
Paranoid |||||||||||| 42%
Schizoid |||||||||||||| 54%
Schizotypal |||||||||||| 50%
Antisocial |||||||||||||| 54%
Borderline |||||||||| 38%
Histrionic |||||||||||||| 54%
Narcissistic |||||||||| 34%
Avoidant |||||||||||| 50%
Dependent |||||||||| 38%
Obsessive-Compulsive |||||||||||| 50%
Take Free Personality Disorder Test
personality tests by similarminds.com


Update:
I am quite average, a little more anti-social than others, less paranoid, narcissitic and borderline, more histrinic, avoidant and obsessive-compulsive.
Oh well...

My Visual DNA :)

Published by Marian on Wednesday, March 14, 2007 7:23 PM


A few hours later...

Published by Marian on 6:22 PM

I really enjoy the Apple delivery service from Singapore. The same night, at 9pm, a courier called me asking me if I'm home, as he was ringing at the door and nobody answered. I had my headphones on :D
Anyway... here it is... my new USB stick.

Template update

Published by Marian on Tuesday, March 13, 2007 11:48 PM

Today I updated the template. The photo badge should work properly under Internet Explorer.
I have to talk these days about the movies I've seen in the weekend. When I will catch the time.

Tuesday 13

Published by Marian on 11:42 PM

That was yesterday. I did not even realized it until the evening. Apparently, nothing went so wrong. I injured my knee a little at climbing, but nothing serious.
Today the flash drive died. I'm sorry about it, it was a gift from Claudia. I ordered a new one (actually a 1st generation ipod shuffle, with USB port). I hope it will have a longer life.

Later:
May it rest in peace:

One day as the year

Published by Marian on Wednesday, March 07, 2007 11:39 PM

Well, yesterday (7 march) was my chosen day. Like that day it's suppose to be the whole year. So ... let's see... The weather was fine... I felt quite well (maybe except for a small tooth-ache). I had a presentation at SUN hq, which went fine (at least according to Claudia) and in the evening I saw "300".
You might say it went rather well. I think I babbled too much at the presentation. And I was just a little disappointed by ending of the movie. I was not really that "into" the movie, except maybe the battle scenes, which were ... superb. Blood flowing everywhere, action from different angles, hi-speed and lo-speed filming... really nice.


I do not see why the critics though about the "Freedoom!!!" ending of Braveheart when they saw "300". While Braveheart brings tears in your eyes, I could just laugh at this ending. 10 minutes of narration over Leonida's death. Waay too sloow.
However, overall, I liked 300. It could have been no other way :)

Just a reminder...

Published by Marian on Wednesday, February 28, 2007 7:50 PM

You have to laugh sometimes, and remember than not only you are clumsy. So here is the reminder:



later edit: speaking of reminders... today I added the flickr badge...

Mac Os Apps

Published by Marian on Monday, February 19, 2007 11:53 PM



After a looong night, I took some time and compiled a list of "must-have" utilities for Mac. You can find it here. I still have to add some labels for those not-so-free applications and, add links and group them better, but right now I'm gonna go eat :-).

 

Lipsum

Rays of wisdom
Notepad entries by Marian Mihailescu.

Followers