Musings and Experimentations of Shuying











{September 22, 2008}   Recording Audio on Windows: #1

Audacity seemed to be a popular choice for “free” (open source) recording software on Windows. I had previously done some sound recording with Audacity, which were quite terrible (not having a sound proof room didn’t help either) and being somewhat bored, I once again decided to Audacity another go.

This time round, I decided I would record some streaming audio (playing on Nero and iTunes) and save the recordings in different formats. The resultant recording was quite tinny, which may or may not have something to do with the built-in Realtek sound card.

Here is the same sound sample encoded in different formats:
Sample 1
Sample 2

Ogg encoded files tend to be smaller than the mp3 encoded ones. With the average audio hardware available to most people, it is doubtful that one can make out one from another.



{September 18, 2008}   Running with Technology

Lately my computers have locked up several times when CPU usage hit 100% under MS Windows. Typically, I’d have several tabs opened in a browser like Firefox while I’m working on something else on my computer. Curious to know what could be causing it, I went about doing a few tests. It turned out that the browser application was the main culprit, which was very curious. Through this testing process, I realised that just opening a website like the Sydney Morning Herald’s caused spikes in my CPU usage and that the main culprit were largely useless, very annoying Flash advertisements. It’s time to engage a utility like Adblock!

So now I’ve turned off the Flash plugin for browsers since they’ve somehow managed to render an otherwise powerful (and relatively new) computer unusable. Technology is wonderful when it makes our lives better, let’s us do things more productive. In this instance, it is just a major annoyance.



{September 18, 2008}   Learning from Community Forums

Joel Spolsky has recently started a technology centred community forum. It is interesting, not because it is an entirely new concept, but because it is an improvement over existing forums.

Online forums have existed for several years. The first instance of it were the usenet groups and Bulletin Board Systems(BBSes). Archived posts on mailing lists have also served as a repository of collective experience. Then we had website forums powered by web based software like phpBB or Yahoo! Answers. 

The problem, as Joel has noted, has been the level of difficulty at finding useful, relevant answers to a question.  If I’m very lucky, I might find the answer after spending a lot of time googling or someone might respond with a useful answer to a query I post online. I know all about that since I’ve spent several frustrating hours recently trying to work out why (1) the wireless on X41 Thinkpad can’t get an IP from the wireless router and connect to the Internet. My flatmate has a Dell laptop and I’ve successfully configured her laptop for wireless internet access. (2) I can run a Remote Desktop and VNC connection on my desktop from within the local network and I can connect locally to the VPN server on the modem-router, a Billion 7404VGO-M but can’t connect to the same services remotely.

I’ve hunted for answers on forums only to encounter the exact questions but no answers. And usually only after googling with different search terms. I’ve found someone asking a similar question on a forum, but seeing the replies requires paying for a subscription (experts exchange, for example) and I’m hardly convinced that I’ll get my money’s worth if I did subscribe to their site. Sometimes I’ve managed to find a forum or mailing list thread that looked potentially useful, but I have had to trawl through the crud and spam just to dig up the gem, no matter how small the smidgeon of a gem it might be.  

So how is StackOverflow different from the other existing community forums out there? It is somewhat user regulated as people can vote up or down answers. Tagging also makes finding similar questions easier to find by topic. Of course, not all the issues have been ironed out yet but I think it is worth a look at.



Early this morning, I received a call from a recruitment agency, RW. The last I’d heard from one of their “recruitment consultants” was quite a while ago and I hadn’t put in an application for any of their advertised positions since then. So the call was quite out of the blue and at first I was puzzled as to why this recruiter was quizzing me about a company H I used to work for. So I asked.

It turned out that this recruiter had seen a job advertisement company H had put out and wanted the inside goss on the company from a former employee before he approached them. He asked all sorts of questions, like why I’d left the company, what I liked about working for them, what the company culture was like, what sort of personality type would be a fit for this company, who are the people working there, who’s in charge of the hiring there and if there was a direct contact number I could give him.

I’d seen the job advertisement and had a good idea who would be involved and what the job entailed even though I had no interest in the job itself. He was fishing around for client leads and I was not at all interested in helping him out.  I haven’t had a positive experience with this recruitment company and I certainly didn’t know this recruiter. Nonetheless, I’d answered a couple of his questions, painting a nice if somewhat generic picture of company H. I felt no inclination to give him any names or numbers.

So here’s the thing. If the people on this recruiter’s recruitment team had treated me better when I was dealing with them as a potential candidate, I would have been more forthcoming with information (although I still wouldn’t have provided a number because of confidentiality issues). As it is, I think company H would do better hiring directly than doing business with this agency.



This post is password protected. To view it please enter your password below:




{June 29, 2008}   House Hunting in Sydney #1

A friend of mine, “S”, has been contemplating buying a first home for a while now. Heretofore, he had been tracking the prices of properties in the location he was interested in by looking at real estate advertisements placed online and following the indices on the same real estate site. I managed to persuade him to go for property inspections to get a better feel for the market.

Read the rest of this entry »



After a couple of months of getting by with just a 3G wireless + mobile phone plan, I opted for an additional naked ADSL2+ plan with a separate SIP account. My 3G wireless connection was initially fairly good (after much fun tracking down an error message which turned out to be an inactive TAPI service on Windows XP) and I was quite happy with it. The plan gave me the flexibility and mobility I wanted and all was good.

Sometime in the 3rd month, my heretofore good connection started flaking out more and more regularly and there were days when I couldn’t connect to the internet at all. Zero reception. Helpdesk, as usual, was quite useless and suddenly, having just a 3G connection wasn’t so satisfactory any more.

Because I’m living in an apartment, getting naked ADSL wasn’t as trivial as I’d hope it would be. To cut a long story short, I jumped through a couple of hoops, paid $109.60 more than I should and found myself chained to an internet account for 12 months.

I bought a Billion 7404VGO which had 2 FXS ports and proceeded to sign up with a SIP provider. The plan I got provided 2 sub accounts/separate phone lines, which worked out perfectly for me. I hooked up the 2 (analogue) phones I had to the router modem and re-configured it for SIP as per the instructions provided in the service confirmation email from my service provider.

Line Number : 1
MyNetFone Number : xxxxxxxx
MyNetFone Password : xxxxxxxx
SIP Proxy : sip10.xxxx.xxxxx
DID number: xxxxxxxxxxx
SIP Port : 5060
Voice Codec : G.729, 40ms packet size


Line Number : 2
MyNetFone Number : xxxxxxx2
MyNetFone Password : xxxxxxxx
SIP Proxy : sip10.xxxxxxxxxxx
DID number : xxxxxxxxxx
SIP Port : 5061
Voice Codec : G.729, 40ms packet size


DTMF Type : RFC 2833, payload type 101

To be honest, the last time I looked at the SIP protocol was years ago back when I was doing a spot of work for some telecoms provider. I have a very hazy idea of what SIP is about at best.

I managed to hook up line 1 within minutes, made a couple of test calls to make sure I had a working inbound and outbound line and then hit a brick wall with line 2. As with quite a few hardware documentation, actual information about the different options was quite scant and I didn’t really know what most of them meant. Anyway, it turns out that neither a registrar port nor an outbound proxy port had anything to do with the SIP port and that keeping the configurations (bar account number and password) the same gave me a working set up. It took me a while to figure this out because the SIP provider’s tech support couldn’t tell me what I needed to know (even though they did sell pre configured Billion routers) and my mistake was setting the registrar port to the SIP port number. And the tech support guy who answered my call insisted that I check that I’d filled in the right password and account number and reboot the router a few times and give it 20 minutes for changes to take effect. All entirely unnecessary. Resetting the port number and testing got the second line working in only a few minutes. Trying to work out what actually worked took longer.



{June 19, 2008}   Out of Memory!

Ever since I’ve started working with MS Excel 2007, I’ve encountered several incidences of “out of memory” problems on a computer with 2Gig of RAM (memory).

This and this point out issues on memory limits with Excel.

I am doing pretty dodgy stuff like calling python scripts from VBA, among other things. Python is much, much nicer for parsing text files however…



{June 19, 2008}   Protected: Gym Diary: Week 4

This post is password protected. To view it please enter your password below:




{June 11, 2008}   Using Python in Excel

Rather than using a COM server for driving a few python scripts from Excel, I was considering using the Microsoft Script Control library. For example:

Public Function os_getcwd()

Dim sc as Object
Set sc = New MSScriptControl.ScriptControl
sc.Language = “python”
sc.ExecuteStatement (“import os”)
os_getcwd = sc.Eval(“os.getcwd()”)
End Function

Using it requires adding the Microsoft Script Control 1.0 reference (VBE->Tool->References), which for some strange reason was pointing to a very strange location. I had to re-register the dll/change the reference location by running regsvr32 <fullpath>/msscript.ocx from the command prompt (cmd.exe) as administrator. Even though the command was issued from an administrative account, the command wasn’t being run as adminstrator. In Windows Vista, issuing commands from the command prompt as administrator requires either typing /runas <username>:administrator <command> in the search box in the start menu or; typing ‘cmd’ in the search box, right clicking the result at the top of the menu box and selecting “Run as administrator”. Anything else results in 0800xxx permission errors.

It works reasonably well if the return type is relatively simple — a flat 1-dimensional array, a string or numeric types — or no value is to be returned. This method will not work if you want to return a dictionary, nested lists or any of the more complex (but fundamental) data types you might take for granted in a more richly featured language.



et cetera
Follow

Get every new post delivered to your Inbox.