Left-handed mouse usage

No Comments »

Okay, my hands were getting chewed up at work by the non-ergonomic keyboard and mouse, and I needed to help alternative what they were doing to relieve it. So, I tried a suggestion: use the mouse with my left hand and swap the buttons.

Something weird happened: I had to switch it back to right mouse button configuration. I could not use the mouse with my left hand with the buttons swapped. I wonder if anyone else has this problem?

Another funny thing is that I eventually got an ergonomic keyboard like the one I have at home, and for whatever reason, I make more typematic mistakes with the one at work even though they are the same brand and model

Posted on July 23rd 2011 in Uncategorized

Windows Media Center thoughts

No Comments »

I just got a Hauppage USB TV adapter + an antenna. The included WinTV program crashes a lot. However, I thought I would give Windows Media Center a try, and it turns out to work well. In fact, the CPU usage seems less with it compared to WinTV.

It is a little bloated and the UI seems more to remote controls. However, it simply runs better. It also is more responsive once it boots.

Posted on May 16th 2011 in Uncategorized


No Comments »

My set of pots

Well, I’ve finally got most of my pot set. While it did turn out that it ended up costing as much as a set in a box, there’s two things I like about it.

1. It’s a set I completely bought myself

2. While costing about as much, it was easier on the budget this way

The two frying pans were from Bed, Bath, and Beyond for $15. I think they were some essentials brand. The 4 QT sauce pan is a Faberware.

One of the 3 QTs is a Cuisinart. It’s the only non-dishwasher safe pan I have. I kept it because it has a strainer built into it, and pasta + Ragu + leftover chicken makes an easy meal. The other 3 QT one is a T-Fal. And then, I got a cheap pressure cooker.

But man, it’s very nice that I now have a set of pans that I can cook at high heat, plus all but the Cuisinart pot is dishwasher safe. I still have my old pans and I’ll have to figure out what to do with them eventually to make more room in the kitchen.

Also, it turns out washing the Dollar Tree pots in the dishwasher made parts of them rust. So, the timing of this was about right. Also, my brother made a good point: I don’t have a steaming pot yet. That’ll come.

Posted on May 15th 2011 in Uncategorized

How to get Android Honeycomb emulated device (tablet) to run faster

No Comments »

If you are like me, you’ll notice how slow the Android emulated Honeycomb device is. It’s also quite flaky. However, you still can use it. Just don’t expect miracles.

First of all, it’s laggy. The main screen of Honeycomb seems to rely on OpenGL for graphics. Problem: the Android emulator is 100% software without hardware translation support. So, that means even the OpenGL calls are emulated by software. You have this on top of emulating a CPU like ARM.

Let’s get to the good part: how to make it run better. Some places suggested giving the emulated device more RAM. You can do this on the emulated device picker in Eclipse. I tried 384-768 megs of RAM and didn’t really notice a difference, but feel free to give it a shot.

Go into settings on the emulated device. Make sure you use the app screen for settings, otherwise for whatever reason, Honeycomb will insist you put the settings option on the main menu screen. From here, turn off the fancy animations. It won’t make the main screen any faster, but it’ll make app testing faster.

While you are at it, consider changing the input method from Japanese to English if you don’t want to have the Japanese input menu put in every time. The emulated Honeycomb also has the bad habit of not refreshing the screen when you hit the back button from the app screen. Go ahead and run an app from Eclipse and hit the back button. You’ll get the main screen again.

Hardware-wise, you’ll want the fastest CPU you can afford that runs single-core applications well. Just try setting core affinity on emulator.exe, and you’ll find that it only uses Core 0. I even switched cores on the emulator and the emulator doesn’t like it very much. A turbo boosting CPU also should help in this case. Consider setting core affinity of other applications to cores other than Core 0 on Windows if they are taking up a lot of CPU power.

If you are using benchmarks to figure out what CPU you want to run, here’s the thing. The emulator doesn’t seem to rely on vector code much, so in lieu of Java benchmarks, try office applications. Don’t look at media, image, or compression benchmarks since they can use SIMD.

You also would want 3 gigs of RAM or more. I found Eclipse to eat up a lot of RAM, 512 megabytes in one case. 512 megs for Eclipse + 256-512 megs for Honeycomb is quite a bit. You definitely want to keep the emulator from getting paged to the hard drive.

Bottom line: The emulated tablet is still a pain-in-the-butt, but adding more RAM to it and turning off animations will help make it easier to test simple apps. Right now, the best CPU is one that runs single-core applications the best for it . 3 gigs of RAM or more will help things run smoother.

Note that this applies to SDK version 3.1. Newer SDK versions may be better.

Update #1: Upgrading to a Phenom II X6 made Honeycomb run faster. Another thing I just remembered is if you take a Honeycomb 3.0 device (level 11) and run it at 960×600, 120 DPI runs better. However, the reduced resolution emulator tends to be flakier for me.

Posted on May 15th 2011 in Uncategorized

Time to update the TabHost post

No Comments »

I’ve been meaning to do that for a while since I learned Android at a lower level, and after that, TabHost makes sense.

The original post is here, updated

Posted on May 12th 2011 in Uncategorized

I wish autoupdate prioritized installs

No Comments »

I know it’s not easy to do, but I wish autoupdating prioritized installs. Basically I just got a broadband router and hooked my laptop to it. 30 updates. At #25: “Do you want to install Internet Explorer 9?” Okay Firefox and Chrome fans, yes, IE9 is good enough for me to use, even though Firefox is my primary browser.

Anyways, the autoupdate stopped because of that prompt. Ubuntu I don’t think was much better in that regard, either. Couldn’t they spawn that off as another thread or install those updates AFTER the ones that can be updated automatically run?

Posted on May 10th 2011 in Uncategorized

I hate colds

No Comments »

I hate getting a cold. The cold itself stinks, but also getting over it. It’s never the same. Sometimes one remedy helps, and other times, it makes it worse.

This is the weirdest case, and it may be on the gross side for some people. Usually when I get a cold, I avoid clearing my throat of, well, stuff, by spitting it out because that tends to give me sore throats. In fact, I avoid doing that period unless I have a reason. I especially avoid hocking.

And I’m not avoiding hocking because the lack of ability to do it. In fact, a few people around here do it almost too often and it’s annoying.

I actually learned how to do the really nasty one, and I haven’t heard any nastier one than that one. If it weren’t for my cold, I could do weird things with it. Anyways, back to the main point.

I was coughing earlier and went to the bathroom because I was getting a lot of phlegm coming up. After getting rid of it, I kept coughing and getting rid of more. After 5 minutes of that mess, I started to finish. I noticed something though: I felt better. That has never happened.

Posted on May 7th 2011 in Uncategorized

Some things spotted that are Made in the USA

No Comments »

1. Mag Lite flashlights

2. Little measuring cups from the Dollar Tree

3. Target has these little rugs

Posted on May 5th 2011 in Uncategorized

Lazy recipe: quick salisbury steak

No Comments »

Take two hamburger patties
Cook until done

Add Cream of Mushroom Soup

Add 1 can of mixed vegetables

If you have any rice or ramen, cook and add (had some leftover rice)

Add spices to taste (salt, pepper, and garlic powder work well)

Posted on May 5th 2011 in Uncategorized

GJK collision cheat sheet /vector review part 1

No Comments »

I found a wonderful method of collision detection: GJK. A guy made a video here, and it’s brilliant. I do agree with him that GJK papers are quite complex and the method, especially those familiar to vector math, might not be as hard as others try to make it.

I won’t repeat what other sources have said. I’ll add a few things that will help you figure out why it works as I am figuring them out. Personally, I need to know how things work on a mechanical level before I truly understand it

Dot product: the dot product of two orthogonal vectors is 0 (cos (90) = 0)

Dot product: if the result of a dot product is positive, then the angle of the vectors is < 90 degrees. Dot product relies heavily on Cosine

If the result of a dot product is negative, then the angle of the vectors is > 90 degrees

There’s different ways to find the distance from a point to a line. The way I’m trying is the scalar projection, a.k.a the component.

One thing I realized is that you are doing a bunch of < > == comparisons! So, what if you multiply every single number by the same value, provided the value is positive? The comparisons should stay the same! So, when you use the direction vector to find the farthest point, you can “multiply” every one of those calculations by the direction vector’s norm! In otherwords, you have

(distance_vector (dot) point) / (norm_of_distance) to find out the distance of that point to that distance vector. However, if you multiply all of the distances by (norm_of_distance), (distance_vector (dot) point) * (norm_of_distance) / (norm_of_distance) == (distance_vector (dot) point)

This won’t work if you need to do an actual calculation with the result (outside comparisons, of course). But, it’s one less square root and one less division you need to do, both operations can be expensive since the distance finding algorithm is run quite often.

Also, this guy has been very helpful helping me figuring out the triple cross products, and his blog is a good read. If I figure this stuff out, it’ll be thanks to William at CodeZealot.

One thing that could help you figure out GJK: implement circle collision detection. The task is simple: take the coordinates of the center of two circles. If the coordinates are less than the distance of the two circle’s combined radii, then there’s a collision.

Check out what the distance equation basically does. If you subtract the two circle’s radii and if the circle contains the origin, then there’s a collision. It’s just like the freaking Murkowski sum theory!

Posted on April 17th 2011 in Uncategorized