Tuesday, August 16, 2016

Linux VS Mac OS GNU command line tools

After using the tools on Mac for a while, I realize a number of the tools that I am familiar with in Linux is not the same on Mac.

I found this website:
https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/

Apparently, there's a difference as the Mac uses the BSD version of the GNU tools.

The website tells you how to use the Linux version of the tools on Mac.

Tuesday, August 2, 2016

Windows 10 installation in VirtualBox and setting up shared folder

Conversion of SAS file formats seems an unlikely challenge. Unfortunately, the packages from Python and R churned out many errors for my files. So I am trying to install an SDS version. Since I am using a Mac right now, I would need Windows to run SAS and I would need VirtualBox on my OS X. I found 2 ways to get SAS and both use VirtualBox anyway, so I thought I would document the setting up procedure, with the steps to create shared folders.

CREDITS: steps were adapted from here

Host OS: Mac OS X El Capitan 64-bit, CPU-i7 quad core @  1600 MHz, 16GB RAM
VM: Oracle's Virtualbox (VB)
Guest OS: Windows 10

Installation of Windows 10:
1) Download Windows 10 .iso file. I downloaded the 64-bit (amd64).

2) Download VirtualBox. After installation, got through the wizard to install Virtualbox. It's a very straightforward process:
a) OS Type: OS=Windows 10 (64-bit)
b) Memory: I chose fixed storage - it's supposedly faster.

3) Double click on ISO to initiate VM. Follow wizard to install Windows OS using the .iso file from (1).


TO SET UP SHARED FOLDERS:
Set this up to allow access of host files from the guest system.
1) Create a folder, name of your choice. For illustration purpose, the path of my folder is "C:\Shared".
2) Open VB, go Settings > Shared Folders.
3) Click on the 'Add folder' icon, key in the path, and look for folder name from (1).

4) Checking 'read-only' means you will not be able to change anything from the guest machine - guest can only 'download' - so for all practical purposes, we uncheck this.

5) You should also set "Auto-mount", and "Make Permanent", so that the folder is mounted every time you load this VM. A good picture on how this is done, click here. "Make Permanent" box might not be present, if not, do not do anything.

6) Start VM and login. From the VB menu, select Devices > CD/DVD Devices > VBoxGuestAdditions.iso
This ISO contains an image of a DVD that contains essential files. Mount this image (something like putting in a virtual CD/DVD into a virtual drive). Run the image using:
sudo /cdrom/VBoxLinnuxAddition-amd64.run

7) You might need to restart the VM.

Friday, June 24, 2016

The Medici Effect by Frans Johansson

themedicieffect-sub.jpg
Image credit: http://bit.ly/1zJoBIL

The Medici Effect is a book about innovation. Specifically, the author, Frans Johansson argues that innovation occurs more frequently and extraordinary inventions come to fruition when one tries to hybridize/synergize/combine/integrate/meld ideas from a diversity of more than 1 field; he called it "the intersection". Overall, the book is a simple read with very clean and concise language and a very clear message. While the arguments are not mind-blowing, the book does provide many interesting anecdotes and trivia that support the author's perspectives. If you are looking for a relatively relaxing read, and also increase your knowledge, you should pick up this book.

The book leaves with 3 key points:
1) the future lies in the intersection; if you want to innovate, find your way there
2) expect the unexpected because intersections are everywhere and you never mind what to anticipate when disparate fields collide
3) there is logic to the intersection but the logic is not obvious

>>Why 'Medici' effect? Named after the House of Medici, a politically powerful Italian family that combined the arts and banking during the Renaissance

>>Mick Pearce - Zimbabwe architect combined architecture and ant colonies in ecology
>>Leon Cooper - Nobel Prize Laureate of physics, later decided to combine brain and physics
>>George Soros - combined investment with philanthropy
>>Richard Dawkins - wrote the book "The Selfish Gene", where the word "meme" was coined - "memes propagate themselves in the meme pool by leaping from brain to brain; this is called imitation" - the field of memetics is a hybrid of culture and science.
>>Sequoyah - creation of Cherokee syllabery
>>Yvonne Chu - Kimera fashion boutique (sounds like the mythical mixed creature 'chimera')
>>Steve Jobs - Pixar success in combination of computer graphics with storytelling
>>Marcus Samuelsson - Aquavit restaurant - Swedish of Ethopian ancestry breaks down barriers/associations in culinary world - attributed his success to the cultural diversity of his life

>>RSA cipher - from the codebreakers at Stanford - William Diffie, Martin Hellman, Ronald Rinest, Adi Shamin, Leonard Adleman - allows Internet security when online shopping - the idea is you own the padlock and the key to your data, and then you distribute the padlock, but only you have the key - considered revolutionary because conventionally, keys are distributed to unlock the lock.

>>Magic the Gathering - Richard Garfield - a mathematician - randomly combine ideas, try different perspectives

>>Luis Alvarez = astronomer, combines paleontology - came up with the hypothesis that a meteorite killed the dinosaurs
>>Orit Gadiesh - chairman of Bain and company - she sees trends, patterns and integrate - advocate for being a generalist in consultant
>>Frank Herbert - sci-fi write, book "Dune"
>>Hakan Lars - inventor - invented the Time Division Multiple Access navigation system for air and sea navigation
>>Richard Branson - Virgin Group founder, went from managing a record label to airline - need to for evaluation
>>Imet Prothrow-Stith - a doctor - physician + youth violence - people tell her "you are medicalizing a sociological problem."
>>Clayton Christenson - the innovator's dilemma
>>Deepak Chopra - physician + alternative eastern medicine - popularize meditation
>>Linus Torvalds - Linux creator - bold and dare to stand up to challenges and opposition
>>Mark Twain - "Courage is the resistance to fear, mastery of fear, NOT absence of fear."
>>Glass is not a liquid - that's an urban myth

>>Corning - Lina Echeverria heads the glass research group - created and manufactured glass bulbs for Thomas Edison, color tubes for TV, glass for thermometer and LCD, glass casserole dish (Pyrex) that used directly from freezer to oven without cracking, optical fibers (intercontinental telecommunications) - "have the creativity of van Gogh but lead the life of Michelangelo" - "Do something you are interested in and can get energized about"

Tuesday, June 21, 2016

Windows thinks there's a phantom second screen...

Windows has this annoying ability to "remember" a second screen, long after I have disconnected my monitor from the laptop, such that a number of windows appear to go to this phantom screen.

Follow these instructions to get the programs back to the right screen.

Essentially,

1) Alt-tab to choose the program.
2) Alt-space to produce a dropdown menu - choose "move"
3) Use the Arrow keys to move the program windows to desired screen.

Woot!



Saturday, October 24, 2015

The Sports Gene by David Epstein


Image Credit: http://www.amazon.com/The-Sports-Gene-Extraordinary-Performance/dp/161723012X
Started an exercise to put up some description of books I have read, either a short snippet or something interesting about it.

My boss, a colleague and I did a short review for the book in the journal, Science, a while ago (2013). This is very much related to an article on sports and genes I have written before, with a very dear friend and ex-colleague of mine.

The Sports Gene by David Epstein
http://www.sciencemag.org/content/342/6158/560.short

It's a very informative book, thick with many real-life anecdotes on how genetics have influenced sports and its science. A peek into the world of sports, behind the glory and medals - and into the science and technology of the current landscape in sports and athletes. An interesting read for geneticists and the general audience, to see how far the sports arena has progressed. Personally, it has a clear message which I advocate, that is, genetics or your DNA plays a role, sometimes major, in many of the traits we have, sports-related or not. But it does NOT determine your destiny, e.g. whether you become an athlete, or even a good one at that. DNA/genes essentially provides your starting line. How you get to the finishing line is very dependent on other factors - environment and circumstances; a confluence of nature and nurture.

Thursday, June 11, 2015

Home improvement with 3M Command Series Adhesives

I was recently very excited about moving in with my gf, SY, that I decided to engage in some home improvement projects!

Since things in the house seems to be rather cluttered, I thought perhaps if we move things onto the walls, there would be more space on the ground. SY sometimes complains about the mess and I mean anyone feels better looking at a neater apartment right?
http://www.nallau.com/extraordinary-exclusive-small-apartment-interior-decorating-bedroom
Definitely not SY's apartment... maybe a little more like my current apartment...
SY's been pretty stressed out lately. Thought I would give the apartment a little makeover - just teeny tiny enough to make a difference. M did well with my current apartment, I thought I would use some his ideas too. So amidst crazy schedules and deadlines, I perused the web and found useful resources: here and here! Since I can't totally revamp the apartment nor put nails on the wall, I stumbled upon this info on damage-free adhesives. Somehow I got a little obsessed in trying out these adhesives, which IMO, if they work like magic, could turn things over at SY's place! There are, unfortunately, more misses than hits and here are some of my empirical evaluations of the products that I bought in chronological order.

Credits: Amazon

I wanted to hang a plywood medium-sized framed picture. I didn't know the better and accidentally got these. So my first purchase pretty much failed, since these are strictly for posters, as I learnt it the hard way. You guessed it; I tried them on the picture and it fell off the wall. Fortunately, there were no casualties.








Credits: Amazon
Next, I got these for the picture. But ended up using only the sawtooth ones (see the next one). My guess is this will hold only pictures that are very lightweight.











Credits: Amazon
This has been my most successful purchase so far. It has been almost 3 weeks now and the picture is still hanging on the wall very nicely. Hopefully that persists. I followed all the instructions to the T for all the adhesives, but only this one worked... At this point, SY is already a little annoyed with me spending all the money on these adhesives. I was determined to experiment with these and with one success, I hope to make them all work. Alas, little did I know I was going down a slippery slope...







4. Command Utility Hooks (supposedly holds 5 lbs)
I got a little bold with successful number 3. I wanted to hang things on the wall in the kitchen and the bathroom. Two places of very similar nature: typically hot, humid in both, and also oily in the kitchen - BUT I DIDN'T KNOW THEY HAVE VARIANTS for the strips.

M used these for hanging towels in the kitchen in my current apartment, so at least I know they work for very lightweight cloth. Before I started hanging heavier things, I want to make sure they stick. I left one each on kitchen and bathroom wall (same texture and wall material) without anything on.

After 1 day, the hook in the bathroom fell off. But the one in the kitchen persists. After 2 days, I decided the one in the kitchen will hold, so I started adding more items on it. Nothing too heavy, just a small rack with a total of 5 small bottles with condiments in them - definitely nowhere near 5 lbs. UNFORTUNATELY, it held for only about 2 weeks, then it came crashing down too, spilling salt all over the kitchen floor... 

Credits: Amazon
At this juncture, SY was a little annoyed with me (for obvious reasons). I was a little too obstinate and too hopeful to back down, since I really wanted to relieve the clutter. Plus, I really want to try these things for myself. I started perusing online reviews, I saw mixed outcome, due to differences on wall surfaces. I started browsing through their catalog of Command Series products. I found these water resistant ones!

However, they lasted only almost 2 weeks in the bathroom. The roommates and we woke up to an embarrassing loud crash in the morning. Thankfully, no one was hurt. I suspect the big heavy bottle of hand lotion might have contributed to the demise. 

Again, M has these in the bathroom in my current apartment to hang towels.


6. Caddy hanger (holds 7lbs)
Credits: Amazon
This seems the most regretful because it seems the most secure. I followed the instructions carefully - hold for 10 sec, slide off hook, hold 30 sec, let it stay for 24 hours, shower at least one during this time. Then I hanged an empty but heavy shower caddy on it.

But I had to take them down for safety reasons. I think the roommates started to get afraid - so they suggested taking them down, since they pose a potential shower hazard; somebody's toes might mangle badly if it comes crashing down. 






And so end my experiments and love-hate relationship with these 3M adhesives. To sum up, my experiences have been: pictures (probably posters as well) and towels and cloth are fine, but even slightly heavier items like small caddy racks and small bottles are a big no-no. I am disappointed with more the outcome of my projects than the products, since the devastating results can be a confluence of product quality, wall texture and unknown environmental issues.

Hopefully, the picture stays that way for eternity. I will update once I am able to hang other smaller objects later in the living room: clocks, pictures and posters.

Wish me luck.

Wednesday, June 3, 2015

Mendeley citation style edit

I recently realize Mendeley has a citation style editor!!

1. Go to Word.
2. Find "References">"Mendeley Cite-O-Matic">"Style">"More Styles"
3. Right-click on the style you want to edit.
4. Click "Edit Style"

Mendeley will bring you to an online editor and you can edit and save it.

When you click refresh in Word, it shows your edits simultaneously!!

This is super convenient!

SIDENOTE: The Genome Research csl is a link to the Cold Spring Harbor Labs Press csl! So just edit the latter....