Diary #16: CPacking debs

I’ve been having fun packing .deb files, and it’s pretty easy to do with CPack once you’ve scrounged up the boilerplate that you have to copy and paste into your CMakeLists.txt. For example, here’s a sample minimal CMakeLists.txt that incorporates Boost filesystem:

find_package( Boost 1.49 COMPONENTS system filesystem )
include_directories( ${Boost_INCLUDE_DIR} )

add_executable( atBoostTest test.cpp )
target_link_libraries( atBoostTest ${Boost_LIBRARIES} )

install( TARGETS atBoostTest
    RUNTIME
    DESTINATION bin
)

set(CPACK_PACKAGE_NAME "atBoostTest")
set(CPACK_PACKAGE_VENDOR "atsui")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "atBoostTest - test package with boost-based command-line program")

set(CPACK_PACKAGE_VERSION "0.1.0")
set(CPACK_PACKAGE_VERSION_MAJOR "0")
set(CPACK_PACKAGE_VERSION_MINOR "1")
set(CPACK_PACKAGE_VERSION_PATCH "0")

set(CPACK_GENERATOR "DEB")
set( CPACK_DEBIAN_PACKAGE_MAINTAINER "atsui" )
set( CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.3.2), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.6), libboost-dev (>= 1.49), libboost-filesystem-dev (>= 1.49)" )

message( STATUS "${CMAKE_SYSTEM_PROCESSOR}" )
set( CPACK_SYSTEM_NAME "${CMAKE_SYSTEM_PROCESSOR}" )

include( CPack )

Lines 1-10 are a typical project where you specify a target, dependent libraries, and installation instructions. Everything afterwards is CPack boilerplate that you can start out with.

The important one is probably the CPACK_DEBIAN_PACKAGE_DEPENDS, where you declare packages that your app depends on. This means that if you manage to write software using standard dev packages, you can just reference them here and users can install and run your deb just fine (see gdebi).

So that means that this works differently from the OSX bundle fixup workflow where a fully distributable, monolithic bundle is created by pulling in all dependent libraries instead of relying on a package manager to be able to fill in the blanks for you.

Another thing that I am excited to try out is that you can actually create a Windows installer. I found this SO question that seems to have the details as well. I will need to try this out with the MinGW build of my app.

Nice projects in C#

So I’ve been reading up on C# recently and toying around with writing example code, and at the same time, I’ve been looking at what libraries are out there to work with. For example, I’d naturally wonder how I could rebuild my project in C# that I’ve been working on as a grad student.

There seems to be very current effort to produce C# bindings for Qt: https://github.com/ddobrev/QtSharp. There’s not much in the way of documentation at all, but I assume it is a fork from an old project called Qyoto, which as I understand provided Qt bindings for Mono/KDE apps. So I don’t know to what extent this current project supports Qt4 versus Qt5, but I think it’s something I want to get to know because it really is all about interfacing with an existing C++ library and making it operate within a managed C# environment.

OpenTK is another nice one under active development: sourceforge.net/projects/opentk/. I have always felt incomplete working in the area of graphics without actually learning graphics from the ground up and getting hands on with OpenGL, and this looks like the perfect excuse to do it. Just looking at the quick 15 minute introduction, they show off some fancy C# way of what looks like specifying callbacks. It also exposes OpenAL API for audio, which makes me think of SDL, which interestingly also has C# bindings.

SimpleITK (http://sourceforge.net/projects/simpleitk/) is another cool API that is actively maintained. Unfortunately you have to deal with the ITK-quality documentation, which at best leaves something to be desired. But judging from the autocompletion, there’s a significant part of the image-processing API exposed. I think I definitely want to toy around with manipulating MRI images, which I ostensibly should be pretty familiar with but am actually not ever since I’ve been enlisted on this geometry processing project that is my thesis topic.

Hope to post more about these as I play and learn. P.S. Yay, first C# tagged article. Sadly, using the string “C#” as the tag ends up tagging the article as C++, so it’ll have to be csharp.

33 days after, 33 days more

Tonight would have been the night that I would be submitting a paper for a conference deadline, but in the last week, I ran into enough problems processing data that it became totally infeasible to complete it.

Once again, I’m resetting the clock with an additional month of time, perhaps another 33 days to keep with the pattern. There really isn’t a hard deadline to aim for, so this self-imposed deadline really needs to be put in place. It’s nice to take a little time to clean up and reorient myself as I have in this past week, but it won’t feel like freedom until I have sent off this report in the making. Maybe it’s seeing people finishing up and moving on around me to more lucrative prospects that is making me feel like I need to focus and not be so lax. It really is too easy as a grad student to be lax and give yourself more time when the things you need to do really don’t, or shouldn’t, take as much time as you think.

Anyways, at least I can take a breath now, which I haven’t really had a chance to since Christmas break really, but now I have a window of opportunity to do things right. Let’s give it our best in the next month or so.

Diary #15: Mindshare and being there

Sorry for the lack of updates, I really dropped the ball for a while, it seems. The reason is that I’m in the middle of a rush to get some results for this paper I want to submit by the end of the month, and the whole effort has kind of been foundering.

Well, I think I can still manage to get something together if I get my act together. I just wanted to write a quick note about what I’ve been thinking about generally recently.

I think people like to economize and make efficient use of their money and in my case their time, and I’ve been worrying about that a lot recently with good reason. But to a grad student, where money isn’t really a primary concern or motivator, and time is virtually free in the sense that you’re not beholden to a rigid schedule, the thing to really worry about managing becomes mindshare.

I guess mindshare actually falls under the time category if strictly speaking, since I’m taking it to mean the time spent actively thinking about something. It’s always something that I’m interested in. The problem is that I can get into pretty much anything I decide to. The further problem is that I usually don’t decide to get into things but rather let myself get into things that don’t directly lead to the accomplishment of the things that I should be doing in the present.

Actually, writing this blog is probably a great example of the mistakes I’ve been making.

Anyways, it’s something to think about. Maybe if you’re like me and you have nothing to worry about, you should worry about the things that you are thinking about and whether or not you want to be spending the time thinking about those things. Maybe you never really realized how much you actually didn’t care about what you were thinking about, and you’d much rather be focusing on other things. It’s definitely a hard thing to do because every day is different and you might end up forgetting.

So I leave you with that note and state that I will not be back until the beginning of March. At that point, I promise to resume a steady stream of publishing blog posts. See you then.

Diary #14: Paper cleared… reset the clock for 33 days

The recent couple of weeks was pretty intense working pretty much nonstop with my new labmates on a graphics paper. I think it was a pretty awesome experience that I hadn’t really ever had, working in a team of five to get things done on time, and I definitely learned a lot. I’ll definitely break it down over the course of a few blog posts, but for now, I just want to say it’s a relief to be done.

I basically did minimal research for the past couple of days just to recover. I used the time to catch up with the things that disappear from life when your daily routine gets disrupted by deadlines.

One thing I did was write a Blender addon to load OFF files. We spent way too much time just converting between file formats during this project, and this should be useful to everyone.

As I mentioned in earlier blogs, I’ve been thinking more about my future after grad school, which is winding down really quickly. Last week, I dropped by the engineering career fair, and I actually got to speak to a guy with Agilent, which I’d applied to for a S/W engineer intern position. He was actually on the team of software engineers who I’d probably work with if I was hired. Sadly, I don’t think I left a good impression, what with my lack of C# experience, I really didn’t have too much to talk about. Anyways, I’m still more than a year out from graduation so I can still do a lot in this department. I’ll probably aim for a GSoC project that lets me work on something C#-related. I’m currently looking at Mono and SWIG projects.

I think that I’m pretty certain that I want to get a job in industry at this point. The last few weeks have pretty much been pretty fun ordeal of making things, making things work, specifically working together to make things work, and I think doing this and sharing it with everyone is a bigger contribution I could ever make if I were dedicated to academic research. I think a job will put me in a better position to do this. I think I’ll also be able to stay in my home of California, which is a big deal because all of my family is here, and it’s just seems like a good place to be be involved in tech, and I have the freedom to plan trips back to Asia more easily than if I was somewhere else in the US.

I’m really getting excited about the thought of finishing up and moving on. Let’s keep up the pace in February!

Diary #13: Some progress; Pondering about postdocs

The breakthroughs in computer science research as I have come to understand them are defined as the moments when the software implementation finally works. At least, it seems like it. While there’s still a lot of work to do, I’m happy for my labmate to have a working algorithm to talk about in a paper. For a while, it was kind of stressing me out to watch the drawn out debugging sessions and frustrated discussions in the lab, but I’m glad that the spent time is paying off. The speedup is probably by a factor of 5-10 and allows him to process full-sized data I generate in a reasonable time. Now I have to wonder what to do if distortions we see in some high-genus examples are a problem that I am causing. We’ll see after tomorrow’s lab meeting.

—–

The other comment I got from my advisor when we spoke about career paths last Friday regarded the academic route. Specifically, you need to sort of be an iconoclast in order to be successful. I think that means you have a strong opinion of the new spot in the wilderness that you want to stake a claim on. I guess this is opposed to thinking in the terms I was, which was just simply looking for labs that were doing research similar to what I was interested in/working on. It seems like as a postdoc, you’re on a mission that you started off on as a grad student, and you’re partnering with another lab that is supposed to help you fulfill that mission.

I think I don’t really know what people expect from a postdoc. I’ve heard from talking to at least one person that you get hired to do the research that you have been doing. But on the other hand, from reading some job postings, it always seems like places offering postdoc positions already have in mind what they would like the postdoc to be working. Maybe it’s something of an exchange where you contribute to the manpower of the lab that hosts you in exchange for the resources you need to continue on your personal academic mission. In this sense, it sounds better than just jumping on somebody else’s bandwagon.

So far, I’ve scouted two schools that I feel are a good fit for me.

  • CUHK
  • National University of Singapore

The former is where I spent nearly a year of study abroad, though I did not make any academic connections at the time and was really only there for the experience of being abroad. The math department there has put out publications on methods that are very related to the method I work on. I think the question mark would be in the real-world application.

The latter is interesting because it sounds like they apply the methods I’m interested in to do computational neuroanatomy. I think they’re all about LDDMM, which I have learned a bit about and want to get into, but otherwise, I think it’d be a compatible pairing.

Both are also in Asia, and there’s a personal reason for that. There are US schools where I could also get into the same line of research, but I specifically am aiming to get into a position where I can meet, speak with, and make connections with Chinese people. I feel like this point is important enough that if my only option is to move somewhere else in the US to continue research, I might just not go on and just find a job in California that keeps me in the field and possibly, through moving around within the company, give me a chance to travel to Asia. I think I’ve just invested so much in language learning and being able to connect culturally that if I end up moving somewhere where I have less opportunity to do so, and on top of that be apart from my family and relatives, I would just not go for it.

I have a lot of doubts about this route, though. I can’t get a sense of how realistic the chances are of going to my target schools, but I feel like for postdocs, you just end up going to what’s available. In this case, I really need to just make backup plans. But then again, another thing that I want to do is to keep programming and making things, which seems to be what academics get taken away from in most cases, so maybe this isn’t the best route.

Diary #12: Browsing for jobs

With my advisor in the summer, I am starting to think more seriously about my future plans. I think that I was always aiming for the most natural course of action, which was for a postdoc. I’ll definitely write about what I’m aiming for in detail in a different blog, but today I spent some good time looking at local companies that make medical imaging related products.

I am seriously considering industry for the important reason that I’ve been told that following the road of academia means that you will end up doing less programming and more managing the programming, leading, and writing grants and such. I honestly feel like I can do the latter and I can become better at it, but I don’t know if I want to make it *the* thing that I do. I’ve heard from quite a number of people:

  • It doesn’t feel fulfilling after a while
  • It’s tedious work that someone else can worry about
  • I don’t want to have to support users of my software/I’d rather be creating new software

I feel like I really do strongly disagree with these aspects. I think it’s really awesome to become skillful at the act of programming, and it really is a point of pride to be able to write good stuff that people can rely on or be relied on to be easily fixed/maintained. I just enjoy making stuff. At times when the research seemed hopeless, I focused on the good feeling that at least I am contributing software that is at least halfway decent. In the end, it seems that while good, distributable software is valued in this area, it isn’t necessarily the top priority in the grand scheme. You aren’t paid to make it your top priority, at least.

I feel like this is counterproductive and is a detriment to doing computational science but it seems like an inefficiency that people are willing to deal with by employing smart enough people capable to do research to also deal with the problem of struggling with oftentimes crappy/lack of software, which perpetuates the problem.

So why not go to work for someone who actually shares my values? And at the same time does some good stuff I have come to be interested in, like bio/medical imaging? Besides the obvious names associated with MRI, I was looking for other such companies in Norcal. Two big names that have software engineering offerings seem to be Varian and Agilent. I feel like I can see myself fitting in there. In particular, I found an R&D software engineer position posted by Agilent in Santa Rosa, which is pretty much a stone’s throw from Davis.

The only thing with this and many other job postings is a request for C# experience. Well having started out with Java and having recently done significant work in C++, it should be a breeze to pick up. Nonetheless, it is still something I need to take time to pick up if I care to apply at all. It’s really exciting to see that I have some applicable qualifications now when compared to when I was just graduating from SJSU, and pretty soon hopefully with a PhD to boot.