joey's blog

PhD Completed

My goal of obtaining a PhD degree in electrical engineering has been completed. I recently defended my dissertation, addressed the edits that my committee requested, and completed the edits from the thesis editor. Wow, can't believe I am actually done. I would say it's a relief to be done, and it is in some ways. But, I can't say that I will be happier now that it's over. Working with Neal Patwari and the SPAN lab here at Utah has been a huge blessing and a really great experience.

I applied to some other grad schools around the country before I started working with the SPAN lab: MIT, Stanford, Cal Tech, and USC. I got a quick rejection letter from all of them. At the time, I was pretty bummed to not get into one of these great schools. But in hindsight, I find it hard to believe that any of these options were a better fit for me than the SPAN lab. I got to work on exactly the kind of technology I was seeking, the challenges were perfect for my skill set, I drastically improved as an engineer through great classes and research, I worked with one of the best advisors around, I followed my aspirations of forming my own company, and had a great time all along. I don't know how things could have gone better for me over the past few years, and I feel really lucky and grateful to be a Utah-SPAN alum now.

A special note and thanks goes to Neal Patwari. Neal has been 100% supportive and helpful to me during this pursuit. Let's not forget that Neal was the first person to try radio tomographic imaging in wireless networks, and that became the foundation of my work. He gave me the freedom to do what I enjoyed, supported my efforts in starting Xandem, and kept me on track with his technical abilities. I nominate Neal for advisor of the decade. The SPAN lab is a world-class group, and I'm excited to continue my participation and support.

I would like to offer a few words of advice to any current or future PhD students who care. Hopefully I don't sound like a know-it-all, I just want to record some of my thoughts and things I've learned throughout this process.

1) When things get tough, just keep working and learning. There were so many times when I had felt like I hit a dead end and that I would never figure out how to move past a challenge. Months went by last year where I felt like I wasn't making any progress at all. Then, in about a 2 day span, everything changed and I was able to move very quickly.

2) Research needs time to breathe and you can't force it. You can't just sit down at your desk and say "I'm going to make a research breakthrough today." It needs a lot of time and subconscious processing. You have to work hard, but you also have to know that it also requires a lot of patience.

3) When things don't work, figure out why. Instead of saying "this idea just doesn't work," try to figure out exactly what assumption in your model or device is not holding up. If you can do that, I'll bet you make discoveries that are more important than your hypothesized model. If you don't know where you are weak, you can't get stronger. Don't be afraid to face up and acknowledge that you don't understand what is going on.

4) Don't get trapped into thinking that you aren't as good of an engineer as another, and don't act like you're better than everyone else. One problem we have as engineers is that we don't want to reveal that we don't understand something. We think that all the other engineers have everything figured out perfectly and have no intellectual weaknesses. We think that if we tell someone we don't understand, we're saying we're not smart. This leads to everyone as a collective whole feeling like they are inadequate, because most are putting on a front of intellectual superiority. Don't be guilty of acting like you know everything, and don't be guilty of feeling inadequate. Next time you don't understand something, smile and say "I don't get it!"

5) Do real-time experiments if possible. Playing with things and getting instant feedback can give you insights that you will never have if you save data and try to crunch it later.

6) Plow through peer review. Don't complain and whine about the reviews like I did. It's better to just accept them and address them quickly. I found that once I accepted the reviews, I could get the revisions done very quickly.

7) Enjoy it while it lasts. Now that I have been done with my PhD for a few weeks, I can promise you that finishing a PhD is not a magic token of happiness. If you can't learn to enjoy your work now, as a student, then you probably won't enjoy your work later. Figure out how to balance enjoyment now with future benefit (read the book called "Happier" by Tal Ben-Shahar).

Now that I'm done with my degree, I will be dedicated myself full-time to Xandem, our technology company that will develop device-free localization products. It's an exciting endeavor, but I also have to say it's very intense. I've only been done with my research for a few weeks now, and already I'm in many meetings a week ranging from core technology development to investment pitches. It's a good sign, as there are many out there who are interested in what we are doing, but there are plenty of people who are quick to criticize our efforts. I've heard "you may know how to invent technology, but you have no idea how to run a business", "I'm not saying you're not realistic, I'm saying you're not appealing", and "what you need is someone who really knows what they're doing." Ha! Luckily I have some positive comments to fall back on as well. "You're going to make a mint out of this", and "It's not very often that a company of your caliber comes around."

Thank you to everyone who has helped and supported me throughout this degree!

The "timeit" python function for quick computational comparisons

I recently found out about a handy python function called "timeit." It basically runs the function that you specify repeatedly, then tells you how fast your computer was able to run it. It's useful for comparing different functions. For example, say you want to know how long it takes your computer to add two numbers. You could do this:

>>> timeit 1.2+1.2
10000000 loops, best of 3: 27.3 ns per loop

So, this tells you that it ran the operation 10 million times, and the best 3 were done in 27.3 nanoseconds. Now, say I want to know how that compares to doing the exponential function e^1.2.

>>> timeit e**1.2
1000000 loops, best of 3: 250 ns per loop

This time it only ran the function one million times because each iteration takes 250 nanoseconds. So 250/27.3 is approximatly 9, so we conclude that adding 1.2 to itself 9 times faster than raising the natural number e to the 1.2th power, on my particular hardware and python installation. This can be very useful information when writing scripts that need to run efficiently.

Keep in mind you can run almost anything with timeit. A function that you have written, or a built in python function, are all possibilities.

Ubuntu 10.04 is coming

Online Security Tips

Recently a close friend of mine had their email account compromised. The extent of the damage is unknown at this point, but it has been very stressful. With so much of our personal data being accessible online, it is very important for all of us to step back and evaluate how we are protecting ourselves. In the spirit of trying to prevent this from happening again, I offer the following tips.

Make your password strong. Do not use your name, do not use words that are in the dictionary. Use capital letters and numbers mixed in. Don't be lazy with this one.

Don't use the same password on multiple sites. If you do, the owner of a malicious site can use your same password to get into your gmail account. For example, if you sign up for a web forum, use a unique password so that the owners of that site can't get into your account. Make sure you use different passwords for every site you use.

Use https whenever possible. If you use gmail, log into your account and click on "Settings" at the top. Go down to the line that says "Browser Connection" and make sure that you select "Always use https." Click save at the bottom of the page.

Do not use Internet Explorer. Especially version 6.

Use good antivirus software, and keep it up to date. If you're on Windows, make sure that you have the best antivirus available, and make sure you keep it up-to-date. Don't download and install anything that doesn't come from a reputable source.

Avoid using public computers, or even a friend's. Do not use computers that you believe COULD be infected with a virus. Every time you type your account name and password on a keyboard, you run the risk of exposing that data. Avoid checking your account from friends' computers where you have no idea how secure they are. It's like riding in the car with someone else driving. You put yourself at risk if the driver doesn't know what he's doing.

Be pessimistic. Default should be to not trust something.

Don't think that the system will protect you. You have to take responsibility for your own security at all times. The crosswalk is there to help you cross the street, that doesn't mean you can put your earphones on and close your eyes to cross, thinking that the rules of the road will make you immune to danger. Your own awareness is so important.

Be very careful logging into stuff from unknown wifi access points. If you don't see HTTPS in the URL, the information can be intercepted.

Be Careful With Social Networking Sites

Dear friends, family, and anyone else who comes across this,

Social networks like Buzz, Twitter, and Facebook are great tools to keep in touch with friends, but there are some dangers as well. If you are going to use social networking sites, you absolutely need to understand what the privacy implications of using the service are. Each social networking tool has it's own way of dealing with privacy and determining who can access the information you post. Educate yourself.

For example, let's look at Twitter. When you post a tweet, it's public information. People who don't know you, complete strangers, can see your post. This is very important as you decide whether or not to post information about yourself. Now, you can go into your settings and change that, but by default, Twitter is public. To double-check your Twitter settings, go to http://twitter.com/settings/account.

Facebook can be a dangerous as well. You generally have to be "friends" with someone for them to see your profile and your updates. This means you can update things without the entire world seeing them, but you should still be very careful. Often friends-of-friends can see information and you don't realize your updates are getting out to people you don't know. Furthermore, anyone on Facebook can post of photo of you, then mark your face with your name. This one really bothers me, because I don't have control of photos that get posted with my name being searchable. I'm often very tempted just to delete my Facebook account entirely. To check your Facebook settings, go to http://www.facebook.com/settings/?tab=privacy

Finally, there is Google's new social feature called Buzz. This is kind of a combination of Facebook and Twitter. You need to understand that if you reply to a public Buzz, your reply is public as well. If you post a public Buzz, the whole world can see it. Also, the people you follow and those following you may be publicly viewable as well. Buzz may also post information from your other Google services, like PicasaWeb. There are ways of doing "private" buzzes to only certain groups in your contacts, so you need to decide how you want to use it. To double check your Buzz settings, go here: http://www.google.com/profiles/me/editprofile

Take the time to educate yourself before using these services. I'm not saying that social networking is inherently a bad thing. I'm saying that it's bad if you're using social sites without understanding who has access to the information you post. As long as you understand the implications, you'll be much more likely to maintain your own privacy.

Just say "NO" to Internet Explorer

If you are using Microsoft's web browser Internet Explorer on a regular basis, please stop. Seriously.

  • IE is severely insecure. Are you sure you want to put yourself at risk by using it? IE allowed the Chinese to hack into Google.
  • IE has very poor functionality. For example, all the other browsers support HTML5 which allows some amazing features on the web. However, since so many people are using IE, developers can't implement the new features because that would make them lose their visitor base.
  • IE does not display web pages correctly. Don't believe me, search for "Acid3 test" on the web. It's a test that checks how well your browser follows the rules. All the other browsers score 100%, while IE is still at 32%!
  • IE is slow. All the other browsers have revamped javascript engines which make browsing the web much faster. IE is still mostly on the same technology that came out when AOL was new, 15 years ago.
  • IE is holding the web back. Due to the reasons described above, developers are dying to utilize the new features of the web, but can't. For example, want to view videos on the web without having to have Flash, Silverlight, or some other strange plugin installed? All the other browsers are ready to do that, but developers won't change until their IE user base is low. Everyone is held back.
  • I've heard a lot of people say they "have to use IE for work." Usually this is not true, it's just the default browser that's on your work computer. If it is true, make sure to file a complaint at your office/work. What should you use instead? Any of the following:

  • Google Chrome (my favorite): http://www.google.com/chrome
  • Firefox: http://www.mozilla.com/en-US/firefox/firefox.html?from=getfirefox
  • Opera: http://www.opera.com/
  • Safari: http://www.apple.com/safari/
  • Basically ANYTHING else.
  • Pass this information along to your friends.

    Official Google Blog: The Meaning of Open

    I am a vocal proponent of openness in technology. Today, I was thrilled to read an excellent letter that was written to Google employees by Google Senior VP of Product Management, Jonathan Rosenberg. In this letter, he discusses why openness in technology, as opposed to the old school thought of locking users into a particular company's products/services, is better for companies and users alike. Here's the letter.

    EDIT: It's also important to know that Google's main source of revenue, their search ad system, is not open-source. This is an interesting exception/contradiction to the principle's discussed in the letter. If you have any thoughts about this, or anything else in the letter, send me an email at joey.wilson@utah.edu.

    Inkscape: My Favorite Tool for Illustrations and Diagrams

    Engineers often need to draw illustrations and diagrams to include in their writing. Inkscape has recently added some features and bugfixes, and is now an absolutely excellent tool for drawing. You can download it completely free of charge with no limitations at www.inkscape.org.

    Inkscape has buit in latex rendering if your system has the appropriate libraries installed. On Ubuntu, you must have "pdf2svg" installed. Once you have the backend rendering programs installed, go to "Extensions -> Render -> LateX Formula" to drop an equation in your illustrations. Even better is the Tex Text plugin, which allows you to edit forumulas after they have been rendered to the illustration.

    The new connector tool for drawing diagrams is much improved. Previous versions of Inkscape had an annoying bug that prevented connection lines from displaying properly around circular objects. This is fixed and working perfectly as of Inkscape .47.

    Here's a quick little diagram that I created in just a few minutes with Inkscape.

    Inkscape Demo

    I highly recommend a donation to the Inkscape team so they can continue to improve this amazing tool.

    Common Mistakes in Moving From Matlab to Python

    Those of you who read my blog know that I am using Python as an alternative to Matlab. In my experience, python has been an excellent language for scientific programming, but there are some significant differences that make moving from Matlab challenging. I'm writing this article to share with you some of the common "gotchas" that have been a challenge for me, so you don't have to struggle as much.

    Be Careful With Integer Division

    In Matlab, if you divide integers, it returns a float. For example, 1/2 = .5 in matlab. In python, dividing integers returns integers, so 1/2 = 0. If you want to do this kind of division in python, make sure that you use floats by specifying the decimal places (1.0/2.0 = .5), or use the float typecase (float(1)/2 = .5). This is extremely simple, but it has bitten me many times!

    Use Scipy/Numpy Arrays for Data, not Python Lists

    When working with scientific data, it's much better to use the array data type instead of a python list. A python list is not designed to deal with numerical computations, so it does funny things. For example: [1,2] + [3,4] results in [1,2,3,4] with a python list, not [4,6] like you would expect in Matlab. If you're going to do math on your data vectors, use an array to avoid problems: array([1,2]) + array([3,4]) = array([4,6]).

    I recently posted an article saying python lists were great for irregular data. In hindsight, that may not have been such a great tip. Using python lists can lead to a lot of tricky problems, so be careful. Here's a link to tips for using scipy arrays.

    Remember That Numpy/Scipy Arrays are Pass-By-Reference

    This one can really mess you up. Whenever you reference an array in python, the computer will provide the memory address for the thing you are accessing, not the actual value. This is called pass-by-reference. This saves memory and makes your programs faster, but it is also harder to keep straight. Consider this example.

    >>>a = array([1,2,3])
    >>>b = a

    b is not a copy of a, it points to the same memory address that a is held. So, if you change b, you will also change a.

    >>>b[1] = 9999

    a[1] is now equal "9999" because a and b are pointing to the same thing. If you want b to be a separate copy of a, then use b = a.copy().

    Import Statements Can Cause Function Definition Confusion

    Sometimes you can create function definition confusion by importing too many libraries. For example, if two libraries have a function called "foo()" and you import them both

    >>>from lib1 import *
    >>>from lib2 import *

    then you will most likely be using the second library's version of foo(). If you want to make sure not to mess up, only use the import statement:

    >>>import lib1
    >>>import lib2

    That way, you have to specifically call lib1.foo() and lib2.foo().

    Understand Matrix vs. Array Data Types for Linear Algebra

    Scipy functions generally return array data types, not matrices. Multiplying arrays results in element-by-element multiplication, not matrix multiplication. If you want to do matrix multiplication using array data types, you should use "dot(a,b)" where a and b are arrays. However, if a and b are matrix types, then a*b would do matrix multiplication, and dot(a,b) would be element-by-element. Be careful! See the link below for futher clarification on this issue.

    Other Differences Between Python and Matlab

    Here's a link that explains some of the key differences in Python for Matlab users: http://www.scipy.org/NumPy_for_Matlab_Users

    Version Control: Not Just for Large Coding Projects

    Scenario: You have your research simulation scripts working, and you're getting some solid results. You read a new paper that describes a method that will work better than what you have, and you decide to implement the method into your simulation. You spend a few hours programming the new method, only to find that you have severely messed up your simulation. You wish you could get back to what you had before.

    You should have used a version control system. Most people think that version control is only necessary or useful if you're working on a large project that has multiple individuals contributing to the code. Not true! Version control is helpful for even the projects that you work on by yourself. Bazaar Version Control has become one of my favorite tools. It's free, simple to use, only takes a few minutes to use effectively, and runs on many different operating systems.

    Bazaar is great because you can use it locally on your machine without having to set up a version control server. The revision control files will sit nicely right inside the directory of your project (If you need to publish your changes to a server like a traditional VCS, it's simple to do that as well). I use it to keep track of my python code for radio tomographic imaging, and for revision on our publications. I save my papers at each revision so I know what I have changed when a reviewer requests an edit.

    Here's how I use it. When I start a new project, I simply navigate to the directory with a command terminal and type:

    bzr init

    This starts the control on the directory I am in. Then I tell it that I want it to keep track of certain files by typing:

    bzr add myfile1.txt myfile2.dat

    and so on. Now, every time I want to take a snapshot of the current state of my files, I simply run:

    bzr commit -m 'A short message goes here to describe the state of the code at this checkin time.'

    It's as simple as that. Now, when you have your code in a good state and your going to chop it up to add new features, simply run the commit command and you can revert back to that state at any time. Perfect. For a really quick and easy guide to getting started with Bazaar, check out Bazaar in Five Minutes.

    Syndicate content