For those rare people who read this blog by actually going to it, you may have noticed that my profile image has changed. This is my new custom avatar from Scott Meyer, creator of the hilarious and quirky Basic Instructions web comic that I often share/star in my Reader feed.

I went for my frequent mountain man look ;)

Custom Avatar 1

Not much of a return to blogging,but I haven’t had anything to rant about lately :) Anyone have any ideas?

Lately I have thought it would be really nice if there was a way to actually confirm that identiy of someone and, more imporantantly, the organization they claim to be from.

The actual example that keeps coming up for me is when I see people outside of Rite Aid or Ralphs or whatever claiming to be from a charity that I have never even heard of. It’s literally a guy with a piece of paper and a box for money. Anyone who has seen Fred Claus or, I am ashamed to admit, True Beauty knows how easy is to just pretend to be from a charity. How am I to know that these people are legit?

Some of these folks don’t even attempt to look presentable or trustworthy (tying your shoes would be a good start).

It would be great if I could simply ask them for their Charity Chain of Trust documentation and be able to validate it up to the charity itself (and then on to the government, which actually grants tax-free non profit status).

I really don’t know how a system like this would actually work. Most likely it would have to be similar to how our money system works, whereby there are printed “watermarks” and security measures which are resasonably hard to fake for the average joe just trying to make a buck. Then I suppose there could be a website where you enter the hash printed on the certificate to confirm it’s authenticity. That would only work for relatively small values. Better yet it would need to be in the form of a barcode that could be “scanned” using a normal mobile phone camera.

The Salvation Army guys I tend to believe, because otherwise who would actually willingly put on the pseudo-military uniform :)

I absolutely love to hear about supposedly “unbreakable” DRM mechanisms being cracked (well, circumvented in this case).

http://it.slashdot.org/article.pl?sid=08/11/01/1728222&from=rss

To Content Producers: Most people pay for their content. Those who don’t pay, never will. You are not protecting anything or making any more money by implementing these insane schemes to stop being from copying. All this does is make engineers that much more persistent in figuring it out. For every great engineer at your company, there are 100 out in the wild who are going to crack you software. Again, I will happily pay for a BluRay disc, but I want to play it on the player of my choice (such as on a MythTV installation). But when you have your stupid restrictions, you have lost a sale.

So I am hoping that I can in fact get a MythTV box that can play Blu-Ray “out of the box” with a drive.

… but disappointed in my fellow Californians today.

Here are some random things about the JVM that you might (or least I didn’t) not know:

  • boolean is represented as a 4-byte integer internally and treated as such in all bytecode-level operations (method parameters can be specified as being booleans)
  • Often when a NullPointerException is thrown, the JVM actually has access to the method that was being called, but the NPE is generally thrown in the calling method, rather than the called method.
  • Reflection is really inherant to how the JVM is specified and operates; all methods are located by {class,method name,method parameters} dynamically
  • The JVM truly has no concept for the Java language; String and Object are for the most part the only classes treated specially
  • The JVM is stack-based rather than register-based

Some cool things about C# (.NET as a whole?):

  • C# has the notion of Properties, which let clients of your class access members “directly” while at the same time allowing for change to underlying implementation (as they are actually getter/setter methods)
  • C# allows for the notion of first-class methods, which it calls delegates. This lets you avoid defining a whole interface to get access to a single generic method.
  • C# has first-class support for firing events, which makes use of the delegates (not sure if it has to or not, I’m still learning this stuff)
  • C# requires you to use override prefix for a method if it is overriding a parent method, which makes it clear to readers of that class that this is in fact overriding something.

I learned these little tidbits while learning C# by writing a JVM in that language. I am fascinating by emulators and VMs because they are software that represents something that is well-defined (http://java.sun.com/docs/books/jvms/) . So in a sense the (naive) implementation is fairly straightforward, if tedious. (I also learned that you can actually write a non-trivial C# application by effectively writing Java and renaming it with .cs and doing a few basic replacements… or just about.)

This project would not have been at all possible without the GNU Classpath project, which has worked tirelessly to implement all of the standard Java classes as well as reference implementations the classes needed to tie to an actual Virtual Machine implementation. I have not gotten JNI to work yet, so for the time being I am implementing the native stuff directly in C# (which makes sense actually as that is my JVM implementation language and is sitting “below” the JVM).

Both Classpath and the official Sun jre implmentation (which is now open source as OpenJDK) provide real world implementations of that stuff you have not looked at since university (Hashtables, Linked Lists, etc) in a fairly readable format. And because they are real world, they offer glimpses into the optimizations and workarounds that have to be done to make these data structures work in the real world.

There is also a project called IKVM which is a very complete .NET-based implmentation of the JVM as well as the class libraries which allows for .NET applications to actually execute Java classes. I think it includes a combination of GNU Classpath and OpenJDK classes inluding managed .NET implementations of the native methods. If I continue this project (not terribly likely, I don’t call it “ToyVM” for nothing) I will probably migrate to using that so I can focus on the internals of the JVM itself. When I started I just wanted to get going and I had issues with the version of Visual Studio .NET that I had and then could not get GNU Classpath or OpenJDK to build or work in cygwin. I actually used MonoDevelop to do the C# development (so I wrote a JVM in C# using a Linux-based .NET implementation running on x86 VM on top of Windows XP).

A couple of nights ago, I finally got the “Hello, World!” application to work after about 2 months of development on and off, not sure what the actual man-hours was.

I used C#’s event handling/delegate set up to do gather some runtime statistics for the basic “Hello World!” application and apparently it loaded 142 classes before it finally did the output. Most of these were not used obviously, but are part of the environment that is statically loaded by key classes (like Charsets).

Next steps:

  • Make it look more like C# (Cxx languages tend to use GetBlah() rather than getBlah(), and C# supports Properties which I would like to make use of)
  • Implement Garbage Collection (pluggable perhaps). I am curious about the various methods that are used and which are better in various situations
  • Do some additional refactoring into additional namespaces
  • Optimize the most heavily used bytecodes if possible
  • See what breaks when I run things other than HelloWorld.class :) I am very much a just-in-time developer so I only got the stuff working that were absolutely required to get Hello World to work. 84 byte codes have been implemented (out of the 107 that were encountered, but some load xload,xstore,if,if_icmp get reused with different initialization parameters)
  • As mentioned before, look into integrating with the IKVM libraries so I can worry less about the native aspects of it

I have put the code into a local git repository, which is another tool that I have been wanting to play around with. I am happy to push that out somewhere, with the normal caveat that this is your typical homebrew code that is not as well commented as it should be (but is hopefully well structured enough for it to make sense).

Happy Coding.

Disclaimer: This post has nothing to do whatsoever with technology or programming.

On July 24th at 8:27pm the newest member of my family, Eisley Maya, was born. Naturally, she’s perfect :)

It is still early on, but on the first night home my getting no sleep was my own doing (constantly checking to ensure she was still breathing) as she was calmly sleeping.

She’s beautiful and I can’t wait to see what adventures she’ll bring me.

Me holding my beautiful baby

Me holding my beautiful baby

Baby Eisley chilling

Baby Eisley chilling

For those who care, I have more pictures on my Facebook page. Also, my wife has a web album up which can be reached via http://eisley.40two.org

Cheers all.

Update: Ok, immediately after this blog entry Eisley decided that she would actively keep us up all night.

Time for another installment of “don’t take my word for it” where I talk about random things I hear that I have subsquently looked up because I think they are complete nonesense. But as the title says, don’t take my word for it. For all you (or I) know, the sites I’m using as reference are also full of it.

Victim 1..

The numbers on the bottom of plastic containers tell you how safe they are for re-use.

Umm… no. They don’t. They are known as “resin ID“s and are really a notice for recyclers so they know what type of plastic is in use and what processing to perform to make it re-usable. In general you should not microwave plastic that is not explicitly marked as “microwave safe” but otherwise, re-use to your heart’s content. And seriously, use some common sense… is the FDA really going to allow for “single use, but then toxic” plastic containers for food?

Sucralose (packaged as Splenda) is made from chlorine and will kill you.

Again… no. I won’t be able to fully convince everyone, because there are a lot of sites out there that have done zero actual research and so will go on about how deadly this stuff is. Yes, it does have chlorine atoms in it (but hey, so does table salt). It is basically glucose where some of the hydrocarbons have been replaced by chlorine. The best information I found was on Wikipedia, as usual. From there you can link to whatever. The FDA has approved it, 2-year studies have been done (obviously that is not really long-term) and there truly is no evidence that the chlorine will break out and kill you (known as dechlorination). Your system simply does no break it down that way. Additionally, Splenda is actually 95% dextrose, with only a small amount of sucralose (as it is 600 times as sweet as sugar).

In the interest of those paranoid people out there, here are a couple of links featuring other opinions. Before you get all excited about that guy being an MD, check this and this out . Please ignore stuff that says “man-made chlorine”. Umm… chlorine is an atom not a compound.

That said… I have had amazing success getting rid of ants with it. So do what you will with that information. That also was a highly uncontrolled experiment and I am not convinced that the ants weren’t already on their way out of my house.

Just to reiterate, I try to use common sense and lots of Googling to prove that I am right. That does not mean that I am in fact correct, maybe there is an giant conspiracy to kill us with plastic and sweeteners. I’m pretty sure we are doing a perfectly good job with fast food and cigarettes.

I was watching some show on the History channel about Alchemy and how there was (still is) a lot of very serious search for the “sorcerer’s stone” (yes, the one made famous by the Harry Potter book) that would turn “base metals” into gold and provide for long lasting life.

It got me to thinking… how do we know that all these books we find weren’t just the new age quacks of the day? Go into a bookstore right now and I can pretty much guarantee that you will find plenty of books that describe how you can… make amazing amounts of money by doing no real work and live “forever” through some vague medicines or diets. The average person would not take these things seriously, yet we assume that “back then” this was all completely mainstream. I’m just not so sure.

There’s certainly the argument that today it is significantly easier to get a book published, but having money doesn’t mean that you’re sane. If anything, it’s often the nutters who have managed to mass enough money to publish whatever pops into their whacky brains.

Same goes for a lot of historical stuff that we take as being just how people thought back then. Who knows, perhaps the majority of Greeks and Romans though it was pretty ridiculous to think (as we do now) that there were a bunch of gods living up in the mountains who would come down in the guise of humans (and animals). Perhaps it was just the totally zealous ones who put mosaics and floor coverings and wrote poems on it.

It’s only the people with strong opinions that generally feel the need to talk about it.

I have been having this issue for over a year now, and have not been able to find a solution via Google nor through company IT (not for lack of trying on their part, it’s a whacky issue).

Very often (but it can also go for weeks) some of my keys will stop working on my Dell Latitude D610. It is generally the same keys, and will even occur in similar orders after reboot. The “favored” keys are: r,1,e,=,and ESC. Sometimes ‘o‘ and ‘y‘ won’t work. Even better, there are times when the ‘m’ key will actually output a ‘,’.

I need help!

It is very unlikely that it is either the keyboard or the actual laptop as we have tried:

  1. Using external keyboard (the exact same keys will not work)
  2. Replacing the laptop keyboard from another one
  3. Replacing the entire laptop itself (moving the hard drive to another)
  4. Running full system checks from IT department to check for viruses, corrupt files, etc (everything checks out)

So, to me, this would imply that it’s a driver problem in Windows. I have no attempted to replicate the issue in another Operating System. I don’t work in Linux enough (at all) on this machine to be able to sit around until it happens.

Most answers on the internet blame the keyboard, but based on the evidence I do not see that as being it at all.

I have recently downloaded a keyboard test application to see if anything is being detected when I hit the keys in question during one of these incidents.

Anyhow, hoping my few readers perhaps have an idea or have seen similar issues.

Update (4/22/2008): So a couple of days I had this issue again but I really wanted to be able to get logged in so I went through each of my keys to see what would happen. It definitely was like some bit was getting forced to be set or some wiring issue (and still I’m convinced that’s not it). For instance, the ‘m’ key was outputting a ‘c’ I think. I finally tracked down the ‘m’ key by hitting the RIGHT SHIFT key (not the left). I had downloaded a “keyboard test” program and when I ran that there weren’t any actual discrepancies (which is what I was hoping for):when I hit ‘m’, it output the same results for both the BIOS read and the Windows read.

In my random stumbling around the internet I think I’ve found the source of the Weekly World News “batboy” image. In the process I also found out that WWN apparently folded a bit ago.

bat boy?Bat boy!

(source of the boy image: http://www.richmond.ie/puzzle.html)

(source of the bat boy image: http://gerry-doyle.blogspot.com/2007/08/bat-boy-eats-tabloid-staff.html)

 Yes, it has been a while since I’ve written and it’s sad that this is my return…

What do ya think?

Next Page »