Since I’ve relaunched my blog I’ve been focusing on the things that pop up in my day as a freelancer and blogger. I’ve been posting a mixed back of items, everything from my thoughts on freelancing to actual programming tips. I’ve got another domain that would be perfect for tech tips and I’m thinking of leaving those off here and keeping the site purely focused on the business end of things. Observations, tips and other information and anything I learn as I do this full time but leaving all the “geek” technical stuff out. I think it would make more sense to keep the code and stories separate because I doubt the majority of the audience would be interested in both.
So in a few weeks I’ll launch a more technical blog, but in the mean time, this one shall continue on it’s new path.
I had to update a link for a client today and most of their content is database driven. This makes it easy to do quick searches and even search and replace. Most databases support this and the syntax is pretty close, but this tip is specifically for MySQL.
So, lets say you have an affiliate link that looks like this:
http://www.domain.com/aff.php?affid=1234
But you get an email from your affiliate manager telling you to update your links to a new format like this:
http://affiliates.domain.com/offer/1234
MySQL will make that easy.
First, lets check to see how many of our records have that url:
SELECT * FROM table_name WHERE field_name like ‘%http://www.domain.com/aff.php?affid=1234%’
In plain English, that means, select everything from the table named ‘table_name’ where the filed named ‘field_name’ is like the url. The % signs around the url are “wildcards”.
Lets say it returned 189 records. Now lets do our replace
UPDATE table_name SET field_name = REPLACE(field_name, “http://www.domain.com/aff.php?affid=”, “http://affiliates.domain.com/offer/”) WHERE field_name like ‘%http://www.domain.com/aff.php?affid=1234%’
This query is a little more complex, but still pretty straight forward. You should see 189 records updated. You don’t have to use the where clause in this query, but I do simply because it speeds things up and it’s a good habit to always use a where clause unless you really need for your query to look at or check every record. In that query, inside the replace, the first field is the OLD string that you want to replace and the second one is the NEW string you want to replace it with. Just like search and replace using your favorite text editor.
Technorati Tags: MySQL, Search, Replace
I do a lot of development in linux/unix. In fact, that’s where all my development is, but I spend a fair amount of time in the “CLI” or command line interface. I use putty and ssh in to edit files and look at logs and just generally do what I do.
Today I ran into a problem with a file and I couldn’t figure out what was wrong. I kept getting an error and the spacing was off so I started suspecting a hidden character. vi, the command line editor I use in linux can show you hidden characters. Just type:
set: list
And bingo, hidden characters are revealed.
Turning them back off is just as easy:
set: nolist
Write that down, it comes in handy.
I’m getting ready to kick start We Heart Pets. It already gets some decent amount of traffic from all the hard work Aeryn has put into it and with both of us writing and adding features I can see it being a very solid site for us. In it’s prime it was doing about 1000 unique visitors a day according to webalizer (which is a bit inflated, but just as a baseline) and it’s about half that now. I suspect in 3 months it’ll be double that. I need to get Google Analytics up on it as it’s much more accurate.
The template is based off the one I did for this site and for Twitter Hacks. And speaking of stats, Twitter Hacks is doing about 1000 page views a day on average and around 120 rss subscribers. It’s doing really well in terms of natural growth.
While I want to rush into getting as many sites going and profitable as possible I just want to take it slow and get each one going full steam before I decide if we can handle another project. My wife and I both love books, but the margin is so low on them that it’s hard to justify putting in a ton of work for such a small product. Still, we may build our book site just as a fun project once we get a little further along. We do have one unique product in mind for that niche that we haven’t seen anywhere yet and it’s hard enough to create that it’ll be useful to anyone who loves books, I think!
Last week and this week has been rough. My Windows PC got a major trojan/virus, which I haven’t had in years. It was stupidity induced trying to help out a family member, but that’s how it goes. I’ve been needing a format for years though and when antivirus and spyware tools couldn’t identify or clean the infection it was time to format. I also happen to have just bought a Macbook Pro, which I love. So it’s time to ask:
What do you use for web development on your Mac and/or PC?
On my PC, I use Photoshop, FileZilla and Putty. I usually use UltraEdit and Homesite, but the versions I had were from a previous job (I bought the pc when I left) so now I have to re-buy them myself. I’m 99% sure I’m going to buy UltraEdit for the search and replace alone. It’s fairly cheap and has a ton of great features. Homesite is a little pricey, but I haven’t found anything that feels as good. I’m toying with Alleycode, which is free. If I have to pay for it I’m going to buy Homesite. But if you guys have a great tool that’s free, I’d love to hear about it.
On my Mac I’m using Transmit, Coda, Terminal and Textmate. I’m not as proficient with the Mac a I am with the PC yet so I’m not sure I could just abandon the PC all together, but it’s very tempting at this point. The Macbook Pro is about as solid as you could hope for. You can pry it from my cold dead hands!
So, what are you using? I’d love to try out some new stuff. I have 30 day bets for Homesite and UltraEdit so I have some time before I have to buy. I’d rather spend money on advertising or PPC rather than buying more software.
There seems to be a Google PageRank update happening. A friend noticed yesterday or the day before that a clients domain had regained it’s PR rank after the last hit everyone took for either buying or selling text links. I didn’t see the change until today and I’m still seeing some movement on some domains so I don’t think it’s fully over. I have seen some of my sites moving up and some moving down. Luckily, I don’t care about PR, but some people do. All I care about is being listed in the search engines so I want to do everything I can to stay within the guidelines. As long as I can do that and continue to build my traffic through natural means and/or PPC advertising, I’ll be a happy camper.
Anyone else notice anything major during this update?
I noticed a link coming into my site from Problogger from a guest post I did over there when Darren was away. Typos aside, I still think it’s a pretty decent article on productivity and how I do things. Other than working from home now, my daily routine is very much like it was then. Let me quote myself, which may be a first?
There a couple of points I want to make before I get into how I do things. So many people complain about not having time to do stuff, or that their kids get in the way or that they are just too tired when they get home etc. The fact is, if you want to do more, or not even do more, but do something other than your’re doing (maybe your’re spending all your time watching kids, or working in the garden, whatever) then you need figure out what your priority is. You can tell me all day long that you want to be a writer, blogger or web developer and do more, like I do, but if you don’t make it a priority then you’ll never do any of it. If you really want to do it, then do it. It’s that simple. Don’t tell me about why you can’t do it. There are days when it’s hard for me. Don’t lecture me that it’s because I don’t have kids, Aeryn and I decided not to have kids. Don’t tell me you have other things to do. I do too. I just decide what’s most important to me. Watching TV, reading a book, going out to eat, laundry and the million other daily chores, or is my priority writing, blogging and working on my web sites? Sometimes I have just as much trouble getting to what I love to do because of life just as much as the next person. But at the end of the day, I want to be a writer. I want to blog. I want to build up my websites. So, before you decide that you need to get something done, you need to decide what that really is. That will make the rest of the decisions easy.
Head over and ready my Productivity Tips. I think I’ll have to brush up that article, fix the typos and repost with some of the cool tricks I’ve added to my day.
My friend, MissZoot, whom you may know from her free blog templates and whom I worked with at 451 Press is now doing the full time blogger / freelancer thing. I’d first like to welcome her to this totally new kind of freedom and stress! Though the freedom is well worth the stress. MissZoot’s a local so it’s always fun to know other people who you can meet up with and share ideas on what’s working and what isn’t.
I also wanted to link to her latest projects to help spread the word. The first one is Pregnant And Unemployed. I’ll quote here as she explains what it’s about:
I mean, if you were a blogger (of four years) and you found yourself suddenly unemployed and pregnant, what would you do? Well…launch another blog of course. It’s not going to be as personal as this one is. It is going to be more about products/recipes/lessons - but I would love it if you could come by and help me with some of the issues I’m already having as a Work From Home Mom. I’m hoping to get some good submissions and get some advertising for that site and maybe help make enough money to make ends meet for the next 8-9 months.
The other project is something I know a bit more about, TV. And like her, I’m very upset that The 4400 has been canceled! The nerve. Anyway, make sure to check out TV Bloggin.
I love MissZoot’s writing style and humor and I hope she succeeds at this thing we call “working from home”. Check out her sites, subscribe to the feeds and spread the love!
Looks like I’ll be going to SXSW 2008 again this year. It’ll be my second time. Right now I’m just waiting on my email confirmation and then I’ll book my flight tomorrow. This year should be even better because I’m staying right across from the convention center. No more cabs and shuttles! I still remember the area pretty well and I know what to expect from the event. If anyone else is going to be there and wants to meet up, drop me an email (chrispian[at]gmail.com).
I may try to do some event blogging while I’m there, but mostly I’m looking forward to learning from all the talented folks who’ll be there and meeting new people!
Update: Looks like everything is all set! Woot!
As I’ve been doing my research to get down and dirty with affiliate marketing I’ve been hitting the usual places:
I also read a few affiliate blogs, like Shawn Collins. Aside from some good and some not-so good ebooks, does anyone have any recommended reading on affiliate marketing. I think I know enough about the process to get crackin but I’d still love to keep researching and learning. So if you’ve got a great spot for affiliates, drop me a link.