Skip to navigation
   
Dave F's Blog
Greenbelt here we come!

By Dave F in Reader

Posted in faith on August 27, 2009 at 8:18 am

Permalink | Author Profile

A quick post to say I’m not around for a bit as I’m off to
http://www.greenbelt.org.uk
hopefully I’ll come back fired up about faith, art and (kind of suprisingly) technology!
If you’re going you might find
http://www.greenbelt.org.uk/system/data/maps/GB09-Campsite-Map.pdf
useful
whether you are or not
http://www.photoglow.co.uk/greenbelt_2009_setup/slideshow#h16096d67
is cool!

12345
Not yet rated
Loading ... Loading ...

 
Exactly the same - only different

By Dave F in Reader

Posted in QT, Coding, Microsoft on August 21, 2009 at 11:47 am

Permalink | Author Profile

I built a snapshot the other day. That is I created separate copy of all the current source code and built it to give a stable image to some testers. It crashed, just didn’t want to run.

OK, I thought, double check the sources are identical to my development area. Yes & it runs.
OK, I normally build a debug version - the snapshot will be a release build. Build a release build in my development area - it runs.
OK, I build with MSVS work bench but the snapshot is built from the command line so build it from the same command but in my development are. It runs.
Compare the binaries - different sizes, different contents… ?
Clean all objects etc and rebuild everything from scratch in both areas - same results one runs one doesn’t. Do it again in case I got it wrong, check the sources are the same (in case I got it wrong). Do it all over, and again. Phone a friend, search the web, bang head on desk, …

Finally I did what any novice would tell me to do. I switched the PC on and off, then cleaned and re-built the snapshot - it runs.

But why would a build from one command line differ from one in another DOS box (both started from the same Visual Studio command)??? And why didn’t I just try a reset earlier?

12345
Not yet rated
Loading ... Loading ...

 
In Black and White - Stephen Hawking & the NHS

By Dave F in Reader

Posted in Funny, In the news, media, language, Coding, the web, Blogs on August 17, 2009 at 9:43 am

Permalink | Author Profile

I’m a bit late in slagging Investors Business Daily (and all Americans by implication) in their announcement that Stephen Hawking would be dead if he were British. A great story for national stereotyping (racism?) in that it uses American stereotypes of Brits (accusing us of having a naff health system) whilst conforming to British stereotypes of Americans (being ill informed and assuming anything good must be American). I’m sure the father from Goodness Gracious Me is even now saying “Stephen Hawking? He’s Indian!”.

However, with the power of the web over paper and ink the article has been miraculously changed. IBDeditorials.com: Editorials, Political Cartoons, and Polls from Investor’s Business Daily — How House Bill Runs Over Grandma

A fine example of why software should be released via the web rather than committing to hundreds of CD’s before realising there is a minor glitch.

Maybe all that being able to hand your course work in then get it back and fix it is good training for the real world after all.

Pleas come back and read this entry again next week - I may have changed it to make it more interesting by then…

12345
Not yet rated
Loading ... Loading ...

 
One rule for you, common sense for us

By Dave F in Reader

Posted in In the news on August 12, 2009 at 9:03 am

Permalink | Author Profile

Over at http://www.independent.co.uk/opinion/commentators/mary-wakefield-i-want-to-help-ndash-but-im-not-allowed-to-1769197.html Mary Wakefield is having a well placed bash at the CRB requirements. For years I have been moaning that regulations that make it so hard to look after kids that it they aren’t looked after at all aren’t a good thing and now it looks like even the clots who brought in the rules think they are best ignored.

Yes, we need to be careful of who is in charge of any vulnerable individuals but making it hard (and expensive) for volunteers means that many people just don’t bother. Holiday clubs, scout groups, youth clubs just close leaving kids the safe option of staying in watching internet porn or hanging about the park after dark (OK, they do have other options but plenty of them will choose these two).  The real peril is anyone who has criminal intent can probably fool the system anyway - it “just” requires false id.

And the law makers that brought in these regs? Well John Battle is arguing that the new checks should be applied to all MP’s but Harriet Harman reckons “common sense” should mitigate the requirement for MP’s to be on the vetting register. Gorden Brown is famously volunteering over his summer break but is he submitting himself to CRB checks? Number 10 refuses to say.

So one rule for us sick, evil people but common sense for those nice MP’s?

12345
Not yet rated
Loading ... Loading ...

 
Re-inventing the wheel, argv / argc in windows

By Dave F in Reader

Posted in Coding, Microsoft on August 10, 2009 at 3:48 pm

Permalink | Author Profile

I had to write a quick utility today - just passing a few options in on the command line.  I used MSVC to create a console app and Robert was my parental sibling. However, when I ran it a MSDOS box popped up and disappeared - a bit messy. So I started a new app as a simple windows app & pasted the code in, but whoops, a windows app doesn’t start from main(argv, argc) it starts from

int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow)

So I spent half the day writing a parser to convert a command line into argv argc - easy enough until you allow for “this is just one param because it’s in quotes” etc.

I finally switched to unicode just so that I could use

    argv = CommandLineToArgvW(GetCommandLineW(), &argc);

but why isn’t there an ascii version? The argv / argc convention has been in use since the dawn of C, it is intrinsic to most C programs, not having it is a right pain.  Yes, I know the project was C++ not C but that is only because good old MSVC doesn’t even have a C project type.

Whilst I hate re-inventing the wheel and coding what has been coded a thousand times before I guess in these hard economic times it’s good to know there will always be work even if in a perfect world it would be pointless.

12345
Not yet rated
Loading ... Loading ...

 
Advertisement