I never thought I’d see the day where people who build web servers would care what other people use them to host. In section 1 of LiteSpeed’s licence agreement you will see “You cannot use the SOFTWARE PRODUCT for any illegal activity or to host pornographic content.” HA!

That’s the stupidest thing I’ve ever seen. What kind of business limits the usage of its products to upstanding citizens only? Last I checked it was the government’s job to impose its views on businesses, not businesses imposing their views on their customers.

I have to say, it’s nice that someone is using their business to take a stand, I guess I’d just prefer it to be in defense of free speech and expression. Sure ALL porn is smutty and violent, but that’s expression in itself. Also, can you fight basic human nature? Perhaps, on a personal level. Repression of sexual tendencies is a lot different than acceptance and non-action though. My point is that pornography is the one place where sexual fantasies are allowed to exist in any way shape and/or form, and Americans, being extremely sexually self-repressed, need that outlet, not more repression.

I also think it’s funny when someone tries to be exclusive because they’re SO awesome when someone else is doing it way better

Here’s a good tip I just found. Note that this may not be for all cases. In fact, I may have stumbled on a freak coincidence. Here’s the story:

I hate java. I hate having java on a server, but hate it even more if it’s only for running one small script. Forever, beeets.com has used the YUI compressor to shrink its javascript before deployment. Well, YUI won’t run without java, so for the longest time, jre has been installed collecting dust, only to be brushed off and used once in a while during a deployment. This seems like a huge waste of space and resources.

Well, first I tried gcj. Compiling gcj was fairly straightforward, thankfully. After installing, I realized I needed to know a lot more about java in order to compile the YUI compressor with it. I needed knowledge I did not have the long-term need for, nor the will to learn in the first place. I, although revering myself as extremely tenacious, gave up.

I decided to try JSMin. This nifty program is simple, elegant, and it works well. It also has a much worse compression ratio then YUI. However, I trust any site that hosts C code and has no real layout whatsoever. Knowing the compression wasn’t as good, I still wanted to see what kind of difference gzipping the files would have.

I recorded the size of the GZipped JS files that used YUI. I then reconfigured the deployment script to use JSMin instead of YUI. I looked at the JS files with JSMin compression:

YUI:
mootools.js     88.7K (29.6K gz)
beeets.js       61.5K (20.5K gz)

JSMin:
mootools.js    106.1K (29.5K gz)
beeets.js       71.0K (17.7K gz)

Huh? GZip is actually more effective on the JS files using JSMin vs YUI! The end result is LESS download time for users.

I don’t know if this is a special case, but I was able to derive a somewhat complex formula:

YUI > JSMin
YUI + GZip < JSMin + GZip

Who would have thought. See you in hell, java.

Being a heavy and casual marijuana user for almost 10 years, and knowing many others who also are/were, I think I have a pretty good understanding of its effects, both positive and negative. I’d like to dispel some myths.

First off, you always hear that marijuana is a gateway drug. I respond: being a teenager is a gateway drug. The emotions, the hormones, the internal and external influences pulling you in a thousand directions every second of your life…it’s a wonder most of us make it through. That alone is enough to make most people want to try just about every drug out there. Also, another reason marijuana is a gateway drug is because kids are always taught how terrible it is and how addictive it is. So what’s the next thing they do? They try it. After finding that they were lied to and mislead, they learn to mistrust those telling them that “all drugs are bad.” So now heroin or cocaine doesn’t seem so bad either, even though they have much more far-reaching effects than marijuana. The point is, the only real cause of marijuana being a “gateway drug” is the fact that kids are constantly being told lies about it. The fix? Honesty.

Secondly, marijuana in moderation has no permanent effects. You can smoke till yer stupid for a few months, but take a week off and you bounce back completely. Its tar is more harmful than that of tobacco, but who aside from the most extreme users smokes a cigarette-pack’s worth of joints every day? The only way to get cancer from marijuana is to pump the smoke into a ventilator and breath it in 24/7. With cutting-edge advances in technology, there are now vaporizers, which remove the tar from smoking. It’s safer than ever.

Thirdly, smoking marijuana is a personal choice. Here we are, in the “land of the free,” restricted from doing things that even if they do have some negative effect, only affect us personally. It’s not illegal to saw off my arm. It’s not illegal to use a pogo stick next to the grand canyon. Why can’t I take a puff on a joint? Who am I harming?

Now to my main point. We’re in an economic crisis. We’re spending a lot of money on battling imports of drugs (including marijuana), and also spending a lot of money keeping potheads in prison (thanks, prison lobby). That’s two very large drains on our economy to

  1. Fund a losing battle. I can go anywhere in almost any town in the US and within an hour, even not knowing anyone, get an eighth of weed. Good job drug war, money well spent. It’s good to know that the taxes I just filed will go to “stopping” me from buying marijuana.
  2. Keep pot offenders in prison. Yeah, these people are really dangerous. They are on the edge of the law…sitting on the couch eating chips and giggling. The more money I can spend to keep them locked up, the better. Oh sure, most of them are dealers, but our culture is founded on the principals of capitalism: if a market exists, fill the void and capitalize. Makes sense to me. Nobody would sell pot if nobody wanted to smoke it. Yes it’s illegal, but once again let’s ask ourselves why instead of pointing to a law.

Now imagine a world where the government grew, cultivated, sold & taxed pot. That’s a lot of money we’d make back. Hell even if they raised the price on it, it’d be worth it to just be able to walk into a store and buy it. They could use the revenue from pot to plug the holes caused by battling all the other drugs.

Maybe it’s time to really start thinking about this. If you are against legalization of marijuana, ask yourself why. Anyone who wants to smoke it already does. Show me a person who wants to smoke pot but doesn’t because it’s illegal, and I’ll show you the portal that takes you out of Neverland and back to reality.

Conservative America: you want a smaller government with less services and less control on the population in general. Why not start with drug reform?

UPDATE – Apparently closing the VM, unplugging the programmer, unselecting the programmer from the USB device menu, or pausing the VM after the programmer has been loaded by the VM makes Windows 7 bluescreen. So far, I have not found a way around this, as such the TOP2004 is effectively useless again. At least it’s able to program chips and stuff, but once loaded, the VM has to stay open and has to be running. Pretty lame. I’ll try to find a fix and update (BTW I’m using the latest VirtualBox as of this writing). Any ideas?


top2004I love electronics. Building basic circuits, programming microcontrollers, making malicious self-replicating robots programmed to hate humans, and even so much as wiring up complete motherboards with old processors and LCDs. I had to find a USB flash/eeprom programmer that fit my hardcore lifestyle. On ebay a few years back, I bought the TOP2004. This wondrous piece of Chinese equipment is cheap, cheap, and USB. I needed USB because in the process of making my own flash programmer a while back, I destroyed half the pins on my parallel port. The programmer worked great, but only worked for one chip. I needed something a bit more versatile. The top2004 isn’t a bad piece of equipment. The manual was translated poorly from Chinese, as is the software that comes with it.

Well, for the longest time, I was a Windows XP guy. Nowadays it’s all about Windows 7. Don’t get me wrong, I’m Slackware through and through, but I need my gaming. So I installed 64-bit Windows and love it, but my programmer no longer works.

Requirements: a 64-bit OS that doesn’t let you use 32-bit drivers (namely Windows 7 x64), a 32-bit version of Windows laying around, virtualization software (check out VirtualBox) which is running your 32-bit version of Windows, a Top2004 programmer, DSEO, and the infwizard utility with libusb drivers (virus free, I promise).

Here’s the fix:

  1. I remembered when jailbreaking my iPod a while back with Quickfreedom that there was a utility used to sniff out USB devices called infwizard, which I believe is part of the libusb package. I never liked libusb because I remember it royally messing up my computer, but the infwizard program was dandy. It can write very simple drivers for USB devices without any prior knowledge of what they are. I used this with the programmer plugged in to create a makeshift driver. Note: Make sure the libusb* files in that zip provided are in the same directory as the .INF file you create for the programmer.
  2. 64-bit Windows doesn’t like you to load unsigned drivers. In fact, it doesn’t allow it at all. You have to download a utility called DSEO (Driver Signature Enforcement Override) to convince Windows that it should let you load the driver you just created.
  3. Once you turn driver enforcement off and load up the driver, you should now be able to see your TOP programmer in the device list. Boot your VM, which previously couldn’t use the programmer (because it had no driver), and install v2.52 of the TopWin software. Once installed, you should be able to select the TOP2004 from the USB device list, and voilá…your programmer works.

Obviously running it in a VM is less than ideal, but it’s better than dropping $200 on a real programmer that might actually have 64-bit support. The great part about this version (2.52) of the TopWin software is that it supports the atmega168, which is almost exactly the same as the atmega328…meaning arduino fans new and old can use it. I’m not an arduino guy and use the chip just by itself with avr-gcc, but you can do whatever the hell you want once you get the TOP programmer working.

In my work as a web developer, I’ve come across many, many cases where projects, namely projects using PHP frameworks, have made use of an Object Relation Mapping tool. I’ve used them a bit myself, in apps that use CakePHP. I have to say, after going from writing plain queries to communicating with objects, I prefer very much writing my own queries.

Let’s first talk about what an ORM is. Basically, you have an app, and you have a database. As the case with most apps, it needs to actually communicate with the database, usually by using queries. Queries are a language the database understands. They allow the application to ask the database for very specific information. An ORM sits between the application and the database. Its role is to give the application an object to communicate to. This object pretends as if it is a piece of data in the database, and allows the app to do things like data.update() or data.delete(). The ORM will write the appropriate queries to the database, regardless of the type of database. A good ORM can also perform joins between pieces of data and perform somewhat complex queries on the database. The purpose is to give a standard interface to communicate with any database.

So here’s my question: on a simple application, an ORM may be a good idea. It provides a standard interface to communicate with, and also allows the database to be “easily” switched out without modifying the main application code at all. But on any app I’ve worked on, there are many, many queries written that an ORM wouldn’t be able to map or understand. So what is the point of an ORM if it can’t handle everything? It’s a standard interface that becomes non-standard the second you write your first non-ORM query.

There is no way anybody could ever write an ORM that handles every query that possibly needs to be written. And instead of defining relationships between data in your queries, you have to define the relationships through the code.  Also, the argument I hear over and over and over: “it allows you to switch out your database easily.” Who the hell switches out their database? Why not just pick a database that does what you want from the beginning…and for the most part, they all do the same damned thing. Also, SQL is kind-of standard, so even without an ORM it’s not like you’ll be rewriting every query from scratch…most likely you’ll have to rewrite a few database-specific functions (think SELECT last_insert_id()). Is it really so hard to do this, especially if you only do it once? If you are switching from Oracle to PGSql to MySQL to MSSQL every other day, then yes, an ORM would probably make sense, but otherwise I don’t see the point.

Data is data, it is not another object. Moving everything under the sun into the object-oriented model does not make anyone’s life easier. SQL is good. Procedural is lightning fast. Learn how to use these, because OO will not solve all your problems.

I welcome use-cases besides those I have mentioned and arguments for/against ORMs in the comments. I’m speaking from personal experience and not married to my opinion…so I’m actually very curious if any of you successfully use an ORM that does everything you need it to.

This will be a collection of things I’ve stumbled on during my time as a business owner (or just in the business world in general). First off, all of my experience is with small business and the service industry, and the only way I see that changing is if my business really takes off. So far, owning a business has been one of the most unstable, stressful, and aggravating occupations I’ve had…but it has by far been the most fun. There really is nothing better than working for yourself. It takes a lot of drive and you really have to love what you’re doing. If you don’t love it, you aren’t going to be able to do it day after day, week after week, year after year. I guess that’s the first tip:

  • Love what you do. If you don’t love what you do, what’s the point? You aren’t really getting anything out of working for yourself, and I can tell you now that for all the stress and work it takes to get a business going and keep it going, it’s just not worth it if you don’t get to do what you love for at least a small portion of the day. Find something you’re knowledgeable and passionate about, and the money and success will follow.
  • Consider working with a partner. Owning a business is hard work. Sometimes more than one person can handle. In my experience, it’s been a lot easier having a partner than if I had to deal with everything on my own…someone who you trust and who shares your passion for what you do and for success. You can take a sick day and he/she will work in your stead, you can swap meetings with clients/customers, take vacations while the other one works, etc. You have to split the profits, but can make it up by doing almost twice the work anyway, and you get a lot more freedom.
  • Be smart about your time. Since you’re just starting out and don’t have much (if any) capital, it makes sense to try and do everything (bookkeeping, equipment repairs, etc) yourself, right? Absolutely wrong…it almost always makes more sense to hire a professional. You make money by doing what you’re good at. You don’t make money doing time-consuming tasks that you aren’t trained for. Hiring a professional to help you out may seem like a waste of money, but you save money in the long run. They’re great at what they do, you’re great at what you do…so use the time you would have spent floundering with what they’re good at to do what you’re good at, and you can pay them and have leftovers. Need a contract? Hire a lawyer. Doing taxes? Hire an accountant. Being smart about your time is really important, especially when considering your personal sanity.
  • “No” can be a great answer. Speaking of personal sanity, let’s talk about the most important word you can possibly have in your vocabulary. “No.” This word will save you. Trust me. You can’t really use this word when you work for someone else, so enjoy it. Try it now…say “no” out loud. Didn’t that feel great? What the hell am I talking about? You don’t have to do everything everyone needs (read: wants) all the time, and you certainly don’t have to do it when they need it. I’m not talking about when you and a client set a deadline and you decide you just don’t want to do it…that’s called laziness or poor planning. But if you find yourself inundated with work and a client out of the blue decides they need that huge project they’ve been mulling over in their head done THIS WEEK, “no” is a very appropriate response. “No” can also be used in other contexts.

    For instance, someone comes to you with a project that doesn’t make sense or it just sucks. Or the project is the best idea ever, but you get a strange vibe from the person pitching it. You don’t necessarily have to use the word “no” in this case, but the general concept is there: money != happiness. Just because a project seems great at first doesn’t mean it won’t drag you into a fiery pit of everlasting hell later on. Listen to your intuition, and know when to turn something or someone down.

    On a side note, the more you exclusively work on better projects with better clients, the better projects and clients you’ll attract. This isn’t a business technique as much as it is the way of the universe.

  • Communication is essential. Want to know a great way to piss someone off? Go way over budget on their project, then send them a bill at the end of the month. That’s a recipe for the swift end of a business relationship. Are you going to be 2 weeks late on a deadline? Tell your client ahead of time. Are you way over budget? Let your client know what happened and why! The sooner you tell them, the more appreciative they’ll be. Honesty, transparency, and proactive communication are the foundation of any relationship, but also translate well to business relationships.

    Also, be honest and verbose with your estimates. Sure, a prospective client may go with someone else with lower numbers on paper, but when they find out the other company more or less lied just to dupe them into getting their business, they won’t be happy. Also think of it this way: your numbers are the way they are for a good reason. If the client doesn’t want to pay your fair rate for a project, do you really need that penny-pinching tightwad arguing about every invoice with you anyway? Remember: the better the projects and clients you work with, the better the projects and clients you’ll get.

Ok, that’s about all I have in me for now. Maybe I’ll do a followup later, but hopefully these tips can help anyone new to business, or maybe give someone who’s been doing it for a long time a little perspective. A lot of this stuff I apply not only to my business life, but life in general, with great success on both ends. Keep in mind this is mainly geared towards the service industry, and being only 23 I’m not the most knowledgeable person in the world, but hopefully the things I’ve found so far are universal.

I’ve been using Google Analytics for quite some time. I do love it. It’s easy, it’s pretty, it’s addicting to look at the charts and graphs. Lately I’ve been trying out an alternative to Google Analytics, Piwik.

I’m not going to list a bunch of bullet points with features of both compared. I am, however, going to tell you my experiences with both. I started with Google Analytics. The setup and install is so easy, a blind ape could do it. Once tracking, the graphs, maps, numbers are all easy to understand. You can compare your site to others like it, and you can set up different segments of visitors and display the graphs according to your segments.

Google Analytics has been fun and easy. I do have some hangups about it. Although there is no cost, Google owns your data. They are giving you a service, you are selling them your data in return. They know about your visitors and can track them based on their interest in various pages of yours. They can do whatever they want with this information. For some people, this is fine. I personally don’t give much of a rat’s ass what Google thinks they know about me. For others, this is a privacy issue.

I also ran into some limitations with Google Analytics. It doesn’t track downloads very easily, and getting any sort of report that it doesn’t already give you is impossible because you only get what you see.

I decided to try Piwik. It’s open source, they advertise themselves as an alternative to GA, and you own all of your data. I threw up a new site on NearlyFreeSpeech.net, installed Piwik (literally a 5 min. install, just as they say), and started playing with it. A lot of the graphs are the same, the dashboard is completely customizable and is not jenky at all. After tracking some sites with it, I’m convinced it’s actually more accurate than Google. It picks up more visitors and keywords from search engines.

So I’ve been using Piwik regularly for about 3 or 4 months. There are some things I miss. Goals in Piwik do not have the awesome funnel that GA does. Not even close. The goals are pretty stupid, honestly, and all the ones I track are done manually through javascript. It’s nice to be able to track them, but it’s something I can get through any of my apps anyway. So from what I’ve noticed, Piwik is missing the funnel view (although they are working on it), and it’s missing an IP filter: half the visits are from me sometimes, and it’d be nice to be able to browse my own apps without having to worry about messing up the analytics.

Aside from those two points, Piwik is the winner for me. I really never actually check Google Analytics anymore. Piwik really has stepped up and provided a service that’s comparable in features to GA, but free as free for me to use it without having to give away info about my awesome users. I would definitely urge anyone who likes Google Analytics to check out Piwik. The best part is, they’re actively developing it and there more and more features to look forward to as new releases come out.

With a name like “California Taxpayers Right to Vote Act,” you know there is an ulterior motive. We already have the right to vote, right? In fact, we do. So what is Prop 16, really?

Prop 16 is designed such that before a city or state entity buys a section of power grid and resells that power to its residents, it must hold an election and get a 2/3 majority vote. While it may seem nice to have the voters decide on whether or not a government entity should be spending their money, it actually doesn’t make sense. The reason is the expenses involved in NOT allowing the entities to do this.

Think of it this way. A government agency spends some of your tax dollars buying up sections of the power grid. Money lost, right? Not necessarily. After they own that part of the grid, they start charging you for the power they give you. Great, so they spend your money to charge you money…but wait, there’s more. Because the government entity is essentially a business at this point which provides a service and charges for that service, it’s making money back. On top of this, the residents now have a choice of who they get their power from. This is known as “competition” and is the leading force against monopolization in any industry. If a market segment is profitable, doesn’t it make sense for the government to capitalize on that market segment?

Now let’s look from another angle. You are a taxpayer (I’m assuming) and you want to make the final decision about whether or not a section of power grid is bought. This is great, but your local government spends a lot (I mean, a LOT) of money without your express permission because we as a city/state/country give our government that power. We elect people to handle this in our stead because we are busy and don’t have the time to make every decision collectively. That’s how a representative republic works (no, the U.S.A. is not a democracy, sorry!!)

So why bother holding an (expensive) election so the govt. entity can spend more money petitioning and explaining to you why it’s good that they actually make money? Especially when they’re spending your money on lots of other things, all the time. Holding an election to give a local government entity the right to actually turn your tax dollars into profit (or at least offer you lower prices on energy) seems like a waste of time, no?

So where did this bill come from? If you read the Wikipedia page, it’s obvious: PG&E. Now, I have nothing against these guys. They do a great job, and obviously they’re just protecting their interests. They do not want the government competing with them, which is why thus far they have donated $6.5 million to the campaign, and have stated they plan to donate up to $35 million total. They obviously have a vested interest in forcing local governments to get 2/3 support in elections (which is very, very hard to do).

By voting “Yes!” on prop 16, you gain absolutely no more rights than you had before, you only make it harder for local and state governments to turn your tax dollars into something useful: cheap power for you. The name “California Taxpayers Right to Vote Act” is a misleading name designed to dupe the voters (that’s you!) into voting for higher energy prices and less competition in the energy market.

It’s important that our local governments are accountable for the money they spend, but passing highly targeted, specific bills that force them to ask, nay, beg, the voters for approval on everything they spend money on slows (if not stops) progress and makes our government much less useful…after all, we’re already electing them and paying them to decide where our money goes. Doesn’t voting on every single issue defeat the purpose of appointing representation?

Also, if the residents of a city really do not want the government spending their money on buying areas of power grid, they can get a ballot intiative (which takes a handful of signatures) and vote on it themselves.

https://www.nearlyfreespeech.net/I’ve never formally written about NearlyFreeSpeech.net until now, even though I’ve always had good things to say. Even after some extended downtime I’m excited to say I’m still on the bandwagon. The reason is their transparency. I’ve worked with many hosts before, and none are as honest or transparent. Even the Rackspace Cloud gave glossed over responses to their problems. A few of my NFS sites went down just about all of yesterday because of a server failure. I logged into the control panel (proprietary, but I actually prefer it over cPanel or hsphere) and looked at the sticky support note left for all customers.

I half-expected to see “teh service is dwn!! were trying to fix it! sry lol!” as with most hosts. Instead, there was page after page of updates with details and explanation. After this, I was able to rest easy, because I had a good idea of how long it would take to get everything back up. Whenever it didn’t go as planned, they’d post another update.

I cannot stress how awesome this was. Yes, they made my downtime awesome by treating me and the other customers as if we were techs in the server room. I didn’t really care about my sites being down, because I knew they were working really hard on it and probably wouldn’t go to bed until it was fixed.

This brings up another point though: transparency makes your customers wet. I know it’s been discussed time after time, but it really is true. People don’t like “Our apologies, our service went down,” as much as they like “Our service went down from 6:30-8:30 UTC today when lightning struck main Big-IP load-balancer, and our failover didn’t switch the backup on.”

What’s a Big-IP? What’s “failover?” It doesn’t matter…treating your customers as equals and letting them decide if information is relevant or not will make them wet.

In my three years experience with NFS, this is the first downtime I’ve experienced. Their support was amazing enough to update every customer with detailed information about the problems they were experiencing and how they were fixing it. I cannot recommend them more. For larger sites that require custom services running, you’re out of luck. For blogs, informational sites, paypal-driven shopping carts (no SSL, yet), etc this is the best shared host I’ve dealt with, ever. They’re dirt cheap, and the only host I know of who won’t disable your site without a court order or copyright violation.

In case you haven’t heard, a man, Joe Stack, angry at the IRS crashed a plane into his local IRS chapter. I don’t have much to say about the issue itself. Obviously, I disagree with crashing airplanes, or other means of transportation, into buildings. I also disagree with violence in general. The man left behind a suicide note on his site (which the FBI promptly removed) that detailed his hardships with the government during his life and why he did what he did. I don’t agree with what he did, but, save the last page, I do agree with most of what he said.

I’m posting what’s left of the suicide note on here in the form of images (all that was left of it).

0218102stack1a0218102stack2a0218102stack3a0218102stack4a0218102stack5a0218102stack6a

The part that struck me the most:

The communist creed:
  From each according to his ability, to each according to his need.
The capitalist creed:
  From each according to his gullibility, to each according to his greed.

I’m posting this because I agree with what was said. I believe that America is a wasteland of deceit where gains are privatized, and losses are socialized.

Like I’ve said and believe firmly, violence never solves anything… it continues cyclically and endlessly. It’s important, though, to see why violence happens and not just pass it off as “terrorism.” Yes, terrorism exists, but that doesn’t mean there isn’t a reason behind it, no matter how misguided.

My heart and thoughts go out to those who lost their lives as a result of this incident. Yes, they were part of this unjust, corrupt system, but isn’t everyone? They were obvious targets but we’re all in this together, and it’s not fair they should pay when everyone involved (everyone) is just as guilty as the politicians and corporations.

UPDATE – found the original text, linked on what used to be Joe Stack’s website.