When buying a gaming laptop a few things are important
1. Brand, this will determine if your laptop has any resell value, Clevo tends to be a good choice
2. Timing, it's important to buy (or not to buy) at the right time, a good example is the recent Clevo Pascal debacle, if you bought a $6000 laptop with dual 980m 5 months ago then you're out of luck as the new Pascal based Clevo is waaaay superior than the 980m but it costs roughly the same and the killer is that you can't upgrade 980m to Pascal 1080
Yet another example of bad timing would be if you bought Razer Blade a few months ago since the older one has 970m and the latest one has Pascal 1060, selling for the same price
Tuesday, October 11, 2016
Friday, October 7, 2016
CIGNA sent my HSA debit card to the wrong address and I lost $800!!!
So due to CIGNA's negligence I'm down $800, three weeks ago my HSA debit card stopped working (I suspected that the magnetic strip was damaged somehow). So I called CIGNA for a replacement card and I explicitly made sure that it would be sent to my new address.
Lo and behold, CIGNA did NOT update my address with the bank that actually issued the card and it was sent to my old address, whoever received my card decided to do multiple ATM withdrawals ........
The thing is that when I called CIGNA today they still told me that the card was sent to my current address but when I was transferred to the bank I was told that they sent it to my old address and CIGNA didn't update them at all
Lo and behold, CIGNA did NOT update my address with the bank that actually issued the card and it was sent to my old address, whoever received my card decided to do multiple ATM withdrawals ........
The thing is that when I called CIGNA today they still told me that the card was sent to my current address but when I was transferred to the bank I was told that they sent it to my old address and CIGNA didn't update them at all
Monday, October 3, 2016
To buy or not to buy, part 2
After dealing with various online sellers on eBay and elsewhere, the lesson I learnt is this
Find reliable sellers rather than reliable products
Products, no matter how reliable they are, can still fail, but if you have a reliable seller, you'll be taken care of, as simple as that. And the most reliable seller I know (firsthand) so far is Apple!
Find reliable sellers rather than reliable products
Products, no matter how reliable they are, can still fail, but if you have a reliable seller, you'll be taken care of, as simple as that. And the most reliable seller I know (firsthand) so far is Apple!
Dodgy Chinese Sellers on eBay
I recently purchased a few electrical items from eBay sold by three different Chinese sellers in China. And all of them were disappointing to say the least. Note that each seller has a very good rating.
For the first item the eBay status changed to shipped the very next day and I was given the tracking number, however, the item itself didn't actually ship until more than a week later and on top of that it was defective, it was supposed to be an HID USB relay (listed at $11.59, a good one on amazon sells for $40) and yet Windows failed to detect it as an HID USB device. I tried it on 3 different PCs with 3 different OSes and all failed.
When I contacted the seller he told me to send pictures of the item, I did and I even sent him the screenshot showing Windows couldn't start the HID device driver for this particular USB relay. He then replied asking for the picture of the USB connection and I told him that the picture of the item I sent earlier included the USB connection I used.
He then replied that he's been selling this item for a long time without any problem and I replied that the item he sent me was obviously defective. His reply was that it would be troublesome for me to return the item but he can give me a partial refund.
I then asked how much refund he would give me and in return he asked me how much I wanted at this point I felt that he was just stalling. Since he asked, I asked for the full price of the item, I was willing to waive the shipping cost since he did ship it to me but then he came back with just $5, less than half the price of the item.
When I replied that I would only take the full price of the item he sent me the same email the first time I asked him for a refund ..........
For the second item it was a DC DC converter, the item shipped promptly but the thing is when I connected it to a 12V line of my PSU the whole thing blew up, there was a short somewhere, the thing is that I wasn't sure if it was my fault or the item itself was defective, I have a strong feeling that it was defective .....
And last but not least, the third item was a Arduino board that was selling for $1.69 including shipping cost LOL the item "shipped" promptly (as the status changed to shipped the very next day) , however, a few days later I got an email that the item might be defective and if I would like a refund instead. The odd thing is that the item description of the eBay link changed completely into some fashion thingy.
I then replied that that I didn't order a fashion item and I got an exact email asking me if I wanted a refund. In the following two weeks the seller sent me two emails asking me to give him a positive review even though I haven't received the item yet. It might as well be that he didn't actually send the item, hence the ruse using an email stating defect and the possible refund, since if you ask for a refund he'd lose nothing as he didn't actually send the item and if you're too busy to notice his email he'd pocket your money for free ....... just a guess though
Fast forward more than a month later and I still hadn't received the item, I then asked for a refund since I didn't receive the item and he prompty gave me a full refund. So at least I got my money back on this one.
Well, I guess if it's too good to be true, it is .........
For the first item the eBay status changed to shipped the very next day and I was given the tracking number, however, the item itself didn't actually ship until more than a week later and on top of that it was defective, it was supposed to be an HID USB relay (listed at $11.59, a good one on amazon sells for $40) and yet Windows failed to detect it as an HID USB device. I tried it on 3 different PCs with 3 different OSes and all failed.
When I contacted the seller he told me to send pictures of the item, I did and I even sent him the screenshot showing Windows couldn't start the HID device driver for this particular USB relay. He then replied asking for the picture of the USB connection and I told him that the picture of the item I sent earlier included the USB connection I used.
He then replied that he's been selling this item for a long time without any problem and I replied that the item he sent me was obviously defective. His reply was that it would be troublesome for me to return the item but he can give me a partial refund.
I then asked how much refund he would give me and in return he asked me how much I wanted at this point I felt that he was just stalling. Since he asked, I asked for the full price of the item, I was willing to waive the shipping cost since he did ship it to me but then he came back with just $5, less than half the price of the item.
When I replied that I would only take the full price of the item he sent me the same email the first time I asked him for a refund ..........
For the second item it was a DC DC converter, the item shipped promptly but the thing is when I connected it to a 12V line of my PSU the whole thing blew up, there was a short somewhere, the thing is that I wasn't sure if it was my fault or the item itself was defective, I have a strong feeling that it was defective .....
And last but not least, the third item was a Arduino board that was selling for $1.69 including shipping cost LOL the item "shipped" promptly (as the status changed to shipped the very next day) , however, a few days later I got an email that the item might be defective and if I would like a refund instead. The odd thing is that the item description of the eBay link changed completely into some fashion thingy.
I then replied that that I didn't order a fashion item and I got an exact email asking me if I wanted a refund. In the following two weeks the seller sent me two emails asking me to give him a positive review even though I haven't received the item yet. It might as well be that he didn't actually send the item, hence the ruse using an email stating defect and the possible refund, since if you ask for a refund he'd lose nothing as he didn't actually send the item and if you're too busy to notice his email he'd pocket your money for free ....... just a guess though
Fast forward more than a month later and I still hadn't received the item, I then asked for a refund since I didn't receive the item and he prompty gave me a full refund. So at least I got my money back on this one.
Well, I guess if it's too good to be true, it is .........
Dodgy Chinese Sellers on eBay
I recently purchased a few electrical items from eBay sold by three different Chinese sellers in China. And all of them were disappointing to say the least. Note that each seller has a very good rating.
For the first item the eBay status changed to shipped the very next day and I was given the tracking number, however, the item itself didn't actually ship until more than a week later and on top of that it was defective, it was supposed to be an HID USB relay (listed at $11.59, a good one on amazon sells for $40) and yet Windows failed to detect it as an HID USB device. I tried it on 3 different PCs with 3 different OSes and all failed.
When I contacted the seller he told me to send pictures of the item, I did and I even sent him the screenshot showing Windows couldn't start the HID device driver for this particular USB relay. He then replied asking for the picture of the USB connection and I told him that the picture of the item I sent earlier included the USB connection I used.
He then replied that he's been selling this item for a long time without any problem and I replied that the item he sent me was obviously defective. His reply was that it would be troublesome for me to return the item but he can give me a partial refund.
I then asked how much refund he would give me and in return he asked me how much I wanted at this point I felt that he was just stalling. Since he asked, I asked for the full price of the item, I was willing to waive the shipping cost since he did ship it to me but then he came back with just $5, less than half the price of the item.
When I replied that I would only take the full price of the item he sent me the same email the first time I asked him for a refund ..........
For the second item it was a DC DC converter, the item shipped promptly but the thing is when I connected it to a 12V line of my PSU the whole thing blew up, there was a short somewhere, the thing is that I wasn't sure if it was my fault or the item itself was defective, I have a strong feeling that it was defective .....
And last but not least, the third item was a Arduino board that was selling for $1.69 including shipping cost LOL the item "shipped" promptly (as the status changed to shipped the very next day) , however, a few days later I got an email that the item might be defective and if I would like a refund instead. The odd thing is that the item description of the eBay link changed completely into some fashion thingy.
I then replied that that I didn't order a fashion item and I got an exact email asking me if I wanted a refund. In the following two weeks the seller sent me two emails asking me to give him a positive review even though I haven't received the item yet. It might as well be that he didn't actually send the item, hence the ruse using an email stating defect and the possible refund, since if you ask for a refund he'd lose nothing as he didn't actually send the item and if you're too busy to notice his email he'd pocket your money for free ....... just a guess though
Fast forward more than a month later and I still hadn't received the item, I then asked for a refund since I didn't receive the item and he prompty gave me a full refund. So at least I got my money back on this one.
Well, I guess if it's too good to be true, it is .........
For the first item the eBay status changed to shipped the very next day and I was given the tracking number, however, the item itself didn't actually ship until more than a week later and on top of that it was defective, it was supposed to be an HID USB relay (listed at $11.59, a good one on amazon sells for $40) and yet Windows failed to detect it as an HID USB device. I tried it on 3 different PCs with 3 different OSes and all failed.
When I contacted the seller he told me to send pictures of the item, I did and I even sent him the screenshot showing Windows couldn't start the HID device driver for this particular USB relay. He then replied asking for the picture of the USB connection and I told him that the picture of the item I sent earlier included the USB connection I used.
He then replied that he's been selling this item for a long time without any problem and I replied that the item he sent me was obviously defective. His reply was that it would be troublesome for me to return the item but he can give me a partial refund.
I then asked how much refund he would give me and in return he asked me how much I wanted at this point I felt that he was just stalling. Since he asked, I asked for the full price of the item, I was willing to waive the shipping cost since he did ship it to me but then he came back with just $5, less than half the price of the item.
When I replied that I would only take the full price of the item he sent me the same email the first time I asked him for a refund ..........
For the second item it was a DC DC converter, the item shipped promptly but the thing is when I connected it to a 12V line of my PSU the whole thing blew up, there was a short somewhere, the thing is that I wasn't sure if it was my fault or the item itself was defective, I have a strong feeling that it was defective .....
And last but not least, the third item was a Arduino board that was selling for $1.69 including shipping cost LOL the item "shipped" promptly (as the status changed to shipped the very next day) , however, a few days later I got an email that the item might be defective and if I would like a refund instead. The odd thing is that the item description of the eBay link changed completely into some fashion thingy.
I then replied that that I didn't order a fashion item and I got an exact email asking me if I wanted a refund. In the following two weeks the seller sent me two emails asking me to give him a positive review even though I haven't received the item yet. It might as well be that he didn't actually send the item, hence the ruse using an email stating defect and the possible refund, since if you ask for a refund he'd lose nothing as he didn't actually send the item and if you're too busy to notice his email he'd pocket your money for free ....... just a guess though
Fast forward more than a month later and I still hadn't received the item, I then asked for a refund since I didn't receive the item and he prompty gave me a full refund. So at least I got my money back on this one.
Well, I guess if it's too good to be true, it is .........
Saturday, October 1, 2016
Google Interview Question
This was a question for a hardware engineer interview, I didn't go for the interview but someone I know did.
So here's the question, you have an infinite bitstream coming at you one bit at a time, everytime a new bit arrives you have to decide whether the current bit stream you already have is a multiple of three or not.
For example, first bit is '1', well it's not a multiple of three, next is another '1', so what you have so far is '11' and it is 3 so it's a multiple of three, say next you get '0' so you have '011' and again it's still a multiple of three, if the next one is '1' you'll have '1011' which is eleven and it is not a multiple of three and so on.
The thing with this problem is that you can't use brute force because at one time the bitstream becomes very long, remember that it is an infinite bitstream, you won't have enough bits to do arithmetic, everything will overflow under brute force.
The way I'd solve this problem is to use what is called congruence in mathematics, I only know this since I've recently dabbled in number theory for fun.
A congruence is slightly different from modulo, in modulo you only get a remainder of a number, for example, 4 modulo 3 is 1 but in congruence what we have is
a = b (mod c)
I should've used an equivalent sign rather than an equal sign but I don't know how to do it in this blog so equal sign it is.
What the above means is a = b + cx, where a,b,c,x are all integers, or another way is (a - b) = cx, the difference between a and b is a multiple of c.
This means that 4 = 1 (mod 3) but it's also true that 4 = 7 (mod 3). For our problem what we need is
2 = -1 (mod 3)
This is because a bit stream is just a sum of various powers of 2, i.e.,
a string a bits = sum of 2^m = sum of (-1)^m (mod 3) where m runs from 0 till the length of the stream - 1.
This means that if m is odd then 2^m is -1 and if m is even 2^m is +1 (mod 3).
Thus to solve this problem you'll just need a variable that will toggle from positive to negative and vice versa every time a new bit arrives and you'll multiply this variable with the arriving bit, you then add this result to the current sum. If the sum is zero (mod 3) then you'll know that it is a multiple of three otherwise it is not.
This sum will not overflow because you'll just care about mod 3, let's see how this all works, say first bit is '1' followed by '0', and '1', and another '1'
Initialization: sum = 0 sign = +1
First bit: sum = sum + 1 x (+1)
= 0 + 1
= 1 (mod 3)
sign = -1
Second bit: sum = sum + 0 x (-1)
= 1 (mod 3)
sign = +1
Third bit: sum = sum + 1 x (+1)
= 1 + 1
= 2
= -1 (mod 3)
sign = -1
Fourth bit: sum = sum + 1 x (-1)
= -1 - 1
= -2
= 1 (mod 3)
sign = +1
In our example above the bitstream we have was never a multiple of three, i.e. what we have above in decimal was 1, 1, 5, 13 and therefore the sum was never zero, if the next two bits are '0' and '1' we will have a multiple of three because then we'll have 45 in decimal and the method above will produce a sum of 0.
I think this is quite an unfair question unless you know congruence although this was definitely a Google Interview Question that I can answer with confidence, too bad I wasn't the interviewee :)
So here's the question, you have an infinite bitstream coming at you one bit at a time, everytime a new bit arrives you have to decide whether the current bit stream you already have is a multiple of three or not.
For example, first bit is '1', well it's not a multiple of three, next is another '1', so what you have so far is '11' and it is 3 so it's a multiple of three, say next you get '0' so you have '011' and again it's still a multiple of three, if the next one is '1' you'll have '1011' which is eleven and it is not a multiple of three and so on.
The thing with this problem is that you can't use brute force because at one time the bitstream becomes very long, remember that it is an infinite bitstream, you won't have enough bits to do arithmetic, everything will overflow under brute force.
The way I'd solve this problem is to use what is called congruence in mathematics, I only know this since I've recently dabbled in number theory for fun.
A congruence is slightly different from modulo, in modulo you only get a remainder of a number, for example, 4 modulo 3 is 1 but in congruence what we have is
a = b (mod c)
I should've used an equivalent sign rather than an equal sign but I don't know how to do it in this blog so equal sign it is.
What the above means is a = b + cx, where a,b,c,x are all integers, or another way is (a - b) = cx, the difference between a and b is a multiple of c.
This means that 4 = 1 (mod 3) but it's also true that 4 = 7 (mod 3). For our problem what we need is
2 = -1 (mod 3)
This is because a bit stream is just a sum of various powers of 2, i.e.,
a string a bits = sum of 2^m = sum of (-1)^m (mod 3) where m runs from 0 till the length of the stream - 1.
This means that if m is odd then 2^m is -1 and if m is even 2^m is +1 (mod 3).
Thus to solve this problem you'll just need a variable that will toggle from positive to negative and vice versa every time a new bit arrives and you'll multiply this variable with the arriving bit, you then add this result to the current sum. If the sum is zero (mod 3) then you'll know that it is a multiple of three otherwise it is not.
This sum will not overflow because you'll just care about mod 3, let's see how this all works, say first bit is '1' followed by '0', and '1', and another '1'
Initialization: sum = 0 sign = +1
First bit: sum = sum + 1 x (+1)
= 0 + 1
= 1 (mod 3)
sign = -1
Second bit: sum = sum + 0 x (-1)
= 1 (mod 3)
sign = +1
Third bit: sum = sum + 1 x (+1)
= 1 + 1
= 2
= -1 (mod 3)
sign = -1
Fourth bit: sum = sum + 1 x (-1)
= -1 - 1
= -2
= 1 (mod 3)
sign = +1
In our example above the bitstream we have was never a multiple of three, i.e. what we have above in decimal was 1, 1, 5, 13 and therefore the sum was never zero, if the next two bits are '0' and '1' we will have a multiple of three because then we'll have 45 in decimal and the method above will produce a sum of 0.
I think this is quite an unfair question unless you know congruence although this was definitely a Google Interview Question that I can answer with confidence, too bad I wasn't the interviewee :)
Sunday, July 10, 2016
2016
Been doing some number theory lately, tex source and pdf available on github. It's been interesting, learned a lot of new stuffs although the author of the pdf book I read is a bit of a jerk :) I pointed a mistake in his book and all he wanted me to do was to do a pull request on his book's github which I believe will only promote his github reputation.
I told him about my reasoning of creating a solution guide for his book and why I went to such great length in each derivation and he ignored all that, just submit a pull request he said, what a selfish fellow .........
Anyway, nothing new there, most people are selfish
I told him about my reasoning of creating a solution guide for his book and why I went to such great length in each derivation and he ignored all that, just submit a pull request he said, what a selfish fellow .........
Anyway, nothing new there, most people are selfish
Subscribe to:
Posts (Atom)