This is not a blog, nor is it a journal. It appears that you have stumbled upon a paradoxical anomoly.
If you choose to leave, turn to page 26.
If you choose to continue, turn to page 111.
Sunday, July 26, 2009
Has It Been That Long?
Has it really been March since I last posted? Man, this has been a busy spring and summer! I don't actually have time to post right now as there is a break in the clouds and I need to get back to stripping paint off of my garage doors, but I'll post soon. And hey, this counts as a post as well.
Monday, March 23, 2009
Testing SyntaxHighlight 2.0
This is a test of my new syntax highlighter.
This should be Python:
This should be some Java code:
And finally XML:
That is all.
This should be Python:
class A(object):
pass
def a_func(arg):
return A()
This should be some Java code:
/**
* A doc string
*/
public static Object aMethod(int arg) {
Object a = new Object();
return a;
}
And finally XML:
<element attribute="value">
<nested attribute="value">
</nested>
</element>
That is all.
Tuesday, March 17, 2009
Update
Just a quick update since I have not posted in so long. What have I been up to?
Well, I am currently on my second week this year of unpaid leave that my company has forced us to take. I'm not sure how I feel about that. I guess it is better than losing my job, but I would obviously rather be working and making money. This week is March Break here for the kids, so between keeping them busy and pet-sitting my brother's golden retriever Charlie while they are in Florida, I haven't really accomplished anything yet. It is only Tuesday, so I guess there is still hope.
Things I want to personally accomplish this week include:
Other things on the TODO list:
I figure if I at least solve the last item, that *should* take care of the second-last one, and perhaps the rest will come naturally. For now, I'm off to make some juicy burgers for dinner. We have to enjoy this beautiful, 14 degree weather while we have it!
Well, I am currently on my second week this year of unpaid leave that my company has forced us to take. I'm not sure how I feel about that. I guess it is better than losing my job, but I would obviously rather be working and making money. This week is March Break here for the kids, so between keeping them busy and pet-sitting my brother's golden retriever Charlie while they are in Florida, I haven't really accomplished anything yet. It is only Tuesday, so I guess there is still hope.
Things I want to personally accomplish this week include:
- Getting some work done on the next batch of guitar amps that Todd and I are designing.
- Play around with and learn JavaScript.
Other things on the TODO list:
- Become a rock star.
- Solve the world's energy problems.
- Come up with a unified theory of everything.
I figure if I at least solve the last item, that *should* take care of the second-last one, and perhaps the rest will come naturally. For now, I'm off to make some juicy burgers for dinner. We have to enjoy this beautiful, 14 degree weather while we have it!
Sunday, January 25, 2009
Clean Power
As part of my guitar effects house-cleaning I thought I would build a real 9VDC power supply rather than the mish-mash of batteries and hacked up wall wart that I use now. I also wanted to learn Eagle as it is always touted as the best, free CAD package out there for hobby electronics. I decided to start with this circuit for an adjustable power supply from Tonepad. Tonepad is great, but I think a lot of their layouts aren't the greatest since they don't try to minimize the amount of copper you must etch off of the copper-clad board. As a result, etching takes longer and you end up using more ferric chloride. This isn't really a concern, but I figured I could come up with an more optimal layout, and basically used this as an excuse to learn Eagle. I've never actually designed a single layer PCB before (my previous designs have been double-layer boards, ordered online from ExpressPCB), and never realized how difficult it was to route things given the single-layer design constraint. As a result, it took me much longer than I expected. I ended up with this layout:

I think it turned out alright, and I learned a lot in the process. Eagle is definitely much harder to use than ExpressPCB, but it has quite a bit more functionality (most of which I don't know how to use).
I also decided to experiment with Sharon's scrapbooking machine while I was at it. Instead of trying the usual toner-transfer method of etching the PCB, I thought I would try cutting the mask out of vinyl and etching the board that way. I loaded up her Klic-n-Kut, and cut out the layout which I had exported from Eagle.

I then applied the mask to the copper clad board. If you look really close you will see that the mask produced by Sharon's machine actually isn't all that great. I am on the very edge of the capability of her machine in terms of size. Basically, the size of the pattern I am trying to cut is so small, the machine can't produce it (the knife works by pivoting around a slightly off-center pivot point, which is about the size of one of the corners in my layout). There may be various ways around this, but I may just end up going back to the toner-transfer method for future layouts.

After about 15 minutes in ferric chloride, I had a PCB for my power supply.

All that was left was to drill the PCB and mount the components. After a bit of smoke (I soldered in one of the diodes backwards...oops!), the result was a working 9VDC power supply for my future guitar effects projects.


I think it turned out alright, and I learned a lot in the process. Eagle is definitely much harder to use than ExpressPCB, but it has quite a bit more functionality (most of which I don't know how to use).
I also decided to experiment with Sharon's scrapbooking machine while I was at it. Instead of trying the usual toner-transfer method of etching the PCB, I thought I would try cutting the mask out of vinyl and etching the board that way. I loaded up her Klic-n-Kut, and cut out the layout which I had exported from Eagle.

I then applied the mask to the copper clad board. If you look really close you will see that the mask produced by Sharon's machine actually isn't all that great. I am on the very edge of the capability of her machine in terms of size. Basically, the size of the pattern I am trying to cut is so small, the machine can't produce it (the knife works by pivoting around a slightly off-center pivot point, which is about the size of one of the corners in my layout). There may be various ways around this, but I may just end up going back to the toner-transfer method for future layouts.

After about 15 minutes in ferric chloride, I had a PCB for my power supply.

All that was left was to drill the PCB and mount the components. After a bit of smoke (I soldered in one of the diodes backwards...oops!), the result was a working 9VDC power supply for my future guitar effects projects.

![]() |
From Effects Pedals |
Lots of Snow!
We got an email from Michelle the other day saying it was snowing in Scotland. That's nothing compared to the mass of white stuff we've received over the past week or so. Check out these pictures I took a week ago!

This was as the snow was still falling, and we got quite a bit more overnight. We had a bit of a warm spell during the week and a bunch of snow melted, but we still have a good amount lying around. To be honest I'm pretty sick of winter right now and can't wait for spring to arrive!

![]() |
From Winter 2009 |
This was as the snow was still falling, and we got quite a bit more overnight. We had a bit of a warm spell during the week and a bunch of snow melted, but we still have a good amount lying around. To be honest I'm pretty sick of winter right now and can't wait for spring to arrive!
Thursday, January 15, 2009
Validating Archive Contents With Ant
Have you ever wanted a quick way of validating the contents of an archive as part of your Ant build? I'm sure there are many ways to accomplish this, the most straightforward being to inflate it to a temporary directory, but yesterday I crafted up this little nugget to validate an archive in-place and it seems to work great. And the best part is there's no messy cleanup needed afterwards!
Note: I believe a minimum version of Ant 1.7 is required for the resources stuff to work.
<!-- Compute the difference of the actual JAR and the expected zip entries -->
<resources id="artifact.set.discrepancies">
<difference>
<!-- Create a resource set from the actual archive -->
<zipfileset src="${path.to}/some_archive.jar" includes="**/*" />
<!-- Create a resource set of expected items -->
<resources>
<zipentry archive="${path.to}/some_archive.jar" name="afile.ext"/>
<zipentry archive="${path.to}/some_archive.jar" name="anotherfile.ext"/>
<zipentry archive="${path.to}/some_archive.jar" name="a/path/to/afile.ext"/>
<zipentry archive="${path.to}/some_archive.jar" name="some/other/path/to/afile.ext"/>
<zipentry archive="${path.to}/some_archive.jar" name="META-INF/MANIFEST.MF"/>
</resources>
</difference>
</resources>
<pathconvert property="set.difference" refid="artifact.set.discrepancies" />
<condition property="artifacts.verified">
<resourcecount count="0" when="eq" refid="artifact.set.discrepancies" />
</condition>
<!-- Fail if any differences are found -->
<fail unless="artifacts.verified"
message="The following artifacts were not expected: ${set.difference}" />
Note: I believe a minimum version of Ant 1.7 is required for the resources stuff to work.
Subscribe to:
Posts (Atom)