Blogger is lacking a feature. That feature is posting and displaying code. I've seen plugins that can do this for other blog systems but after a little searching, I haven't found a good solution for this problem yet. Some people are going to great lengths just to get their code to show up.
Here is the tip to get javascript and other code to show up on the post. Wrap the code in < pre > < / pre > tags. I think you will have to switch to the edit html tab to do it, but it works the best. You will still have to deal with escaping "<" html like tags.
Thursday, November 8, 2007
Wednesday, November 7, 2007
Silverlight Experiment: movement
This took me longer to do partly because I don't know trigonometry and because silverlight/blend doesn't really have a concept of fps (frames per second) or enterframe like flash does. Flash movies are like merry go rounds, they just keep going around and around until you stop them. You use this fact to tell flash to do "stuff" every time a certain horse comes around again. "Stuff" usually involves moving, fading, scaling, etc. Say you wanted an object to move horizontally across the screen by 1 pixel every time your movie looped.
In flash it might look like this:
item.onEnterFrame = function(){
"bob" every time i see you, i want you to:
---> this._x += 1;
---> advance a step from the last place you were.
}
Blend doesn't really have an onEnterFrame ability built into it. Flash is timeline based at its very core (like a movie) but Blend is static (like a webpage). So you can either use javascript's setTimeout() function or you can employ a storyboard timer workaround, via Stegman & Andy. I did some brief tests and it seems that the storyboard timer is faster. I will post some examples of this in action when I get some time. Until then, here is the basic setup and javascript:
the xaml:
the Javascript:
In flash it might look like this:
item.onEnterFrame = function(){
"bob" every time i see you, i want you to:
---> this._x += 1;
---> advance a step from the last place you were.
}
Blend doesn't really have an onEnterFrame ability built into it. Flash is timeline based at its very core (like a movie) but Blend is static (like a webpage). So you can either use javascript's setTimeout() function or you can employ a storyboard timer workaround, via Stegman & Andy. I did some brief tests and it seems that the storyboard timer is faster. I will post some examples of this in action when I get some time. Until then, here is the basic setup and javascript:
the xaml:
{Canvas xmlns="http://schemas.microsoft.com/client/2007"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="350" Height="150" x:Name="Page" Loaded="onLoaded">
{Canvas.Resources>
{Storyboard Completed="timerCompleted"
x:Name="timer" Duration="00:00:0.02" />
{/Canvas.Resources>
{/Canvas>the Javascript:
You can use this approach for creating your casual game or just to move stuff around.
function onLoaded(sLight)
{
root= sLight.findName("Page");
plugin = sLight.getHost();
var timer = sLight.findName("timer");
timer.begin();
}
function timerCompleted(sender, args)
{
///// DO STUFF HERE. Like take a step.
var ball = sender.findName("ball");
ball["Canvas.Left"] = ball["Canvas.Left"] + 1;
// restart the timer
sender.begin();
}
Labels:
Blend 2,
experiment,
javascript,
silverlight,
xaml
Monday, November 5, 2007
Beautiful brain indeed!
I suppose that I am a little late to the party with this one. Daniel Tammet is capable of amazing mental feats, with what appears to be little effort. Daniel has a super brain that can perform complex mathematics in a single bound, memorize enormous amounts of data with laser like vision, and learn a new language faster than a speeding bullet. Not that I want autism, but it would be nice to have a super brain!
Mac or PC
Where do you fall? This is usually the type of debate that falls in the same category as religion and politics. Almost everyone has a specific point of view and they love to shout about it. Personally, I like whatever helps me when I need it too, doesn't slow me down too much, or cost a lot.
PCs:
Mac:
Here is a funny video that covers some other points that i didn't.
PCs:
- tons of viruses written for it (just wait till macs get cheap or free in asia, then we'll see who doesn't have anymore viruses)
- Tons of software and games.
- Tons of peripherals, generic (cheap!) parts, etc
- OS doesn't have a high form factor, it is getting better, a little
Mac:
- Some solid software, games
- some compatible peripherals & generic parts
- Innovative & smooth development pipeline, allows for frequent new releases (new releases every quarter, that they want you to buy. upgrade revenue yo!)
- PT Barnum for a ceo, no one better at creating a spectacle.
Here is a funny video that covers some other points that i didn't.
Saturday, November 3, 2007
Job Interview Tips
I don't know anyone who likes to go on job interviews. Any interview can be stressful and exhausting, but none are quite as stressful as the interview loop. An interview loop is like a marathon of interviews, and for a designer it can include a group presentation, 2-3 one on one interviews that might include a white board problem. Some companies even include a problem solving portion that must be presented back to the group. If that isn't an exhausting day, I don't know what is! When people get tired, they start to get cranky and the ol' bean doesn't function at an optimal level.
Here are some tips to keep your energy up and attitude positive.
Pack your pocket with almonds. Munch a few throughout the day as necessary. This will provide your body with a ready source of calories. Thinking consumes calories. Your thoughts are actually little electric sparks in your brain that connect different chunks of info together. I am sure everyone has experienced a brain drain when they are hungry, only to be revived after eating a little snack.
Avoid coffee and sugar. Caffeine and sugar are great for a temporary boost, but it doesn't last long and can leave you feeling worse than before. It is better to go for something that your body can break down slowly and provide a steady stream of energy, like whole nuts or grains.
Energize with exercise between interviews. There are a few discrete exercises you can perform to wake yourself up or shake off sluggishness.
No Pressure. This one depends on your personality and what motivates you best but I've found that if I remember that there are other jobs out there, I will enjoy the process more and allow myself to take risks. I am not suggesting that you act like you don't want the job or don't care, only that you realize that while this interview represents an amazing opportunity, there are many more opportunities out there for you.
Here are some tips to keep your energy up and attitude positive.
Energize with exercise between interviews. There are a few discrete exercises you can perform to wake yourself up or shake off sluggishness.
Run your hand up and down the entire length of each arm 7 times. This will increase blood flow and wake you up, guaranteed.
- Clasp your hands in front of your chest. Press and hold them together for 30 seconds or so. Repeat this a few times.
- Place your hands infront of you like you're going to clap but keep them about 10 inches apart. Then make the clapping motion vigorously but don't actually let your hands touch. It kind of looks like you're flapping some wings or banging your ears. This one looks a little strange, so I wouldn't do it with anyone around.
No Pressure. This one depends on your personality and what motivates you best but I've found that if I remember that there are other jobs out there, I will enjoy the process more and allow myself to take risks. I am not suggesting that you act like you don't want the job or don't care, only that you realize that while this interview represents an amazing opportunity, there are many more opportunities out there for you.
Friday, November 2, 2007
They walk among us! The color challenged
Scary thought, I know. I never realized how many types of color blindness there are. Colorblindness is something that I try to consider when I am designing a color coding system or even in choosing a color pallet. I found a site that will translate your website into an example of what a color blind person might see. Check it out, your color blind audience (and dog) will thank you.
Thursday, November 1, 2007
Cover Inspiration
Sometimes I get my inspirations from album covers. Just the other day, we were at Goodwill looking at LP covers to get ideas for a halloween costume. Apple iTunes added it as a feature, knowing that I, as a user, love visual stimulation.
So, having stumbled upon Sleevage is a goldmine. Sleevage blogs about interesting album covers from the 60's to the present, so I don't have to. I'm in visual heaven.
So, having stumbled upon Sleevage is a goldmine. Sleevage blogs about interesting album covers from the 60's to the present, so I don't have to. I'm in visual heaven.
Subscribe to:
Posts (Atom)