Sunday, January 6, 2019

Cheapest E10 Fuel

Having lots of competition is still the best way to get the cheapest price of anything.

Just near my house is a Budget Petrol. A few meters away is a Coles Express. A little further down Victoria Road, we have a 7-Eleven and a Speedway. Just across the street is a Caltex Woolworths station and a BP. That BP station has recently closed shop and replaced by a new player called Apex Petroluem. Apex almost always undercuts everybody else by one cent, which keeps prices low.

I usually check the petrol prices using the Fuel Check NSW app and PetrolSpy. If you're the betting kind, you can have a game with the 7-Eleven Fuel app. Use the app to lock in the best fuel price among the nearby 7-Eleven petrol stations. Locked-in price is good for 7 days. If the price goes up, you can still fill up using the locked-in price. If price goes down, then just pay using the lower price.

This is such an interesting idea that people started sharing notes as to where to find the cheapest fuel. If you happen to be in the vicinity of Truganina, then lock in the price. If you're not close by, then you have to find a way to pretend that you are. Apps that can detect and block spoofed locations? There's a (patched) app for that app!

The things that people do for cheap fuel, huh? Me, I normally just get 4c discount from Caltex Woolies from the weekly shop, and then pay using Woolies eGift cards.

Sunday, December 30, 2018

Windows 10 on a 15-Year Old Laptop?

Got my hands on a Dell Latitude D410 laptop, which was released back in 2005, and was wondering what OS to put on this. I hear you saying, just install Linux and she'll be right. I know, but where's the challenge in that?

So the laptop comes with an Intel Pentium M 750 processor, 2GB of RAM, and a 30GB hard drive. I know for a fact that 2GB RAM is enough for Windows 10, but that hard disk might need an upgrade. Took out my screwdriver, and guess what? It's still using the old PATA interface. All my spare 2.5" HDDs are SATA, so no upgrade. Next step is to check the processor compatibility with Windows 10 using this page. But, but the Dothan processor is not even listed there! No harm in trying, right?

Power on the laptop. Press F12 when you see the Dell logo to get into the one-time boot sequence selection. I can see the option for USB external storage, but the directional keys on the keyboard don't seem to work. Booted up again, and pressed F2 to get to the BIOS setup. Again, keys don't work. Fortunately, I've got an extra USB keyboard lying around, so issue fixed.

 Laptop starts reading from the USB stick and the Windows 10 logo comes up on the screen. Five seconds later, I get a blue screen with a sad face emoticon and some error message. I guess it's just too much to hope for, so I didn't even try to investigate or fix the error.

Moving on to Windows 7. The installation took longer than normal, but eventually the thing booted up just fine. Only issue is the drivers are the default ones. That means low screen resolution, no audio, no WiFi, no hotkeys, no sleep/hibernate, etc. And when I got to the Dell drivers and downloads page, there are only drivers for Windows XP and Windows 2000.

Why not just install CloudReady and be done with it? D410 is not on the Certified Models List, but I still pushed through. USB installer starts up then quits. Looks like I'm stuck with Windows XP. No issues installing Windows XP SP3. And after installing the drivers from Dell support page, everything is running properly.

My only concern is the software support, given the age of the OS, specifically the browser and the antivirus software. Most modern browsers don't support XP anymore, and Microsoft Security Essentials stopped support for XP long time ago. After a bit of research, I settled on Firefox ESR 52.9 (Basilisk is another option) and Malwarebytes 3.5, the last/final MB version that is compatible with XP/Vista. Hopefully this should be enough.

Laptop boots up nice and quick. CPU goes to 90% when watching videos on VLC, but can't really complain, given this is almost 15 years old!

Friday, September 21, 2018

Movie 2018.09.21 - Bad Genius

Bad Genius is a movie about a smart but poor scholar named Lynn, who gets involved in a cash-for-answers scheme to help out with her family's finances. She gets caught supplying answers to her classmates, and loses her scholarship. Not deterred, she hatches an even bigger, bolder scheme with a bigger target - the STIC exam.Together with an accomplice, they take the exam in Sydney, which has a 4-hour headstart to the rest of the world due to the timezone difference. During the breaks, they would go to the loo and send out the answers via SMS using hidden mobile phones. Plan sounds great on paper, but when you're holding up the cubicle for a long time, people tend to become suspicious. They eventually get caught out, but not before sending off the answers to Thailand, where their clients are patiently waiting. In the last scene of the movie, Lynn is blackmailed by her accomplice. Deciding to be honest this time, she goes to the authorities and makes a confession.

Interesting plot, but a little bit over dramatic and drawn out for me. A lot of unnecessary scenes to heighten the tension. And I doubt that finger-drumming actually works as a cheating method. Given how the seats are positioned, it would be hard for the concerned parties to see clearly Lynn's finger-drumming sequences. If the proctor had been paying attention, he would've noticed all of those sideway glances and a lot of finger-drumming as answers are being relayed. If not the proctor, other students not in on the scheme would've noticed something amiss and called it out.

All in all, the movie is not too bad, genius.

Thursday, August 30, 2018

Reinstalling Windows 7 Pro on a Dell Precision 3510

Company gave me a hand-me-down Dell Precision 3510. Takes literally minutes to boot up. When I press Ctrl-Alt-Delete, it takes literally minutes to give me the logon screen. I type in my username and password. Again, tens of minutes pass by before I get the desktop. With huge icons. IT doesn't want anything to do with it, and tells me to blow it away.

Tried to see if I can restore the laptop to a proper state. Boot up and press F8 to access the Advanced Boot Options menu. Click on "Repair Your Computer". Windows then loads some minimal files to boot up. Choose your language, log in as Administrator, and then you're presented with a choice of System Recovery Options. System Restore is not going to help as there were no previous restore points. System Image Recovery also won't help as no backup system image was created or found. So looks like we'll have to use the Dell Factory Image Restore option (usually the last item on the list).

The tool then goes about reformatting the hard disk and flashing the stored factory image from the recovery partition. In my case, the restoration always fails at the 63% mark. I guess the factory image is borked. Next up, the Dell OS Recovery Tool.

With this software, you simply provide the service tag, and it will download the appropriate Dell recovery image and burn it to a USB stick (at least 8GB) that you provide. Boot up the laptop, press F12 to change the boot order, and select to boot from the USB stick. In my case, the USB prep kept on failing. The tool would start writing the downloaded 7GB image. During the last few seconds (after half an hour or so), it would complain that something has changed and starts the process again, ad infinitum.
After half a day of trying, it was only after I switched to a SanDisk USB stick that the burn completed successfully.

Next problem. According to this, I was supposed to install Windows on the primary partition, but Windows says no. "Windows cannot be installed on this disk. The selected disk has an MBR partition table. On EFI systems, Windows can only installed on GPT disks." Simplest solution is to delete all existing partitions - OS, Recovery, Primary. Another way is to convert the MBR disk to GPT.

  1. Press Shift+F10 to bring up command prompt.
  2. Run diskpart command. 
  3. "list disk" to list disks.
  4. "select disk 0" if disk 0 is the one you want to install Windows on.
  5. "clean" to wipe the selected disk.
  6. "convert GPT" to convert the selected disk.
  7. "exit"
This time you should be able to install Windows successfully. Just be aware that during the restart, remember to remove the USB disk, so the laptop will boot from the hard disk.

Wednesday, August 22, 2018

Movie 2018.08.22 - Crazy Rich Asians

I've got the ebook, but haven't had time to read it, so watched the movie knowing nothing about it. Of course, except for the usual FB hype as to which actors are in the movie, why it's such a big deal in Hollywood, etc. etc.

To be honest, it was better than I expected it to be. I thought the movie is going to be an extended YouTube video of how the fuerdai spend their hard-earned wealth - the extravagant parties, the exotic vacations, the flashy cars, the one-of-a-kind luxury items, etc. Yeah, it has a bit of those, but surprise! - it actually has a story.

Crazy rich Nick brings poor professor girlfriend Rachel to meet the family, without telling her how wealthy the family is. Mom Eleanor disapproves because she thinks she's not good enough - not a real Chinese. Grandma disapproves because she feels she is the reason Nick is hesitant to come back home for good and take over the family business. All the girls disapprove because she is competition. To fluff up the movie a bit more, we have a crazy rich bachelorette party at a private island resort, a crazy rich stag party on a container ship, a crazy rich wedding at Chijmes, and a crazy rich engagement party at the Marina Bay Sands. Throw in an extramarital affair to add more drama.

In the end, Rachel managed to use game theory (or was that reverse psychology) to make Eleanor change her mind about her and bring about a win-win outcome. Nick proposes to Rachel with Eleanor's own engagement ring, and everyone lives happily ever after. Well, everyone except for unfaithful Michael who lost his golden ticket in Astrid.

Friday, August 10, 2018

Long-Term Learning

Nowadays, it's not just what you learn, it's also about how you learn it.

Ideally, we should be learning by doing as the retention rate is better. However, there are times when we simply need to remember a lot of things in the shortest amount of time. And this is done by rote memorization. I still remember cramming for exams using index cards, memorizing facts and formulas to get me through. Do I still remember them now? Of course, not.

How about learning languages? Well, there's an app for that. A lots of apps, actually. For vocabulary memorization, you can't go wrong with Memrise. For grammar, sentence structure, syntax, context, etc., get Duolingo as a supplement.

For everything else, you can make use of flashcard-based learning systems like Quizlet, SuperMemo or Anki. If you're not sure which one to use, try Quizlet first. Lots of study sets to choose from (or create your own), and usage is pretty straightforward. Select a study set, answer one question for every term, repeat until you get everything right.

For long-term learning, you might want to look into SuperMemo and Anki for their spaced-repetition algorithms. Spaced repetition makes use of an individual's forgetting curve - resurfacing a question just when you're about to forget it for maximum recall.

SuperMemo has been around for a loong time, and its algorithm now on its 17th iteration (SM-17). SuperMemo is not free though. It ranges from $10 to $60 depending on which version (algorithm) you get. Anki, on the other hand, is open-source and free. That said, I believe it implements the older SM-2 algorithm with a few enhancements. Quizlet now has SR as part of Plus offering, but that's $15 per year.

I'd say try out the free apps first and upgrade if you think you need something more.

Monday, August 6, 2018

Book 2018.08.06 - Automate This

Automate This: How Algorithms Came to Rule Our World by Christopher Steiner is what it says it is. It tells the story of how algorithms infiltrated Wall Street, and how they eventually started taking over almost all aspects of our lives.

Most of the stuff mentioned in the book we already know:

  • how algorithms made possible high-frequency trading (HFT) in the stock markets
  • how Google, Netflix, and dating sites make use of algorithms to make uncanny suggestions
  • how music labels and movie producers predict pop hits and box-office blockbusters before they are released
  • how algorithms are outperforming chess players, music composers, game show contestants, poker players, doctors, lawyers, pharmacists, radiologists, sports writers, etc.

There's one thing which is new to me though. When you call customer service, and the automated voice tells you that this phone call may be monitored or recorded for quality and training purposes, what do think is happening? I used to think that such calls are being recorded in case there is a disagreement, so management can go back to the recorded call and check who said what.

What is actually happening is that when you call, a bot listens in to the conversation. It is listening to your tone of voice, how you structure your sentences, what specific words you used, etc. It determines your "personality" within thirty seconds, and advises the call agent on how best to interact with you. Better still, the next time you call, the bot will be able to identify you, and route your call to an agent that best matches your personality traits for a faster resolution time.

The numbers don't lie. Data scientists took 1500 phone call recordings for a group of 12 customer service agents and crunched the numbers. When a caller gets paired with a agent with a matching personality, calls lasted for about 5 minutes with a 92% resolution rate. Matched with a "wrong" agent, calls lasted twice as long and the resolution rate drops to 47%.

With bots and their algorithms take over a lot of jobs (self-driving vehicles!), everyone should start thinking about getting into programming and computer science. Until the day bots start writing their own code.

Thursday, July 5, 2018

invalid vector subscript on MoneyManagerEx

I do my budgeting and income/expense analysis using this software package called MoneyManagerEx. Open-source and easy to use. Best of all, it's free.

So I was in the process of entering a "buy" share transaction. Being the lazy guy that I am, I duplicated a previous "buy" entry, instead of creating a new transaction. After making the necessary edits, the system came up with an error message saying "invalid vector<T> subscript". Cannot edit or delete the new entry because the system keeps throwing up this error message.

Searched the interwebs high and low and found only one reference regarding this. Basically, creating duplicates of stock transactions was never implemented in the software, yet was not specifically disabled. This is fixed in v1.4 where the Duplicate button is disabled for stock transactions.

To remove the offending transaction (if you know which one), you simply run a delete batch file via Tools --> Database --> Database-Debug:

-- MMEX Debug SQL - Update --
delete from CHECKINGACCOUNT_V1 where TRANSID = x;

In general, we first need to list out the account ID of the shares:
where ACCOUNTTYPE = "Shares";

This tells us the correct linkages:

With this we can determine the extra transaction that needs to be deleted:
where ACCOUNTID = x;

And this is how the debug file looks like (assuming 30 is the account ID of the share with the bad transaction:
-- MMEX Debug SQL - Read --

Problem solved.

Thursday, June 14, 2018

Free Qantas Frequent Flyer Membership

Note that we're talking about the $89.50 QFF membership and not the Qantas Club that gives you access to the airport lounges. THAT one costs $540 for a one-year membership, PLUS a once-off joining fee of $399. Wow!

Unlike Qantas Club, you can actually get QFF membership for free. As of this writing, there seems to be two registration links:

Easiest way to get free QFF membership is to register using a foreign country. Membership fee is only charged if you're from Australia or New Zealand. Once the application has gone through, simply log in and change your address/country to the real one.

If you have kids aged 3 to 11, they can join the Joey Club, which comes with free QFF membership. They also get a welcome pack, including a Joey Club passport. Sign them up here.

There are also lots of online codes that gets you free membership, e.g.

If FAMILYFREE doesn't work for some reason, feel free to try the below codes. They are known to work before:

  • CBA
  • ANZ
  • AMEX
  • HSBC
  • AVIS
  • NAB
  • UBER

Do note that these codes seem to only work with the first URL, and not the second one.

The last time I tried applying for QFF, the website sort of just hangs with a circle that goes round and round forever. The registration page never gave an acknowledgement that the application was received or successful. That said, I did get a QFF card in the post a week later. Other people mentioned that you'll need to fill in ALL the blanks on the web form for registration to work. YMMV.