I picked this one up from Stii’s blog. Ever wondered how to pronounce Linux? Well here we go…
I used to pronounce it like Linus does in the video but after time I started pronouncing it “line-ux” because so many other people pronounced it that way. Oh well, time to start getting out of that old habit and to start pronouncing it properly
Just a quick note to let fellow coders know that I have joined GitHub and you should follow me I haven’t put up any code yet but I have a few projects that are in desperate need of finishing and they will definitely go up once I have the final release versions done. I have been using SVN for a while now and haven’t got my hands dirty yet with git, so I am really looking forward to diving in.
For those of you who don’t know what git or GitHub is (I suspect very few of you), git is basically version control for code and github is hosting for your git repo’s. GitHub offers you free hosting for unlimited open source projects and if you want private projects they have a subscription model. What I really like about GitHub is that it has a social element to it. You can follow other users and interact in various ways.
I was tasked with the job of writing a small PHP script today that detects whether a search engine spider is crawling a page of your site. There are a few ways to go about it. The challenging thing about the script is that there are so many spiders on the web. The script I am currently using only checks for the main spiders. It does however allow you to add as many crawlers as you want. Here is the code with comment explanations:
if ( ! function_exists('check_if_spider'))
{
function check_if_spider()
{
// Add as many spiders you want in this array
$spiders = array(
'Googlebot', 'Yammybot', 'Openbot', 'Yahoo', 'Slurp', 'msnbot',
'ia_archiver', 'Lycos', 'Scooter', 'AltaVista', 'Teoma', 'Gigabot',
'Googlebot-Mobile'
);
// Loop through each spider and check if it appears in
// the User Agent
foreach ($spiders as $spider)
{
if (eregi($spider, $_SERVER['HTTP_USER_AGENT']))
{
return TRUE;
}
}
return FALSE;
}
}
And there we have it. You can find a list of search engine crawlers here.
Now the other way of doing this check without having to specify the spiders in an array is using the get_browser() PHP function. It returns an array with very useful data. One of the things it returns is [crawler] TRUE/FALSE. I didn’t use it because I have not done enough testing to see how efficient it is. You can read more about this function on the PHP.net website.
Today I realized that I really cant keep up with the number of blogs I want to read on a daily basis anymore and I started using a feed reader again. I have tried both Google Reader and Bloglines in the past and this time around I decided to stick with Google Reader.
For a developer it is really important to keep up with the latest news in the development and tech world. Things are constantly changing in our profession and if you don’t keep up you will get lost very quickly. For me, there are a few must read blogs that I immediately subscribed to. They include the likes of TechCruch, TechCrunch IT, Silicon Alley Insider, and a bunch of developers blogs.
I decided to go with Google Reader for the following two reasons:
I like Google products and use quite a number of them. While they may not be the prettiest, they definitely get the job done. I like that I only have to have 1 user account for all their services. It saves me having to remember another username and password.
I found that reading feeds on Bloglines was actually a lot more difficult than with Google Reader. The way the categories are organized are basically the same with both but when it comes to reading posts, Google Reader is much more simple and user friendly. An example would be when you want to read a blog post on bloglines, you click the blog and it opens every single post you have not read and then once you click away, they all disappear and are marked as read. With Google Reader you read them one by one in a more organized fashion.
So I am currently looking for more development blogs to subscribe to. Hit me up in the comments and I will check out your blog and most likely subscribe
After I was without internet due to crappy Telkom (customer) service a few weeks back I decided to go looking for a new ISP. In South Africa we have a ton of different companies offering ADSL bandwidth but the funny thing is that they are mostly all running off the same backbone! So basically when deciding on a provider it really only comes down to one thing: customer service! (Prices are very similar between companies too).
In 2009 international bandwidth prices are generally expected to decrease as a new undersea cable will arrive here in June called “Seacom” and it will enable companies to buy cheaper international bandwidth. Beyond 2009 and into 2010 an additional 2 undersea cables will have landed here and there is talk of operators joining together to lay even more cables! All very good news for the South African consumer
So I started looking at various different ADSL offerings during my downtime and was really impressed with Web Africa. I liked that their site didn’t look like it was built in 1995 and their ADSL bandwidth packages are fairly competitive. They also offered a prepaid account which is what I really wanted. I decided to sign up with them in the end and I am really glad that I did.
The Web Africa sales and customer support team is excellent. They generally respond to your queries within minutes and are extremely friendly. I ran into a few issues when I ordered my first gig of bandwidth as it was not setup correctly. So I gave them a call and the guy on the phone was extremely friendly and sorted my problem out in 5 minutes. I was then up and running smoothly. (I wish I could remember his name to give him some kudos)
4 days later my 1 gig account ran out and I ordered a 10gig account. It was also setup really quickly by one of their friendly consultants.
I only have two minor annoyances but I can definitely live with them because of the great service. I am more than willing to pay for good service
The first annoyance is that the prepaid bandwidth is a lot more expensive than the month by month contract packages. I can understand this but it would be nice if the prepaid bandwidth was a little cheaper
And the second annoyance is basically that when your account gets capped you cannot access the local bank websites to top it up. You can access the Web Africa website but if you want to do a bank transfer you wont be able to do it online with your capped account. Apparently (not sure how true this is) if you top your account with 1 gig it is activated immediately and you can then go pay for it.
Other than that I give them 10 out of 10 for service and friendliness. I definitely will be using them a lot in the future.
As I fully expected, my blogging journey so far this year has been full of new learning experiences. Mostly good experiences and some challenging ones. Something I wanted to touch on today is what having a “personal” blog means and why you should have one.
I have done a lot of thinking about my blog and what the purpose of it should be. Should it be to teach others something I know, or to share experiences, or should it be to brand myself or even something else? Other thoughts that I have had is who am I trying to target with my blog? In the end I have come to the conclusion that a “personal” blog should really be about anything you want and the target audience should be whoever the heck wants to read it
A personal blog is all about you, the blogger. Now, that may sound a bit egotistical but it is true. The point of a personal blog is to write about your experiences and share a little piece of your life with the world. Not only that, I feel another good use of a personal blog is for it to be used as a reference. What kind of reference? It doesn’t really matter. If you are a coder you can post code snippets which you find useful and that may need in the future. If you are a Mom with a kid you can document milestones in the kids life. You can document whatever you feel like.
There are a few things that I want to achieve with this blog and I have documented some of them in my about page. Mostly though I want to be able to look back in a few years and say “Hey, I remember when I was working on that project” or “Where is that useful little code snippet that I documented” etc. I want to also connect with my readers and be able to launch open-source projects and get feedback and even contributors.
One thing I have found is that the key to successful blogging is to keep posting . As long as you keep your blog active and post a few times a week you will definitely build a readership and start reaping the rewards. I have started lots of blogs before and all of them failed in the end because I didn’t keep them active.
And that is about it for tonight. I slacked off a little last week and missed a few posts but all will change this week I have a ton of drafts that I need to finish and I am really looking forward to getting them out
I got totally owned today by the extremely crappy UNISA credit card payment form. Today was the last day that I could register for my second year Bsc (actually a mixture of 1st and 2nd year modules) and it was also the last day that you could pay for your studies.
So to make a long story short I eventually ended up having to pay my studies via the UNISA credit card form located here, rather than doing an internet banking transfer. With-out checking (stupidity on my part, I know) I simply entered my details and hit submit. Later in the day I get a message from Mr Reed letting me know that they do not have an SSL certificate on their payments form. It would appear as if they are not encrypting any payment data.
How the heck can such a huge international distance education university make such a basic e-commerce mistake? I hear from a few people (including people working inside UNISA) that the systems and processes are falling to pieces there. I would definitely like to hear an explanation from someone in the UNISA tech department on this issue and will be contacting someone tomorrow.
All that I can say right now is thank heavens for credit card insurance!
While my internet was capped over the past weekend I did a bunch of surfing on local websites and found some pretty cool sites. Along with the sites I also stumbled upon a bunch of local FTP sites which give you download access to all the latest linux distributions, free software, games and lots more. Here they are in no particular order:
I managed to get a couple gigs of files download from these. There are actually a couple more and I will update this post at a later stage when I get a full list. Happy downloading
Pagination is a simple concept that can be executed in very many different ways. In some ways pagination is one of the most crucial parts of a website. It breaks your content up and helps visitors navigate your website easily. If it weren’t for pagination our blogs would probably be one very long page and most likely take quite a long time to load if you have a reasonable amount of posts.
I have seen tons of different implementations of pagination. My favorite probably being Digg like pagination as implemented on this blog. While the Digg like pagination class is a very basic form of pagination there are a lot of websites out there that have implemented quite exotic pagination.
One such example of exotic pagination is dzone.com. I recently joined dzone.com and even though the website is rather cluttered and busy their pagination totally rocks. What happens is when you come to the end of the current page you are viewing (it is actually a little frame) there is a Ajax call which loads the next results (that would be listed on a second page). So basically as you keep scrolling down to view more content, it automatically loads it for you without you having to click a next page button. Check it out at dzone.com.
Luckily for us, South African PHP developer and jQuery extraordinaire, Barry Roodt, has developed a jQuery plugin that does all the above and can be implemented on your own site with very little effort. The current version of the plugin is 0.1b and you can get it here.
Definitely check out Barrys plugin (there is also a demo here for you to see how it works) and let him know if you implement it on your own site. I am definitely planning on playing around with it in the near future!
My weekend started off really crap as our first Telkom ADSL account got capped and the second decided to stop working. After hours of debugging and trying to get the account to work, nothing worked. The same thing Saturday and finally today we had a break through and found out that it is an issue on Telkoms side. Big surprise there hey?
As annoyed and frustrated as I was having no internet it actually was a big blessing in disguise! Why? Well because I discovered some awesome local websites, got to watch 2 movies (that I wouldn’t have watched if the internet was on because I would have been working) and I also got to go out with my Girlfriend and have a really good dinner
It is so easy to get caught up in this “digital lifestyle” that you kind of forget that there is a whole world out there waiting to be discovered. I definitely need to “turn off” the internet more often and take up more hobbies. Last year I did quite a bit of mountain biking and played a lot of golf. I really want to start that up again and I also want to start playing some action cricket.
I will definitely do a post later for the South Africans talking about some really cool local ftp sites which you can use to download Linux distros, software, games and more on a capped account. I downloaded about 8 gigs of data on our first ADSL account this weekend while our second account wasn’t working.
I also want to write a post about a cool group of guys who have setup local networks in the major cities around South Africa which you can connect to and share files, play games and more. I will be getting my equipment next month to connect to the local network here in Pretoria.
Until then, disconnect, catch a movie or something and enjoy life a little