Homespun Effects

I have begun a YouTube channel called Homespun Effects. I will show my process of creating guitar effect pedals from schematic to finished product.

Check out the site and visit the YouTube channel.


The silent church

Every time I ask a question of my church friends that is deeper than “does God love me?” it’s as if the authorities called for radio silence.

I’ve never once got a reply to a religious question. Quite frankly, I’ve had it with baby church.


Test Trackback

I remember I was hammering on a fence in the backyard when my dad approached me. He was carrying a letter or something in his hand, and he looked worried. I continued to hammer as he came toward me.

“Son,” he said, “why are you hammering on that fence? It already has plenty of nails in it.”

“Oh, I’m not using nails,” I replied. “I’m just hammering.”
With that, I returned to my hammering. Dad asked me to stop hammering, as he had some news. I did stop hammering, but first I got a couple more hammers in, and this seemed to make Dad mad.

“I said, stop hammering!” he yelled.

I think he felt bad for yelling at me, especially since it looked like he had bad news.

“Look,” he said, “you can hammer later, but first–”

Well, I didn’t even wait to hear the rest. As soon as I heard “You can hammer,” that’s what I started doing. Hammering away, happy as an old hammer hog.

Dad tried to physically stop me from hammering by inserting a small log of some sort between my hammer and the fence. But I just kept on hammering, ’cause that’s the way I am when I get that hammer going. Then, he just grabbed my arm and and made me stop.

“I’m afraid I have some news for you,” he said.

I swear, what I did next was not hammering. I was just letting the hammer swing lazily at arm’s length, and maybe it tapped the fence once or twice, but that’s all. That apparently didn’t make any difference whatsoever to Dad, because he just grabbed my hammer out of my hand and flung it across the field. And when I saw my hammer flying helplessly through the air like that I just couldn’t take it. I burst out crying, I admit it. And I ran to the house, as fast as my legs could take me.

“Son, come back!” yelled Dad. “What about your hammer?!”

But I could not have cared less about hammering at that point. I ran into the house and flung myself onto my bed, pounding the bed with my fists. I pounded and pounded, until finally, behind me, I heard a voice.

“As long as you’re pounding, why not use this?”

I turned, and it was Dad, holding a brand-new solid-gold hammer. I quickly wiped the tears from my eyes and ran to Dad’s outstretched arms. But suddenly, he jumped out of the way, and I went sailing through the second-story window behind him.

America Christianity

Libertarianism and Christianity …

While looking up information on Strymon pedals I stumbled across a blog concerning playing guitar in a church worship band. In my current church a few members have stated their liberal leanings and one complimented me on being civil in my staunch capitalist/constitutionalist, freedom loving facebook posts.

I’m wondering how they would respond to the following article:
Why I’m a Libertarian Christian

The comments are open below.

Programming Random

Back to happy

I’ve always wanted to make a career in computers. It’s been 32 years since I got my first computer, a TI-99/4A, and taught myself BASIC and Extended BASIC.

I’ve done a number of other jobs between then and my web programming gig. This marks the end of my sixth season of going back to nature. Back to tending to lawns for the fine folks of my city. I’ve got to say, I’ve never been happier.

I can’t imagine going back to sitting behind this keyboard and staring at this screen all day for money. I may still work a few programming jobs during the off-season but I do believe that I’d actually enjoy delivering pizzas more.


The possibility of leaving .NET behind

I’ve been rather happy with ASP.NET and especially with ASP.NET MVC. I’ve got to say that C# and especially Linq is just a plain pleasure to use. I have no issues with the programming side. Ever since I’ve gone from running my own Windows Server to using shared hosting it’s been one headache after another. Getting permissions set on a folder is like pulling teeth. Getting the host to set trust levels is more teeth pulling. Have an issue with a web app? I’m running out of teeth!

Comparing PHP to C# is sort of laughable. I really don’t like the syntax. I’ve actually gone so far as to avoid PHP by trying Ruby on Rails because it was suggested because the MVC architecture is supposedly similar to ASP.NET MVC. I’ve got to say that Ruby on Rails is just one hot mess. I can’t stand using any of the editors and using the console to generate a simple controller takes so long that I lose interest by the time it’s ready. The “Ruby way” is just nuts, too. The ability or desirability of putting the condition at the end makes absolutely zero sense. What is the difference between “if this occurs, do this” and “do this if this occurs”? Asking for help about Ruby on Rails online is like shouting in the desert. All the forums are dead. No replies. It was once suggested that I get on IRC for Ruby on Rails help. Really? IRC? Maybe I should just hook up a CB Radio while I’m at it. Better brush up on my ten-code.

I currently pay for shared hosting on an Apache server and I’ve had maybe 2 issues totaling half an hour, if that. My shared Windows server constantly gives up and shuts down AppPools refusing to spool them up in a timely fashion. Getting crawled by Google and Bing at the same time just brings the server to it’s knees and I get emailed error reports at least weekly.

Basically, I’ve traded my “WHAT IN BLAZES” moments in programming for “WHAT IN BLAZES” moments in hosting. I can control my confusing moments so I’m strongly considering getting back into PHP and leaving the issues behind. I’ve been fighting it because of all the time and money invested in learning .NET and purchasing Visual Studio but I think in the long run to cut the Windows Server service and go back to Apache will make more sense.

I’ve got to give Microsoft a whole lot of kudos for Visual Studio. It really is that good. They also deserve applause for LINQ, it’s wonderful. In the end though, if I can’t keep a site rolling properly, and I can’t easily add a site to the block list (.htaccess makes this so very simple) then I’m just going to say goodbye and take the other path and relax.


Intermittent internet connection failure using Vista on Verizon DSL

I’ve been having issues with Verizon DSL randomly shutting down and not coming back up for an unacceptable length of time. Strangely it only happens on the Vista machine in the house. None of the Macs have this issue.

I think I discovered the issue. I had changed my settings in Opera using about:config. I had the “Max Connections Server” and “Max Connections Total” set very high and what I think was happening was that I was hitting the DNS server too many times and perhaps it was considered a ping flood or something similar.

I guess you can overdo browser optimization.


Shoutcast Radio server

I helped a friend set up his Shoutcast server for his web site. It was a fun project and I really enjoyed it. I may have to install one for myself one of these days. 🙂

Check out Polish New Castle for polka goodness 24 hours per day. 🙂

ASP.NET C# MVC Programming

Dynamic Javascript using ASP.NET MVC

  1. Create a new MVC applictaion
  2. Open /Views/Shared/Site.Master
    1. <script src=”/Scripts/script.js” type=”text/javascript”></script>
    2. This doesn’t point to anything yet
  3. Open Global.asax
    1. Add a MapRoute
      1. routes.MapRoute(“Javascript”, “Scripts/{scriptFile}.js”, new { controller = “Scripts”, action = “Index”, scriptFile = “script” });
      2. Now /Scripts/script.js points to Script/Index
  4. Add a view for CssController/Index
    1. <%= Url.Content(“~/Content/test.jpg”) %>
  5. Change contenttype in page directive of Views/Scripts/Index.aspx to “text/javascript”
  6. That should do it.

Adding strongly typed objects to javascript is now simple to achieve and instead of adding javascript to the <head> in your master page you can just have a dynamically generated and cached .js file.

You may download a sample MVC2 project here.

ASP.NET C# MVC Programming

Dynamic CSS using ASP.NET MVC

I’ve been considering the usefulness of adding a CSS management system to my CMS that I’ve been working on. Here are the steps I’ve taken to implement it.

  1. Create a new MVC applictaion
  2. Open /Views/Shared/Site.Master
    1. <link href=”/Css/Site.css” rel=”stylesheet” type=”text/css” />
    2. This doesn’t point to anything yet
  3. Open Global.asax
    1. Add a MapRoute
      1. routes.MapRoute(“Css”, “Css/{cssFile}.css”, new { controller = “Css”, action = “Index”, cssFile = “Site” });
      2. Now /Css/Site.css points to Css/Index
  4. Add a class Css.cs to Models
    1. Add public string Body { get; set; }
    2. Add public string Width { get; set; }
    3. Add public string Background { get; set; }
  5. Add definitions as desired
  6. Add a view for CssController/Index
    1. Make it strongly typed with CSScontrol.Models.Css as the model
  7. Change contenttype in page directive of Views/Css/Index.aspx to “text/css”
  8. That should do it.

I’m not sure that I’m convinced of the usefulness of this idea but it’s possible and easy to implement in your ASP.NET MVC project. The possibility of using variables in a CSS file is intriguing.

You may download a sample of the MVC2 project here.MVC3 project here. Let me know if this is a good idea, a horrible idea or just a bit interesting.

Edit – I’ve added a Response.Filter to this to remove extra spaces, tabs, carriage returns/new lines, final semicolons and comments. It brought the 4.96kb file down to 2.74kb. It can be enabled/disbled in Web.config using appSettings key CompressCSS (bool)

Programming Web design Web standards

Adding links to all pages on a site using CSS

OK, I named this post that so that perhaps google will pick it up and those new to CSS will find this post.

There is a really good reason that there are no tutorials on the internet concerning how to add content (a site menu is the most common request) to all the pages on your web site using CSS. That’s because CSS doesn’t control content. It controls styling and nothing more. You don’t use styling to add content.

Why not look into some sort of server side includes. PHP includes will handle the situation. ASP.old can handle it but don’t use it unless you have no other choice (and you do). If you’re really fancy and modern and handsome and awesome you can just use ASP.NET MasterPages and/or User Controls. 🙂

To wrap it up, CSS doesn’t do that. Stop asking about it! Thank you.


Finding the current season using C#

Recently someone challenged me to write a server-side method for finding the current season and changing a style sheet accordingly.

The first step is deciding how to differentiate the seasons. I figured to use the day of the year so that astronomically Spring begins on March 21st, the 80th day of the year. Summer begins on the 172nd day, Autumn, the 266th and Winter the 355th. Of course, on a leap year add one day to each, 81, 173, 267 and 356.

Now to find the day of the year use the DayOfYear property. Also, use the IsLeapYear property to take a day away on leap year if the current day is after February 28th (the 59th day of the year). This is easily done by converting the bool IsLeapYear to an Int32 giving a 0 during non-leap years and 1 during leap year.
int doy = DateTime.Now.DayOfYear - Convert.ToInt32((DateTime.IsLeapYear(DateTime.Now.Year)) && DateTime.Now.DayOfYear > 59);

Then find the current season using a few nested ternary operators (I like ternary operators)
string currentSeason = String.Format("{0}.css",((doy < 80 || doy >= 355) ? "winter" : ((doy >= 80 && doy < 172) ? "spring" : ((doy >= 172 && doy < 266) ? "summer" : "fall"))));

I use this in the head of my MasterPage:
<link rel="Stylesheet" runat="server" id="seasonSheet" type="text/css" />

So all I have to do to add the correct style sheet for the current season is this:

Now a stylesheet named spring.css, summer.css, fall.css or winter.css will be added to your rendered MasterPage.

I hope you’ve found this helpful.