Petrol Price Math

For the last couple of weeks I’ve filled up at the same petrol station, and then entered the details into Gas Cubby and the docket price is 2 cents different from that displayed on the ipod….

Fuel Docket

2.119 x 27.94 = 59.20486, which should round to 55.20

I could forgive 55.21, but really 50.22, that’s magic rounding, or they are using more decimal places than shown.

To make the checking easy I’ll assume infinite precision and thus the rounding will trend towards .5 of the last digit. 2.1195 x 27.9405 = 59.2198898 thus 59.22, so it could be both figures are misrepresented or just the $/litre, as when you don’t fudge the price and only the litre amount the total rounds to 59.21.

Or maybe they just have bad programmers and the company is not evil.

Which reminds me of how my TelstraClear (now Vodaphone) bill never added up. If you telly the sub totals reported to 2 decimal places, the total was off 1 to 2 cents every bill. Scary was that two of three sections were fixed price, and the third was fractional. So how they did that I was never sure.

Bricked My Camera

Sigh, I loaded my first altered firmware on my trusty D5100 on the 25th November 2011, and my last on 22nd May 2013.

Strangely enough we are not sure what was wrong with the patch, weather the area we put the code in was not truly free space, or if the area we were putting data in was not spare, if the jump to the new code was wrong, was the return wrong, was there an error in the code, or did we take to long and a watchdog triggered.

[Edit 7 July 2013] Hi Nikonrumor people, the problem with the patch was an incorrect sequence of assembly instructions used, and it was a development test patch. So “released” patches are much more “safer” but there is still a real albeit small risk.[Edit]

It’s hard to know but the camera doesn’t boot anymore. The led doesn’t even flash when you put batteries in/out.

So now I get to buy myself a new camera, it’s a little frustrating, as the project had been getting donations, but we had not gotten enough for a D5100 body yet and my plan was to get one for one of the other developers, so we could speed up testing time, and spread the risk. The other guys have different models so are not directly applicable at this “but how does it all work’ stage. And because I started the project we were focusing on the D5100 model as it was the most understood.

If my camera was damaged and I could claim insurance, I wouldn’t get a replacement D5100, I’d likely step up a model, not because I’d out grown the D5100, it’s a fantastic camera, it’s just I’m prepared to spend a little more to get more, compared to when I brought my first DSLR. But getting a D5100 makes the most sense as that’s the model we know the most about from a team perspective.

I rang the Nikon Service centre and it will cost 50% of the new camera price to replace the mainboard. And you can buy replacement off ebay for half that again, but I’m not a hardware guy. They plan is to send the body to a team member and see if they can get the JTAG link working to force reprogram it.

Michaela joked that I should dump Nikon and go with Canon, because of ‘disgust with a camera that’s so easy to break’. She took the news better than I expected.

So ignoring the Canon joke, I’m torn between personal camera needs/wants, and project team needs, and I’m wondering if there’s any community opinion, and if the community is willing to help fund that opinion in anyway?

I’ve previously not directly asked for money for camera bodies, as I didn’t want to ask before having something to show, and I felt we could stop at anytime without feeling a huge sense of dept to the community. So I’m keen to understand what people think.

By the way, we have been able to partially dump the D7100 and it’s ARM based verse Fujitsu FR based and uses a different OS. So the newest camera’s are a whole different kettle of fish, but should be easier to work with, as there is more ARM based disassembly tools.

Looking for D3200 Alpha Testers

I just released v1.13 of the online patch tool today, and it has the time limit removed for D3200 movie recording, but…. it’s not been tested, as none of the core developers have a D3200.

So we need a brave soul to test it for us. If keen come on over to the forum and let us know so we don’t have 100 people all trying it at once. ;-)

Bitcoin Pain

With the Bitcoin network chain problem requiring a full re-download of the chain, this meant that my 150GB network limit was used up in 24 days, because of 85GB of upstream Bitcoin traffic. So for now I’ve stopped my client.

As I opted for reduced network speed verse overage fees, the family is making do with 64bps, which is dial-up internet really. Strangely enough mobile devices are less effected due to light weight apps, but computer based web surfing is almost out of the question.

Wordpress Page Spam

I’ve been getting spam to my page’s and pictures for years, but this last weekend I got 400+

Grrr, time to fight back.

The annoying thing is that both Media and Pages don’t have the ability for the Admin (out of the box) to say “no comments”, which is what I do to all my posts once I they get enough spam, and I don’t want to leave to open for active discussion.

So I found this support post with this code to stop Media comments:

add_filter( 'comments_open', 'no_media_comments', 10, 2 );  

function no_media_comments( $open, $post_id ) {  

$post = get_post( $post_id );  
// wordpress refers to images as attachments  
if ( 'attachment' == $post->post_type )  
  $open = false;  

return $open;  
}

I then found this page in the Codex with the ‘post->post_type’ defined and added another clause to block posts to Pages also and ended up with this:

function no_media_comments( $open, $post_id ) {  

$post = get_post( $post_id );  
// wordpress refers to images as attachments  
if ( 'attachment' == $post->post_type )  
  $open = false;  
if ( 'page' == $post->post_type )  
  $open = false;  

return $open;  
}  

add_filter( 'comments_open', 'no_media_comments', 10, 2 );

Which I placed at the very bottom of my functions.php (Appearance -> Editor -> functions.php)

Getting SageTV to work with HDHR3-DT with NZ DVB-T Freeview

So the default install process of SageTV (7.1.9) and HDHR3-DT (release 20120405 or 20130117beta1), is incompatible for me with DVB-T/New Zealand Freeview.

When I did a channel scan, SageTV stops when it get’s to the first channel with content. Yet the HDHomeRun tools scan/dispaly all channels correctly.

The work around is to add the Video source’s as normal but don’t do the channel scan, add the second video source like the first (but use same guide data), exit SageTV and stop the service. Then edit the Sage.properties file and alter the ‘mmc/dvbt_region=Christchurch@Sugarloaf‘ entry to ‘mmc/dvbt_region=

thus from this:
Text to remove

to this:
with text removed

Now restart SageTV, do the channel scan, and it will complete as expected.

But don’t select ‘DVB-T Region’ menu item, otherwise you’ll have to edit the configuration above again.

3 Hours Down Time due to Hosting Server Upgrade

For the 12 people trying to view the blog, my apologies. My Hosting Service upgraded the back-end database, and the support people took three hours (normal business hours) to tell me to re-apply the passwords to the DB.

[Edit]To be fair, they inform me they were discovering the solution with another customer, which I have no problem with. I was just feeling a little out in the dark about the process of resolution. But really when there’s a fire, you just put the thing out, and its over now…

But we’re back in action now. So back to work.

Don't leave development firmware on you camera...

It shouldn’t need to be said, but “Don’t leave development firmware on you camera“ in late December I was trying to fix the Lossless NEF file corruption problem on my D5100. I loaded a firmware, found it didn’t fix the problem, and then went back to studying the code. I few hours later, as a family we went off to a New Years eve party, and I picked up my camera, and snapped some real keepers.

Next day, I plugged the SD card in and found that Lightroom was

Lightroom has encountered problems reading this photo. You will not be able to make adjustments to the photo.

Arrg.

There is a good example of how to pull the preview jpeg’s, but when I did that, the preview pictures were 570x375, and thus not worth keeping, so some reading of the help file and this command pulled the embedded 4928x3264 jpegs.

exiftool.exe -b -JpgFromRaw -w _jpgfromraw.jpg -ext nef -r .

Which is better sized albeit a little over compressed. But better than nothing.

Now to solve the lossless NEF problem once and for all, and try resolve if the raw files can truly be recovered…