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.