Inside Outside …

Every now and then something weird happens that you just have to take a picture of otherwise people wouldn’t believe you.

I’m one of the lucky ones whose wife make him lunch :) .  Sometimes it’s ham, other times it’s leftovers. This time she was making egg salad. She needed to prepare some eggs so she set a bunch within a pot to boil. When she returned to check on them, … well the pictures should explain it:

The first camera shot of the egg.

A closer shot of the Inside out egg.

Happy Humbuggery

Humbug… it’s been 2 years now. This being my third year as a humbugger. I don’t think I’ll return to Christmas as I had it previously. I think people understand that I will not return the favour and give them a gift if they get me one. The past 2 Christmas’ have been fairly stress free. I have to admit, I rather enjoy it.

I wrote a post about 2 years ago as to why I became a scrooge / grinch. Not much has changed. Although I’m less offended when people spread Christmas Cheer. I mentioned before that I would hold my tongue, well now I shrug it aside like they just insulted my lawn… It’s my lawn, I couldn’t care less. In fact, I feel a little pity for them:

  • having to stand in lines buying gifts that are
  • often likely to get the response of  “Oh…. thanks…. it’s .. great.”
  • stressing out when they are not sure what to get someone, but the they have to get the other(s) something
  • because they know the other(s) got them something and feel they have to return the favour.
  • as a few have to endure the last minute shopping because they waited until today (Christmas Eve) to shop.
  • as a few of them are getting the latest in popular items that have caused wide spread chaos as parents fight to the death to get a $20 gift that the kid will have forget about in 2 months.

I do not miss that at all.

The only thing I’m a little peeved about still is how Christmas is viewed by Christians and non-Christians. Christians are upset that Jesus is being removed from anything related to Christmas and the non-Christians are upset that Jesus is still in Christmas. Granted there is a group that doesn’t care either way, but this is not about them. I get annoyed when I see Christians putting up a fight or protesting to have Jesus returned to Christmas. If someone wants to celebrate with Santa Claus, let them. It’s not our place to impose Jesus on anyone. In fact, it’s quite the opposite. As ambassadors, we are to abide by the rules of the foreign country we live in and at the same time, live as an example (and a good one at that) of who we really are. Throwing a hissy fit  because Santa is more popular than Jesus just shows you’re not being a good enough example of Jesus in the first place…. and the hissy fit adds to that.

Either I’m numbed by what goes on now, or things are not as bad as they used to be. Not with the whole X-mas fiasco. If things are not as bad now, then that’s a good thing. It’s just something I’ve seen before and I haven’t vented about for a while, even if that whole thing is now stale.

Anyway… if the traditional gift giving is for anyone, it’s children. I’m still on the fence as to how I want my children to experience Christmas. However, anyone who tries to make that decision for me can stuff it.

Override-able callback functions

So I ran into another issue the other day. I needed to create a function that could be overwritten, then have any reference to the original point to the new one… without redoing everything again… For example:

funk = function() { alert('original'); }

caller = funk;

funk = function() { alert('new'); }

// this will alert 'original'... Not 'new';
caller();

But what if I want to be able to override functions and have those such as “caller” mentioned above, to point to the new function. Such an example would be where the function could be overridden based on what modules are loaded and what are not. But the original function will always be referenced. There is a solution though. It takes a little bit more plus my code below. But it is possible now.

By using funcStorage.js, you can use this code for appending functions, or referencing functions by name instead of their location in memory. Essentially you can run the caller() function and have it execute whatever happens to be associated with that at the time, not what it was when it was originally assigned.

Lets attempt something that’s not just pseudo code. Our issue is we want to reload a custom made file directory. The easiest way is to do a window.location.reload(); call. Lets set that as our reloadFileList() = function() { window.location.reload(); }. But we want to use a fancy AJAX solution. In this case we want to just override the function as the AJAX solution is much better. We can’t just go reloadFileList = ajaxReload; because any function that already references reloadFileList will point to the original window.reload one.

Now let me be clear here:

// I do not mean this.
element.onclick = function() { reloadFileList(); }

// I DO mean this!
element.onclick = reloadFileList;

So the only way before was to go back to all the previous references used for reloadFileList and reassign it the new function. But now with the code I posted, you can do the following.

// You can specify what function the onclick uses
// before it's even created.
element.onclick = funcStorage.call('reloadFileList');

funcStorage.create('reloadFileList', function() { window.location.reload(); });

// Later on, or in another file...
funcStorage.create('reloadFileList', function() {
   fileList = getFileList_viaAJAX('url/here');
   for( k in fileList) {
      // perform actions
   }
});

So without redefining the element.onclick, it now uses the new Ajax style instead of the window.reload.

For me, the primary reason is for letting the site function even if the file didn’t download properly, I had a bug in one of my js files, or the user aborted while it was getting another file. I would like the site to still work, even if not completely as intended… essentially graceful degradation or a fault-tolerant system.

There’s more than just this, the class also allows for extending functions instead of just overriding them. If you use the extend method instead of the create, whatever is already defined as the function you want, it will get appended with the section argument.

// You don't need to initialize anything.
// Any call, create, or extend will create the necessary
// elements before they are used.
funcStorage.extend('reloadFileList', function() { // ajax style reload });

// now lets put tooltips with thumbnails on the various files...
funcStorage.extend('reloadFileList', function() {
   // the down side is you have to treat each extension as if
   // it's its own environment and doesn't have access to the variables
   // from the previous extensions.
   $(elements).each( function() {
      // assign a tooltip with picture inside.
   });
});

This will then run both functions sequentially. After doing the Ajax call, it will do the tooltip generation.

Hopefully someone else finds this useful.

Again, it’s: funcStorage.js

Before and After

Being a soon-to-be father is a little different than being a mother. Not that I’ve experienced both, but at least for me, it’s still a little surreal. But now that the baby is moving more, and significantly, it is beginning to feel a little more real.

It’s funny in a non funny kind of way. I once thought of posting an entry of how my dreams are starting to fade away. Things that might have been attainable several years ago, are no longer because of time or responsibilities. While at the time, I was saddened to see them leave, they fade in comparison to my apprehension to my being a parent now (soon). The complications our child is going through and what my wife has to endure, all I’m concerned about now, is her well-being. It’s tough feeling so helpless when you’d give anything to help out.


Now that Medea is born, the complications continue. She’s been through a lot but it might be a month at least before everything is normal. It’s frustrating to say the least. We want her home. We want her to feed like a normal baby. But despite all that’s gone on, we’ve been rather calm throughout the whole ordeal.

We had plenty to be worried about. Major surgery on a newborn’s neck. It affected the jugular vein. It could have been stressful for us, but we felt at peace. Knowing the chain of events from when Pam was found to be pregnant, to the surgery, it gave us peace and confidence that this wouldn’t be the end.

Events of late wouldn’t worry us now.

Just test and build our patience.

The Frequent, The Fun, The Frustrating

Fx3. I think I’m writing in my blog more. Before it was a once a year, almost, kind of thing. I just have more to ponder lately (frequent). I recently read an article talking about the memorable moments from video games. I have a bunch too. I plan to post them here, sometime in the near future. I’ve written up a few drafts so I won’t forget (fun). But that is definitely on hold until what has been happening lately blows over (frustrating). I’ll elaborate more as I can figure out where I stand in this all. It’s like a dust cloud and I’m unsure of everything around me but if I’m only to stand my ground that I’ll emerge victorious…. or sandblasted or buried. A brief glimpse of what is frustrating as of late is the current state of our unborn child; there are complications.

Sexy isn’t effective, in war.

armor_disparity

From a pure combat point of view, this doesn’t make sense… Yes i know, sex sells. But if giving women fully clothed armor keeps the kiddies away, I’m all for it. But that’s not the focus of why I posted.

Exceptions? When a game takes place in an age where there is little armor coverage such as Conan. I have no idea about the game, but at least Arnold sported only a rag about his twig and berries. It would be believable then that a women in armor would be dressed similarly.

But mainly, if as a male, I am dressed in heavy armor and you can’t even see my face let alone any skin, then why would a female have heavy Boots, a heavy armor thong and bikini, and gloves? … more importantly, offer the same protection rating as the full on heavy armor guy?

Again, the sex sells thing?… it’s not a good enough excuse. Not as long as the rational part of my brain exists. And since I gave WoW up a long time ago, I still have a rational brain cell somewhere.

Hermes Retires

Today I mourn the loss of Hermes, also known as “MyGuarded.name,” as it has been retired. The maintenance and time required to keep it working and move it around has gotten to me. I can’t keep it up any longer. There are just too many things I want to accomplish and maintaining an aging email system isn’t one of them.

History: I set it up, primarily, because I was getting too much spam and the one good anti-spam provider was inconsistently online. I then spent a good 1 month recreating the type of service I got there, but with much more reliability. I called it “Hermes” after the Greek god. “Messenger of the gods” seemed quite appropriate for this email system. Anyway, there were issues here and there, nothing I couldn’t fix. It has served me well and while I did still get a lot of spam, all of it went to the junk folder and not once did i get a piece of spam in my inbox. It was very effective at what it did.

And then it came time to move Hermes.

Side story: For those who noticed, I haven’t posted in almost a year. That was partially because I tried moving my website over to another server for a while now. I just couldn’t get the mail thing sorted out and until I switched over and retired Hermes, I was hesitant (or maybe it was procrastination) to post anything.

The setup was pretty specific and it started to become more than what it was worth to move it. I don’t have the time to maintain it anymore like I used to. I have about a gazillion ideas I want to get finished, many personal projects, spent time with friends and family… and well Hermes got the raw end of the deal. I figired it was time to hang up the gloves and convert to something with a little less maintenance.

It is time for a moment of silence on my part as I remember the times with Hermes. (Yes I’m aware it sounds like herpes.)