Thursday, February 28, 2008

US Bank in person interview

Just had an interview with US Bank. It's actually First American Funds (FAF), a sub-division of US Bank. They are looking for software/web developer. Since I live close by, they invited me for an in-person interview that lasted about an hour.

The non-technical part went fine I guess, the interviewer explained the job and I asked a few questions. The technical part consists of two questions, and I have to write on a white board.

Q1. Give an index x, return the x element in a Fibonacci Sequence.
Example, the sequence is 1,1,2,3,5,8..., for x = 4, the function should return 3.

I had a mental block on this, supposedly we should use recursive function for this.
The reason is that fab(1) = 1, fab(2) = 1;, fab(n) = fab(n-1)+fab(n-2) for n > 2.
i.e., something like this
long fib(unsigned long n) {
if (n < 1) {
return n;
} else if (n == 1 || n==2) {
return 1;
} else {
return fib(n-1)+fib(n-2);
}
}

I did a non-recursive version of it, which still works, but not as pretty.

Q2. Give x=3, y=5, swap the value without introduction another variable.
I was stuck here for a while, but it's actually quite easy.
x = x + y; //sum the two value together
y = x - y; //sum(x+y) - y = x;
x = x - y; //sum(x+y) - x = y;
I think bitwise operation would do as well, same concept.

--Update (2/29/08)--
Got a phone call from the head hunter/agent the next day saying I passed. So will have a final interview with the boss on Monday (3/3). Fingers crossed!

--Update2 (3/7/08)--
The manager seemed pleased during the final interview. And today I got an email from my headhunter saying the HR is checking with legal for visa issues. So either I get rejected because of visa issues, or I'll get an offer from them. We'll see.

Thursday, February 21, 2008

Microsoft Live Skydrive

It is finally open to public. Free 5GB online storage.

http://skydrive.live.com/

Unfortunately, there's no software or anything that can sync the skydrive with your computer. It'd be very convenient if it can sync with my documents. Hopefully when google's gStorage (or whatever it is called) launches it'll come with some sync feature.

Friday, February 15, 2008

Microsoft Phone Interview

Just had a phone interview from Microsoft, which ends really fast (22min or so), so I guess I didn't do too well?

The interviewer didn't ask a lot. Three non-technical questions
1. Why do you choose software development (instead of testing etc). Answer, I like designing stuff blah...
2. What's the project you like most or most challenging, answered with one of my research, but I doubt I explained that well.
3. What's the software you like most, asked if webservices are ok, and answered with gmail (BIG MISTAKE!).

The technical question is from the book "Programming Interviews Exposed: Secrets to Landing Your Next Job (Programmer to Programmer)", asked me to code a C routine to remove characters. So just give answer from the book.
Question: Implement the following
void Remove(char* string, char* delims);
Input/output example:
"hello world", "low"
"he rd"

Thursday, February 14, 2008

見證灌C的精彩

這是最近紅極一時的灌C事件,香港方面弄了一個wiki專門紀錄事情的始末

Linky

天涯論壇上也有一個專門的討論貼,已經蓋到9xx樓了(中間一度倒掉,現在又復活)

天涯高樓

Monday, February 11, 2008

How to hard reset Sprint Mogul

1. Press both softkeys, use stylus and press the reset button
2. keep softkeys pressed, release the reset button until message: "do you want to erase all data..."
3. slide out the keyboard, press R for hard reset, X to exit reset process.

Sunday, February 10, 2008

Common software

Software that I use

From google pack:
firefox (新同文堂)
picasa
acrobat reader
skype
realplayer


Security software
Kaspersky Anti-Virus 7 (unfortunately this doesn't work with a lot of the free firewalls.
norton client security (for U of Minnesota students)
Comodo firewall 3.0
Windows defender (for spyware)
Spyware Terminator


Word processing/editing/viewer
Microsoft Office 2003 (I don't like 2007..)
UltraEdit (latex wordfile)
Miktex (for latex)
Acrobat
Ghostgum/Ghostscript


Multimedia
PowerDVD
KMplayer
Quicktime + iTunes
Real alternative
SlingMedia player
Sopcast
Ruckus


Communication
SSH Secure Shell
Attachmate Reflection
PCMan (for BBS)
Windows Live Messenger


Utilities
Winrar
Dr. Eye 2001
CompanionLink for google


P2P
eMule
uTorrent


Copying
Nero
DVDFab HD decryptor


Programming
Microsoft Visual Studio


Others
cygwin
Windows XP powertoys

Saturday, February 9, 2008

Ramdisk how-to

ramdisk file by gavotte version 1.0.4096.4.

This is a free ramdisk and has no limitation on the size of the ramdisk. Also works on XP and Vista. One of the best thing is that if you are using 32-bit XP or Vista and have more than 4GB of RAM installed, this ramdisk can use the RAMs not seen by XP or Vista. For example, if you have 8GB installed and XP only sees 3GB, you can create a 5GB ramdisk to full utilize the memory.

Instruction:
1. Download from the above link, unzip to some directory.
2. if you have more than 4GB ram installed, double click on ram4g.reg to import the registry. Also make sure memory remapping is enabled in BIOS
3. run ramdisk.exe and install ramdisk, default fixed media is good
4. set the size of the ramdisk you want
5. reboot and you should have a ramdisk with as R: drive

Since this ramdisk uses the memory, all the stuff on the ramdrive will be wiped out when you reboot. To keep things on the drive, you can create two batch files (e.g., loadimage.bat and saveimage.bat) that copies the content to/from the ramdrive to the hard drive upon login/logout. To do so:
1. go to start->Run, type in gpedit.msc
2. go to User Configuration->Windows Settings->Scripts (Logon/Logoff) and select the appropriate scripts for logon/logoff.

Below is my way of load/save ram contents to f:\rimage (one of my hd)
in loadimage.bat
>> xcopy r:\temp f:\rimage /s /h /R /Q /y /d /i

in saveimage.bat
>> xcopy f:\rimage r:\temp /s /h /R /Q /y /d /i

ideally we should be able to use
>> ramdisk /S or /L imagename
in the batch file. However, for some reason it always gives me some LockVolume error so I just gave up.

How to change firefox cache directory

From here

1. In Windows XP, go to C:\Documents and Settings\XXX\Application Data\Mozilla\Firefox\Profiles\XXXXX.default

2. Create a file called User.js (same directory as Prefs.js)

3. Paste this into it and save:
// Path to Cache folder:
user_pref("browser.cache.disk.parent_directory","x :\\");

X:\\ is the directory you want to place the cache

Useful when you want to place the cache onto a ramdisk

Friday, February 8, 2008

TGI Friday's $5 off $15 coupon

Very good coupon, it's a shame it cannot be used together with 3 course combo. Expires 2/29.

http://www.tgifridays.com/Feb2008_5off15_search.htm

Linksys CIT200 Skype Phone problem

Sometimes the headset itself loses the registration with the base station. To re-register the headset, do the following

1. Press the big buttom on the base station until light flashes.
2. Register the headset, default code 0000

How to change Volume Licensing Key in Windows XP

1. Click Start, and then click Run.
2. In the Open box, type regedit, and then click OK.
3. In the left pane, locate and then click the following registry key:
HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\Current Version\WPAEvents
4. In the right pane, right-click OOBETimer, and then click Modify.
5. Change at least one digit of this value to deactivate Windows.
6. Click Start, and then click Run.
7. In the Open box, type the following command, and then click OK.
%systemroot%\system32\oobe\msoobe.exe /a
8. Click Yes, I want to telephone a customer service representative to activate Windows, and then click Next.
9. Click Change Product key.
10. Type the new product key in the New key boxes, and then click Update.

If you are returned to the previous window, click Remind me later, and then restart the computer.
11. Repeat steps 6 and 7 to verify that Windows is activated. You receive the following message:
Windows is already activated. Click OK to exit.
12. Click OK.

installing a new hard drive in windows xp

Install the hard drive according to the manual. Boot into windows. To format the drive in Windows 2000 or XP, right-click on My Computer and go to "Manage". In the window that comes up, click Disk Management in the left pane. Once it loads, you should see an "Initialize Disk" wizard pop up. Partition and format the disk to your liking.

remove windows messenger

Run this through command line

RunDll32 advpack.dll,LaunchINFSection %windir%\inf\msmsgs.inf,BLC.Remove

should get rid of the annoying windows messenger

Linux recursive find

find . -name filename

use to find a file within linux

New blog...

Finally finished my study, guess it's time to start something fun!