The Case of the Naughty Alcoholic Thief no comments
I hate it when someone opens a bottle of cognac that does not belong to them, drink it and then dilute it to hide the fact. I also hate it that the naughty alcoholic thief thinks everybody else is an idiot because they won’t notice the broken seal and the absurdly different coloration of the alcohol. The questions are: 1. How much alcohol was actually consumed? 2. How can I produce hard evidence that the bottle is diluted? This is a challenge that requires some basic chemistry capability. I see several methods to solve the problem. I could use a hydrometer, compare it with an original sample and calculate the new alcohol proof content. Or, I could utilize spectroscopy analysis to determine the dilution ratio.
I’m going to go with spectroscopy analysis because more samples and measurements will be taken to allow more degrees of freedom for error and also for ease of preparation. Here is a preliminary experimental procedure:
- Measure total volume of sample.
- Produce reference samples of dilutions 1/0, 1/.5, 1/1, 1/2 (3-5 ea, whatever the amount so I can fit everything into one microplate)
- Add a row on the microplate with just water.
- Stick it in the spectrophotometer and have it measure absorbance across a wide range of the spectra
- Start Mathematica and start producing some linear models from the data
- Calculate alcohol content of sample based on absorbance.
- Extrapolate amount of original alcohol drank.
- Produce evidence.
- Encourage naughty alcoholic thief to go to AA, cause he/she has serious issues.
That’ll teach you to steal and dilute, my spidey-senses forces me to test it. Now I can’t wait to go back to school, or I can just buy a spectrophotometer, because everybody needs one in their mancave.
Self reminder: Bring tap water sample.
No Phone Trials no comments
Yesterday, my phone, the HTC Incredible S, decided to take a dump on me while updating via Market. Now it no longer boots up. I tried everything I can think of to fix it, all with no success. Being that I am currently somewhere between broke and close to broke, I cannot replace my phone until the pay starts coming in. I think of this change of situation as an opportunity to try something new. This something new is actually something pretty old school–not having a mobile phone at all. For the next while I will attempt to survive without a (mobile phone)/(smart phone). I will try to shift some of the functionality of the phone to other means:
- Calling functionality will be taken over by Google Voice on GMail (I don’t usually receive or make that many calls anyway)
- Texting functionality will also be taken over by Google Voice (I also don’t text that much)
- For emails, I will check on a computer/laptop whenever I have the opportunity
- For weather checking, I will use my computer’s desktop widget, by looking at the sky, and checking the barometric chart on my watch
- For on-the-go video chat over GTalk, I will talk to people face-to-face
- For Google Calendar, I will keep at $0.50 notepad from Staples on person at all times
- For music, I will revert back to my iPod Touch :(
- For GPS Navigation, I will use Google Map printouts and try to memorize the route before I depart
- For Camera, I will not take pictures
- For back-of-the-envelope calculations, instead of Wolfram Alpha, I’ll use my notepad from Staples
- For sharing contact info, I will keep more business cards on my person
- For address book, I don’t think I need one since I can’t call or email on the go
- For emergencies, I will use public phones that remain, yell real loud, perform CPR. In case of life threatening situations, I will neutralize the threat with MacGyver skills.
My Rambling Thoughts on Firearms no comments
My Rambling Thoughts on Firearms
I have wanted to put to words these thoughts boiling in my head in regards to “guns”. First let me say right now that this post is not about pro-gun or anti-gun but just about my familiarity with firearms, some misconceptions I had and my analysis on why it happened.
Let me give a little background about where I grew up and how it relates. I was born in Hong Kong. I lived the first five years of my life there before immigrating to the United States with my family, to end up in Brooklyn. Where I was born, in Hong Kong, owning and possessing a firearm was a privilege, not a right, there’s no Second Amendment there. Some people do own firearms, but these people are wealthy and possess one simply for entertainment. There is no concept for using a firearm for defense. Simply, if you had a “gun”, there was a real good chance that you were a criminal. While growing up in Brooklyn, firearms were also taboo within my family, within the community, at school, and pretty much everywhere else.
This taboo was partly fueled by an emphasis on school violence. The public middle school I went to, kids were constantly beating each other up, knife fights would sometimes happen. Before I attended the middle school, there was also a firearms incident, some kid had brought a gun to school. The natural reaction was as expected, parents were furious, mine included. This fueled their belief that firearms were dangerous and possession of such highly correlated to criminal behavior. When parents believe something strongly, their kids believe it too (that’s me).
One thing I learned growing up is to stick to your values. You develop them as you grow up and I learned that it is the American way to stick to your principles and don’t let other people tell you otherwise without some hard facts, some hard logic, and some more hard thinking on your part.
I also learned the history of the United States, its foundation, its growth, its wars, its change over time. For those who were asleep in school as a child, the United States was founded and grew on principles of service to the people, equal representation, protection of individual freedoms, and the respect for the law of the land. All this is detailed in a document called the Constitution. If you haven’t read it, go get a copy and read it, it’s actually a really short document. It sets up a government by which the people can elect a representative, who would do what their constituents want them to do. And if they did otherwise, 2 or 6 years down the road, they would be replaced.
If you’ve lived in China, lived with the vast majority of the Chinese population (the un-Americanized ones), you will know that the attitude towards government is the exact opposite of our American attitude towards government. The Chinese in China believe that you should never question the government, not for fear of imprisonment, nor some other form of retaliation, but because it is the wrong thing to do. In China, the people serves the government, not the other way around, and by them, it’s the way it should be. Don’t classify it as brainwash though, because it’s not.
So there is a stark contrast between what the people of these two countries believes the role of government is. In China, the government is to be served to further the glory of the nation. In the United States, the government is to serve to ensure the freedoms we enjoy in a democratic society. It is important to remember the reasons and context for almost all the wars we were a part of. If we briefly look at the modern era, we took part in World War II because Japan attacked Pearl Harbor and threatened American freedom. We were in the Korean War for fear that if the Communists became too powerful, we could not be capable to resist them in order to maintain American freedom; same for Vietnam. We invaded Afghanistan because the Taliban would not surrender Osama bin Laden to answer for his crimes in our courts of justice. We invaded Iraq for fear that their weapons may pose a threat to our American freedom. We supported the Libyan war and various other wars all over the world to help spread the democratic way. We did all this so that we, as individuals, may continue to do as we do according to the freedoms described in the Constitution and also so that the people of other countries may have the freedom to do so as well. Individual freedom is the name of the game. The hard thing to do is to protect individual rights because the liberties of large groups can easily be protected with a large majority. But does this diminish the right of the individual or the minority? It shouldn’t, and conceptually, every American knows that it shouldn’t.
So why is the anti-gun sentiment so strong among some Americans? Why do some Americans support laws restricting gun possession and use? Because it’s bad. I suppose it is obvious to many people that those who possess firearms are criminals or have criminal tendencies due to their upbringing or lack of education. I suppose it is also straightforward logic to many “that since criminals use guns, then those who use guns are criminals, and therefore we must restrict the possession of guns.” Also because 99% of gun owners are criminals and if they’re not criminals then they have no business owning a firearm. Duh, obviously!
If you are part of the group that agree with these sentiments regarding owners of firearms, I am here to tell you what I believe and I would hope that you would put some hard thought into it without quickly dismissing it as pure nonsense. It is very important to ask for sources when someone tells you something. So if your friend says 99% of gun owners are criminals, your job is to say “where’d you hear that from?” Or if you hear the news say “there is a correlation between gun ownership and criminal behavior”, your job is to ask, what’s your sample size, what’s the p-value, what kind of statistical test did you use, how encompassing is the sample population. Everybody has an agenda, even the ‘unbiased news’. It is important for every citizen to fact-check and verify all information you intend to stake a important belief on instead of just trusting the information. It’s like buying something on eBay, you see something that might be too good to be true, so you check the seller’s ratings, other buyer’s comments, market price, etc. And I guarantee you that if you don’t do this research consistently, you will end up getting screwed a few times. Same thing goes with information.
After thinking about all this for a while, I went out and bought a shotgun. I don’t intend to hunt. I don’t intend to shoot anybody or harm any person or any animals. I bought it to show support to the American principle that drew my family to immigrate to the United States. I bought it to demonstrate to my taboo-believing family that we are in America, this is our right. The government serves us, the people, including the minorities. If the government did everything the majority thought was right, we wouldn’t be able to immigrate here in the first place.
I support the protection of individual liberties and the protection of individual freedoms enjoyed by minorities. I also support the protection of individual freedoms enjoyed by the majority. I support what soldiers are risking their lives for, for the American freedoms. It doesn’t make sense to me that we can send soldiers to protect our freedoms from foreigners but at the same time limit our freedoms from within. I don’t have much affection for guns but in this big debate about firearm ownership, I recognize that this is a protected right from the foundation of the country. I recognize that if this right was suppressed by a strong minority or even a majority of people, then it’s time to think to myself: what next?
Constitution of the United States
Blender 3D Photo no comments
In connection with the 3D model I showed in the last post, here is my attempt at a making stereoscopic 3D image. If anybody has those quirky red-cyan glasses or NVIDIA 3D Vision, you can check it out below:
I don’t have NVIDIA 3D Vision but the Red-Cyan image looks alright so when I figure out how to render within a reasonable lifetime, I’ll try to render the entire animation sequence in stereoscopic 1080p.
Beginning Blender no comments
I recently became interested in some 3D modeling. In pursuing that, downloaded the Blender software for 3D modeling. After following a tutorial and messing with the settings and options for a while, I managed to create a short (5 second) animation:
Calculating Sunrise/Sunset Times on a Moving Ship no comments
I’m going on a cruise soon on the Norwegian Jewel to the Bahamas. What better than to watch a sunset or a sunrise on the ship. Calculating sunrise and sunset times on a moving vessel is not like calculating it on land. The complexity is compounded when Norwegian Cruise Lines doesn’t report the exact position of the ship at a certain time, all I know are port times.
The first step involves listing what I know: port locations and port times. Just this data alone is insufficient as there is a leg with 2 days in between, and another with 1 day in between with no data. This data published on the itinerary at NCL.com is supplemented by ship data from sailwx.infofor the Norwegian Gem and Norwegian Jewel running the same 7-day Bahamas itinerary.
From this list of known positions, extrapolations are made for the estimated positions for intervals no more than 20 km. The time for time-at-arrival of location is calculated. Sunrise and sunset time for each position (original and extrapolated) is compared to the calculated time-at-arrival. If it is a few minutes before, it’s the time we want. If the event has already happened, we’ve overshot.
Click here for the Mathematica notebook.
Cost of Boiling Water Electric Kettle vs. Gas Stove Kettle no comments
A major debate in my house is the cost of boiling water on an electric kettle compared to boiling water on a gas stove kettle. Everybody knows that the cost of electricity per Joule is more than the cost of piped natural gas per Joule. However, they’ve given it up to thinking that boiling water on an electric kettle is only minimally more expensive than on a gas stove and the time saved is well worth the tiny increase in cost. While I cannot try to calculate the value of the time saved, I can try to calculate the value of the cost difference. This post details some calculations to compute the cost to boil 2 liters of water.
Some assumptions were made to make the calculations easier:
- water is pure (so 1 liter water = 1 kilogram)
- cost of electric and gas is average in New York State ($0.194/kWH and $1.357/Therm)
- starting temperature is 50 F or 283.15 Kelvin
- heat capacity of water is 4.2 J/g*K
- no energy waste
Here is a screenshot of the calculation:
The result is:
- Electric kettle costs $0.041 USD to boil 2 liters of water
- Gas stove kettle costs $0.0097 USD to boil 2 liters of water less than 25% cost of electric
For the future when I have more time on my hands, I may conduct an experiment with an electric power meter and gas valve meter measuring amount of electricity and natural gas required to heat up a volume of distilled water. This will allow take into consideration some of the waste heat produced by each method and take that into consideration for cost.
Mathematica code for counting surface area of an image no comments
Calculating surface area of an image is a useful tool in analyzing emergent properties of various systems. This is a Mathematica notebook with a function to calculate surface area (darkness of pixels) of a certain image.

