2007-12-12
2007-12-03
Mental Block
I must have one about coordinate-system transformations in windows.
Problem I spent literally all day on was to display the Acrobat reader ActiveX control in an application so that only the document itself was visible.
That bit was OK.
Then I had to handle the zooming manually - if the user was allowed to use the Acrobat viewing, they'd screw up the mapping between the application window coordinates and the displayed page.
There's where the fun began. There was an offset (to hide the Acrobat framework), a zoom-factor and the visible top-left point of the page to convert between windowing coordinates and a normalised page coordinate system (0 to 1).
Could I handle zooming in/out? It just did my head in - figuring out which window (application, Acrobat container, page view window) should be used for calculating sccaling factors etc.
Eventually sussed it out. Simple in the end of course with a couple of gotchas in the behaviour of the MFC CScrollView class.
Small disclaimer: I hacked the code together a year ago in a hurry when I was trying to figure out an overlay for the viewer. This made it all pretty confusing. Note to self - review commenting and function-naming style!!!
Problem I spent literally all day on was to display the Acrobat reader ActiveX control in an application so that only the document itself was visible.
That bit was OK.
Then I had to handle the zooming manually - if the user was allowed to use the Acrobat viewing, they'd screw up the mapping between the application window coordinates and the displayed page.
There's where the fun began. There was an offset (to hide the Acrobat framework), a zoom-factor and the visible top-left point of the page to convert between windowing coordinates and a normalised page coordinate system (0 to 1).
Could I handle zooming in/out? It just did my head in - figuring out which window (application, Acrobat container, page view window) should be used for calculating sccaling factors etc.
Eventually sussed it out. Simple in the end of course with a couple of gotchas in the behaviour of the MFC CScrollView class.
Small disclaimer: I hacked the code together a year ago in a hurry when I was trying to figure out an overlay for the viewer. This made it all pretty confusing. Note to self - review commenting and function-naming style!!!
2007-11-28
Google for Borealis' email?
Seriously considering using google to host email for Borealis.
On a similar note this post and this one here show how to integrate Thunderbird with the online google calendars. Given that you can run Thunderbird from a USB key drive, this is perfect for contracting.
Question: can I can a USB key based version of firefox? Answer: yes
Update: forget the google solution - Thunderbird on a stick is fine, especially when integrated with the online google calendars.
- gmail is a great web interface
- google now provides IMAP for use with Thunderbird at home
- good email notification tools
On a similar note this post and this one here show how to integrate Thunderbird with the online google calendars. Given that you can run Thunderbird from a USB key drive, this is perfect for contracting.
Question: can I can a USB key based version of firefox? Answer: yes
Update: forget the google solution - Thunderbird on a stick is fine, especially when integrated with the online google calendars.
2007-11-25
Starting Up As an IT Contractor
"Congratulations - you've done the hard part" (landing your first contract). Advice from a contracting resources site.
It's a great site but that piece of advice was waaaay misleading. The hard part is rushing around like a blue-arsed fly trying to get everything you need in place before you start the job. Limited company. Accountant. Contracts (is IR35 going to eat it?). Business bank account. Professional Indemnity insurance. This, that, the other insurance.
Arrgh. All when your current boss is doing a brain-drain on you before you leave. No, all of the above is the hard part!!
Before anyone says, "who cares about your old job", IMO its a good thing to keep 'em sweet - references, future work when you're in a dry patch, possible joint business ventures. Lots of reasons.
So here I am, at 11pm trying to figure out what the hell to ask a list of accountants over the phone in order to try and figure out if they're actually any good or not.
Please. no smug comments please along the lines of "why didn't you get all of that sorted out before getting the contract?" The answer is initial outlay and how to limit/avoid it.
It's a great site but that piece of advice was waaaay misleading. The hard part is rushing around like a blue-arsed fly trying to get everything you need in place before you start the job. Limited company. Accountant. Contracts (is IR35 going to eat it?). Business bank account. Professional Indemnity insurance. This, that, the other insurance.
Arrgh. All when your current boss is doing a brain-drain on you before you leave. No, all of the above is the hard part!!
Before anyone says, "who cares about your old job", IMO its a good thing to keep 'em sweet - references, future work when you're in a dry patch, possible joint business ventures. Lots of reasons.
So here I am, at 11pm trying to figure out what the hell to ask a list of accountants over the phone in order to try and figure out if they're actually any good or not.
Please. no smug comments please along the lines of "why didn't you get all of that sorted out before getting the contract?" The answer is initial outlay and how to limit/avoid it.
2007-11-23
More on msbuild
Nope - its not great.
I have a project "Build" containing the task that builds first. A project "Publish" builds last and uses the Build.Publish task to do its work.
All works well the first build. Then you make a change to "Build", rebuild and you still can't copy the Build DLL into its bin directory. Worse you can't do it until you kill off the instance of Visual Studio you're building with.
It all works if devenv.exe is executed from the command-line, but I wanted to avoid that if possible. Oh well.
I have a project "Build" containing the task that builds first. A project "Publish" builds last and uses the Build.Publish task to do its work.
All works well the first build. Then you make a change to "Build", rebuild and you still can't copy the Build DLL into its bin directory. Worse you can't do it until you kill off the instance of Visual Studio you're building with.
It all works if devenv.exe is executed from the command-line, but I wanted to avoid that if possible. Oh well.
msbuild shenanigans
Bit of a pain this.
I want to be able to create a set of custom msbuild build tasks that:
Point 2 gives problems because setup projects simply aren't msbuild compatible!
Point 1 I hope I can improve on - my task is attached to the project that builds the assembly and doesn't build because the assembly is in use (by msbuild itself).
Not that unreasonable I suppose but I'd have liked msbuild to be smart enough to realise it's using the assembly its about to build and defer loading it since its only used in the AfterBuild standard target!
Anyone watching with any clues? If not, back to RTFM again.
I want to be able to create a set of custom msbuild build tasks that:
- is compiled as part of my solution (so it's up-to-date)
- is referenced by the setup project (the last project to build)
- generates a set of scripts from templates and zips them up
- publishes the zip file and the installer to a predetermined place
- I can use it when I'm working in Visual Studio
- compile the tasks independently of my solution
- create a new (and useless) project dependent on the setup project to host the tasks
- etc etc
Point 2 gives problems because setup projects simply aren't msbuild compatible!
Point 1 I hope I can improve on - my task is attached to the project that builds the assembly and doesn't build because the assembly is in use (by msbuild itself).
Not that unreasonable I suppose but I'd have liked msbuild to be smart enough to realise it's using the assembly its about to build and defer loading it since its only used in the AfterBuild standard target!
Anyone watching with any clues? If not, back to RTFM again.
2007-11-22
Just a reminder to myself
Firefox extensions to have:
All-in-One Sidebar
DOM Inspector
Foxy Tunes
Google Notebook
IE Tab
NoScript
PermaTabs
Gmail Notifier
2007-11-19
Woo Hoo!!!
Here we go, here we go, here we go... :-)
Now, I've got to resign. Likely to be a bit painful. Hopefully not literally.
Now, I've got to resign. Likely to be a bit painful. Hopefully not literally.
2007-11-06
Self-coloured bumpers ...
(Fenders to those on the other side of the Atlantic.)
I don't know whether the person(s) responsible for the idea of self-coloured bumpers should be congratulated for a singular act of evil genius or summarily hung, drawn and quartered for the very idea.
Think about it - bumpers (or fenders) were practical rubber lumps that if bumped against car-park barriers or other cars would take the energy out of the collision and leave no damage to the car (I'm talking the slow speed type of collision here). You'd maybe have a mark on the bumper but who cares?
Now though, they're shiny and contoured and the same colour as your car - they've become a thing of beauty in their own right. They're also pretty fragile and tend to CRACK at the slightest bump (all too frequent for my wife and I).
Hey presto! Instant creation of a new industry - replacing scratched/cracked self-coloured bumpers.
Genius or what? Who knows how much money the automotive industry is taking out of the pockets of vain idiots who (I hope!) never used to care about boring old bumpers but have now become as ultra precious about the now useless things as they are about their cars!
I just wish I could get good old rubber lumps of bumpers again ... :-(
I don't know whether the person(s) responsible for the idea of self-coloured bumpers should be congratulated for a singular act of evil genius or summarily hung, drawn and quartered for the very idea.
Think about it - bumpers (or fenders) were practical rubber lumps that if bumped against car-park barriers or other cars would take the energy out of the collision and leave no damage to the car (I'm talking the slow speed type of collision here). You'd maybe have a mark on the bumper but who cares?
Now though, they're shiny and contoured and the same colour as your car - they've become a thing of beauty in their own right. They're also pretty fragile and tend to CRACK at the slightest bump (all too frequent for my wife and I).
Hey presto! Instant creation of a new industry - replacing scratched/cracked self-coloured bumpers.
Genius or what? Who knows how much money the automotive industry is taking out of the pockets of vain idiots who (I hope!) never used to care about boring old bumpers but have now become as ultra precious about the now useless things as they are about their cars!
I just wish I could get good old rubber lumps of bumpers again ... :-(
2007-11-05
TODO: Statistical Survey
Make a note of when I'm bored (read QA/testing for our friends at H***n) and compare to number of posts I make.
I bet the correlation is pretty high.
I bet the correlation is pretty high.
While I'm on the subject of Sanoodi ...
They still haven't given me access to the forums.
Update: they spotted this and replied to me directly. Bit embarrassing with me grouching and all, but hey, someone read my ramblings. Big thanks to Sanoodi!!
Update: they spotted this and replied to me directly. Bit embarrassing with me grouching and all, but hey, someone read my ramblings. Big thanks to Sanoodi!!
Sanoodi doh!
Finally sussed out the hopefully easiest route of getting altitude data for converting TopoRoute to Sanoodi GPX files - Google Earth. Doh!
Its got a COM API and with methods to query altitude data. Should be simpler (famous last words) than trying to access a web service type of interface.
Then again, having a visible map via an embedded IE browser could be a nice feature to have (phase 2 maybe?). Could I display Google Earth as an OCX in a separate window?
Its got a COM API and with methods to query altitude data. Should be simpler (famous last words) than trying to access a web service type of interface.
Then again, having a visible map via an embedded IE browser could be a nice feature to have (phase 2 maybe?). Could I display Google Earth as an OCX in a separate window?
Subscribe to:
Comments (Atom)
