Thursday, October 7, 2010

Grace Hopper postscript

Well, the conference is over and I'm back to real life now. Somehow I felt I had to sum up my thoughts and experience. As usual, it was an experience like no other. The conference has sold out in early August this year and, as result, there were more than two thousand attendees. It was good to see a good number of male participants, including a bunch of students who also volunteered at the conference alongside all the female Hoppers.

I found that session selection was great this year. One of the Keynote speakers, Dui-Loan Le, is absolutely incredible. Her inspirational role model is Marie Curie and she, in turn, is quite and inspiration role model herself. Her witty and intelligent story of arriving as an English-illeterate immigrant in USA only to graduate as the Valedictorian four years later and eventually earning the title of Senior Fellow at Texas Instrument stands to show how pretty much anything is possible to those who are driven enough and are willing to put in that much extra work and effort.

For those close to graduation and looking to start their career soon GHC is an excellent place to start their job search and to obtain tools needed to prepare for the interviews. I was excited to talk to representatives from Thompson Reuters, Bloomberg, Goldman Sachs, and a number of other great techie companies all in one spot. They were all willing to talk to those interested about the projects and opportunities available but they were also providing on-the-spot feedback on how to improve your resume and increase your network. One of the sessions I've attended, called Beyond Your Technical Skills, was all about presenting your work effectively, and preparing for and passing a technical interview. It's no secret that for highly technical people prolonged continuous conversation not directly related to their immediate work project can be quite a strenuous exercise. The good news is that there really are things you can do to come across as a great candidate that you are and that interviewing is a skill that can be learned. The presenters of the session gave a number of great pointers, including a reference to a book called Programming Interviews Exposed. They also role-played a moc-up technical interview followed by comments and recommendations from other panellists. It was quite enlightening, I must say.

As far as poster presentations go, GHC has probably one of the largest efforts allocated to it. The thing with conferences that cover a remarkably wide range of technical and otherwise topics (such as GHC) is that your presentation is often a high-level hand waving exercise and you rarely get any significant feedback on your work. That is why I was particularly pleasantly surprised to talk to two awesome ladies from Rutgers who work in the area of research very close to mine and we had a great and insightful discussion about it.

All in all it was a great networking event. I do, however, have a couple of bones to pick about the overall experience. First is how sparse the electrical outlets were. In some session rooms they simply did not exist other than those occupied by the presentation equipment. Even in the common areas you would be hard pressed to find one let alone one that is available. Considering that the common areas were the only space with free wi-fi available you would see people sitting on the floor in any corner or by any wall where they have managed to find a said power outlet. This brings me to the other issue I had. If the conference is providing free wi-fi to the attendees, why can't it be password protected and available in guest rooms for those paying the extra to stay at the conference venue hotel? I mean, my options for the time between my chosen sessions were to either sit somewhere on the floor in a common conference area and do my bits of work trying to stay focused in spite of constant commotion and excitement or work in the privacy of my guest room but go down to the basement to check my email every 30 minutes or so. You can probably tell that neither is very conducive to productivity.

All the issues aside, I'm quite certain that given a chance I would attend more Grace Hopper Conferences in the future. Even though it is not a hard-core technical conference where you normally strive to publish your ground-breaking (or nearly ground-breaking) research results, it is an amazing place to meet like-minded people, make new friends, and grow you network.

Friday, September 24, 2010

Grace Hopper!!

Well, it's Fall again and the time has come for another Grace Hopper Celebration of Women in Computing Conference organized by the Anita Borg Institute. I've only been once before a few years back. The experience is nothing like that of any regular tech conference. It really can be considered as Heaven for any geek guy. Unfortunately, as soon as they see the "Women in Computing" part they automatically disregard it. Just picture this: over 2000 (that's right, two thousand) women all as excited about pretty much any kind of technology as they are about new shoes. It was an absolute blast. Especially since the sponsor night party thrown by GHC organizers is nothing like any other conference reception party I've even attended (to say nothing of the swag ;-D ). There's is always so much going on that you are afraid to miss a minute of it. You learn, network, grow, even can get a great job during GHC.

I've met my now best friend at GHC. That time it was held in Orlando so now we can tell people that we have met in Downtown Disney World. Being a grad student in CSE I am always told that we (women) are a minority in our chosen field. Well.... *This* is the place to go if you want to believe otherwise. GHC is where I was relieved to find out that I am not an anomaly being a geek gal that doesn't fit any of the usual stereotypes. I don't wear glasses of any kind, I do have a closet full of stilettos and clubbing attire, until recently I have been a platinum blond for quite a while, and I was *really* exited about getting a large screen Sony Bravia and the release of Halo Reach. GHC is the place where no one will have the audacity to suggest that I need help turning on my wireless connection on my laptop or ask if I use C or Java for programming. I mean really! If you only know what one or two programming languages are called you aren't a real programmer. I've never met anyone who can say that they make their living by just knowing Java. Any *real* programmer has at least a foot-long list of languages they know and few more feet of those they can start using in a matter of a couple of hours. Anyway, I diverge. Back to GHC - I'm going this year and it being only 5 days away I can barely contain my excitement!

If you're going, I'll probably see you in Atlanta next week! If you are not, you should seriously consider attending next Fall - you'll have the time of your life and stories to tell for the years to come after.

Saturday, August 28, 2010

LaTeX quirks - omitting things in TOC

Everyone knows how LaTeX can make your life easier and at the same time drive you insane with a tiny little 'gotcha'. I'm using a LaTeX template to write my thesis and the template sets up the Abstract and the Acknowledgment sections as follows:

\begin{abstract}
... text goes here...
\end{abstract}

\begin{acknowledgment}
blah blah Thank you blah
\end{
acknowledgment}

which works just fine, generates the appropriate titles, puts them on separate pages and all that. Then I realize that these sections are not supposed to be included into the table of contents, but, unfortunately, they are. As the wonderful LaTeX magically creates the TOC for you with the inclusion of single command, I start searching how to fix this. Guess what I find - numerous entries on how to add sections to TOC that won't be there by default but nothing on omitting the Abstract from it... Then I stumble on something odd looking:

\chapter*{Abstract}
... text goes here

I try that removing the \end{} commands, followed by double typeset run and Eurika! It works! Granted, the title is no longer centered, but that can be easily fixed as long as my TOC is correct. Thought I'd share in hopes of saving someone the aggravation of trying to do the same.

Happy TeX-ing :)

Friday, June 4, 2010

Motivation and vague fear of Mnemosine

I've been struggling with motivating myself to do the things I *actually* like to do, want to do, chose to do for the foreseeable future. I mean, why can't I just sit down and get into it? I really want to do that research and code up that awesome project that I've started and all the wonderful things that come with it. I did try other things before (like being employed full time with the 9-5 structure) and still dub into *real* work from time to time as a freelancer. Having those jobs just made me all the more certain that I wanted to make new things, contribute to the progress of humanity and such instead of just re-building that bicycle in new ways from new materials with new features.

Being captivated by how far we have come technologically has it's ups and downs. The 'up' is that everything looks better, works faster, new generations graduating from schools and colleges are equipped with far greater and deeper knowledge than those 5, 10, etc. years ago. Those things that we had to learn and figure out before have become common knowledge now, so new generations have to learn and then figure out more advanced things based on that common knowledge. The 'down' is how easy it is to get lost in consumerism of all this technology instead of contributing to it's advancements. Have you ever noticed how a sci-fi flick that has fascinated you a decade ago now is just ridiculously corny and badly made compared to the latest remake of the same flick? Even Transformers have become cool again! I remember when Monsters Inc. came out how we [geeks] were amazed at how realistic the fur on the character looked - every single hair was animated separately to make it move just like it would in real life. Do you know how much processor math crunching is involved in that? At the time it probably took hours if not days to render each frame for the movie. I used to go see any movie if it was released in IMAX or 3D - yes, even the Spy Kids 3D one (blush). Now the technology has become so common place that not only any and every slasher or plot-less kids' movie is made in 3D but you can even buy your own 3D TV. And the video games... My weakest spot. Not only the AI is smarter and better executed, there are movie-animation parts of the game that play out differently every time you play it as they are driven by player's actions. I don't mean those interactives that tell you to press a button at certain points but chases and fights and key interactions with AI avatars...

I've realized that I have shifted into the role of being a consumer and I find it increasingly unsettling. My greatest fear is that my research adviser finally grows tired of my wild variations in productivity levels and disowns me. It's followed by a vague fear that Mnemosine will reconcile the memory of me into non-existence as I am becoming less and less useful to the Universe as a whole. A bit dramatic, I know. But ever since I (somewhat) conquered the impostor syndrome I've been plagued by other doubts and fears. I've come to believe that we are meant to be miserable. When people are happy or even simply content they stop making progress. Have you ever noticed how as soon as you feel comfortable with your life something goes wrong to restore you to your usual miserable self? Well, that's what happens to me every single time. And no, I don't sabotage myself, most often I have nothing to do with the events that disturb my comfort level. That's just life, I guess.

So, you may ask, if I'm so certain of what I want to do and what I don't want to become why can't I just sit down and do it all. I'd really like to know the answer to that too. How can I couple my theoretical motivation with whatever it is that makes me stop being mostly a consumer and go back to being more of a producer?

Thursday, April 22, 2010

Python Image Library - Part 2: OpenCV

Now that I have my PIL installation working it's time to get some complicated image processing done and OpenCV is, pretty much, the best choice out there at the moment - especially since it's development became active again and numerous bugs have been fixed, new functions added, etc.

This FAQ at the very bottom of the page points to an adaptors.py module that has the functions to convert back and forth between Ipl & PIL and Ipl & numpy. The module does indeed come with the latest distribution of OpenCV. Unfortunately, it has not been updated since about version 1.0...

Fear not, with few minor tweaks to accommodate new IplImage structure you can get it to load your PIL Image into the IplImage. (Later I found the code that essentially does the same here).

So what now you ask? Yes it worked. Kind of. The image of red strawberry comes out as a bright blue strawberry once converted to Ipl. It appears that the kind soul at OpenCV that provided the conversion code entirely missed the issue of Ipl images being BGR while PIL Image is RGB. Mind you, it works in the opposite direction as PIL has two mode input parameters: one for input image mode and one for the output image mode, so it just knows to shift the color bits.

Back to searching. There seems to be a good number of solutions consisting of complicated pixel-by-pixel shifting, flipping, etc. Many of them rely on old OpenCV CvMat and IplImage structures where you actually had access to the data directly in a linear array fashion. I must say, while trying to get said solutions to work I got some very entertaining variations on the display of that strawberry.

And then, I found it. And I mean The IT solution. I was actually searching for some different approach keyword and the result was a preview of a PIL Handbook. So here is the solution:

pi=Image.open("image.jpg")
r,g,b=pi.split()
pi2=Image.merge("RGB",(b,g,r))

That's all. Now you have your BGR-ready image that you pass along to the IplImage, which comes out with the strawberry being a correctly-red colour.

Here's the entire conversion code from the PIL cookbook with this fix added:

import Image, cv
pi = Image.open('building.jpg') # PIL image
cv_im = cv.CreateImageHeader(pi.size, cv.IPL_DEPTH_8U, 3)
r,g,b=pi.split()
pi2=Image.merge("RGB",(b,g,r))
cv.SetData(cv_im, pi2.tostring())


Enjoy :)

Python Image Library - Part 1

I love Python. I love it's simplicity and immediate gratification in the form of immediate result without endless makefiles and compilation errors. So, for one of my unreasonable project ideas I have decided to use Python - especially since I finally managed to get down to the Interface Builder and Cocoa programming that I've been avoiding and that I'm starting to get a hang of.

One part of the project receives camera frame images in a packed binary format. Luckily, I have found some code online that shift-unpacks it into a buffer that can then be directly passed to the PIL Image class. So, now all I have to do is get PIL onto my Snow Leopard. Sounds simple, right?

Welll..... This is where it all started going bad. I got bit by (turns out infamous) "***The _imaging C module is not installed" error. There seems to be a small number of possible fixes that have worked for some but not others that have encountered it. The solutions ranged from re-installing all involved libraries to downgrading to libjped6b (while current version is 8) to force-recompiling everything into 32 bits. I've tried them all except for the 32 bit suggestion - I just migrated all my libraries to 64 bit after upgrading from OS 10.5 to 10.6 and I wasn't about to start messing it all up again.

So, after days of looking for alternatives I decided to give it another day. On one of the posts that I found someone stated that PIL is asking for libjpeg6b specifically and you cannot expect it to work with version 7! So I fink downloaded version 6b, pointed the JPEG_ROOT to /sw/lib, etc. Guess what - it didn't work. In fact, it got all unhappy as version 6b has wrong architecture!

Then I had a moment of enlightenment - "fink remove libjpeg, libjpeg-bin, libjpeg-shlibs" (My shlibs failed to remove because of numerous dependencies but the most important thing is that the other two are NOT on your system). I went through all the places that could have retained any old version of libjpeg making sure to remove them all. Once I had only the latest libjpeg left compiled for x86_64 (which happens by default on 10.6) PIL build worked.

So there you have it. Hope this helps someone else out there tearing through the good, the bad, and the ugly of open source.