Implements an image recognition captcha.

"; break; case 'admin/modules#description': case 'admin/modules/textimage': case 'admin/textimage': $output = t('Implements an image recognition captcha.'); break; } return $output; } function textimage_captchachallenge(&$form) { $form['captcha_response'] = array ( '#type' => 'textfield', '#title' => t('Captcha Validation'), '#default_value' => '', '#required' => TRUE, '#validate' => array('_captcha_validate' => array()), '#description' => t('Please type in the letters/numbers that are shown in the image above.'), '#prefix' => 'Captcha Image: you will need to recognize the text in it.', ); return $form; } function textimage_captchavalidate(&$captcha_word, &$correct) { $captcha_word = drupal_strtolower($captcha_word); if (($_SESSION['captcha'] != '') && $captcha_word == $_SESSION['captcha']) { $correct = true; } else { $correct = false; form_set_error('captcha_response', t('The image verification code you entered is incorrect.')); } } /** * Implementation of hook_menu(). */ function textimage_menu($may_cache) { $items = array(); $suffix = ''; if (arg(2)!=null) $suffix='/'.arg(2); $items[] = array( 'path' => '_textimage/image'.$suffix, 'title' => t('textimage'), 'callback' => '_textimage_image', 'access' => user_access('access textimages'), 'type' => MENU_CALLBACK ); return $items; } function textimage_perm() { return array('access textimages'); } function textimage_settings() { $fonts_path = variable_get("textimage_fonts_path", ""); $images_path = variable_get("textimage_images_path", ""); //check for GD if (!function_exists(imagecreate)) drupal_set_message(t('Image library not available. Textimage needs the GD library extension to be installed. Please install GD.')); //check for TTF support elseif (!function_exists(imagettftext)) drupal_set_message(t('Your image library does not seem to have TrueType font support. Textimage will work, but will use the default inbuilt font.'),'status'); //check for valid font path elseif ($fonts_path!="" && !is_dir($fonts_path)) drupal_set_message(t('The current font path is invalid. The default font will be used.')); //check for valid image path if ($images_path!="" && !is_dir($images_path)) drupal_set_message(t('The current images path is invalid. No images will be used.')); //Fonts settings $form['fonts'] = array( '#type' => 'fieldset', '#title' => t('Fonts settings'), '#collapsible' => TRUE, '#collapsed' => FALSE ); $form['fonts']['textimage_use_only_upper'] = array( '#type' => 'checkbox', '#title' => t('Use only Uppercase'), '#default_value' => variable_get('textimage_use_only_upper',0) ); $form['fonts']['textimage_fonts_path'] = array( '#type' => 'textfield', '#title' => t('TrueType Fonts Path'), '#default_value' => $fonts_path, '#size' => 30, '#maxlength' => 255, '#description' => t('Location of the directory where the Truetype (.ttf) fonts are stored. If you do not provide any fonts, the module will use the default font for text. Relative paths will be resolved relative to the Drupal installation directory.'), ); $form['fonts']['textimage_font_size'] = array( '#type' => 'textfield', '#title' => t('Font Size'), '#default_value' => variable_get('textimage_font_size',24), '#size' => 5, '#maxlength' => 2, '#description' => t('Font size of Captcha text (in pixels).'), '#validate' => array("_textimage_number_validate" => array("textimage_font_size")), ); $form['fonts']['textimage_char_spacing_max'] = array( '#type' => 'textfield', '#title' => t('Character Spacing'), '#default_value' => variable_get('textimage_char_spacing_max',10), '#size' => 5, '#maxlength' => 4, '#description' => t('Sets the kerning between letters in Captcha. Higher numbers indicate more spacing.'), '#validate' => array("_textimage_number_validate" => array("textimage_char_spacing_max")), ); $form['fonts']['textimage_char_jiggle_amount'] = array( '#type' => 'textfield', '#title' => t('Character Jiggle'), '#default_value' => variable_get('textimage_char_jiggle_amount',5), '#size' => 5, '#maxlength' => 2, '#description' => t('Sets the amount of up and down movement in the Captcha letters. Higher numbers indicate more jiggling.'), '#validate' => array("_textimage_number_validate" => array("textimage_char_jiggle_amount")), ); $form['fonts']['textimage_char_rotate_amount'] = array( '#type' => 'textfield', '#title' => t('Character Rotation'), '#default_value' => variable_get('textimage_char_rotate_amount',5), '#size' => 5, '#maxlength' => 2, '#description' => t('Sets the amount of rotation in the Captcha letters (in degrees, only works with non-default fonts).'), '#validate' => array("_textimage_number_validate" => array("textimage_char_rotate_amount")), ); $form['fonts']['textimage_char_size_amount'] = array( '#type' => 'textfield', '#title' => t('Character Size Adjustment'), '#default_value' => variable_get('textimage_char_size_amount',2), '#size' => 5, '#maxlength' => 2, '#description' => t('Sets the amount of variation in size between the different letters in the Captcha (in pixels).'), '#validate' => array("_textimage_number_validate" => array("textimage_char_size_amount")), ); //Image settings $form['images'] = array( '#type' => 'fieldset', '#title' => t('Image settings'), '#collapsible' => TRUE, '#collapsed' => FALSE ); $form['images']['textimage_images_path'] = array( '#type' => 'textfield', '#title' => t('Background Images Path'), '#default_value' => $images_path, '#size' => 30, '#maxlength' => 255, '#description' => t('Location of the directory where the background images are stored. If you do not provide a directory, solid colors will be used. Relative paths will be resolved relative to the Drupal installation directory.'), ); $form['images']['textimage_image_noise'] = array( '#type' => 'textfield', '#title' => t('Image Noise (pixels)'), '#default_value' => variable_get('textimage_image_noise',4), '#size' => 5, '#maxlength' => 4, '#description' => t('Sets the amount of noise (random pixels) in the Captcha image. Higher numbers indicate more noise.'), '#validate' => array("_textimage_number_validate" => array("textimage_image_noise")), ); $form['images']['textimage_image_lines'] = array( '#type' => 'textfield', '#title' => t('Image Noise (lines)'), '#default_value' => variable_get('textimage_image_lines',4), '#size' => 5, '#maxlength' => 4, '#description' => t('Sets the amount of noise (random lines) in the Captcha image. Higher numbers indicate more noise.'), '#validate' => array("_textimage_number_validate" => array("textimage_image_lines")), ); $form['images']['textimage_image_margin'] = array( '#type' => 'textfield', '#title' => t('Image Margin'), '#default_value' => variable_get('textimage_image_margin',10), '#size' => 5, '#maxlength' => 4, '#description' => t('Set a distance between the Captcha letters and the edges of the image.'), '#validate' => array("_textimage_number_validate" => array("textimage_image_margin")), ); $form['info'] = array( '#type' => 'fieldset', '#title' => t('Image and font information'), '#collapsible' => TRUE, '#collapsed' => FALSE ); if (isset($fonts_path)) { $imagefontinfo .= t('Number of fonts found: ').count(_textimage_font_list()); } if (isset($images_path)) { $imagefontinfo .= '
'.t('Number of background images found: ').count(_textimage_image_list()); } $gdinfo = gd_info(); $imagefontinfo .= '
'.t('GD Version: ').$gdinfo["GD Version"]; $imagefontinfo .= '
'.t(' FreeType Support: '); $imagefontinfo .= ($gdinfo["FreeType Support"]==true) ? 'True' : 'False'; $imagefontinfo .= '
'; $form['info']['captcha_info'] = array ( '#type' => 'item', '#value' => $imagefontinfo, ); return $form; } function textimage_settings_form_validate ($form_id,$form) { //check for valid font path if ($form['textimage_fonts_path'] !="" && !is_dir($form['textimage_fonts_path'])) form_set_error('textimage_fonts_path', t('The entered font path is invalid')); //check for valid image path if ($form['textimage_images_path'] !="" && !is_dir($form['textimage_images_path'])) form_set_error('textimage_images_path', t('The entered image path is invalid')); } function _textimage_number_validate ($field,$fieldName) { if (!is_numeric($field['#value'])) { form_set_error($fieldName,t("The value for")." ".t($field['#title'])." ".t("must be a number")); } } /** * Prints an image containing a textimage code. */ function _textimage_image() { //if we don't have GD2 functions, we can't generate the image if (!function_exists('imagecreatetruecolor')) return; // Set headers header('Expires: Mon, 01 Jan 1997 05:00:00 GMT'); header('Cache-Control: no-store, no-cache, must-revalidate'); header('Cache-Control: post-check=0, pre-check=0', false); header('Pragma: no-cache'); header('Content-type: image/png'); $string = _textimage_code(); // Get truetype font list $fonts = _textimage_font_list(); // Get the background images list $images = _textimage_image_list(); // Randomization amounts: $charSpacingMax = variable_get('textimage_char_spacing_max',10); // Letter spacing max (pixels) $charSpacingMin = max($charSpacingMax*.5,0); // Letter spacing minimum (pixels) $charJiggleAmount = variable_get('textimage_char_jiggle_amount',5); // Up and down randomization (pixels) $charRotateAmount = variable_get('textimage_char_rotate_amount',5); // Character rotation amount (degrees) $charSizeAmount = variable_get('textimage_char_size_amount',2); // Character size amount (pixels) $imageRotateAmount = variable_get('captcha_image_rotate_amount',12); // Image rotation amount (degrees) // Static amounts: $charInitialSize = variable_get('textimage_font_size',24); // Initial Font $imageNoise = variable_get('textimage_image_noise',4); // Amount of noise added to image $imageLines = variable_get('textimage_image_lines',4); // Amount of noise added to image $imageMargin = variable_get('textimage_image_margin',10); // Margin around image (pixels) // write text using a truetype font if (function_exists(imagettftext) && count($fonts) > 0) { // Initialize variables for the loop $characterDetails = array(); // contains the final info about each character // Build a list of character settings for the captcha string for ($i=0;$i $charSize, "angle" => $charAngle, "x" => $x, "y" => $y, "color" => $foreground, "font" => $font, "char" => $char ); // Increment the image size $imageWidth = $x + $charWidth; $imageHeight = max($imageHeight,$y+$charJiggleAmount); } // Create the image based off the string length and margin if (count($images) > 0) { // We're going to be using an image, and need a tranparent background to start with $im = _textimage_create_transparent_image($imageWidth+2*$imageMargin, $imageHeight+2*$imageMargin); $noisecolor = imagecolorallocatealpha($im, 0, 0, 0, 127); } else { // Just make a plain-jane color brackground $im = imagecreatetruecolor($imageWidth+2*$imageMargin, $imageHeight+2*$imageMargin); $background = imagecolorallocate($im, rand(180, 250), rand(180, 250), rand(180, 250)); $noisecolor = $background; imagefill($im, 0, 0, $background); } // Specify colors to be used in the image $foreground = imagecolorallocate($im, rand(0, 80), rand(0, 80), rand(0, 80)); foreach($characterDetails as $char) { // draw character imagettftext($im,$char['size'],$char['angle'],$char['x']+$imageMargin,$char['y']+$imageMargin,$foreground,$char['font'],$char['char']); } } else { // write text using a built-in font $x = 0; $y = 0; $imageWidth = 60 + drupal_strlen($string)*$charSpacingMax*.35; $imageHeight = 30 + $charJiggleAmount; // Create the image if (count($images) > 0 && function_exists(imagecolorallocatealpha)) { // We're going to be using an image, and need a tranparent background to start with $im = _textimage_create_transparent_image($imageWidth, $imageHeight); $noisecolor = imagecolorallocatealpha($im, 0, 0, 0, 127); } else { // Just make a plain-jane color brackground $im = imagecreatetruecolor($imageWidth, $imageHeight); $background = imagecolorallocate($im, rand(180, 250), rand(180, 250), rand(180, 250)); $noisecolor = $background; imagefill($im, 0, 0, $background); } // Add the text for ($i=0;$i 0) { // Prepare a larger image with a background image $im2 = _textimage_create_transparent_image($imageWidth, $imageHeight); } else { // Prepare a larger image with a solid color $im2 = imagecreatetruecolor($imageWidth, $imageHeight); imagefill($im2, 0, 0, $background); } $result = imagecopyresampled ($im2, $im, $imageMargin, $imageMargin, 0, 0, $imageWidth, $imageHeight, imagesx($im), imagesy($im)); $im = $im2; } // strikethrough imageline($im, rand(0, 120), rand(0, 120), rand(0, 120), rand(0, 120), $foreground); // Add Noise for ($x=0; $x<$imageWidth; $x++) { for ($row=0; $row<$imageNoise;$row++) { $y = rand(0,$imageHeight); imagesetpixel($im, $x, $y, $noisecolor); } } // Add Lines and Ellipses for ($x=0; $x<$imageLines;$x++) { imageline($im, rand(0, $imageWidth), rand(0, $imageHeight), rand(0, $imageWidth), rand(0, $imageHeight), $noisecolor); imageellipse($im, rand(0, $imageWidth), rand(0, $imageHeight), rand(0, $imageWidth), rand(0, $imageHeight), $noisecolor); } // Fill image with a random background image if available if (count($images) > 0) { $image = $images[rand(0,count($images)-1)]; _textimage_apply_background_image($im,$image); } //output to browser imagepng($im); imagedestroy($im); } /** * Returns a random string for use in a captcha */ function _textimage_code() { $consts='bcdgjxvmnprst'; $vowels='aeiou'; for ($x=0; $x < 6; $x++) { mt_srand ((double) microtime() * 1000000); $const[$x] = drupal_substr($consts,mt_rand(0,drupal_strlen($consts)-1),1); $vow[$x] = drupal_substr($vowels,mt_rand(0,drupal_strlen($vowels)-1),1); } $string = $const[0] . $vow[0] .$const[2] . $const[1] . $vow[1] . $const[3] . $vow[3] . $const[4]; $string = drupal_substr($string,0,rand(4,6)); //everytime we create a new code, we write it to session $_SESSION['captcha'] = drupal_strtolower($string); if(variable_get('textimage_use_only_upper',0)) $string = drupal_strtoupper($string); return $string; } /** * Returns an array of files with TTF extensions in the specified directory. */ function _textimage_font_list() { $fontdir = variable_get("textimage_fonts_path", ""); $filelist = array(); if (is_dir($fontdir) && $handle = opendir($fontdir)) { while ($file = readdir($handle)) { if (preg_match("/\.ttf$/i",$file) == 1) $filelist[] = $fontdir.'/'.$file; } closedir($handle); } return $filelist; } /** * Returns an array of files with jpg, png, and gif extensions in the specified directory. */ function _textimage_image_list() { $imagesdir = variable_get("textimage_images_path", ""); $filelist = array(); if (is_dir($imagesdir) && $handle = opendir($imagesdir)) { while ($file = readdir($handle)) { if (preg_match("/\.gif|\.png|\.jpg$/i",$file) == 1) $filelist[] = $imagesdir.'/'.$file; } closedir($handle); } return $filelist; } /** * Overlays an image to the supplied image resource */ function _textimage_apply_background_image (&$imageResource,$imageFile) { $backgroundResource = image_gd_open($imageFile,substr($imageFile,-3)); // Copy the text onto the background $backX = imagesx($backgroundResource); $backY = imagesy($backgroundResource); $textX = imagesx($imageResource); $textY = imagesy($imageResource); $randomBackX = rand(0,$backX-$textX); $randomBackY = rand(0,$backY-$textY); // Place the text onto a random location of the background image imagecopyresampled($backgroundResource,$imageResource,$randomBackX,$randomBackY,0,0,$textX,$textY,$textX,$textY); // Crop the background image to the original image size imagecopyresampled($imageResource,$backgroundResource,0,0,$randomBackX,$randomBackY,$textX,$textY,$textX,$textY); } /** * Creates transparent image resources for images with graphic backgrounds */ function _textimage_create_transparent_image($x, $y) { $i = imagecreatetruecolor($x, $y); $b = imagecreatefromstring(base64_decode(_text_image_blankpng())); imagealphablending($i, false); imagesavealpha($i, true); imagecopyresized($i, $b ,0 ,0 ,0 ,0 ,$x, $y, imagesx($b), imagesy($b)); return $i; } function _text_image_blankpng() { $c = "iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29m"; $c .= "dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAADqSURBVHjaYvz//z/DYAYAAcTEMMgBQAANegcCBNCg"; $c .= "dyBAAA16BwIE0KB3IEAADXoHAgTQoHcgQAANegcCBNCgdyBAAA16BwIE0KB3IEAADXoHAgTQoHcgQAAN"; $c .= "egcCBNCgdyBAAA16BwIE0KB3IEAADXoHAgTQoHcgQAANegcCBNCgdyBAAA16BwIE0KB3IEAADXoHAgTQ"; $c .= "oHcgQAANegcCBNCgdyBAAA16BwIE0KB3IEAADXoHAgTQoHcgQAANegcCBNCgdyBAAA16BwIE0KB3IEAA"; $c .= "DXoHAgTQoHcgQAANegcCBNCgdyBAgAEAMpcDTTQWJVEAAAAASUVORK5CYII="; return $c; } ?> blogs | oellermann.com

blogs

  • : preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/oellermann/includes/unicode.inc on line 291.
  • : preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/oellermann/includes/unicode.inc on line 291.
  • : preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/oellermann/includes/unicode.inc on line 291.
  • : preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/oellermann/includes/unicode.inc on line 291.

2009 what a year!

|

Well the year started out with fantastic news, I was pregnant. Baby due toward the end of September.  Adam decided that he wanted to start full time theology studies which would also start toward the end of September. As a result we took the decision to move off the farm and move to a smaller house (hence smaller mortgage). Of course it was the worst time to sell the property, in the middle of the recession and the estate agent said it would not sell for at least a year!

God was incredibly good and provided a buyer for the property within 3 months of us putting it on the market. It was so sad to say goodbye to North Ballaird. We had had 3 fantastic years there and it had really been our dream. However our dream is not God's dream for us and we are finding great joy in serving Him no matter the sacrifice. 

The move was horrific. Never move when you are 8 months pregnant. I am so suprised that the baby went to term. I was doing really stupid things like lifting heavy boxes, climbing up ladders and working through the night just to get us all packed, moved and settled. Adam was just as busy, No busier, and on top of everything on our main moving weekend he got the flu of all flu's, I thought I would be husbandless by the end of the weekend.  Again God showed his faithfulness in that we were moved and settled a month before the baby arrived. 

We bought our new house in a small village half an hour from the farm in February. It needed lots of work and we spent a fair amount of time trying to get it all ready  before we moved. We managed to get the bedrooms sorted and the lounge, but there is still a fair amount to do in the entrance hall and dinning room. The work on the house was interupted  by the arrival of Daniel Adam Oellermann. Our little boy arrived 5 days early. We had to stop on the way to the hospital to get diesel but thats another story. 

Daniel is a very good little boy and at 11 weeks has sleep through the night for the last two nights. Not sure if this is a trend which will continue but I am enjoying it while it lasts. 

Well it is Christmas in less than 20 days and we still have all the preparations to organise but I am looking forward to celebration the birth of the Lord Jesus Christ  and looking back over a year where we can seeHis hand so obviously at work in our lives.


New Houses and All That

| | |

It's been a long while since I've blogged, but I have an excellent excuse. Michelle and I have moved house! North Ballaird was our dream home, the little smallholding in the country, but God has been calling us on to greater things. This includes me going back to University to study full-time to become a pastor. We are both very excited about this new phase in our lives, and selling North Ballaird was an enabling step which reduced the size of our budget considerably. We bought a three-bedroom semi detached in Dailly, a lovely little place with decent-sized rooms and high ceilings (built in the 40s) but in a terrible state. We have been sanding and skimming and painting and flooring and everthying else that might be needed to sort out a house, and ultimately have got it mostly done. We still need to  do the entrance, staircase and dining-room... and unfortunately we weren't able to get finished before we moved, so the dining-room furniture is packed into the lounge, and enormous piles of boxes are packed into the dining-room! Having moved from the farm, we have large quantities of generators, power tools, timber and other useful stuff from the outbuildings - and really nowhere to put it (the new place has no garage). So we've piled it in the dining room.

 But here's the plan: this morning I finished spraying the roof timbers with boron (to kill off the light woodworm infestation the surveyor picked up before it gets out of hand). This was an appalling job, and ended up taking about 10-12 hours to do (more if you include clearing the old fibreglass insulation, which was even worse) - thankfully there was only about an hour and a half left to do today. It's done properly, and the woodworms won't think much of the accommodation now. Next is to insulate at the roofline with spray-foam insulation; this will prevent the loft from getting damp, further cramping the style of the woodworm. I also have to strengthen the ceiling joists so that we can put loftboards down and shift all the dining-room piles into their long-term storage in the loft. While I'm up there I'll put some lights into the loft, and PIR-activated security spotlights for the front and back of the house. 

That will put us in a position to fix up the walls in the dining room, paint, lay laminate flooring, move the furniture in from the living room. That will give us room to breathe, but we'll still be against the clock to get the last bits done - as our baby is due on 24 September, and I'm starting at Scottish Baptist College on the 21st!

Exciting, frenetic times - but we know that God will see us through them!


This is what we get for pushing God out of our lives.

The following was written by Ben Stein and recited by him on CBS Sunday
Morning

Commentary.

My confession:

I am a Jew, and every single one of my ancestors was Jewish. And it does
not bother me even a little bit when people call those beautiful lit up,
bejeweled trees, Christmas trees.. I don't feel threatened. I don't feel
discriminated against. That's what they are: Christmas trees.

It doesn't bother me a bit when people say, 'Merry Christmas' to me. I
don't think they are slighting me or getting ready to put me in a ghetto.
In fact, I kind of like it It shows that we are all brothers and sisters
celebrati ng this happy time of year. It doesn't bother me at all that there
is a manger scene on display at a key intersection near my beach house in
Malibu . If people want a cr?che, it's just as fine with me as is the
Menorah a few hundred yards away.

I don't like getting pushed around for being a Jew, and I don't think
Christians like getting pushed around for being Christians. I think people
who believe in God are sick and tired of getting pushed around, period. I
have no idea where the concept came from that America is an explicitly
atheist country. I can't find it in the Constitution and I don't like it
being shoved down my throat.

Or maybe I can put it another way: where did the idea come from that we
should worship celebrities and we aren't allowed to worship God as we
understand Him? I guess that's a sign that I'm getting old, too. But
there are a lot of us who are wondering where these celebrities came from
and where the America we knew went to.

In light of the many jokes we send to one another for a laugh, this is a
little different: This is not intended to be a joke; it's not funny, it's
intended to get you thinking.

Billy Graham's daughter was interviewed on the Early Show and Jane Clayson
asked her 'How could God let something like this happen?' (regarding
Katrina) Anne Graham gave an extremely profound and insightful response.
She said, 'I believe God is deeply saddened by this, just as we are, but for
years we've been telling God to get out of our schools, to get out of our
government and to get out of our lives. And being the gentleman He is, I
believe He has calmly backed out. How can we expect God to give us His
blessing and His protection if we demand He leave us alone?'

In light of recent events... terrorists attack, school shootings, etc. I
think it started when Madeleine Murray O'Hare (she was murdered, her body
found a few years ago) complained she didn't want prayer in our schools, and
we said OK. Then someone said you better not read the Bible in school. The
Bible says thou shalt not kill, thou shalt not steal, and love your neighbor
as yourself. And we said OK.

Then Dr. Benjamin Spock said we shouldn't spank our children when they
misbehave because their little personalities would be warped and we might
damage their self-esteem (Dr Spock's son committed suicide). We said an
expert should know what he's talking about. And we said OK.

Now we're asking ourselves why our children have no conscience, why they
don't know right from wrong, and why it doesn't bother them to kill
strangers, their classmates, and themselves.

Probably, if we think about it long and hard enough, we can figure it out.
I think it has a great deal to do with 'WE REAP WHAT WE SOW.'

Funny how simple it is for people to trash God and then wonder why the
world's going to hell Funny how we believe what the newspapers say, but
question what the Bible says. Funny how you can send 'jokes' through e-mail
and they spread like wildfire but when you start sending messages regarding
the Lord, people think twice about sharing. Funny how lewd, crude, vulgar
and obscene articles pass freely through cyberspace, but public discussion
of God is suppressed in the school and workplace.

Are you laughing yet?

Funny how when you forward this message, you will not send it to many on

your address list because you're not sure what they believe, or what they

will think of you for sending it.

Funny how we can be more worried about what other people think of us than
what God thinks of us.

Pass it on if you think it has merit. If not then just discard it... no one
will know you did. But, if you discard this thought process, don't sit back
and complain about what bad shape the world is in.

My Best Regards, Honestly and respectfully,

Ben Stein


Spray-Foam Insulation

| | |

We have a static caravan on the little farm which we converted to use as our home office. This is great from a space point of view - our little wee house remains (relatively) uncluttered, and we get to have decent working space when working from home. Unfortunately, the old static caravan does not cope at all well with cold weather. It's about 10m x 4m, and the floor is a thin piece of chipboard - with the result that you can have a 2KW heater running full blast, with temperature in the mid 20Cs at ceiling level - but only marginally above freezing at floor level. This is not good for productivity in winter.

Consequently we spent some time thinking about insulation. The greatest weak point is the lack of thermal isolation at the floor, so that's what we decided to tackle first. I didn't like the idea of cutting pieces of isomil to fit - it seemed like an insensibly-large job. I didn't think fibreglass matting would handle being fitted to the underside of the van (too much water) and there isn't really clearance to raise the floor. We finally settled on a closed-cell polyurethane spray foam, which is available in a DIY kit . I finally got around to applying it this weekend. Donning a disposable paper boilersuit and a vapour filter mask, I felt I looked like an extra from a B-grade NBC disaster movie. Michelle took the obligatory silly photos, which I'll post here one of these days for giggles, and I set about it. I should point out that the spray foam kit includes to canisters containing some fairly nasty stuff which, when mixed, is fluffy, gets everywhere, is sticky, and sets hard really quickly. It is extremely hard to clean up - soap and water, spirits and petrol do nothing to shift it - the brochure says that once set it can only be removed using "mechanical means". In my case this involved a painful application of potscourer to hands. The paper boiler suit with silly hood is ABSOLUTELY indispensable, don't use this stuff without it. Lying on your back in 2ft of clearance under the caravan, rolling in gravel and nettles, is unpleasant enought on its own - getting the gravel irreversibly glued to you in the process is just delightful. The vapours produced are also quite an irritant - while the vapour filter initially seemed like overkill, I certainly recommend it. Stupidly I didn't where gloves - a pair of disposable latex gloves would have saved me a great deal of trouble.

In spite of all that, the foam is amazing stuff - you spray on a skinny layer of mousse, and it quickly expands to a few inches thick. Within a few minutes it's set hard, and can be cut with a saw. It's really easy to spray into awkward corners, where it will expand to provide good coverage. It's pretty much totally waterproof, and is one of the most effective commercially-available forms of insulation. The old van is already maintaining temperatures well above ambient with just the server and UPS running. I'm not sure if that will be enough - we may need to do the roof, and possibly the walls (they do a version which expands more slowly, suitable for injection into wall cavities), and maybe double-glazing - but just doing the floor has made a significant different already, to the point where the oil-filled radiator will hopefully be able to cope, even if it isn't very efficient. Also, I've always wondered about the wisdom of having chipboard more-or-less exposed to the elements - now it's nicely sealed off. The van is clearly quite old; hopefully this will help it last a few more years!


Free Audio Theology Materials

| | |

As many of you will know, I regularly wander up and down the length of the British Isles for work reasons. In fact, I spend as much as 10-15 hours a week in the car. Audio books have been a real blessing to me, as I have been able to redeem the time listening to teaching from a wide range of authors, including people like John MacArthur, J.I. Packer, John Ortberg, Billy Graham, John Piper, Phillip Yancey, John Stott, Rick Warren and others, as well as the NIV and ESV bibles. I can tell you for sure that if you spend 10-15 hours a week listening to this sort of thing, any complacency and contentment you might have will be shattered. You will be challenged, and your notion of God's plan for your life will be considerably stretched. Mostly I have obtained my books from http://www.audible.co.uk , which has good pricing but really obtrusive DRM (Digital Restrictions Management), meaning that it becomes hard work to listen to the audio in your car.

Biblical Training I recently came across Christian Audio,  which is much like Audible, only focussing exclusively on Christian books. Christian Audio have a pretty good repertoire, as well as a goodly collection of free stuff - mostly older titles or lecture content, with some really good stuff in there. This led me to wonder if I couldn't get hold of seminary-style stuff to listen to, which would continue to bless my time in the car but would also help me to prepare for the upcoming semester at HTC? Following this line of thinking on Google led me to BiblicalTraining.org, an amazing resource founded by Dr Bill Mounce, New Testament Chair for the ESV Bible, and author of the Greek textbooks I'll be using next semester (as well as a host of other titles). Solid guy, it would seem. Anyway, the Biblical Training site is loaded to the gunwales with theology material of all kinds - stuff for new believers, foundation-level stuff and advanced seminary level/leadership materials. It's an impressive collection, must be thousands of hours of edited audio in there, and - wait for it - it's all free and has no DRM. I have already benefited from Dr Craig Blomberg's NT Introduction and Dr Mounce's own Biblical Training Institute, and am keenly looking forward to working through more of the materials. Heartily and enthusiastically recommended!

While Biblical Training is fast becoming my first port of call, I like to mix things up a bit and have also found a number of other sites providing free MP3s. The following are all well worth a visit:

While I have already spotted some theological disagreements with Covenant and Third Millennium (I am Reformed but most definitely not Paedobaptist!), for the most part they also seem to have some pretty solid stuff.

Last but not least, it's worth mentioning that Dr Wayne Grudem, author of a leading Systematic Theology, has also been conducting a series of lectures for lay people which are available online .

I am so impressed by all this - this is stuff that I (and many others) would have been glad to pay for, available for free. What a blessing to us as individuals, and to the Church corporately! Go and have a look, and a listen, and maybe check out the donation pages as well!


Application Framework Generator

| |

I have loads of ideas for implementation as LAMP applications. While I'm a pretty quick coder, it is quite disheartening (not to mention time consuming) to write basic database structures, data handling code, class wrappers for tables etc. The last three turns around I have almost decided to write a code generate to spit out the necessary. The idea is that you'd model your data structures in an XML file, and then you'd have some code which would generate the necessary MySQL code to create the database, as well as generating the necessary PHP classes to deal with the data - maybe even generate a rough-and-ready user interface.

Well, I've got fed up with wasting time writing boring code. Code generators can be a wee bit tricksy, of course, but I reckon the productivity gains will justify the time investment - especially as I have a number of cool applications which I want to implement at the moment! I've started work on it, and plan to complete it in the following stages:

  1. Process model, validate. Also generate MySQL code to create the database. (DONE - it was a bank holiday weekend)
  2. Generate PHP classes to handle the data model. Produce a decent front-end for the code generator. Document the model format and use of the system.
  3. Generate some UI bits as well - forms, grids and so forth.
  4. Iterate a model - given previous model and new model, generate ALTER TABLE statements for MySQL, or else data migration scripts or something.

Once it's further along (no earlier than after completion of step 2) and a bit more robust, I may open-source it. There seem to be a few similar ideas floating about out there, but none really suited the way I want to work, so maybe others could benefit from my work...


Theology Exams - Results

| |

I have received my results for the exams I wrote - "Jesus and the Gospels" and "Former Prophets". I did much better than I had any reason to expect, and am really fired up to put much more into the coming semester. This semester I've signed up for "Pentateuch", "Introduction to the New Testament" and "Early Church History". I've enrolled for three modules this time because:

  • Based on real experience from last semester, I believe that if I work diligently through the term I can manage the workload
  • Because I started with my HTC studies in the second semester, if I do an odd number of courses in the first semester this year and next, and an even number of courses in the second semester, I'll get to a position equivalent to if I had started in the first semester, avoiding 1st/2nd semester prerequisite issues later on (of course I could achieve this by signing up for four courses this semester, but I think that may be over-the-top workload-wise!)
  • I'm pretty much determined now to do the whole BA (Theology) degree (my original plan was just to do the first year); at a rate of two modules per semester, this will take 6 years...if I can demonstrate that I am able to sustain a bigger workload, I might be able to knock a year or two off that

I have received all the textbooks and am raring to go!


Newest addition to the Family

Well I've done it. I have finally twisted Adams arm into extending the family. She is a brindle 8 week old staffie who has bundles of energy (and the teeth are enough to scare Jaws!).

I would like to welcome Sheba Oellermann into the family. Elijah loves his little sister and the cats will come round to the addition to the family. Her name had to to justice to her breeding. We wanted it to be regal enough for any princess so we thought Sheba (as in the Queen of Sheba from Solomon's court would do). Notice to the biblical inspiration to match with Elijah and Josiah. Unfortunately as the Server is down at the moment I cant attached a photograph of her but I will do so as soon as possible.

She is a great talker and it sounds like she is being horribly tor tortured by Eliajh when they play together, but he is as good as gold with her and very gentle.

Well thats all for now will update again shortly if the house is still standing!

 

 


Theology Exams

| | | |

I don't think I've mentioned this here before, but about six months ago I signed up for a BA Theology (part-time, by correspondence) with the Highland Theological College. I have a twofold purpose: to improve my own knowledge on matters theological, thus (hopefully) bolstering my Christian faith and knowledge of Christ, and also to put myself in a position of being more useful to our local church. The degree is four years full-time; after completing the eight modules of the first year, you have the option of taking a Certificate of Higher Education (which is a sufficient qualification for Readership in the Church of Scotland).

Anyway, I signed up for the modules "Former Prophets" and "Jesus and the Gospels". Full-time course load is four modules per semester; the modules are supposed to require a total effort of 150 hours each. Of course, I've been busy this last six months (what else is new?) and so haven't been putting in the hours that I should have. This has led to an absolutely intense exam-prep time, with some very long days/short nights. I managed to do enough that I think I'll make it through the exams, but probably not do as well as I would have liked. It was also a rather painful and stressful process, so I am determined to be a better student next semester and spread the effort over the semester - which should relieve me of a great deal of stress, and hopefully allow me to get better results (as well as internalising the new knowledge more completely)!

Anyway, in spite of the super-intense, stressful time that I had in preparing, it was made joyful by the subject matter. Both modules have been very rewarding, and I heartily recommend the HTC to anyone looking to take their Christianity to the next level. The staff are great people, evangelical and reformed in their doctrine, and combine sound academic rigour with a genuine passion for equipping people for ministry. It's good to be studying with them.


FIMS 0.1 Released, Online

| | |

The first release of the Free Internet Morabaraba Server (FIMS) has been completed. You can connect to the server by using:

telnet fims.morabaraba.org 5000 

Details on how to use it, as well as the source code, are available from the FIMS web site.

My next priority is to get a graphical client working for Windows and Linux, after which I can start making improvements to the server.


Syndicate content