Hacking

Friday, 4 April 2008 06:15 pm
da: (bit)
[personal profile] da
This week started off slowly at work, but wow, it picked up nicely. I've been working on the most interesting project I've had in many months: a c++ program to process data from a large IR emitter and sensor array, which reports 3-d positions (within 1/10 a millimeter) for a set of markers within a 3m x 3m x 4m cube space.

I was asked to learn how this machine talks with the computer over the serial line, and figure out if it can report raw 3-d position data for each of 4 sensors, instead of reporting the aggregate position and orientation of the sensors. There's a sample C++ project which fully demoed the program's capabilities, which I've been hacking on. There's no tricky math- and their code is quite well documented. And a friendly support engineer helped me determine that I had the right approach to get the data using their API. I also found a bug in their code, which we're fortunately able to work around.

So I've gone from zero to almost-but-not-quite-there in the last 48 hours. This involved: learning Visual Studio, learning the API, and figuring out enough of this C++ program to be useful. This is what I wish I'd been working on for the last year. I'll be done with this project on Tuesday... (at least I hope I will, because I'm leaving with [livejournal.com profile] melted_snowball for Florence on Wednesday, not back until the following Thursday!)

Visual Studio is the best Microsoft product I've ever worked with; I got up to speed quite quickly and the only thing holding me back was, um, a bit of fuzziness on C++ datatypes. Also, I wish I could get the debugger to use the breakpoints I set; I'm having to do more debugging-via-print-statements than I'd prefer.

Date: Friday, 4 April 2008 11:52 pm (UTC)
From: [identity profile] kraig.livejournal.com
VS 2005 was the first IDE I've used since Borland Pascal 7. Tab completion on function names was a bit unsettling, but it's downright *weird* on variable names. It's nice though, even aside from that (and I've left it turned on while I learn myself some C#.)

Date: Saturday, 5 April 2008 06:18 pm (UTC)
From: [identity profile] da-lj.livejournal.com
I'd certainly use it again after I finish this project. Though, since I've asked Jason for a mac desktop- if I do use VS for work, it'll likely be via Parallels. :)

Date: Saturday, 5 April 2008 06:22 pm (UTC)
From: [identity profile] kraig.livejournal.com
nommy! I'm using it under Fusion, but only at home. Work desktop is a G5. Maybe in a couple or three years, when it's up for evergreening.

Date: Saturday, 5 April 2008 06:31 pm (UTC)
From: [identity profile] da-lj.livejournal.com
I actually just read that fusion is stabler than parallels 3.0, which is good to know; and indeed my fingers are crossed that Jason's offer in response to my question was an intel mac. (I figured it didn't hurt to ask for a mac, since I much prefer my home mac than my work PC, and expect I'll feel the same way about mac interface vs ubuntu since I haven't done any desktop linux in almost two years! (server, yes, of course)) .

Anyhow: vee shall see.

Date: Saturday, 5 April 2008 06:35 pm (UTC)
From: [identity profile] kraig.livejournal.com
I saw an RT to purchase a workstation for "new employee", but didn't look at the details. Unless you really wanted my spare G5 (d's old one ;) ) I don't think you could easily get a PPC Mac even if you wanted one.

Date: Saturday, 5 April 2008 06:40 pm (UTC)
From: [identity profile] da-lj.livejournal.com
Ha ha. I wondered if there was an RT for it yet. ;)

Yeah- intel imac > G5 spare as far as I'm concerned. I don't need to put a RAID inside it, or any other custom h/w, or ...

Date: Saturday, 5 April 2008 07:12 pm (UTC)
From: [identity profile] kraig.livejournal.com
I got snoopy and went to look, but now I can't find it again, maybe I imagined things. At any rate, you wouldn't be saddled with some old piece of junk, which is effectively what any PPC hardware is nowadays. (My Powermac G5 is the absolute last revision of the hardware, and it's now over 2 years old...)

Date: Saturday, 5 April 2008 07:14 pm (UTC)
From: [identity profile] kraig.livejournal.com
I closed this tab, then went to close the other one and saw the item right there. If you're curious :) -> 20" iMac, 2.4GHz, 2GB, miniDVI adapter cable.

Date: Saturday, 5 April 2008 07:52 pm (UTC)
From: [identity profile] da-lj.livejournal.com
That's awesome. those are great specs.

Next I guess we'll see if he took my suggestion that a second screen would also make me more productive. :)

Date: Saturday, 5 April 2008 07:39 pm (UTC)
From: [identity profile] da-lj.livejournal.com
*nods*

*glances at 8-year-old box sitting under his desk*

*considers even more elderly box sitting in the closet as web server*

I should really replace my server with a mac mini. :)

Date: Sunday, 6 April 2008 12:27 am (UTC)
From: [identity profile] kraig.livejournal.com
heh, well, work stuff is work stuff, home stuff is home stuff... :) I have a < 1 year old iMac, but that replaced my 5 year old P4 which went to Linda. :) router's a p3-866 of no particular age, since I put it together from used parts about 4 years ago.

Date: Saturday, 5 April 2008 08:52 pm (UTC)
From: [identity profile] melted-snowball.livejournal.com
:-) Yeah, it mildly amused me when [livejournal.com profile] da_lj said, "I wonder if I can get a desktop Mac", and I said, "well, I know there's at least one floating around..."

Date: Sunday, 6 April 2008 12:29 am (UTC)
From: [identity profile] kraig.livejournal.com
hah! Dunno if you noticed, but I finally found a use for that 20" Cinema from your lab too... your ex-G5!

Date: Saturday, 5 April 2008 03:14 pm (UTC)

Date: Saturday, 5 April 2008 06:01 pm (UTC)
From: [identity profile] http://users.livejournal.com/merle_/
VS isn't a bad IDE. Compared to everything I've used to edit Java code, the VS interface walks all over them. And unlike Excel or Outlook, their keyboard shortcuts are actually consistent with how most Windows programs work, which is a pleasant surprise from a Microsoft product.

Date: Saturday, 5 April 2008 06:12 pm (UTC)
From: [identity profile] da-lj.livejournal.com
unlike Excel or Outlook, their keyboard shortcuts are actually consistent with how most Windows programs work, which is a pleasant surprise from a Microsoft product.

Yes- that was a biggie for me. This other C++ IDE I've had to use (for LabWindows/CVI) was awful in that regard. Eventually I had the brain-wave I only needed to use it for compiling, and instead of using that for editing, I was mostly relying on good 'ol Emacs.

Now, by the end of the month, I need to figure out what IDE I should be using in mac-land, because I've told my new boss I'll be more productive if he gives me a mac (even instead of a linux machine). It's true I'll be more productive- I've just been using terminal-based linux tools for all my professional career!

Date: Saturday, 5 April 2008 06:19 pm (UTC)
From: [identity profile] http://users.livejournal.com/merle_/
Now, by the end of the month, I need to figure out what IDE I should be using in mac-land

If you find a good one, I would be very interested to hear about it. All of the suggestions I found online weren't terribly good editors, and I really don't want the bloat of something like Eclipse. The biggest problem I had with most products was a lack of a rich regexp search+replace, and of on-the-fly macros. Once you've gotten used to using those two, everything else feels like Textedit.

Date: Saturday, 5 April 2008 06:25 pm (UTC)
From: [identity profile] da-lj.livejournal.com
I'm probably going to stick with Emacs and shell unless I really need something else.

There seems to be a bit of consensus on the web that VS will work fine under vmware/parallels, and indeed that vmware fusion is superior to parallels 3.0 which is convenient because I never upgraded from parallels 2.5 :)

Date: Saturday, 5 April 2008 06:40 pm (UTC)
From: [identity profile] http://users.livejournal.com/merle_/
I'd heard VMWare is much faster than MS Virtual PC (which runs like a dog) on Wintel boxes, but have never compared it against Parallels. My Mac is a G4, so pretty much everything to virtualize is out...

Date: Sunday, 6 April 2008 12:35 am (UTC)
From: [identity profile] kraig.livejournal.com
VMF is how I'm running it; it's obviously not-native, but it works well enough.

Date: Thursday, 17 April 2008 04:20 am (UTC)
From: [identity profile] earthling177.livejournal.com
Under OSX you are supposed to be using XCode for anything that you want support from the OS and easy transition to the billion things they are planning to do and will of course not tell us. Just take a look on the web and find out the big examples of people who shot themselves in their feet for staying with other products, including Microsoft (which was almost the last company to release a product native on the Intel Macs) and Adobe, which was basically the last one and hasn't finished yet. If you don't like something like the editor, I think you can even tell XCode which external editor you want (emacs, vi etc). For contrast, Mathematica, one of the largest apps/systems out there, compiled almost with no changes in no time at all and was the first non-Apple app to be ready for the Intel Macs. Steve didn't even let them know what was gonna happen, he just asked Wolfram "can you send me one of your engineers with a hard drive containing your code?" and as he said "boom!, it was ready to deliver". It may also have been the *only* app that ever happened to, I heard people complaining about the contortions they had to do to be able to compile as Universal App, which only highlights my profs saying "don't go to assembly/tricks just to get 1% faster, 'cuz you'll spend a huge amount of time porting it to the next OS/architecture...", which seems true enough but no one in the computer industry seems to want to hear.

As for VMware Fusion vs. Parallels, the dust is not settled yet: each one is better than the other depending on what you want and what you're doing. Latest rumors I've heard is that if you want to deal with a lot of peripherals, particularly USB, you might be in better luck with Parallels, if you wanted to tell the VM how many CPUs you want to use and how, you might like VMware better and so on and so forth. "Stable" is one of those funny words when it comes to VM, some people say that while VMware tends to process stuff in the VM faster, once you stop VMware it continues to take CPU resources/time because some of the processes don't sleep/go away like Parallels. Reports of which one is better if you sleep the physical machine without stopping the VM or even just which one suspends the VM and lets you quit the program and resume later are conflicting at best.

But here's the good news: as far as I know, *both* let you use the program for free for a few days so you can check. Just remember to ask the uninstaller to remove the systems completely before installing the other one, 'cuz they sink their teeth deep into the OS and the machine to get the VMs to work and you don't want both running fragments of code at once, bad bad plan. Good luck!

Date: Saturday, 5 April 2008 06:21 pm (UTC)
From: [identity profile] kraig.livejournal.com
XCode is supposed to be ok, although I've only used it a little for C# under Mono. (And even that just as a fancy editor.)

December 2024

S M T W T F S
12 34567
891011121314
15161718192021
22232425262728
293031    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Monday, 5 January 2026 10:58 am
Powered by Dreamwidth Studios